query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
11298dc6d4dbf989e1d9869efe5253d9
interval between directory watcher runs
[ { "docid": "1b14e426d889fa553d82db3235c4facd", "score": "0.0", "text": "public function getPollingInterval()\n {\n return $this->pollingInterval;\n }", "title": "" } ]
[ { "docid": "8d1ca80438e0d2834305c05096b82173", "score": "0.66159683", "text": "function watch($dpath=null) {\n $haveTrigger = ($this->_dirTrigger || $this->_fileTrigger);\n $dpath = ($dpath===null) ? $this->dpath : $dpath;\n $maxModTime = time() - $this->minAge;\n $minModTime = $this->getInitialModTime();\n $expireAt = ($this->duration>0) ? time() + $this->duration : -1;\n\n while(1) {\n $t0 = time();\n if( $expireAt > 0 && $t0 >= $expireAt ) {\n if( $this->VERBOSE ) { echo(\"Watch expired.\\n\"); }\n return true;\n }\n\n if( $this->VERBOSE ) { echo(\"Scanning `$dpath`\\n\"); }\n $maxModTime = $t0 - $this->minAge;\n list($files,$mdirs) = $this->_dirscanm($dpath,$minModTime,$maxModTime);\n\n if( !$haveTrigger && !empty($files) ) {\n if( $this->VERBOSE ) { echo(\"A file was modified (no triggers).\\n\"); }\n return $files;\n }\n\n if( $this->_dirTrigger ) { \n if( $this->canonical ) { \n foreach( array_keys($mdirs) as $i ) { \n $mdirs[$i] = realpath($mdirs[$i]);\n }\n }\n foreach( $mdirs as $fpath ) { \n if( $this->VERBOSE ) { echo(\"Directory Modified: $fpath\\n\"); }\n call_user_func($this->_dirTrigger,$fpath);\n }\n }\n\n if( $this->_fileTrigger ) { \n if( $this->canonical ) { \n foreach( array_keys($files) as $i ) { \n $files[$i] = realpath($files[$i]);\n }\n }\n foreach( $files as $fpath ) {\n if( $this->VERBOSE ) { echo(\"File Modified: $fpath\\n\"); }\n call_user_func($this->_fileTrigger,$fpath);\n }\n }\n\n // Update minModTime filter using files returned.\n // Avoid gaps with preserved file times during bulk copy.\n foreach($files as $fpath) { \n $minModTime = max($minModTime,filemtime($fpath)+1);\n }\n foreach($mdirs as $fpath) { \n $minModTime = max($minModTime,filemtime($fpath)+1);\n }\n\n if( $this->VERBOSE ) { echo(\"Sleep \".$this->interval.\".\\n\"); }\n sleep($this->interval);\n }\n return false;\n }", "title": "" }, { "docid": "e261a3f1ce897cebf1433052fc792b9d", "score": "0.64975625", "text": "public function getDirectoryMonitor();", "title": "" }, { "docid": "f1c80a3a90aa31a214d305c953b18ece", "score": "0.6085377", "text": "public function watch()\n {\n // check for any changes\n $events = $this->read();\n if (!empty($events)) {\n // ensure we don't have duplicate events (it happens...)\n $events = $this->_array_unique($events);\n\n // iterate over events\n foreach ($events as $e) {\n // handle the event\n $filename = $e['name'];\n\n // check if filename is excluded\n if ($this->_fileIsIgnored($filename)) {\n continue 2;\n }\n \n // check if we actually need to do anything with the file\n $ext = strtolower(substr($filename, strrpos($filename, '.') + 1));\n if (in_array($ext, $this->_watchedFileExtensions)) {\n // generate the full input path to the file\n $dirpath =\n rtrim($this->_pathLookup[$e['wd']], DIRECTORY_SEPARATOR) .\n DIRECTORY_SEPARATOR;\n\n $filepath = $dirpath . $filename;\n \n // check for an output path for the file\n $outputPath = $this->_getOutputPathByDescriptor($e['wd']);\n\n // notify of detected change\n echo '[' . date('m.d.Y H:i:s') . '] Change detected in: ' . $filepath . PHP_EOL;\n $msg = \"A change was detected in file:\\n$filepath\\n\\nRe-compiled.\";\n @system('notify-send Watchdog \"' . $msg . '\"');\n\n // perform the update on the command line and display result to STDOUT\n $output = $this->_executeCmd($filepath, $dirpath, $ext, $outputPath);\n if (!empty($output)) {\n echo $output . PHP_EOL;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "201944fa24b6c001e1cdc2c9bc2fe937", "score": "0.6070118", "text": "function DirectoryWatcher($dpath=null) { \n $this->dpath = $dpath;\n return true;\n }", "title": "" }, { "docid": "cdb7cb453c5345f3baa9dbcebcccc85e", "score": "0.59721905", "text": "public function detectChanges()\n {\n $changedDirectories = array();\n $changedFiles = $this->detectChangedFiles($this->monitoredFiles);\n\n foreach ($this->monitoredDirectories as $path => $filenamePattern) {\n if (!isset($this->directoriesAndFiles[$path])) {\n $currentSubDirectoriesAndFiles = $this->readMonitoredDirectoryRecursively($path);\n $this->directoriesAndFiles[$path] = $currentSubDirectoriesAndFiles;\n\n $this->directoriesChanged = true;\n $changedDirectories[$path] = \\TYPO3\\Flow\\Monitor\\ChangeDetectionStrategy\\ChangeDetectionStrategyInterface::STATUS_CREATED;\n }\n }\n\n foreach ($this->directoriesAndFiles as $path => $pathAndFilenames) {\n try {\n $currentSubDirectoriesAndFiles = $this->readMonitoredDirectoryRecursively($path);\n if ($currentSubDirectoriesAndFiles != $pathAndFilenames) {\n $pathAndFilenames = array_unique(array_merge($currentSubDirectoriesAndFiles, $pathAndFilenames));\n $this->directoriesAndFiles[$path] = $pathAndFilenames;\n $this->directoriesChanged = true;\n }\n $changedFiles = array_merge($changedFiles, $this->detectChangedFiles($pathAndFilenames));\n } catch (\\TYPO3\\Flow\\Utility\\Exception $exception) {\n unset($this->directoriesAndFiles[$path]);\n $this->directoriesChanged = true;\n $changedDirectories[$path] = \\TYPO3\\Flow\\Monitor\\ChangeDetectionStrategy\\ChangeDetectionStrategyInterface::STATUS_DELETED;\n }\n }\n\n if (count($changedFiles) > 0) {\n $this->emitFilesHaveChanged($this->identifier, $changedFiles);\n }\n if (count($changedDirectories) > 0) {\n $this->emitDirectoriesHaveChanged($this->identifier, $changedDirectories);\n }\n if (count($changedFiles) > 0 || count($changedDirectories) > 0) {\n $this->systemLogger->log(sprintf('File Monitor \"%s\" detected %s changed files and %s changed directories.', $this->identifier, count($changedFiles), count($changedDirectories)), LOG_INFO);\n }\n }", "title": "" }, { "docid": "801d8e719b83ca30009164ef114cad32", "score": "0.58507776", "text": "public function watch($ttl = 60) {\n if (!$this->hasSources()) {\n $this->logger->warn('Watcher found no sources');\n return;\n }\n $startTime = time();\n $fd = \\inotify_init();\n $changeRegistered = FALSE;\n\n // Collect all config files and save per path.\n while ($this->iterator->valid()) {\n $file = $this->iterator->current();\n $watch_descriptor = \\inotify_add_watch($fd, $file->getPath(), IN_CREATE | IN_CLOSE_WRITE | IN_MOVE | IN_MOVE_SELF | IN_DELETE | IN_DELETE_SELF | IN_MASK_ADD);\n $this->iterator->next();\n }\n $this->iterator->rewind();\n while ($this->iterator->valid()) {\n if (inotify_queue_len($fd) === 0 && $changeRegistered && !$this->isCompiling()) {\n $changeRegistered = FALSE;\n $this->compile();\n }\n $events = \\inotify_read($fd);\n\n if (!$this->isPaused()) {\n foreach ($events as $event => $evdetails) {\n // React on the event type.\n switch (TRUE) {\n // File was created.\n case ($evdetails['mask'] & IN_CREATE):\n // File was modified.\n case (((int) $evdetails['mask']) & IN_CLOSE_WRITE):\n // File was moved.\n case ($evdetails['mask'] & IN_MOVE):\n case ($evdetails['mask'] & IN_MOVE_SELF):\n // File was deleted.\n case ($evdetails['mask'] & IN_DELETE):\n case ($evdetails['mask'] & IN_DELETE_SELF):\n if (preg_match_all('/\\.scss$/', $evdetails['name'])) {\n $changeRegistered = TRUE;\n }\n break;\n }\n }\n }\n sleep(1);\n if ($ttl != '*' && ($ttl * 60) + $startTime < time()) {\n exit(0);\n }\n }\n }", "title": "" }, { "docid": "db6cc24b2765366f0f790699e792d2b8", "score": "0.5796931", "text": "public function watch()\n {\n }", "title": "" }, { "docid": "5d0a76b42b97a3866119d2845f2de0bf", "score": "0.5655874", "text": "public function watch($file, $events) {}", "title": "" }, { "docid": "a664e8437612c8e58224993ce7a06825", "score": "0.5572101", "text": "private function getDirectoryWatcher()\n {\n return new PythoPhant_DirectoryWatcher();\n }", "title": "" }, { "docid": "a0823b470b45f83448ec5a06306fbcbc", "score": "0.5404041", "text": "public function execute() {\n if ($this->dirs != '' && $this->days > 0) {\n $maxtime = $GLOBALS['EXEC_TIME'] - ($this->days * 86400);\n $dirs = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::trimExplode(chr(10), $this->dirs);\n foreach ($dirs as $dir) {\n // Get all files in dir sorted by mtime\n $files = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getFilesInDir(PATH_site . $dir, '', TRUE, 'mtime');\n if (is_array($files) && count($files)) {\n foreach ($files as $file) {\n // test each file, break on first with good time (all following will be keeped)\n if (filemtime($file) < $maxtime) {\n @unlink($file);\n } else {\n break;\n }\n }\n }\n }\n }\n return TRUE;\n }", "title": "" }, { "docid": "2188e8800a7dde29eef2915ad1bbd86b", "score": "0.5288992", "text": "public static function executeCron(){\n $dirname = 'sites/default/files/test/';\n \n $time = time() - (60*10); \n $dir = opendir($dirname);\n while($date = readdir($dir)){\n if($date == '.' OR $date == '..') continue;\n\n $filetime = filemtime($dirname . \"/\" . $date);\n\n // Löschen wenn älter als 10 Minuten\n if($filetime < $time){\n unlink($dirname . \"/\" . $date);\n } \n }\n\n // Remove some Entries from Watchdog\n db_query(\"DELETE FROM watchdog WHERE message='Login attempt failed for %user.' OR type IN ('access denied', 'page not found')\");\n\n $x = 0;\n $vku_dir = \\LK\\VKU\\Export\\Manager::save_dir;\n $dir_vku = opendir($vku_dir);\n while($file = readdir($dir_vku)) {\n\n if(in_array($file, ['.', '..'])) {\n continue;\n }\n\n $explode = explode('.', $file);\n $id = $explode[0];\n\n $test = \\LK\\VKU\\VKUManager::getVKU($id);\n if(!$test) {\n unlink($vku_dir . '/' . $file);\n $x++;\n }\n }\n closedir($dir_vku);\n }", "title": "" }, { "docid": "24178a42401176ddcaa1a4df06ad9d9c", "score": "0.5230847", "text": "function run()\n{\n\tif(scanFolder())//si la funcion retorna false no hacemos nada\n\t{\n\t\tserverNotify();//solo notificamos cuando hay archivos dentro de la carpetaftp\n\t}\n}", "title": "" }, { "docid": "6224d8313445fe09806ac5eb67c7ada7", "score": "0.5214857", "text": "public function runTimedChecks()\n {\n $this->checkAutomated();\n $this->checkDebt();\n }", "title": "" }, { "docid": "ed836094338be595171270534ab0f9ac", "score": "0.5165165", "text": "public function runOnDirectories(): bool;", "title": "" }, { "docid": "aeb85ad3da45937cc448337198d42d5f", "score": "0.51581407", "text": "public function update()\n {\n foreach ($this->_watched as $inputPath => $info) {\n // only trigger on files/dirs with modify flag\n if ($info['events'] != IN_MODIFY) {\n continue;\n }\n \n // skip if not readable\n if (!is_readable($inputPath)) {\n continue;\n }\n \n // determine if directory or file\n if (is_dir($inputPath)) {\n $iterator = new DirectoryIterator($inputPath);\n foreach ($iterator as $fileInfo) {\n if ($fileInfo->isDot() || $fileInfo->isDir()) {\n continue;\n }\n \n // get the full path to the file\n if ($fileInfo->isFile()) {\n // get some file info\n $filename = $fileInfo->getFilename();\n $filepath = $fileInfo->getPathname();\n $ext = $fileInfo->getExtension();\n \n // check if ignored\n if (!$this->_fileIsIgnored($filename)) {\n // check if we actually need to do anything with the file\n if (in_array($ext, $this->_watchedFileExtensions)) {\n // determine the directory\n $dirpath = dirname($inputPath);\n $dirpath = rtrim($dirpath, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;\n \n // check for an output path for the file\n $outputPath = $this->_getOutputPathByDescriptor($info['descriptor']);\n \n // notify of detected change\n echo '[' . date('m.d.Y H:i:s') . '] Forced compile on: ' . $filepath . PHP_EOL;\n \n // perform the update on the command line and display result to STDOUT\n $output = $this->_executeCmd($filepath, $dirpath, $ext, $outputPath);\n if (!empty($output)) {\n echo $output . PHP_EOL;\n }\n }\n }\n }\n }\n } else if (is_file($inputPath)) {\n // determine the filename\n $filename = basename($inputPath);\n \n // check if we actually need to do anything with the file\n $ext = strtolower(substr($filename, strrpos($filename, '.') + 1));\n if (in_array($ext, $this->_watchedFileExtensions)) {\n // determine the directory\n $dirpath = dirname($inputPath);\n $dirpath = rtrim($dirpath, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;\n \n // check for an output path for the file\n $outputPath = $this->_getOutputPathByDescriptor($info['descriptor']);\n \n // notify of detected change\n echo '[' . date('m.d.Y H:i:s') . '] Forced compile on: ' . $filepath . PHP_EOL;\n\n // perform the update on the command line and display result to STDOUT\n $output = $this->_executeCmd($inputPath, $dirpath, $ext, $outputPath);\n if (!empty($output)) {\n echo $output . PHP_EOL;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "68c9f3840694fc6cc80fd9b38d3e2f73", "score": "0.5128405", "text": "public function schedule()\n {\n $watchers = Watcher::all();\n \\Log::debug($watchers);\n foreach ($watchers as $watcher) {\n $last = $watcher->status >= 400 || $watcher->status == 0 ? 'offline' : 'online';\n $status = $this->getStatus($watcher->url);\n \\Log::debug($status);\n // double check if offline\n $status = $status[1] >= 400 ? $this->getStatus($watcher->url) : $status;\n \\Log::debug($status);\n // triple check if offline\n $status = $status[1] >= 400 ? $this->getStatus($watcher->url) : $status;\n \\Log::debug($status);\n $watcher->status = $status[1];\n $watcher->save();\n $current = $status[1] >= 400 || $watcher->status == 0 ? 'offline' : 'online';\n if ($last != $current) {\n $url = $watcher->url;\n $emoji = $current == 'online' ? '✅' : '❌';\n $text = \"$emoji Your site $url is $current!\";\n $data = [\n 'Alert' => $text,\n 'HTTP Code' => $status[1],\n 'HTTP Status' => $status[2],\n ];\n $this->sendToChats($watcher->app_id, $data);\n }\n }\n }", "title": "" }, { "docid": "545d906a1253ee6a67a3e40c094921e3", "score": "0.5041449", "text": "public function run() {\n\t\t\t$this->set_days();\n\t\t}", "title": "" }, { "docid": "986ac512c4516fe39410d6aa81c0d6ef", "score": "0.5037696", "text": "public function actionListen()\n {\n if ($this->force === null) {\n $this->force = true;\n }\n\n if (!$this->force) {\n $this->stdout(\"(!) Notice: Force option is disable, all schedules updates will not be synchronized.\\n\");\n }\n\n $waitSeconds = $this->nextMinute();\n $this->stdout(\"Waiting $waitSeconds seconds for next run of scheduler\\n\");\n sleep($waitSeconds);\n $this->triggerCronCall();\n }", "title": "" }, { "docid": "fb64bce4a3ada9798a73732ae90c5150", "score": "0.50058454", "text": "public function watch() {\t\tif (! property_exists($this, \"watchlist\") ) {\n\t\t\t//Hasn't been run yet.\n\t\t\t$this->watchlist = null;\n\t\t\tforeach($this->css_process as $file) {\n\t\t\t\t$this->watchlist[] = array(\n\t\t\t\t\t\"file\" => $file,\n\t\t\t\t\t\"hash\" => hash_file(\"sha256\", $file)\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t$result = false;\n\t\t\n\t\t//Loop through each file in the watch list and calculate it's MD5 sum.\n\t\t\n\t\tfor($i=0;$i<count($this->watchlist);$i++) {\n\t\t\t$current_hash = hash_file(\"sha256\", $this->watchlist[$i][\"file\"]);\n\t\t\tif ( $current_hash != $this->watchlist[$i][\"hash\"] ) {\n\t\t\t\t//Files have changed.\n\t\t\t\t$result = true;\n\t\t\t\t$this->watchlist[$i][\"hash\"] = $current_hash;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn $result;\n\t\t\n\t}", "title": "" }, { "docid": "471e6251a96d687ae8468b43c65409dd", "score": "0.49967533", "text": "protected function processChangedAndNewFiles() {}", "title": "" }, { "docid": "d9f6aa3a85b721a196bd1aaf7f1baa37", "score": "0.49750346", "text": "public function ChangeMonitor($channel, $file);", "title": "" }, { "docid": "9538ea16e58a38b22afae839bafc6301", "score": "0.4956515", "text": "public function watchFile($file)\n {\n $this->isWithinInvokeContext();\n\n $id = count($this->files) - 1;\n foreach ($this->getAllFiles($file) as $file) {\n $this->files[$id][$file] = filemtime($file);\n }\n }", "title": "" }, { "docid": "058e39fabaf7110c23ffb6030a6f85a6", "score": "0.49370322", "text": "public function cron()\n\t{\n\t\t// Check and restart the minerd if it's dead\n\t\tif ($this->redis->get('minerd_autorecover'))\n\t\t{\n\t\t\t$this->util_model->checkMinerIsUp();\t\n\t\t}\n\t\t\n\t\t// Store the live stats to be used on time graphs\n\t\t$this->util_model->storeStats();\n\t}", "title": "" }, { "docid": "c0da7975abc71c61e923292818a655a5", "score": "0.48840064", "text": "public function getDirectoryRun();", "title": "" }, { "docid": "1a52cb69f781f2c08a2401d5ff1f204b", "score": "0.4879943", "text": "function charts_handle_on_hourly() {\n $dir=CHARTS_OUTPUT_IMG_DIR;\n $dir = escapeshellcmd($dir); \n $pattern=\"$dir/ac_charts_*.{png,pdf}\";\n // Escape any character in a string that might be used to trick \n // a shell command into executing arbitrary commands and then\n // get a list of the matching files.\n $files = glob($pattern,GLOB_BRACE); \n\n // Now loop over the $files unlinking any older then the $ttl\n $ttl=60*60*1; # 1 hour\n $now=time();\n foreach ($files as $file) {\n if (filemtime($file) < ($now - $ttl)) {\n #echo \"$file goes\\n\";\t# DEBUG ONLY\n unlink($file);\n } else {\n #echo \"$file stays\\n\";\t# DEBUG ONLY\n }\n }\n\n }", "title": "" }, { "docid": "448f16e26c11c54be0662f73238c8e4f", "score": "0.4878584", "text": "function cronjob_clear($directory)\n{\n foreach (scandir($directory) as $entry) {\n if ($entry !== \".\" && $entry !== \"..\") {\n cronjob_unlink($directory . DIRECTORY_SEPARATOR . $entry);\n }\n }\n}", "title": "" }, { "docid": "1d5502893535ed2c6f8f5d2ce317ed91", "score": "0.48751444", "text": "function checkConfig(){\n global $ugenome_list_file; global $loadscript;global $dir; \n if(!file_exists(\"$ugenome_list_file\")){exec(\"$perl $loadscript $dir\");}\n $Diff = (time() - filectime(\"$ugenome_list_file\"))/60/60/24;\n if ($Diff > 21) exec(\"$perl $loadscript $dir\");//also check the last mod date < 21 days\n}", "title": "" }, { "docid": "d1fe3f3b145b0734f0f78c00860cd03a", "score": "0.4863173", "text": "function wp_opcache_invalidate_directory($dir)\n {\n }", "title": "" }, { "docid": "a59d0fbe5b9828619e4effa6c605a5ab", "score": "0.48566458", "text": "function cronjob_remove()\n{\n foreach (scandir(WEBAPPIFY_PATH_APPLICATIONS) as $entry) {\n if ($entry[0] !== \".\") {\n $directory = WEBAPPIFY_PATH_APPLICATIONS . DIRECTORY_SEPARATOR . $entry;\n $deployment = intval(file_get_contents($directory . DIRECTORY_SEPARATOR . WEBAPPIFY_DEPLOYMENT));\n if ($deployment + WEBAPPIFY_TIMEOUT < time()) {\n cronjob_unlink($directory);\n }\n }\n }\n}", "title": "" }, { "docid": "9b1f8a160a0f01f47261fbbb6b273689", "score": "0.48553205", "text": "public function startWatch($interval = 1000000, $timeout = null, Closure $callback = null)\n\t{\n\t\t$this->watching = true;\n\n\t\t$timeWatching = 0;\n\n\t\twhile ($this->watching)\n\t\t{\n\t\t\tif (is_callable($callback))\n\t\t\t{\n\t\t\t\tcall_user_func($callback, $this);\n\t\t\t}\n\n\t\t\tusleep($interval);\n\n\t\t\t$this->tracker->checkTrackings();\n\n\t\t\t$timeWatching += $interval;\n\n\t\t\tif ( ! is_null($timeout) and $timeWatching >= $timeout)\n\t\t\t{\n\t\t\t\t$this->stopWatch();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "814e5ab884fd8cf67fb29dfaffd80f78", "score": "0.484626", "text": "public function set_interval($interval) {}", "title": "" }, { "docid": "8d365ba2ef6f817ff3c9d48ce75bbacf", "score": "0.48037747", "text": "private function digestLogs() {\n if (!file_exists($this->logDir)) {\n $this->setMakeLogDir();\n }\n $files = glob($this->logDir . '/*', GLOB_ONLYDIR);\n $deletions = array_slice($files, 0, count($files) - $this->confdays);\n foreach ($deletions as $to_delete) {\n array_map('unlink', glob(\"$to_delete\"));\n }\n\n return true;\n }", "title": "" }, { "docid": "c4fd35062c3f422afc88a5b9f72b9e82", "score": "0.47926867", "text": "function add_last_changes($dir,$name,$count = false){\n\n\t$info = json_decode(file_get_contents($dir.'_info.json'));\n\n\tdate_default_timezone_set('Europe/Minsk');\n\n\tif($count){\n\t\tif(!is_dir($dir.$name)){\n\t\t\t$json = json_decode(file_get_contents($dir.$name.'.json'));\n\t\t\t$records = count($json);\n\t\t} else {\n\t\t\t$json = json_decode(file_get_contents($dir.$name.'/_info.json'));\n\t\t\t$records = count($json);\n\t\t}\n\t}\n\n\tfor($i = 0; $i < count($info); $i++){\n\t\tif($info[$i]->name == $name){\n\t\t\t$info[$i]->last_changes = date(\"d.m.Y / H:i:s\");\n\t\t\tif($count){\n\t\t\t\t$info[$i]->total = $records;\n\t\t\t}\n\t\t}\n\t}\n\n\t$fp = fopen($dir.'_info.json','w');\n\tfwrite($fp,json_encode($info));\n\tfclose($fp);\n}", "title": "" }, { "docid": "e9d9b14279f2a96f17867543bc88b82f", "score": "0.47922075", "text": "public function cleanLogs() {\n \n $dir = dirname(__FILE__) . \"/../application/logs/\";\n\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file != \".\" && $file != \"..\" && filemtime($dir.$file) <= time()-60*60*72 ) {// 60 (sec) * 60 (min) * 72 (hour) \n unlink($dir.$file);\n } \n }\n closedir($handle);\n } \n }", "title": "" }, { "docid": "d2aa79d2756f37e1535bf6985a08700c", "score": "0.47903278", "text": "function onDir($dir) {\r\n\t\t$this->_filesystemList [] = $dir;\r\n\t}", "title": "" }, { "docid": "46e7e24c69bad304aea3c9eadf28c4ef", "score": "0.4786161", "text": "function logCheckOnWorkDate()\n\t{\n\t\t// Soll durchgefuehrt werden?\n\t\tif (!$this->m_enable || !$this->m_eraseFilesEnable)\n\t\t{\t\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t// Suche nach Dateien in Verzeichnis\n\t\t$dir = sprintf(\"%s%s\", $this->m_base, $this->m_sub);\n\t\tif (($resource = opendir($dir)) != false)\n\t\t{\t\n\t\t\twhile(($file = readdir($resource)) != false)\n\t\t\t{\n\t\t\t\tif ($file == \".\" || $file == \"..\") continue;\n\t\t\t\t\n\t\t\t\t// Passt Dateiname zu Format der Logdateinamen\n\t\t\t\tif (eregi($this->m_fileNameTemplateMatch, $file))\n\t\t\t\t{\n\t\t\t\t\t// In Liste aufnehmen\n\t\t\t\t\t$fileList[$fileCount++] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($resource);\n\t\n\t\t\t// Wurden Dateien gefunden.\n\t\t\tif ($fileCount)\n\t\t\t{\t\n\t\t\t\t$fileCount = 0;\n\t\t\t\t// Array der gefundenen Dateien sortieren.\n\t\t\t\trsort($fileList);\n\t\t\t\t\n\t\t\t\tfor (; count($fileList);)\n\t\t\t\t{\t\n\t\t\t\t\t// Ist Datei von selbigem Datum?\n\t\t\t\t\tif (strncmp($tmp, $fileList[0], 10) == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Datei mit gleichem Datums-Zeichenfolgenbeginn\n\t\t\t\t\t\t// Kann sein, da fuer verschiedene Kanaele gelogt werden kann.\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// Datums-Zeichenfolge des Dateinamen aufnehmen.\n\t\t\t\t\t\t$tmp = $fileList[0];\n\t\t\t\t\t\t$fileCount++; // Zu erhaltende Datei\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datumsbereich der zu erhaltenden Dateien ueberschritten?\n\t\t\t\t\tif ($fileCount > $this->m_eraseFilesCount)\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = $this->m_base . $this->m_sub . $fileList[0];\n\t\t\t\t\t\tif (unlink($file) == false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Konnte nicht geloescht werden!\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//echo \"Erase file: \" . $fileList[0] . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\t//echo \"Hold file: \" . $fileList[0] . \"\\n\";\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datei aus Array entfernen\n\t\t\t\t\tarray_shift($fileList);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "b8c7acca4d515b3e08585de167b43185", "score": "0.47681558", "text": "public function onTimer() {\r\n if (filemtime($this->db) >= $this->lastCheck) {\r\n $data = file($this->db);\r\n if ($data) {\r\n $message = \"\";\r\n foreach ($data as $row) {\r\n $row = str_replace(\"\\n\", \"\", str_replace(\"\\r\", \"\", str_replace(\"^@\", \"\", $row)));\r\n if ($row == \"\" || $row == \" \")\r\n continue;\r\n\r\n $message .= $row . \" | \";\r\n usleep(300000);\r\n }\r\n\r\n // Remove | from the line or whatever else is at the last two characters in the string\r\n $message = trim(substr($message, 0, -2));\r\n\r\n $defaultID = 0;\r\n foreach($this->channelConfig as $chanName => $chanConfig) {\r\n // If a channel is marked as default (usually the first on the list) we populate defaultID here, just to make sure..\r\n if($chanConfig[\"default\"] == true)\r\n $defaultID = $chanConfig[\"channelID\"];\r\n\r\n // Search for a channel where the search string matches the actual message\r\n if(stristr($message, $chanConfig[\"searchString\"])) {\r\n $message = $chanConfig[\"textStringPrepend\"] . \" \" . $message . \" \" . $chanConfig[\"textStringAppend\"];\r\n $channelID = $chanConfig[\"channelID\"];\r\n }\r\n elseif($chanConfig[\"searchString\"] == false) { // If no match was found, and searchString is false, just use that\r\n $message = $chanConfig[\"textStringPrepend\"] . \" \" . $message . \" \" .$chanConfig[\"textStringAppend\"];\r\n $channelID = $chanConfig[\"channelID\"];\r\n }\r\n else { // If something fucked up, we'll just go this route..\r\n $channelID = isset($defaultID) ? $defaultID : $chanConfig[\"channelID\"]; // If default ID isn't set, then we just pick whatever we can..\r\n }\r\n }\r\n\r\n // Get the Discord Channel Object\r\n // Send Message to Channel Object\r\n $channel = \\Discord\\Parts\\Channel\\Channel::find(isset($channelID) ? $channelID : $defaultID);\r\n $channel->sendMessage($message);\r\n }\r\n\r\n $h = fopen($this->db, \"w+\");\r\n fclose($h);\r\n chmod($this->db, 0777);\r\n $data = null;\r\n $h = null;\r\n }\r\n clearstatcache();\r\n $this->lastCheck = time();\r\n }", "title": "" }, { "docid": "65e00e7d03abd03ea18e350b8f568775", "score": "0.47514635", "text": "public function run()\n {\n $sources = new SourceRepository();\n $sources->refresh();\n }", "title": "" }, { "docid": "b211c7149c1d85fa49eb3f0dc03d92d9", "score": "0.47499493", "text": "function enable($watcherId);", "title": "" }, { "docid": "65a18ef0f5eb731bd3d2396875ba8366", "score": "0.47475183", "text": "protected function refreshVacancies() {\n search_api_cron();\n sleep(5);\n }", "title": "" }, { "docid": "e140970d4c05fc9c5d01fd7830949ac8", "score": "0.47469574", "text": "public static function getUpdateInterval() {\n return 20;\n }", "title": "" }, { "docid": "7b87129b045f79f44ea6d5ec44660afa", "score": "0.47457662", "text": "public function __construct() {\n\t\t$this->setInterval(60 * 60);\n\t}", "title": "" }, { "docid": "8b8cffbc1d50de72e444f82740c9d05c", "score": "0.47327906", "text": "function asu_isearch_cron() {\n\n // Cache data from configuration\n _asu_isearch_cache_dept_feed();\n\n // Cache dept tree and employee types data\n _asu_isearch_cache_dept_tree_data();\n\n // Begin profile migrations\n _asu_isearch_begin_migrate(FALSE);\n\n // Cleanup the profiles which are no longer associated with\n // unit depts in iSearch. Only run once per day.\n $last_clean = variable_get('last_profile_cleanup', NULL);\n\n if ($last_clean != date('ymd', time())) {\n _asu_isearch_cleanup();\n variable_set('last_profile_cleanup', date('ymd', time()));\n }\n}", "title": "" }, { "docid": "2051489f6bfc412562a4ecf24f1dd5fa", "score": "0.47285238", "text": "function removeOldFile($dir, $exp){\n echo 'scan directories : ' . $dir . \"\\r\\n\";\n $folders = Storage::directories($dir);\n $countFolders = sizeof( $folders );\n $countFiles = 0;\n if ( $countFolders == 0 ){ // โฟลเดอร์ขั้นสุดท้ายแล้ว\n $files = Storage::files($dir);\n foreach($files as $ff){\n $lastModified = Storage::lastModified($ff);\n if ( ($lastModified + $exp) < time() ){\n Storage::delete($ff);\n }\n }\n return sizeof( Storage::files($dir) );\n }\n foreach($folders as $ff){\n $countFiles = $this->removeOldFile($ff, $exp);\n if ( $countFiles == 0 ){\n Storage::deleteDirectory($ff);\n }\n }\n\n return $countFiles;\n }", "title": "" }, { "docid": "9243d80462cd543d96676c923cf351de", "score": "0.47087574", "text": "public function startWatch($interval = 1000000, $timeout = null, Closure $callback = null)\n {\n $this->watching = true;\n\n $timeWatching = 0;\n\n while ($this->watching) {\n if (is_callable($callback)) {\n call_user_func($callback, $this);\n }\n\n usleep($interval);\n\n $this->tracker->checkTrackings();\n\n $timeWatching += $interval;\n\n if (! is_null($timeout) && $timeWatching >= $timeout) {\n $this->stopWatch();\n }\n }\n }", "title": "" }, { "docid": "da7f5beac55082b2ec5975e62d7a51b0", "score": "0.4697789", "text": "public function testOnNewDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $obj->onNewDirectory($this->dir1);\n $this->assertFileExists($this->directory . \"/1\");\n\n $obj->onNewDirectory($this->dir2);\n $this->assertFileExists($this->directory . \"/1/2\");\n\n $obj->onNewDirectory($this->dir3);\n $this->assertFileExists($this->directory . \"/1/2/3\");\n }", "title": "" }, { "docid": "ee01b7cd352dbdddfcabca82df25cde9", "score": "0.46951127", "text": "function sb_scan_dir() {\n\tglobal $wpdb;\n\t$files = $wpdb->get_results(\"SELECT name FROM {$wpdb->prefix}sb_stuff WHERE type = 'file';\");\n\t$bnn = array();\n\t$dir = SB_ABSPATH.sb_get_option('upload_dir');\n\tforeach ($files as $file) {\n\t\t$bnn[] = $file->name;\n\t\tif (!file_exists($dir.$file->name)) {\n\t\t\t$wpdb->query(\"DELETE FROM {$wpdb->prefix}sb_stuff WHERE name='\".mysql_real_escape_string($file->name).\"' AND sermon_id=0;\");\n\t\t}\n\t}\n\n\tif ($dh = @opendir($dir)) {\n\t\twhile (false !== ($file = readdir($dh))) {\n\t\t\tif ($file != \".\" && $file != \"..\" && !is_dir($dir.$file) && !in_array($file, $bnn)) {\n\t\t\t\t$file = mysql_real_escape_string($file);\n\t\t\t\t$wpdb->query(\"INSERT INTO {$wpdb->prefix}sb_stuff VALUES (null, 'file', '{$file}', 0, 0, 0);\");\n\t\t\t }\n\t\t}\n\t\t closedir($dh);\n\t}\n}", "title": "" }, { "docid": "4a677b6a16bfbc04a4e90abbb8351cee", "score": "0.4674228", "text": "function run_resource_check() {\n\tlog_event('resource check begun');\n\t$int = get_option('check_interval ',24);\n\tif ($int > 0) {\n\t\twp_schedule_single_event( time() + 3600 * $int, 'standards_resource_check' );\n\t\tlog_event('next check in ' . $int . ' hours');\n\t}\n\tresource_import(true);\n\t\n}", "title": "" }, { "docid": "c8db9284afeedb6de2344586d96cc073", "score": "0.46636984", "text": "public function handle(ConfigRepository $configRepository)\n {\n // Todo: Make this more readable\n $processes = $configRepository->getApplicationConfigurations()->map(function ($app) {\n return collect($app['config']['services'] ?? [])->map(function ($service) use ($app) {\n return [\n 'process_name' => $service['process_name'],\n 'paths' => collect($service['restart']['watch'] ?? [])->map(fn ($path) => $app['dir'].DIRECTORY_SEPARATOR.$path),\n ];\n })->reject(fn ($service) => blank($service['paths'] ?? null));\n })->flatten(1);\n\n $watcher = tap(new Process([\n (new ExecutableFinder)->find('node'),\n Storage::path('file-watcher.js'),\n $processes->pluck('paths')->toJson(),\n ], null, null, null, null))->start();\n\n while (true) {\n if ($watcher->isRunning() &&\n $path = $watcher->getIncrementalOutput()) {\n $processes->where(function ($process) use ($path) {\n return collect($process['paths'])->reject(function ($p) use ($path) {\n return str($path)->contains($p);\n });\n })->pluck('process_name')->each(function ($processName) use ($path) {\n $this->line(str('File change detected: '.$path)->squish());\n $this->comment(\"Restarting {$processName}…\");\n $this->app->make(SupervisordRepository::class)->restartProcess($processName);\n });\n } elseif ($watcher->isTerminated()) {\n $this->error(\n 'Watcher process has terminated. Please ensure Node and chokidar are installed.'.PHP_EOL.\n $watcher->getErrorOutput()\n );\n\n return 1;\n } else {\n usleep(0.2 * 1000000);\n }\n }\n }", "title": "" }, { "docid": "bff3dc516e92019431624da98bf72fc5", "score": "0.46532372", "text": "public function __sleep()\n {\n return array('files');\n }", "title": "" }, { "docid": "e81ffbd4126b192d708141f11b75b4df", "score": "0.46482077", "text": "public function run($loop = true)\n {\n // If No loop.\n if(! $loop)\n {\n $now = Carbon::now(); \n \n // Call before clean up stuff.\n $this->cleanup_driver->before_on_data(); \n \n // On data time.\n $this->on_data($now, $this->data_driver->get_data($now));\n \n // Call after clean up stuff.\n $this->cleanup_driver->after_on_data(); \n } \n \n // Just keep looping until we are done.\n while($loop)\n {\n // Get current time object\n $now = Carbon::now();\n\n // Call before clean up stuff.\n $this->cleanup_driver->before_on_data();\n\n // Fire every min.\n if(($now->second == 0) && ($this->time_base == '1 Minute'))\n {\n $this->on_data($now, $this->data_driver->get_data($now));\n }\n \n // Call clean up stuff.\n $this->cleanup_driver->after_on_data();\n \n // Sleep one second.\n sleep(1);\n }\n }", "title": "" }, { "docid": "c30977caa79bcf3e63764726daecfd50", "score": "0.46444982", "text": "protected function watchForUpdates() {\n\t\t$app = $this->app;\n\t\t/** @var EventDispatcher $dispatcher */\n\t\t$dispatcher = $app['dispatcher'];\n\n\t\t$dispatcher->addListener(StorageEvents::POST_SAVE, function (StorageEvent $event) use ($app) {\n\t\t\t$this->handleUpdateEvent($app, $event);\n\t\t});\n\t}", "title": "" }, { "docid": "2dc35d745863c3618d9b4067b5cfcbe4", "score": "0.46239573", "text": "public function dir_rewinddir() {}", "title": "" }, { "docid": "fd6dab360100c9630371ef1fdaaf66df", "score": "0.4622261", "text": "public function daily()\n {\n $this->history_purge();\n $this->emailque_purge();\n $this->search_purge();\n $this->update_event_info_status();\n $this->autoemails_closing_date();\n $this->runtime_log_purge();\n // $this->gen_temp_files(); // not used. leaving for reference\n\n // $this->add_baseurl(1500);\n // removed to own stand-alone script\n // $this->history_summary();\n // $this->build_search_table();\n }", "title": "" }, { "docid": "5628dafae19fc6676197c7349a603fda", "score": "0.4620625", "text": "public function setInterval($interval)\n {\n $this->interval = $interval;\n }", "title": "" }, { "docid": "5628dafae19fc6676197c7349a603fda", "score": "0.4620625", "text": "public function setInterval($interval)\n {\n $this->interval = $interval;\n }", "title": "" }, { "docid": "0bcd3084d95455879355e0273e1f7ac3", "score": "0.4617505", "text": "public function __construct() {\n\t\t$this->setInterval(5 * 60);\n\t}", "title": "" }, { "docid": "a1fe911f063cbeb3f66cd4a1325c4ecf", "score": "0.46102953", "text": "public function run()\n {\n\n \t\n \t$data = [\n \t[\n \t'name' => 'Directory 1',\n \t]\n\n ];\n \tforeach ($data as $key => $value) {\n \t\t$array = [];\n \t\t$exist = Directory::where('name',$value['name'])->count();\n \t\tif(!$exist){\n \t\t\t$array =\n \t\t\t[\n \t\t\t'name' => $value['name'],\n \t\t\t];\n \t\t\tDirectory::create($array);\n \t\t}\n \t\t\n \t}\n }", "title": "" }, { "docid": "e3b851151244785f010d226c6df2a94d", "score": "0.4608193", "text": "function act_poll_cron()\r\n {\r\n $time = doubleval($_GET['time']);\r\n\r\n if ($time != Options::get('cron_running')) {\r\n return;\r\n }\r\n\r\n // allow script to run for 10 minutes\r\n set_time_limit(600);\r\n\r\n $db = DB::connect();\r\n\r\n $sth = $db->prepare(\"SELECT * FROM crontab WHERE next_run <= NOW()\");\r\n $sth->setFetchMode(PDO::FETCH_CLASS, 'CronJob', array());\r\n $sth->execute();\r\n\r\n $cronjobs = $sth->fetchAll();\r\n\r\n foreach ($cronjobs as $cronjob) {\r\n $cronjob->execute();\r\n }\r\n\r\n // set the next run time to the lowest next_run OR a max of one day.\r\n $next_cron = $db->query('SELECT TIMESTAMP(next_run) FROM crontab ORDER BY next_run ASC LIMIT 1')->fetchColumn();\r\n Options::set('next_cron', min(intval($next_cron), time() + 86400));\r\n Options::set('cron_running', false);\r\n }", "title": "" }, { "docid": "1921906891fcc4f6c70bd517a37a9543", "score": "0.45960584", "text": "public function updateStatusStart()\n {\n $this->resetStatuses();\n $this->pubDirectory->touch($this->getRelativeFilePath(self::IMPORT_STATUS_BUSY));\n }", "title": "" }, { "docid": "97f07010286a6fd10198fca3418319f4", "score": "0.4589901", "text": "protected function start_log_monitoring() {\n // Open the file for reading and seek to the end of the file\n if (is_null($this->log_handle)) {\n $this->log_handle = fopen($this->log_directory . $this->log_filename, \"r\");\n }\n fseek($this->log_handle, -1, SEEK_END);\n }", "title": "" }, { "docid": "8b909dcc86234387b961688df6f2e1c2", "score": "0.45849216", "text": "function source_handle_on_daily() {\n \n require_once(ANGIE_PATH.'/classes/xml/xml2array.php');\n \n $results = 'Repositories updated: ';\n \n $repositories = Repositories::findByUpdateType(REPOSITORY_UPDATE_DAILY);\n foreach ($repositories as $repository) {\n // don't update projects other than active ones\n $project = Projects::findById($repository->getProjectId());\n if ($project->getStatus() !== PROJECT_STATUS_ACTIVE) {\n continue;\n } // if\n \n $repository->loadEngine();\n $repository_engine = new RepositoryEngine($repository, true);\n \n $last_commit = $repository->getLastCommit();\n $revision_to = is_null($last_commit) ? 1 : $last_commit->getRevision();\n \n $logs = $repository_engine->getLogs($revision_to);\n \n if (!$repository_engine->has_errors) {\n $repository->update($logs['data']);\n $total_commits = $logs['total'];\n \n $results .= $repository->getName().' ('.$total_commits.' new commits); ';\n \n if ($total_commits > 0) {\n $repository->sendToSubscribers($total_commits, $repository_engine);\n $repository->createActivityLog($total_commits);\n } // if\n } // if\n \n } // foreach\n \n return is_foreachable($repositories) && count($repositories) > 0 ? $results : 'No repositories for daily update';\n }", "title": "" }, { "docid": "2d9ec41d1b258e33da651591226843a9", "score": "0.45806807", "text": "public function cron()\n\t{\n\t\t// Check and restart the minerd if it's dead\n\t\tif ($this->redis->get('minerd_autorecover'))\n\t\t{\n\t\t\t$this->util_model->checkMinerIsUp();\t\n\t\t}\n\t\t\n\t\t// Store the live stats to be used on time graphs\n\t\t$this->util_model->storeStats();\n\t\t\n\t\t// Call Mobileminer if enabled\n\t\t$this->util_model->callMobileminer();\n\t}", "title": "" }, { "docid": "f6a8426cd50eab9789c86b64a9b2457f", "score": "0.4575585", "text": "function swoole_timer_list() {}", "title": "" }, { "docid": "c6b4cb6d1521ea03fdf7d1db0f10affe", "score": "0.4575405", "text": "public function run()\n {\n $this->call('MonanUpdate');\n }", "title": "" }, { "docid": "9312595c3494773679d1f20b698feb6c", "score": "0.45527443", "text": "function handleFileTranfers()\n\t{\n\t\t// EFS Configuration : (External File Server)\n\t\t$cparams = ComponentHelper::getParams('com_flexicontent');\n\n\t\t// Get last execution time from cache\n\t\t$cache = Factory::getCache('plg_'.$this->_name.'_'.__FUNCTION__);\n\t\t$cache->setCaching(1); // Force cache ON\n\t\t$cache->setLifeTime(3600); // Set expire time (default is 1 hour)\n\t\t$last_check_time = $cache->get(array($this, '_getLastCheckTime'), array(__FUNCTION__) );\n\n\t\t// Execute every 15 minutes\n\t\t$elapsed_time = time() - $last_check_time;\n\t\t//Factory::getApplication()->enqueueMessage('plg_'.$this->_name.'::'.__FUNCTION__.'() elapsed_time: ' . $elapsed_time . '<br/>');\n\t\t\n\t\tif ($elapsed_time < 1*60) return;\n\t\t//Factory::getApplication()->enqueueMessage('EXECUTING: '.'plg_'.$this->_name.'::'.__FUNCTION__.'()<br/>');\n\n\t\t// Clear cache and call method again to restart the counter\n\t\t$cache->clean('plg_'.$this->_name.'_'.__FUNCTION__);\n\t\t$last_check_time = $cache->get(array($this, '_getLastCheckTime'), array(__FUNCTION__) );\n\n\n\t\t// Try to allow using longer execution time and more memory\n\t\t//$this->_setExecConfig();\n\n\t\t$shell_exec_enabled = is_callable('shell_exec') && false === stripos(ini_get('disable_functions'), 'shell_exec');\n\t\tif ($shell_exec_enabled)\n\t\t{\n\t\t\t//echo $output = shell_exec('php ' . JPATH_ROOT . '/components/com_flexicontent/tasks/estorage.php > /dev/null 2>/dev/null &');\n\t\t\t$output = shell_exec('php ' . JPATH_ROOT . '/components/com_flexicontent/tasks/estorage.php 2>&1');\n\n\t\t\tif ($output)\n\t\t\t{\n\t\t\t\t$log_filename = 'cron_estorage.php';\n\t\t\t\tjimport('joomla.log.log');\n\t\t\t\tLog::addLogger(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'text_file' => $log_filename, // Sets the target log file\n\t\t\t\t\t\t'text_entry_format' => '{DATE} {TIME} {PRIORITY} {MESSAGE}' // Sets the format of each line\n\t\t\t\t\t),\n\t\t\t\t\tLog::ALL, // Sets messages of all log levels to be sent to the file\n\t\t\t\t\tarray('com_flexicontent.estorage') // category of logged messages\n\t\t\t\t);\n\t\t\t\tLog::add($output, Log::INFO, 'com_flexicontent.estorage');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "62ded494a75f62fdea949f09022ec8b2", "score": "0.45472515", "text": "function sync_database($dir_id)\n\t{\n\t\treturn;\n\t}", "title": "" }, { "docid": "ec66f7c97d4dd06408054923ee476906", "score": "0.45466042", "text": "function dir_delete_old_files($dir, $ext = array(), $sec)\n{\n\t// older than x seconds\n\t$files = dir_read($dir, null, $ext);\n\t$time = time() - $sec;\n\tforeach ($files as $file) {\n\t\tif (file_time($file) < $time) {\n\t\t\tunlink($file);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d1e0a8d07d55ff2da4f7e9d67c9dc50b", "score": "0.4536789", "text": "public function setIntervalTime($interval);", "title": "" }, { "docid": "c2cfd4f1b1772fbecc1f53f59134b1b8", "score": "0.45301506", "text": "public function run()\n {\n for($i = 1 ; $i < 131; $i++){\n \\File::makeDirectory(public_path().\"/storage/files/1/CaseRecord/\".$i);\n }\n }", "title": "" }, { "docid": "c32ddda2b0978c330940ad24ae9cafcb", "score": "0.45294005", "text": "function long_poll()\n\t{\n\t\tset_time_limit(0);\n\t\t// where does the data come from ? In real world this would be a SQL query or something\n\t\t$data_source_file = FCPATH.'var/tmp/data.txt';\n\t\t// main loop\n\t\twhile (true) {\n\t\t\t// Get request from client\n\t\t\t$this->params = $this->input->get();\n\t\t\t// if ajax request has send a timestamp, then $last_ajax_call = timestamp, else $last_ajax_call = null\n\t\t\t$last_ajax_call = isset($this->params->timestamp) ? (int)$this->params->timestamp : null;\n\t\t\t// PHP caches file data, like requesting the size of a file, by default. clearstatcache() clears that cache\n\t\t\tclearstatcache();\n\t\t\t// get timestamp of when file has been changed the last time\n\t\t\t$last_change_in_data_file = filemtime($data_source_file);\n\t\t\t// if no timestamp delivered via ajax or data.txt has been changed SINCE last ajax timestamp\n\t\t\tif ($last_ajax_call == null || $last_change_in_data_file > $last_ajax_call) {\n\t\t\t\t// get content of data.txt\n\t\t\t\t$data = file_get_contents($data_source_file);\n\t\t\t\t// put data.txt's content and timestamp of last data.txt change into array\n\t\t\t\t$result = array(\n\t\t\t\t\t'data_from_file' => $data,\n\t\t\t\t\t'timestamp' => $last_change_in_data_file\n\t\t\t\t);\n\t\t\t\theader('Content-Type: application/json');\n\t\t\t\theader('Cache-Control: no-cache'); // recommended to prevent caching of event data.\n\t\t\t\t// encode to JSON, render the result (for AJAX)\n\t\t\t\t$json = json_encode($result);\n\t\t\t\techo $json;\n\t\t\t\t// leave this loop step\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t// wait for 1 sec (not very sexy as this blocks the PHP/Apache process, but that's how it goes)\n\t\t\t\tsleep( 5 );\n\t\t\t\tcontinue;\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}", "title": "" }, { "docid": "88484c2f2747171e462d30d88ff4c938", "score": "0.45228526", "text": "public function everyFiveMinutes(): self;", "title": "" }, { "docid": "11e129db4170ea032a4635a9aba2de1b", "score": "0.45213714", "text": "public function listenForUpdates(): void\n {\n $socketPath = config('latlog.socket_path');\n\n $this->_clearOldSocket( $socketPath );\n\n $server = new UnixServer(\n $socketPath,\n app('loop')\n );\n Debug::info(\"Listening On: unix://\" . $socketPath . \"\\n\");\n\n $server->on('connection', function( ConnectionInterface $c ){\n $c->on('data', function ( $targetId ){\n Debug::info(\"Received New Target Update with ID: {$targetId}\");\n event( new TargetUpdateEvent( intval($targetId) ) );\n });\n });\n }", "title": "" }, { "docid": "6d926e08577e3a3d14123049fae30759", "score": "0.45205492", "text": "public function run()\n {\n\n // raise the counter by 1 till 5000\n for ($i = 0; $i < 5000; $i++) {\n \\Mutex::lock($this->mutex);\n $this->object->counter++;\n \\Mutex::unlock($this->mutex);\n }\n }", "title": "" }, { "docid": "4485485711ebe26e6795f520bbb84952", "score": "0.45181108", "text": "public function triggerRecaching($node) {\n\t\tif (!file_exists($this->settings['spiderIndexingPathAndFilename']) && $node instanceof NodeInterface) {\n\t\t\tfile_put_contents($this->settings['spiderIndexingPathAndFilename'], time());\n\t\t}\n\t}", "title": "" }, { "docid": "f0f1ff9f7d091f62d042245a7fb8477d", "score": "0.45138004", "text": "function cron() {\n\t\t//look at the clock.\n\t\t$now = strtotime('now');\n\t\t\n\t\t//check for the hack\n\t\tif(Configure::read('debug') != 0 && isset($this->params['named']['time_machine'])){\n\t\t\t$now = strtotime($this->params['named']['time_machine']);\n\t\t}\n\t\t\n\t\t$this->Project->upgradeProjects($now);\n\t}", "title": "" }, { "docid": "d5056f9e86b4345080906a870a2fcae1", "score": "0.45101228", "text": "public function deleteExpiredLogs()\n {\n $client = $this->createLocalStorageDriver();\n\n $allFiles = $client->files();\n\n foreach ($allFiles as $file) {\n $fileDate = new DateTime(str_replace('.json', '', $file));\n\n $currentDate = new DateTime(date('d-m-Y'));\n\n $interval = $fileDate->diff($currentDate);\n\n if ($interval->days > $this->expireDays) {\n $client->delete($file);\n }\n }\n }", "title": "" }, { "docid": "49106cdd03c527a100d9a43d7390907a", "score": "0.45074904", "text": "function cleanUp($id, $dir)\r\n {\r\n $d = dir($dir);\r\n $id_length = strlen($id);\r\n\r\n while (false !== ($entry = $d->read())) {\r\n if (is_file($dir.'/'.$entry) && substr($entry,0,1) == '.' && !ereg($entry, $this->image))\r\n {\r\n //echo filemtime($this->directory.'/'.$entry).\"<br>\"; \r\n //echo time();\r\n\r\n if (filemtime($dir.'/'.$entry) + $this->lapse_time < time())\r\n unlink($dir.'/'.$entry);\r\n\r\n if (substr($entry, 1, $id_length) == $id)\r\n {\r\n if (is_file($dir.'/'.$entry))\r\n unlink($dir.'/'.$entry);\r\n }\r\n }\r\n }\r\n $d->close();\r\n }", "title": "" }, { "docid": "ef1d179de0bd98fb950d90237eb21c93", "score": "0.44915432", "text": "public function run()\n {\n $num_entries = 60;\n\n for ($i = 0; $i < $num_entries; $i++) {\n $date = now()->subDays($i);\n\n DiaryEntry::factory()->create([\n 'date' => $date,\n ]);\n }\n }", "title": "" }, { "docid": "0dca0a82877dddf1fc4caf4579eb76fa", "score": "0.44851232", "text": "function runPeriodicTasks($task_store)\n\t{\n\t\t$tasks = $this->modconfig->{$task_store};\n\t\t\n\t\t$tasks = explode(';', $tasks);\t\n\t\t$t = new GW_Timer;\n\t\t\t\n\t\t$mod = $this->module_path[0];\n\t\t\n\t\tforeach($tasks as $task)\n\t\t\tif($task){\n\t\t\t\tif(substr($task, 0,1)=='#'){\n\t\t\t\t\t//parallel\n\t\t\t\t\t$task = substr($task, 1);\n\t\t\t\t\t$url=Navigator::backgroundRequest(\"admin/lt/$mod/$task\", [\"cron\"=>1]);\n\t\t\t\t}else{\t\t\n\t\t\t\t\t//consistently\n\t\t\t\t\t$url = Navigator::buildURI(\"admin/lt/$mod/$task\", [\"cron\"=>1]);\n\t\t\t\t\t$resp = Navigator::sysRequest($url);\n\t\t\t\t\t\n\t\t\t\t\tif($resp = json_encode($resp))\t\n\t\t\t\t\t\t$this->setMessage($url.': '.$resp);\t\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t\n\t\t$this->setMessage(\"Took \".$t->stop().' secs');\t\t\t\n\t}", "title": "" }, { "docid": "1957ba1ff8a8fbf4ec916b5086546309", "score": "0.4483706", "text": "function get_changes_directory($dictionary)\n{\n return get_data_directory($dictionary) . '/changes';\n}", "title": "" }, { "docid": "2b009b54dc918bb7f8ce2a98ac8d2943", "score": "0.44767898", "text": "public function cron_daily() {\n\t\t$zong = new Zong_Core;\n\t\t$zong->cacheZong();\n\t\t$this->template->content = '';\n\t}", "title": "" }, { "docid": "8cbbaf18f42499c98508c718ac72df8a", "score": "0.44762278", "text": "public function run()\n {\n $data = [\n \t\t\t'Company-Updated',\n \t\t\t'Project-Updated',\n 'User-Updated'\n \t\t];\n\n foreach($data as $key => $value) {\n\t\t\tLog::create(['name'=>$value]);\n\t\t}\t\t\n }", "title": "" }, { "docid": "06dcef1d7ece2fe6b62ea7f2c79c1c24", "score": "0.4466357", "text": "private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ba7d95ee2a33ef11c4b1dd93eb8bcca8", "score": "0.4464649", "text": "public function run() {\n \n // Require the base class\n $this->load->file(APPPATH . '/base/main.php');\n\n // List all user's apps\n foreach (glob(APPPATH . 'base/user/apps/collection/*', GLOB_ONLYDIR) as $directory) {\n\n // Get the directory's name\n $app = trim(basename($directory) . PHP_EOL);\n\n // Verify if the app is enabled\n if (!get_option('app_' . $app . '_enable')) {\n continue;\n }\n\n // Create an array\n $array = array(\n 'MidrubBase',\n 'User',\n 'Apps',\n 'Collection',\n ucfirst($app),\n 'Main'\n );\n\n // Implode the array above\n $cl = implode('\\\\', $array);\n\n // Run cron job commands\n (new $cl())->cron_jobs();\n }\n \n // Prepare allowed files\n $allowed_files = array(\n 'cron.php',\n 'index.php',\n 'ipn-listener.php',\n 'update.php'\n );\n \n // List all files\n foreach (glob(FCPATH . '/*.php') as $filename) {\n \n $name = str_replace(FCPATH . '/', '', $filename);\n\n if ( !in_array($name, $allowed_files) ) {\n \n $msg = 'Was detected and deleted the file ' . $filename . '. Please contact support if you don\\'t know this file.';\n \n $this->send_warning_message($msg);\n unlink($filename);\n \n } else {\n \n if ( $this->check_for_malware($filename) ) {\n \n $msg = 'Was detected malware in the file ' . $filename . ' and was deleted.';\n\n $this->send_warning_message($msg);\n unlink($filename);\n \n }\n \n }\n \n }\n \n $extensions = array(\n '.php3',\n '.php4',\n '.php5',\n '.php7',\n '.phtml',\n '.pht'\n );\n\n foreach ( $extensions as $ext ) {\n $this->delete_files_by_extension(FCPATH, $ext); \n }\n \n $extensions[] = '.php';\n \n foreach ( $extensions as $ext ) {\n $this->delete_files_by_extension(FCPATH . 'assets', $ext); \n }\n \n $this->check_for_non_midrub_files(FCPATH . 'assets');\n \n }", "title": "" }, { "docid": "e5c2592d312edf83317ecab6564f24c0", "score": "0.4443272", "text": "public function run()\n {\n $this->logRun();\n if (in_array('+', $this->config['mysqlbase'])) {\n $this->config['mysqlbase'] = $this->mysqlAllBases($this->mysql['host'], $this->mysql['user'], $this->mysql['pass']);\n }\n $this->mysqlDump($this->mysql['host'], $this->mysql['user'], $this->mysql['pass'], $this->config['filename'], $this->config['local'], $this->config['mysqlbase']);\n $this->deleteOld($this->config['true_filename'], $this->config['local'], $this->config['days']);\n $this->rsync($this->config['local'], $this->config['dstfolder']);\n $this->logEnd();\n }", "title": "" }, { "docid": "8d14067980723c9dbe9edeeba44957d2", "score": "0.4442453", "text": "function clean_backup_directory()\n{\n include(\"cdash/config.php\");\n require_once(\"cdash/pdo.php\");\n foreach (glob($CDASH_BACKUP_DIRECTORY.\"/*.xml\") as $filename)\n {\n if(file_exists($filename) && time()-filemtime($filename) > $CDASH_BACKUP_TIMEFRAME*3600)\n {\n cdash_unlink($filename);\n }\n }\n}", "title": "" }, { "docid": "ecda5c80669a689eafebfddf09e3fcf1", "score": "0.44414112", "text": "function fileChanged() {\n\t\t$storedmtime = $this->get('mtime');\n\t\treturn (empty($storedmtime) || $this->filemtime > $storedmtime);\n\t}", "title": "" }, { "docid": "7a6d3052426384512b09194fe8b02389", "score": "0.44397512", "text": "protected function getRunFrequency()\n\t{\n\t\treturn 60;\n\t}", "title": "" }, { "docid": "a49d82c64133cba438065bc060d04259", "score": "0.4437567", "text": "function execute_filecheck( $auto = true ) {\n\t\t\n\t\t\tglobal $wpdb, $bwpsoptions, $logid;\n\n\t\t\t//set base memory\n\t\t\t$this->startMem = @memory_get_usage();\n\t\t\t$this->maxMemory = $this->startMem;\n\t\t\t\n\t\t\t//get old file list\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\n\t\t\t\tswitch_to_blog( 1 );\n\t\t\t\t\t\n\t\t\t\t$logItems = maybe_unserialize( get_option( 'bwps_file_log' ) );\n\t\t\t\t\t\n\t\t\t\trestore_current_blog();\n\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t$logItems = maybe_unserialize( get_option( 'bwps_file_log' ) );\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//if there are no old files old file list is an empty array\n\t\t\tif ( $logItems === false ) {\n\t\t\t\n\t\t\t\t$logItems = array();\n\t\t\t\n\t\t\t} \n\t\t\t\n\t\t\t$currItems = $this->scanfiles(); //scan current files\n\t\t\t\n\t\t\t$added = @array_diff_assoc( $currItems, $logItems ); //files added\n\t\t\t$removed = @array_diff_assoc( $logItems, $currItems ); //files deleted\n\t\t\t$compcurrent = @array_diff_key( $currItems, $added ); //remove all added files from current filelist\n\t\t\t$complog = @array_diff_key( $logItems, $removed ); //remove all deleted files from old file list\n\t\t\t$changed = array(); //array of changed files\n\t\t\t\n\t\t\t//compare file hashes and mod dates\n\t\t\tforeach ( $compcurrent as $currfile => $currattr) {\n\t\t\t\n\t\t\t\tif ( array_key_exists( $currfile, $complog ) ) {\n\t\t\t\t\n\t\t\t\t\t//if attributes differ added to changed files array\n\t\t\t\t\tif ( strcmp( $currattr['mod_date'], $complog[$currfile]['mod_date'] ) != 0 || strcmp( $currattr['hash'], $complog[$currfile]['hash'] ) != 0 ) {\n\t\t\t\t\t\t$changed[$currfile]['hash'] = $currattr['hash'];\n\t\t\t\t\t\t$changed[$currfile]['mod_date'] = $currattr['mod_date'];\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//get count of changes\n\t\t\t$addcount = sizeof( $added );\n\t\t\t$removecount = sizeof( $removed );\n\t\t\t$changecount = sizeof( $changed );\n\t\t\t\n\t\t\t//create single array of all changes\n\t\t\t$combined = array(\n\t\t\t\t'added' => $added,\n\t\t\t\t'removed' => $removed,\n\t\t\t\t'changed' => $changed\n\t\t\t);\n\t\t\t\n\t\t\t//save current files to log\n\t\t\t//Get the options\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\n\t\t\t\tswitch_to_blog( 1 );\n\t\t\t\t\t\n\t\t\t\tupdate_option( 'bwps_file_log', serialize( $currItems ) );\n\t\t\t\t\t\n\t\t\t\trestore_current_blog();\n\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\tupdate_option( 'bwps_file_log', serialize( $currItems ) );\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//log check to database\n\t\t\t$wpdb->insert(\n\t\t\t\t$wpdb->base_prefix . 'bwps_log',\n\t\t\t\tarray(\n\t\t\t\t\t'type' => '3',\n\t\t\t\t\t'timestamp' => current_time( 'timestamp' ),\n\t\t\t\t\t'host' => '',\n\t\t\t\t\t'user' => '',\n\t\t\t\t\t'url' => '',\n\t\t\t\t\t'referrer' => '',\n\t\t\t\t\t'data' => serialize( $combined )\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$logid = $wpdb->insert_id;\n\t\t\t\n\t\t\t//if not the first check and files have changed warn about changes\n\t\t\tif ( $bwpsoptions['id_filechecktime'] != '' ) {\n\t\t\t\n\t\t\t\tif ( $addcount != 0 || $removecount != 0 || $changecount != 0 ) {\n\t\t\t\n\t\t\t\t\t//Update the right options\n\t\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\n\t\t\t\t\t\tswitch_to_blog( 1 );\n\t\t\t\t\t\n\t\t\t\t\t\tupdate_option( 'bwps_intrusion_warning', 1 );\n\t\t\t\t\t\n\t\t\t\t\t\trestore_current_blog();\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t\tupdate_option( 'bwps_intrusion_warning', 1 );\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tif ( $bwpsoptions['id_fileemailnotify'] == 1 ) {\n\t\t\t\t\t\t$this->fileemail();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t//get new max memory\n\t\t\t\t$newMax = @memory_get_peak_usage();\n\t\t\t\tif ( $newMax > $this->maxMemory ) {\n\t\t\t\t\t$this->maxMemory = $newMax;\n\t\t\t\t}\n\n\t\t\t\t//log memory usage\n\t\t\t\t$wpdb->update(\n\t\t\t\t\t$wpdb->base_prefix . 'bwps_log',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'mem_used' => ( $this->maxMemory - $this->startMem )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => $logid\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t\t//set latest check time\n\t\t\t$bwpsoptions['id_filechecktime'] = current_time( 'timestamp' );\n\t\t\t\t\n\t\t\t//Update the right options\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\t\n\t\t\t\tswitch_to_blog( 1 );\n\t\t\t\t\t\t\n\t\t\t\tupdate_option( $this->primarysettings, $bwpsoptions );\n\t\t\t\t\t\n\t\t\t\trestore_current_blog();\n\t\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\tupdate_option( $this->primarysettings, $bwpsoptions );\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}", "title": "" }, { "docid": "da9b6f4d7a7c21104a18d79af29d9af1", "score": "0.44304305", "text": "function check_innactivity()\n\t{\n\t\tset_time_limit(0);\n\t\t\n\t\t// debugf('try to running...');\n\t\tif (file_get_contents($this->proc_sse) == 1){\n\t\t\t// debugf('already_running !');\n\t\t\tfile_put_contents($this->proc_sse, 1);\t// For update file last update\n\t\t\texit();\n\t\t}\n\t\t\n\t\t// debugf('running...');\n\t\tfile_put_contents($this->proc_sse, 1);\n\t\t\n\t\t// debugf('check_innactivity running !');\n\t\twhile($online_users = $this->cache->get('online_users')){\n\n\t\t\tfile_put_contents($this->proc_sse, 1);\t// For update file last update\n\t\t\t\n\t\t\tforeach($online_users as $k => $v){\n\t\t\t\tif ($v['last_activity'] < (time()-$this->non_active_time)){\n\t\t\t\t\tif ($k != ''){\n\t\t\t\t\t\t// debugf('unset user_id: '.$k);\n\t\t\t\t\t\tunset($online_users[$k]);\n\t\t\t\t\t\t// Update data on cache\n\t\t\t\t\t\t$this->cache->save('online_users', $online_users, $this->storage_time);\n\t\t\t\t\t\t// Update data on database\n\t\t\t\t\t\t$this->db->update('a_user', ['is_online' => '0'], ['id' => $k]);\n\t\t\t\t\t\t// if (! $this->db->update('a_user', ['is_online' => '0'], ['id' => $k]))\n\t\t\t\t\t\t\t// debugf('update table [a_user] where [id='.$k.'] => failed => '.$this->db->error()['message']);\n\t\t\t\t\t\t// else\n\t\t\t\t\t\t\t// debugf('update table [a_user] where [id='.$k.'] => success !');\n\t\t\t\t\t\t$this->cache->save('table', 'a_user', $this->flash_time);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsleep( 5 );\n\t\t\tcontinue;\n\t\t}\n\t\t\n\t\tfile_put_contents($this->proc_sse, 0);\n\t}", "title": "" }, { "docid": "a2ea6c4963f4a991572c8040280781fd", "score": "0.4426669", "text": "function schedule_backup_course_delete_old_files($preferences,$starttime=0) {\n\n global $CFG;\n\n $status = true;\n\n //Calculate the directory to check\n $dirtocheck = \"\";\n //if $preferences->backup_destination isn't empty, then check that directory\n if (!empty($preferences->backup_destination)) {\n $dirtocheck = $preferences->backup_destination;\n //else calculate standard backup directory location\n } else {\n $dirtocheck = $CFG->dataroot.\"/\".$preferences->backup_course.\"/backupdata\";\n }\n schedule_backup_log($starttime,$preferences->backup_course,\" checking $dirtocheck\");\n if ($CFG->debug > 7) {\n mtrace(\" Keeping backup files in $dirtocheck\");\n }\n\n //Get all the files in $dirtocheck\n $files = get_directory_list($dirtocheck,\"\",false);\n //Get all matching files ($preferences->keep_name) from $files\n $matchingfiles = array();\n foreach ($files as $file) {\n if (substr($file, 0, strlen($preferences->keep_name)) == $preferences->keep_name) {\n $modifieddate = filemtime($dirtocheck.\"/\".$file);\n $matchingfiles[$modifieddate] = $file;\n }\n }\n //Sort by key (modified date) to get the oldest first (instead of doing that by name\n //because it could give us problems in some languages with different format names).\n ksort($matchingfiles);\n\n //Count matching files\n $countmatching = count($matchingfiles);\n schedule_backup_log($starttime,$preferences->backup_course,\" found $countmatching backup files\");\n mtrace(\" found $countmatching backup files\");\n if ($preferences->backup_keep < $countmatching) {\n schedule_backup_log($starttime,$preferences->backup_course,\" keep limit ($preferences->backup_keep) reached. Deleting old files\");\n mtrace(\" keep limit ($preferences->backup_keep) reached. Deleting old files\");\n $filestodelete = $countmatching - $preferences->backup_keep;\n $filesdeleted = 0;\n foreach ($matchingfiles as $matchfile) {\n if ($filesdeleted < $filestodelete) {\n schedule_backup_log($starttime,$preferences->backup_course,\" $matchfile deleted\");\n mtrace(\" $matchfile deleted\");\n $filetodelete = $dirtocheck.\"/\".$matchfile;\n unlink($filetodelete);\n $filesdeleted++;\n }\n }\n }\n return $status;\n}", "title": "" }, { "docid": "39eb95d856257cc82ad28d4eb74e2df9", "score": "0.44179502", "text": "static public function scan()\n {\n $options = get_option( self::$settings_option_field ); // Get settings\n\n // Set time of this scan.\n $options['last_scan_time'] = time();\n update_option( self::$settings_option_field, $options );\n\n // Get old data from DB/file\n $oldScanData = self::getPutScanData();\n\n // Get new data by scanning\n $newScanData = (array) self::scan_dirs();\n\n // Lets make sure that the new data is always sorted\n ksort( $newScanData );\n\n // Save new scan data to DB/file\n self::getPutScanData( \"put\", $newScanData );\n\n // Only do checks for file ammends/additions/removals if we have some old data to compare against\n if( ! is_array( $oldScanData ) )\n return;\n\n // See what files have been added and removed since last scan\n $files_added = array_diff_assoc( $newScanData, $oldScanData );\n $files_removed = array_diff_assoc( $oldScanData, $newScanData );\n\n // Build compare arrays by removing `added` and `removed` files\n $comp_newdata = array_diff_key( $newScanData, $files_added );\n $comp_olddata = array_diff_key( $oldScanData, $files_removed );\n\n // Do compare\n $changed_files = self::array_compare( $comp_newdata, $comp_olddata );\n\n // Get counts of files added/removed/changed\n $count_files_changed = count( $changed_files[0] );\n $count_files_added = count( $files_added );\n $count_files_removed = count( $files_removed );\n\n // Check we have some changes since last scan by checking above counts\n if( ! max( $count_files_changed, $count_files_added, $count_files_removed ) )\n return;\n\n // Generate HTML alert\n $alertMessage = self::format_alert( $files_added, $files_removed, $changed_files, $oldScanData, $newScanData );\n\n // Save HTML alert into DB/file\n self::getPutAlertContent( \"put\", $alertMessage );\n\n // Update options to say there is an admin alert to be shown\n $options[\"is_admin_alert\"] = 1;\n update_option( self::$settings_option_field, $options );\n\n // Are we to notify by email? If so lets send email alert\n if( 1 == $options['notify_by_email'] )\n do_action( \"sc_wpfmp_send_notify_email\", $alertMessage );\n\n }", "title": "" }, { "docid": "84bf3cf66499f0f3f48f57eef6d000b8", "score": "0.4417949", "text": "function run()\r\n\t\t{\r\n\t\t\t$lastRunTime =\r\n\t\t\t$this->throwEvent(\"MINUTE\");\r\n\t\t}", "title": "" }, { "docid": "f68b2f3b92b6faaca3305f7f4a1f0c51", "score": "0.44163656", "text": "function cleanup($basedir, $age) {\n if (($handle = opendir($basedir))) {\n while (($file = readdir($handle)) !== false) {\n $entry = \"$basedir/$file\";\n if ($file != '.' && $file != '..' && (time() - filemtime($entry) > $age)) {\n if (is_dir($entry)) {\n removeDir($entry);\n } else {\n unlink($entry);\n }\n }\n }\n }\n}", "title": "" }, { "docid": "da5be5241f7e0319d99ded2d020bee7f", "score": "0.44143897", "text": "public function cleanup() {\n $this->basedir = $this->directoryList->getRoot();\n $this->checkCronFolderExistence();\n $this->initialize();\n /* gets a list of all schedule ids in the cron table */\n $scheduleids = $this->resource->cleanSchedule($this->history);\n /* gets a list of all cron schedule output files */\n $fileids = $this->getScheduleOutputIds();\n /* get a list of all schedule output files that are no longer in the cron schedule file */\n $diff = array_diff($fileids,$scheduleids);\n foreach ($diff as $id) {\n /* remove the old cron schedule output files */\n $this->unsetPid('schedule.'.$id);\n }\n }", "title": "" }, { "docid": "24fedb9204ec5f9c37ff0c8b589d7607", "score": "0.44050834", "text": "public function run()\n {\n factory(\\App\\Models\\MaintainLog::class, 10)->make()->each(function (\\App\\Models\\MaintainLog $maintainLog) {\n $device = \\App\\Models\\Device::inRandomOrder()->first();\n $maintainLog = \\App\\Models\\MaintainLog::create(array_merge($maintainLog->toArray(), [\n 'device_id' => $device->id\n ]));\n\n $device->check_items->each(function (\\App\\Models\\DeviceCheckItem $item) use ($maintainLog) {\n $maintainLog->check_item_logs()->attach($item->id, [\n 'result' => rand(1, 0)\n ]);\n });\n });\n }", "title": "" }, { "docid": "8fb3cca7e07f1514f54ffb1442320563", "score": "0.4401479", "text": "public function handle(Watcher $watcher, TurmaRepository $turmaRepository, AvaliacaoRepository $avaliacaoRepository, AvaliacaoFichaRepository $avaliacaoFichaRepository)\n {\n $dir = $this->argument('dir');\n\n if(!File::isDirectory($dir))\n {\n $this->error('Informe um diretório válido!');\n return;\n }\n\n /*\n * Informando diretorio a ser assitido\n */\n $listener = $watcher->watch($dir);\n\n /*\n * Evento a ser disparado quando um arquivo for criado\n */\n $listener->onCreate(function(FileResource $resource, $path) use ($turmaRepository, $avaliacaoRepository, $avaliacaoFichaRepository)\n {\n try{\n /*\n * Verificando se é um arquivo de imagem .tif\n */\n if($resource->getSplFileInfo()->getExtension() != 'tif')\n return;\n\n $this->info(\"O arquivo '$path' foi criado\");\n\n /*\n * Criando o Imagick\n */\n $images = new Imagick($path);\n\n /*\n * Descobrindo código da turma pelo nome do arquivo\n */\n $filename = $resource->getSplFileInfo()->getFilename();\n $codigo = explode('_', $filename)[0];\n\n $this->info(\"Pesquisando turma com o código: $codigo\");\n\n $turma = $turmaRepository->getByCodigo($codigo);\n\n /*\n * Se turma não existe, tenta sincronizar com o Sistema de Planejamento/SIV\n */\n if(is_null($turma))\n {\n $this->info(\"Turma nao encontrada.. tentando encontrar no Sistema de Planejamento/SIV: $codigo\");\n\n $turma = (new SyncTurma($codigo))->getTurmaModel();\n }\n\n /*\n * Verifica se já existe avaliação para a turma\n */\n if(!is_null($turma->avaliacao))\n throw new Exception(\"Avaliacoes da turma $codigo ja foram enviadas\");\n\n /*\n * Criando uma avaliação para a turma e um diretório para armazenar as fichas\n */\n $now = Carbon::now();\n\n $avaliacao = $avaliacaoRepository->save(['turma_id' => $turma->id]);\n $imageDirPath = $now->format('Y-m') . DIRECTORY_SEPARATOR . $codigo . DIRECTORY_SEPARATOR;\n Storage::disk('digitalizacoes')->makeDirectory($imageDirPath);\n\n $this->info(\"Avaliaçao [\".$avaliacao->id.\"] foi criada para turma.. Adicionando fichas..\");\n\n /*\n * Lendo o arquivo, salvando as fichas e criando os jobs\n */\n $storagePath = Storage::disk('digitalizacoes')->getDriver()->getAdapter()->getPathPrefix();\n\n $count = 0;\n\n foreach($images as $i => $image)\n {\n $filename = $imageDirPath . $now->format('dHis').'-'.$i.'.jpg';\n\n $image->writeImage($storagePath . $filename);\n\n $ficha = $avaliacaoFichaRepository->save([\n 'avaliacao_id' => $avaliacao->id,\n 'image_path' => $filename\n ]);\n\n Queue::push(new Scan($ficha));\n\n $this->info(\"Ficha adicionada [\".$ficha->id.\"] !\");\n\n $count++;\n }\n\n /*\n * Atualizando a quantidade de fichas encontradas\n */\n $avaliacaoRepository->save([\n 'id' => $avaliacao->id,\n 'quantidade' => $avaliacao->quantidade + $count\n ]);\n\n }catch (Exception $e){\n $this->info($e->getMessage());\n }\n });\n\n /*\n * Iniciando o watcher (default: a cada 1 segundo)\n */\n $watcher->start();\n }", "title": "" }, { "docid": "b3bdebd788e0be903b05b8131d354a2e", "score": "0.43950623", "text": "public function listen ()\n\t{\n\n\t\t// Do some config checks\n\t\tforeach ($this->config['input'] as $index => $input)\n\t\t{\n\t\t\tif ( ! isset($input['filters']))\n\t\t\t{\n\t\t\t\t$input['filters'] = array();\n\t\t\t}\n\t\t\tif (substr($input['source'], -5) === '.json')\n\t\t\t{\n\t\t\t\tif ( ! in_array('json', $input['filters']))\n\t\t\t\t{\n\t\t\t\t\t$input['filters'][] = 'json';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->config['input'][$index] = $input;\n\t\t}\n\n\t\t// Keep listening forever until we say to stop\n\t\t$rps = 10;\n\t\twhile (true)\n\t\t{\n\t\t\t// Safe guard against losing file handlers\n\t\t\tif ($count % ($rps * 60) === 0)\n\t\t\t{\n\t\t\t\t$this->sync_file_handles();\n\t\t\t}\n\t\t\t$count++;\n\n\t\t\t// Loop over each input to build listenders\n\t\t\tforeach ($this->config['input'] as $input)\n\t\t\t{\n\n\t\t\t\t$filename = $input['source'];\n\t\t\t\t$filehash = md5($filename);\n\t\t\t\t$file = $this->input_handles[$filehash];\n\t\t\t\tif ( ! $file)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfseek($file['handle'], $file['position']);\n\t\t\t\twhile ($line = fgets($file['handle']))\n\t\t\t\t{\n\t\t\t\t\t$line = trim($line);\n\t\t\t\t\tif ($line)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->publish($input, $line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$position = ftell($file['handle']);\n\t\t\t\t$this->input_handles[$filehash]['position'] = $position;\n\t\t\t}\n\t\t\tusleep( 1000000 / $rps );\n\t\t}\n\t}", "title": "" }, { "docid": "4501fa6e4a3ec5011849d46da8ccf0a5", "score": "0.4389371", "text": "public function dir_rewinddir() {\n // We could be more efficient if the user calls opendir() followed by\n // rewinddir() but you just can't help some people.\n $this->next_marker = null;\n $this->current_file_list = null;\n return true;\n }", "title": "" }, { "docid": "27cde7eb98ac35f034ddbc40023fb515", "score": "0.43875268", "text": "public function poll();", "title": "" } ]
1ba7a08ff56ea3827a5732d09e78ea7a
include bootswatch themes description
[ { "docid": "ed80a121758817099053e72ec58a21a8", "score": "0.0", "text": "public function themes(ParameterBagInterface $params, UserInterface $user,\n EncoderInterface $encoder, DecoderInterface $decoder): Response\n {\n $themes = $decoder->decode(file_get_contents(implode(DIRECTORY_SEPARATOR, [\n $params->get('kernel.project_dir'), 'assets', 'styles', 'themes', 'themes.json'\n ])), 'json');\n\n // remove disabled themes\n $themes_new = [];\n foreach ($themes as $k=>$v) {\n //if ($this->getParameter('kernel.environment') !== 'prod'\n //and $v['name'] !== 'Default') {\n //continue;\n //}\n if ($v['enabled']) {\n $themes_new[] = $v;\n }\n }\n\n $params = [\n 'themes_json'=>$encoder->encode($themes_new, 'json'),\n 'user'=>$user,\n ];\n return $this->render('profile/themes.html.twig', $params);\n }", "title": "" } ]
[ { "docid": "938ce300c60cb587ad9ecfad02a9897c", "score": "0.6848769", "text": "public function themeInfo();", "title": "" }, { "docid": "07deec98a6d2305ded8274109c5ebeca", "score": "0.6717223", "text": "public function getPackageDescription()\n {\n return t(\"A package that installs a boilerplate theme for 5.7.x.\");\n }", "title": "" }, { "docid": "a940c1359f8537c99c9c40f2a9c32631", "score": "0.6710061", "text": "function yatri_customize_partial_blogdescription()\n{\n bloginfo('description');\n}", "title": "" }, { "docid": "9040517a81c5207eabba005b1d28ce65", "score": "0.6658136", "text": "function scr_theme_info() {\n echo \"\n <ul>\n <li><strong>Developed By:</strong> LowerMedia.Net</li>\n <li><strong>Website:</strong> <a href='http://lowermedia.net'>www.lowermedia.net</a></li>\n <li><strong>Contact:</strong> <a href='mailto:pete.lower@gmail.com'>pete.lower@gmail.com</a></li>\n </ul>\"\n ;\n }", "title": "" }, { "docid": "dae4145bc963dcc539df88d3c71b0f44", "score": "0.65993667", "text": "function chefplaza_site_description() {\n\t$show_desc = get_theme_mod( 'show_tagline', chefplaza_theme()->customizer->get_default( 'show_tagline' ) );\n\n\tif ( ! $show_desc ) {\n\t\treturn;\n\t}\n\n\t$description = get_bloginfo( 'description', 'display' );\n\n\tif ( ! ( $description || is_customize_preview() ) ) {\n\t\treturn;\n\t}\n\n\t$format = apply_filters( 'chefplaza_site_description_format', '<div class=\"site-description\">%s</div>' );\n\n\tprintf( $format, $description );\n}", "title": "" }, { "docid": "eec1ba9e2679ac479fd6825c6da1898e", "score": "0.6574948", "text": "function atlantis_customize_partial_blogdescription()\n{\n bloginfo('description');\n}", "title": "" }, { "docid": "d618b8a3518b404e836165ba8a9ab38e", "score": "0.65009695", "text": "function minimall_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "title": "" }, { "docid": "faa7a6334ddd2356130aa577230e124b", "score": "0.64390093", "text": "function symnel_theme_info() {\n return array(\n 'name' => 'symnel'\n , 'version' => '1.0.5'\n , 'description' => 'Clean and simple, Symnel properly constructed to maximize the potential sale of the seller and neatly display all important details of the seller items.'\n , 'author_name' => 'DopeThemes'\n , 'author_url' => 'http://www.dopethemes.com/'\n , 'locations' => array()\n );\n}", "title": "" }, { "docid": "df97977ad9920218df7f91f22ee9dc3a", "score": "0.64331937", "text": "function get_desc(){\r\n return '<p>' . __( 'Setup demo content with one click of mouse.', 'better-studio' ) . '</p>';\r\n }", "title": "" }, { "docid": "9b3a2351048afe13abe2d668154162a5", "score": "0.6401367", "text": "function drush_okcdesign_theme($name = NULL, $machine_name = NULL, $description = NULL) {\n if (empty($name)) {\n drush_set_error(dt(\"Please provide a name for the sub-theme.\\nUSAGE:\\tdrush ost [name] [machine_name !OPTIONAL] [description !OPTIONAL]\\n\"));\n return;\n }\n //Filter everything but letters, numbers, underscores, and hyphens\n $machine_name = !empty($machine_name) ? preg_replace('/[^a-z0-9_-]+/', '', strtolower($machine_name)) : preg_replace('/[^a-z0-9_-]+/', '', strtolower($name));\n // Eliminate hyphens\n $machine_name = str_replace('-', '_', $machine_name);\n\n // Find theme paths.\n $okcdesign_path = drush_locate_root() . '/' . drupal_get_path('theme', 'okcdesign');\n $subtheme_path = dirname($okcdesign_path) . '/' . $machine_name;\n\n\n // Copy JS files from base theme to sub-theme. We copy them now instead of\n // including them by default to keep the base theme small and also to avoid\n // having to update the Foundation JS in two places every time a new version\n // is released.\n drush_copy_dir(\"{$okcdesign_path}/STARTER/\", \"$subtheme_path\", FILE_EXISTS_MERGE);\n\n // create directory structure\n drush_op('mkdir', \"$subtheme_path/scss\");\n drush_op('mkdir', \"$subtheme_path/css\");\n drush_op('mkdir', \"$subtheme_path/templates\");\n drush_op('mkdir', \"$subtheme_path/js\");\n\n // add default files.\n drush_op('copy', \"$okcdesign_path/css/app.css\", \"$subtheme_path/css/app.css\");\n drush_op('copy', \"$okcdesign_path/scss/app.scss\", \"$subtheme_path/scss/app.scss\");\n drush_op('copy', \"$okcdesign_path/scss/_settings.scss\", \"$subtheme_path/scss/_settings.scss\");\n drush_op('copy', \"$okcdesign_path/logo.png\", \"$subtheme_path/logo.png\");\n\n // create subtheme info file\n $lines = array(\n \"name = $machine_name\",\n \"description = a subtheme of okcdesign\",\n \"base theme = okcdesign\",\n \"engine = phptemplate\",\n \"core = 7.x\",\n \"\",\n );\n $file = \"$subtheme_path/$machine_name.info\";\n drush_op('file_put_contents', $file, implode($lines, \"\\r\\n\"));\n\n // create gitignore file, do not track node_modules folder by default,\n // this just for local compilations with grunt.\n $lines = array(\n \"node_modules\"\n );\n $file = \"$subtheme_path/.gitignore\";\n drush_op('file_put_contents', $file, implode($lines, \"\\r\\n\"));\n\n // Notify user of the newly created theme.\n drush_print(dt(\"\\n!name sub-theme was created in !path. Enable and set default in theme administration \\n\",\n array(\n '!name' => $machine_name,\n '!path' => $subtheme_path,\n )\n ));\n\n\n}", "title": "" }, { "docid": "e936dde8474e95cb9455597ad7d416e7", "score": "0.6360457", "text": "function iusehelvetica_blogdescription() { ?>\n<div id=\"blog-description\" class=\"clearfix\"><?php bloginfo('description') ?></div>\n<?php }", "title": "" }, { "docid": "98cd003972bb5eee17dfea9b94cb9f51", "score": "0.63459593", "text": "function customize_partial_blogdescription() {\n\n\tbloginfo( 'description' );\n}", "title": "" }, { "docid": "b7b7865ee9cd088896ea81f8230b4ca7", "score": "0.63210475", "text": "function rovadex_site_description() {\n\n\t$show_desc = rovadex_get_mod( 'show_tagline' );\n\n\tif ( ! $show_desc ) {\n\t\treturn;\n\t}\n\n\t$description = get_bloginfo( 'description', 'display' );\n\n\tif ( ! ( $description || is_customize_preview() ) ) {\n\t\treturn;\n\t}\n\n\t$format = apply_filters( 'rovadex_site_description_format', '<div class=\"site-description\">%s</div>' );\n\n\tprintf( $format, $description );\n}", "title": "" }, { "docid": "a4fac1fea9a61433ec4af73859be9f3c", "score": "0.6272757", "text": "function firewood_filter_site_description() {\r\n\r\n\tif ( $description = get_bloginfo( 'description' ) )\r\n\r\n\t\t$description = '<h2 class=\"description site-description\"><span class=\"paintings\">Paintings </span><span class=\"by\">BY </span><span class=\"nicole\">Nicole</span><span class=\"martinez\">Martinez</span></h2>';\r\n\r\n\treturn $description;\r\n\r\n}", "title": "" }, { "docid": "e10d29129942b73e789cc215061c110a", "score": "0.6265746", "text": "public function component_info(){\r\n\t\t\r\n\t\t$data = array();\r\n\t\t$data['title'] = __('Theme','admin2020');\r\n\t\t$data['option_name'] = 'admin2020_admin_theme';\r\n\t\t$data['description'] = __('Creates the main theme for UiPress Disables default WordPress theme and applies UiPress.','admin2020');\r\n\t\treturn $data;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c95386e7dd1269fccf1359635c2ae4ae", "score": "0.625886", "text": "public function customize_partial_blog_description() {\n\t\tbloginfo( 'description' );\n\t}", "title": "" }, { "docid": "2ede3d11f3305d17eb74057724b8065f", "score": "0.6213008", "text": "public function sunsetCustomCss()\n {\n echo 'Customize Sunset Theme with your creative css';\n }", "title": "" }, { "docid": "d13bebb73238a977fecc149b2f7962e8", "score": "0.61902314", "text": "function apple_seo_site_description() {\n\t$inside = sprintf( '<a href=\"%s\" title=\"%s\">%s</a>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'description' ) ), get_bloginfo( 'description' ) );\n\n\t/** Determine which wrapping tags to use */\n\t$wrap = is_home() && 'description' == genesis_get_seo_option( 'home_h1_on' ) ? 'h1' : 'p';\n\n\t/* Build the description */\n\t$description = $inside ? sprintf( '<%s id=\"description\">%s</%s>', $wrap, $inside, $wrap ) : '';\n\n\t/** Echo (filtered) */\n\techo apply_filters( 'genesis_seo_description', $description, $inside, $wrap );\n}", "title": "" }, { "docid": "0501a239b5b6fdd5c86c2f23d7f4eba4", "score": "0.6141696", "text": "public function init() {\n\n\t\t// Add theme options\n\t\t$this->addOption('baseColour', 'colour', array(\n\t\t\t'label' => 'plugins.themes.healthSciences.option.colour.label',\n\t\t\t'description' => 'plugins.themes.healthSciences.option.colour.description',\n\t\t\t'default' => '#ead5ff',\n\t\t));\n\n\t\t// Update colour based on theme option\n\t\t$additionalLessVariables = [];\n\t\tif ($this->getOption('baseColour') !== '#ead5ff') {\n\t\t\t$additionalLessVariables[] = '@primary:' . $this->getOption('baseColour') . ';';\n\t\t\tif (!$this->isColourDark($this->getOption('baseColour'))) {\n\t\t\t\t$additionalLessVariables[] = '@primary-light: desaturate(lighten(@primary, 41%), 15%);';\n\t\t\t\t$additionalLessVariables[] = '@primary-text: darken(@primary, 15%);';\n\t\t\t}\n\t\t}\n\n\t\t// Load dependencies from CDN\n\t\tif (Config::getVar('general', 'enable_cdn')) {\n\t\t\t$this->addStyle(\n\t\t\t\t'fonts',\n\t\t\t\t'https://fonts.googleapis.com/css?family=Droid+Serif:200,200i,400,400i|Fira+Sans:300,300i,400,400i,700,700i',\n\t\t\t\tarray('baseUrl' => '')\n\t\t\t);\n\t\t\t$this->addStyle(\n\t\t\t\t'bootstrap',\n\t\t\t\t'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css',\n\t\t\t\tarray('baseUrl' => '')\n\t\t\t);\n\t\t\t$this->addStyle(\n\t\t\t\t'fontawesome',\n\t\t\t\t'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css',\n\t\t\t\tarray('baseUrl' => '')\n\t\t\t);\n\t\t\t$this->addScript(\n\t\t\t\t'jquery',\n\t\t\t\t'https://code.jquery.com/jquery-3.2.1.min.js',\n\t\t\t\tarray('baseUrl' => '')\n\t\t\t);\n\t\t\t$this->addScript(\n\t\t\t\t'popper',\n\t\t\t\t'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js',\n\t\t\t\tarray('baseUrl' => '')\n\t\t\t);\n\t\t\t$this->addScript(\n\t\t\t\t'bootstrap',\n\t\t\t\t'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js',\n\t\t\t\tarray('baseUrl' => '')\n\t\t\t);\n\n\t\t// Load local copies of dependencies if CDNs are not allowed\n\t\t} else {\n\t\t\t$this->addStyle('bootstrap', 'libs/bootstrap.min.css');\n\t\t\t$this->addScript('jquery', 'libs/jquery-3.2.1.slim.min.js');\n\t\t\t$this->addScript('popper', 'libs/popper.min.js');\n\t\t\t$this->addScript('bootstrap', 'libs/bootstrap.min.js');\n\t\t}\n\n\t\t// Load theme stylesheet and script\n\t\t$this->addStyle('stylesheet', 'styles/index.less');\n\t\t$this->modifyStyle('stylesheet', array('addLessVariables' => join($additionalLessVariables)));\n\t\t$this->addScript('main', 'js/main.js');\n\t\t\n\t\t// Add JQuery UI and tag-it libraries for registration page (reviewer's interests)\n\t\t$this->addScript(\"jquery-ui\", \"libs/jquery-ui.min.js\");\n\t\t$this->addScript(\"tag-it\", \"libs/tag-it.min.js\");\n\n\t\t// Add navigation menu areas for this theme\n\t\t$this->addMenuArea(array('primary', 'user'));\n\n\t\t// Get extra data for templates\n\t\tHookRegistry::register ('TemplateManager::display', array($this, 'loadTemplateData'));\n\n\t\t// Check if CSS embedded to the HTML galley\n\t\tHookRegistry::register('TemplateManager::display', array($this, 'hasEmbeddedCSS'));\n\t}", "title": "" }, { "docid": "b727f9fe9eb0b0bc5d6249c743062b68", "score": "0.61051255", "text": "public function getDescription() {\n\t\t\treturn __('plugins.themes.healthSciences.description');\n\t}", "title": "" }, { "docid": "2f9af57cbc34d81ae50a4972be4f6650", "score": "0.61040044", "text": "public function set_theme_description( $prepared_themes ) {\n\t\tforeach ( $prepared_themes as $theme ) {\n\t\t\t$slug = $theme['id']; // eg. twentyfifteen\n\t\t\tif ( Util::is_in_local_development( $slug, 'theme' ) ) {\n\t\t\t\t$message = wp_get_theme( $theme['id'] )->get( 'Description' );\n\t\t\t\t$message .= '<p><strong style=\"color:red; font-weight:700;\" >' . esc_html__( 'In Local Development', Constants::$PLUGIN_TEXT_DOMAIN ) . '</strong></p>';\n\t\t\t\t$prepared_themes[ $theme['id'] ]['description'] = $message;\n\t\t\t}\n\t\t}\n\n\t\treturn $prepared_themes;\n\t}", "title": "" }, { "docid": "b0ef078a3cd19b250170bae16a6e52c4", "score": "0.60766405", "text": "function docredux_home_description() {\n\tglobal $docredux;\n\t\n\tif ( !empty( $docredux->options['home_description'] ) ) {\n\t\techo wpautop( $docredux->options['home_description'] );\n\t}\n\t\n}", "title": "" }, { "docid": "7ddf0c5e22802d4d93c8aea55e43de4a", "score": "0.6070472", "text": "function convergence_site_description() {\r\n\treturn hybrid_site_description();\t\r\n}", "title": "" }, { "docid": "4feaaf17f3b9df29a8aad4b3b7e19234", "score": "0.6066377", "text": "function area2(){\n\t\t$this->title = \"Themes\";\n\t\tglobal $siteStatus;\n\n\t\t//check security\n\t\tif(!security::hasAccess(\"Manage Themes\")) {\n\t\t\t$this->border = 1;\n\t\t\treturn \"You do not have permissions to view this page.\";\n\t\t}\n\n\n\t\tthemeLibrary::scanForThemes();\n\n\t\t$themes = themeLibrary::getThemes();\n\t\t$scanErrors = themeLibrary::getScanErrors();\n\n\t\t$this->set(\"defaultTheme\",$siteStatus->defaultTheme);\n\t\t$this->set(\"themes\",$themes);\n\t\t$this->set(\"scanErrors\",$scanErrors);\n\n\t\treturn $this->fetch(\"themes.tmpl.php\");\n\t}", "title": "" }, { "docid": "445b5de44ab20b754e4f4cc3dfe52a52", "score": "0.60598594", "text": "function tile_config_theme($tile,$tile_id,$tile_width,$tile_height)\n\t{\n\tglobal $lang,$pagename;\n\t$pagename=\"home\";\n\t?>\n\t<span class='theme-icon'></span>\n\t<h2><?php echo $lang[\"themes\"]?></h2>\n\t<p><?php echo text(\"themes\")?></p>\n\t<?php\n\t}", "title": "" }, { "docid": "f62672eadfdebcf915f624d77189fde0", "score": "0.6039997", "text": "function theme_url() {\n\treturn BASE . 'themes' . DS . siteinfo('theme') . DS;\n}", "title": "" }, { "docid": "0c7cd3fc41f9722c7a8630a92d52e481", "score": "0.60233617", "text": "function redcompact_init(&$a) {\n\n $a->theme_info['extends'] = 'redbasic';\n\n\n}", "title": "" }, { "docid": "4ef28ba70974bee63d23cd587cfdb976", "score": "0.6000884", "text": "function siteorigin_custom_css_help() {\n\t$screen = get_current_screen();\n\t$theme = basename( get_template_directory() );\n\t$screen->add_help_tab( array(\n\t\t'id' => 'custom-css',\n\t\t'title' => __( 'Custom CSS', 'vantage' ),\n\t\t'content' => '<p>'\n\t\t\t. sprintf( __( \"%s adds any custom CSS you enter here into your site's header. \", 'vantage' ), ucfirst( $theme ) )\n\t\t\t. __( \"These changes will persist across updates so it's best to make all your changes here. \", 'vantage' )\n\t\t\t. sprintf( __( \"Post on <a href='%s' target='_blank'>our support forum</a> for help with making edits. \", 'vantage' ), 'http://siteorigin.com/thread/' )\n\t\t\t. '</p>'\n\t) );\n}", "title": "" }, { "docid": "308bb2aaf83885c8c93747c947d15df5", "score": "0.59971625", "text": "function wp_head(){\r\n\t\t\techo \"\\n<!-- WP Scheduled Themes is installed -->\";\r\n\t\t\tif($this->themeShouldBeOverridden)\r\n\t\t\t\techo \"\\n<!-- Activated theme has been overridden with: \". $this->themeToOverrideWith['Name'].\" -->\\n\";\r\n\t\t\t/*\r\n\t\t\techo \"\\n<!-- WP Scheduled Themes debug: \\n\";\r\n\t\t\tforeach($this->debugLines as $debug)\r\n\t\t\t\techo $debug . \"\\n\";\r\n\t\t\techo \"\\n END DEBUG -->\";\r\n\t\t\t*/\r\n\t\t}", "title": "" }, { "docid": "c7c942b3eaef3c5e0c989bed32bf737b", "score": "0.5976036", "text": "public function description() {\n $output['intro']['#markup'] = t('The AJAX example module provides many examples of AJAX including forms, links, and AJAX commands.');\n $output['list']['#theme'] = 'item_list';\n $output['list']['#items'][] = \\Drupal::l(t('Simplest AJAX Example'), Url::fromRoute('ajax_example.simplest'));\n return $output;\n }", "title": "" }, { "docid": "f972fcec3e9e826a4a3f41dd69deed3d", "score": "0.5962856", "text": "private function after_theme_setup(): void {\n\n\t\t//color palettes\n\t\tadd_theme_support(\n\t\t\t'editor-color-palette',\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Dark', 'beapi-frontend-framework' ),\n\t\t\t\t\t'slug' => 'dark',\n\t\t\t\t\t'color' => '#000000',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Light', 'beapi-frontend-framework' ),\n\t\t\t\t\t'slug' => 'light',\n\t\t\t\t\t'color' => '#ffffff',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Primary', 'beapi-frontend-framework' ),\n\t\t\t\t\t'slug' => 'primary',\n\t\t\t\t\t'color' => '#ffff00',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Secondary', 'beapi-frontend-framework' ),\n\t\t\t\t\t'slug' => 'secondary',\n\t\t\t\t\t'color' => '#00ffff',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t// font sizes\n\t\tadd_theme_support(\n\t\t\t'editor-font-sizes',\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Title 6', 'beapi-frontend-framework' ),\n\t\t\t\t\t'shortName' => 'h6',\n\t\t\t\t\t'size' => 14,\n\t\t\t\t\t'slug' => 'h6',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Title 5', 'beapi-frontend-framework' ),\n\t\t\t\t\t'shortName' => 'h5',\n\t\t\t\t\t'size' => 16,\n\t\t\t\t\t'slug' => 'h5',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Title 4', 'beapi-frontend-framework' ),\n\t\t\t\t\t'shortName' => 'h4',\n\t\t\t\t\t'size' => 18,\n\t\t\t\t\t'slug' => 'h4',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Title 3', 'beapi-frontend-framework' ),\n\t\t\t\t\t'shortName' => 'h3',\n\t\t\t\t\t'size' => 24,\n\t\t\t\t\t'slug' => 'h3',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Title 2', 'beapi-frontend-framework' ),\n\t\t\t\t\t'shortName' => 'h2',\n\t\t\t\t\t'size' => 40,\n\t\t\t\t\t'slug' => 'h2',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Title 1', 'beapi-frontend-framework' ),\n\t\t\t\t\t'shortName' => 'h1',\n\t\t\t\t\t'size' => 58,\n\t\t\t\t\t'slug' => 'h1',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "aa11e65b10b0cd7415bdd9709637b3f2", "score": "0.5947551", "text": "function vantage_upgrade_panels_upgrade_note(){\n\t?><p><?php printf( __('Additional styles are available in <a href=\"%s\" target=\"_blank\">Vantage Premium</a>.', 'vantage'), admin_url('themes.php?page=premium_upgrade') ) ?></p><?php\n}", "title": "" }, { "docid": "7b27a09f822f79db6b1ad962488a4c45", "score": "0.59439856", "text": "public function getName()\n {\n return 'theme';\n }", "title": "" }, { "docid": "4ee44c5ecdcf19ecb77045e875aa2c62", "score": "0.5922949", "text": "public function getDescription() {\n\t\treturn __('plugins.themes.pragma.description');\n\t}", "title": "" }, { "docid": "2d0045272be6982a1fe52dc061896586", "score": "0.589116", "text": "public function getTheme() {}", "title": "" }, { "docid": "4e144d2f14a661b85922c81332174bc4", "score": "0.5888064", "text": "function piano_theme_theme_support(){\n add_theme_support('title-tag');\n }", "title": "" }, { "docid": "f79f76b20e839377fcbc00f783c92916", "score": "0.5888049", "text": "function theme_micro_admin_overview($variables) {\n $name = $variables['name'];\n $type = $variables['machine_name'];\n $output = check_plain($name);\n $output .= ' <small> (Machine name: ' . check_plain($type->machine_name) . ')</small>';\n $output .= '<div class=\"description\">' . filter_xss_admin($type->description) . '</div>';\n return $output;\n}", "title": "" }, { "docid": "76b9e811864c4559ce89e5fce4d13eba", "score": "0.5886016", "text": "public function plugin_settings_description() {\n\t\t\n\t\t$description = '<p>';\n\t\t$description .= sprintf(\n\t\t\t__( 'Mad Mimi makes it easy to send email newsletters to your customers, manage your subscriber lists, and track campaign performance. Use Gravity Forms to collect customer information and automatically add it to your Mad Mimi audience list. If you don\\'t have a Mad Mimi account, you can %1$ssign up for one here.%2$s', 'gravityformsmadmimi' ),\n\t\t\t'<a href=\"http://www.madmimi.com/\" target=\"_blank\">', '</a>'\n\t\t);\n\t\t$description .= '</p>';\n\t\t\n\t\tif ( ! $this->initialize_api() ) {\n\t\t\t\n\t\t\t$description .= '<p>';\n\t\t\t$description .= sprintf(\n\t\t\t\t__( 'Gravity Forms Mad Mimi Add-On requires your account email address and API key, which can be found in the API tab on %1$sthe account page.%2$s', 'gravityformsmadmimi' ),\n\t\t\t\t'<a href=\"https://madmimi.com/user/edit?account_info_tabs=account_info_personal\" target=\"_blank\">', '</a>'\n\t\t\t);\n\t\t\t\n\t\t\t$description .= '</p>';\n\t\t\t\n\t\t}\n\t\t\t\t\n\t\treturn $description;\n\t\t\n\t}", "title": "" }, { "docid": "c048061edd3bc4e7c5e0c218da5d54fe", "score": "0.58841205", "text": "function sage_technical_dashboard_widget_function()\n{\n // get theme options\n $releaseDate = sage_get_field('release_date');\n $latestDate = sage_get_field('latest_date');\n $themeName = sage_get_field('theme_name');\n $themeVersion = sage_get_field('theme_version');\n\n // Entering the text between the quotes\n ?>\n <ul>\n <li><strong>Oprettet</strong>: <?php _e($releaseDate); ?></li>\n <li><strong>Opdateret</strong>: <?php _e($latestDate); ?></li>\n <li><strong>Tema</strong>: <?php _e($themeName); ?></li>\n <li><strong>Version</strong>: <?php _e($themeVersion); ?></li>\n </ul>\n <?php\n}", "title": "" }, { "docid": "a01819a91cd441ec73316752c4cf9b66", "score": "0.58741486", "text": "function o2_show_description() {\n $display = TRUE;\n $display = apply_filters('o2_show_description', $display);\n if ($display) {\n o2_create_description();\n }\n}", "title": "" }, { "docid": "197dfe6eb8d372cacb593f6d6a1713af", "score": "0.58652985", "text": "function get() {\n require(PATH . 'themes' . DS . siteinfo('theme') . DS . 'create' . EXT);\n }", "title": "" }, { "docid": "7c35a0e3447f89f762911919e7b64a75", "score": "0.5864791", "text": "function wimp_meetup_settings_description() {\n\techo '<p>The place where all the cool kids store their Meetup API key :D</p>';\n}", "title": "" }, { "docid": "957e6853d12676a415c838801d6ac2b1", "score": "0.5845521", "text": "public function description() {\n\n // Assemble the markup.\n $build = array(\n '#markup' => $this->t('<p>Dev Mod</p>'),\n );\n\n return $build;\n }", "title": "" }, { "docid": "ef5ffe1f97a58a8d73219220b63cfda3", "score": "0.58438015", "text": "public function action_init_theme()\n\t{\n\t\tFormat::apply( 'autop', 'post_content_out' );\n\t\t// Only uses the <!--more--> tag, with the 'more' as the link to full post\n\t\tFormat::apply_with_hook_params( 'more', 'post_content_out', 'more' );\n\t\t// Creates an excerpt option. echo $post->content_excerpt;\n\t\tFormat::apply_with_hook_params( 'more', 'post_content_excerpt', 'more', 60, 1 );\n\t\t// Apply Format::autop() to comment content...\n\t\tFormat::apply( 'autop', 'comment_content_out' );\n\t\t// Apply Format::tag_and_list() to post tags...\n\t\tFormat::apply( 'tag_and_list', 'post_tags_out' );\n\t\t// Apply Format::nice_date() to comment date...\n\t\tFormat::apply( 'nice_date', 'comment_date_out', 'F jS, Y' );\n\t\t// Apply Format::nice_date() to post date...\n\t\tFormat::apply( 'nice_date', 'post_pubdate_out', 'F jS, Y' );\n\t}", "title": "" }, { "docid": "d56e55ad1349a5b12daf8fc7bb4fb01a", "score": "0.5826412", "text": "public function setSections()\n {\n // Background Patterns Reader\n $sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/';\n $sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/';\n $sample_patterns = array();\n if (is_dir($sample_patterns_path)):\n if ($sample_patterns_dir = opendir($sample_patterns_path)):\n $sample_patterns = array();\n while (($sample_patterns_file = readdir($sample_patterns_dir)) !== false) {\n if (stristr($sample_patterns_file, '.png') !== false || stristr($sample_patterns_file, '.jpg') !== false) {\n $name = explode('.', $sample_patterns_file);\n $name = str_replace('.' . end($name), '', $sample_patterns_file);\n $sample_patterns[] = array(\n 'alt' => $name,\n 'img' => $sample_patterns_url . $sample_patterns_file\n );\n }\n }\n endif;\n endif;\n ob_start();\n $ct = wp_get_theme();\n $this->theme = $ct;\n $item_name = $this->theme->get('Name');\n $tags = $this->theme->Tags;\n $screenshot = $this->theme->get_screenshot();\n $class = $screenshot ? 'has-screenshot' : '';\n $customize_title = sprintf(esc_html__('Customize &#8220;%s&#8221;', 'incubator'), $this->theme->display('Name'));\n?>\n <div id=\"current-theme\" class=\"<?php\n echo esc_attr($class);\n?>\n \">\n <?php\n if ($screenshot):\n?>\n <?php\n if (current_user_can('edit_theme_options')):\n?>\n <a href=\"<?php\n echo esc_url(wp_customize_url());\n?>\n \" class=\"load-customize hide-if-no-customize\" title=\"\n <?php\n echo esc_attr($customize_title);\n?>\n \">\n <img src=\"<?php\n echo esc_url($screenshot);\n?>\n \" alt=\"\n <?php\n esc_attr_e('Current theme preview','incubator');\n?>\" /></a>\n <?php\n endif;\n?>\n <img class=\"hide-if-customize\" src=\"<?php\n echo esc_url($screenshot);\n?>\n \" alt=\"\n <?php\n esc_attr_e('Current theme preview','incubator');\n?>\n \" />\n <?php\n endif;\n?>\n\n <h4>\n <?php\n echo esc_attr($this->theme->display('Name'));\n?></h4>\n\n <div>\n <ul class=\"theme-info\">\n <li>\n <?php\n printf(esc_html__('By %s', 'incubator'), $this->theme->display('Author'));\n?></li>\n <li>\n <?php\n printf(esc_html__('Version %s', 'incubator'), $this->theme->display('Version'));\n?></li>\n <li>\n <?php\n echo '<strong>' . esc_html__('Tags', 'incubator') . ':</strong>\n ';\n?>\n <?php\n printf($this->theme->display('Tags'));\n?></li>\n </ul>\n <p class=\"theme-description\">\n <?php\n echo esc_attr($this->theme->display('Description'));\n?></p>\n\n </div>\n</div>\n\n<?php\n $item_info = ob_get_contents();\n ob_end_clean();\n $sampleHTML = '';\n // ACTUAL DECLARATION OF SECTIONS\n $this->sections[] = array(\n 'icon' => 'el-icon-globe',\n 'title' => esc_html__('Global Options', 'incubator'),\n 'compiler' => 'true',\n 'fields' => array(\n array(\n 'id' => 'tek-main-color',\n 'type' => 'color',\n 'transparent' => false,\n 'title' => esc_html__('Main theme color', 'incubator'),\n 'default' => '#0030b8',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'tek-logo',\n 'type' => 'media',\n 'url' => true,\n 'title' => esc_html__('Logo', 'incubator'),\n 'subtitle' => esc_html__('Upload logo image', 'incubator'),\n 'default' => array(\n 'url' => get_template_directory_uri() . '/images/logo.png'\n )\n ),\n array(\n 'id' => 'tek-logo2',\n 'type' => 'media',\n 'url' => true,\n 'title' => esc_html__('Secondary Logo', 'incubator'),\n 'subtitle' => esc_html__('Upload logo image for Scrolled NavBar', 'incubator'),\n 'default' => array(\n 'url' => get_template_directory_uri() . '/images/logo-2.png'\n )\n ),\n array(\n 'id' => 'tek-logo-size',\n 'type' => 'dimensions',\n 'height' => false,\n 'units' => array('px'),\n 'url' => true,\n 'title' => esc_html__('Image Logo Size', 'incubator'),\n 'subtitle' => esc_html__('Choose logo width - the image will constrain proportions', 'incubator')\n ),\n array(\n 'id' => 'tek-favicon',\n 'type' => 'media',\n 'preview' => false,\n 'url' => true,\n 'title' => esc_html__('Favicon', 'incubator'),\n 'subtitle' => esc_html__('Upload favicon image', 'incubator'),\n 'default' => array(\n 'url' => get_template_directory_uri() . '/images/favicon.png'\n )\n ),\n array(\n 'id' => 'tek-disable-animations',\n 'type' => 'switch',\n 'title' => esc_html__('Disable animations on mobile', 'incubator'),\n 'subtitle' => esc_html__('Globally turn ON/OFF animations on mobile devices.', 'incubator'),\n 'default' => false\n ),\n array(\n 'id' => 'tek-preloader',\n 'type' => 'switch',\n 'title' => esc_html__('Preloader', 'incubator'),\n 'subtitle' => esc_html__('Enabling this option will add a preloading screen with a nice transition.', 'incubator'),\n 'default' => true\n ),\n array(\n 'id' => 'tek-coming-soon',\n 'type' => 'switch',\n 'title' => esc_html__('Coming Soon Mode', 'incubator'),\n 'subtitle' => esc_html__('Enabling this option will set your website in a Coming Soon mode. This page will be visible only for website visitors.', 'incubator'),\n 'default' => false\n ),\n array(\n 'id' => 'tek-coming-soon-page',\n 'type' => 'select',\n 'title' => esc_html__('Coming Soon Page', 'incubator'),\n 'required' => array('tek-coming-soon','equals', true),\n 'subtitle' => esc_html__('Choose coming soon page', 'incubator'),\n 'data' => 'pages'\n ),\n array(\n 'id' => 'tek-google-api',\n 'type' => 'text',\n 'title' => esc_html__('Google Map API Key', 'incubator'),\n 'default' => '',\n 'subtitle' => esc_html__('Generate, copy and paste here Google Maps API Key', 'incubator'),\n ),\n array(\n 'id' => 'tek-css',\n 'type' => 'ace_editor',\n 'title' => esc_html__('Custom CSS', 'incubator'),\n 'subtitle' => esc_html__('Paste your CSS code here.', 'incubator'),\n 'mode' => 'css',\n 'theme' => 'chrome'\n )\n )\n );\n\n\n $this->sections[] = array(\n 'icon' => 'el-icon-screen',\n 'title' => esc_html__('Header', 'incubator'),\n 'compiler' => 'true',\n 'fields' => array(\n array(\n 'id' => 'tek-menu-style',\n 'type' => 'button_set',\n 'title' => esc_html__('Select main navigation style.', 'incubator'),\n 'subtitle' => esc_html__('You can choose between full width and contained.', 'incubator'),\n 'options' => array(\n '1' => 'Full width',\n '2' => 'Contained'\n ),\n 'default' => '1'\n ),\n array(\n 'id' => 'tek-menu-behaviour',\n 'type' => 'button_set',\n 'title' => esc_html__('Select main navigation behaviour.', 'incubator'),\n 'subtitle' => esc_html__('You can choose between a sticky or a fixed top menu.', 'incubator'),\n 'options' => array(\n '1' => 'Sticky',\n '2' => 'Fixed'\n ),\n 'default' => '1'\n ),\n array(\n 'id' => 'tek-header-menu-bg',\n 'type' => 'color',\n 'title' => esc_html__('Navigation Background Color', 'incubator'),\n 'default' => '',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'tek-header-menu-bg-sticky',\n 'type' => 'color',\n 'title' => esc_html__('Sticky Navigation Background Color', 'incubator'),\n 'default' => '',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'tek-header-menu-color',\n 'type' => 'color',\n 'transparent' => false,\n 'title' => esc_html__('Navigation Text Color', 'incubator'),\n 'default' => '',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'tek-header-menu-color-sticky',\n 'type' => 'color',\n 'transparent' => false,\n 'title' => esc_html__('Sticky Navigation Text Color', 'incubator'),\n 'default' => '',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'tek-header-menu-color-hover',\n 'type' => 'color',\n 'transparent' => false,\n 'title' => esc_html__('Navigation Text Color on mouse over', 'incubator'),\n 'default' => '',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'tek-header-menu-color-sticky-hover',\n 'type' => 'color',\n 'transparent' => false,\n 'title' => esc_html__('Sticky Navigation Text Color on mouse over', 'incubator'),\n 'default' => '',\n 'validate' => 'color'\n ),\n )\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-website',\n 'title' => esc_html__('Home Slider', 'etalon'),\n 'compiler' => 'true',\n 'fields' => array(\n array(\n 'id' => 'tek-slider',\n 'type' => 'text',\n 'title' => esc_html__('Revolution Slider Alias', 'incubator'),\n 'subtitle' => esc_html__('Insert Revolution Slider alias here', 'incubator'),\n 'default' => ''\n ),\n array(\n 'id' => 'tek-slider-scroll',\n 'type' => 'switch',\n 'title' => esc_html__('Scroll down button under the slider', 'incubator'),\n 'subtitle' => esc_html__('Enabling this option will display a nice down arrow under the slider with a smooth scroll effect.', 'incubator'),\n 'default' => true\n ),\n )\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-certificate',\n 'title' => esc_html__('Header button', 'incubator'),\n 'compiler' => 'true',\n 'fields' => array(\n array(\n 'id' => 'tek-header-button',\n 'type' => 'switch',\n 'title' => esc_html__('Show button in header', 'incubator'),\n 'default' => false\n ),\n array(\n 'id' => 'tek-header-button-text',\n 'type' => 'text',\n 'title' => esc_html__('Button text', 'incubator'),\n 'required' => array('tek-header-button','equals', true),\n 'default' => 'Let`s Talk'\n ),\n array(\n 'id' => 'tek-header-button-action',\n 'type' => 'select',\n 'title' => esc_html__('Button action', 'incubator'),\n 'required' => array('tek-header-button','equals', true),\n 'options' => array(\n '1' => 'Open modal window with contact form',\n '2' => 'Scroll to section',\n '3' => 'Open a new page'\n ),\n 'default' => '1'\n ),\n array(\n 'id' => 'tek-modal-title',\n 'type' => 'text',\n 'title' => esc_html__('Modal title', 'incubator'),\n 'required' => array('tek-header-button-action','equals','1'),\n 'default' => 'Just ask. Get answers.'\n ),\n array(\n 'id' => 'tek-modal-content',\n 'type' => 'text',\n 'title' => esc_html__('Modal subtitle', 'incubator'),\n 'required' => array('tek-header-button-action','equals','1'),\n 'default' => 'Your questions and comments are important to us.'\n ),\n array(\n 'id' => 'tek-modal-form-select',\n 'type' => 'select',\n 'title' => esc_html__('Contact form plugin', 'etalon'),\n 'required' => array('tek-header-button-action','equals','1'),\n 'options' => array(\n '1' => 'Contact Form 7',\n '2' => 'Ninja Forms'\n ),\n 'default' => '1'\n ),\n array(\n 'id' => 'tek-modal-contactf7-formid',\n 'type' => 'select',\n 'data' => 'posts',\n 'args' => array( 'post_type' => 'wpcf7_contact_form', ),\n 'title' => esc_html__('Contact Form 7 Title', 'etalon'),\n 'required' => array('tek-modal-form-select','equals','1'),\n 'default' => ''\n ),\n array(\n 'id' => 'tek-modal-ninja-formid',\n 'type' => 'text',\n 'title' => esc_html__('Ninja Form ID', 'etalon'),\n 'required' => array('tek-modal-form-select','equals','2'),\n 'default' => ''\n ),\n array(\n 'id' => 'tek-scroll-id',\n 'type' => 'text',\n 'title' => esc_html__('Scroll to section ID', 'incubator'),\n 'required' => array('tek-header-button-action','equals','2'),\n 'default' => '#download-incubator'\n ),\n\n array(\n 'id' => 'tek-button-new-page',\n 'type' => 'text',\n 'title' => esc_html__('New page full link', 'incubator'),\n 'required' => array('tek-header-button-action','equals','3'),\n 'default' => ''\n ),\n )\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-fontsize',\n 'title' => esc_html__('Typography', 'incubator'),\n 'compiler' => true,\n 'fields' => array(\n array(\n 'id' => 'tek-default-typo',\n 'type' => 'typography',\n 'title' => esc_html__('Body font settings', 'incubator'),\n //'compiler' => true, // Use if you want to hook in your own CSS compiler\n 'google' => true, // Disable google fonts. Won't work if you haven't defined your google api key\n // 'font-backup' => true, // Select a backup non-google font in addition to a google font\n 'font-style' => true, // Includes font-style and weight. Can use font-style or font-weight to declare\n //'subsets' => false, // Only appears if google is true and subsets not set to false\n 'font-size' => true,\n 'line-height' => true,\n //'word-spacing' => true, // Defaults to false\n //'letter-spacing'=> true, // Defaults to false\n 'color' => true,\n 'text-align' => true,\n 'preview' => true, // Disable the previewer\n 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page\n 'compiler' => array(\n 'body, .box'\n ), // An array of CSS selectors to apply this font style to dynamically\n // 'compiler' => array('h2.site-description-compiler'), // An array of CSS selectors to apply this font style to dynamically\n 'units' => 'px', // Defaults to px\n 'default' => array(\n 'color' => '#666',\n 'font-weight' => '400',\n 'font-family' => 'Open Sans',\n 'google' => true,\n 'font-size' => '16px',\n 'text-align' => 'left',\n 'line-height' => '30px'\n ),\n 'preview' => array(\n 'text' => 'Sample Text'\n )\n ),\n array(\n 'id' => 'tek-heading-typo',\n 'type' => 'typography',\n 'title' => esc_html__('Headings font settings', 'incubator'),\n //'compiler' => true, // Use if you want to hook in your own CSS compiler\n 'google' => true, // Disable google fonts. Won't work if you haven't defined your google api key\n // 'font-backup' => true, // Select a backup non-google font in addition to a google font\n 'font-style' => true, // Includes font-style and weight. Can use font-style or font-weight to declare\n //'subsets' => false, // Only appears if google is true and subsets not set to false\n 'font-size' => true,\n 'line-height' => true,\n //'word-spacing' => true, // Defaults to false\n //'letter-spacing'=> true, // Defaults to false\n 'color' => true,\n 'text-align' => true,\n 'preview' => true, // Disable the previewer\n 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page\n 'compiler' => array(\n '.container h1,.container h2,.container h3, .pricing .col-lg-3, .chart, .pb_counter_number, .pc_percent_container'\n ), // An array of CSS selectors to apply this font style to dynamically\n // 'compiler' => array('h2.site-description-compiler'), // An array of CSS selectors to apply this font style to dynamically\n 'units' => 'px', // Defaults to px\n 'default' => array(\n 'color' => '#333',\n 'font-weight' => '700',\n 'font-family' => 'Work Sans',\n 'google' => true,\n 'font-size' => '40px',\n 'text-align' => 'center',\n 'line-height' => '48px'\n ),\n 'preview' => array(\n 'text' => 'Incubator Sample Text'\n )\n ),\n array(\n 'id' => 'tek-menu-typo',\n 'type' => 'typography',\n 'title' => esc_html__('Menu font settings', 'incubator'),\n //'compiler' => true, // Use if you want to hook in your own CSS compiler\n 'google' => true, // Disable google fonts. Won't work if you haven't defined your google api key\n // 'font-backup' => true, // Select a backup non-google font in addition to a google font\n 'font-style' => true, // Includes font-style and weight. Can use font-style or font-weight to declare\n //'subsets' => false, // Only appears if google is true and subsets not set to false\n 'font-size' => true,\n 'line-height' => false,\n //'word-spacing' => true, // Defaults to false\n //'letter-spacing'=> true, // Defaults to false\n 'color' => false,\n 'text-transform' => true,\n 'text-align' => false,\n 'preview' => true, // Disable the previewer\n 'all_styles' => false, // Enable all Google Font style/weight variations to be added to the page\n 'compiler' => array(\n '.navbar-default .nav li a'\n ), // An array of CSS selectors to apply this font style to dynamically\n // 'compiler' => array('h2.site-description-compiler'), // An array of CSS selectors to apply this font style to dynamically\n 'units' => 'px', // Defaults to px\n 'preview' => array(\n 'text' => 'Menu Item'\n )\n ),\n )\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-th-list',\n 'title' => esc_html__('Portfolio', 'incubator'),\n 'compiler' => 'true',\n 'fields' => array(\n array(\n \t\t\t\t'id' =>\t'tek-portfolio-title',\n \t\t\t\t'type' => 'switch',\n \t\t\t\t'title' => esc_html__('Show title', 'incubator'),\n \t\t\t\t'subtitle' => esc_html__('Activate to display the portfolio item title in the content area.', 'incubator'),\n \t\t\t\t'default' => '1',\n \t\t\t\t'on' => 'Yes',\n \t\t\t\t'off' => 'No',\n \t\t\t),\n array(\n \t\t\t\t'id' =>\t'tek-portfolio-meta',\n \t\t\t\t'type' => 'switch',\n \t\t\t\t'title' => esc_html__('Meta section', 'incubator'),\n \t\t\t\t'subtitle' => esc_html__('Activate to display the meta section (Category, Tags, Publish Date).', 'incubator'),\n \t\t\t\t'default' => '1',\n \t\t\t\t'on' => 'Yes',\n \t\t\t\t'off' => 'No',\n \t\t\t),\n array(\n \t\t\t\t'id' =>\t'tek-portfolio-social',\n \t\t\t\t'type' => 'switch',\n \t\t\t\t'title' => esc_html__('Social media section', 'incubator'),\n \t\t\t\t'subtitle' => esc_html__('Activate to display the share on social media buttons.', 'incubator'),\n \t\t\t\t'default' => '1',\n \t\t\t\t'on' => 'Yes',\n \t\t\t\t'off' => 'No',\n \t\t\t),\n array(\n 'id' => 'tek-portfolio-bgcolor',\n 'type' => 'color',\n 'title' => esc_html__('Page background color', 'incubator'),\n 'subtitle' => esc_html__('Select the background color for the content area.', 'incubator'),\n 'default' => '#fafafa',\n 'validate' => 'color'\n ),\n )\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-shopping-cart',\n 'title' => esc_html__('Shop', 'incubator'),\n 'compiler' => 'true',\n 'fields' => array(\n array(\n \t\t\t\t'id' =>\t'tek-woo-support',\n \t\t\t\t'type' => 'switch',\n \t\t\t\t'title' => esc_html__('WooCommerce Support', 'incubator'),\n \t\t\t\t'subtitle' => esc_html__('Please install and activate WooCommerce before activating this option.', 'incubator'),\n \t\t\t\t'default' => '0',\n \t\t\t\t'on' => 'Yes',\n \t\t\t\t'off' => 'No',\n \t\t\t),\n array(\n 'id' => 'tek-woo-single-sidebar',\n 'type' => 'switch',\n 'title' => esc_html__('WooCommerce Single Product Sidebar', 'incubator'),\n 'subtitle' => esc_html__('Enable/Disable Shop sidebar on single product page.', 'incubator'),\n 'default' => '0',\n '1' => 'Yes',\n '0' => 'No',\n ),\n )\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-pencil-alt',\n 'title' => esc_html__('Blog', 'incubator'),\n 'fields' => array(\n array(\n 'id' => 'tek-blog-subtitle',\n 'type' => 'text',\n 'title' => esc_html__('Blog Subtitle', 'incubator'),\n 'default' => 'The hardest part of starting up is starting out.'\n //\n ),\n array(\n 'id' => 'tek-blog-sidebar',\n 'type' => 'switch',\n 'title' => esc_html__('Display sidebar', 'incubator'),\n 'subtitle' => esc_html__('Turn on/off blog sidebar', 'incubator'),\n 'default' => true\n ),\n array(\n 'id' => 'tek-blog-minimal',\n 'type' => 'switch',\n 'title' => esc_html__('Minimal Blog', 'incubator'),\n 'subtitle' => esc_html__('Change blog layout to minimal style', 'incubator'),\n 'default' => false\n )\n )\n );\n $this->sections[] = array(\n 'icon' => 'el-icon-error-alt',\n 'title' => esc_html__('404 Page', 'incubator'),\n 'fields' => array(\n array(\n 'id' => 'tek-404-title',\n 'type' => 'text',\n 'title' => esc_html__('Title', 'incubator'),\n 'default' => 'Error 404'\n //\n ),\n array(\n 'id' => 'tek-404-subtitle',\n 'type' => 'text',\n 'title' => esc_html__('Subtitle', 'incubator'),\n 'default' => 'This page could not be found!'\n //\n ),\n array(\n 'id' => 'tek-404-back',\n 'type' => 'text',\n 'title' => esc_html__('Back to homepage text', 'incubator'),\n 'default' => 'Back to homepage'\n //\n ),\n array(\n 'id' => 'tek-404-img',\n 'type' => 'media',\n 'url' => true,\n 'title' => esc_html__('Background Image', 'incubator'),\n 'subtitle' => esc_html__('Upload 404 overlay image', 'incubator'),\n 'default' => array(\n 'url' => get_template_directory_uri() . '/images/page-404.jpg'\n )\n )\n )\n );\n $this->sections[] = array(\n 'icon' => 'el-icon-thumbs-up',\n 'title' => esc_html__('Footer', 'incubator'),\n 'fields' => array(\n\n array(\n 'id' => 'tek-footer-fixed',\n 'type' => 'switch',\n 'title' => esc_html__('Fixed Footer', 'incubator'),\n 'subtitle' => esc_html__('Enabling this option will set the Footer in a fixed position.', 'incubator'),\n 'default' => true\n ),\n array(\n 'id' => 'tek-backtotop',\n 'type' => 'switch',\n 'title' => esc_html__('Show \"Back to Top\" button', 'incubator'),\n 'subtitle' => esc_html__('Enabling this option will display a \"back to top\" button at the bottom right corner of every page.', 'incubator'),\n 'default' => true\n ),\n array(\n 'id' => 'tek-upper-footer-color',\n 'type' => 'color',\n 'transparent' => false,\n 'title' => esc_html__('Footer Top Background Color', 'incubator'),\n 'default' => '#fafafa',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'tek-lower-footer-color',\n 'type' => 'color',\n 'transparent' => false,\n 'title' => esc_html__('Footer Bottom Background Color', 'incubator'),\n 'default' => '#fff',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'tek-footer-heading-color',\n 'type' => 'color',\n 'transparent' => false,\n 'title' => esc_html__('Footer Headings Color', 'incubator'),\n 'default' => '#666',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'tek-footer-text-color',\n 'type' => 'color',\n 'transparent' => false,\n 'title' => esc_html__('Footer Text Color', 'incubator'),\n 'default' => '#666',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'tek-footer-text',\n 'type' => 'text',\n 'title' => esc_html__('Copyright Text', 'incubator'),\n 'subtitle' => esc_html__('Enter footer bottom copyright text', 'incubator'),\n 'default' => 'Incubator by KeyDesign. All rights reserved.'\n ),\n array(\n 'id' => 'tek-social-icons',\n 'type' => 'checkbox',\n 'title' => esc_html__('Social Icons', 'incubator'),\n 'subtitle' => esc_html__('Select visible social icons', 'incubator'),\n //Must provide key => value pairs for multi checkbox options\n 'options' => array(\n '1' => 'Facebook',\n '2' => 'Twitter',\n '3' => 'Google+',\n '4' => 'Pinterest',\n '5' => 'Youtube',\n '6' => 'Linkedin',\n '7' => 'Instagram',\n '8' => 'Xing'\n ),\n //See how std has changed? you also don't need to specify opts that are 0.\n 'default' => array(\n '1' => '1',\n '2' => '1',\n '3' => '1',\n '4' => '0',\n '5' => '0',\n '6' => '1',\n '7' => '0',\n )\n ),\n array(\n 'id' => 'tek-facebook-url',\n 'type' => 'text',\n 'title' => esc_html__('Facebook Link', 'incubator'),\n 'subtitle' => esc_html__('Enter Facebook URL', 'incubator'),\n 'validate' => 'url',\n 'default' => 'http://www.facebook.com/'\n ),\n\n array(\n 'id' => 'tek-twitter-url',\n 'type' => 'text',\n 'title' => esc_html__('Twitter Link', 'incubator'),\n 'subtitle' => esc_html__('Enter Twitter URL', 'incubator'),\n 'validate' => 'url',\n 'default' => 'http://www.twitter.com/'\n ),\n\n array(\n 'id' => 'tek-google-url',\n 'type' => 'text',\n 'title' => esc_html__('Google+ Link', 'incubator'),\n 'subtitle' => esc_html__('Enter Google+ URL', 'incubator'),\n 'default' => 'http://plus.google.com/'\n ),\n array(\n 'id' => 'tek-pinterest-url',\n 'type' => 'text',\n 'title' => esc_html__('Pinterest Link', 'incubator'),\n 'subtitle' => esc_html__('Enter Pinterest URL', 'incubator'),\n 'validate' => 'url',\n 'default' => 'http://www.pinterest.com/'\n ),\n\n array(\n 'id' => 'tek-youtube-url',\n 'type' => 'text',\n 'title' => esc_html__('Youtube Link', 'incubator'),\n 'subtitle' => esc_html__('Enter Youtube URL', 'incubator'),\n 'validate' => 'url',\n 'default' => 'http://www.youtube.com/'\n ),\n array(\n 'id' => 'tek-linkedin-url',\n 'type' => 'text',\n 'title' => esc_html__('Linkedin Link', 'incubator'),\n 'subtitle' => esc_html__('Enter Linkedin URL', 'incubator'),\n 'validate' => 'url',\n 'default' => 'http://www.linkedin.com/'\n ),\n array(\n 'id' => 'tek-instagram-url',\n 'type' => 'text',\n 'title' => esc_html__('Instagram Link', 'incubator'),\n 'subtitle' => esc_html__('Enter Instagram URL', 'incubator'),\n 'validate' => 'url',\n 'default' => 'http://www.instagram.com/'\n ),\n array(\n 'id' => 'tek-xing-url',\n 'type' => 'text',\n 'title' => esc_html__('Xing Link', 'incubator'),\n 'subtitle' => esc_html__('Enter Xing URL', 'incubator'),\n 'validate' => 'url',\n 'default' => 'http://www.xing.com/'\n ),\n\n )\n );\n $this->sections[] = array(\n 'title' => esc_html__('Import/Export ', 'incubator'),\n 'desc' => esc_html__('Import and Export Theme Options', 'incubator'),\n 'icon' => 'el-icon-magic',\n 'fields' => array(\n array(\n 'id' => 'opt-import-export',\n 'type' => 'import_export',\n 'title' => esc_html__('Import and Export Theme Options', 'incubator'),\n 'subtitle' => '',\n 'full_width' => false\n )\n )\n );\n }", "title": "" }, { "docid": "7bc1791fc5a336ca14799be1dc00498f", "score": "0.58227456", "text": "function getDescription() {\n\t\treturn 'Scans your post for keywords as it is shown and then creates a glossary applied with skinvar Glossary(list) there are lots of other skinvars please see http://wiki.lordmatt.co.uk/index.php/NP_Glossary for the full lowdown. One new word may be added with each post or Admin Area Edit (not pop-up edit).';\n\t}", "title": "" }, { "docid": "f36d22f29eb0a4fad060c5ebee2e5e46", "score": "0.5814456", "text": "public function setSections() {\n // Background Patterns Reader\n $sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/';\n $sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/';\n $sample_patterns = array();\n\n if (is_dir($sample_patterns_path)) :\n\n if ($sample_patterns_dir = opendir($sample_patterns_path)) :\n $sample_patterns = array();\n\n while (( $sample_patterns_file = readdir($sample_patterns_dir) ) !== false) {\n\n if (stristr($sample_patterns_file, '.png') !== false || stristr($sample_patterns_file, '.jpg') !== false) {\n $name = explode('.', $sample_patterns_file);\n $name = str_replace('.' . end($name), '', $sample_patterns_file);\n $sample_patterns[] = array('alt' => $name, 'img' => $sample_patterns_url . $sample_patterns_file);\n }\n }\n endif;\n endif;\n\n ob_start();\n\n $ct = wp_get_theme();\n $this->theme = $ct;\n $item_name = $this->theme->get('Name');\n $tags = $this->theme->Tags;\n $screenshot = $this->theme->get_screenshot();\n $class = $screenshot ? 'has-screenshot' : '';\n\n $customize_title = sprintf(__('Customize &#8220;%s&#8221;', 'redux-framework-demo'), $this->theme->display('Name'));\n \n ?>\n <div id=\"current-theme\" class=\"<?php echo esc_attr($class); ?>\">\n <?php if ($screenshot) : ?>\n <?php if (current_user_can('edit_theme_options')) : ?>\n <a href=\"<?php echo wp_customize_url(); ?>\" class=\"load-customize hide-if-no-customize\" title=\"<?php echo esc_attr($customize_title); ?>\">\n <img src=\"<?php echo esc_url($screenshot); ?>\" alt=\"<?php esc_attr_e('Current theme preview'); ?>\" />\n </a>\n <?php endif; ?>\n <img class=\"hide-if-customize\" src=\"<?php echo esc_url($screenshot); ?>\" alt=\"<?php esc_attr_e('Current theme preview'); ?>\" />\n <?php endif; ?>\n\n <h4><?php echo $this->theme->display('Name'); ?></h4>\n\n <div>\n <ul class=\"theme-info\">\n <li><?php printf(__('By %s', 'redux-framework-demo'), $this->theme->display('Author')); ?></li>\n <li><?php printf(__('Version %s', 'redux-framework-demo'), $this->theme->display('Version')); ?></li>\n <li><?php echo '<strong>' . __('Tags', 'redux-framework-demo') . ':</strong> '; ?><?php printf($this->theme->display('Tags')); ?></li>\n </ul>\n <p class=\"theme-description\"><?php echo $this->theme->display('Description'); ?></p>\n <?php\n if ($this->theme->parent()) {\n printf(' <p class=\"howto\">' . __('This <a href=\"%1$s\">child theme</a> requires its parent theme, %2$s.') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'redux-framework-demo'), $this->theme->parent()->display('Name'));\n }\n ?>\n\n </div>\n </div>\n\n <?php\n $item_info = ob_get_contents();\n\n ob_end_clean();\n\n $sampleHTML = '';\n if (file_exists(dirname(__FILE__) . '/info-html.html')) {\n /** @global WP_Filesystem_Direct $wp_filesystem */\n global $wp_filesystem;\n if (empty($wp_filesystem)) {\n require_once(ABSPATH . '/wp-admin/includes/file.php');\n WP_Filesystem();\n }\n $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');\n }\n\n // ACTUAL DECLARATION OF SECTIONS\n $this->sections[] = array(\n 'title' => __('General Settings', 'redux-framework-demo'),\n 'desc' => __('Hello there! If you like the theme, please support us by rating the theme 5 stars on the Downloads section from <a href=\"http://themeforest.net/downloads\">ThemeForest(click)</a>', 'redux-framework-demo'),\n 'icon' => 'el-icon-cogs',\n // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!\n 'fields' => array(\n array(\n 'id' => 'logo',\n 'type' => 'media',\n 'url' => true,\n 'title' => __('Dark Logo(default - used on header 1 and 2)', 'redux-framework-demo'),\n //'mode' => false, // Can be set to false to allow any media type, or can also be set to any mime type.\n 'desc' => __('The logo that shows up on the headers 1-2(a dark logo is highly recommended).', 'redux-framework-demo'),\n 'subtitle' => __('Upload any media using the WordPress native uploader', 'redux-framework-demo'),\n 'default' => array('url' => get_template_directory_uri() . '/img/logo-black-small.png'),\n ),\n array(\n 'id' => 'logo2',\n 'type' => 'media',\n 'url' => true,\n 'title' => __('White Logo(used on header 3-6)', 'redux-framework-demo'),\n //'mode' => false, // Can be set to false to allow any media type, or can also be set to any mime type.\n 'desc' => __('The logo that shows up on the headers 3-6(if you don\\'t set it, it will use the dark one.', 'redux-framework-demo'),\n 'subtitle' => __('Upload any media using the WordPress native uploader', 'redux-framework-demo'),\n 'default' => array('url' => get_template_directory_uri() . '/img/logo-white-small.png'),\n ),\n array(\n 'id' => 'favicon',\n 'type' => 'media',\n 'url' => true,\n 'title' => __('Favicon', 'redux-framework-demo'),\n //'mode' => false, // Can be set to false to allow any media type, or can also be set to any mime type.\n 'desc' => __('This is the little icon that shows up attached to your title in the browser.', 'redux-framework-demo'),\n 'subtitle' => __('Upload any media using the WordPress native uploader(recommended .ico file format)', 'redux-framework-demo'),\n 'default' => array(),\n ),\n array(\n 'id' => 'header-type',\n 'type' => 'radio',\n 'title' => __('Header variation on category/author/tag and other archive pages.', 'redux-framework-demo'),\n 'desc' => __('Headers can be seen at this url <a href=\"http://teothemes.com/html/Arwyn/headers.html\">Click here</a>. This header variation will be used on all the category/author/tag/archive/etc pages, excepting the single post pages which will be managed through the metaboxes from the single posts individually and also except the homepage with the full screen slider.', 'redux-framework-demo'),\n \n //Must provide key => value pairs for select options\n 'options' => array(\n '1' => 'Variation 1(<a target=\"_blank\" href=\"http://teothemes.com/wp/arwyn/wp-content/themes/Arwyn/img/variation1.png\">click to see</a>) ', \n '2' => 'Variation 2(<a target=\"_blank\" href=\"http://teothemes.com/wp/arwyn/wp-content/themes/Arwyn/img/variation2.png\">click to see</a>) ', \n '3' => 'Variation 3(<a target=\"_blank\" href=\"http://teothemes.com/wp/arwyn/wp-content/themes/Arwyn/img/variation3.png\">click to see</a>) ', \n '4' => 'Variation 4(<a target=\"_blank\" href=\"http://teothemes.com/wp/arwyn/wp-content/themes/Arwyn/img/variation4.png\">click to see</a>) ', \n '5' => 'Variation 5(<a target=\"_blank\" href=\"http://teothemes.com/wp/arwyn/wp-content/themes/Arwyn/img/variation5.png\">click to see</a>) ', \n '6' => 'Variation 6(<a target=\"_blank\" href=\"http://teothemes.com/wp/arwyn/wp-content/themes/Arwyn/img/variation6.png\">click to see</a>) ', \n ),\n 'default' => '1'\n ),\n array(\n 'id' => 'header-bg-color',\n 'type' => 'color',\n 'title' => __('Background color used on some header variations', 'redux-framework-demo'),\n 'subtitle' => __('Pick a background color for header variations 1 or 2(if used).', 'redux-framework-demo'),\n 'default' => '#E3E3E3',\n 'validate' => 'color',\n ),\n array(\n 'id' => 'header-bg-image',\n 'type' => 'media',\n 'url' => true,\n 'title' => __('Background image used on some header variations', 'redux-framework-demo'),\n //'mode' => false, // Can be set to false to allow any media type, or can also be set to any mime type.\n 'desc' => __('Used on the header variations 3, 4, 5 and 6.', 'redux-framework-demo'),\n 'default' => array('url' => get_template_directory_uri() . '/content/header-small.jpg'),\n ),\n ),\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-cog',\n 'title' => __('Single post functionality', 'redux-framework-demo'),\n 'desc' => 'Functionality for single posts',\n 'fields' => array(\n array(\n 'id' => 'excerpt_type',\n 'type' => 'select',\n 'title' => __('Excerpt style, on archive/category pages', 'redux-framework-demo'),\n 'subtitle' => __('The type of excerpt shown on blog / archive / category / index / tag pages for single posts.', 'redux-framework-demo'),\n 'options' => array('1' => 'First 70 words from the post content', '2' => 'Post excerpt'),\n 'default' => '1',\n ),\n array(\n 'id' => 'show_postauthor',\n 'type' => 'switch',\n 'title' => __('Show post author in the header?', 'redux-framework-demo'),\n 'desc' => __('If you don\\'t want to show the post author in the header, below the title, disable it here!', 'redux-framework-demo'),\n \"default\" => 1,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'show_publishdate',\n 'type' => 'switch',\n 'title' => __('Show the publish date in the header?', 'redux-framework-demo'),\n 'desc' => __('If you don\\'t want to show the publish date in the header, below the title, disable it here!', 'redux-framework-demo'),\n \"default\" => 1,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'show_categories',\n 'type' => 'switch',\n 'title' => __('Show categories in the header?', 'redux-framework-demo'),\n 'desc' => __('If you don\\'t want to show the categories in the header, below the title, disable it here!', 'redux-framework-demo'),\n \"default\" => 1,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'show_share',\n 'type' => 'switch',\n 'title' => __('Show share options?', 'redux-framework-demo'),\n 'desc' => __('If you don\\'t want to show the share options, disable it here!', 'redux-framework-demo'),\n \"default\" => 1,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'show_related',\n 'type' => 'switch',\n 'title' => __('Show related posts?', 'redux-framework-demo'),\n 'desc' => __('If you don\\'t want to show related posts, disable it here!', 'redux-framework-demo'),\n \"default\" => 1,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'show_authorbox',\n 'type' => 'switch',\n 'title' => __('Show about author box?', 'redux-framework-demo'),\n 'desc' => __('If you don\\'t want to show the box with the author info, disable it here!', 'redux-framework-demo'),\n \"default\" => 1,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'show_navigationposts',\n 'type' => 'switch',\n 'title' => __('Show next / previous links?', 'redux-framework-demo'),\n 'desc' => __('If you don\\'t want to show the next / previous navigation links, disable them here!', 'redux-framework-demo'),\n \"default\" => 1,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n )\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-group',\n 'title' => __('Social Icons', 'redux-framework-demo'),\n 'desc' => 'The social icons show up on the header',\n 'fields' => array(\n array(\n 'id' => 'twitter_url',\n 'type' => 'text',\n 'title' => __('Twitter social URL', 'redux-framework-demo'),\n 'subtitle' => __('The link to your twitter profile. Make sure it starts with http://', 'redux-framework-demo'),\n 'default' => ''\n ),\n array(\n 'id' => 'facebook_url',\n 'type' => 'text',\n 'title' => __('Facebook social URL', 'redux-framework-demo'),\n 'subtitle' => __('The link to your facebook profile. Make sure it starts with http://', 'redux-framework-demo'),\n 'default' => ''\n ),\n array(\n 'id' => 'instagram_url',\n 'type' => 'text',\n 'title' => __('Instagram social URL', 'redux-framework-demo'),\n 'subtitle' => __('The link to your instagram profile. Make sure it starts with http://', 'redux-framework-demo'),\n 'default' => ''\n ),\n array(\n 'id' => 'flickr_url',\n 'type' => 'text',\n 'title' => __('Flickr social URL', 'redux-framework-demo'),\n 'subtitle' => __('The link to your flickr profile. Make sure it starts with http://', 'redux-framework-demo'),\n 'default' => ''\n ),\n array(\n 'id' => 'dribbble_url',\n 'type' => 'text',\n 'title' => __('Dribbble social URL', 'redux-framework-demo'),\n 'subtitle' => __('The link to your dribbble profile. Make sure it starts with http://', 'redux-framework-demo'),\n 'default' => ''\n ),\n array(\n 'id' => 'googleplus_url',\n 'type' => 'text',\n 'title' => __('GooglePlus social URL', 'redux-framework-demo'),\n 'subtitle' => __('The link to your google-plus profile. Make sure it starts with http://', 'redux-framework-demo'),\n 'default' => ''\n ),\n\n array(\n 'id' => 'pinterest_url',\n 'type' => 'text',\n 'title' => __('Pinterest social URL', 'redux-framework-demo'),\n 'subtitle' => __('The link to your pinterest profile. Make sure it starts with http://', 'redux-framework-demo'),\n 'default' => ''\n ),\n array(\n 'id' => 'linkedin_url',\n 'type' => 'text',\n 'title' => __('LinkedIn social URL', 'redux-framework-demo'),\n 'subtitle' => __('The link to your LinkedIn profile. Make sure it starts with http://', 'redux-framework-demo'),\n 'default' => ''\n ),\n\n array(\n 'id' => 'youtube_url',\n 'type' => 'text',\n 'title' => __('Youtube social URL', 'redux-framework-demo'),\n 'subtitle' => __('The link to your Youtube profile. Make sure it starts with http://', 'redux-framework-demo'),\n 'default' => ''\n ),\n\n array(\n 'id' => 'skype_url',\n 'type' => 'text',\n 'title' => __('Skype username', 'redux-framework-demo'),\n 'subtitle' => __('The skype username, in case you want to let your visitors contact you', 'redux-framework-demo'),\n 'default' => ''\n ),\n )\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-scissors',\n 'title' => __('Customization', 'redux-framework-demo'),\n 'fields' => array(\n array(\n 'id' => 'overlay-color',\n 'type' => 'color',\n 'title' => __('Overlay color(darkens the images)', 'redux-framework-demo'),\n 'subtitle' => __('Pick a background color for the overlay that shows up over all the images.', 'redux-framework-demo'),\n 'default' => '#000',\n 'validate' => 'color',\n ),\n array(\n 'id' => 'overlay-percentage',\n 'type' => 'text',\n 'title' => __('Overlay percentage(how much to darken the images? default 25%)', 'redux-framework-demo'),\n 'subtitle' => __('Use just 0-100 values, in percentages. 0% means no overlay, the image will stay as the original, while 100 means the image will be fully hidden by the overlay.', 'redux-framework-demo'),\n 'default' => '25'\n ),\n array(\n 'id' => 'tracking-code',\n 'type' => 'textarea',\n 'title' => __('Tracking Code', 'redux-framework-demo'),\n 'subtitle' => __('Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.', 'redux-framework-demo'),\n ),\n array(\n 'id' => 'custom-css',\n 'type' => 'ace_editor',\n 'title' => __('CSS Code', 'redux-framework-demo'),\n 'subtitle' => __('Paste your customization CSS code here.', 'redux-framework-demo'),\n 'mode' => 'css',\n 'theme' => 'monokai',\n 'default' => \"\"\n ),\n array(\n 'id' => 'menu-font',\n 'type' => 'typography',\n 'title' => __('Typography for menu items', 'redux-framework-demo'),\n //'compiler' => true, // Use if you want to hook in your own CSS compiler\n 'google' => true, // Disable google fonts. Won't work if you haven't defined your google api key\n 'font-backup' => true, // Select a backup non-google font in addition to a google font\n 'font-style' => false, // Includes font-style and weight. Can use font-style or font-weight to declare\n 'subsets' => true, // Only appears if google is true and subsets not set to false\n //'font-size' => false,\n 'line-height' => false,\n 'color' => false,\n 'all_styles' => false, // Enable all Google Font style/weight variations to be added to the page\n 'output' => array('.st-menu ul, .st-menu ul a, header .menu a'), // An array of CSS selectors to apply this font style to dynamically\n 'units' => 'px', // Defaults to px\n 'subtitle' => __('Typography module for the left menu.', 'redux-framework-demo'),\n 'default' => array(\n 'font-family' => 'Oswald',\n 'google' => true,\n 'font-size' => '12px'),\n ),\n array(\n 'id' => 'titles-font',\n 'type' => 'typography',\n 'title' => __('Typography for titles', 'redux-framework-demo'),\n 'google' => true, // Disable google fonts. Won't work if you haven't defined your google api key\n 'font-backup' => true, // Select a backup non-google font in addition to a google font\n 'font-style' => false, // Includes font-style and weight. Can use font-style or font-weight to declare\n 'subsets' => true, // Only appears if google is true and subsets not set to false\n 'font-size' => false,\n 'line-height' => false,\n 'color' => false,\n 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page\n 'output' => array('.homepage-articles article h2, .normal-slider article h2, .full-homepage .main-slider article h2, .full-homepage .sidebar-slider article h2, .homepage-post figure h3, .homepage-post figure h5, .related-posts .post-title, .post-section, .post-section h3, .category-section h1, header.image-header .content h1, header.image-header .content h4, .widget .title, .widget li .post-title, .widget li, .widget li a, .widget li p'), // An array of CSS selectors to apply this font style to dynamically\n //'compiler' => array('h2.site-description-compiler'), // An array of CSS selectors to apply this font style to dynamically\n 'units' => 'px', // Defaults to px\n 'subtitle' => __('Typography module for the post / widget / page titles.', 'redux-framework-demo'),\n 'default' => array(\n 'font-family' => 'Oswald',\n 'google' => true),\n ),\n array(\n 'id' => 'content-font',\n 'type' => 'typography',\n 'title' => __('Typography for post content / normal text', 'redux-framework-demo'),\n 'google' => true, // Disable google fonts. Won't work if you haven't defined your google api key\n 'font-backup' => true, // Select a backup non-google font in addition to a google font\n 'font-style' => false, // Includes font-style and weight. Can use font-style or font-weight to declare\n 'subsets' => true, // Only appears if google is true and subsets not set to false\n 'font-size' => false,\n 'line-height' => false,\n 'color' => false,\n 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page\n 'output' => array('.text-editor p, .author-single .contact, .author-single .content, .commentslist .contact, .commentslist .content, form input.form-control, form textarea, header .logo-extra, .author-section .contact, .author-section .contact a, .author-section .content, .widget.widget_teoaboutauthor .content, .textwidget, .text-editor'), // An array of CSS selectors to apply this font style to dynamically\n //'compiler' => array('h2.site-description-compiler'), // An array of CSS selectors to apply this font style to dynamically\n 'units' => 'px', // Defaults to px\n 'subtitle' => __('Typography module for the post content / normal text.', 'redux-framework-demo'),\n 'default' => array(\n 'font-family' => 'Vollkorn',\n 'google' => true),\n ),\n array(\n 'id' => 'slider-content-font',\n 'type' => 'typography',\n 'title' => __('Typography for the content in the sliders', 'redux-framework-demo'),\n 'google' => true, // Disable google fonts. Won't work if you haven't defined your google api key\n 'font-backup' => true, // Select a backup non-google font in addition to a google font\n 'font-style' => false, // Includes font-style and weight. Can use font-style or font-weight to declare\n 'subsets' => true, // Only appears if google is true and subsets not set to false\n 'font-size' => false,\n 'line-height' => false,\n 'color' => false,\n 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page\n 'output' => array('.normal-slider-wrap .slider-controls .counter, .normal-slider article p, .normal-slider article .article-link, .full-homepage .right-section .slider-controls .counter, .full-homepage .main-slider article p, .full-homepage .main-slider article .article-link, .full-homepage .sidebar-slider article .article-link'), // An array of CSS selectors to apply this font style to dynamically\n //'compiler' => array('h2.site-description-compiler'), // An array of CSS selectors to apply this font style to dynamically\n 'units' => 'px', // Defaults to px\n 'subtitle' => __('Typography module for the content in the sliders.', 'redux-framework-demo'),\n 'default' => array(\n 'font-family' => 'Lora',\n 'google' => true),\n ),\n array(\n 'id' => 'opt-hover-color',\n 'type' => 'color',\n 'output' => array('.st-menu ul li.active > a, .st-menu ul li.selected > a, .st-menu ul a:hover, .normal-slider-wrap .slider-controls button:hover, .full-homepage .right-section .slider-controls button:hover, .text-editor a, .textwidget a, .author-single .content a, .post-header .navigation a:hover, .post-header .navigation a:hover .text, header .menu a:hover, .widget li a:hover, .widget_calendar a, .author-single .name:hover, .post-share a:hover, .post-inside .tags a:hover, .related-posts .post-title:hover'),\n 'title' => __('Secondary color(used on hovers, links, buttons)', 'redux-framework-demo'),\n 'subtitle' => __('Pick a background color for the secondary color (default: #D7A25B).', 'redux-framework-demo'),\n 'default' => '#D7A25B',\n 'validate' => 'color',\n ),\n )\n );\n\n $theme_info = '<div class=\"redux-framework-section-desc\">';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-uri\">' . __('<strong>Theme URL:</strong> ', 'redux-framework-demo') . '<a href=\"' . $this->theme->get('ThemeURI') . '\" target=\"_blank\">' . $this->theme->get('ThemeURI') . '</a></p>';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-author\">' . __('<strong>Author:</strong> ', 'redux-framework-demo') . $this->theme->get('Author') . '</p>';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-version\">' . __('<strong>Version:</strong> ', 'redux-framework-demo') . $this->theme->get('Version') . '</p>';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-description\">' . $this->theme->get('Description') . '</p>';\n $tabs = $this->theme->get('Tags');\n if (!empty($tabs)) {\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-tags\">' . __('<strong>Tags:</strong> ', 'redux-framework-demo') . implode(', ', $tabs) . '</p>';\n }\n $theme_info .= '</div>';\n\n if (file_exists(dirname(__FILE__) . '/../README.md')) {\n $this->sections['theme_docs'] = array(\n 'icon' => 'el-icon-list-alt',\n 'title' => __('Documentation', 'redux-framework-demo'),\n 'fields' => array(\n array(\n 'id' => '17',\n 'type' => 'raw',\n 'markdown' => true,\n 'content' => file_get_contents(dirname(__FILE__) . '/../README.md')\n ),\n ),\n );\n }\n \n $this->sections[] = array(\n 'title' => __('Import / Export', 'redux-framework-demo'),\n 'desc' => __('Import and Export your Redux Framework settings from file, text or URL.', 'redux-framework-demo'),\n 'icon' => 'el-icon-refresh',\n 'fields' => array(\n array(\n 'id' => 'opt-import-export',\n 'type' => 'import_export',\n 'title' => 'Import Export',\n 'subtitle' => 'Save and restore your Redux options',\n 'full_width' => false,\n ),\n ),\n ); \n \n $this->sections[] = array(\n 'type' => 'divide',\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-info-sign',\n 'title' => __('Theme Information', 'redux-framework-demo'),\n 'desc' => __('<p class=\"description\">This is the Description. Again HTML is allowed</p>', 'redux-framework-demo'),\n 'fields' => array(\n array(\n 'id' => 'opt-raw-info',\n 'type' => 'raw',\n 'content' => $item_info,\n )\n ),\n );\n\n if (file_exists(trailingslashit(dirname(__FILE__)) . 'README.html')) {\n $tabs['docs'] = array(\n 'icon' => 'el-icon-book',\n 'title' => __('Documentation', 'redux-framework-demo'),\n 'content' => nl2br(file_get_contents(trailingslashit(dirname(__FILE__)) . 'README.html'))\n );\n }\n }", "title": "" }, { "docid": "efac1223af0fe3907358ab6a863b166c", "score": "0.58110905", "text": "public function setSections() {\n // Background Patterns Reader\n $sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/';\n $sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/';\n $sample_patterns = array();\n\n if (is_dir($sample_patterns_path)) :\n\n if ($sample_patterns_dir = opendir($sample_patterns_path)) :\n $sample_patterns = array();\n\n while (( $sample_patterns_file = readdir($sample_patterns_dir) ) !== false) {\n\n if (stristr($sample_patterns_file, '.png') !== false || stristr($sample_patterns_file, '.jpg') !== false) {\n $name = explode('.', $sample_patterns_file);\n $name = str_replace('.' . end($name), '', $sample_patterns_file);\n $sample_patterns[] = array('alt' => $name, 'img' => $sample_patterns_url . $sample_patterns_file);\n }\n }\n endif;\n endif;\n\n ob_start();\n\n $ct = wp_get_theme();\n $this->theme = $ct;\n $item_name = $this->theme->get('Name');\n $tags = $this->theme->Tags;\n $screenshot = $this->theme->get_screenshot();\n $class = $screenshot ? 'has-screenshot' : '';\n\n $customize_title = sprintf(__('Customize &#8220;%s&#8221;', 'azkaban_options'), $this->theme->display('Name'));\n \n ?>\n <div id=\"current-theme\" class=\"<?php echo esc_attr($class); ?>\">\n <?php if ($screenshot) : ?>\n <?php if (current_user_can('edit_theme_options')) : ?>\n <a href=\"<?php echo wp_customize_url(); ?>\" class=\"load-customize hide-if-no-customize\" title=\"<?php echo esc_attr($customize_title); ?>\">\n <img src=\"<?php echo esc_url($screenshot); ?>\" alt=\"<?php esc_attr_e('Current theme preview','azkaban'); ?>\" />\n </a>\n <?php endif; ?>\n <img class=\"hide-if-customize\" src=\"<?php echo esc_url($screenshot); ?>\" alt=\"<?php esc_attr_e('Current theme preview','azkaban'); ?>\" />\n <?php endif; ?>\n\n <h4><?php echo $this->theme->display('Name'); ?></h4>\n\n <div>\n <ul class=\"theme-info\">\n <li><?php printf(__('By %s', 'azkaban_options'), $this->theme->display('Author')); ?></li>\n <li><?php printf(__('Version %s', 'azkaban_options'), $this->theme->display('Version')); ?></li>\n <li><?php echo '<strong>' . __('Tags', 'azkaban_options') . ':</strong> '; ?><?php printf($this->theme->display('Tags')); ?></li>\n </ul>\n <p class=\"theme-description\"><?php echo $this->theme->display('Description'); ?></p>\n <?php\n if ($this->theme->parent()) {\n printf(' <p class=\"howto\">' . __('This <a href=\"%1$s\">child theme</a> requires its parent theme, %2$s.','azkaban') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'azkaban_options'), $this->theme->parent()->display('Name'));\n }\n ?>\n\n </div>\n </div>\n\n <?php\n $item_info = ob_get_contents();\n\n ob_end_clean();\n\n $sampleHTML = '';\n if (file_exists(dirname(__FILE__) . '/info-html.html')) {\n /** @global WP_Filesystem_Direct $wp_filesystem */\n global $wp_filesystem;\n if (empty($wp_filesystem)) {\n require_once(ABSPATH . '/wp-admin/includes/file.php');\n WP_Filesystem();\n }\n $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');\n }\n\n // ACTUAL DECLARATION OF SECTIONS\n $this->sections[] = array(\n 'icon' => 'el-icon-credit-card',\n 'title' => __('Homepage Settings', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'home_sidebar',\n 'type' => 'image_select',\n 'title' => __('Homepage Sidebar', 'azkaban_options'),\n 'desc' => __('Select full width, right sidebar or left sidebar layout.', 'azkaban_options'),\n 'options' => array(\n '1' => array('alt' => '1 Column', 'img' => ReduxFramework::$_url . 'assets/img/1col.png'),\n '2' => array('alt' => '2 Column Right', 'img' => ReduxFramework::$_url . 'assets/img/2cr.png'),\n '3' => array('alt' => '2 Column Left', 'img' => ReduxFramework::$_url . 'assets/img/2cl.png')\n ),\n 'default' => '2'\n ),\n array(\n 'id' => 'home_layout',\n 'type' => 'image_select',\n 'title' => __('Homepage Layout', 'azkaban_options'),\n 'desc' => __('Select homepage content layout.', 'azkaban_options'),\n 'options' => array(\n '1' => array('alt' => 'Home Layout 1', 'img' => ReduxFramework::$_url . 'assets/img/1bl.png'),\n '2' => array('alt' => 'Home Layout 1', 'img' => ReduxFramework::$_url . 'assets/img/2bl.png'),\n ),\n 'default' => '1'\n ),\n array(\n 'id' => 'layout2-categoriesleft',\n 'type' => 'select',\n 'required' => array('home_layout', '=', '2'),\n 'data' => 'categories',\n 'title' => __('Select Left Column Categories', 'azkaban_options'),\n 'desc' => __('Select the categories for left column posts.', 'azkaban_options'),\n ),\n array(\n 'id' => 'layout2-categoriesright',\n 'type' => 'select',\n 'required' => array('home_layout', '=', '2'),\n 'data' => 'categories',\n 'title' => __('Select Right Column Categories', 'azkaban_options'),\n 'desc' => __('Select the categories for right column posts.', 'azkaban_options'),\n ),\n /*\n array(\n 'id' => 'blog-layout',\n 'type' => 'select',\n 'title' => __('Select Blog Layout', 'azkaban_options'),\n 'desc' => __('Select site wide blog layout.', 'azkaban_options'),\n 'options' => array(\n '1' => 'Large Featured',\n '2' => 'Medium Featured',\n '3' => 'Grid',\n ),\n 'default' => '1'\n ),\n */\n ),\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-credit-card',\n 'title' => __('Topbar Settings', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'show_topbar',\n 'type' => 'switch',\n 'title' => __('Show Topbar', 'azkaban_options'),\n 'desc' => __('Enable or disable topbar.', 'azkaban_options'),\n 'default' => 0,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'topbar_left_content',\n 'type' => 'select',\n 'required' => array('show_topbar', '=', '1'),\n 'title' => __('Top Bar Left Content', 'azkaban_options'),\n 'subtitle' => false,\n 'desc' => __('Select which content displays in the top left area of the top bar.', 'azkaban_options'),\n 'options' => array(\n '1' => 'Contact Info',\n '2' => 'Navigation',\n '3' => 'Social Links',\n '4' => 'Leave Empty'\n ),\n 'default' => '1',\n ),\n array(\n 'id' => 'topbar_right_content',\n 'type' => 'select',\n 'required' => array('show_topbar', '=', '1'),\n 'title' => __('Top Bar Right Content', 'azkaban_options'),\n 'subtitle' => false,\n 'desc' => __('Select which content displays in the top right area of the top bar.', 'azkaban_options'),\n 'options' => array(\n '1' => 'Contact Info',\n '2' => 'Navigation',\n '3' => 'Social Links',\n '4' => 'Leave Empty'\n ),\n 'default' => '2',\n ),\n array(\n 'id' => 'topbar_phone',\n 'type' => 'text',\n 'required' => array('show_topbar', '=', '1'),\n 'title' => __('Topbar Phone Number', 'azkaban_options'),\n 'desc' => __('Phone number will display in the Contact Info section of your topbar.', 'azkaban_options'),\n 'validate' => 'no_html',\n 'default' => 'Call Us Today! 1.234.567.890',\n ),\n array(\n 'id' => 'topbar_email',\n 'type' => 'text',\n 'required' => array('show_topbar', '=', '1'),\n 'title' => __('Topbar Email Address', 'azkaban_options'),\n 'desc' => __('Email address will display in the Contact Info section of your topbar.', 'azkaban_options'),\n 'validate' => 'no_html',\n 'default' => 'info@yourdomain.com',\n ),\n array(\n 'id' => 'topbar_background_styles',\n 'type' => 'background',\n 'required' => array('show_topbar', '=', '1'),\n 'output' => array('#az-topbarwrap'),\n 'title' => __('Top Bar Background', 'azkaban_options'),\n 'desc' => __('Specify the top bar background properties including image, color, etc.', 'azkaban_options'),\n //'default' => '#FFFFFF',\n ),\n ),\n );\n\n\n $this->sections[] = array(\n 'icon' => 'el-icon-cogs',\n 'title' => __('Header Settings', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'header_layout',\n 'type' => 'image_select',\n 'title' => __('Select Header Layout', 'azkaban_options'),\n 'options' => array(\n '1' => array(\n 'alt' => '1 Column',\n 'img' => ReduxFramework::$_url.'assets/img/header1.jpg'\n ),\n '2' => array(\n 'alt' => '2 Column Left',\n 'img' => ReduxFramework::$_url.'assets/img/header2.jpg'\n ),\n '3' => array(\n 'alt' => '2 Column Left',\n 'img' => ReduxFramework::$_url.'assets/img/header3.jpg'\n ),\n '4' => array(\n 'alt' => '2 Column Right',\n 'img' => ReduxFramework::$_url.'assets/img/header4.jpg'\n ),\n ),\n 'default' => '1'\n ),\n array(\n 'id' => 'custom_logo_img',\n 'type' => 'media',\n 'url' => true,\n 'title' => __('Upload Logo', 'azkaban_options'),\n //'mode' => false, // Can be set to false to allow any media type, or can also be set to any mime type.\n 'desc' => __('To upload or select an existing image click on \"Upload\" button.', 'azkaban_options'),\n 'default' => array('url' => get_stylesheet_directory_uri() .'/images/logo.png'),\n ),\n\t\t\t\t\tarray(\n 'id' => 'custom_logo_text',\n 'type' => 'text',\n 'required' => array('custom_logo_type', '=', 'logo_text'),\n 'title' => __('Add Logo Text', 'azkaban_options'),\n 'desc' => __('Enter the text for Logo.', 'azkaban_options'),\n 'validate' => 'no_html',\n 'default' => 'Insert Logo custom text here',\n ),\n\t\t\t\t\tarray(\n 'id' => 'custom_logo_type',\n 'type' => 'radio',\n 'title' => __('Select Logo type', 'azkaban_options'),\n 'options' => array(\n 'logo_img' => 'Logo type Image', \n 'logo_text' => 'Logo type Text'\n ),\n 'default' => 'logo_img'\n ),\n\t\t\t\t\tarray(\n 'id' => 'custom_favicon_img',\n 'type' => 'media',\n 'url' => true,\n 'title' => __('Upload Favicon', 'azkaban_options'),\n //'mode' => false, // Can be set to false to allow any media type, or can also be set to any mime type.\n 'desc' => __('To upload or select an existing image click on \"Upload\" button.', 'azkaban_options'),\n 'default' => array('url' => get_stylesheet_directory_uri() .'/images/logo.png'),\n ),\n array(\n 'id' => 'header_tagline',\n 'type' => 'text',\n 'required' => array('header_layout', '=', '2'),\n 'title' => __('Header Tagline', 'azkaban_options'),\n 'desc' => __('Enter the text for header tagline.', 'azkaban_options'),\n 'validate' => 'no_html',\n 'default' => 'Insert Any Headline Or Link You Want Here',\n ),\n array(\n 'id' => 'header_ad_code',\n 'type' => 'textarea',\n 'required' => array('header_layout', '=', '3'),\n 'title' => __('Banner Ad Code', 'azkaban_options'),\n 'desc' => __('Enter text or banner ad code. Banner size 468X60.', 'azkaban_options'),\n //'validate' => 'html',\n 'default' => ''\n ),\n \n array(\n 'id' => 'header_background_style',\n 'type' => 'background',\n 'output' => array('#az-headerwrap'),\n 'title' => __('Header Background', 'azkaban_options'),\n 'desc' => __('Specify the header background properties including image, color, etc.', 'azkaban_options'),\n //'default' => '#FFFFFF',\n ),\n array(\n 'id' => 'header_padding_top',\n 'type' => 'text',\n 'title' => __('Header Padding Top', 'azkaban_options'),\n 'desc' => __('Specify the header top padding (without any unit, eg: 10 for 10px).', 'azkaban_options'),\n 'validate' => 'numeric',\n 'default' => '0',\n ),\n array(\n 'id' => 'header_padding_bottom',\n 'type' => 'text',\n 'title' => __('Header Padding Bottom', 'azkaban_options'),\n 'desc' => __('Specify the header bottom padding (without any unit, eg: 10 for 10px).', 'azkaban_options'),\n 'validate' => 'numeric',\n 'default' => '0',\n ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'show_main_menu',\n\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t'title' => __('Show/Hide main navigation', 'azkaban_options'),\n\t\t\t\t\t\t'desc' => __('Show or Hide Main Navigation', 'azkaban_options'),\n\t\t\t\t\t\t'default' => 'on',\n\t\t\t\t\t\t'on' => 'Enabled',\n\t\t\t\t\t\t'off' => 'Disabled',\n\t\t\t\t\t),\n ),\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-cogs',\n 'title' => __('Page Title Bar Settings', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'show_titlebar',\n 'type' => 'switch',\n 'title' => __('Show Page Title Bar', 'azkaban_options'),\n 'desc' => __('This is a global option for every page or post, and this can be overridden by individual page/post options.', 'azkaban_options'),\n 'default' => 1,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'site_title',\n 'type' => 'text',\n 'required' => array('show_titlebar', '=', '1'),\n 'title' => __('Site Title', 'azkaban_options'),\n 'desc' => __('This will display as the title on home page', 'azkaban_options'),\n 'default' => 'Home'\n ),\n array(\n 'id' => 'site_subtitle',\n 'type' => 'text',\n 'required' => array('show_titlebar', '=', '1'),\n 'title' => __('Site Subtitle', 'azkaban_options'),\n 'desc' => __('This will display as the subtitle on home page', 'azkaban_options'),\n 'default' => ''\n ),\n array(\n 'id' => 'page_titlebar_height',\n 'type' => 'text',\n 'required' => array('show_titlebar', '=', '1'),\n 'title' => __('Page Title Bar Height', 'azkaban_options'),\n 'desc' => __('In pixels, ex: 10px', 'azkaban_options'),\n 'default' => ''\n ),\n array(\n 'id' => 'page_titlebar_background_style',\n 'type' => 'background',\n 'required' => array('show_titlebar', '=', '1'),\n 'output' => array('#az-pagetitlewrap'),\n 'title' => __('Page Title Bar Background', 'azkaban_options'),\n 'desc' => __('Specify the page title bar background properties including image, color, etc.', 'azkaban_options'),\n //'default' => '#FFFFFF',\n ),\n array(\n 'id' => 'page_titlebar_typography_styles',\n 'type' => 'typography',\n 'output' => array('.az-sectiontitle'),\n 'title' => __('Page Title Bar Font', 'nandonik_options'),\n 'subtitle' => __('Specify the font styles for page title bar.', 'nandonik_options'),\n 'google' => true,\n 'font-backup' => true,\n ),\n array(\n 'id' => 'breadcrumb_divider',\n 'type' => 'section',\n 'required' => array('show_titlebar', '=', '1'),\n 'title' => __('Breadcrumb Settings', 'azkaban_options'),\n 'indent' => false,\n ),\n array(\n 'id' => 'enable_breadcrumbs',\n 'type' => 'switch',\n 'required' => array('show_titlebar', '=', '1'),\n 'title' => __('Display Breadcrumbs/Search Bar', 'azkaban_options'),\n 'default' => true,\n 'desc' => __('Show breadcrumbs or search bar on page title bar.', 'azkaban_options'),\n ),\n /*\n array(\n 'id' => 'breadcrumb_prefix',\n 'type' => 'text',\n 'required' => array('show_titlebar', '=', '1'),\n 'title' => __('Breadcrumb Prefix', 'azkaban_options'),\n 'desc' => __('This text will display before the breadcrumb menu.', 'azkaban_options'),\n 'default' => ''\n ),\n */\n array(\n 'id' => 'breadcrumb_typography_styles',\n 'type' => 'typography',\n 'output' => array('#az-breadcrumb'),\n 'title' => __('Breadcrumb Font', 'azkaban_options'),\n 'subtitle' => __('Specify the font styles for breadcrumbs.', 'azkaban_options'),\n 'google' => true,\n 'font-backup' => true,\n ),\n ),\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-slideshare',\n 'title' => __('Slider Settings', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'show_slider',\n 'type' => 'switch',\n 'title' => __('Show Slider', 'azkaban_options'),\n 'subtitle' => __('Enable or disable slider on front page', 'azkaban_options'),\n 'default' => 0,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'slider_type',\n 'type' => 'select',\n 'required' => array('show_slider', '=', '1'),\n 'title' => __('Slider Type', 'azkaban_options'),\n //Must provide key => value pairs for select options\n 'options' => array(\n '1' => 'Flex Slider', \n '2' => 'Layer Slider',\n\t\t\t\t\t\t\t'3' => 'Revolution Slider', \n ),\n 'default' => '1'\n ),\n \n array(\n 'id' => 'homepage_slider',\n 'type' => 'switch',\n 'required' => array('show_slider', '=', '1'),\n 'title' => __('Frontpage Only', 'azkaban_options'),\n 'subtitle' => __('Enable to show slider on front page only', 'azkaban_options'),\n 'default' => 1,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'slider_caption',\n 'type' => 'switch',\n 'required' => array('slider_type', '=', '1'),\n 'title' => __('Show Slides Caption', 'azkaban_options'),\n 'default' => 1,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n \n array(\n 'id' => 'flexi_animation',\n 'type' => 'select',\n 'required' => array('slider_type', '=', '1'),\n 'title' => __('Animation Effect', 'azkaban_options'),\n //Must provide key => value pairs for select options\n 'options' => array(\n 'fade' => 'Fade', \n 'slideV' => 'Slide Vertical', \n 'slideH' => 'Slide Horizontal'\n ),\n 'default' => 'fade'\n ),\n array(\n 'id' => 'flexi_slideshow_speed',\n 'type' => 'slider',\n 'required' => array('slider_type', '=', '1'),\n 'title' => __('Slideshow Speed', 'azkaban_options'),\n 'default' => 3000,\n 'min' => 100,\n 'step' => 100,\n 'max' => 40000,\n 'display_value' => 'text'\n ),\n array(\n 'id' => 'flexi_animation_speed',\n 'type' => 'slider',\n 'required' => array('slider_type', '=', '1'),\n 'title' => __('Animation Speed', 'azkaban_options'),\n 'default' => 3000,\n 'min' => 100,\n 'step' => 100,\n 'max' => 40000,\n 'display_value' => 'text'\n ),\n array(\n 'id' => 'slider_number',\n 'type' => 'text',\n 'required' => array('slider_type', '=', '1'),\n 'title' => __('Number Of Posts To Show', 'azkaban_options'),\n 'subtitle' => false,\n 'desc' => __('Enter the number of posts to be shown on slider.', 'azkaban_options'),\n 'validate' => 'numeric',\n 'default' => '5',\n ),\n array(\n 'id' => 'slider_query_type',\n 'type' => 'radio',\n 'required' => array('slider_type', '=', '1'),\n 'title' => __('Query Type', 'azkaban_options'),\n //Must provide key => value pairs for radio options\n 'options' => array(\n 'category' => 'Category', \n 'selected_posts' => 'Selected Posts', \n 'selected_pages' => 'Selected Pages', \n //'custom' => 'Custom Slides', \n ),\n 'default' => 'category'\n ),\n array(\n 'id' => 'slider_categories',\n 'type' => 'select',\n 'required' => array('slider_query_type', '=', 'category'),\n 'data' => 'categories',\n 'multi' => true,\n 'title' => __('Category', 'azkaban_options'),\n ),\n array(\n 'id' => 'slider_posts',\n 'type' => 'text',\n 'required' => array('slider_query_type', '=', 'selected_posts'),\n 'title' => __('Selected Posts IDs', 'azkaban_options'),\n 'desc' => __('Enter the post IDs separated by comma.', 'azkaban_options'),\n 'validate' => 'numeric',\n ),\n array(\n 'id' => 'slider_pages',\n 'type' => 'text',\n 'required' => array('slider_query_type', '=', 'selected_pages'),\n 'title' => __('Selected Page IDs', 'azkaban_options'),\n 'desc' => __('Enter the page IDs separated by comma.', 'azkaban_options'),\n 'validate' => 'numeric',\n ),\n \n array(\n 'id' => 'layerslider_id',\n 'type' => 'text',\n 'required' => array('slider_type', '=', '2'),\n 'title' => __('Layer Slider ID', 'azkaban_options'),\n 'subtitle' => false,\n 'desc' => __('Enter the Layer Slider ID you want to enable.', 'azkaban_options'),\n 'validate' => 'numeric',\n 'default' => '',\n ),\n\t\t\t\t\tarray(\n 'id' => 'revolutionslider_id',\n 'type' => 'text',\n 'required' => array('slider_type', '=', '3'),\n 'title' => __('Revolution alias name', 'azkaban_options'),\n 'subtitle' => false,\n 'desc' => __('Enter the Revolution alias name you want to enable.', 'azkaban_options'),\n 'default' => '',\n ),\n ),\n );\n\n\n $this->sections[] = array(\n 'icon' => 'el-icon-laptop',\n 'title' => __('Blog Settings', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'single_layout',\n 'type' => 'image_select',\n 'title' => __('Single Post Layout', 'azkaban_options'),\n 'subtitle' => __('Select single post content and sidebar alignment. Choose between full width, right sidebar or left sidebar layout.', 'azkaban_options'),\n 'options' => array(\n '1' => array('alt' => '1 Column', 'img' => ReduxFramework::$_url . 'assets/img/1col.png'),\n '2' => array('alt' => '2 Column Right', 'img' => ReduxFramework::$_url . 'assets/img/2cr.png'),\n '3' => array('alt' => '2 Column Left', 'img' => ReduxFramework::$_url . 'assets/img/2cl.png')\n ),\n 'default' => '2'\n ),\n array(\n 'id' => 'archive_layout',\n 'type' => 'image_select',\n 'title' => __('Archive Page Layout', 'azkaban_options'),\n 'subtitle' => __('Select Archive (e.g. Category archives, Date archives, Tag archives, etc.), 404, Search pages content and sidebar alignment. Choose between full width, right sidebar or left sidebar layout.', 'azkaban_options'),\n 'options' => array(\n '1' => array('alt' => '1 Column', 'img' => ReduxFramework::$_url . 'assets/img/1col.png'),\n '2' => array('alt' => '2 Column Right', 'img' => ReduxFramework::$_url . 'assets/img/2cr.png'),\n '3' => array('alt' => '2 Column Left', 'img' => ReduxFramework::$_url . 'assets/img/2cl.png')\n ),\n 'default' => '2'\n ),\n array(\n 'id' => 'enable_featuredimage',\n 'type' => 'switch',\n 'title' => __('Featured Image', 'azkaban_options'),\n 'default' => true,\n 'desc' => __('Show or hide featured image on top of single posts.', 'azkaban_options'),\n ),\n array(\n 'id' => 'enable_author',\n 'type' => 'switch',\n 'title' => __('Post Author', 'azkaban_options'),\n 'default' => true,\n 'desc' => __('If you enable this option, the Author Name will be added to the postmetadata box. The author\\'s name will be displayed as specified under <strong>Users -> Your Profile Display</strong> name publicly as field and linking it to the author\\'s page.', 'azkaban_options'),\n ),\n array(\n 'id' => 'enable_postdate',\n 'type' => 'switch',\n 'title' => __('Post Date', 'azkaban_options'),\n 'default' => true,\n 'desc' => __('Show or hide date on post meta section.', 'azkaban_options'),\n ),\n array(\n 'id' => 'enable_postcategory',\n 'type' => 'switch',\n 'title' => __('Post Category', 'azkaban_options'),\n 'default' => true,\n 'desc' => __('Show or hide post category on post meta section.', 'azkaban_options'),\n ),\n array(\n 'id' => 'enable_tags',\n 'type' => 'switch',\n 'title' => __('Post Tags', 'azkaban_options'),\n 'default' => true,\n 'desc' => __('Show or hide post tags on single post pages.', 'azkaban_options'),\n ),\n array(\n 'id' => 'enable_excerpt',\n 'type' => 'switch',\n 'title' => __('Excerpt', 'azkaban_options'),\n 'default' => 1,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n 'desc' => __('Show or hide excerpt on Archive (e.g. Category archives, Date archives, Tag archives, etc.), 404, Search pages.', 'azkaban_options'),\n ),\n array(\n 'id' => 'readmore_text',\n 'type' => 'text',\n 'required' => array('enable_excerpt', '=', '1'),\n 'title' => __('Read More Button', 'azkaban_options'),\n 'desc' => __('Enter the text for Read More button link.', 'azkaban_options'),\n 'validate' => 'no_html',\n 'default' => 'Read More',\n 'desc' => __('Example: Read More or More Details or More...', 'azkaban_options'),\n ),\n array(\n 'id' => 'enable_prevnext',\n 'type' => 'switch',\n 'title' => __('Previous/Next Links', 'azkaban_options'),\n 'default' => true,\n 'desc' => __('Show or hide previous/next links on single posts.', 'azkaban_options'),\n ),\n array(\n 'id' => 'enable_author_details',\n 'type' => 'switch',\n 'title' => __('Author Details', 'azkaban_options'),\n 'default' => true,\n 'desc' => __('Show or hide author details on single posts.', 'azkaban_options'),\n ),\n ),\n );\n \n \n $this->sections[] = array(\n 'icon' => 'el-icon-laptop',\n 'title' => __('Page Settings', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'page_layout',\n 'type' => 'image_select',\n 'title' => __('Page Layout', 'azkaban_options'),\n 'desc' => __('Select page content and sidebar alignment. Choose between full width, right sidebar or left sidebar layout.', 'azkaban_options'),\n 'options' => array(\n '1' => array('alt' => '2 Column Right', 'img' => ReduxFramework::$_url . 'assets/img/2cr.png'),\n '2' => array('alt' => '2 Column Left', 'img' => ReduxFramework::$_url . 'assets/img/2cl.png')\n ),\n 'default' => '1'\n ),\n array(\n 'id' => 'show_comments_on_pages',\n 'type' => 'switch',\n 'title' => __('Comments', 'azkaban_options'),\n 'default' => false,\n 'desc' => __('Show or hide comments on pages.', 'azkaban_options'),\n ),\n ),\n );\n \n $this->sections[] = array(\n 'icon' => 'el-icon-laptop',\n 'title' => __('Contact Page Settings', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'contactpage_layout',\n 'type' => 'image_select',\n 'title' => __('Contact Page Layout', 'azkaban_options'),\n 'subtitle' => __('Select contact page content and sidebar alignment. Choose between full width, right sidebar or left sidebar layout.', 'azkaban_options'),\n 'options' => array(\n '1' => array('alt' => '1 Column', 'img' => ReduxFramework::$_url . 'assets/img/1col.png'),\n '2' => array('alt' => '2 Column Right', 'img' => ReduxFramework::$_url . 'assets/img/2cr.png'),\n '3' => array('alt' => '2 Column Left', 'img' => ReduxFramework::$_url . 'assets/img/2cl.png')\n ),\n 'default' => '2'\n ),\n array(\n 'id' => 'contact_email',\n 'type' => 'text',\n 'title' => __('Email Address', 'azkaban_options'),\n 'default' => 'info@yourdomain.com',\n 'desc' => __('Enter the email address the form will be sent to.', 'azkaban_options'),\n ),\n\n ),\n );\n \n $this->sections[] = array(\n 'icon' => 'el-icon-idea',\n 'title' => __('Ad Settings', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'enable_sidebar_top_ad',\n 'type' => 'switch',\n 'title' => __('Enable Sidebar Top Ad', 'azkaban_options'),\n 'subtitle' => __('Enable or Disable advertisement on sidebar top.', 'azkaban_options'),\n 'default' => 0,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'sidebar_top_ad_code',\n 'required' => array('enable_sidebar_top_ad', '=', '1'),\n 'type' => 'textarea',\n 'title' => __('Sidebar Top Ad Code', 'azkaban_options'),\n 'subtitle' => __('Enter text or banner ad code', 'azkaban_options'),\n 'desc' => __('Banner size 336X280 or 300X250 or 250X250.', 'azkaban_options'),\n 'validate' => 'html',\n 'default' => ''\n ),\n\n array(\n 'id' => 'enable_sidebar_bottom_ad',\n 'type' => 'switch',\n 'title' => __('Enable Sidebar Bottom Ad', 'azkaban_options'),\n 'subtitle' => __('Enable or Disable advertisement on sidebar top.', 'azkaban_options'),\n 'default' => 0,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'sidebar_bottom_ad_code',\n 'required' => array('enable_sidebar_bottom_ad', '=', '1'),\n 'type' => 'textarea',\n 'title' => __('Sidebar Bottom Ad Code', 'azkaban_options'),\n 'subtitle' => __('Enter text or banner ad code', 'azkaban_options'),\n 'desc' => __('Banner size 336X280 or 300X250 or 250X250.', 'azkaban_options'),\n 'validate' => 'html',\n 'default' => ''\n )\n )\n );\n \n\n $this->sections[] = array(\n 'icon' => 'el-icon-hand-down',\n 'title' => __('Footer Settings', 'azkaban_options'),\n 'fields' => array(\n\n array(\n 'id' => 'footer_text',\n 'type' => 'textarea',\n 'title' => __('Footer Text', 'azkaban_options'),\n 'subtitle' => __('Enter text to be shown on footer', 'azkaban_options'),\n 'validate' => 'html',\n 'default' => 'Copyright 2015-2016 <a href=\"http://PixelThemeStudio.ca/\">PixelThemeStudio.ca</a> - All rights reserved'\n ),\n array(\n 'id' => 'show_wp_link_in_footer',\n 'type' => 'switch',\n 'title' => __('Show WordPress Credit Link', 'azkaban_options'),\n 'subtitle' => __('Enable or Disable \"Powered by WordPress\" link in footer', 'azkaban_options'),\n 'default' => 0,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'show_entries_rss_in_footer',\n 'type' => 'switch',\n 'title' => __('Show Entries RSS link', 'azkaban_options'),\n 'subtitle' => __('Enable or Disable Entries RSS link in footer', 'azkaban_options'),\n 'default' => 0,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'show_comments_rss_in_footer',\n 'type' => 'switch',\n 'title' => __('Show Comments RSS Link', 'azkaban_options'),\n 'subtitle' => __('Enable or Disable Comments RSS link in footer', 'azkaban_options'),\n 'default' => 0,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n array(\n 'id' => 'show_footer_social_icons',\n 'type' => 'switch',\n 'title' => __('Social Icons', 'azkaban_options'),\n 'default' => 1,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n\n array(\n 'id' => 'section_footer_style',\n 'type' => 'section',\n 'title' => __('Footer Style', 'azkaban_options'),\n 'indent' => false\n ),\n array(\n 'id' => 'footer_background_styles',\n 'type' => 'background',\n 'output' => array('#az-footerwrap'),\n 'title' => __('Footer Background', 'azkaban_options'),\n 'subtitle' => __('Specify the footer background properties including image, color, etc.', 'azkaban_options'),\n //'default' => '#FFFFFF',\n ),\n array(\n 'id' => 'footer_border_style',\n 'type' => 'border',\n 'title' => __('Footer Border Style', 'azkaban_options'),\n 'subtitle' => __('Specify the footer border properties', 'azkaban_options'),\n 'output' => array('#az-footerwrap'),\n 'all' => false,\n ),\n array(\n 'id' => 'footer_typography_styles',\n 'type' => 'typography',\n 'output' => array('#az-footer p'),\n 'title' => __('Footer Font', 'azkaban_options'),\n 'subtitle' => __('Specify the footer font properties.', 'azkaban_options'),\n 'google' => true,\n 'font-backup' => true,\n ),\n array(\n 'id' => 'footer_link_color',\n 'type' => 'link_color',\n 'output' => array('#az-footer a'),\n 'title' => __('Footer Links Color', 'azkaban_options'),\n 'subtitle' => __('Specify the footer link color properties', 'azkaban_options'),\n ),\n array(\n 'id' => 'footer_padding',\n 'type' => 'spacing',\n 'output' => array('#az-footerwrap'),\n 'mode' => 'padding',\n //'all' => true,\n //'top' => false,\n 'right' => false,\n //'bottom' => false,\n 'left' => false,\n 'units' => 'px',\n 'units_extended'=> 'false',\n 'display_units' => 'false',\n 'title' => __('Footer Padding', 'azkaban_options'),\n 'subtitle' => __('Specify the footer top and bottom padding.', 'azkaban_options'),\n 'default' => array(\n 'padding-top' => '0px', \n 'padding-bottom' => '0px', \n )\n ),\n\n array(\n 'id' => 'section_footer_widgets',\n 'type' => 'section',\n 'title' => __('Footer Widgets Settings', 'azkaban_options'),\n 'indent' => false\n ),\n array(\n 'id' => 'footer_widgets_layout',\n 'type' => 'image_select',\n 'title' => __('Footer Widgets Layout', 'azkaban_options'),\n 'subtitle' => __('Select layout for footer widgets area.', 'azkaban_options'),\n 'options' => array(\n '1' => array('alt' => '4 Columns', 'img' => ReduxFramework::$_url . 'assets/img/4fw-2.png'),\n '2' => array('alt' => '4 Columns', 'img' => ReduxFramework::$_url . 'assets/img/4fw.png'),\n '3' => array('alt' => '3 Columns', 'img' => ReduxFramework::$_url . 'assets/img/3fw.png')\n ),\n 'default' => '1'\n ),\n \n array(\n 'id' => 'section_footer_widgets_style',\n 'type' => 'section',\n 'title' => __('Footer Widgets Style', 'azkaban_options'),\n 'indent' => false\n ),\n array(\n 'id' => 'footerwidget_background_styles',\n 'type' => 'background',\n 'output' => array('#az-footerwidgetwrap, #az-footerwidgets .widget_title span'),\n 'title' => __('Footer Widget Background', 'azkaban_options'),\n 'subtitle' => __('Specify the footer widget background properties including image, color, etc.', 'azkaban_options'),\n ),\n array(\n 'id' => 'footerwidget_border_style',\n 'type' => 'border',\n 'title' => __('Footer Widget Border Style', 'azkaban_options'),\n 'subtitle' => __('Specify the footer widget border properties', 'azkaban_options'),\n 'output' => array('#az-footerwidgetwrap'),\n 'all' => false,\n ),\n array(\n 'id' => 'footerwidget_heading_styles',\n 'type' => 'typography',\n 'output' => array('#az-footerwidgets h2'),\n 'title' => __('Footer Widget Heading Font', 'azkaban_options'),\n 'subtitle' => __('Specify the footer widget heading font properties.', 'azkaban_options'),\n 'google' => true,\n 'font-backup' => true,\n ),\n array(\n 'id' => 'footerwidget_typography_styles',\n 'type' => 'typography',\n 'output' => array('#az-footerwidgets'),\n 'title' => __('Footer Widget Font', 'azkaban_options'),\n 'subtitle' => __('Specify the footer widget font properties.', 'azkaban_options'),\n 'google' => true,\n 'font-backup' => true,\n ),\n array(\n 'id' => 'footerwidget_link_color',\n 'type' => 'link_color',\n 'output' => array('#az-footerwidgets a'),\n 'title' => __('Footer Widget Links Color', 'azkaban_options'),\n 'subtitle' => __('Specify the footer widget link color properties', 'azkaban_options'),\n ),\n array(\n 'id' => 'footer_widget_padding',\n 'type' => 'spacing',\n 'output' => array('#az-footerwidgetwrap'),\n 'mode' => 'padding',\n //'all' => true,\n //'top' => false,\n 'right' => false,\n //'bottom' => false,\n 'left' => false,\n 'units' => 'px',\n 'units_extended'=> 'false',\n 'display_units' => 'false',\n 'title' => __('Footer Widget Padding', 'azkaban_options'),\n 'subtitle' => __('Specify the footer widget top and bottom padding.', 'azkaban_options'),\n 'default' => array(\n 'padding-top' => '0px', \n 'padding-bottom' => '0px', \n )\n ),\n\n )\n );\n \n $this->sections[] = array(\n 'icon' => 'el-icon-hand-down',\n 'title' => __('RSS and Social Networking', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'section_rss_feed_settings',\n 'type' => 'section',\n 'title' => __('RSS Feed Settings', 'azkaban_options'),\n 'indent' => false\n ),\n array(\n 'id' => 'hide_rss_icon',\n 'type' => 'switch',\n 'title' => __('Hide RSS Icon', 'azkaban_options'),\n 'default' => false,\n ),\n array(\n 'id' => 'rss_url',\n 'type' => 'text',\n 'title' => __('Custom Feed URL', 'azkaban_options'),\n 'default' => '',\n 'desc' => __('Example: http://feedburner.com/userid', 'azkaban_options'),\n ),\n\n array(\n 'id' => 'section_social_networking',\n 'type' => 'section',\n 'title' => __('Social Networking', 'azkaban_options'),\n 'indent' => false\n ),\n array(\n 'id' => 'facebook_url',\n 'type' => 'text',\n 'title' => __('Facebook URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'twitter_url',\n 'type' => 'text',\n 'title' => __('Twitter URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'google_url',\n 'type' => 'text',\n 'title' => __('Google+ URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'linkedin_url',\n 'type' => 'text',\n 'title' => __('LinkedIn URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'pinterest_url',\n 'type' => 'text',\n 'title' => __('Pinterest URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'youtube_url',\n 'type' => 'text',\n 'title' => __('YouTube URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'skype_url',\n 'type' => 'text',\n 'title' => __('Skype URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'instagram_url',\n 'type' => 'text',\n 'title' => __('Instagram URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'myspace_url',\n 'type' => 'text',\n 'title' => __('MySpace URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'dribbble_url',\n 'type' => 'text',\n 'title' => __('Dribbble URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'evernote_url',\n 'type' => 'text',\n 'title' => __('EverNote URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'flickr_url',\n 'type' => 'text',\n 'title' => __('Flickr URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'dropbox_url',\n 'type' => 'text',\n 'title' => __('Dropbox URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'picasa_url',\n 'type' => 'text',\n 'title' => __('Picasa Web URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'deviantart_url',\n 'type' => 'text',\n 'title' => __('DeviantArt URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'grooveshark_url',\n 'type' => 'text',\n 'title' => __('GrooveShark URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'vimeo_url',\n 'type' => 'text',\n 'title' => __('Vimeo URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'sharethis_url',\n 'type' => 'text',\n 'title' => __('ShareThis URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'digg_url',\n 'type' => 'text',\n 'title' => __('Digg URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'reddit_url',\n 'type' => 'text',\n 'title' => __('Reddit URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'delicious_url',\n 'type' => 'text',\n 'title' => __('Delicious URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'stumbleupon_url',\n 'type' => 'text',\n 'title' => __('StumbleUpon URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'friendfeed_url',\n 'type' => 'text',\n 'title' => __('FriendFeed URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'tumblr_url',\n 'type' => 'text',\n 'title' => __('Tumblr URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'blogger_url',\n 'type' => 'text',\n 'title' => __('Blogger URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'wordpress_url',\n 'type' => 'text',\n 'title' => __('Wordpress URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'yelp_url',\n 'type' => 'text',\n 'title' => __('Yelp URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'lastfm_url',\n 'type' => 'text',\n 'title' => __('Last.fm URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'apple_url',\n 'type' => 'text',\n 'title' => __('Apple URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'foursquare_url',\n 'type' => 'text',\n 'title' => __('FourSquare URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'github_url',\n 'type' => 'text',\n 'title' => __('Github URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'soundcloud_url',\n 'type' => 'text',\n 'title' => __('SoundCloud URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'spotify_url',\n 'type' => 'text',\n 'title' => __('Spotify URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'paypal_url',\n 'type' => 'text',\n 'title' => __('PayPal URL', 'azkaban_options'),\n ),\n array(\n 'id' => 'behance_url',\n 'type' => 'text',\n 'title' => __('Behance URL', 'azkaban_options'),\n ),\n )\n );\n \n $this->sections[] = array(\n 'icon' => 'el-icon-list-alt',\n 'title' => __('Advanced Settings', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'use_timthumb',\n 'type' => 'switch',\n 'title' => __('Enable TimThumb', 'azkaban_options'),\n 'default' => false,\n 'desc' => __('Enable timthumb to resize your images.', 'azkaban_options'),\n ),\n )\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-list-alt',\n 'title' => __('Code Embed Settings', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'header_embed_codes',\n 'type' => 'textarea',\n 'title' => __('Embed Codes on Header', 'azkaban_options'),\n 'desc' => __('Paste your Google Analytics or other tracking code here. It will be inserted just before the closing </head> tag.', 'azkaban_options'),\n ),\n array(\n 'id' => 'footer_embed_codes',\n 'type' => 'textarea',\n 'title' => __('Embed Codes on Footer', 'azkaban_options'),\n 'desc' => __('Paste any JS codes you want to be inserted in the footer. It will be inserted just before the closing </body> tag.', 'azkaban_options'),\n )\n )\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-website',\n 'title' => __('Typography Options', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'body_typography_styles',\n 'type' => 'typography',\n 'output' => array('body'),\n 'title' => __('Body Font Style', 'azkaban_options'),\n 'subtitle' => __('Specify the body font properties.', 'azkaban_options'),\n 'google' => true,\n 'font-backup' => true,\n ),\n array(\n 'id' => 'h1_typography_styles',\n 'type' => 'typography',\n 'output' => array('h1'),\n 'title' => __('Heading 1 Style', 'azkaban_options'),\n 'subtitle' => __('Specify the Heading 1 properties.', 'azkaban_options'),\n 'google' => true,\n 'units' => 'px',\n/* 'default' => array(\n 'color' => '#1a1a1a',\n 'font-style' => 'normal',\n 'font-family' => 'Oswald',\n 'font-weight' => '300',\n 'google' => true,\n 'font-size' => '1.6em',\n 'line-height' => '1.6em'\n ),\n*/ ),\n array(\n 'id' => 'h2_typography_styles',\n 'type' => 'typography',\n 'output' => array('h2'),\n 'title' => __('Heading 2 Style', 'azkaban_options'),\n 'subtitle' => __('Specify the Heading 2 properties.', 'azkaban_options'),\n 'google' => true,\n 'units' => 'px',\n/* 'default' => array(\n 'color' => '#1a1a1a',\n 'font-style' => 'normal',\n 'font-family' => 'Oswald',\n 'font-weight' => '300',\n 'google' => true,\n 'font-size' => '1.4em',\n 'line-height' => '1.4em'\n ),\n*/ ),\n array(\n 'id' => 'h3_typography_styles',\n 'type' => 'typography',\n 'output' => array('h3'),\n 'title' => __('Heading 3 Style', 'azkaban_options'),\n 'subtitle' => __('Specify the Heading 3 properties.', 'azkaban_options'),\n 'google' => true,\n 'units' => 'px',\n/* 'default' => array(\n 'color' => '#1a1a1a',\n 'font-style' => 'normal',\n 'font-family' => 'Oswald',\n 'font-weight' => '300',\n 'google' => true,\n 'font-size' => '1.3em',\n 'line-height' => '1.2em'\n ),\n*/ ),\n array(\n 'id' => 'sidebar_typography_styles',\n 'type' => 'typography',\n 'output' => array('#az-sidebar'),\n 'title' => __('Sidebar Font', 'azkaban_options'),\n 'subtitle' => __('Specify the sidebar font properties.', 'azkaban_options'),\n 'google' => true,\n 'font-backup' => true,\n ),\n )\n );\n \n $this->sections[] = array(\n 'icon' => 'el-icon-website',\n 'title' => __('Styling Options', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'body_background_styles',\n 'type' => 'background',\n 'output' => array('body'),\n 'title' => __('Body Background', 'azkaban_options'),\n 'subtitle' => __('Specify the body background properties including image, color, etc.', 'azkaban_options'),\n //'default' => '#FFFFFF',\n ),\n array(\n 'id' => 'link_color_styles',\n 'type' => 'link_color',\n 'output' => array('a'),\n 'title' => __('Links Color Option', 'azkaban_options'),\n 'subtitle' => __('Specify the link color styles.', 'azkaban_options'),\n ),\n array(\n 'id' => 'content_background_styles',\n 'type' => 'background',\n 'output' => array('#az-container, #az-FullContainer'),\n 'title' => __('Content Background', 'azkaban_options'),\n 'subtitle' => __('Specify the content background properties including image, color, etc.', 'azkaban_options'),\n //'default' => '#FFFFFF',\n ),\n array(\n 'id' => 'sidebar_background_styles',\n 'type' => 'background',\n 'output' => array('#az-sidebar'),\n 'title' => __('Sidebar Background', 'azkaban_options'),\n 'subtitle' => __('Specify the sidebar background properties including image, color, etc.', 'azkaban_options'),\n //'default' => '#FFFFFF',\n ),\n array(\n 'id' => 'sidebar_link_color',\n 'type' => 'link_color',\n 'output' => array('#az-sidebar a'),\n 'title' => __('Sidebar Links Color', 'azkaban_options'),\n 'subtitle' => __('Specify the sidebar link color properties', 'azkaban_options'),\n ),\n\t\t\t\t\tarray(\n 'id' => 'box_width',\n 'type' => 'switch',\n 'title' => __('Add box width', 'azkaban_options'),\n 'subtitle' => __('Enable or disable box width', 'azkaban_options'),\n 'default' => 0,\n 'on' => 'Enabled',\n 'off' => 'Disabled',\n ),\n\t\t\t\t\tarray(\n 'id' => 'header_box_background',\n 'type' => 'color',\n\t\t\t\t\t\t'required' => array('box_width', '=', '1'),\n 'title' => __('Header box background color', 'azkaban_options'),\n 'subtitle' => __('Specify the header box background color', 'azkaban_options'),\n 'default' => '#008080',\n ),\n\t\t\t\t\tarray(\n 'id' => 'body_box_background',\n 'type' => 'color',\n\t\t\t\t\t\t'required' => array('box_width', '=', '1'),\n 'title' => __('Body box background color', 'azkaban_options'),\n 'subtitle' => __('Specify the body box background color', 'azkaban_options'),\n 'default' => '#A52A2A2',\n ),\t\n array(\n 'id' => 'custom_css_embed',\n 'type' => 'textarea',\n //'compiler' => auto,\n 'title' => __('Custom CSS', 'azkaban_options'),\n 'subtitle' => __('Quickly add some custom CSS to the theme by adding it here.', 'azkaban_options'),\n 'desc' => __('CSS will be validated automatically!', 'azkaban_options'),\n //'validate' => 'css',\n ),\n )\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-cogs',\n 'title' => __('Navigation Styling', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'sitenav_typography_styles',\n 'type' => 'typography',\n 'output' => array('#az-navigationwrap, #az-navigationright, #az-navigation'),\n 'title' => __('Menu Font', 'azkaban_options'),\n 'google' => true,\n 'font-backup' => true,\n ),\n array(\n 'id' => 'sitenav_background_styles',\n 'type' => 'background',\n 'output' => array('#az-navigationwrap, #az-navigationright, #az-navigation'),\n 'title' => __('Menu Background', 'azkaban_options'),\n //'default' => '#FFFFFF',\n ),\n\n array(\n 'id' => 'sitenav-link',\n 'type' => 'color',\n 'title' => __('Top Level Link Color', 'azkaban_options'),\n 'output' => array('.nk-sitenav a, .nk-sitenavr a'),\n 'default' => '',\n 'validate' => 'color',\n ),\n array(\n 'id' => 'sitenav-linkhover',\n 'type' => 'color',\n 'title' => __('Top Level Link Hover Color', 'azkaban_options'),\n 'output' => array('.nk-sitenav li:hover > a, .nk-sitenav ul ul li:hover > a, .nk-sitenavr li:hover > a, .nk-sitenavr ul ul li:hover > a, .nk-sitenav li.current-menu-item a, .nk-sitenavr li.current-menu-item a'),\n 'default' => '',\n 'validate' => 'color',\n ),\n array(\n 'id' => 'sitenav-linkhoverbg',\n 'type' => 'background',\n 'title' => __('Top Level Link Hover Background Color', 'azkaban_options'),\n 'output' => array('.nk-sitenav li:hover > a, .nk-sitenav ul ul li:hover > a, .nk-sitenavr li:hover > a, .nk-sitenavr ul ul li:hover > a'),\n 'background-repeat' => false,\n 'background-size' => false,\n 'background-attachment' => false,\n 'background-position' => false,\n 'background-image' => false,\n 'default' => array(\n )\n ),\n\n array(\n 'id' => 'sitenav-sublevellink',\n 'type' => 'color',\n 'title' => __('Sub Level Link Color', 'azkaban_options'),\n 'output' => array('nk-sitenav ul ul a, .nk-sitenavr ul ul a, .nk-sitenav li.current-menu-item ul li a, .nk-sitenavr li.current-menu-item ul li a'),\n 'default' => '',\n 'validate' => 'color',\n ),\n array(\n 'id' => 'sitenav-sublevelbg',\n 'type' => 'background',\n 'title' => __('Sub Level Background Color', 'azkaban_options'),\n 'output' => array('.nk-sitenav ul ul, .nk-sitenavr ul ul, nk-sitenav ul ul li, .nk-sitenavr ul ul li'),\n 'background-repeat' => false,\n 'background-size' => false,\n 'background-attachment' => false,\n 'background-position' => false,\n 'background-image' => false,\n 'preview' => false,\n 'default' => array(\n )\n ),\n array(\n 'id' => 'sitenav-sublevelborder',\n 'type' => 'border',\n 'title' => __('Sub Level Border Style', 'azkaban_options'),\n 'output' => array('.nk-sitenav ul ul li, .nk-sitenavr ul ul li'),\n 'all' => false,\n 'default' => array(\n )\n ),\n\n array(\n 'id' => 'sitenav-sublevellinkhover',\n 'type' => 'color',\n 'title' => __('Sub Level Link Hover Color', 'azkaban_options'),\n 'output' => array('.nk-sitenav ul ul li a:hover, .nk-sitenavr ul ul li a:hover'),\n 'default' => '',\n 'validate' => 'color',\n ),\n array(\n 'id' => 'sitenav-sublevelhoverbg',\n 'type' => 'background',\n 'title' => __('Sub Level Link Hover Background Color', 'azkaban_options'),\n 'output' => array('.nk-sitenav ul ul li a:hover, .nk-sitenavr ul ul li a:hover'),\n 'background-repeat' => false,\n 'background-size' => false,\n 'background-attachment' => false,\n 'background-position' => false,\n 'background-image' => false,\n 'preview' => false,\n 'default' => array(\n )\n ),\n\n ),\n );\n \n $theme_info = '<div class=\"redux-framework-section-desc\">';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-uri\">' . __('<strong>Theme URL:</strong> ', 'azkaban_options') . '<a href=\"' . $this->theme->get('ThemeURI') . '\" target=\"_blank\">' . $this->theme->get('ThemeURI') . '</a></p>';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-author\">' . __('<strong>Author:</strong> ', 'azkaban_options') . $this->theme->get('Author') . '</p>';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-version\">' . __('<strong>Version:</strong> ', 'azkaban_options') . $this->theme->get('Version') . '</p>';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-description\">' . $this->theme->get('Description') . '</p>';\n $tabs = $this->theme->get('Tags');\n if (!empty($tabs)) {\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-tags\">' . __('<strong>Tags:</strong> ', 'azkaban_options') . implode(', ', $tabs) . '</p>';\n }\n $theme_info .= '</div>';\n\n // You can append a new section at any time.\n $this->sections[] = array(\n 'title' => __('Backup', 'azkaban_options'),\n 'desc' => __('Import and Export your theme settings from file, text or URL.', 'azkaban_options'),\n 'icon' => 'el-icon-refresh',\n 'fields' => array(\n array(\n 'id' => 'opt-import-export',\n 'type' => 'import_export',\n 'title' => 'Import Export',\n 'subtitle' => 'Save and restore your theme settings',\n 'full_width' => false,\n ),\n ),\n ); \n \n $this->sections[] = array(\n 'type' => 'divide',\n );\n\n $this->sections[] = array(\n 'icon' => 'el-icon-info-sign',\n 'title' => __('Theme Information', 'azkaban_options'),\n 'desc' => __('<p class=\"description\">Visit us at <a href=\"http://PixelThemeStudio.ca/\">PixelThemeStudio.ca</a></p>', 'azkaban_options'),\n 'fields' => array(\n array(\n 'id' => 'opt-raw-info',\n 'type' => 'raw',\n 'content' => $item_info,\n )\n ),\n );\n\n }", "title": "" }, { "docid": "1caf2bb886efd541b6e70977bfa45dbd", "score": "0.57997227", "text": "function wpupdate_themeSearchHTML($theme){\r\n\treturn \"&nbsp;<div class='themeinfo'>\r\n\t\t\t\t<span>\r\n\t\t\t\t\t<a href='{$theme['url']}' title='{$theme['name']}' target='_blank'>{$theme['name']}<br />\r\n\t\t\t\t\t<img src='{$theme['snapshot']['thumb']}' alt='{$theme['name']}' title='{$theme['name']}' /></a><br/>\r\n\t\t\t\t\t<a href='{$theme['testrun']}' target='_blank'>\".__('Test Run').\"</a> | <a href='\" . \r\n\t\t\t\t\t\t\twp_nonce_url('themes.php?page=wp-update/wp-update-themes-install.php&amp;url='.urlencode($theme['download']),'wpupdate-theme-install') . \r\n\t\t\t\t\t\"' target='_blank'>\".__('Install').\"</a>\r\n\t\t\t\t</span>\r\n\t\t\t</div>\\n\";\r\n}", "title": "" }, { "docid": "056be9fd79414c6587e21b52ca59925b", "score": "0.5798053", "text": "public function init() {\n\t\t// Change theme primary color\n\t\t$this->addOption('primaryColor', 'colour', array(\n\t\t\t'label' => 'plugins.themes.pragma.option.primaryColor.label',\n\t\t\t'description' => 'plugins.themes.pragma.option.primaryColor.description',\n\t\t\t'default' => '#A8DCDD',\n\t\t));\n\n\t\t$primaryColor = $this->getOption('primaryColor');\n\n\t\t$additionalLessVariables = [];\n\t\tif ($primaryColor !== '#A8DCDD') {\n\t\t\t$additionalLessVariables[] = '@primary-colour:' . $primaryColor . ';';\n\t\t\t$additionalLessVariables[] = '@secondary-colour: darken(@primary-colour, 50%);';\n\t\t}\n\n\t\t// Update contrast colour based on primary colour\n\t\tif ($this->isColourDark($this->getOption('primaryColor'))) {\n\t\t\t$additionalLessVariables[] = '\n\t\t\t\t@contrast-colour: rgba(255, 255, 255, 0.95);\n\t\t\t\t@secondary-contrast-colour: rgba(255, 255, 255, 0.75);\n\t\t\t\t@tertiary-contrast-colour: rgba(255, 255, 255, 0.65);\n\t\t\t';\n\t\t}\n\n\t\t$themeUrl = $this->getPluginPath();\n\t\t$additionalLessVariables[] = \"@themeUrl: '$themeUrl';\";\n\n\t\t// Add navigation menu areas for this theme\n\t\t$this->addMenuArea(array('primary', 'user'));\n\n\t\t// Adding styles (JQuery UI, Bootstrap, Tag-it)\n\t\t$this->addStyle('app-css', 'resources/dist/app.min.css');\n\t\t$this->addStyle('stylesheet', 'resources/less/import.less');\n\t\t$this->modifyStyle('stylesheet', array('addLessVariables' => join($additionalLessVariables)));\n\n\t\t// Fonts\n\t\t$this->addStyle(\n\t\t\t'fonts',\n\t\t\t'https://fonts.googleapis.com/css?family=Alegreya:400,400i,700,700i|Work+Sans:400,700',\n\t\t\tarray('baseUrl' => ''));\n\n\t\t// Adding scripts (JQuery, Popper, Bootstrap, JQuery UI, Tag-it, Theme's JS)\n\t\t$this->addScript('app-js', 'resources/dist/app.min.js');\n\n\t\t// Styles for HTML galleys\n\t\t$this->addStyle('htmlGalley', 'resources/less/import.less', array('contexts' => 'htmlGalley'));\n\t\t$this->modifyStyle('htmlGalley', array('addLessVariables' => join($additionalLessVariables)));\n\n\t\tHookRegistry::register ('TemplateManager::display', array($this, 'addSiteWideData'));\n\t\tHookRegistry::register ('TemplateManager::display', array($this, 'addIndexJournalData'));\n\t\tHookRegistry::register ('TemplateManager::display', array($this, 'checkCurrentPage'));\n\t}", "title": "" }, { "docid": "97a05cf8972746f0d6caf5bb3d1d1bfc", "score": "0.57942533", "text": "function description()\n\t{\n\t\treturn $this->config('description');\n\t}", "title": "" }, { "docid": "def44ec4a4a7f263c2aab866d3b13fc7", "score": "0.57676685", "text": "function action_init_theme()\n\t{\n\t\tFormat::apply( 'autop', 'post_content_out' );\n\t\t// Apply Format::autop() to comment content...\n\t\tFormat::apply( 'autop', 'comment_content_out' );\n\t\t// Apply Format::tag_and_list() to post tags... \n\t\tFormat::apply( 'tag_and_list', 'post_tags_out' );\n\t\t// Only uses the <!--more--> tag, with the 'more' as the link to full post\n\t\tFormat::apply_with_hook_params( 'more', 'post_content_out', 'more' );\n\t\t// Creates an excerpt option. echo $post->content_excerpt;\n\t\tFormat::apply( 'autop', 'post_content_excerpt');\n\t\tFormat::apply_with_hook_params( 'more', 'post_content_excerpt', '<span class=\"more\">Read more</span>', 150, 1 );\n\t\t// Excerpt for lead article\n\t\tFormat::apply( 'autop', 'post_content_lead');\n\t\tFormat::apply_with_hook_params( 'more', 'post_content_lead', '<span class=\"more\">Read more</span>', 400, 1 );\n\t\t\n\n\t\t// Apply Format::nice_date() to post date...\n\t\tFormat::apply( 'nice_date', 'post_pubdate_out', 'F j, Y' );\n\t\t// Apply Format::nice_time() to post date...\n\t\t//Format::apply( 'nice_time', 'post_pubdate_out', 'g:ia' );\n\t\t// Apply Format::nice_date() to comment date\n\t\tFormat::apply( 'nice_date', 'comment_date_out', 'F j, Y g:ia');\n\t}", "title": "" }, { "docid": "205c08bd440a47265ed932b275a1f5f4", "score": "0.5766605", "text": "public static function getDescription()\n {\n return str_replace('{TOOL_NAME}', \\Config::get('app.name'), static::$description);\n }", "title": "" }, { "docid": "f2ad13c703d47544ee5c36d9e39de32b", "score": "0.57651824", "text": "public function configureTheme() {\n /**\n * PCM temprory\n */\n $theme = Yii::app()->db->createCommand()\n ->select('*')\n ->from(\"conf_misc\")\n ->where(\"misc_type='general' AND param ='theme'\")\n ->queryRow();\n\n Yii::app()->params['theme'] = $theme['value'];\n\n if (Yii::app()->params['theme'] == 'dtech_second') {\n Yii::app()->theme = Yii::app()->params['theme'];\n Yii::app()->controller->layout = \"//layouts/column2\";\n Yii::app()->session['layout'] = Yii::app()->params['theme'];\n $this->slash = \"/\";\n }\n }", "title": "" }, { "docid": "e2b09e3cbefda4ee7999f55eb7f30177", "score": "0.57615817", "text": "public function themer() {\n // Add a CSS custom variable if theme colour is found in the config/settings.php\n if ( Helpers::$settings['cms']['themed'] ?? false ) {\n if ($themes = Helpers::$settings['cms']['theme'] ?? Helpers::$settings['themes'] ?? false) {\n $themes = is_array($themes) ? array_values($themes) : [$themes];\n Craft::$app->getView()->registerCss('html { --primary:'.($themes[0]).'; --secondary:'.($themes[1] ?? $themes[0]).' }');\n } elseif ($theme = Helpers::$settings['theme'] ?? false) {\n // Add a CSS custom variable if theme colour is found in the config/settings.php\n Craft::$app->getView()->registerCss('html { --primary:'.$theme.' }');\n }\n // If this is a multisite, include a settings file bespoke to the current site.\n $sites = Craft::$app->getSites();\n\n if ( count($sites->getAllSites()) > 1 ) {\n $current = $sites->getCurrentSite();\n Craft::$app->getView()->registerJs('var site = {name:\"'.$current->name.'\",handle:\"'.$current->handle.'\"}', \\yii\\web\\View::POS_HEAD);\n }\n }\n }", "title": "" }, { "docid": "42bf59f926674d102029b8ddf10580ae", "score": "0.5761436", "text": "function thijs_blogdescription() { ?>\n\n <div class=\"<?php global $cell_column_two; echo $cell_column_two; ?>\">\n <?php\n\t\t if (is_home() || is_front_page()) { ?>\r\n\t\t <h1 id=\"blog-description\"><?php bloginfo('description') ?></h1>\r\n\t\t <?php } else { ?>\t\r\n\t\t <div class=\"h2\" id=\"blog-description\"><?php bloginfo('description') ?></div>\r\n\t\t <?php \n\t } ?>\r\n </div><!-- .cell .column-two -->\n\n <?php }", "title": "" }, { "docid": "e43f43294e7b4617d8b1367a49e079dd", "score": "0.57502306", "text": "public function theme_head(){\n\n\t\techo '\t\t\n\t\t\t<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->\n\t\t\t<!-- WARNING: Respond.js doesn\\'t work if you view the page via file:// -->\n\t\t\t<!--[if lt IE 9]>\n\t\t\t<script src=\"https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js\"></script>\n\t\t\t<script src=\"https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js\"></script>\n\t\t\t<![endif]-->\n\t\t';\n\n\t}", "title": "" }, { "docid": "1ab327a5cc5ee9f3cf565f2a370fb2bb", "score": "0.57450616", "text": "function scratch_add_home_welcome(){\n generate_widget_area(HOME_WELCOME_KEY);\n}", "title": "" }, { "docid": "ae23de2e5d9b1f6798b31fad39810be0", "score": "0.5741868", "text": "function o2_create_description() {\n\t\t$content = '';\n\t\tif (o2_seo()) {\n \t\tif (is_single() || is_page() ) {\n \t\t if ( have_posts() ) {\n \t\t while ( have_posts() ) {\n \t\t the_post();\n\t\t\t\t\t\t\t\t\t\tif (o2_the_excerpt() == \"\") {\n \t\tif (o2_use_autoexcerpt()) {\n \t\t$content =\"\\t\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$content .= \"<meta name=\\\"description\\\" content=\\\"\";\n \t\t$content .= o2_excerpt_rss();\n \t\t$content .= \"\\\" />\";\n \t\t$content .= \"\\n\\n\";\n \t\t}\n \t\t} else {\n \t\tif (o2_use_excerpt()) {\n \t\t$content =\"\\t\";\n \t\t$content .= \"<meta name=\\\"description\\\" content=\\\"\";\n \t\t$content .= o2_the_excerpt();\n \t\t$content .= \"\\\" />\";\n \t\t$content .= \"\\n\\n\";\n \t\t}\n \t\t}\n \t\t}\n \t\t}\n \t\t} elseif ( is_home() || is_front_page() ) {\n \t\t$content =\"\\t\";\n \t\t$content .= \"<meta name=\\\"description\\\" content=\\\"\";\n \t\t$content .= get_bloginfo('description');\n \t\t$content .= \"\\\" />\";\n \t\t$content .= \"\\n\\n\";\n \t\t}\n \t\techo apply_filters ('o2_create_description', $content);\n\t\t}\n}", "title": "" }, { "docid": "b09cf0f3a61f02b55e10dc7fed6fb505", "score": "0.57412624", "text": "function envirabox_legecy_themes() {\n\n\t$legecy = array(\n\t\t'base',\n\t\t'captioned',\n\t\t'polaroid',\n\t\t'showcase',\n\t\t'sleek',\n\t\t'subtle',\n\t);\n\n\treturn $legecy;\n}", "title": "" }, { "docid": "418fbbbd12500105b8d5ab8634441bb4", "score": "0.57363313", "text": "function _dream_customizer_live_preview() {\n\t\t$dream_template_directory = get_template_directory_uri();\n\t\tif ( defined( 'FW' ) ) {\n\t\t\t$dream_version = fw()->theme->manifest->get_version();\n\t\t} else {\n\t\t\t$dream_version = '1.0';\n\t\t}\n\n\t\t// Load font-awesome stylesheet.\n\t\twp_enqueue_style( 'theme-style', $dream_template_directory . '/assets/css/dream.css', array( 'bootstrap' ), $dream_version . '.' . rand( 1, rand( 99, 999999999 ) ) );\n\t}", "title": "" }, { "docid": "5f36834741d7844c00c59b567034e671", "score": "0.5734934", "text": "public function intro() {\n echo \"I am {$this->name} and I wear a {$this->color} headband.\";\n }", "title": "" }, { "docid": "d58d32dc63f7765f3467fe3becb95eb9", "score": "0.5734219", "text": "public static function get_themes_list()\n {\n\n\t return apply_filters( 'es_get_themes_list', array(\n\t\t 'trendy' => array(\n\t\t\t 'link' => 'https://estatik.net/product/theme-trendy-estatik-pro/',\n\t\t\t 'image' => ES_ADMIN_IMAGES_URL . 'es_theme_trendy.png'\n\t\t ),\n\t\t 'native' => array(\n\t\t\t 'link' => 'https://estatik.net/?post_type=product&p=12&preview=true',\n\t\t\t 'image' => ES_ADMIN_IMAGES_URL . 'es_theme_native.png'\n\t\t )\n\t ) );\n }", "title": "" }, { "docid": "c5776ae7c79547f3f6ccc5173dce8a56", "score": "0.5726878", "text": "function yatri_customize_partial_blogname()\n{\n bloginfo('name');\n}", "title": "" }, { "docid": "0adecae17cd259003dd508bafd347475", "score": "0.5721707", "text": "public function pluginDetails()\n {\n return [\n 'name' => 'Mediathumb',\n 'description' => 'Twig filter for automatic thumbnail images for your media images.',\n 'author' => 'manogi',\n 'icon' => 'icon-compress'\n ];\n\n\n }", "title": "" }, { "docid": "2b20f6ec8660ff4552621eb6467bd97c", "score": "0.5714358", "text": "function getDescription() {\n\t\treturn __('plugins.schemas.mods.description');\n\t}", "title": "" }, { "docid": "231b981d93346dab3127fe6b94c5097f", "score": "0.57136154", "text": "function render_theme_stories() {\n\t$injector = Services::get_injector();\n\tif ( ! method_exists( $injector, 'make' ) ) {\n\t\treturn;\n\t}\n\n\t$customizer = $injector->make( Admin\\Customizer::class );\n\t//phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped\n\techo $customizer->render_stories();\n}", "title": "" }, { "docid": "18854d17b799ac9c1926a32129fe5ffb", "score": "0.5713122", "text": "function woocommerce_template_product_description() {\n \tglobal $product;\n \tif( $product->is_type('simple') ) {\n woocommerce_get_template( 'single-product/tabs/description.php' );\n}\n}", "title": "" }, { "docid": "cfaee329cd6125399bb039d816355a1d", "score": "0.5711459", "text": "function quotes_features() {\n add_theme_support('title-tag');\n}", "title": "" }, { "docid": "b5d7a3b21129ec8f74d62cacd6a0931d", "score": "0.5709939", "text": "function after_setup_theme() {\n\t\t\n\t\t// \n\t\t\n\t}", "title": "" }, { "docid": "cc4b2e1694e535633af1c679761c6a4e", "score": "0.5703782", "text": "public function credence_slug_setup() {\n\t\tadd_theme_support( 'title-tag' );\n\t}", "title": "" }, { "docid": "ee674db7db75270fe7ba8d1b7d58297a", "score": "0.5701575", "text": "public function getTheme();", "title": "" }, { "docid": "69b208352294f7fa566164e9c8576734", "score": "0.5691476", "text": "function themenamefunction_add_site_info() {\n\n\t\t$site_info = sprintf('© %s - %d | Todos os direitos reservados.', get_bloginfo('name'), date('Y'));\n\n\t\techo apply_filters( 'themenamefunction_site_info_content', $site_info ); // WPCS: XSS ok.\n\t}", "title": "" }, { "docid": "c131f128acf5393499cc16ca87c0a66f", "score": "0.56914747", "text": "function register_meta_description() {\n\tglobal $post;\n\n\tif ( is_singular() ) {\n\t\t$post_description = strip_tags( $post->post_excerpt );\n\t\t$post_description = mb_substr( $post_description, 0, 140, 'utf-8' );\n\t\techo '<meta name=\"description\" content=\"' . $post_description . '\">';\n\t}\n\n\tif( is_home() ) {\n\t\techo '<meta name=\"description\" content=\"' . get_bloginfo( 'description' ) . '\">';\n\t}\n\n\tif( is_category() ) {\n\t\t$cat_description = strip_tags( category_description() );\n\t\techo '<meta name=\"description\" content=\"' . $cat_description . '\">';\n\t}\n}", "title": "" }, { "docid": "7a4628bdf4cc3cbfaae77e62d87e2509", "score": "0.5691442", "text": "public function setSections() {\n // Background Patterns Reader\n $sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/';\n $sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/';\n $sample_patterns = array();\n\n if ( is_dir( $sample_patterns_path ) ) :\n\n if ( $sample_patterns_dir = opendir( $sample_patterns_path ) ) :\n $sample_patterns = array();\n\n while ( ( $sample_patterns_file = readdir( $sample_patterns_dir ) ) !== false ) {\n\n if ( stristr( $sample_patterns_file, '.png' ) !== false || stristr( $sample_patterns_file, '.jpg' ) !== false ) {\n $name = explode( '.', $sample_patterns_file );\n $name = str_replace( '.' . end( $name ), '', $sample_patterns_file );\n $sample_patterns[] = array(\n 'alt' => $name,\n 'img' => $sample_patterns_url . $sample_patterns_file\n );\n }\n }\n endif;\n endif;\n\n ob_start();\n\n $ct = wp_get_theme();\n $this->theme = $ct;\n $item_name = $this->theme->get( 'Name' );\n $tags = $this->theme->Tags;\n $screenshot = $this->theme->get_screenshot();\n $class = $screenshot ? 'has-screenshot' : '';\n\n $customize_title = sprintf( __( 'Customize &#8220;%s&#8221;', 'redux-framework-demo' ), $this->theme->display( 'Name' ) );\n\n ?>\n <div id=\"current-theme\" class=\"<?php echo esc_attr( $class ); ?>\">\n <?php if ( $screenshot ) : ?>\n <?php if ( current_user_can( 'edit_theme_options' ) ) : ?>\n <a href=\"<?php echo wp_customize_url(); ?>\" class=\"load-customize hide-if-no-customize\"\n title=\"<?php echo esc_attr( $customize_title ); ?>\">\n <img src=\"<?php echo esc_url( $screenshot ); ?>\"\n alt=\"<?php esc_attr_e( 'Current theme preview', 'redux-framework-demo' ); ?>\"/>\n </a>\n <?php endif; ?>\n <img class=\"hide-if-customize\" src=\"<?php echo esc_url( $screenshot ); ?>\"\n alt=\"<?php esc_attr_e( 'Current theme preview', 'redux-framework-demo' ); ?>\"/>\n <?php endif; ?>\n\n <h4><?php echo $this->theme->display( 'Name' ); ?></h4>\n\n <div>\n <ul class=\"theme-info\">\n <li><?php printf( __( 'By %s', 'redux-framework-demo' ), $this->theme->display( 'Author' ) ); ?></li>\n <li><?php printf( __( 'Version %s', 'redux-framework-demo' ), $this->theme->display( 'Version' ) ); ?></li>\n <li><?php echo '<strong>' . __( 'Tags', 'redux-framework-demo' ) . ':</strong> '; ?><?php printf( $this->theme->display( 'Tags' ) ); ?></li>\n </ul>\n <p class=\"theme-description\"><?php echo $this->theme->display( 'Description' ); ?></p>\n <?php\n if ( $this->theme->parent() ) {\n printf( ' <p class=\"howto\">' . __( 'This <a href=\"%1$s\">child theme</a> requires its parent theme, %2$s.', 'redux-framework-demo' ) . '</p>', __( 'http://codex.wordpress.org/Child_Themes', 'redux-framework-demo' ), $this->theme->parent()->display( 'Name' ) );\n }\n ?>\n\n </div>\n </div>\n\n <?php\n $item_info = ob_get_contents();\n\n ob_end_clean();\n\n $sampleHTML = '';\n if ( file_exists( dirname( __FILE__ ) . '/info-html.html' ) ) {\n Redux_Functions::initWpFilesystem();\n\n global $wp_filesystem;\n\n $sampleHTML = $wp_filesystem->get_contents( dirname( __FILE__ ) . '/info-html.html' );\n }\n \n\n\n // ACTUAL DECLARATION OF SECTIONS\n $this->sections[] = array(\n 'title' => __( 'Global Settings', 'redux-framework-demo' ),\n 'desc' => __( '', 'redux-framework-demo' ),\n 'icon' => 'el-icon-home',\n // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!\n 'fields' => array(\n array(\n 'id' => 'cozy_logo',\n 'type' => 'media',\n 'url' => true,\n 'title' => __( 'Logo', 'cozy' ),\n 'compiler' => 'true',\n 'desc' => __( 'Please upload logo.', 'cozy' ),\n 'default' => array( 'url' => get_stylesheet_directory_uri().'/images/logo/logo.png'),\n ),\n array(\n 'id' => 'cozy_favicon',\n 'type' => 'media',\n 'url' => true,\n 'title' => __( 'Favicon', 'cozy' ),\n 'compiler' => 'true',\n 'desc' => __( 'Please upload favicon', 'cozy' ),\n 'default' => array( 'url' => get_stylesheet_directory_uri().'/images/fav_touch_icons/favicon.ico'),\n ),\n array(\n 'id' => 'cozy_apple_tc_icon',\n 'type' => 'media',\n 'url' => true,\n 'title' => __( 'Apple Touch Icon', 'cozy' ),\n 'compiler' => 'true',\n 'desc' => __( 'Please upload Apple Touch Icon', 'cozy' ),\n 'default' => array( 'url' => get_stylesheet_directory_uri().'/images/fav_touch_icons/apple-touch-icon.png'),\n ),\n array(\n 'id' => 'cozy_apple_tc_icon_md',\n 'type' => 'media',\n 'url' => true,\n 'title' => __( 'Apple Touch Icon ( medium )', 'cozy' ),\n 'compiler' => 'true',\n 'desc' => __( 'Please upload Apple Touch Icon (72x72)', 'cozy' ),\n 'default' => array( 'url' => get_stylesheet_directory_uri().'/images/fav_touch_icons/apple-touch-icon-72x72.png'),\n ),\n array(\n 'id' => 'cozy_apple_tc_icon_lg',\n 'type' => 'media',\n 'url' => true,\n 'title' => __( 'Apple Touch Icon ( large )', 'cozy' ),\n 'compiler' => 'true',\n 'desc' => __( 'Please upload Apple Touch Icon (114x114)', 'cozy' ),\n 'default' => array( 'url' => get_stylesheet_directory_uri().'/images/fav_touch_icons/apple-touch-icon-114x114.png'),\n ),\n array(\n 'id' => \"cozy_description\",\n 'type' => 'textarea',\n 'title' => __('Description', 'cozy'),\n 'default' => \"Cozy is a simple clean and modern WordPress Theme designed for Real Estate business. This theme has a lot of useful features and it's highly customizable so you can turn it into your own awesome website.\",\n ),\n array(\n 'id' => \"cozy_tracking_code\",\n 'type' => 'textarea',\n 'title' => __('Tracking Code', 'cozy'),\n ),\n \n ),\n );\n\n\n\n // Contact Section\n\n $this->sections[] = array(\n 'title' => __( 'Contact', 'cozy' ),\n 'desc' => __( '', 'cozy' ),\n 'icon' => 'el-icon-phone',\n // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!\n 'fields' => array(\n array(\n 'id' => \"section_contact_title\",\n 'type' => 'text',\n 'title' => __('Section Title', 'cozy'),\n 'default' => \"Contact Info\",\n ),\n\n array(\n 'id' => \"section_contact_address\",\n 'type' => 'text',\n 'title' => __('Address', 'cozy'),\n 'default' => \"24th Street, New York, USA\",\n ),\n\n array(\n 'id' => \"section_contact_email\",\n 'type' => 'text',\n 'title' => __('Contact Email', 'cozy'),\n 'default' => \"hello@yourcompany.com\",\n ),\n\n array(\n 'id' => \"section_contact_phone\",\n 'type' => 'text',\n 'title' => __('Contact Number', 'cozy'),\n 'default' => \"Phone: 800-123-4567\",\n ),\n\n array(\n 'id' => \"section_contact_fax\",\n 'type' => 'text',\n 'title' => __('Contact Number', 'cozy'),\n 'default' => \"Fax: 00351 456 789 101\",\n ),\n\n array(\n 'id' => \"contact_map_lat\",\n 'type' => 'text',\n 'title' => __('Google Map Latitude', 'cozy'),\n 'default' => \"26.596433\",\n ),\n\n array(\n 'id' => \"contact_map_long\",\n 'type' => 'text',\n 'title' => __('Google Map Longitude', 'cozy'),\n 'default' => \"-98.451481\",\n ),\n ),\n );\n\n\n\n //Search Section\n \n\n $this->sections[] = array(\n 'icon' => 'el el-search',\n 'title' => __( 'Home Search Section', 'cozy' ),\n 'fields' => array(\n\n array(\n 'id' => 'section_search_heading',\n 'type' => 'text',\n 'title' => __('Section Heading', 'cozy'),\n 'default' => \"Find The Perfect Home\",\n ),\n\n array(\n 'id' => 'section_search_heading2',\n 'type' => 'text',\n 'title' => __('Section Heading 2', 'cozy'),\n 'default' => \"With Cozy Real Estate HTML Template\",\n ),\n array(\n 'id' => 'section_search_bg',\n 'type' => 'media',\n 'url' => true,\n 'title' => __( 'Search Background', 'cozy' ),\n 'compiler' => 'true',\n 'desc' => __( 'Please upload .....', 'cozy' ),\n 'default' => array( 'url' => 'http://placehold.it/1920x800'),\n ),\n ),\n );\n\n\n //Action (Buy Now) Section\n\n $this->sections[] = array(\n 'icon' => 'el el-usd',\n 'title' => __( 'Buy Now', 'cozy' ),\n 'fields' => array(\n\n array(\n 'id' => 'section_action_display',\n 'type' => 'switch',\n 'title' => __('Display Section', 'cozy'),\n 'default' => true,\n ),\n\n array(\n 'id' => 'section_action_description',\n 'type' => 'textarea',\n 'title' => __('Section Description', 'cozy'),\n 'default' => \"Cozy - Real Estate Template it's Awesome!<br/>It offers you a lot of great features.\",\n ), \n\n array(\n 'id' => \"section_action_buy\",\n 'type' => 'text',\n 'title' => __('Action Button Text', 'cozy'),\n 'default' => \"Buy Now!\",\n ),\n\n array(\n 'id' => \"section_action_link\",\n 'type' => 'text',\n 'title' => __('Action Link', 'cozy'),\n 'default' => \"http://themeforest.net/user/WiselyThemes\",\n ),\n \n ),\n );\n\n\n\n //New Properties Section\n \n\n $this->sections[] = array(\n 'icon' => 'el el-map-marker-alt',\n 'title' => __( 'New Properties', 'cozy' ),\n 'fields' => array(\n \n array(\n 'id' => 'section_properties_info',\n 'type' => 'info',\n 'title' => __('Create a new post from <a href=\"' . site_url() . '/wp-admin/post-new.php?post_type=listing\">here</a> ', 'cozy'),\n 'style' => 'warning'\n ),\n\n array(\n 'id' => 'section_properties_display',\n 'type' => 'switch',\n 'title' => __('Display Section', 'cozy'),\n 'default' => true,\n ),\n \n array(\n 'id' => \"section_properties_title\",\n 'type' => 'text',\n 'title' => __('Section Title', 'cozy'),\n 'default' => \"New Properties Available\",\n ),\n\n array(\n 'id' => 'section_properties_number',\n 'type' => 'text',\n 'title' => __('How many posts to display?', 'cozy'),\n 'default' => \"9\",\n ), \n ),\n );\n\n\n\n // Property Gallery Section\n\n $this->sections[] = array(\n 'title' => __( 'Property Gallery', 'cozy' ),\n 'desc' => __( '', 'cozy' ),\n 'icon' => 'el el-picture',\n // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!\n 'fields' => array(\n\n array(\n 'id' => 'section_gallery_display',\n 'type' => 'switch',\n 'title' => __('Display Gallery Section', 'cozy'),\n 'default' => true,\n ),\n\n array(\n 'id' => \"section_gallery_title\",\n 'type' => 'text',\n 'title' => __('Section Title', 'cozy'),\n 'default' => \"Property Gallery\",\n ),\n\n array(\n 'id' => \"section_featured_properties_title\",\n 'type' => 'text',\n 'title' => __('Featured Properties Section Title', 'cozy'),\n 'default' => \"Featured Properties\",\n ),\n\n array(\n 'id' => \"section_recent_properties_title\",\n 'type' => 'text',\n 'title' => __('Recent Properties Section Title', 'cozy'),\n 'default' => \"Recent Properties\",\n ),\n\n array(\n 'id' => \"cozy_gallery_description\",\n 'type' => 'textarea',\n 'title' => __('Description', 'cozy'),\n 'default' => \"Pellentesque elementum libero enim, eget gravida nunc laoreet et. Nullam ac enim auctor, fringilla risus at, imperdiet turpis. Pellentesque elementum libero enim, eget gravida nunc laoreet et.\",\n ),\n array(\n 'id' => 'property_gallery_number',\n 'type' => 'text',\n 'title' => __('How many gallery image to display?', 'cozy'),\n 'default' => \"4\",\n ), \n array(\n 'id' => 'section_featured_properties_number',\n 'type' => 'text',\n 'title' => __('How many featured Properties to display?', 'cozy'),\n 'default' => \"3\",\n ), \n array(\n 'id' => 'section_recent_properties_number',\n 'type' => 'text',\n 'title' => __('How many Recent Property to display?', 'cozy'),\n 'default' => \"6\",\n ), \n ),\n );\n\n\n\n //Latest News Section\n \n\n $this->sections[] = array(\n 'icon' => 'el el-time',\n 'title' => __( 'Latest News', 'cozy' ),\n 'fields' => array(\n \n array(\n 'id' => 'section_feature_info',\n 'type' => 'info',\n 'title' => __('Create a new post from <a href=\"' . site_url() . '/wp-admin/post-new.php\">here</a> ', 'cozy'),\n 'style' => 'warning'\n ),\n\n array(\n 'id' => 'section_news_display',\n 'type' => 'switch',\n 'title' => __('Display Section', 'cozy'),\n 'default' => true,\n ),\n \n array(\n 'id' => \"section_news_title\",\n 'type' => 'text',\n 'title' => __('Section Title', 'cozy'),\n 'default' => \"Latest News\",\n ),\n\n array(\n 'id' => \"section_news_description\",\n 'type' => 'textarea',\n 'title' => __('Section Description', 'cozy'),\n 'default' => \"Pellentesque elementum libero enim, eget gravida nunc laoreet et. Nullam ac enim auctor, fringilla risus at, imperdiet turpis. Pellentesque elementum libero enim, eget gravida nunc laoreet et. \",\n ),\n\n array(\n 'id' => 'section_news_number',\n 'type' => 'text',\n 'title' => __('How many posts to display?', 'cozy'),\n 'default' => \"3\",\n ), \n ),\n );\n\n\n\n // Features Section\n \n\n $this->sections[] = array(\n 'icon' => 'el el-leaf',\n 'title' => __( 'Feature', 'cozy' ),\n 'fields' => array(\n \n array(\n 'id' => 'section_feature_info',\n 'type' => 'info',\n 'title' => __('Create a new feature from <a href=\"' . site_url() . '/wp-admin/post-new.php?post_type=feature\">here</a> ', 'cozy'),\n 'style' => 'warning'\n ),\n\n array(\n 'id' => 'section_feature_display',\n 'type' => 'switch',\n 'title' => __('Display Section', 'cozy'),\n 'default' => true,\n ),\n \n array(\n 'id' => \"section_feature_title\",\n 'type' => 'text',\n 'title' => __('Section Title', 'cozy'),\n 'default' => \"Template Features\",\n ),\n\n array(\n 'id' => 'section_feature_number',\n 'type' => 'text',\n 'title' => __('How many posts to display?', 'cozy'),\n 'default' => \"3\",\n ), \n\n array(\n 'id' => 'section_feature_number_grid',\n 'type' => 'text',\n 'title' => __('How many posts to display in home grid page?', 'cozy'),\n 'default' => \"4\",\n ),\n ),\n );\n\n\n\n // Service Section\n\n\n $this->sections[] = array(\n 'icon' => 'el el-list-alt',\n 'title' => __( 'Service', 'cozy' ),\n 'fields' => array(\n\n array(\n 'id' => 'section_service_info',\n 'type' => 'info',\n 'title' => __('Create a new service from <a href=\"' . site_url() . '/wp-admin/post-new.php?post_type=service\">here</a> ', 'cozy'),\n 'style' => 'warning'\n ),\n\n array(\n 'id' => 'section_service_display',\n 'type' => 'switch',\n 'title' => __('Display Section', 'cozy'),\n 'default' => true,\n ),\n\n array(\n 'id' => \"section_service_title\",\n 'type' => 'text',\n 'title' => __('Section Title', 'cozy'),\n 'default' => \"WORK WITH COZY REAL-ESTATE\",\n ),\n\n array(\n 'id' => 'section_service_number',\n 'type' => 'text',\n 'title' => __('How many posts to display?', 'cozy'),\n 'default' => \"3\",\n ),\n ),\n );\n\n // Our Partners Section\n\n $this->sections[] = array(\n 'title' => __( 'Our Partners', 'cozy' ),\n 'desc' => __( '', 'cozy' ),\n 'icon' => 'el el-group-alt',\n // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!\n 'fields' => array(\n array(\n 'id' => 'section_partners_display',\n 'type' => 'switch',\n 'title' => __('Display Section', 'cozy'),\n 'default' => true,\n ),\n\n array(\n 'id' => \"section_partners_title\",\n 'type' => 'text',\n 'title' => __('Section Title', 'cozy'),\n 'default' => \"Our Partners\",\n ),\n\n array(\n 'id' => 'opt_select_partners',\n 'type' => 'select',\n 'title' => __('Select Partners Page', 'cozy'), \n 'subtitle' => __('Select Our Partners Page to Display', 'cozy'),\n 'desc' => __('Please create a page with page template \"Our Partners\" and add some partner image then select that page here to display in section our partners.', 'cozy'),\n // Must provide key => value pairs for select options\n 'options' => wt_cozy_page_list( array( 'post_type' => 'page', 'numberposts' => -1 ) ),\n ),\n\n ),\n );\n\n // Our Agents Section\n\n $this->sections[] = array(\n 'title' => __( 'Our Agents', 'cozy' ),\n 'desc' => __( '', 'cozy' ),\n 'icon' => 'el el-user',\n // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!\n 'fields' => array(\n array(\n 'id' => 'section_agents_display',\n 'type' => 'switch',\n 'title' => __('Display Section', 'cozy'),\n 'default' => true,\n ),\n array(\n 'id' => \"section_agents_title\",\n 'type' => 'text',\n 'title' => __('Section Title', 'cozy'),\n 'default' => \"Our Agents\",\n ),\n array(\n 'id' => 'section_agents_number',\n 'type' => 'text',\n 'title' => __('How many agents to display?', 'cozy'),\n 'default' => \"4\",\n ), \n ),\n );\n\n\n // Grid Section\n\n $this->sections[] = array(\n 'title' => __( 'Grid Section', 'cozy' ),\n 'desc' => __( '', 'cozy' ),\n 'icon' => 'el el-th',\n // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!\n 'fields' => array(\n\n array(\n 'id' => 'section_grid_display',\n 'type' => 'switch',\n 'title' => __('Display Grid Section', 'cozy'),\n 'default' => true,\n ),\n array(\n 'id' => 'section_grid_number',\n 'type' => 'text',\n 'title' => __('How many posts to display in grid section?', 'cozy'),\n 'default' => \"15\",\n ), \n ),\n );\n\n\n //Newsletter\n \n\n $this->sections[] = array(\n 'icon' => 'el el-envelope',\n 'title' => __( 'Newsletter', 'cozy' ),\n 'fields' => array(\n\n array(\n 'id' => 'section_newsletter_display',\n 'type' => 'switch',\n 'title' => __('Display Newsletter', 'cozy'),\n 'default' => true,\n ),\n\n array(\n 'id' => \"section_newsletter_title\",\n 'type' => 'text',\n 'title' => __('Newsletter Title', 'cozy'),\n 'default' => \"NEWSLETTER\",\n ),\n\n array(\n 'id' => \"section_newsletter_title2\",\n 'type' => 'text',\n 'title' => __('Newsletter Title 2', 'cozy'),\n 'default' => \"SUBSCRIBE OUR\",\n ),\n\n array(\n 'id' => \"section_newsletter_description\",\n 'type' => 'textarea',\n 'title' => __('Newsletter Description', 'cozy'),\n 'default' => \"Lorem ipsum dolor sit amet, consectetur elit.\",\n ),\n\n array(\n 'id' => 'newsletter_bg',\n 'type' => 'media',\n 'url' => true,\n 'title' => __( 'Newsletter Background', 'cozy' ),\n 'compiler' => 'true',\n 'desc' => __( 'Please upload .....', 'cozy' ),\n 'default' => array( 'url' => 'http://placehold.it/1920x800'),\n ),\n \n ),\n );\n\n\n // Testimonial Section\n\n $this->sections[] = array(\n 'title' => __( 'Testimonial', 'cozy' ),\n 'desc' => __( '', 'cozy' ),\n 'icon' => 'el el-quote-right',\n // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!\n 'fields' => array(\n\n array(\n 'id' => 'section_testimonial_info',\n 'type' => 'info',\n 'title' => __('Create a new Testimonial from <a href=\"' . site_url() . '/wp-admin/post-new.php?post_type=testimonial\">here</a> ', 'cozy'),\n 'style' => 'warning'\n ),\n\n array(\n 'id' => 'section_testimonial_display',\n 'type' => 'switch',\n 'title' => __('Display Section', 'cozy'),\n 'default' => true,\n ),\n \n array(\n 'id' => 'section_testimonial_title',\n 'type' => 'text',\n 'validate' => '',\n 'title' => __( 'Section heading', 'cozy'),\n 'default' => 'Testimonials',\n ),\n\n array(\n 'id' => 'section_testimonial_number',\n 'type' => 'text',\n 'title' => __('How many posts to display?', 'cozy'),\n 'default' => \"3\",\n ),\n\n ),\n );\n\n\n // Home Map Page\n\n $this->sections[] = array(\n 'title' => __( 'Home Map Page', 'cozy' ),\n 'desc' => __( '', 'cozy' ),\n 'icon' => 'el el-map-marker',\n // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!\n 'fields' => array(\n\n array(\n 'id' => 'section_looking_for_display',\n 'type' => 'switch',\n 'title' => __('Display Grid Section', 'cozy'),\n 'default' => true,\n ),\n array(\n 'id' => \"section_looking_for_title\",\n 'type' => 'text',\n 'title' => __('Looking For Title', 'cozy'),\n 'default' => \"WHAT ARE YOU LOOKING FOR?\",\n ),\n array(\n 'id' => \"section_looking_for_description\",\n 'type' => 'textarea',\n 'title' => __('Looking For Description', 'cozy'),\n 'default' => \"Curabitur dignissim tortor ut scelerisque consectetur. Praesent pulvinar placerat lorem, et ultricies urna ultrices vel. Praesent eu libero a sapien adipiscing interdum feugiat id lectus.\",\n ),\n\n array(\n 'id' => 'section_why_choose_display',\n 'type' => 'switch',\n 'title' => __('Display Why Choose Us Section', 'cozy'),\n 'default' => true,\n ),\n \n array(\n 'id' => 'section_why_choose_title',\n 'type' => 'text',\n 'validate' => '',\n 'title' => __( 'Section Why Choose Us Heading', 'cozy'),\n 'default' => 'Why Choose Us?',\n ),\n\n array(\n 'id' => 'section_why_choose_number1',\n 'type' => 'text',\n 'title' => __(' ', 'cozy'),\n 'default' => \"1281\",\n ),\n array(\n 'id' => 'section_why_choose_text1',\n 'type' => 'text',\n 'title' => __(' ', 'cozy'),\n 'default' => \"Properties<br/>Rented\",\n ),\n array(\n 'id' => 'section_why_choose_number2',\n 'type' => 'text',\n 'title' => __(' ', 'cozy'),\n 'default' => \"426\",\n ),\n array(\n 'id' => 'section_why_choose_text2',\n 'type' => 'text',\n 'title' => __(' ', 'cozy'),\n 'default' => \"Residential<br/>Properties Sold\",\n ),\n array(\n 'id' => 'section_why_choose_number3',\n 'type' => 'text',\n 'title' => __(' ', 'cozy'),\n 'default' => \"179\",\n ),\n array(\n 'id' => 'section_why_choose_text3',\n 'type' => 'text',\n 'title' => __(' ', 'cozy'),\n 'default' => \"Commercial<br/>Properties Sold\",\n ),\n array(\n 'id' => 'section_why_choose_number4',\n 'type' => 'text',\n 'title' => __(' ', 'cozy'),\n 'default' => \"153\",\n ),\n array(\n 'id' => 'section_why_choose_text4',\n 'type' => 'text',\n 'title' => __(' ', 'cozy'),\n 'default' => \"Land<br/>Properties Sold\",\n ),\n array(\n 'id' => 'twitter_username',\n 'type' => 'text',\n 'title' => __('Twitter Username', 'cozy'),\n 'default' => \"Envato\",\n ),\n ),\n );\n\n\n // 404 Not Found Page\n\n $this->sections[] = array(\n 'title' => __( '404 Not Found Page', 'cozy' ),\n 'desc' => __( 'Content for 404 not found page', 'cozy' ),\n 'icon' => 'el el-error',\n // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!\n 'fields' => array(\n\n array(\n 'id' => 'not_found_title',\n 'type' => 'text',\n 'title' => __( '404 page title', 'cozy'),\n 'default' => 'Hey! Page not found.',\n ),\n\n array(\n\n 'id' => 'not_found_description',\n 'type' => 'textarea',\n 'title' => __( '404 page description', 'cozy'),\n 'default' => '<p><br/><br/>Sorry, but the page you requested could not be found. This page may have been moved, deleted or maybe you have mistyped the URL.</p> <p>Please, try again and make sure you have typed the URL correctly.</p>',\n ),\n ),\n );\n\n\n // Footer Section\n\n $this->sections[] = array(\n 'title' => __( 'Footer', 'cozy' ),\n 'desc' => __( '', 'cozy' ),\n 'icon' => 'el el-chevron-down',\n // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!\n 'fields' => array(\n\n array(\n 'id' => \"footer_copyright\",\n 'type' => 'text',\n 'title' => __('Copyright text', 'cozy'),\n 'default' => \"&copy; 2014 Cozy - Real Estate WordPress Theme. All rights reserved. Developed by <a href='http://www.wiselythemes.com' target='_blank'>WiselyThemes</a>\",\n ),\n\n array(\n 'id' => \"footer_facebook_link\",\n 'type' => 'text',\n 'title' => __('Facebook Link', 'cozy'),\n 'default' => \"http://www.facebook.com/wiselythemes\",\n ),\n\n array(\n 'id' => \"footer_twitter_link\",\n 'type' => 'text',\n 'title' => __('Twitter Link', 'cozy'),\n 'default' => \"http://www.twitter.com/wiselythemes\",\n ),\n\n array(\n 'id' => \"footer_googleplus_link\",\n 'type' => 'text',\n 'title' => __('Google Plus Link', 'cozy'),\n 'default' => \"http://plus.google.com/wiselythemes\",\n ),\n\n array(\n 'id' => \"footer_pinterest_link\",\n 'type' => 'text',\n 'title' => __('Pinterest Link', 'cozy'),\n 'default' => \"http://www.pinterest.com/wiselythemes\",\n ),\n\n array(\n 'id' => \"footer_youtube_link\",\n 'type' => 'text',\n 'title' => __('YouTube Link', 'cozy'),\n 'default' => \"http://www.youtube.com/user/wiselythemes\",\n ),\n\n array(\n 'id' => \"footer_feed_link\",\n 'type' => 'text',\n 'title' => __('Feed Link', 'cozy'),\n 'default' => \"#\",\n ),\n \n ),\n );\n\n\n\n // Import/Export Options\n\n $this->sections[] = array(\n 'title' => __( 'Import/Export', 'redux-framework-demo' ),\n 'desc' => __( '', 'redux-framework-demo' ),\n 'icon' => 'el-icon-edit',\n // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!\n 'fields' => array(\n\n array(\n 'id' => 'opt-import-export',\n 'type' => 'import_export',\n 'title' => 'Import Export',\n 'subtitle' => 'Save and restore your Redux options',\n 'full_width' => false,\n ),\n \n ),\n );\n \n\n\n /**\n * Note here I used a 'heading' in the sections array construct\n * This allows you to use a different title on your options page\n * instead of reusing the 'title' value. This can be done on any\n * section - kp\n */\n \n \n\n $theme_info = '<div class=\"redux-framework-section-desc\">';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-uri\">' . __( '<strong>Theme URL:</strong> ', 'redux-framework-demo' ) . '<a href=\"' . $this->theme->get( 'ThemeURI' ) . '\" target=\"_blank\">' . $this->theme->get( 'ThemeURI' ) . '</a></p>';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-author\">' . __( '<strong>Author:</strong> ', 'redux-framework-demo' ) . $this->theme->get( 'Author' ) . '</p>';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-version\">' . __( '<strong>Version:</strong> ', 'redux-framework-demo' ) . $this->theme->get( 'Version' ) . '</p>';\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-description\">' . $this->theme->get( 'Description' ) . '</p>';\n $tabs = $this->theme->get( 'Tags' );\n if ( ! empty( $tabs ) ) {\n $theme_info .= '<p class=\"redux-framework-theme-data description theme-tags\">' . __( '<strong>Tags:</strong> ', 'redux-framework-demo' ) . implode( ', ', $tabs ) . '</p>';\n }\n $theme_info .= '</div>';\n\n \n\n // You can append a new section at any time.\n \n\n \n\n $this->sections[] = array(\n 'type' => 'divide',\n );\n\n \n }", "title": "" }, { "docid": "837ef1ceb46243f023ce7272c932a1be", "score": "0.568448", "text": "function meta_description() {\n\t\t$ste_description_file = 'description.txt';\n\n\t\tif (file_exists($ste_description_file)) {\n\t\t\techo trim(file_get_contents($ste_description_file));\n\t\t}\n\t}", "title": "" }, { "docid": "3e58d2994946b2ceb59bb12f7367401a", "score": "0.5666431", "text": "function comeet_advanced_styles(){\n echo '<div class=\"card comeet_form_styles\" style=\"margin-bottom: 2em;\">';\n echo '<div class=\"comeet_option_title_wrap\"><h2 class=\"comeet_open_icon comeet_rotate_icon_left\" data-section=\"comeet_form_styles\">Styling</h2><span class=\"dashicons dashicons-arrow-right\"></span></div>';\n echo '<p>Styling options for the <a href=\"https://developers.comeet.com/reference/application-form-widget\">Application form</a> and <a href=\"https://developers.comeet.com/reference/social-widget\">Social sharing widget.</a></p>';\n }", "title": "" }, { "docid": "4f41cdc368d00fd3dda07cd1c5fdd364", "score": "0.5666279", "text": "function scr_add_dashboard_widgets() { wp_add_dashboard_widget('wp_dashboard_widget', 'Theme Details', 'scr_theme_info'); }", "title": "" }, { "docid": "7a7fc8063a8b4eba2f944a27dd88434d", "score": "0.5664045", "text": "function setup_theme() {\n\tdo_action( 'hnf_setup_theme' );\n}", "title": "" }, { "docid": "e15af2d5b2215ea94e73caac94f92c58", "score": "0.5662271", "text": "function cd_wc_product_subtitle() {\n\n\tglobal $post;\n\n\t$tone_type\t\t\t\t\t= get_the_terms( $post->ID, 'pa_tone-type');\n\t$brand \t\t\t\t\t= get_the_terms( $post->ID, 'pa_brand');\n\t$author \t\t\t\t\t= $post->post_author;\n\n\tif ($brand) {\n\t\t$brand_link = '<span class=\"brand title-h3 subtitle-attr\">'.attribute_loop($brand).'</span>';\n\t} else {\n\t\t$brand_link = '';\n\t}\n\tif ($tone_type) {\n\t\t$tone_link = '<span class=\"tone-type title-h3 subtitle-attr second-attr\">'.attribute_loop($tone_type).'</span>';\n\t} else {\n\t\t$tone_link = '';\n\t}\n\n\tif ( is_merchant_listing() ) {\n\t\t// daviesguitars.io/store/davies-guitars/\n\t\t$brand_link = '<span class=\"brand title-h3 subtitle-attr merchant-link\">'.get_store_url().'</span>';\n\t}\n\techo '<p class=\"product-subtitle\">'.$brand_link.$tone_link.'</p>';\n\n}", "title": "" }, { "docid": "ce798e93ec169c93070705821e9b3ce2", "score": "0.56488717", "text": "function customPageTitle($string) {\n return sprintf(__('Add theme &raquo; %s'), $string);\n}", "title": "" }, { "docid": "010b630ff02e07d40d45d80ef6647bf7", "score": "0.5647615", "text": "function my_customize_register() {\n\t\t global $wp_customize;\n\t\t echo ' <style type=\"text/css\">\n\n\t\t #accordion-section-header_image, #accordion-section-storefront_footer, #accordion-section-background_image, #accordion-section-storefront_typography,\n\t\t #accordion-section-storefront_buttons, #accordion-section-storefront_layout{\n\t\t display: none!important;\n\t\t }\n\t\t .wp-core-ui .button-primary-disabled, .wp-core-ui .button-primary.disabled, .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary[disabled] {\n\t\t color: white!important;\n\t\t background: #dc3232!important;\n\t\t border-color: #dc3232!important;}\n\t\t </style>\n\t\t ';\n\t\t }", "title": "" }, { "docid": "7c8dda43d463b0fa44633934287108e5", "score": "0.5642359", "text": "function theme_slug_setup() {\n add_theme_support( 'title-tag' );\n }", "title": "" }, { "docid": "7c8dda43d463b0fa44633934287108e5", "score": "0.5642359", "text": "function theme_slug_setup() {\n add_theme_support( 'title-tag' );\n }", "title": "" }, { "docid": "c44479c91bae2ae1ff382f485e4c37a7", "score": "0.56414616", "text": "public function intro() {\n echo \"The vegetable is {$this->name} and the color is {$this->color}.\";\n }", "title": "" }, { "docid": "26baa0a0445e653b8011ac21d6bf13b9", "score": "0.56305635", "text": "function yog() {\r\n\treturn Yog_Theme::instance();\r\n}", "title": "" }, { "docid": "f64d388e33a88c8bc7e36196b4a377ca", "score": "0.56199706", "text": "function title_theme_support(){\n add_theme_support('title-tag');\n add_theme_support('custom-logo');\n add_theme_support('post-thumbnails');\n }", "title": "" }, { "docid": "9e62428f9a2ebe432fdb356ebb06442e", "score": "0.56177187", "text": "function __construct() {\n $this->loadThemes();\n }", "title": "" }, { "docid": "8fbed7e6db64409669ddaebd4bd4d618", "score": "0.56130457", "text": "public function action_init_theme()\n\t{\n\t\tFormat::apply( 'autop', 'post_content_out' );\n\n\t\t// Apply Format::autop() to comment content:\n\t\tFormat::apply( 'autop', 'comment_content_out' );\n/*DELETE ME\n\t\tFormat::apply( 'nice_date', 'post_updated_date', 'F j, Y' );\n\t\tFormat::apply( 'nice_date', 'post_updated_time', 'g:ia' );\n\t\tFormat::apply( 'nice_date', 'post_pubdate_wday', 'l' ); \n\t\tFormat::apply( 'nice_date', 'post_pubdate_day', 'j' );\n\t\tFormat::apply( 'nice_date', 'post_pubdate_month', 'F' );\n\t\tFormat::apply( 'nice_date', 'post_pubdate_monthno', 'm' );\n\t\tFormat::apply( 'nice_date', 'post_pubdate_year', 'Y' );\n\t\tFormat::apply( 'nice_date', 'post_pubdate_time', 'g:ia' );\n\t\t// Apply Format::nice_date() to comment date:\n\t\tFormat::apply( 'nice_date', 'comment_date', 'F j, Y' );\n\t\tFormat::apply( 'nice_date', 'comment_time', 'g:ia' );\n/DELETEME */\n\n\t\t// Apply Format::tag_and_list() to post tags...\n\t\tFormat::apply( 'tag_and_list', 'post_tags_out' );\n\t\t// Truncate content excerpt at \"more\" or 56 characters:\n\t\t//Format::apply_with_hook_params( 'more', 'post_content_excerpt','',600, 0 );\n\n\t\t//Initial options\n\t\t$configured= ( Options::get('darkautumn__configured' ) ? true : false);\n\t\tif ( ! $configured ){\n\t\t\t$this->set_default_options();\n\t\t}\n\t}", "title": "" }, { "docid": "726a8f29c4ad1160f915c3ebd1badd0a", "score": "0.56100446", "text": "public function about_screen() {\n\t\t?>\n\t\t<div class=\"wrap about-wrap\">\n\n\t\t\t<?php $this->intro(); ?>\n\n\t\t\t<!--<div class=\"changelog point-releases\"></div>-->\n\n\t\t\t<div class=\"changelog\">\n\t\t\t\t<h3><?php _e( 'A new RESTful API developers will &#10084;', VENDOR_UNIQUE_IDENTIFIER ); ?></h3>\n\t\t\t\t<div class=\"vendor-feature feature-rest feature-section col three-col\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4><?php _e( 'Access your data from 3rd party applications', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'Built on top of the WooCommerce API, and targetted directly at developers, the new REST API allows you to get data for <strong>Orders</strong>, <strong>Coupons</strong>, <strong>Customers</strong>, <strong>Products</strong> and <strong>Reports</strong> in both <code>XML</code> and <code>JSON</code> formats.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"icon\"></div>\n\t\t\t\t\t<div class=\"last-feature\">\n\t\t\t\t\t\t<h4><?php _e( 'Authentication to keep data secure', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'Authentication for the REST API is performed using HTTP Basic Auth if you have SSL enabled, or signed according to the <a href=\"http://tools.ietf.org/html/rfc5849\">OAuth 1.0a</a> specification if you don\\'t have SSL. Data is only available to authenticated users.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"changelog\">\n\t\t\t\t<h3><?php _e( 'UI and reporting improvements', VENDOR_UNIQUE_IDENTIFIER ); ?></h3>\n\t\t\t\t<div class=\"vendor-feature feature-section col three-col\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4><?php _e( 'WordPress 3.8 admin UI compatibility', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'WooCommerce 2.1 has had its UI restyled to work with the new admin design in WordPress 3.8. All bitmap icons have been replaced with a custom, lightweight icon font for razor sharp clarity on retina devices as well as improved performance.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4><?php _e( 'Simplified order UI', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'The orders panel has seen significant improvement to both the totals panel, and line item display making editing new and existing orders a breeze.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t\t<p><?php _e( 'Item meta has also been optimised and can now be viewed as HTML rather than stuck in a text input.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"last-feature\">\n\t\t\t\t\t\t<h4><?php _e( 'Improved Reporting', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'Reports have been redesigned with new <strong>filtering</strong> capabilities, a new <strong>customer report</strong> showing orders/spending, and the ability to <strong>export CSVs</strong>.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t\t<p><?php _e( 'The dashboard also has a new widget showing you an overview of current orders complete with sparklines for quick at-a-glance stats.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"changelog about-integrations\">\n\t\t\t\t<h3><?php _e( 'Separated integrations', VENDOR_UNIQUE_IDENTIFIER ); ?></h3>\n\t\t\t\t<div class=\"vendor-feature feature-section col three-col\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4><?php _e( 'New separate plugins', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'To make core more lean, some integrations have been removed and turned into dedicated plugins which you can install as and when you need them.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4><?php _e( 'Google Analytics', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'Add Google Analytics eCommerce tracking to your WooCommerce store.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t\t<p><a href=\"http://wordpress.org/plugins/woocommerce-google-analytics-integration\" class=\"button\"><?php _e( 'Download', VENDOR_UNIQUE_IDENTIFIER ); ?></a></p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"last-feature\">\n\t\t\t\t\t\t<h4><?php _e( 'Piwik', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'Integrate WooCommerce with Piwik and the WP-Piwik plugin.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t\t<p><a href=\"http://wordpress.org/plugins/woocommerce-piwik-integration/\" class=\"button\"><?php _e( 'Download', VENDOR_UNIQUE_IDENTIFIER ); ?></a></p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4><?php _e( 'ShareThis', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'Add social network sharing buttons to products using ShareThis.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t\t<p><a href=\"http://wordpress.org/plugins/woocommerce-sharethis-integration/\" class=\"button\"><?php _e( 'Download', VENDOR_UNIQUE_IDENTIFIER ); ?></a></p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4><?php _e( 'Sharedaddy', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'Add social network sharing buttons to products using Sharedaddy.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t\t<p><a href=\"http://wordpress.org/plugins/woocommerce-sharedaddy-integration/\" class=\"button\"><?php _e( 'Download', VENDOR_UNIQUE_IDENTIFIER ); ?></a></p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"last-feature\">\n\t\t\t\t\t\t<h4><?php _e( 'ShareYourCart', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'Let users share their carts for a discount using the ShareYourCart service.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t\t<p><a href=\"http://wordpress.org/plugins/shareyourcart/\" class=\"button\"><?php _e( 'Download', VENDOR_UNIQUE_IDENTIFIER ); ?></a></p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"changelog\">\n\t\t\t\t<h3><?php _e( 'Under the Hood', VENDOR_UNIQUE_IDENTIFIER ); ?></h3>\n\n\t\t\t\t<div class=\"feature-section col three-col\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4><?php _e( 'PayPal PDT support', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'PayPal Data Transfer (PDT) is an alternative for PayPal IPN which sends back the status of an order when a customer returns from PayPal.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4><?php _e( 'Stylesheet separation', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'Frontend styles have been split into separate appearance/layout/smallscreen stylesheets to help with selective customisation.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"last-feature\">\n\t\t\t\t\t\t<h4><?php _e( 'New endpoints', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'Certain pages such as \"Pay\", \"Order Received\" and some account pages are now endpoints rather than pages to make checkout more reliable.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"feature-section col three-col\">\n\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4><?php _e( 'Default credit card form for gateways', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'We\\'ve added a standardized, default credit card form for gateways to use if they support <code>default_credit_card_form</code>.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4><?php _e( 'Coupon limits per customer', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'Coupon usage limits can now be set per user (using email + ID) rather than global.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"last-feature\">\n\t\t\t\t\t\t<h4><?php _e( 'Streamlined new-account process', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'During checkout, username and passwords are optional and can be automatically generated by WooCommerce.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\n\t\t\t\t</div>\n\t\t\t\t<div class=\"feature-section col three-col\">\n\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4><?php _e( 'Additional price display options', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'Define whether prices should be shown incl. or excl. of tax on the frontend, and add an optional suffix.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4><?php _e( 'Past order linking', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'Admins now have the ability to link past orders to a customer (before they registered) by email address.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"last-feature\">\n\t\t\t\t\t\t<h4><?php _e( 'Review improvements', VENDOR_UNIQUE_IDENTIFIER ); ?></h4>\n\t\t\t\t\t\t<p><?php _e( 'We\\'ve added a new option to restrict reviews to logged in purchasers, and made ratings editable from the backend.', VENDOR_UNIQUE_IDENTIFIER ); ?></p>\n\t\t\t\t\t</div>\n\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class=\"return-to-dashboard\">\n\t\t\t\t<a href=\"<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'vendor-settings' ), 'admin.php' ) ) ); ?>\"><?php _e( 'Go to WooCommerce Settings', VENDOR_UNIQUE_IDENTIFIER ); ?></a>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "f2363c3c6d31517ec8402860b88ab519", "score": "0.5609069", "text": "function settings_home_description_option() {\n\t\t\n\t\t$options = $this->options;\n\t\t$allowed_tags = htmlentities( '<b><strong><em><i><span><a><br>' );\n\n\t\techo '<textarea id=\"home_description\" name=\"' . $this->options_group_name . '[home_description]\" cols=\"80\" rows=\"6\">';\n\t\tif ( isset( $options['home_description'] ) && $options['home_description'] ) {\n\t\t\techo $options['home_description'];\n\t\t}\n\t\techo '</textarea>';\n\t\techo '<p class=\"description\">The following tags are permitted: ' . $allowed_tags . '</p>';\n\t\t\n\t}", "title": "" }, { "docid": "77e736dd45ec88cea15520cf4d5cf969", "score": "0.56068295", "text": "function env_name_setup()\n{\n if (is_admin_bar_showing()) {\n add_action('wp_head', 'env_name_print_style');\n add_action('admin_head', 'env_name_print_style');\n }\n}", "title": "" }, { "docid": "a1daa1d4bd849d12113c648cf177db0a", "score": "0.5606407", "text": "public function themeFunctions();", "title": "" }, { "docid": "109471f2db3a3841e533ff06c21a7afd", "score": "0.5590544", "text": "function print_section_info() {\n echo '<p class=\"description\">'.__('Enter here some settings', 'FatFishLP').'</p>';\n }", "title": "" }, { "docid": "de02268b592c7388f575be2b7df2a03d", "score": "0.55871224", "text": "function flora_custom_head_script(){\n global $wyde_options, $wyde_color_scheme;\n $wyde_color_scheme = wyde_get_color_scheme(); \n echo '<style type=\"text/css\" data-name=\"flora-color-scheme\">';\n ob_start();\n include_once get_template_directory() . '/css/custom-css.php';\n echo ob_get_clean();\n echo '</style>';\n if( !empty($wyde_options['head_script']) ){\n /**\n *Echo extra HTML/JavaScript/Stylesheet from theme options > advanced - head content\n */\n echo balanceTags( $wyde_options['head_script'], true );\n } \n}", "title": "" }, { "docid": "a35a3f88c3c7c495e9f17f8a9740c268", "score": "0.55819184", "text": "function tk_description_site(){\r\n \r\n $desc = get_option(TK.'_seo_desc_home');\r\n $desc_single = get_option(TK.'_seo_desc_single');\r\n $blogdesc = get_option('blogdescription');\r\n \r\n if(is_home()){\r\n \r\n if(!empty($desc)){\r\n echo '<meta name=\"description\" content=\"'.$keywords.'\"/>'.\"\\n\";\r\n }elseif(!empty($blogdesc)){\r\n echo '<meta name=\"description\" content=\"'.get_option('blogdescription').'\"/>'.\"\\n\"; \r\n }\r\n \r\n } elseif(is_single()){\r\n \r\n if(!empty($desc_single)){\r\n echo '<meta name=\"description\" content=\"'.$keywords_single.'\"/>'.\"\\n\";\r\n }elseif(!empty($desc)){\r\n echo '<meta name=\"description\" content=\"'.$keywords.'\"/>'.\"\\n\";\r\n }elseif(!empty($blogdesc)){\r\n echo '<meta name=\"description\" content=\"'.get_option('blogdescription').'\"/>'.\"\\n\"; \r\n }\r\n }\r\n \r\n}", "title": "" }, { "docid": "ad691306d8f38f476a37b00b4c20702a", "score": "0.5581675", "text": "public function themeSetup()\n {\n // load theme textdomain for translation\n load_theme_textdomain('bootstrap-basic4', get_template_directory() . '/languages');\n\n // add theme support title-tag\n add_theme_support('title-tag');\n\n // add theme support post and comment automatic feed links\n add_theme_support('automatic-feed-links');\n\n // allow the use of html5 markup\n // @link https://codex.wordpress.org/Theme_Markup\n add_theme_support('html5', array('caption', 'comment-form', 'comment-list', 'gallery', 'search-form'));\n\n // add support menu\n register_nav_menus(array(\n 'primary' => __('Primary Menu', 'bootstrap-basic4'),\n ));\n\n // add post formats support\n add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link'));\n\n // add support custom background\n add_theme_support(\n 'custom-background', \n apply_filters(\n 'bootstrap_basic4_custom_background_args', \n array(\n 'default-color' => 'ffffff', \n 'default-image' => ''\n )\n )\n );\n }", "title": "" }, { "docid": "4f2a36b6d6dbe039d4e7b71a580a3b61", "score": "0.5576438", "text": "function theme_sirv_zoom_profiles_list_description($variables) {\n $label = $variables['label'];\n $name = $variables['name'];\n\n $output = check_plain($label);\n $output .= ' <small>' . t('(Machine name: @name)', array('@name' => $name)) . '</small>';\n\n return $output;\n}", "title": "" }, { "docid": "dfd49d9121b02200b602f5b7da01b4b1", "score": "0.5564428", "text": "protected function renderDescription() {\n $output = '';\n if (!is_null($this->description)) {\n // @todo Integrate this into the theme system.\n $output .= '<div class=\"description\">' . $this->description . \"</div>\\n\";\n }\n return $output;\n }", "title": "" }, { "docid": "4381029a40cfa18085c208ec3cedcdf2", "score": "0.5562277", "text": "public function getThemesCreate()\n {\n $this->db->cleanup();\n\n return $this->render('themes/create');\n }", "title": "" }, { "docid": "752579d25b87f0331aa9ac1c6f401661", "score": "0.5554552", "text": "public function __construct() {\n $this->description = <<<EOF\n<h4>Locate WordPress</h4>\n<p>Searches for local WordPress installations in different folders and shows their versions.\nUseful if you manage multiple WordPress sites and want to make sure all of them are running the latest WordPress.\n</p>\nEOF;\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "99b00e104751880ec37e3f4eb2fbd21d", "score": "0.0", "text": "public function run()\n {\n /* set params */\n $current_params = $this->getParams();\n /* clear table */\n /* fill table */\n $this->insertToDB($current_params);\n }", "title": "" } ]
[ { "docid": "f74cb2c339072d43cd3b96858a89c600", "score": "0.8112695", "text": "public function run()\n {\n $this->seeds();\n }", "title": "" }, { "docid": "33aedeaa083b959fa5f66e27a7da3265", "score": "0.8026505", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t//Genre\n \\DB::table('genres')->insert(\n \t['name' => 'Comedia seed', 'ranking' => 354784395, 'active' => 1]\n );\n\n \\DB::table('actors')->insert([\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5]\n ]);\n }", "title": "" }, { "docid": "8d9ddbc23166c0cafca145e7a525c10a", "score": "0.80032176", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* $faker = Faker::create();\n foreach (range(1,100) as $index) {\n DB::table('product')->insert([\n 'productName' => $faker->company,\n 'description' => $faker->text,\n 'productId' => $faker->randomNumber(),\n 'images' => $faker->image(),\n ]);\n }*/\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('recital')->insert([\n 'pagesRecital' => $faker->text,\n 'pageId' => $faker->randomNumber(),\n ]);\n }\n }", "title": "" }, { "docid": "8113ba9f29863f44dc33dbd7c0f98245", "score": "0.796029", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n DB::table('users')->insert([\n // [\n // 'name' => 'Alan',\n // 'email' => 'alan@alan.fr',\n // 'password' => '1234'\n // ],\n // [\n // 'name' => 'Alice',\n // 'email' => 'alice@alice.fr',\n // 'password' => '1234'\n // ],\n [\n 'name' => 'admin',\n 'email' => 'admin@admin.fr',\n 'password' => Hash::make( 'admin' )\n ],\n ]);\n \n // Création de 10 authors en utilisant la factory\n // la fonction factory de Laravel permet d'utiliser le facker définit\n factory(App\\Author::class, 10)->create();\n $this->call(BookTableSeeder::class);\n }", "title": "" }, { "docid": "424a278b0bd7df7af33c6c946314dcb5", "score": "0.7928953", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n factory(App\\User::class, 100)->create();\n\n factory(App\\Category::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 10)->create()->each(function ($d) {\n $d->audiobookChapter()->saveMany(factory(App\\AudioBookChapter::class, 10)->create()->each(function ($chapter) use ($d) {\n $chapter->purchase()->saveMany(factory(App\\Purchase::class, 10)->create()->each(function ($purchase) use ($d, $chapter) {\n $purchase->user_id = User::all()->random(1)->id;\n $purchase->audiobookChapter_id = $chapter->id;\n $purchase->audiobook_id = $d->id;\n }));\n\n }));\n $d->review()->save(factory(App\\Review::class)->make());\n $d->wishlist()->save(User::all()->random(1));\n }));\n });\n\n\n factory(App\\Collection::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 5)->create()->each(function ($d) {\n $d->category_id = Category::all()->random(1)->id;\n }));\n });\n\n Model::reguard();\n }", "title": "" }, { "docid": "2fca9bf0725abd081819588688399860", "score": "0.7926935", "text": "public function run()\n {\n $this->call(VideogameSeeder::class);\n $this->call(CategorySeeder::class);\n User::factory(15)->create();\n DB::table('users')->insert([\n 'name' => 'Santiago',\n 'email' => 'santi@correo.com',\n 'password' => bcrypt('12345678'),\n 'address' => 'C/ Ultra',\n 'rol' => 'admin'\n ]);\n //Ratin::factory(50)->create();\n Purchase::factory(20)->create();\n //UserList::factory(1)->create();\n }", "title": "" }, { "docid": "29a4267326dbe1e561d79877123a4ef8", "score": "0.79262906", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\School', 10)->create();\n factory('App\\Department', 20)->create();\n factory('App\\Course', 40)->create();\n factory('App\\CourseContent', 40)->create();\n factory('App\\CourseMaterial', 120)->create();\n factory('App\\Library', 200)->create();\n factory('App\\Download', 200)->create();\n factory('App\\Preview', 200)->create();\n factory('App\\Image', 5)->create();\n factory('App\\Role', 2)->create();\n }", "title": "" }, { "docid": "23ad0adf7c7d172d03ff87f186b2b80d", "score": "0.7900386", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n ['nome' => 'Wiiliam',\n 'usuario' => 'will',\n 'cpf' => '033781783958',\n 'tipo' => 'ADM',\n 'ativo' => 1,\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm'//secret\n ] \n ]);\n DB::table('dentes')->insert([\n ['nome' => 'canino', 'numero' => 39],\n ['nome' => 'molar', 'numero' => 2],\n ['nome' => 'presa', 'numero' => 21]\n ]);\n\n DB::table('servicos')->insert([\n ['nome' => 'Restauração', 'ativo' => 1],\n ['nome' => 'Canal', 'ativo' => 1],\n ['nome' => 'Limpeza', 'ativo' => 1]\n ]);\n }", "title": "" }, { "docid": "c5b1891e5f39d3e2551b908d083d5516", "score": "0.78698856", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Poll::create([\n 'user_id' => 1,\n 'poll_name' => 'How much do you like me?',\n 'is_public' => 1,\n 'nr_choice' => 0\n ]);\n \n Votes::create([\n 'user_id' => 1,\n 'vote_to_poll' => 2\n ]);\n\n Choices::create([\n 'choice_id'=> 1,\n 'choice_text'=>'A lot.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>260\n ]);\n\n Choices::create([\n 'choice_id'=> 2,\n 'choice_text'=>'A little.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>178\n ]);\n }", "title": "" }, { "docid": "5b3dd72a68cd7caf5cb41622cf1f17f8", "score": "0.78664595", "text": "public function run()\n {\n // Truncate existing record in book table\n Book::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // Create dummy records in our table books:\n for ($i = 0; $i < 50; $i++) {\n Book::create([\n 'title' => $faker->title,\n 'author' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "0edef3cdac4be0882cf354181e1a63fd", "score": "0.7847239", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n $ranks = Rank::all();\n $roles = Role::all();\n\n // And now, let's create a few users in our database:\n for ($i = 0; $i < 5; $i++) {\n User::create([\n 'username' => \"user_$i\",\n 'pilot_callsign' => $faker->numerify('SCI###'),\n 'rank_id' => $ranks[rand ( 0 , $ranks->count()-1 )]->id,\n 'role_id' => $roles[0]->id\n ]);\n }\n }", "title": "" }, { "docid": "1696cae69b4e0dea414a1cad524c579c", "score": "0.78417265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 10)->create();\n factory(Product::class, 20)->create();\n factory(Category::class, 8)->create();\n factory(Portfolio::class, 8)->create();\n factory(Article::class, 30)->create();\n }", "title": "" }, { "docid": "124d9b3ae818d6f7c553836f83b3f26d", "score": "0.7836289", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // $this->call(UserSeeder::class);\n DB::table('teams')->truncate();\n DB::table('users')->truncate();\n DB::table('campaigns')->truncate();\n DB::table('memberships')->truncate();\n\n Schema::enableForeignKeyConstraints();\n\n // add users \n $usersfile = 'database/csvs/users.csv';\n $users = HelpersCsvHelper::csvToArray($usersfile);\n for ($i = 0; $i < count($users); $i++) {\n User::firstOrCreate($users[$i]);\n }\n\n // add teams\n $teamsfile = 'database/csvs/teams.csv';\n $teams = HelpersCsvHelper::csvToArray($teamsfile);\n for ($i = 0; $i < count($teams); $i++) {\n Teams::firstOrCreate($teams[$i]);\n }\n\n // add campaigns\n $Campaignsfile = 'database/csvs/campaigns.csv';\n $campaigns = HelpersCsvHelper::csvToArray($Campaignsfile);\n for ($i = 0; $i < count($campaigns); $i++) {\n Campaigns::firstOrCreate($campaigns[$i]);\n }\n\n // add memberships\n $Membershipsfile = 'database/csvs/memberships.csv';\n $memberships = HelpersCsvHelper::csvToArray($Membershipsfile);\n for ($i = 0; $i < count($memberships); $i++) {\n Memberships::firstOrCreate($memberships[$i]);\n }\n }", "title": "" }, { "docid": "7e308ea06065b02bb3be211e8748bf5f", "score": "0.7835999", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 1,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 2,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 3,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 4,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 1,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 2,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 3,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 4,\n ]);\n }", "title": "" }, { "docid": "9d2abe13b05f99177e4f0e0cdd336b85", "score": "0.78325504", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Category::class, 10)->create();\n factory(Blog::class, 10)->create();\n }", "title": "" }, { "docid": "29381516f53bafb0bf8797720ed6de7b", "score": "0.78240335", "text": "public function run()\n {\n\n $datas = [\n ['text' => 'Migracion'],\n ['text' => 'Familia'],\n ];\n\n\n foreach($datas as $data){\n \n $this->createSeeder($data);\n\n }\n }", "title": "" }, { "docid": "51daed999a883c3842fb92fb9bf4889b", "score": "0.78238165", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User'::class, 20)->create();\n factory('App\\Post'::class, 1000)->create();\n factory('App\\Comment'::class, 2000)->create();\n }", "title": "" }, { "docid": "778b6afd89da9f29737c3c12e565289e", "score": "0.78130686", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Sid',\n 'email' => 'forge405@gmail.com',\n 'role' => 'admin',\n 'password' => bcrypt(env('SEED_PWD')),\n ]);\n\n // 10 categorie\n $categories = factory(Category::class, 10)->create();\n\n // 20 tags\n $tags = factory(Tag::class, 20)->create();\n\n // 9 utenti\n factory(User::class, 9)->create();\n $users = User::all();\n // x ogni utente 15 posts\n foreach ($users as $user) {\n $posts = factory(Post::class, 15)->create([\n 'user_id' => $user->id,\n 'category_id' => $categories->random()->id,\n ]);\n\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3)->pluck('id')->toArray());\n }\n }\n }", "title": "" }, { "docid": "770b2d73679fa00839175bb0616cbdea", "score": "0.78115416", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,10)->create();\n factory(Product::class,100)->create();\n factory(Review::class,500)->create();\n }", "title": "" }, { "docid": "85cccae108d4de7f16063966a5657344", "score": "0.7810694", "text": "public function run()\n {\n\n $faker = \\Faker\\Factory::create();\n\n \\DB::table('news_categories')->delete();\n\n for ($i = 0; $i <= 10; $i++) {\n \\App\\Models\\NewsCategory::create([\n 'name' => $faker->text(40)\n ]);\n }\n\n \\DB::table('news')->delete();\n\n for ($i = 0; $i <= 40; $i++) {\n \\App\\Models\\News::create([\n 'title' => $faker->text(100),\n 'author_id' => 1,\n 'publish_date' => \\Carbon\\Carbon::now()->addDays(rand(1, 10)),\n 'content' => $faker->text(),\n 'source' => $faker->text(50),\n 'status' => rand(0, 1)\n ]);\n }\n }", "title": "" }, { "docid": "8ad50814f16b74d56ba096d0d57f2685", "score": "0.7809736", "text": "public function run()\n {\n $this->call(LaratrustSeeder::class);\n // $this->call(UsersTableSeeder::class);\n $discount = factory(\\App\\Discount::class, 1)->create();\n\n $categories = factory(\\App\\Category::class, 8)->create();\n $products = factory(\\App\\Product::class, 10)->create();\n $address=factory(\\App\\Users_address::class, 24)->create();\n $this->call(DiscountTableSeeder::class);\n $this->call(m_imagesTableSeeder::class);\n\n $images = factory(\\App\\m_image::class, 2)->create();\n\n }", "title": "" }, { "docid": "b762d028067463470324860cc9a29e0e", "score": "0.7805969", "text": "public function run(): void\n {\n $this->seedUsers();\n $this->seedCategories();\n $this->seedMedia();\n $this->seedProducts();\n $this->seedOrders();\n }", "title": "" }, { "docid": "4f83d3fdd97b667f526563987d1e2e6b", "score": "0.7802494", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Student::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now let's generate a few students for our app:\n $students = App\\User::where('role', 'Student')->get();\n foreach ($students as $student) {\n \tStudent::create([\n 'address' => $faker->city, \n 'user_id' => $student->id,\n ]);\t\t \n\t\t}\n }", "title": "" }, { "docid": "36b206fe3f9e5582fff99bdd44c268e2", "score": "0.77952313", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Edson Chivambo',\n 'email' => 'echivambo@psi.org.mz',\n 'password' => bcrypt('002523'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n\n\n DB::table('users')->insert([\n 'name' => 'Emidio Nhacudima',\n 'email' => 'enhacudima@psi.org.mz',\n 'password' => bcrypt('Psi12345'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n/*\n // Let's truncate our existing records to start from scratch.\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n ]);\n }\n*/\n }", "title": "" }, { "docid": "914dd54501738d8f24f08d44c10d6a1f", "score": "0.77949405", "text": "public function run()\n {\n // default seeder to create fake users by using users factory\n // \\App\\Models\\User::factory(10)->create();\n\n // truncate deletes data or row from db. so when seed is run firsly it will delete the existing fiels\n // Product::truncate();\n // Category::truncate();\n // * first way for database seeding\n // creating a category and then passing it to create a product in seeder\n // $category = Category::create([\n // \"name\" => \"Headphones\",\n // \"description\" => \"This Category contains Headphones\"\n // ]);\n\n // Product::create([\n // \"product_name\" => \"Iphone\",\n // \"product_desc\" => \"An Iphone uses IOS and is developed by Apple\",\n // \"price\" => \"100000\",\n // \"category_id\" => $category->id\n // ]);\n // * using second method for creating/seeding fake data using factory \n // Category::factory(5)->create();\n //* overriding the default category_id of the factory in seeder\n Product::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "73bbd2eb8a462a3994465397aabc387c", "score": "0.7793759", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = factory(App\\User::class, 5)->create();\n $product = factory(App\\Product::class, 50)->create();\n $reviews = factory(App\\Review::class, 100)->create()\n ->each(function ($review) {\n $review->reviews()->save(factory(App\\Product::class)->make());\n });\n }", "title": "" }, { "docid": "c3d306bf3f72eced986330e8fcc2293f", "score": "0.77799016", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(PagesTableSeeder::class);\n\n $id = DB::table('seos')->insertGetId([\n 'link' => url('/'),\n 'priority' => 0,\n 'status' => 'publish',\n ]);\n foreach (['vi','en'] as $lang) {\n DB::table('seo_languages')->insert([\n 'title' => 'Trang chủ',\n 'slug' => 'trang-chu',\n 'language' => $lang,\n 'seo_id' => $id,\n ]);\n }\n }", "title": "" }, { "docid": "89ccfc64e34980c1c88e0ac32bd95ed7", "score": "0.7779508", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('tags')->insert([\n\t 'title' => $faker->title,\n\t 'slug' => $faker->slug,\n\t \n\t ]);\n\t}\n }", "title": "" }, { "docid": "17ed7bd7f1c8118ed9c57701c65a3308", "score": "0.7774864", "text": "public function run()\n {\n require_once 'vendor/fzaninotto/faker/src/autoload.php';\n $faker = \\Faker\\Factory::create();\n\n// \\DB::table('articles')->delete();\n\n foreach (range(1, 50) as $index) {\n dump($faker->name);\n DB::table('articles')->insert([\n 'name' => $faker->name,\n 'description' => $faker->text($maxNbChars = 400),\n 'slug' => $index,\n 'autor_id' => 2\n ]);\n };\n \n }", "title": "" }, { "docid": "bd7aa608e63a171552e3b4da3b24f5ac", "score": "0.77732813", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Product::create([\n 'product_name' => \"Product-\".$i,\n 'description' => \"Product-\".$i.\" Good Product\",\n 'price' => 1000,\n 'offer' => 10,\n 'category_id' => 1,\n 'p_status' => 'A',\n ]);\n }\n }", "title": "" }, { "docid": "c0702e537f33df7826aad62896f41818", "score": "0.77731556", "text": "public function run()\n {\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('pages')->truncate();\n\n $faker = Faker::create();\n \t$cours = Db::table('cours')->lists('id') ;\n\n \tforeach (range(1,25) as $key => $value ) {\n\n \t\tPage::create([\n \t\t'title'=>$faker->sentence(3),\n \t\t'body'=>$faker->paragraph(4),\n \t\t'cour_id'=>$faker->randomElement($cours) \n\t ]);\n \t}\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;') ;\n }", "title": "" }, { "docid": "a00d7625c3ac246fb4c8d0c5f542c844", "score": "0.7772737", "text": "public function run()\n {\n \n /*inserting dummy data, if we want to insert a 1000 of data,every seeder foreach table, it insert 1 data*/\n // DB::table('users')->insert([\n // 'name'=>str_Random(10), \n // 'email'=>str_random(10).'@gmail.com',\n // 'password'=>bcrypt('secret')\n // ]);\n //ro run : php artisan db:seed\n\n\n /**ANOTHER WAY */\n\n //User::factory()->count(10)->hasPosts(1)->create(); //if the user has a relation with post\n User::factory()->count(10)->create();\n\n \n \n }", "title": "" }, { "docid": "7610e7d2e2f861ae0a32e114a63a583f", "score": "0.77626514", "text": "public function run()\n {\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>100,\n 'item_case_name' => 'الضريبه',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>101,\n 'item_case_name' => 'المشتريات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>102,\n 'item_case_name' => 'المبيعات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>103,\n 'item_case_name' => 'السيوله النقديه',\n 'notes' => 'from seeder '\n ]);\n }", "title": "" }, { "docid": "52b78ebee14aac0ddb50ea401a6a927b", "score": "0.776243", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Models\\admin::class, 50)->create();\n factory(App\\Models\\category::class, 20)->create();\n factory(App\\Models\\clinic::class, 20)->create();\n factory(App\\Models\\nurse::class, 50)->create();\n factory(App\\Models\\Patient::class, 200)->create();\n factory(App\\Models\\comment::class, 500)->create();\n factory(App\\Models\\material::class, 500)->create();\n factory(App\\Models\\prescription::class, 500)->create();\n factory(App\\Models\\receipt::class, 400)->create();\n factory(App\\Models\\reservation::class, 600)->create();\n factory(App\\Models\\worker::class, 200)->create();\n // factory(App\\Models\\image::class, 500)->create();\n }", "title": "" }, { "docid": "b373718e9c234dc4bb756553db264c76", "score": "0.7762365", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([\n RolesTableSeeder::class,\n UsersTableSeeder::class,\n PagesTableSeeder::class\n ]);\n\n \n \\Illuminate\\Support\\Facades\\DB::table('tbl_introductions')->insert([ \n 'fullname' => 'Ben Wilson',\n 'dob' => '26 September 1999',\n 'email' => 'hello@company.co',\n 'intro' => 'Hello, I am Ben.',\n 'image' => '1606288979.jpg', \n 'website' => 'www.company.co',\n 'created_at' => '2020-11-24 06:03:28' \n ]);\n }", "title": "" }, { "docid": "6d6a917428726975dd96f2e4e353f871", "score": "0.77620876", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Personas::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Personas::create([\n 'nombre' => $faker->sentence,\n 'nit' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "0b05db86e70b2e211fbf0469301f7d9a", "score": "0.7761681", "text": "public function run()\n {\n //\n DB::table('employees')->delete();\n $faker = Faker\\Factory::create();\n foreach(range(1,50) as $index)\n {\n Employee::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'avatar' => '',\n 'address' => $faker->address,\n 'phone'=> rand(0,9999).'-'.rand(0,9999).'-'.rand(0,9999),\n ]);\n }\n }", "title": "" }, { "docid": "df7b256adbff916fcdd12b520b0dc208", "score": "0.7760763", "text": "public function run() {\n\n\t\t// $this->call('ArticlesTableSeeder::class');\n\t\t// $this->call('CategoriesTableSeeder::class');\n\t\t// factory(App\\Article::class, 50)->create()->each(function ($u) {\n\t\t// \t$u->posts()->save(factory(App\\Article::class)->make());\n\t\t// });\n\n\t}", "title": "" }, { "docid": "e7527a5bc8529a2c2aad4c53046ea43d", "score": "0.7758918", "text": "public function run()\n {\n //\\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Section::factory(10)->create();\n // \\App\\Models\\Classe::factory(20)->create();\n // \\App\\Models\\Eleve::factory(120)->create();\n // \\App\\Models\\Stock::factory(2)->create();\n // \\App\\Models\\Category::factory(5)->create();\n // \\App\\Models\\Product::factory(120)->create();\n\n $this->call([\n AnneScolaireSeeder::class\n ]);\n }", "title": "" }, { "docid": "8efc8b6977291a12f6f3aba05752eca3", "score": "0.7758882", "text": "public function run()\n {\n $this->runSeeder();\n }", "title": "" }, { "docid": "7b81b233cbf3938d421802fdd7f8d35b", "score": "0.77587956", "text": "public function run()\n {\n $categories = [\n [\n 'name' => 'Groenten',\n 'description' => '',\n ],\n [\n 'name' => 'Fruit',\n 'description' => '',\n ],\n [\n 'name' => 'Zuivel',\n 'description' => '',\n ],\n [\n 'name' => 'Vlees',\n 'description' => '',\n ],\n ];\n\n foreach($categories as $category){\n Category::create($category);\n }\n\n //factory(Category::class, DatabaseSeeder::AMOUNT['DEFAULT'])->create();\n }", "title": "" }, { "docid": "3d3644d7189413baa46373e1ac7cdc8f", "score": "0.7754973", "text": "public function run()\n\t{\n\t\tDB::table('posts')->truncate();\n\n $faker = Faker\\Factory::create();\n\n\t\t$posts = [\n [\n 'title' => $faker->sentence(6),\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug('Hello World'),\n 'user_id' => User::first()->id,\n 'category_id' => Category::whereName('Php')->first()->id,\n 'created_at' => new DateTime,\n 'updated_at' => new DateTime\n ]\n ];\n\n\t\t// Uncomment the below to run the seeder\n\t\tfor ($i=0; $i < 10; $i++) {\n $tag = DB::table('tags')->orderBy('RAND()')->first();\n\n $post_title = $faker->sentence(6);\n\n $post = [\n 'title' => $post_title,\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug($post_title),\n 'user_id' => $faker->randomElement(User::all()->lists('id')),\n 'category_id' => $faker->randomElement(Category::all()->lists('id')),\n 'created_at' => $faker->dateTime,\n 'updated_at' => new DateTime\n ];\n\n $id = DB::table('posts')->insert($post);\n Post::find($id)->tags()->sync(Tag::all()->lists('id'));\n }\n\n // $this->command->info('Posts table seeded !');\n\t}", "title": "" }, { "docid": "ab9c424e435c82e381ba211c2fe79243", "score": "0.7753077", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n // User::factory()->count(200)\n // ->has(Order::factory()->count(random_int(1, 20)))\n // ->has(Assigned_order::factory()->count(random_int(1,5)))\n // ->has(Blocked_writer::factory()->count(random_int(0, 2)))\n // ->has(Favourite_writer::factory()->count(random_int(0, 5)))\n // ->has(Payed_order::factory()->count(random_int(2, 6)))\n // ->has(Notification::factory()->count(random_int(5, 20)))\n // ->has(Review::factory()->count(random_int(1, 2)))\n // ->has(Assigned_order::factory()->count(random_int(1, 3)))\n // ->create();\n }", "title": "" }, { "docid": "34546962185839c8810e561de7b0508a", "score": "0.77510494", "text": "public function run()\n {\n //$this->call(RestaurantTableSeeder::class);\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Restaurant::class, 10)->create()->each(function ($restaurant) {\n $restaurant->contacts()->save(factory(App\\Model\\Contact::class)->make());\n });\n factory(App\\Model\\Menu::class,30)->create();\n factory(App\\Model\\Item::class,100)->create();\n factory(App\\Model\\Option::class,200)->create();\n factory(App\\Model\\MultiCheckOption::class, 500)->create();\n factory(App\\Model\\Customer::class, 100)->create();\n factory(App\\Model\\Order::class, 300)->create();\n }", "title": "" }, { "docid": "e92b39c751271622081fe6a63248f0d3", "score": "0.7745997", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n Seo::create([\n 'url' => '/',\n 'title' => 'title default',\n 'keywords' => 'keywords default',\n 'description' => 'description default',\n ]);\n\n User::create([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'password' => Hash::make('1234567'),\n ]);\n }", "title": "" }, { "docid": "e5d1626abf07334bad40def153b6ebf5", "score": "0.7744136", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(MediaSeeder::class);\n //$this->call(GuestSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('guests')->insert([\n 'roomnumber' => Category::all()->random()->id,\n 'name' => $faker->firstName,\n 'surname' => $faker->name,\n 'email' => $faker->email,\n 'phonenumber' => $faker->phoneNumber\n\t ]);\n\t }\n\n }", "title": "" }, { "docid": "8da9a1776904f6cc6a5ccc3953a8e40f", "score": "0.7742624", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('products')->insert([\n 'name' => 'Basil',\n 'price' => 0.99,\n 'description' => 'Perhaps the most popular and widely used culinary herb.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Bay Laurel',\n 'price' => 1.99,\n 'description' => 'Bay laurel is an evergreen shrub or tree in warmer growing zones ( 8 and above).',\n ]);\n DB::table('products')->insert([\n 'name' => 'Borage',\n 'price' => 2.99,\n 'description' => 'Borage is a coarse textured plant growing to about 2-3 feet.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Caraway',\n 'price' => 3.99,\n 'description' => 'Caraway is most often grown for its seeds, but the root and leaves are also edible.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Catnip',\n 'price' => 4.99,\n 'description' => 'Catnip is a hardy perennial with an open mound shaped habit growing to about 2-3 feet tall.',\n ]);\n\n }", "title": "" }, { "docid": "cac69861fb7a00c50daa5b54ee724177", "score": "0.7740592", "text": "public function run()\n {\n //\n DB::table('Proveedores')->insert([\n \t[\n \t'nombre'=> 'juan perez',\n \t'marca'=> 'matel',\n \t'correo_electronico'=> 'jperez@gmail.com',\n \t'direccion'=>'av. peru 321,santiago',\n \t'fono'=> 993842739\n \t]\n ]);\n\n $faker=Faker::create();\n for ($i=0; $i <20 ; $i++) { \n DB::table('Proveedores')->insert([\t\n \t'nombre'=> $faker->name,\n \t'marca'=>$faker->company,\n \t'correo_electronico'=> $faker->email,\n \t'direccion'=>$faker->address,\n \t'fono'=> $faker->isbn10 ,\n ]);\n }\n }", "title": "" }, { "docid": "9a3fc5f60166a9785c73750188e6596d", "score": "0.7737875", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n /*\n DB::table('product')->insert([\n 'title' => 'Ceci est un titre de produit',\n 'description' => 'lorem ipsum',\n 'price' => 12,\n 'brand' => 'nouvelle marque',\n ]);\n */\n factory(App\\Product::class, 2)->create();\n factory(App\\Categorie::class, 2)->create();\n }", "title": "" }, { "docid": "b6066308d0ac655bb5d5825a458ef8b1", "score": "0.77361476", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(LangauageTableSeeder::class);\n $this->call(CountryTableSeeder::class);\n\n \n\n Country::create([\n 'name' => 'India'\n ]);\n\n Country::create([\n 'name' => 'USA'\n ]);\n\n Country::create([\n 'name' => 'UK'\n ]);\n\n CompanyCateogry::updateOrCreate([\n 'name' => 'category1'\n ]);\n\n factory(App\\Models\\Customer::class, 50)->create();\n factory(App\\Models\\Supplier::class, 50)->create();\n // $this->call(CompanySeeder::class);\n $this->call(InvoiceSeeder::class);\n $this->call(CashFlowSeeder::class);\n }", "title": "" }, { "docid": "8de228115e4192b5098d2a339ff99bf2", "score": "0.7735688", "text": "public function run()\n {\n //delete the users table when the seeder is called\n DB::table('users')->delete();\n\n Eloquent::unguard();\n\n\t\t//disable foreign key before we run the seeder\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n factory(App\\User::class, 50)->create();\n\n //Also create these accounts - used for easy testing purposes\n DB::table('users')->insert([\n [\n 'name' => 'Test',\n 'email' => 'test@gmail.com',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n ],\n [\n 'name' => 'Test2',\n 'email' => 'test2@gmail.com',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n\n ],\n ]);\n }", "title": "" }, { "docid": "e0d9bd8b4c025867e30c1a5579c4da9c", "score": "0.7734883", "text": "public function run()\n {\n\n $this->call([\n EstadosSeeder::class,\n MunicipiosSeeder::class,\n RelacionEstadosMunicipiosSeeder::class,\n StatusSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Categories::factory()->count(20)->create();\n \\App\\Models\\Products::factory()->count(100)->create();\n \\App\\Models\\Galery::factory()->count(1000)->create();\n \\App\\Models\\Providers::factory()->count(20)->create();\n \\App\\Models\\Valorations::factory()->count(1000)->create();\n \\App\\Models\\Sales::factory()->count(999)->create();\n \\App\\Models\\Directions::factory()->count(999)->create();\n \\App\\Models\\LastView::factory()->count(999)->create();\n \\App\\Models\\Offers::factory()->count(20)->create();\n // \\App\\Models\\Favorites::factory()->count(50)->create();\n \\App\\Models\\Notifications::factory()->count(999)->create();\n /**\n * $this->call([\n * CategoriesSeeder::class,\n * ]);\n */\n\n $this->call([\n FavoritesSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "79751b67da244a7913b06f140364d6c0", "score": "0.7732834", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n PartCategory::truncate();\n Brand::truncate();\n Manufacturer::truncate();\n PartSubcategory::truncate();\n Part::truncate();\n Admin::truncate();\n\n $usersQuantity = 500;\n $categoriesQuantity = 30;\n $subCategoriesQuantity = 200;\n $partQuantity = 1000;\n $brandQuantity = 20;\n $manufacturerQuantity = 50;\n $adminQuantity = 10;\n\n factory(User::class, $usersQuantity)->create();\n factory(PartCategory::class, $categoriesQuantity)->create();\n factory(Brand::class, $brandQuantity)->create();\n factory(Manufacturer::class, $manufacturerQuantity)->create();\n\n factory(PartSubcategory::class, $subCategoriesQuantity)->create();\n factory(Part::class, $partQuantity)->create();\n\n factory(Admin::class, $adminQuantity)->create();\n\n }", "title": "" }, { "docid": "fb7d5bba21289ca1ca2041a5e18bd077", "score": "0.77297103", "text": "public function run()\n {\n// factory(Category::class, 20)->create();\n// factory(Post::class, 50)->create();\n// factory(Tag::class, 10)->create();\n\n $this->call(UserTableSeed::class);\n $this->call(PostTableSeed::class);\n }", "title": "" }, { "docid": "77fb1d45e59d982eac35251a4446cfa5", "score": "0.7728479", "text": "public function run()\n {\n //Cmd: php artisan db:seed --class=\"recommendTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\Recommend::create([\n\t\t\t\t\t\"from_user\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_woman\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man_message\" => $faker->word(),\n\t\t\t\t\t\"to_woman_message\" => $faker->word(),\n\t\t\t\t\t\"man_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n ]);\n }\n }", "title": "" }, { "docid": "95f6236854296207546d9b1517fa175a", "score": "0.77278304", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n // Create 10 records of posts\n factory(App\\Post::class, 10)->create()->each(function ($post) {\n // Seed the relation with 5 comments\n $commments = factory(App\\Comment::class, 5)->make();\n $post->comments()->saveMany($commments);\n });\n }", "title": "" }, { "docid": "1667303ce0032ddd973fad5eb00529bd", "score": "0.7726387", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('user_roles')->insert(['name' => 'System Admin', 'description' => 'Description',]);\n DB::table('user_roles')->insert(['name' => 'Owner', 'description' => 'System Owner',]);\n DB::table('user_roles')->insert(['name' => 'Admin', 'description' => 'Admin',]);\n DB::table('user_roles')->insert(['name' => 'Editor', 'description' => 'Editor',]);\n DB::table('user_roles')->insert(['name' => 'Viewer', 'description' => 'Viewer',]);\n }", "title": "" }, { "docid": "f198ce46b8e947563c34aa166ca6fd70", "score": "0.772602", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\TourCategory::class, 4)->create()->each(function (\\App\\TourCategory $category) {\n $category->tours()->saveMany(\n factory(\\App\\Tour::class,10)->make()\n );\n });\n }", "title": "" }, { "docid": "377c3a872d4a300cceb5049caf48d66a", "score": "0.7725185", "text": "public function run()\n {\n $this->call([\n UsersTabeleSeeder::class,\n PostsTabeleSeeder::class,\n CategoriesTabeleSeeder::class,\n ]);\n\n //Get array of ids\n $postIds = DB::table('posts')->pluck('id')->all();\n $categoryIds = DB::table('categories')->pluck('id')->all();\n\n //Seed category_post table with max 40 entries\n foreach ((range(1, 70)) as $index) \n {\n DB::table('category_post')->updateOrInsert(\n [\n 'post_id' => $postIds[array_rand($postIds)],\n 'category_id' => $categoryIds[array_rand($categoryIds)]\n ]\n );\n }\n }", "title": "" }, { "docid": "e44b2f3d77d7329f6b2d733b04c6ab80", "score": "0.7718937", "text": "public function run()\n {\n // we can seed specific data directory\n /**\n Let's try \"Faker\" to prepopulate with lots of imaginery data very quickly!\n\n */\n\n $faker = Faker\\Factory::create();\n\n foreach(range(1, 25 ) as $index){\n \tDB::table( 'tweets')->insert(array(\n \t\t'user_id' => rand(1,25),\n \t\t'message' => $faker->catchphrase\n \t));\n }\n }", "title": "" }, { "docid": "064da3a1fd5b172768671dc5b6f1169d", "score": "0.7718056", "text": "public function run()\n {\n\n\n\n Storage::deleteDirectory('eventos');\n\n Storage::makeDirectory('eventos');\n\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n \n Categoria::factory(4)->create();\n \n $this->call(EventoSeeder::class);\n\n $this->call(AporteSeeder::class);\n\n $this->call(ObjetoSeeder::class);\n\n }", "title": "" }, { "docid": "f6e951e99c926a5aa070324982a80a85", "score": "0.7717371", "text": "public function run()\n {\n Model::unguard();\n\n $seedData = [\n 'Taiwan' => [\n 'Taipei City',\n 'New Taipei City',\n 'Taoyuan City',\n 'Taichung City',\n 'Kaohsiung City',\n 'Tainan City',\n 'Hsinchu City',\n 'Chiayi City',\n 'Keelung City',\n 'Hsinchu County',\n 'Miaoli County',\n 'Changhua County',\n 'Nantou County',\n 'Yunlin County',\n 'Chiayi County',\n 'Pingtung County',\n 'Yilan County',\n 'Hualien County',\n 'Taitung County',\n 'Kinmen County',\n 'Lienchiang County',\n 'Penghu County',\n ]\n ];\n\n foreach ($seedData as $countryName => $cityList) {\n $country = Country::create(['name' => $countryName]);\n\n foreach ($cityList as $cityName) {\n $country->cities()->create(['name' => $cityName]);\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "4fc1f9ee76a037b3655d6f4e73603494", "score": "0.7714682", "text": "public function run()\n {\n //\n //factory(App\\User::class)->create();\n\n DB::table('users')->insert(\n [\n 'name' => 'Seyi', \n 'email' => 'seyii@seyi.com',\n 'password' => 'somerandompassword'\n ]\n );\n DB::table('posts')->insert([\n [\n 'title' => 'My First Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My second Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My third Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ]\n ]);\n \n \n }", "title": "" }, { "docid": "80b4dcada74bc12860abdaff1c2aa1bb", "score": "0.7712008", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 50) as $index) {\n DB::table('books')->insert([\n 'name' => $faker->firstName(),\n 'yearOfPublishing' => $faker->year(),\n 'content' => $faker->paragraph(1, true),\n 'author_id' => $faker->numberBetween(1, 50),\n ]);\n }\n }", "title": "" }, { "docid": "af51801570c9648f237f5a51624f4182", "score": "0.77119786", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(function($user){\n $user->question()->saveMany(factory(App\\Question::class,rand(1,5))->make())\n ->each(function($question){\n $question->answer()->saveMany(factory(App\\Answer::class,rand(1,5))->make());\n });\n });\n }", "title": "" }, { "docid": "bd6458274ff09172851640f92c233c59", "score": "0.77101403", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n \n User::truncate();\n TipoUsuario::truncate();\n Reserva::truncate();\n PuntuacionEstablecimiento::truncate();\n PuntuacionProducto::truncate();\n Producto::truncate();\n Imagen::truncate();\n Establecimiento::truncate();\n Carta::truncate();\n\n $this->call(TipoUsuarioSeeder::class);\n\n foreach (range(1, 10) as $i){\n $u = factory(User::class)->create();\n $u->usuarios_tipo()->attach(TipoUsuario::all()->random());\n }\n\n\n //factory(Establecimiento::class,4)->create();\n //factory(Reserva::class,20)->create();\n //factory(Carta::class, 4)->create(); //Crear tantas como restaurantes\n //factory(Producto::class,100)->create();\n //factory(PuntuacionEstablecimiento::class,50)->create();\n //factory(PuntuacionProducto::class,50)->create();\n //factory(Imagen::class,200)->create();\n\n Schema::enableForeignKeyConstraints(); \n }", "title": "" }, { "docid": "7d3aed410918c722790ec5e822681b71", "score": "0.7708702", "text": "public function run() {\n \n //seed should only be run once\n $faker = Faker::create();\n\n $cat = [\n 1 => \"Home Appliances\",\n 2 => \"Fashion\",\n 3 => \"Home & Living\",\n 4 => \"TV, Gaming, Audio, WT\",\n 5 => \"Watches, Eyewear, Jewellery\",\n 6 => \"Mobiles & Tablets\",\n 7 => \"Cameras\",\n 8 => \"Computers & Laptop\",\n 9 => \"Travel & Luggage\",\n 10 => \"Health & Beauty\",\n 11 => \"Sports, Automotive\",\n 12 => \"Baby, Toys\",\n ];\n\n for ($i = 1; $i <= 12; $i++) {\n DB::table('categories')->insert([\n 'name' => $cat[$i],\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n \n 'created_at' => $faker->dateTimeThisYear($max = 'now'),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "75f8fae397ad6cf1e3077c2a32e423ad", "score": "0.77076155", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Product::truncate();\n WarrantyProduct::truncate();\n\n factory(User::class, 200)->create();\n\n factory(Category::class, 10)->create()->each(\n function ($category){\n factory(Product::class, mt_rand(8,15))->create(['category_id' => $category->id])->each(\n function ($product){\n factory(WarrantyProduct::class, mt_rand(2, 3))->create(['product_id' => $product->id]);\n }\n );\n }\n );\n\n }", "title": "" }, { "docid": "8b07e67f8045192de7c1b932e58f1d17", "score": "0.77057153", "text": "public function run()\n {\n /*$faker = Faker\\Factory::create();\n foreach(range(1,10) as $index){\n App\\Post::create([\n 'title'=> $faker->name,\n 'description'=> $faker->name,\n 'content'=> $faker->name\n ]);\n }*/\n\n Post::create([\n 'title'->title,\n 'description'->description,\n 'content'->content\n ]);\n }", "title": "" }, { "docid": "ddf328298d79f78f3d971cd04aba1d68", "score": "0.7705306", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n\n\n factory(\\App\\Entities\\Category::class, 3)->create()->each(function ($c){\n $c->products()\n ->saveMany(\n factory(\\App\\Entities\\Product::class, 3)->make()\n );\n });\n }", "title": "" }, { "docid": "5f9901567b2bd8ddbdf263c78ddac102", "score": "0.7703055", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n // User Table Data\n /*for($i = 0; $i < 1000; $i++) {\n \tApp\\User::create([\n\t 'email' => $faker->email,\n\t 'password' => $faker->password,\n\t 'full_name' => $faker->name,\n\t 'phone_number' => $faker->name,\n\t ]);\n\t }*/\n\n // User Event Data\n\t /*for($i = 0; $i < 50; $i++) {\n \tApp\\Events::create([\n\t 'event_name' => $faker->name,\n\t 'event_date' => $faker->date,\n\t 'event_startTime' => '2019-01-01',\n\t 'event_duration' => '2',\n\t 'event_venue' => $faker->address,\n\t 'event_speaker' => '1',\n\t 'event_sponsor' => '3',\n\t 'event_topic' => $faker->text,\n\t 'event_details' => $faker->text,\n\t 'event_avatar' => $faker->imageUrl,\n\t 'created_at' => $faker->date(),\n\t ]);\n\t }*/\n }", "title": "" }, { "docid": "6fbcd5e15b63b9dabff8dbaff5d2ea82", "score": "0.77023256", "text": "public function run()\n {\n $faker = Factory::create();\n\n Persona::truncate();\n Pago::truncate();\n Detalle::truncate();\n\n // Schema::disableForeignKeyConstraints();\n User::truncate();\n // HaberDescuento::truncate();\n // Schema::enableForeignKeyConstraints();\n\n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@drea.com',\n 'dni' => '12345678',\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret\n 'remember_token' => Str::random(10),\n ]);\n\n // foreach (range(1, 25) as $i) {\n // $dni = mt_rand(10000000, 99999999);\n // Persona::create([\n // 'nombre' => $faker->firstname,\n // 'apellidoPaterno' => $faker->lastname,\n // 'apellidoMaterno' => $faker->lastname,\n // 'dni' => $dni,\n // 'codmodular' => '10' . $dni,\n // 'user_id' => 1,\n // 'estado' => $faker->randomElement(['activo', 'inactivo']),\n // ]);\n // }\n\n }", "title": "" }, { "docid": "2db117b1d28054b0f08a58115645189d", "score": "0.7701633", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // ?for seeding categories\n // Category::factory(5)->create();\n //? for seeding posts \n Post::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "4e84e995d3e716ac7ab157ddfcc67a39", "score": "0.7700629", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tag::class, 10)->create();\n\n // Get all the roles attaching up to 3 random roles to each user\n $tags = App\\Tag::all();\n\n\n factory(App\\User::class, 10)->create()->each(function($user) use ($tags){\n $user->save();\n factory(App\\Question::class, 5)->create(['user_id'=>$user->id])->each(function($question) use ($user, $tags){\n \n $question->tags()->attach(\n $tags->random(rand(1, 10))->pluck('id')->toArray()\n ); \n factory(App\\Comment::class, 5)->create(['user_id'=>$user->id, 'question_id'=>$question->id])->each(function($comment){\n $comment->save(); \n });\n });\n });\n }", "title": "" }, { "docid": "44607c99534f6f67a920e806653b05d8", "score": "0.76990753", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n \\App\\Models\\Rol::factory(10)->create();\n \\App\\Models\\Persona::factory(10)->create();\n \\App\\Models\\Configuracion::factory(10)->create();\n }", "title": "" }, { "docid": "5e28bc59cffaacbd443ac1937265c50b", "score": "0.76987165", "text": "public function run()\n {\n $this->call(PostsTableSeeder::class);\n $this->call(SiswaSeeder::class);\n $this->call(MusicsTableSeeder::class);\n $this->call(FilmSeeder::class);\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tabungan::class, 100)->create();\n factory(App\\Costumer::class, 1000)->create();\n }", "title": "" }, { "docid": "55df2400596f6d82130eb26db7635b8b", "score": "0.7695885", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contact::truncate();\n \n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n Contact::create([\n 'first_name' => $faker->name,\n 'last_name' => $faker->name,\n 'email' => $faker->email,\n 'telephone' => $faker->phoneNumber,\n 'contact_type' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "d250f232a40eb13d0fa688dd5dc63e8c", "score": "0.7693821", "text": "public function run()\n {\n factory(App\\User::class,5)->create();\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'password' => bcrypt('123456'),\n 'type' => 1,\n 'confirmed' =>1,\n ]);\n\n factory(App\\Category::class,5)->create();\n\n $categories_array = App\\Category::all('id')->pluck('id')->toArray();\n\n $post = factory(App\\Post::class,20)->create()->each(function($post) use ($categories_array){\n $this->attachRandomCategoriesToPost($post->id, $categories_array);\n $this->addCommentsToPost($post->id);\n });\n }", "title": "" }, { "docid": "f440a18e1170b8250c14144757b8cc81", "score": "0.76937693", "text": "public function run()\n\t{\n\t\t//\n\t\tApp\\Book::truncate();\n\t\tApp\\Genre::truncate();\n\t\tApp\\Author::truncate();\n\n\t\tfactory(App\\Book::class, 50)->create()->each(function($books) {\n\t\t$books->authors()->save(factory(App\\Author::class)->make());\n\t\t$books->genres()->save(factory(App\\Genre::class)->make());\n\t\t});\n\t}", "title": "" }, { "docid": "14bcfcdf178e55585d48d15b958ccfc6", "score": "0.7693058", "text": "public function run()\n {\n $data = json_decode(file_get_contents(database_path('seeds/data/voyager.json')), true);\n foreach ($data as $table => $tableData) {\n $this->command->info(\"Seeding ${table}.\");\n \\Illuminate\\Support\\Facades\\DB::table($table)->delete();\n \\Illuminate\\Support\\Facades\\DB::table($table)->insert($tableData);\n }\n\n// $this->seed('DataTypesTableSeeder');\n// $this->seed('DataRowsTableSeeder');\n $this->seed('MenusTableSeeder');\n// $this->seed('MenuItemsTableSeeder');\n $this->seed('RolesTableSeeder');\n $this->seed('PermissionsTableSeeder');\n $this->seed('PermissionRoleTableSeeder');\n $this->seed('SettingsTableSeeder');\n }", "title": "" }, { "docid": "dbd59b913d32cfed4a7fd5cda3083940", "score": "0.7692271", "text": "public function run()\n {\n //\n DB::table('oa')->delete();\n\n DB::table('oa')->insert([\n /*'id' => 1,*/\n /*'id_educativo' => 1,\n 'id_general' => 1,\n 'id_clasificacion' => 1,\n 'id_tecnica' => 1,*/\n ]);\n\n $this->call(Lom_generalSeeder::class);\n $this->call(Lom_clasificacionSeeder::class);\n $this->call(Lom_educativoSeeder::class);\n $this->call(Lom_tecnicaSeeder::class);\n }", "title": "" }, { "docid": "654191b89a3f7b4f8f809dd4ca1e2f6d", "score": "0.76909655", "text": "public function run()\n {\n /**\n * Create default user for admin, lecturer and student\n */\n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@e-learning.com',\n 'password' => Hash::make('admin'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Sample Lecturer',\n 'email' => 'lecturer@e-learning.com',\n 'password' => Hash::make('lecturer'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Student',\n 'email' => 'student@e-learning.com',\n 'password' => Hash::make('student'),\n 'role' => 'student'\n ]);\n\n /**\n * Create random 300 users with faker and role/password equal \"student\"\n */\n factory(App\\User::class, 300)->create();\n\n // run with php artisan migrate --seed\n }", "title": "" }, { "docid": "82fbb499231e85aef13b133c2fd7bebb", "score": "0.76907074", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Tomas Landa',\n 'email' => 'tomaslanda1989@gmail.com',\n 'password' => Hash::make('123456789'),\n ]);\n\n\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n\n\n }", "title": "" }, { "docid": "7d5e2b097fa405f728e42815bc2fa95f", "score": "0.76902896", "text": "public function run()\n {\n Category::create(['name' => 'remeras']);\n Category::create(['name' => 'camperas']);\n Category::create(['name' => 'pantalones']);\n Category::create(['name' => 'gorras']);\n Category::create(['name' => 'mochilas']);\n Category::create(['name' => 'Sombreros']);\n Category::create(['name' => 'Muñequeras']);\n Category::create(['name' => 'Medias']);\n\n $discounts = Discount::factory(40)->create();\n\n $products = Product::factory(50)\n ->make()\n ->each(function ($product){\n $categories = Category::all();\n $product->category_id = $categories->random()->id;\n $product->save();\n });\n\n }", "title": "" }, { "docid": "acbc8ce8381dd5242a3f70eb7db2f7b0", "score": "0.76889795", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'name' => 'mohamed magdy',\n 'email' => 'mohamedbendary1994@gmail.com'\n ]);\n factory(User::class)->create([\n 'name' => 'ahmed magdy',\n 'email' => 'ahmed@gmail.com'\n ]);\n factory(User::class)->create([\n 'name' => 'abdelhameed',\n 'email' => 'abdo@gmail.com'\n ]);\n }", "title": "" }, { "docid": "1bfaef844c455e578ca42264d7b5fd55", "score": "0.76846653", "text": "public function run()\n {\n factory(User::class, 10)->create();\n factory(Category::class, 6)->create();\n factory(Question::class, 60)->create();\n factory(Reply::class, 160)->create();\n factory(Like::class, 200)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "b9641bc88f5f5c670d56d18a040a9927", "score": "0.7675924", "text": "public function run()\n {\n //création de seeder grace a faker\n // $faker = Faker::create();\n // for ($user = 0; $user < 10; $user++){\n // \\App\\User::create([\n // 'name' => $faker->name,\n // 'email' => $faker->unique()->safeEmail,\n // 'password' =>bcrypt('secret')\n // ]);\n // }\n \\App\\User::create([\n 'name' =>'Admin',\n 'email' => 'admin@admin.fr',\n 'password' =>bcrypt('adminadmin'),\n 'admin' =>1\n ]);\n\n\n //permet de créer des utilisateurs sans les relations\n factory(\\App\\User::class, 20)->create();\n\n //permet de créer 10 articles chacun écrit par un seul utilisateur\n // factory(\\App\\User::class, 10)->create()->each(function ($u) {\n // $u->articles()->save(factory(\\App\\Article::class)->make());\n // });\n\n //Permet de creer 20 articles par utilisateur -> 15x 20\n // $user = factory(\\App\\User::class, 15)->create();\n // $user->each(function ($user) {\n // factory(\\App\\Article::class, 20)->create([\n // 'user_id' => $user->id\n // ]);\n // });\n }", "title": "" }, { "docid": "0a79213fd15a52faa35b5d39bdf72ab9", "score": "0.7673569", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Categoria::class, 2)->create();\n\n //Se crearan 40 post\n factory(App\\Curso::class, 40)->create();\n }", "title": "" }, { "docid": "3114ddd54d20a2718dff9452d5974cde", "score": "0.76679426", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 20) as $index) {\n \\DB::table('employees')->insert([\n 'name' => $faker->name,\n 'age' => rand(22, 40),\n 'email' => $faker->email,\n 'gender' => $faker->randomElement(array('male', 'female')),\n 'country' => $faker->country\n ]);\n }\n }", "title": "" }, { "docid": "032e6df09c32ce0c18c6e5a3dcfd03cd", "score": "0.76679265", "text": "public function run()\n {\n\t DB::table('roles')->insert([\n\t\t 'name' => 'admin'\n\t ]);\n\n\t DB::table('users')->insert([\n\t\t 'name' => 'David Trushkov',\n\t\t 'email' => 'davidisback4good@hotmail.com',\n\t\t 'password' => bcrypt('d16331633'),\n\t\t 'remember_token' => str_random(10),\n\t\t 'verified' => 1,\n\t\t 'token' => '',\n\t\t 'avatar' => '',\n\t\t 'created_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t\t 'updated_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t ]);\n\n\t DB::table('user_role')->insert([\n\t\t 'user_id' => 1,\n\t\t 'role_id' => 1\n\t ]);\n\n\t $this->call(UserTableSeeder::class);\n\t $this->call(FilesTableSeeder::class);\n\t $this->call(FileUploadsTableSeeder::class);\n\t $this->call(SalesTableSeeder::class);\n\t $this->call(FileCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "fec3323e6f3a81f6348e08d8097828b8", "score": "0.76672584", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Listing::truncate();\n\n $userQuantity=5;\n $listingQnt=100;\n\n factory(App\\User::class,$userQuantity)->create();\n factory(App\\Listing::class,$listingQnt)->create();\n }", "title": "" }, { "docid": "fd3e02773eac9af1278393c90e1ec5e3", "score": "0.7666974", "text": "public function run()\n {\n User::truncate();\n\n User::create([\n 'name' => 'admin',\n 'password' => bcrypt('secret'),\n 'role' => 'admin',\n ]);\n\n User::create([\n 'name' => 'operator',\n 'password' => bcrypt('secret'),\n 'role' => 'operator',\n ]);\n\n User::create([\n 'name' => 'employee',\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n\n $faker = Factory::create('id_ID');\n\n for ($i = 0; $i < 12; $i++) {\n User::create([\n 'name' => $faker->name,\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n }\n\n }", "title": "" }, { "docid": "2344b2d3d5ee3f98e7bbbe7784cad8c9", "score": "0.7663209", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n $counry = Country::inRandomOrder()->first()->country;\n $city = City::inRandomOrder()->where('country', $counry)->first()->city;\n\n Agencies::create([\n 'name' => $faker->company,\n 'address' => $faker->address,\n\t\t\t\t'city' => $city,\n\t\t\t\t'countri' => $counry,\n\t\t\t\t'phone' => $faker->phoneNumber,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'web' => \"www.addadadadad.com\",\n ]);\n }\n }", "title": "" }, { "docid": "acc4a55ca590e54c9d9cae8f6b80d13b", "score": "0.7662981", "text": "public function run()\n {\n User::factory(100)->create();\n $this->call([\n UserSeeder::class,\n ]);\n Article::factory()->count(100)->create();\n Rate::factory()->count(1000)->create();\n\n }", "title": "" }, { "docid": "47d7ad0594d6fea4c95ece125a11f12f", "score": "0.76622707", "text": "public function run()\n {\n\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('menus')->insert([\n 'title' => $faker->firstName(),\n 'price' => $faker->randomNumber(2),\n 'weight' => $faker->randomNumber(2),\n 'meat' => $faker->randomNumber(2),\n 'about' => $faker->realText(rand(10, 20))\n ]);\n }\n\n //\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('restaurants')->insert([\n 'title' => $faker->company(),\n 'customer' => $faker->randomNumber(2),\n 'employee' => $faker->randomNumber(2),\n // 'menu_id' => $faker->randomNumber(1),\n\n ]);\n }\n }", "title": "" }, { "docid": "317d47304eb6df80c5511ceb3b9b995f", "score": "0.76618236", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 10; $i++) { \n BeTagModel::create([\n 'name' => $faker->sentence,\n 'name_alias' => implode('',$faker->sentences(4)),\n 'status' => $faker->randomDigit(),\n 'created_by' => $faker->unixTime(),\n 'updated_by' => $faker->unixTime(),\n 'created_at' => $faker->unixTime(),\n 'updated_at' => $faker->unixTime(),\n ]);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "0de657d649c6926b71b8f5e0b4af5374", "score": "0.76618147", "text": "public function run() {\n // Example list, this seed will only create admin role, if you wanna create user account, please use normal register.\n // The pattern for each list value will be array[0] for username, array[1] for password (it will be hashed later, calma) and array[2] for email.\n // Add as many as you like.\n $list = array(\n array('pulselab', 'nopassword', 'plj@un.or.id'),\n );\n\n DB::collection('users')->delete();\n DB::collection('users')->insert(array_map(function($o) {\n return array(\n 'username' => $o[0],\n 'password' => app('hash')->make(sha1($o[1])),\n 'email' => $o[2],\n 'facebook_id' => '',\n 'twitter_id' => '',\n 'point' => 0,\n 'role' => 'admin',\n 'word_translated' => 0,\n 'word_categorized'=> 0,\n 'languages'\t\t => '',\n 'isconfirmed'\t => true,\n 'resetcode'\t\t => '',\n 'isVirgin' => 0,\n );\n }, $list));\n }", "title": "" }, { "docid": "591cc779df1a315a5bb877f8e1fe4600", "score": "0.7660859", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('indicadores')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('indicadores')->insert([\n 'rels' => json_encode([$faker->words(3)]),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->sentence,\n 'ano_inicial' => $faker->numberBetween(2019,2025),\n 'ano_final' => $faker->numberBetween(2025,2030),\n 'status_atual' => $faker->randomNumber(3),\n 'status_final' => $faker->boolean(),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n 'status' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "9bf3fa05d4ae071adbab0386bc123da6", "score": "0.7660738", "text": "public function run()\n {\n $data = [];\n $faker = Factory::create();\n\n for ($i = 0; $i < 100; $i++) {\n $data[] = [\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'email' => $faker->email(),\n 'created_at' => date('Y-m-d H:i:s'),\n ];\n }\n\n $users = $this->table(DbConfig::DB_USER_TABLE);\n $users->insert($data)\n ->saveData();\n }", "title": "" }, { "docid": "4928806405a07b1df0cb55aaf31cc6fd", "score": "0.76591706", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Section::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few Section in our database:\n for ($i = 0; $i < 10; $i++) {\n Section::create([\n 'name' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "ac091d03c70afaa39edeb6588c3c3993", "score": "0.7657682", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //semillero cuando se ejecute el comando migrate se crearan en automatico los datos\n factory(User::class)->create(['email'=>'pablo.nolasco@live.com']);\n factory(User::class, 50)->create();\n factory(Forum::class, 20)->create();\n factory(Post::class, 50)->create();\n factory(Reply::class, 100)->create();\n }", "title": "" } ]
b7636df154d7294ffbe4bf54143c42e1
Get the name for the currently authenticated user.
[ { "docid": "d63a0aa84a39a41e15f0603ab4c146de", "score": "0.0", "text": "public function name();", "title": "" } ]
[ { "docid": "2b95f8c59b2506fc023b2afc899d0d6f", "score": "0.8574698", "text": "public function getUserName()\n {\n $currentUser = $this->getUser();\n return $currentUser['name'];\n }", "title": "" }, { "docid": "5cbe2846537becc7841ae6f004847e2f", "score": "0.8275954", "text": "public function getNameUser()\n {\n return $this->nameUser;\n }", "title": "" }, { "docid": "f94231ea48c70bc007a8b4b569b443d0", "score": "0.8205619", "text": "public function getCurrentUserName() {\n\t\t\t\treturn $this->name;\n\n\t\t\t}", "title": "" }, { "docid": "51e083ab37fd3d3da8403852bd10d28a", "score": "0.81998783", "text": "public function getUserName()\n {\n $value = $this->get(self::user_name);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "789f94d837dbc9966da039fa4565744f", "score": "0.8196772", "text": "public function getName()\n\t{\n\t\tif( Auth::check() )\n\t\t{\n\t\t\tif( Auth::user()->id == $this->id )\n\t\t\t{\n\t\t\t\treturn 'Your';\n\t\t\t}\n\t\t}\n\n\t\treturn $this->getActualName();\n\t}", "title": "" }, { "docid": "9629f4740e6bd20baa50699871fde69d", "score": "0.81555146", "text": "public function getUserName()\n {\n return $this->user_name;\n }", "title": "" }, { "docid": "9629f4740e6bd20baa50699871fde69d", "score": "0.81555146", "text": "public function getUserName()\n {\n return $this->user_name;\n }", "title": "" }, { "docid": "e3193b6a967eb71433bbc176e70bae01", "score": "0.80823714", "text": "public function getLoggedInUserName()\n {\n return $this->getLoggedInUser() != null ? $this->getLoggedInUser()->getUserName() : null;\n }", "title": "" }, { "docid": "15be028e2490969caf8c5f78147ee51b", "score": "0.804233", "text": "public function getName()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fc3ec943e83e124d0b51793a982622ee", "score": "0.7986857", "text": "public function getName()\n\t{\n\t\treturn $this->username;\n\t}", "title": "" }, { "docid": "f815be3bcd4cbd2b6d15c6ef28bd21eb", "score": "0.798598", "text": "public function getUserName() {\n return BaseUser::findFirst($this->userid)->getFullName();\n }", "title": "" }, { "docid": "3767581c13f7a8c2dfe290297d253576", "score": "0.79843646", "text": "public function getUsername()\n {\n return $this->getName();\n }", "title": "" }, { "docid": "3767581c13f7a8c2dfe290297d253576", "score": "0.79843646", "text": "public function getUsername()\n {\n return $this->getName();\n }", "title": "" }, { "docid": "fc605063edda66a6830a73d6678f1b24", "score": "0.79788405", "text": "static public function getUserName()\n {\n return (string) self::get()->username;\n }", "title": "" }, { "docid": "d5c83cedae201324f15e4297d43f5172", "score": "0.79707277", "text": "public function getName()\n\t\t{\n\t\t\treturn ($this->_realname) ? $this->_realname : $this->_username;\n\t\t}", "title": "" }, { "docid": "26eff3ba5034127e63f301e6fedf2906", "score": "0.7946012", "text": "public function getUserName()\n {\n $value = $this->get(self::USERNAME);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "7e2a578f6f527ab612bafa5c2f773334", "score": "0.7941137", "text": "public function getUserName()\n {\n return $this->userName;\n }", "title": "" }, { "docid": "7e2a578f6f527ab612bafa5c2f773334", "score": "0.7941137", "text": "public function getUserName()\n {\n return $this->userName;\n }", "title": "" }, { "docid": "7e2a578f6f527ab612bafa5c2f773334", "score": "0.7941137", "text": "public function getUserName()\n {\n return $this->userName;\n }", "title": "" }, { "docid": "3b4f26fcc2379bb4ebf4626801cb08d0", "score": "0.7937513", "text": "public function getName()\n {\n return $this->getUsername();\t\n }", "title": "" }, { "docid": "48a1a9eacb926dd8170f4f4cccf5312e", "score": "0.7933464", "text": "public function getUsername()\n {\n return $this->name;\n }", "title": "" }, { "docid": "f039a68f81e66b36bae5f685a4b3f075", "score": "0.7927699", "text": "public function getUserName() {\n return $this->userName;\n }", "title": "" }, { "docid": "185ce086b67edb1ce2395b52a2ebb3d8", "score": "0.79203516", "text": "static public function GetCurrentUserName()\n\t{\n\t\tif (UserRights::IsImpersonated())\n\t\t{\n\t\t\t$sUserString = Dict::Format('UI:Archive_User_OnBehalfOf_User', UserRights::GetRealUserFriendlyName(), UserRights::GetUserFriendlyName());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sUserString = UserRights::GetUserFriendlyName();\n\t\t}\n\t\treturn $sUserString;\n\t}", "title": "" }, { "docid": "1ff2a7f009f3ba0e0ab5fa8e05990b39", "score": "0.7903795", "text": "function getUserName() {\n // requirement is removed.\n return $this->user->getEmail();\n }", "title": "" }, { "docid": "add45ea0316dd4ba46bd24d9f0769559", "score": "0.79015446", "text": "public function userName()\n {\n $user = User::find($this->agent);\n return $user->name;\n }", "title": "" }, { "docid": "5c45d1065949eaa93a06456e666adbd4", "score": "0.78898245", "text": "public function getUsername()\n\t{\n\t\treturn $this->user ? $this->user->getUsername() : '';\n\t}", "title": "" }, { "docid": "baf585316cc655d51311d573341c0ae4", "score": "0.7889083", "text": "public function getName() {\n\t\tglobal $system;\n\t\tif (! isset ( $this->name )) {\n\t\t\t$statement = $system->getPdo()->prepare('SELECT username FROM user WHERE user_id = :id');\n\t\t\t$statement->bindValue(':id', $this->id, PDO::PARAM_INT);\n\t\t\t$statement->execute();\n\t\t\t$this->name = $statement->fetchColumn();\n\t\t}\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "9d1f8da6fccc19ef43afed6c663d8e91", "score": "0.7872448", "text": "public static function username() {\r\n\t\tif (self::is_auth()) {\r\n\t\t\treturn $_SESSION[self::KEY_USER_NAME];\r\n\t\t} else {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "bea04e161bdb56913ee0885ddf9df9f1", "score": "0.7867749", "text": "public static function get_user_name() {\n\t\t$current_user = wp_get_current_user();\n\t\treturn ! empty( $current_user->first_name ) ? $current_user->first_name : $current_user->display_name;\n\t}", "title": "" }, { "docid": "31cffadf57ecb24110d9ca8e53d3e0d5", "score": "0.7861769", "text": "public function getUserName()\n {\n return $this->userName;\n }", "title": "" }, { "docid": "35f52183524c0e6a3e83f75e89c1b880", "score": "0.78555554", "text": "public function getName() {\n\t return $this->_username;\n\t}", "title": "" }, { "docid": "a9cc019256925f90630fa6664be7180d", "score": "0.784281", "text": "public function getUserName() {\n\t\treturn $this->userName;\n\t}", "title": "" }, { "docid": "a9cc019256925f90630fa6664be7180d", "score": "0.784281", "text": "public function getUserName() {\n\t\treturn $this->userName;\n\t}", "title": "" }, { "docid": "160117503f3e9012a2354f9a7b70bb03", "score": "0.782165", "text": "public function getName()\n {\n if (!$this->isAuthorizedVisitor()) {\n return null;\n }\n\n $identity = $this->session->get('auth');\n\n return $identity['name'];\n }", "title": "" }, { "docid": "d993f266ee51fec6629005a550a94c52", "score": "0.78164095", "text": "public static function getDisplayName() \n\t{\n\t\treturn $_SESSION[\"UserName\"];\n\t}", "title": "" }, { "docid": "f6a02efe8b0c2ee28e6625e9729073fa", "score": "0.77848345", "text": "public function getUsername()\n {\n return $this->USER_NAME;\n }", "title": "" }, { "docid": "3eaad386cd1841688815c5a39cdd3d4e", "score": "0.7781826", "text": "public function edd_slg_get_user_name() {\n $this->edd_slg_get_user_details();\n if (!$this->user)\n return FALSE;\n return apply_filters('edd_slg_get_user_name', $this->user->getName());\n }", "title": "" }, { "docid": "9cd6d1d21872734c6965f7b1534d81fa", "score": "0.77468055", "text": "function LoggedInName()\n {\n $this->_load();\n $str = $this->usermanip->LoggedInName();\n return $str;\n }", "title": "" }, { "docid": "46a9c157501ae594a9c3a30bf7b1dca6", "score": "0.77467173", "text": "private function getUserName()\n\t{\n\n\t\t$user = $this->request->user();\n\n\t\t$name = trim($user->first_name . ' ' . $user->second_name);\n\n\t\tif ($name === \"\") {\n\t\t\t$name = 'USERNAME';\n\t\t};\n\n\t\treturn $name == \"\" ? 'USERNAME' : $name;\n \t}", "title": "" }, { "docid": "2bf6a00a642b4c4676d8bbe626e3c14f", "score": "0.774247", "text": "public function get_current_user() {\n\t\treturn Auth::instance()->get_user()->get_username();\n\t}", "title": "" }, { "docid": "063997e3dcae1662e552a4ffce02dc81", "score": "0.7735413", "text": "function getUsername()\n {\n return $this->getName();\n }", "title": "" }, { "docid": "b8bbb73c848a7fec385e733dce739847", "score": "0.7733918", "text": "function getUserName()\n {\n if ($this->CI->config->item('FAL') && $this->CI->db_session)\n \n \t// returns username string of currently logged in user\n \treturn $this->CI->db_session->userdata('user_name');\n \n // returns empty string if user not logged in\n return '';\n }", "title": "" }, { "docid": "010be093dc134976a103eb6d474f0173", "score": "0.77248937", "text": "public function getName() : string\n {\n return $this->getProperty()->username;\n }", "title": "" }, { "docid": "4e2e23dde8d54070e4265d5caa216b43", "score": "0.7713585", "text": "public function getName() {\n $model = $this->loadModel(Yii::app()->user->id);\n return isset($model->user_username) ? $model->user_username : null;\n }", "title": "" }, { "docid": "126c7a7b45a0ebbd09965cfc9f540bb5", "score": "0.77106607", "text": "public function getUserName() {\n return $this->username;\n }", "title": "" }, { "docid": "991d87b22726c5f9f5c1ae7b60d7d7b9", "score": "0.7709262", "text": "function get_user_name() { \n\t\t\n\t\t$user = new User($this->user);\n\t\tif ($user->username) { \n\t\t\treturn $user->fullname . \" (\" . $user->username . \")\";\n\t\t}\n\t\t\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "e5b045351cb71d57f43e8ac955a6f48f", "score": "0.7704543", "text": "public function getUserName() : string\n {\n return $this->getProperty()->username;\n }", "title": "" }, { "docid": "8e0edf11fdc2d23090e0d9b44035f851", "score": "0.7649802", "text": "public function getUserName()\n {\n if (array_key_exists(\"userName\", $this->_propDict)) {\n return $this->_propDict[\"userName\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "b26d90abc51c68602e142765f0860d21", "score": "0.7591864", "text": "public function getUsername()\n {\n return $this->params['user'] ?? null;\n }", "title": "" }, { "docid": "a89d3f23c468481a563b3a4fc63d3464", "score": "0.7580002", "text": "public function getUserName()\n\t{\n\t\tif (isset($_POST[self::$name])) {\n\t\t\treturn $_POST[self::$name];\n\t\t} \n\t}", "title": "" }, { "docid": "95f1838c51f70fe7654ec9b61713ee9b", "score": "0.7578989", "text": "function getUsername()\n {\n return $this->name;\n }", "title": "" }, { "docid": "91f7a1f183d485121cca89d09bfa4620", "score": "0.7564435", "text": "public function getUsedName()\n {\n return sprintf(\n '%s (%s)',\n ucfirst(strtolower($this->getUserName())),\n $this->getEmail()\n );\n }", "title": "" }, { "docid": "0652bae4d61cef39c80d1b378efdf228", "score": "0.75375885", "text": "public function getUsername() : string {\n if (isset($this->_me)) {\n return $this->_me->getUsername();\n } else {\n return '';\n }\n }", "title": "" }, { "docid": "5ed34e02970b7f55ec5dc357c73ae2f3", "score": "0.75247693", "text": "public static function getUserName() \n\t{\n\t\treturn $_SESSION[\"UserID\"];\n\t}", "title": "" }, { "docid": "a9ae6efbf7c3151c22b2ed484fc6cd4f", "score": "0.75031316", "text": "public function GetUserName()\n {\n return $this->doctor['username'] ? $this->doctor['username'] : \"&nbsp;\";\n }", "title": "" }, { "docid": "154a783d1a5b1822b757673473eb7c55", "score": "0.7502054", "text": "public function getUsername()\n\t{\n\t\treturn empty($this->username) ? 'anonymous' : $this->username;\n\t}", "title": "" }, { "docid": "b6e1b5e9a761b622ac5a0167ffcdbacd", "score": "0.7500908", "text": "function getName() {\n if (isLoggedIn()) {\n $u = getUser();\n if ($u->isBanned()) {\n return $u->getName() . \" (BANNED)\"; \n } else {\n return \"Hello, \" . $u->getName();\n }\n }\n \n return \"\"; \n }", "title": "" }, { "docid": "e0628a0b8a074167336d18dca53cfaa1", "score": "0.7499549", "text": "public function doUserName()\n {\n return $this->doctor['username'];\n }", "title": "" }, { "docid": "065cef351cc97233424b87348060c9ec", "score": "0.74940765", "text": "public static function getUsername()\n {\n return $_SESSION['LOGGED_IN_USER'];\n }", "title": "" }, { "docid": "da18f9a90497a2da66a5276def539d19", "score": "0.74791557", "text": "public function getUsername() : string {\n return $this->_me->getUsername();\n }", "title": "" }, { "docid": "c03505eb99354617ade3956327031dc2", "score": "0.7474772", "text": "public function getNameWithUsername()\n\t\t{\n\t\t\treturn ($this->_realname) ? $this->_realname . ' (' . $this->_username . ')' : $this->_username;\n\t\t}", "title": "" }, { "docid": "6225709d596303fd4828c2299100adee", "score": "0.7437792", "text": "public static function getUserDisplayName()\r\n {\r\n $user = Zend_Auth::getInstance()->getIdentity();\r\n return is_null($user) ? null : $user->user_firstname . ' ' . $user->user_lastname;\r\n }", "title": "" }, { "docid": "70ff119ce8f7957bad322a3150435f4b", "score": "0.7423055", "text": "public function getUsername()\n {\n $value = $this->get(self::USERNAME);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "96f35b33601aa3ee0ff08ce87eb67e35", "score": "0.7418813", "text": "public function displayName() {\r\n if($this->id_user == 0) {\r\n return htmlspecialchars($this->name);\r\n }\r\n else {\r\n return $this->user->displayName();\r\n }\r\n }", "title": "" }, { "docid": "741cc114b41ccd388548236022406eff", "score": "0.7403567", "text": "public function getName()\n {\n if ($this->profile !== null && $this->profile->getName() !== ' ') {\n return $this->profile->getName();\n }\n\n return ucfirst($this->username);\n }", "title": "" }, { "docid": "21ebf8a36fceb55e0d91bc90378957ce", "score": "0.7401117", "text": "public function getUsername()\n {\n if ($this->userID != 0) {\n $result = self::callRemote('user.about', array('userID' => $this->userID), $this->sessionID);\n if (isset($result['result']['user']['username'])) {\n return $result['result']['user']['username'];\n } else {\n return '';\n }\n }\n return '';\n }", "title": "" }, { "docid": "931f60f77c5b242688f811615a495351", "score": "0.74008375", "text": "public function getUsername()\n {\n return $this->loginname;\n }", "title": "" }, { "docid": "cb70bad076b2a8bef439ca5f95b2d062", "score": "0.73990047", "text": "public function get_user_name() {\n $user = $this->_user;\n if (isset($user)) {\n return $user->get_name();\n } else {\n throw new SessionException(\"The anonymous user does not have name\");\n }\n }", "title": "" }, { "docid": "fb927bcbd78dc51be89305f6cb8f651f", "score": "0.73931164", "text": "public function username()\n\t{\n\t\t$user = Auth::user();\n\t\tif (isset($user)) {\n\t\t\t$username = $user->username;\n\t\t}\n\t\telse {\n\t\t\t$username = '';\n\t\t}\n\t\treturn $username;\t\t\n\t}", "title": "" }, { "docid": "348005b0b4688f875bf74d71eac457a0", "score": "0.7388444", "text": "public function username()\n {\n $module = new Authentication();\n $configuration = $module->getConfigValue();\n foreach ($configuration->fields as $field) {\n if ($field->type == 'EMAIL') {\n return $field->name;\n }\n }\n }", "title": "" }, { "docid": "442532ded507c7b5de1cc54b78fd120e", "score": "0.73823905", "text": "public function getUserName() {}", "title": "" }, { "docid": "b46850a237242a82d6df945100aa0a0d", "score": "0.73742163", "text": "public function get_logged_in_user_name(){\n\t // http://www.php-einfach.de/experte/php/cookies/\n\t return $_COOKIE[\"logged_in_username\"]; \t \n }", "title": "" }, { "docid": "5d3e9359329a451c88087942912c4f88", "score": "0.7353594", "text": "public function getUsername()\n\t{\n\t\treturn $this->getLogin();\n\t}", "title": "" }, { "docid": "1a4a916a2b493d1c77fe176f1a2a5c49", "score": "0.73531014", "text": "public function getUsername()\n {\n $username = $this->safeStorage->retrieveSafely('username');\n\n return $username !== null ? $username : 'anonymous';\n }", "title": "" }, { "docid": "710e08f7993a65015f3f9e1d1339197c", "score": "0.7349422", "text": "public function getUsername()\n {\n $value = $this->get(self::username);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "d60694fd062df28b70045e48b4d2edc0", "score": "0.73467857", "text": "public function username()\n {\n return 'name';\n }", "title": "" }, { "docid": "767ff4996ba62e1c1f9ef3565ac91f33", "score": "0.73437804", "text": "public function getUsername() {\n\t\treturn $this->user['username'];\n\t}", "title": "" }, { "docid": "6f693031f69016cdb94aafb756aea328", "score": "0.734357", "text": "public function getCurrentUsername();", "title": "" }, { "docid": "e66a7443ebf81e1f456958de0fa267e7", "score": "0.7331225", "text": "public function getFullName()\n {\n if (!$this->isAuthorizedVisitor()) {\n return null;\n }\n\n $identity = $this->session->get('auth');\n\n return $identity['fullname'];\n }", "title": "" }, { "docid": "97fbdc2db218b04ba44e49128ccf7ee6", "score": "0.7326784", "text": "public function getUsername() {\n\t global $wb;\n\t global $admin;\n\t if ($this->isFrontendActive()) {\n\t if ($wb->is_authenticated()) {\n\t return $wb->get_username(); }\n\t else {\n\t return self::unkownUser; }}\n\t else {\n\t if ($admin->is_authenticated()) {\n\t return $admin->get_username(); }\n\t else {\n\t return self::unkownUser; }}\n\t }", "title": "" }, { "docid": "d9bd81b264eb71aeb3c7d64078e929d8", "score": "0.7322088", "text": "public function getName()\r\n {\r\n return $this->admin->username;\r\n }", "title": "" }, { "docid": "74a6e31ef22d9c8b63feb4c8e8b80445", "score": "0.73151577", "text": "public function getDisplayName() {\n\t\treturn elgg_echo(\"collection:user:user\");\n\t}", "title": "" }, { "docid": "bb23b3eba6da2fa82859f0d76b0403d9", "score": "0.7306215", "text": "public function getUserName() {\n if(isset($this->first_name) && isset($this->last_name)) {\n return $this->first_name . ' ' . $this->last_name;\n } else {\n return $this->email;\n }\n }", "title": "" }, { "docid": "d5f061369491754cfd5261b0a5c8da3a", "score": "0.73053336", "text": "public function getUsername(): string\n {\n return $this->username;\n }", "title": "" }, { "docid": "d5f061369491754cfd5261b0a5c8da3a", "score": "0.73053336", "text": "public function getUsername(): string\n {\n return $this->username;\n }", "title": "" }, { "docid": "d5f061369491754cfd5261b0a5c8da3a", "score": "0.73053336", "text": "public function getUsername(): string\n {\n return $this->username;\n }", "title": "" }, { "docid": "edb0809d9eeab799b303fd6fde1ec082", "score": "0.73045164", "text": "public function getUsername()\n {\n if (!$this->isAuthorizedVisitor()) {\n return null;\n }\n\n $identity = $this->session->get('auth');\n\n return $identity['username'];\n }", "title": "" }, { "docid": "4f3f52caf59961c31774a99b1be4fcca", "score": "0.7301999", "text": "public function getUsername()\n {\n return $this->getWrappedObject()->username;\n }", "title": "" }, { "docid": "968ca457530bb9162a90943354c9fc4b", "score": "0.72940236", "text": "public function getDisplayName() {\n\t global $wb;\n\t global $admin;\n\t if (is_object($wb)) {\n\t \tif ($wb->is_authenticated()) {\n\t return $wb->get_display_name(); }\n\t else {\n\t return self::unkownUser; \n\t }\n\t }\n\t elseif (is_object($admin)) {\n\t \tif ($admin->is_authenticated()) {\n\t return $admin->get_display_name(); }\n\t else {\n\t return self::unkownUser;\n\t }\n\t } \n\t else {\n\t \treturn self::unkownUser;\n\t }\n\t /*\n\t if ($this->isFrontendActive()) {\n\t if ($wb->is_authenticated()) {\n\t return $wb->get_display_name(); }\n\t else {\n\t return self::unkownUser; }}\n\t else {\n\t if ($admin->is_authenticated()) {\n\t return $admin->get_display_name(); }\n\t else {\n\t return self::unkownUser; }}\n\t */\n\t }", "title": "" }, { "docid": "82fb9211eb0c92041813d3f4573323bb", "score": "0.7288382", "text": "public function getUsername() : string\n {\n return $this->username;\n }", "title": "" }, { "docid": "cadc2824057318bde87a2b7c73b9b462", "score": "0.72868717", "text": "public function getUsername()\n {\n return $this->getUserEmail();\n }", "title": "" }, { "docid": "2d16b971e4c9f17a8fbe275aa7a9f542", "score": "0.72598153", "text": "public function getUser(): string\n {\n return $this->user;\n }", "title": "" }, { "docid": "52e7d8a5469cdb814ee864f74443ae1e", "score": "0.72544986", "text": "public function getUserUsername(): string {\n\t\treturn $this-> userUsername;\n\t}", "title": "" }, { "docid": "610c5b42eeeb62c5588fde6c62709629", "score": "0.72539806", "text": "public function getUsername(): string\n {\n return $this->username ?? '';\n }", "title": "" }, { "docid": "1a998ec8b9f16a37029908c22d66aac1", "score": "0.72506833", "text": "public function getCurrentUsername()\n {\n return $this->currentUsername;\n }", "title": "" }, { "docid": "220d312e4204760720dcae32d0cbea82", "score": "0.72463495", "text": "public function getUsername() : string\n\t{\n\t\treturn $this->username;\n\t}", "title": "" }, { "docid": "43ac69a00573d72e16552002d7259602", "score": "0.72415155", "text": "public function getFullName()\n {\n return $this->_userFullName;\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.7241432", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.7241432", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" }, { "docid": "8d5b78da1218d9ac97c757d02af1f619", "score": "0.7237758", "text": "public function getUserName();", "title": "" }, { "docid": "8d5b78da1218d9ac97c757d02af1f619", "score": "0.7237758", "text": "public function getUserName();", "title": "" } ]
1035d0d482ab54845f883258e791236f
/Get Events By Fucntion
[ { "docid": "2cc4a2f24d17a6cebb5daca70df8a21e", "score": "0.0", "text": "public function Event()\n {\n $this->form_validation->set_rules('user_id', 'user_id', 'required');\n $this->form_validation->set_rules('function_id', 'function_id', 'required');\n \n if ($this->form_validation->run() == false) {\n $this->api->api_message(0, ALL_FIELD_MANDATORY);\n exit();\n } //$this->form_validation->run() == false\n \n $user_id = $this->input->post('user_id', TRUE);\n $function_id = $this->input->post('function_id', TRUE);\n $data = $this->Api_model->getSingleRow(FCN_TBL, array(\n 'id' => $function_id,\n 'user_id' => $user_id\n ));\n if (!empty($data)) {\n $data->image = base_url() . $data->image;\n $productsImage = $this->Api_model->getAllDataWhereConcat(array(\n 'function_id' => $data->id\n ), 'function_gallery');\n $getUser = $this->Api_model->getSingleRow('user', array(\n 'id' => $data->user_id\n ));\n $data->user_name = $getUser->name;\n $data->media = $productsImage;\n $going = $this->Api_model->getAllDataWhere(array(\n 'function_id' => $function_id,\n 'user_id' => $user_id,\n 'invitation_status' => 1\n ), 'guest_list');\n $pending = $this->Api_model->getAllDataWhere(array(\n 'function_id' => $function_id,\n 'user_id' => $user_id,\n 'invitation_status' => 0\n ), 'guest_list');\n $invited = $this->Api_model->getAllDataWhere(array(\n 'function_id' => $function_id,\n 'user_id' => $user_id\n ), 'guest_list');\n $data->invited = count($invited);\n $data->going = count($going);\n $data->pending = count($pending);\n \n \n $getAgenda = $this->Api_model->getAllDataWhere(array(\n 'function_id' => $function_id,\n 'user_id' => $user_id\n ), 'events_list');\n \n if ($getAgenda) {\n $getAgendaa = array();\n foreach ($getAgenda as $getAgenda) {\n $getGuest = $this->Api_model->getAllDataWhere(array(\n 'function_id' => $getAgenda->function_id\n ), 'guest_list');\n $going = $this->Api_model->getAllDataWhere(array(\n 'function_id' => $getAgenda->function_id,\n 'invitation_status' => 1\n ), 'guest_list');\n $pending = $this->Api_model->getAllDataWhere(array(\n 'function_id' => $getAgenda->function_id,\n 'invitation_status' => 0\n ), 'guest_list');\n $Image = $this->Api_model->getAllDataWhereConcat1(array(\n 'event_id' => $getAgenda->id\n ), 'event_gallery');\n $getAgenda->media = $Image;\n // $getAgenda->image = base_url() . $getAgenda->image;\n $getAgenda->invited = count($getGuest);\n $getAgenda->going = count($going);\n $getAgenda->pending = count($pending);\n array_push($getAgendaa, $getAgenda);\n } //$getAgenda as $getAgenda\n } //$getAgenda\n \n if ($getAgenda) {\n array_multisort($getAgendaa, SORT_ASC, $getAgendaa);\n $data->All_Agenda = $getAgendaa;\n }\n //$getAgenda\n else {\n $data->All_Agenda = array();\n }\n \n $getPost = $this->Api_model->getAllDataWhere(array(\n 'function_id' => $function_id,\n 'user_id' => $user_id\n ), 'post');\n \n if ($getPost) {\n $getPosts = array();\n foreach ($getPost as $getPost) {\n $getServicename = $this->Api_model->getSingleRow('function', array(\n 'id' => $getPost->function_id\n ));\n $getUsername = $this->Api_model->getSingleRow('user', array(\n 'id' => $user_id\n ));\n $getPost->Function_name = $getServicename->title;\n $getPost->user_name = $getUsername->name;\n $getPost->user_image = base_url() . $getUsername->image;\n $Image = $this->Api_model->getAllDataWhereConcat(array(\n 'post_id' => $getPost->id\n ), 'post_gallery');\n $getPost->media = $Image;\n \n $checkLike = $this->Api_model->getSingleRow(LKS_TBL, array(\n 'post_id' => $getPost->id,\n 'user_id' => $user_id\n ));\n if ($checkLike) {\n $getPost->is_like = 1;\n } //$checkLike\n else {\n $getPost->is_like = 0;\n }\n $getPost->comments = $this->Api_model->getCountWhere(CMT_TBL, array(\n 'post_id' => $getPost->id\n ));\n $getPost->likes = $this->Api_model->getCountWhere(LKS_TBL, array(\n 'post_id' => $getPost->id,\n 'status' => 1\n ));\n $getPost->image_count = $this->Api_model->getCountWhere('post_gallery', array(\n 'post_id' => $getPost->id\n ));\n $getComments = $this->Api_model->getAllDataWhere(array(\n 'post_id' => $getPost->id\n ), CMT_TBL);\n \n $getComment = array();\n foreach ($getComments as $getComments) {\n $getUser = $this->Api_model->getSingleRow(USR_TBL, array(\n 'id' => $getComments->user_id\n ));\n $getComments->user_name = $getUser->name;\n $getComments->user_image = base_url() . $getUser->image;\n array_push($getComment, $getComments);\n } //$getComments as $getComments\n \n $getPost->getComments = $getComment;\n array_push($getPosts, $getPost);\n } //$getAgenda as $getAgenda\n } //$getAgenda\n if ($getPost) {\n array_multisort($getPosts, SORT_ASC, $getPosts);\n $data->All_Post = $getPosts;\n } //$getAgenda\n else {\n $data->All_Post = array();\n }\n $getServices = $this->Api_model->getAllDataWhere(array(\n 'status' => '1'\n ), 'service_type');\n \n if ($getServices) {\n $getServicess = array();\n foreach ($getServices as $getServices) {\n $getServices->image = base_url() . $getServices->image;\n array_push($getServicess, $getServices);\n } //$getServices as $getServices\n } //$getServices\n if ($getServices) {\n array_multisort($getServicess, SORT_ASC, $getServicess);\n $data->All_Servicess = $getServicess;\n } //$getServices\n else {\n $data->All_Servicess = $getServicess;\n }\n }\n \n if ($data) {\n $this->api->api_message_data(1, ALL_EVENTS, 'dashboard_data', $data);\n } //$data\n else {\n $this->api->api_message(0, NO_DATA);\n }\n }", "title": "" } ]
[ { "docid": "b0dee8bb154e409ec462624bfa5ab5ca", "score": "0.81008446", "text": "public static function getEvents();", "title": "" }, { "docid": "669a74583fa5dbd900618c010e61a64f", "score": "0.80455554", "text": "abstract public function getEvents();", "title": "" }, { "docid": "cf15ee9e5537c792a5ca4641c950cf69", "score": "0.80289215", "text": "public function getEvents();", "title": "" }, { "docid": "cf15ee9e5537c792a5ca4641c950cf69", "score": "0.80289215", "text": "public function getEvents();", "title": "" }, { "docid": "44f85449ae8b21f4c7ddc8887bbf35a2", "score": "0.7567462", "text": "function getEvent();", "title": "" }, { "docid": "bd9a92057b48daf7d5d8e5e9b356351a", "score": "0.75273746", "text": "public function getEvent();", "title": "" }, { "docid": "bd9a92057b48daf7d5d8e5e9b356351a", "score": "0.75273746", "text": "public function getEvent();", "title": "" }, { "docid": "bd9a92057b48daf7d5d8e5e9b356351a", "score": "0.75273746", "text": "public function getEvent();", "title": "" }, { "docid": "6b1d3945fb6811d9c1363d5b6bcb0744", "score": "0.7386369", "text": "public abstract function getEvent();", "title": "" }, { "docid": "18ca2fcacabaa947c9a8c348b79e8667", "score": "0.7243327", "text": "public function getEventsAll();", "title": "" }, { "docid": "1729e4155262747cb32a1cb7df86802b", "score": "0.7004525", "text": "public function getEvents() {\n if (Phpfox::isModule('event') || Phpfox::isModule('fevent')) {\n \n (Phpfox::isModule('fevent')==true ? $sTableName = 'fevent' : $sTableName = 'event' );\n \n //get country iso of current user\n $sCountryIso = Phpfox::getUserBy('country_iso');\n \n $iLimit = (int) Phpfox::getUserParam('suggestion.number_of_entries_display_in_blocks');\n $aRows = $this->database()\n ->select('*')\n ->from(Phpfox::getT($sTableName), 'e')\n //->where('e.end_time > ' . PHPFOX_TIME . ' AND user_id != ' . (int) Phpfox::getUserId())//get event not expect current user\n ->where('e.end_time > ' . PHPFOX_TIME . ' AND e.country_iso =\"' . $sCountryIso . '\"')\n ->order('e.time_stamp DESC')\n ->limit($iLimit)\n ->execute('getRows');\n \n \n if (count($aRows) < $iLimit){\n $iRemainItems = $iLimit - count($aRows);\n //get remain items with other location\n $aRows2 = $this->database()\n ->select('*')\n ->from(Phpfox::getT($sTableName), 'e')\n //->where('e.end_time > ' . PHPFOX_TIME . ' AND user_id != ' . (int) Phpfox::getUserId())//get event not expect current user\n ->where('e.end_time > ' . PHPFOX_TIME . ' AND e.country_iso !=\"' . $sCountryIso . '\"')\n ->order('e.time_stamp DESC')\n ->limit($iRemainItems)\n ->execute('getRows');\n $aRows = array_merge($aRows, $aRows2);\n }\n \n if (count($aRows) > 0) {\n foreach ($aRows as &$aRow) {\n $sCallback = $sTableName.'.callback';\n $sLink = Phpfox::getService($sCallback)->getFeedRedirect($aRow['event_id']);\n \n $aRow['title_link'] = Phpfox::getService('suggestion.url')->makeLink($sLink, $aRow['title']);\n //$aRow['join_link'] = Phpfox::getService('suggestion.url')->makeLink($sLink, Phpfox::getPhrase('suggestion.join_event'));\n \n $aUser = Phpfox::getService('suggestion')->getUser($aRow['user_id']);\n $aUser['suffix'] = '_50_square';\n $aUser['max_width'] = '50';\n $aUser['max_height'] = '50';\n $aUser['user'] = $aUser;\n $img = '<span class=\"thumb\">' . Phpfox::getLib('phpfox.image.helper')->display($aUser) . '</span>';\n\t\t\t\t\t$pattern = '/(.+)href=\"(.+)\" title(.+)/i';\n\t\t\t\t\t$replacement = 'href=\"${2}';\n\t\t\t\t\t$strtmp = preg_replace($pattern, $replacement, $img);\n\t\t\t\t\t$img = str_replace($strtmp,'href=\"'.$sLink,$img);\n\n $aRow['img'] = $img;\n\n $aRow['link'] = $sLink;\n \n $aRow['encode_link'] = base64_encode($aRow['title_link']);\n\n $aRow['isAllowSuggestion'] = Phpfox::getUserParam('suggestion.enable_friend_suggestion') && Phpfox::getService('suggestion')->isSupportModule($sTableName);\n \n //process privacy\n $iPrivacy = $aRow['privacy'];\n $iUserId = $aRow['user_id'];\n $iFriendId = Phpfox::getUserId();\n \n $isUserViewSuggestion = Phpfox::getService('suggestion')->isUserViewSuggestion($iFriendId, 'suggestion_'.$sTableName, $aRow['event_id'], $sTableName);\n \n //if item is belong current user return true\n if ($iUserId != $iFriendId)\n $aRow['is_right'] = (int)Phpfox::getService('suggestion')->isRightPrivacy($iPrivacy, $iUserId, $iFriendId);\n else\n $aRow['is_right'] = 1;\n \n //if recent is belong current user, not display link join pages;\n if ($aRow['user_id'] == Phpfox::getUserId()){\n $aRow['display_join_link'] = false;\n $aRow['user_link'] = Phpfox::getPhrase('suggestion.me');\n }elseif(!$isUserViewSuggestion){\n $aRow['display_join_link'] = true;\n $aRow['user_link'] = Phpfox::getService('suggestion')->getUserLink($aRow['user_id']); \n }else{\n $aRow['display_join_link'] = false;\n $aRow['user_link'] = Phpfox::getService('suggestion')->getUserLink($aRow['user_id']); \n }\n }\n }\n return $aRows;\n }\n }", "title": "" }, { "docid": "5cf8bcb158d599d42b49eb561ac28646", "score": "0.68442446", "text": "function getEvent() {\n\tglobal $db;\n\t\n\t$query = 'SELECT * FROM events WHERE name LIKE :eventName';\n\t\n\tif( isSet( $_GET['eventName'] ) ) {\n\t\t$eventName = cleanInput( $_GET['eventName'] );\n\t\t\n\t\t$stmt = $db->prepare( $query );\n\t\t$stmt->bindParam(':eventName', $eventName, PDO::PARAM_STR);\n\t\t\n\t\t$stmt->execute();\n\t\t$results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t}\n\t\n\treturn json_encode( $results );\n}", "title": "" }, { "docid": "c191129cb81e5027eddcaa37ec23143e", "score": "0.6830482", "text": "public function getEvent($id)\n\t{\n\t\treturn $this->getDb('tools')->fetchAssoc('SELECT * FROM smartai_events WHERE id = ?', array($id));\n\t}", "title": "" }, { "docid": "3f8367c04e9597a7b132394028c81392", "score": "0.682377", "text": "function afficherevents(){\n\t\t$sql=\"SElECT * From event ORDER BY date\";\n\t\t$db = config5::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 }\n }", "title": "" }, { "docid": "78595bd2997ce10457eab9a7f9ae15c1", "score": "0.68107337", "text": "public function getSportsEvent();", "title": "" }, { "docid": "f63ce2af5699c7976be6fbe878e16f52", "score": "0.67554533", "text": "public function events(): array;", "title": "" }, { "docid": "f4eca8642f91ffb24d4a967d73c12ab7", "score": "0.67543036", "text": "Public function getEvents()\n\t{\n\t\t\n\t$sql = \"SELECT * FROM appointment ORDER BY start ASC\";\n\treturn $this->db->query($sql)->result();\n\n\t}", "title": "" }, { "docid": "65287c5ceb07388bfa9845dbab996530", "score": "0.67502534", "text": "function getEvents() {\n return json_decode( file_get_contents( EVENT_FILE, true ) );\n}", "title": "" }, { "docid": "90844e2172beb0549f3a22d5986eae8e", "score": "0.67214346", "text": "public function getEvents() {\n\n \t\t//parse inputs\n \t\t$resourcePath = \"/events\";\n \t\t$resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n \t\t$method = \"GET\";\n $queryParams = array();\n $headerParams = array();\n $headerParams['Accept'] = 'application/json';\n $headerParams['Content-Type'] = 'application/json';\n\n //make the API Call\n if (! isset($body)) {\n $body = null;\n }\n \t\t$response = $this->apiClient->callAPI($resourcePath, $method,\n \t\t $queryParams, $body,\n \t\t $headerParams);\n\n\n if(! $response){\n return null;\n }\n\n \t\t$responseObject = $this->apiClient->deserialize($response,\n \t\t 'object');\n \t\treturn $responseObject;\n\n }", "title": "" }, { "docid": "ed016668680791f339d08e89d677d620", "score": "0.6710231", "text": "function getLiveEvents(){\n $xmlRequest = $this->requestXml->fill([\n 'command'=>'searchLiveEvents',\n ],[\n 'xsi'=>['xsi:type'=>'searchLiveEventsRequest'],\n 'running'=>'true',\n ]);\n\n $xmlstr = $this->post($xmlRequest);\n\n $events = $this->parseXml($xmlstr);\n\n if(!$events || !isset($events['output']) )\n die(\"Live is not started\\n\");\n\n if(!isset($events['output']['event']))\n die(json_encode($events));\n\n return $events['output']['event'];\n }", "title": "" }, { "docid": "e0477c908fc873c460851a492c9b50f3", "score": "0.6671242", "text": "public static function get_subscribed_events();", "title": "" }, { "docid": "1fabdf801b137acbdeeefda830075674", "score": "0.6663826", "text": "public function getEventsByType($eventType){\n\t\t$cache = LiftiumCache::getInstance();\n\t\t$keylist = getCacheKeyList();\n\t\n\t\t$out = array();\n\t\tfor ($i = 0 ; $i<sizeof($keylist); $i++){\n\t\t\t$data = self::unserializeKey($keylist[$i]);\n\t\t\tif ($data['events'][0] == $mainevent){\n\t\t\t\t$out = $data;\n\t\t\t}\n\t\t}\t\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "4f9b19269914f699dc105792651c095b", "score": "0.6634148", "text": "function get_events_by_id($id) {\r\n\r\n $table_name = $this->_table;\r\n $return = [];\r\n\r\n $result = $this->db->get_where($table_name, array('id' => (int) $id));\r\n \r\n if (!empty($result)) {\r\n $return = $result->row_array();\r\n }\r\n\r\n return $return;\r\n }", "title": "" }, { "docid": "b3810f1e405413648e8c233134c2f725", "score": "0.663212", "text": "public function getMonitoringEvents();", "title": "" }, { "docid": "367b7e39fb162d9ea8c7a3c08ddadaa9", "score": "0.6613471", "text": "function get_events()\n {\n return $this->events;\n }", "title": "" }, { "docid": "e6979e8393993cc7cf927fd3f81f1e98", "score": "0.6600678", "text": "public function getEvents($param)\n {\n if ($this->checkUser($param) == 'admin' || $this->checkUser($param) == 'user')\n {\n unset($param['hash'], $param['id_user']);\n if (isset($param['flag']) && $param['flag'] === 'like')\n {\n $data = $this->getEventLike($param);\n return $data;\n }\n \n else if (isset($param['flag']) && $param['flag'] === 'parent')\n {\n $data = $this->getEventParent($param);\n return $data;\n }\n }\n else\n {\n return ERR_ACCESS;\n }\n }", "title": "" }, { "docid": "34b4404f14728f1d096664dd46a03f02", "score": "0.65955883", "text": "public function getEvents()\n\t{\n\t\t$fetch = $this->getDb('tools')->fetchAll('SELECT * FROM smartai_events');\n\t\t$events = [];\n\t\tforeach($fetch as $event)\n\t\t\t$events[$event['id']] = $event;\n\t\treturn $events;\n\t}", "title": "" }, { "docid": "5e1a32331d0268c2d7673ecbd86025dd", "score": "0.65877354", "text": "public function getLinkedEvents();", "title": "" }, { "docid": "e659fc89b0437660d461620aaabf76e7", "score": "0.656109", "text": "function get_event_event($id_event)\n {\n return $this->db->get_where('event_event',array('id_event'=>$id_event))->row_array();\n }", "title": "" }, { "docid": "90fec7726ef97082ddd0accb477a0a1f", "score": "0.6556466", "text": "public function getAllEvents(Guid $guid);", "title": "" }, { "docid": "41a60be24e6d3feb84744548f658ed06", "score": "0.6534105", "text": "function getNamedEvents() {\n\tglobal $db;\n\t\n\t$query = 'SELECT * FROM events WHERE name LIKE :eventName';\n\t\n\tif( isSet( $_GET['eventName'] ) ) {\n\t\t$eventName = cleanInput( $_GET['eventName'] );\n\n\t\t$stmt = $db->prepare( $query );\n\t\t$stmt->bindParam(':eventName', $eventName, PDO::PARAM_STR);\n\t\t\n\t\t$stmt->execute();\n\t\t$results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t}\n\t//var_dump($results);\n\treturn json_encode( $results );\n}", "title": "" }, { "docid": "fe50b11bb0dfc450d23391a01df5a758", "score": "0.65194845", "text": "public static function show_events(){\n\t\tglobal $base;\n\n\t\t$clean_user_id = $base->clear_string($_SESSION['user_id']);\n\n\t\t$query = \"SELECT * FROM full_calendar_events WHERE user_id='{$clean_user_id}'\";\n\t\t\treturn static::find_this_query($query);\n\t}", "title": "" }, { "docid": "05879c7d581671092fdeb231b399745a", "score": "0.65131634", "text": "Public function getEvents()\n {\n $user_info = $this->session->userdata('user_session');\n $user_id = $user_info['user_id'];\n $sql = \"SELECT * FROM events WHERE events.date BETWEEN ? AND ? AND user_id = $user_id OR user_id = 0 ORDER BY events.date ASC\";\n return $this->db->query($sql, array($_GET['start'], $_GET['end'],))->result();\n }", "title": "" }, { "docid": "2c9c4eda4b43895a0d13fbaa2e687da4", "score": "0.6510608", "text": "private function get_cat_events() {\r\n }", "title": "" }, { "docid": "7569ff4d07b65fb50f49b28b716f77d2", "score": "0.65044826", "text": "public function get_by_event_id($id){\r\n $query = $this->db->query('Select * from event where Id = '.$id.'');\r\n return $query->result_array();\r\n }", "title": "" }, { "docid": "2a23ca4cc328c7775b0bc38ef386af9f", "score": "0.6499097", "text": "static public function getEvents(){\n\t\treturn self::$events;\n\t}", "title": "" }, { "docid": "0f50e7af21ea67cb09ef2fbe58ca3ab3", "score": "0.64393973", "text": "public function getEvents()\n {\n $this->db->select('*');\n $this->db->from('event');\n $this->db->join('event_collection_bridge', 'event.event_id = event_collection_bridge.event_id');\n $this->db->join('event_collection_info', 'event_collection_bridge.info_id = event_collection_info.info_id');\n return $this->db->get()->result_array();\n }", "title": "" }, { "docid": "e989d7d2644baf474a4238bc25b21b50", "score": "0.6429278", "text": "public function getEventById($id)\n {\n return Event::find($id);\n }", "title": "" }, { "docid": "d52967b5ec24ab445793970d27ac3579", "score": "0.6401435", "text": "function getAllEvents()\n{\n\t$db = openDatabaseConnection();\n\n\t$sql = \"SELECT events.event_id, visitors.visitor_id, visitors.visitor_name, horses.horse_name, events.event_time FROM ((events\nINNER JOIN visitors ON events.event_rider = visitors.visitor_id)\nINNER JOIN horses ON events.event_horse = horses.id)\";\n\t$query = $db->prepare($sql);\n\t$query->execute();\n\n\t$db = null;\n\n\treturn $query->fetchAll();\n}", "title": "" }, { "docid": "87f8aae2fd3993491da2f3e0dcdcdd3a", "score": "0.63904405", "text": "function getEvent($event_id)\n{\n\t$db = openDatabaseConnection();\n\n\t$sql = \"SELECT * FROM events WHERE event_id = :id\";\n\t$query = $db->prepare($sql);\n\t$query->bindParam(\":id\", $event_id);\n\t$query->execute();\n\n\t$db = null;\n\n\treturn $query->fetch();\n}", "title": "" }, { "docid": "a9c1a9796fe69865bdaa297e06ff61cc", "score": "0.63842356", "text": "public function eventId();", "title": "" }, { "docid": "c4363a034df7663e881cfe22e16b3855", "score": "0.63819593", "text": "function eventlist(){\n\t\t$query = $this->db->get('createevent');\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "085eccd8171a74d849d4a49c10296783", "score": "0.63776666", "text": "public function getRecordedEvents();", "title": "" }, { "docid": "65fd511c9e167eed0a212487c94fd2f5", "score": "0.63760793", "text": "function getEvents()\n{\n openConnection();\n //sanitize time somehow\n date_default_timezone_set('America/New_York');\n\n $time= date('Y-m-d H:i:s', strtotime('-3 hours'));\n //query events based on time? maybe do this at the app level?\n #$request = \"SELECT event_name, event_id, event_time, event_descript, event_location, food, users.user_id, last_name, first_name\n # FROM events JOIN users ON users.user_id= events.user_id WHERE event_time >='$time' ORDER BY event_time\"; \n $request = \"SELECT event_name, event_id, event_time, event_descript, event_location, \n food, last_name, first_name, username,\n (SELECT COUNT(*) FROM attendance as a WHERE a.event_id = e.event_id) as attendance\n FROM events as e \n JOIN users as u \n ON u.user_id= e.user_id \n WHERE event_time >='$time' \n ORDER BY event_time\";\n $r = query($request);\n return $r;\n}", "title": "" }, { "docid": "07e7f0ba1720fcf782efa77718740bfa", "score": "0.6374435", "text": "public function getEvents() {\n $pdo = new connexionpdo();\n $prepare = $pdo->pdo_start()->prepare(\"SELECT * FROM post\");\n $prepare->execute();\n $result = $prepare->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n }", "title": "" }, { "docid": "62086147dde48aa370a083e1c0d1148d", "score": "0.6350463", "text": "public function getEventApi();", "title": "" }, { "docid": "4a3082681791e9ceb61a8282485c3754", "score": "0.6328498", "text": "function get_event_by_id($id)\n {\n $user = isset($_SESSION['elastix_user'])?$_SESSION['elastix_user']:\"\";\n $uid = $this->Obtain_UID_From_User($user); \n\n $query = \"SELECT \n id,\n uid,\n subject event, \n startdate date, \n enddate `to`, \n description, \n asterisk_call asterisk_call_me, \n recording, \n starttime,\n endtime,\n call_to, \n notification, \n emails_notification, \n each_repeat as repeat,\n days_repeat,\n color,\n eventtype as it_repeat,\n\t\t\t\t\treminderTimer as reminderTimer,\n strftime('%H', starttime) hora1, \n strftime('%M', starttime) minuto1,\n strftime('%H', endtime) hora2, \n strftime('%M', endtime) minuto2,\n strftime('%Y', startdate) AS year,\\n\"\n .\"strftime('%m', startdate) AS month,\\n\"\n .\"strftime('%d', startdate) AS day,\\n\"\n .\"strftime('%Y', enddate) AS end_year,\\n\"\n .\"strftime('%m', enddate) AS end_month,\\n\"\n .\"strftime('%d', enddate) AS end_day\\n\"\n .\"FROM \n events\\n\"\n .\"WHERE \n id = '$id'\\n\"\n .\"AND uid=$uid\";\n $result = $this->_DB->getFirstRowQuery($query, true);\n if($result == FALSE) {\n $this->errMsg = $this->_DB->errMsg;\n return array();\n }\n\n if(!is_array($result) || count($result) == 0) {\n $this->errMsg = \"item doesn't exist!\";\n return array();\n }\n return $result;\n }", "title": "" }, { "docid": "213bf43267ebbc11b9d89ccb17a002fc", "score": "0.63240355", "text": "public function list_all_events(){\r\n $query = $this->db->query('Select event.id , event.EventName, event.Venue, user.Email, event.CreatedAt , status.StatusName from event join status on event.Stat\r\n usId = status.id join user ON event.EventCreator_UserId = user.Id order by event.id asc');\r\n return $query->result_array();\r\n }", "title": "" }, { "docid": "1bc87fa012e1f87155c22c61597c49f2", "score": "0.63156724", "text": "public function events()\n\t{\n\t\t// filter\n\t\tif ( !isset($_GET['search']))\n\t\t{\n\t\t\t$events = Event::all();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$var = \"%\".$_GET['search'].\"%\";\n\t\t\t$events = Event::where('name', 'like', $var)->get();\n\t\t}\n\t\tif ( isset($_GET['recurrent']))\n\t\t{\n\t\t\t$events = Event::where('recurrent', '=', 1)->get();\n\t\t}\n\t\tif ( isset($_GET['unique']))\n\t\t{\n\t\t\t$events = Event::where('recurrent', '<>', 1)->get();\n\t\t}\n\t\tif ( isset($_GET['decroissant']))\n\t\t{\n\t\t\t$events = Event::where('id', '<>', 0)->orderBy('price','DESC')->get();\n\t\t}\n\t\tif ( isset($_GET['croissant']))\n\t\t{\n\t\t\t$events = Event::where('id', '<>', 0)->orderBy('price','ASC')->get();\n\t\t}\n\t\tif ( isset($_GET['actual']))\n\t\t{\n\t\t\t// get variables\n\t\t\t$month = date(\"m\");\n\t\t\t$bissextile = date(\"L\");\n\n\t\t\t// depend of the current month\n\t\t\tswitch($month)\n\t\t\t{\n\t\t\t\tcase 1 :\n\t\t\t\t\t$day = 31;\n\t\t\t\t\t$events = Event::where('start_date', '<',date(\"Y-m-$day\"))->where('start_date', '>',date(\"Y-m-01\"))->get();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 2 :\n\t\t\t\t\tif ($bissextile = 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$day = 29;\n\t\t\t\t\t\t$events = Event::where('start_date', '<',date(\"Y-m-$day\"))->where('start_date', '>',date(\"Y-m-01\"))->get();\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$day = 28;\n\t\t\t\t\t\t$events = Event::where('start_date', '<',date(\"Y-m-$day\"))->where('start_date', '>',date(\"Y-m-01\"))->get();\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t\tcase 3 :\n\t\t\t\t\t$day = 31;\n\t\t\t\t\t$events = Event::where('start_date', '<',date(\"Y-m-$day\"))->where('start_date', '>',date(\"Y-m-01\"))->get();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 4 :\n\t\t\t\t\t$day = 30;\n\t\t\t\t\t$events = Event::where('start_date', '<',date(\"Y-m-$day\"))->where('start_date', '>',date(\"Y-m-01\"))->get();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 5 :\n\t\t\t\t\t$day = 31;\n\t\t\t\t\t$events = Event::where('start_date', '<',date(\"Y-m-$day\"))->where('start_date', '>',date(\"Y-m-01\"))->get();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 6 :\n\t\t\t\t\t$day = 30;\n\t\t\t\t\t$events = Event::where('start_date', '<',date(\"Y-m-$day\"))->where('start_date', '>',date(\"Y-m-01\"))->get();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 7 :\n\t\t\t\t\t$day = 31;\n\t\t\t\t\t$events = Event::where('start_date', '<',date(\"Y-m-$day\"))->where('start_date', '>',date(\"Y-m-01\"))->get();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 8 :\n\t\t\t\t\t$day = 31;\n\t\t\t\t\t$events = Event::where('start_date', '<',date(\"Y-m-$day\"))->where('start_date', '>',date(\"Y-m-01\"))->get();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 9 :\n\t\t\t\t\t$day = 30;\n\t\t\t\t\t$events = Event::where('start_date', '<',date(\"Y-m-$day\"))->where('start_date', '>',date(\"Y-m-01\"))->get();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 10 :\n\t\t\t\t\t$day = 31;\n\t\t\t\t\t$events = Event::where('start_date', '<',date(\"Y-m-$day\"))->where('start_date', '>',date(\"Y-m-01\"))->get();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 11 :\n\t\t\t\t\t$day = 30;\n\t\t\t\t\t$events = Event::where('start_date', '<',date(\"Y-m-$day\"))->where('start_date', '>',date(\"Y-m-01\"))->get();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 12 :\n\t\t\t\t\t$day = 31;\n\t\t\t\t\t$events = Event::where('start_date', '<',date(\"Y-m-$day\"))->where('start_date', '>',date(\"Y-m-01\"))->get();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(isset($_GET['soon']))\n\t\t{\n\t\t\t$month_soon = date(\"m\")+1;\n\t\t\t$events = Event::where('start_date', '>',date(\"Y-$month_soon-01\"))->get();\n\t\t}\n\t\treturn view('events',compact('events'));\n\t}", "title": "" }, { "docid": "98605b7442d20c08832d18484dac090d", "score": "0.6310052", "text": "public function getEvents(){\n return $this->events;\n }", "title": "" }, { "docid": "ebc2f54e663ab8ed0bc30009226132cf", "score": "0.63011867", "text": "function getAllEvents()\n\t{\n\t $app = JFactory::getApplication();\n $option = JFactory::getApplication()->input->getCmd('option');\n // Create a new query object.\t\t\n\t $db = sportsmanagementHelper::getDBConnection(TRUE, self::$cfg_which_database );\n\t $query = $db->getQuery(true);\n \n\t\t$history = sportsmanagementModelPlayer::getPlayerHistory();\n\t\t$positionhistory = array();\n\t\tforeach($history as $h)\n\t\t{\n\t\t\tif (!in_array($h->position_id, $positionhistory))\n\t\t\t\t$positionhistory[] = $h->position_id;\n\t\t}\n\t\tif (!count($positionhistory)) \n {\n\t\t\treturn array();\n\t\t}\n \n $query->select('et.*');\n $query->from('#__sportsmanagement_eventtype AS et'); \n $query->join('INNER','#__sportsmanagement_position_eventtype AS pet ON pet.eventtype_id = et.id');\n $query->where('published = 1');\n $query->where('pet.position_id IN ('. implode(',', $positionhistory) .')');\n $query->order('et.ordering');\n \n\t\t\t\t$db->setQuery( $query );\n \n if ( COM_SPORTSMANAGEMENT_SHOW_DEBUG_INFO )\n {\n $app->enqueueMessage(JText::_(get_class($this).' '.__FUNCTION__.' <br><pre>'.print_r($query->dump(),true).'</pre>'),'Error');\n }\n \n\t\t\t\t$info = $db->loadObjectList();\n\t\t$db->disconnect(); // See: http://api.joomla.org/cms-3/classes/JDatabaseDriver.html#method_disconnect\n\t\treturn $info;\n\t}", "title": "" }, { "docid": "79a405129a5a008c538e7529d33ce5ea", "score": "0.62989664", "text": "function showEventData() {\r\n\t$event = [];\r\n\tglobal $conn;\r\n\tif(isset($_GET['action']) && $_GET['action'] == \"edit_event\") {\r\n\t\t$get_the_id = $_GET['e_id'];\r\n\t\t$query = \"SELECT * FROM event WHERE id=$get_the_id\";\r\n\t\t$result = mysqli_query($conn, $query);\r\n\t\twhile ($row = mysqli_fetch_assoc($result)) {\r\n\t\t\t$event['event_title'] = $row['event_title'];\r\n\t\t\t$event['event_desc'] = $row['event_desc'];\r\n\t\t\t$event['event_image'] = $row['event_image'];\r\n\t\t}\r\n\t}\r\n\treturn $event;\r\n}", "title": "" }, { "docid": "f4e6256fb687823405db85a18f89a9dd", "score": "0.6291895", "text": "public function getById($id) {\n\n $sql = \"SELECT * FROM aa_event WHERE id = {$id}\";\n\n return $this->query($sql);\n }", "title": "" }, { "docid": "9e28ca3bb880c24ac0f5c791d24c6f5b", "score": "0.6289815", "text": "function getEventsForUniqueNetwork($unique_id) {\n\t\t// Events that have been approved have approved=1.\n\t\n\t\t$events = array();\n\t\t$query = \"SELECT * FROM events WHERE approved='1' AND start > now() AND unique_network_id = '$unique_id'\";\n\t\t$result = mysql_query($query) or die(mysql_error());\n\t\t\n\t\twhile($row = mysql_fetch_array($result)){\n\t\t\t\t$events[] = $row;\n\t\t\t}\n\t\t$result = array_reverse($events);\n\t\treturn $result;\t\n\t\t}", "title": "" }, { "docid": "872acf391cec4f5f9dfc8e2892caa349", "score": "0.6285031", "text": "public function getSpecificEvent()\n {\n $responseMessage = array();\n\n $whereArray = [ 'event_id' => $this->request->input(\"event_id\") ,\n \"user_id\" => $this->request->input(\"user_id\")\n ];\n\n $this->eventsModel->setWhere($whereArray);\n $events = $this->eventsModel->getSpecificEvent();\n \n if ($events == null) {\n throw new NotFoundHttpException(config('mts-config.links.zerorecords'), null, 10060);\n }\n\n $responseMessage[\"statusCode\"] = STATUS_OK;\n $responseMessage[\"response\"]['status'] = true;\n $responseMessage[\"response\"]['event'] = $events[0];\n return $responseMessage;\n }", "title": "" }, { "docid": "c6c5b615f1a15e90621812d463998d6d", "score": "0.6274806", "text": "function GetEvents($id) { // TODO optional params for filter by creator...\n try {\n global $bdd;\n $bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n $sql = isset($id) ? 'SELECT * FROM events WHERE id = :id' : 'SELECT * FROM events';\n $query = $bdd->prepare($sql);\n if (isset($id)) {\n $query->bindValue(':id', intval($id), PDO::PARAM_INT);\n $query->execute();\n return $query->fetchAll(PDO::FETCH_CLASS, 'Event');\n }\n else {\n $query->execute();\n $events = $query->fetchAll(PDO::FETCH_CLASS, 'Event');\n }\n return $events;\n } catch (PDOException $e) {\n // $error = $e->getMessage();\n return null;\n }\n}", "title": "" }, { "docid": "7297bcb1036a8929aafb9c6d16322a0a", "score": "0.6264212", "text": "public function getEvents()\n {\n if (array_key_exists(\"events\", $this->_propDict)) {\n return $this->_propDict[\"events\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "714fe53b560e0cfc40767132ec9e2d28", "score": "0.6263169", "text": "public function getEventsManager() {}", "title": "" }, { "docid": "714fe53b560e0cfc40767132ec9e2d28", "score": "0.6263169", "text": "public function getEventsManager() {}", "title": "" }, { "docid": "9a7b2cefd689b247bbff3f4706e2634c", "score": "0.62437534", "text": "public function findEvent($id){\n \treturn self::getInstance()->createQuery('e')\n \t->leftJoin('e.EventTopic t')\n \t->leftJoin('e.YocaIndustry i')\n \t->leftJoin('e.YocaNeighborhood n')\n \t->leftJoin('e.EventAddress a')\n \t->leftJoin('e.YocaUser u')\n \t->where('e.id = ?', $id)\n \t->fetchOne();\n }", "title": "" }, { "docid": "433499b871de5b492fe966eb376b4f85", "score": "0.6243581", "text": "function GetEvent(int $id) {\n $event = GetEvents($id);\n return !$event ? $event : $event[0];\n}", "title": "" }, { "docid": "d835cd9f85b3dc247c87efc39145c653", "score": "0.6240459", "text": "public static function getSubscribedEvents();", "title": "" }, { "docid": "882fac71e92a4bf7e49c75b58e353dcc", "score": "0.624026", "text": "public function getEventsManager(){ }", "title": "" }, { "docid": "6c2ba5547f923fd0320a5abb0d6ef2dd", "score": "0.6239219", "text": "public function getEvent($event)\n {\n if (array_key_exists($event, $this->eventList)) {\n return $this->eventList[$event];\n }\n\n return;\n }", "title": "" }, { "docid": "bd6ffab59255f0bd06df8594d2645854", "score": "0.6233696", "text": "public function getEvents() {\n\n\n\t\t$events[0]= array(\n\t\t\t'id' => '1',\n\t\t\t'title' =>'All Day Event',\n\t\t\t'start' =>'2014-09-15',\n\t\t\t'end' => '2014-09-20',\n\t\t\t'url' => false,\n\t\t\t'allDay'=>false\n\t\t\t//'url' => \"\"\n\t\t);\n\t\techo $json = json_encode( $events );\n\t\texit;\n\t}", "title": "" }, { "docid": "02771e88f634a43ba99e1d0e5a0faf63", "score": "0.62164044", "text": "public function event () {\n // get function args\n $args = func_get_args();\n // check args\n if ( empty($args) ) return false;\n // event value if not setted\n $event = array_shift($args);\n // call objects functions\n foreach ($this->examineObj AS $object) {\n if ( isset($object->listenTable[$event]) ) {\n eval(\"call_user_func( \".$object->listenTable[$event].\" );\");\n }\n }\n return;\n }", "title": "" }, { "docid": "ed731a12a794cb41f295dd9d44395a55", "score": "0.6201854", "text": "function getEventType($eventTypeID)\r\n {\r\n\t $result = $this->db->query(\"Select EventType from EventType where `idEventType`=\".$eventTypeID);\r\n\t \r\n\t\t foreach ($result->result_array() as $row)\r\n\t \t\t\t{\r\n\t\t\t \t\t\treturn $row['EventType'];\r\n\t\t \t\t\t\r\n\t \t\t\t}\r\n }", "title": "" }, { "docid": "d49bdbfc90d1889107785988bf17f2b7", "score": "0.6201025", "text": "public function getEventClass();", "title": "" }, { "docid": "ed82d2b1393c13dd9e7661cf6f33a1bb", "score": "0.61936104", "text": "function wb_get_event($event_id) {\n\tglobal $wpdb;\n\t$event_table = WB_EVENTS_TABLE;\n\t$output = $wpdb->get_row( \"SELECT * FROM $event_table WHERE id=$event_id\" );\n\treturn $output;\n}", "title": "" }, { "docid": "04dbcc9d57725eb95057c1f59ad39940", "score": "0.6180045", "text": "public function getEvents()\n\t{\n\t\t// Saya siasati untuk menambah 1 hari berikutnya. \n\t\t// DATE_ADD(end, INTERVAL 1 DAY) AS endD\n\t\t// Jika tanpa script ini, maka event end day akan berkurang 1 hari... Blooooonn\n\t\t// 8 Ramadhan 1435H\n\t\t//$rs = $mysqli->query(\"SELECT id, title, start, DATE_ADD(end, INTERVAL 1 DAY) AS endD FROM events ORDER BY start ASC\");\n\t\t// $arr = array();\n\t\t// Kalau anda lihat tutorial lain di internet, mereka menggunakan ini\n\t\t// Tapi karena saya ingin menyesuaikan dengan Program, saya mengabaikan ini.\n\t\t\n\t\t$query = $this->db->query('SELECT id, title, start, DATEADD(day, 1, [end]) AS endD \nFROM msevents ORDER BY start ASC');\n\t\t\n\t\tIf ($query->num_rows() > 0)\n\t\t{\n\t\t\n\t\t\tforeach($query->result_array() as $row)\n\t\t\t{\n\t\t\t\n\t\t\t\t$arr[] = array(\n\t\t\t\t'id' => $row['id'],\n\t\t\t\t'title' => $row['title'],\n\t\t\t\t'start' => $row['start'],\n\t\t\t\t'end' => $row['endD']);\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\techo json_encode($arr);\n\t\t\t\t\t\n\t}", "title": "" }, { "docid": "ec9de00d3d3933ab3b2e61c8ae4aa698", "score": "0.61762965", "text": "public function getEvents() {\n\t\t$events = [];\n\t\t/*\n\t\t$events[] = new Event([\n\t\t\t'object_type' => $this->competition_type,\n\t\t\t'object_id' => $this->id,\n\t\t\t'name'\t=> $this->name,\n\t\t\t'description' => Yii::t('igolf', 'Competition registration'),\n\t\t\t'event_type' => 'REGISTRATION',\n\t\t\t'status' => Event::STATUS_ACTIVE,\n\t\t\t'event_start' => $this->registration_begin,\n\t\t\t'event_end' => $this->registration_end,\n\t\t]);*/\n\t\tif($this->competition_type == self::TYPE_MATCH) {\n\t\t\t$events[] = new Event([\n\t\t\t\t'object_type' => $this->competition_type,\n\t\t\t\t'object_id' => $this->id,\n\t\t\t\t'name'\t=> $this->name,\n\t\t\t\t'description' => Yii::t('igolf', $this->competition_type),\n\t\t\t\t'event_type' => 'COMPETITION',\n\t\t\t\t'status' => Event::STATUS_ACTIVE,\n\t\t\t\t'event_start' => $this->start_date,\n\t\t\t\t'event_end' => null,\n\t\t\t]);\n\t\t}\n\t\t/*\n\t\tforeach(CompetitionRegistration::find()->orderBy('event_start')->each() as $event) {\n\t\t\t$start = \\DateTime::createFromFormat('Y-m-d H:i:s', $event->event_start);\n\t\t\t$end = \\DateTime::createFromFormat('Y-m-d H:i:s', $event->event_end);\n\t\t\t\t\t\t\n\t\t\t$calendarEvents[] = new CalendarEvent([\n\t\t\t\t'id' => $event->id,\n\t\t\t\t'title' => $event->name,\n\t\t\t\t'url' => Url::to(['view', 'id'=>$event->id]),\n\t\t\t\t'className' => 'btn-'.$event->getColor(),\n \t\t\t\t'start' => date('Y-m-d\\TH:m:s\\Z',$start->getTimestamp()),\n\t\t\t\t'end' => $end ? date('Y-m-d\\TH:m:s\\Z',$end->getTimestamp()) : null,\n\t\t\t]);\n\t\t}\n\t\t*/\n\t\treturn $events;\n\t}", "title": "" }, { "docid": "75b7f3b21cfe037860c4878c9e84001f", "score": "0.6168397", "text": "public function register_events();", "title": "" }, { "docid": "26c226d2722bc86a242aecd0f8400ca4", "score": "0.61605537", "text": "public function getEventsById()\n {\n $this->form_validation->set_rules('user_id', 'user_id', 'required');\n $this->form_validation->set_rules('event_id', 'event_id', 'required');\n \n if ($this->form_validation->run() == false) {\n $this->api->api_message(0, ALL_FIELD_MANDATORY);\n exit();\n } //$this->form_validation->run() == false\n \n $user_id = $this->input->post('user_id', TRUE);\n $event_id = $this->input->post('event_id', TRUE);\n \n $this->checkUserStatus($user_id);\n $getFunction = $this->Api_model->getSingleRow(EVT_TBL, array(\n 'id' => $event_id\n ));\n if (!$getFunction) {\n $this->api->api_message(0, EVT_NT_FND);\n exit();\n } //!$getFunction\n \n else {\n $getGuest = $this->Api_model->getSingleRow(EVT_GST_TBL, array(\n 'user_id' => $user_id,\n 'event_id' => $event_id\n ));\n if ($getGuest) {\n $getFunction->userJoin = \"1\";\n } //$getGuest\n else {\n $getFunction->userJoin = \"0\";\n }\n $this->api->api_message_data(1, ALL_EVENTS, 'getEvent', $getFunction);\n }\n }", "title": "" }, { "docid": "cb9aff403663e1e766bc16ada2bd73a7", "score": "0.6150727", "text": "public function get($id=false) {\n\t\techo json_encode($this->events->getEvents($id));\n\t}", "title": "" }, { "docid": "315a5d1bfca2edce5789c35466be3a3c", "score": "0.6147172", "text": "public function getEventNames(): array;", "title": "" }, { "docid": "42adad3e108c4f37675628e616ff2777", "score": "0.61467475", "text": "public function events()\n {\n $query = Core::query('folder-events');\n $query->bindValue(':folder', $this->_folder['id'], PDO::PARAM_INT);\n $query->execute();\n\n $events = array();\n $_events = $query->fetchAll(PDO::FETCH_NUM);\n foreach ($_events as $event) {\n $events[] = $event[0];\n }\n\n return $events;\n }", "title": "" }, { "docid": "da19dad88dbe442e922005abf666c3e3", "score": "0.61395746", "text": "public static function event(): string;", "title": "" }, { "docid": "2ac2d208844c1ee7b21b06377abb2311", "score": "0.61338997", "text": "public function getSubscribedEvents();", "title": "" }, { "docid": "3419e8a00bc18d64edb8af7bb0e1930f", "score": "0.613003", "text": "FUNCTION getTypeEvent()\n\t\t\t{\n\t\t\t\t$sReq = \"SELECT TYP_CODE, TYP_LIBELLE\n\t\t\t\t\t\tFROM typeevenements;\";\n\t\t\t\t$typeEvents = $_SESSION['bdd']->query($sReq);\n\t\t\t\treturn $typeEvents;\n\t\t\t}", "title": "" }, { "docid": "bcba3f2492e1c9a1283a480818b13333", "score": "0.6118671", "text": "function getEventType($eventType)\n {\n try{\n //get our connection again\n $db = getDBConnection();\n $query = \"SELECT * FROM events WHERE Type = :eventType ORDER BY Date DESC\";\n $statement=$db->prepare($query);\n $statement->bindValue(':eventType', $eventType);\n $statement->execute();\n $result = $statement->fetchAll();\n $statement->closeCursor();\n return $result;\n }\n catch(PDOException $e)\n {\n $errorMessage = $e->getMessage();\n include '../view/error.php';\n die;\n }\n\n }", "title": "" }, { "docid": "986d3f2d685313f567153c50c0eecad1", "score": "0.6103773", "text": "function getEvents(&$params)\n {\n $language = JFactory::getLanguage();\n $language->load('com_superevents', JPATH_ROOT);\n\n $query_start_date = null;\n $query_end_date = null;\n\t\t$showPastEvent = $params->get( 'superevents_past', 0 );\n\n\n if ($params->get('time_range') == 'time_span' || $params->get('rangespan') != 'all_events')\n {\n $query_start_date = $params->get('startmin');\n $startMax = $params->get('startmax', false);\n if ($startMax !== false)\n {\n $query_end_date = $startMax;\n }\n }\n\n $mainframe =& JFactory::getApplication();\n\n $db =& JFactory::getDBO();\n $user =& JFactory::getUser();\n $user_gid = (int)$user->get('aid');\n\n $catid = trim($params->get('superevents_category', 0));\n\n\n $categories = '';\n if ($catid != 0)\n {\n $categories = ' AND category = ' . $catid;\n }\n\n\t\t// vergangene events\n\t\tif($showPastEvent != 1){\n\t\t\t$sqlshowPastEvent = \" and a.enddate >= now() \"; // and (a.startdate <= now() || a.startdate is null ) AND\n\t\t }else{\n\t\t\t$sqlshowPastEvent = \"\"; \n\t\t}\n\n\t\t$query = 'SELECT a.*, SUBSTRING( a.startdate , 1, 10 ) AS startdatum , SUBSTRING( a.startdate , 12, 8 ) AS starttime, SUBSTRING( a.enddate , 1, 10 ) AS endzeit , SUBSTRING( a.enddate , 12, 8 ) AS endtime, a.id as slug FROM #__superevents AS a WHERE a.published =1 '.$categories.''.$sqlshowPastEvent.' ORDER BY startdatum ASC ';\n $db->setQuery($query);\n $rows = $db->loadObjectList();\n\n $total_count = 1;\n $total_max = $params->get('superevents_total',10);\n $events = array();\n\n foreach ($rows as $row)\n {\n if ($params->get('superevents_links') != 'link_no')\n {\n\n $link = array(\n 'internal' => ($params->get('superevents_links') == 'link_internal') ? true : false,\n 'link' => JRoute::_(self::getRoute($row->slug))\n );\n } else\n {\n $link = false;\n }\n\n $offset = 0;\n if ($params->get('superevents_dates_format', 'utc') == 'joomla'){\n $conf =& JFactory::getConfig();\n $timezone = $conf->getValue('config.offset') ;\n $offset = $timezone * 3600 * -1;\n }\n $startdate = strtotime($row->startdatum . ' ' . $row->starttime)+$offset;\n $enddate = $row->endzeit ? strtotime($row->endzeit . ' ' . $row->endtime)+$offset : strtotime($row->starttime . ' ' . $row->endtime)+$offset;\n\n $event = new RokMiniEvents_Event($startdate, $enddate, $row->name, $row->description, $link);\n $events[] = $event;\n $total_count++;\n if ($total_count > $total_max) break;\n }\n\n //$events = array();\n return $events;\n }", "title": "" }, { "docid": "8a7ff0b6c5ee8eeaf61d85f622d092d2", "score": "0.61018884", "text": "public function getEvents($param)\n {\n try\n {\n $result = $this->model->getEvents($param);\n $result = $this->view->encodedData($result);\n return $this->response->serverSuccess(200, $result);\n }\n catch (Exception $exception)\n {\n return $this->response->serverError(500, $exception->getMessage());\n }\n }", "title": "" }, { "docid": "16ec42f4b25d1eac88dd006faa6be50d", "score": "0.6098118", "text": "public static function getEvents()\n {\n return static::$events;\n }", "title": "" }, { "docid": "f62b7502cbb3b1ae54f0d5a19d953a91", "score": "0.6080827", "text": "public function listeEventsMeeting() {\n $query = 'SELECT `1402f_events`.`id`, '\n . 'DATE_FORMAT(`dateEvent`, \\'%d/%m/%Y à %H:%i \\')AS `dateEvent`, '\n . '`1402f_events`.`picture`, '\n . '`1402f_events`.`title`, '\n . '`1402f_events`.`description`, '\n . '`1402f_events`.`location`, '\n . '`1402f_events`.`eventCategory`, '\n . '`1402f_eventCategory`.`nameCategoryEvents` '\n . 'FROM `1402f_events` '\n . 'JOIN `1402f_eventCategory` '\n . 'ON `1402f_eventCategory`.`id`= `1402f_events`.`eventCategory` '\n . 'WHERE dateEvent>=now() limit 1';\n $req = $this->pdo->db->query($query);\n return $req->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "f36fdc16cc97be08ac6da0c542f95fbe", "score": "0.60793555", "text": "public function getEventById($id)\n {\n $events = DB::table('events')\n ->where('id', $id)\n ->get();\n return json_encode($events);\n }", "title": "" }, { "docid": "2c9d2779f6c201ed0d4e3fdf02b68183", "score": "0.6079301", "text": "public function getEvent() {\n $postDataObj = json_decode('{\"staff_id\":\"1\",\"access_key\":\"4G43UZ8PXC4H4LW8T9BURDHH0TD441SY8MRSBQ6YS15MCTKVSMF8QOGG6JA1BTPA\"}', TRUE);\n $this->load->model('staffapp/staffapp_core', 'coreObj');\n $dataObj = $this->coreObj->GetStaffDatabaseName($postDataObj['staff_id'], $postDataObj['access_key']);\n if ($dataObj != -1) {\n $this->load->model('staffapp/appstaffdashboard_model', 'modelObj');\n $eventlist = $this->modelObj->getEventList($dataObj);\n echo json_encode(array('event_detail' => $eventlist));\n } else {\n echo printCustomMsg('ERROR', 'Invalid detail,please contact to admin..', -1);\n }\n }", "title": "" }, { "docid": "61ee3ee2492a41d9115a011d3d54b1d2", "score": "0.60787106", "text": "public function fetchEvents() : array\n\t\t{\n\t\t\t$result = $this->fetchTickets();\n $events = [];\n foreach($result as $row){\n $events[] = $this->fetchEvent($row);\n }\n return $events;\n\t\t}", "title": "" }, { "docid": "104b4e75deb45dea34adde7f24cfd099", "score": "0.60589635", "text": "public function getEvents($languagecode){\n $dishes= $this->modelsManager->createBuilder()\n ->columns(array('et.name_translation as name','et.description as description','et.location as location'))\n ->from(array('et' => 'EventTranslation'))\n ->join('Event', 'e.id = et.eventid', 'e')\n ->join('Language', 'l.code = dt.languagecode', 'l')\n ->where('d.menuid = :menuid:', array('menuid' =>$menuId))\n ->AndWhere('l.code = :languagecode:', array('languagecode' =>$languagecode ))\n ->getQuery()\n ->execute();\n return $dishes; \n }", "title": "" }, { "docid": "7f24710d62c38a0ff438d60077abbb53", "score": "0.60508484", "text": "public function getNotificationsEvents(): iterable;", "title": "" }, { "docid": "eb7291a523bacc2f025dbc188b97eba8", "score": "0.6050504", "text": "function getOngoingEvents()\n {\n try\n {\n $db = getDBConnection();\n $query = \"SELECT * FROM events WHERE Date>=CURRENT_DATE ORDER BY Date DESC\";\n $statement = $db->prepare($query);\n $statement->execute();\n $results = $statement->fetchAll();\n $statement->closeCursor();\n return $results;\n }\n catch(PDOException $e)\n {\n $errorMessage = $e->getMessage();\n include '../view/error.php';\n die;\n }\n }", "title": "" }, { "docid": "4cfa32f44432aa8c3daa0e26c019f44e", "score": "0.60503227", "text": "function grabEventData($eventid) {\n $res = $this->conn->query(\"SELECT * FROM events WHERE eventid=$eventid\");\n if ($res) {\n return $res->fetch_array(MYSQLI_ASSOC);\n } else {\n // return false on error.\n return false;\n }\n }", "title": "" }, { "docid": "55a4f35e7cda50f75bff4abe5181d181", "score": "0.6049852", "text": "function get_all_event_event_by_creator()\n {\n $id_user = $this->encoder->decrypt($this->session->userdata['logged_in']['id_user']);\n\n $this->db->select('id_event, name_event, lokasi, pembicara, tanggal_mulai, jumlah_tiket, deskripsi_acara, status');\n $this->db->where('id_user',$id_user);\n // $this->db->where('status', '1'); \n $this->db->order_by('id_event', 'desc');\n $result = $this->db->get('event_event')->result_array();\n return $result;\n }", "title": "" }, { "docid": "e12b309d48c9b418fe11b66ebe857556", "score": "0.6045215", "text": "function get_all_events($field='id', $order_by='DESC'){\r\n $table_name = $this->_table;\r\n $this->db->select('*')\r\n ->from($table_name)\r\n ->where('status=', \"Active\")\r\n ->order_by($field, $order_by);\r\n $data = $this->db->get();\r\n if(!empty($data)){\r\n $return = $data->result_array();\r\n return $return;\r\n }else{\r\n return $return;\r\n }\r\n }", "title": "" }, { "docid": "d395cbd21760f3ab57607d9473636958", "score": "0.6044759", "text": "public function getEvent(string $eventId)\n {\n return $this->makeRequest('get', \"events/{$eventId}\");\n }", "title": "" }, { "docid": "04594a48e8e8a4ca046327dbb0f71191", "score": "0.60445344", "text": "public function get_events()\r\n { \r\n $today = date('Y-m-d');\r\n $this->db->where('end_date_time >', $today);\r\n $this->db->where('available_seats > 0');\r\n $this->db->order_by('id', 'DESC');\r\n $query = $this->db->get('events');\r\n\r\n return $query->result_array();\r\n }", "title": "" }, { "docid": "d45b6774ad12ad2db4075557d0911bd9", "score": "0.6043158", "text": "function get_event_info_by_id($id){\n\t$id = intval($id);\n\n\t$query = \"SELECT *\n\t\tFROM \".PREFIX.\"events\n\t\tWHERE ID = $id;\";\n\t$result = mysql_query($query);\n\tif($result){\n\t\t$event_info = mysql_fetch_array($result);\n\t\treturn $event_info;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "cd471922a38566752b4b2aeafece2c7d", "score": "0.60427064", "text": "public function getEvents($query, $page = NULL, $page_length = NULL, $sort = NULL, $updated_since = NULL) {\n return $this->search('event', $query, $page, $page_length, $sort, $updated_since);\n }", "title": "" }, { "docid": "0330a764458e22be620cde7c0849dbf6", "score": "0.6041834", "text": "public function index()\n {\n // When a query is given search by query\n $query = request('q');\n if ($query != null) {\n $events = Event::search($query)->get();\n } else {\n $events = Event::all();\n }\n $events = $events->sortBy('name', SORT_NATURAL | SORT_FLAG_CASE)\n ->paginate(config('pagination.api.limit'))->withQueryString();\n\n // Return the events\n return $events;\n }", "title": "" }, { "docid": "dc4bbcfce0e65cbbabcd2f5d727254e7", "score": "0.6039262", "text": "function plugin_getiteminfo_calendar($eid, $what, $uid = 0, $options = array())\n{\n global $_CONF, $_TABLES;\n\n // parse $what to see what we need to pull from the database\n $properties = explode(',', $what);\n $fields = array();\n foreach ($properties as $p) {\n switch ($p) {\n // no date! we don't keep track of the _item's_ create/modify dates!\n case 'description':\n case 'excerpt':\n $fields[] = 'description';\n break;\n case 'id':\n $fields[] = 'eid';\n break;\n case 'title':\n $fields[] = 'title';\n break;\n case 'url':\n // needed for $eid == '*', but also in case we're only requesting\n // the URL (so that $fields isn't emtpy)\n $fields[] = 'eid';\n break;\n default:\n // nothing to do\n break;\n }\n }\n\n $fields = array_unique($fields);\n\n if (count($fields) == 0) {\n $retval = array();\n\n return $retval;\n }\n\n // prepare SQL request\n if ($eid == '*') {\n $where = '';\n $permOp = 'WHERE';\n } else {\n $where = \" WHERE eid = '\" . addslashes($eid) . \"'\";\n $permOp = 'AND';\n }\n if ($uid > 0) {\n $permSql = COM_getPermSql($permOp, $uid);\n } else {\n $permSql = COM_getPermSql($permOp);\n }\n $sql = \"SELECT \" . implode(',', $fields)\n . \" FROM {$_TABLES['events']}\" . $where . $permSql;\n if ($eid != '*') {\n $sql .= ' LIMIT 1';\n }\n\n $result = DB_query($sql);\n $numRows = DB_numRows($result);\n\n $retval = array();\n for ($i = 0; $i < $numRows; $i++) {\n $A = DB_fetchArray($result);\n\n $props = array();\n foreach ($properties as $p) {\n switch ($p) {\n case 'description':\n case 'excerpt':\n $props[$p] = $A['description'];\n break;\n case 'id':\n $props['id'] = $A['eid'];\n break;\n case 'title':\n $props['title'] = stripslashes($A['title']);\n break;\n case 'url':\n if (empty($A['eid'])) {\n $props['url'] = $_CONF['site_url'] . '/calendar/event.php?'\n . 'eid=' . $eid;\n } else {\n $props['url'] = $_CONF['site_url'] . '/calendar/event.php?'\n . 'eid=' . $A['eid'];\n }\n break;\n default:\n // return empty string for unknown properties\n $props[$p] = '';\n break;\n }\n }\n\n $mapped = array();\n foreach ($props as $key => $value) {\n if ($eid == '*') {\n if ($value != '') {\n $mapped[$key] = $value;\n }\n } else {\n $mapped[] = $value;\n }\n }\n\n if ($eid == '*') {\n $retval[] = $mapped;\n } else {\n $retval = $mapped;\n break;\n }\n }\n\n if (($eid != '*') && (count($retval) == 1)) {\n $retval = $retval[0];\n }\n\n return $retval;\n}", "title": "" }, { "docid": "f0f83244b2a8e6e7c26970b79bd7a206", "score": "0.6036739", "text": "function HtmlEventsWhere()\n {\n return\n array\n (\n \"Unit\" => $this->Unit(\"ID\"),\n );\n }", "title": "" }, { "docid": "21e910a8399a95f0d3c54798d8827ae8", "score": "0.60356313", "text": "function get_all_event_event()\n {\n $this->db->select('id_event, name_event, lokasi, pembicara, tanggal_mulai, jumlah_tiket, deskripsi_acara, status');\n $this->db->order_by('id_event', 'desc');\n return $this->db->get('event_event')->result_array();\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "6eb242a44f00c105d7b38eef7fcc1f36", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n $this->validate($request,[\n 'content'=>'required | min:10',\n 'question_id'=>'required | integer',\n ]);\n\n $answer=new Answer();\n $answer->content=$request->content;\n $answer->user()->associate(Auth::user()->id);\n\n $question=Question::findOrFail($request->question_id);\n $submitAnswer=$question->answers()->save($answer);\n\n if($submitAnswer){\n return redirect(route('questions.show',$request->question_id))->with('success','Answer submitted successfully');\n }else{\n return redirect(route('questions.show',$request->question_id))->with('fail','An error occurred while submitting your answer please resend');\n }\n\n\n }", "title": "" } ]
[ { "docid": "75600e5d65c2156987ff7cb140e14a4b", "score": "0.6621582", "text": "public function store() {\n $fileService = $this->getFileService();\n $filename = $this->getCacheDirectory() . $this->generateCacheablefilename();\n $fileService->saveFile($filename, $this->resource->getContent());\n }", "title": "" }, { "docid": "f1bd5867e87bbf56aefbfc6de8693786", "score": "0.66209733", "text": "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 }", "title": "" }, { "docid": "0c03c39e441c2fe392d76d6370ae3ce2", "score": "0.65685713", "text": "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 }", "title": "" }, { "docid": "0f8c1fe3e3b0c6572457ef33c35c6488", "score": "0.65095705", "text": "function storeAndNew() {\n $this->store();\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
31b8292a88983ffd830e4fe89974d536
Test the different update actions in \Drupal::service('pathauto.manager')>createAlias().
[ { "docid": "3aea36f8c441e58edaa08fb8ebcaaeb2", "score": "0.70731735", "text": "public function testUpdateActions() {\n $config = $this->config('pathauto.settings');\n\n // Test PATHAUTO_UPDATE_ACTION_NO_NEW with unaliased node and 'insert'.\n $config->set('update_action', PathautoManagerInterface::UPDATE_ACTION_NO_NEW);\n $config->save();\n $node = $this->drupalCreateNode(array('title' => 'First title'));\n $this->assertEntityAlias($node, 'content/first-title');\n\n $node->path->pathauto = TRUE;\n\n // Default action is PATHAUTO_UPDATE_ACTION_DELETE.\n $config->set('update_action', PathautoManagerInterface::UPDATE_ACTION_DELETE);\n $config->save();\n $node->setTitle('Second title');\n $node->save();\n $this->assertEntityAlias($node, 'content/second-title');\n $this->assertNoAliasExists(array('alias' => 'content/first-title'));\n\n // Test PATHAUTO_UPDATE_ACTION_LEAVE\n $config->set('update_action', PathautoManagerInterface::UPDATE_ACTION_LEAVE);\n $config->save();\n $node->setTitle('Third title');\n $node->save();\n $this->assertEntityAlias($node, 'content/third-title');\n $this->assertAliasExists(array('source' => $node->getSystemPath(), 'alias' => 'content/second-title'));\n\n $config->set('update_action', PathautoManagerInterface::UPDATE_ACTION_DELETE);\n $config->save();\n $node->setTitle('Fourth title');\n $node->save();\n $this->assertEntityAlias($node, 'content/fourth-title');\n $this->assertNoAliasExists(array('alias' => 'content/third-title'));\n // The older second alias is not deleted yet.\n $older_path = $this->assertAliasExists(array('source' => $node->getSystemPath(), 'alias' => 'content/second-title'));\n \\Drupal::service('path.alias_storage')->delete($older_path);\n\n $config->set('update_action', PathautoManagerInterface::UPDATE_ACTION_NO_NEW);\n $config->save();\n $node->setTitle('Fifth title');\n $node->save();\n $this->assertEntityAlias($node, 'content/fourth-title');\n $this->assertNoAliasExists(array('alias' => 'content/fifth-title'));\n\n // Test PATHAUTO_UPDATE_ACTION_NO_NEW with unaliased node and 'update'.\n $this->deleteAllAliases();\n $node->save();\n $this->assertEntityAlias($node, 'content/fifth-title');\n\n // Test PATHAUTO_UPDATE_ACTION_NO_NEW with unaliased node and 'bulkupdate'.\n $this->deleteAllAliases();\n $node->setTitle('Sixth title');\n \\Drupal::service('pathauto.manager')->updateAlias($node, 'bulkupdate');\n $this->assertEntityAlias($node, 'content/sixth-title');\n }", "title": "" } ]
[ { "docid": "60706731aa301cafc9b99ff6d25cbd45", "score": "0.6355532", "text": "function dbf_client_update_alias($dbf_client, $op, array $options = array()) {\n // Skip processing if the user has disabled pathauto for the dbf_client.\n if (isset($dbf_client->path['pathauto']) && empty($dbf_client->path['pathauto'])) {\n return;\n }\n\n $options += array(\n 'language' => isset($dbf_client->language) ? $dbf_client->language : LANGUAGE_NONE,\n );\n\n // Skip processing if the dbf_client has no pattern.\n if (!pathauto_pattern_load_by_entity('dbf_client', $dbf_client->type, $options['language'])) {\n return;\n }\n\n module_load_include('inc', 'pathauto');\n $uri = entity_uri('dbf_client', $dbf_client);\n pathauto_create_alias('dbf_client', $op, $uri['path'], array('dbf_client' => $dbf_client), $dbf_client->type, $options['language']);\n}", "title": "" }, { "docid": "a3a7538999ee5aac85d5f655c0e8b27d", "score": "0.62003833", "text": "function execute() {\n include_once(PAPAYA_INCLUDE_PATH.'system/base_language_select.php');\n $this->lngSelect = &base_language_select::getInstance();\n if ($this->authUser->hasPerm(PapayaAdministrationPermissions::ALIAS_MANAGE)) {\n if (isset($this->params['cmd'])) {\n switch ($this->params['cmd']) {\n case 'alias_delete':\n if (isset($this->params['alias_id']) &&\n $this->params['alias_id'] > 0 &&\n isset($this->params['confirm_delete']) &&\n $this->params['confirm_delete']) {\n if ($this->deleteAlias((int)$this->params['alias_id'])) {\n unset($this->params['cmd']);\n $this->addMsg(MSG_INFO, $this->_gt('Alias deleted.'));\n } else {\n $this->addMsg(MSG_WARNING, $this->_gt('Database error'));\n }\n }\n break;\n case 'alias_create':\n $this->initializeAliasDialog();\n if ($this->dialogAlias->checkDialogInput() &&\n $this->checkAliasInput()) {\n if ($newId = $this->createAlias()) {\n unset($this->dialogAlias);\n $this->params['alias_id'] = $newId;\n $this->addMsg(MSG_INFO, $this->_gt('Changes saved.'));\n } else {\n $this->addMsg(\n MSG_WARNING,\n $this->_gt('Database error! Changes not saved.')\n );\n }\n }\n break;\n case 'alias_edit':\n if (isset($this->params['alias_id']) &&\n $this->params['alias_id'] > 0 &&\n $this->loadAlias($this->params['alias_id'])) {\n $this->initializeAliasDialog();\n if ($this->dialogAlias->checkDialogInput() &&\n $this->checkAliasInput()) {\n if ($this->saveAlias($this->dialogAlias->data)) {\n unset($this->dialogAlias);\n $this->load($this->params['alias_id']);\n $this->addMsg(MSG_INFO, $this->_gt('Changes saved.'));\n } else {\n $this->addMsg(\n MSG_WARNING,\n $this->_gt('Database error! Changes not saved.')\n );\n }\n }\n }\n break;\n }\n }\n if (isset($this->params['alias_id']) && $this->params['alias_id'] > 0) {\n $this->loadAlias($this->params['alias_id']);\n }\n }\n }", "title": "" }, { "docid": "c5b6ae1d555bfb0fa008b3acc9430060", "score": "0.6049913", "text": "public function updateAliases(array $aliasActions);", "title": "" }, { "docid": "ac11a1220af17aac021372657913a903", "score": "0.59735924", "text": "public function testCommandInfoAlter()\n {\n $this->setUpDrupal(1, true);\n $this->setupModulesForTests(['woot'], Path::join(__DIR__, 'resources/modules/d8'));\n $this->drush('pm-enable', ['woot']);\n $this->drush('woot:altered', [], ['help' => true, 'debug' => true]);\n $this->assertNotContains('woot-initial-alias', $this->getOutput());\n $this->assertContains('woot-new-alias', $this->getOutput());\n\n // Check the debug messages.\n $this->assertContains('[debug] Commands are potentially altered in Drupal\\woot\\WootCommandInfoAlterer.', $this->getErrorOutput());\n $this->assertContains(\"[debug] Module 'woot' changed the alias of 'woot:altered' command into 'woot-new-alias' in Drupal\\woot\\WootCommandInfoAlterer::alterCommandInfo().\", $this->getErrorOutput());\n\n // Try to run the command with the initial alias.\n $this->drush('woot-initial-alias', [], [], null, null, self::EXIT_ERROR);\n // Run the command with the altered alias.\n $this->drush('woot-new-alias');\n }", "title": "" }, { "docid": "9dbb05deb012dc4c7d1b6c2eaac1e740", "score": "0.59533983", "text": "abstract public function test_method_update_updatesResource();", "title": "" }, { "docid": "a3794798ecda2e39f097bfb2ff6c13e1", "score": "0.58647376", "text": "public function testAlias()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "633d41b5ca2aa998132aaebf545935ad", "score": "0.5860517", "text": "public function testUpdateOrganizationAdmin()\n {\n }", "title": "" }, { "docid": "298061321264fd7a5663902f1358013b", "score": "0.5840157", "text": "function ciniki_events_linkUpdate(&$ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'link_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Link'),\n 'name'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Name'), \n 'url'=>array('required'=>'no', 'blank'=>'no', 'name'=>'URL'),\n 'description'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Description'),\n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n\n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'events', 'private', 'checkAccess');\n $rc = ciniki_events_checkAccess($ciniki, $args['tnid'], 'ciniki.events.linkUpdate'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n\n //\n // If the url is being updated, check the new one does not exist\n //\n if( isset($args['url']) && $args['url'] != '' ) {\n //\n // Get the existing link\n //\n $strsql = \"SELECT id, event_id, name, url, description \"\n . \"FROM ciniki_event_links \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $args['link_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.events', 'link');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['link']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.events.34', 'msg'=>'The event link does not exist'));\n }\n $link = $rc['link'];\n\n //\n // Check the url\n //\n $strsql = \"SELECT id \"\n . \"FROM ciniki_event_links \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND url = '\" . ciniki_core_dbQuote($ciniki, $args['url']) . \"' \"\n . \"AND event_id = '\" . ciniki_core_dbQuote($ciniki, $link['event_id']) . \"' \"\n . \"AND id <> '\" . ciniki_core_dbQuote($ciniki, $link['id']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.events', 'link');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['link']) || (isset($rc['rows']) && count($rc['rows']) > 0) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.events.35', 'msg'=>'You already have a event link with that url, please choose another'));\n }\n }\n\n //\n // Upate the event link\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $args['tnid'], 'ciniki.events.link', \n $args['link_id'], $args, 0x07);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n return array('stat'=>'ok');\n}", "title": "" }, { "docid": "e849da53234fb6dadda81aa722977553", "score": "0.5750907", "text": "public function testUrlAlias() {\n $facet_id = 'ab_facet';\n $this->createFacet('ab Facet', $facet_id, 'type', static::VIEW_DISPLAY);\n\n $this->drupalGet(static::VIEW_URL);\n $this->assertFacetLabel('item');\n $this->assertFacetLabel('article');\n\n $this->clickLink('item');\n $url = Url::fromUserInput('/' . static::VIEW_URL, ['query' => ['f' => ['ab_facet:item']]]);\n $this->assertSession()->addressEquals($url);\n\n $this->updateFacet($facet_id, ['url_alias' => 'llama']);\n\n $this->drupalGet(static::VIEW_URL);\n $this->assertFacetLabel('item');\n $this->assertFacetLabel('article');\n\n $this->clickLink('item');\n $url = Url::fromUserInput('/' . static::VIEW_URL, ['query' => ['f' => ['llama:item']]]);\n $this->assertSession()->addressEquals($url);\n }", "title": "" }, { "docid": "db6fe832361daac9d63b3c5d21959d7f", "score": "0.5701801", "text": "public function testUpdateOrganizationActionBatch()\n {\n }", "title": "" }, { "docid": "39ad894d2ec166f318a532f9f8aeb504", "score": "0.56698865", "text": "function dbf_client_update_alias_multiple(array $pids, $op, array $options = array()) {\n $options += array('message' => FALSE);\n\n $entities = dbf_client_load_multiple($pids);\n foreach ($entities as $dbf_client) {\n dbf_client_update_alias($dbf_client, $op, $options);\n }\n\n if (!empty($options['message'])) {\n drupal_set_message(format_plural(count($pids), 'Updated URL alias for 1 DBF Client.', 'Updated URL aliases for @count DBF Clients.'));\n }\n}", "title": "" }, { "docid": "daab8b33f10543b82a4d9be65abf7291", "score": "0.55689657", "text": "public function testSetAlias()\n {\n $field = Stub::make('GraphQLQueryBuilder\\Field');\n $output = $field->setAlias('foo');\n verify($output)->equals($field);\n }", "title": "" }, { "docid": "337dde4cfafb7b1d2e999a2b6f3e0682", "score": "0.5567096", "text": "public function testListingUpdate()\n {\n }", "title": "" }, { "docid": "57f2a0008f197eb769198eedef21b69e", "score": "0.5554817", "text": "public function updating_aliased_tag_does_nothing()\n {\n $user = factory(User::class)->create();\n $this->actingAs($user);\n\n $tag1 = factory(Tag::class)->create();\n $tag2 = factory(Tag::class)->create();\n\n $tag1_records = factory(Record::class, 10)->states('approved')->create();\n\n $tag1_records_ids = $tag1_records->pluck('id')->toArray();\n $tag1_records_count = $tag1_records->count();\n\n $tag1->records()->saveMany($tag1_records);\n\n $tag1->aliases()->save($tag2);\n\n foreach(Record::whereIn('id', $tag1_records_ids)->get() as $record)\n {\n $this->assertEquals(1, $record->tags()->count());\n }\n\n $this->assertEquals($tag1_records_count, Tag::find($tag1->id)->records()->count());\n\n $this->assertEquals(0, Tag::find($tag2->id)->records()->count());\n\n\n\n $tag2->name = 'update_test';\n $tag2->save();\n $tag2->doAliasSideEffects();\n\n\n\n foreach(Record::whereIn('id', $tag1_records_ids)->get() as $record)\n {\n $this->assertEquals(1, $record->tags()->count());\n }\n\n $this->assertEquals($tag1_records_count, Tag::find($tag1->id)->records()->count());\n\n $this->assertEquals(0, Tag::find($tag2->id)->records()->count());\n }", "title": "" }, { "docid": "7736809d0fd18ac3803f4daedf4248fa", "score": "0.55480075", "text": "function alias_old_form_submit($form, &$form_state) {\n $result = node_load_multiple(array(), array('type' => 'test', 'status' => 0)); \n\n foreach ($result as $row) {\n $operations[] = array('alias_old_change_alias', array($row->nid));\n }\n $batch = array(\n 'operations' => $operations,\n 'finished' => 'alias_old_finished',\n 'title' => 'Обновление alias',\n 'init_message' => 'Подготовка данных',\n 'progress_message' => 'Выполнено @current из @total.',\n 'error_message' => 'Произошла ошибка.',\n 'file' => drupal_get_path('module', 'alias_old') . '/alias_old.batch.inc',\n );\n\n batch_set($batch);\n batch_process();\n}", "title": "" }, { "docid": "f128d523c346862d12e7c82a7bdfb6e9", "score": "0.5541829", "text": "public function testAnalysisTemplateUpdate()\r\n {\r\n\r\n }", "title": "" }, { "docid": "af0bebaba605c92eed0d43cf5aeb869f", "score": "0.5539359", "text": "abstract public function registerAliases(): void;", "title": "" }, { "docid": "cbdf727f015d1647918d9c1f9385819a", "score": "0.5532094", "text": "public function testPathTokens() {\n $config = $this->config('pathauto.pattern');\n $config->set('patterns.taxonomy_term.default', '[term:parent:url:path]/[term:name]');\n $config->save();\n\n $vocab = $this->addVocabulary();\n\n $term1 = $this->addTerm($vocab, array('name' => 'Parent term'));\n $this->assertEntityAlias($term1, 'parent-term');\n\n $term2 = $this->addTerm($vocab, array('name' => 'Child term', 'parent' => $term1->id()));\n $this->assertEntityAlias($term2, 'parent-term/child-term');\n\n $this->saveEntityAlias($term1, 'My Crazy/Alias/');\n $term2->save();\n $this->assertEntityAlias($term2, 'My Crazy/Alias/child-term');\n }", "title": "" }, { "docid": "66413b9e87783391a75a345c43a86220", "score": "0.5510262", "text": "public function testPatchPath() {\n $this->initAuthentication();\n $this->provisionEntityResource();\n $this->setUpAuthorization('GET');\n $this->setUpAuthorization('PATCH');\n\n $url = $this->getEntityResourceUrl()->setOption('query', ['_format' => static::$format]);\n\n // GET term's current normalization.\n $response = $this->request('GET', $url, $this->getAuthenticationRequestOptions('GET'));\n $normalization = $this->serializer->decode((string) $response->getBody(), static::$format);\n\n // Change term's path alias.\n $normalization['path'][0]['alias'] .= 's-rule-the-world';\n\n // Create term PATCH request.\n $request_options = [];\n $request_options[RequestOptions::HEADERS]['Content-Type'] = static::$mimeType;\n $request_options = array_merge_recursive($request_options, $this->getAuthenticationRequestOptions('PATCH'));\n $request_options[RequestOptions::BODY] = $this->serializer->encode($normalization, static::$format);\n\n // PATCH request: 200.\n $response = $this->request('PATCH', $url, $request_options);\n $this->assertResourceResponse(200, FALSE, $response);\n $updated_normalization = $this->serializer->decode((string) $response->getBody(), static::$format);\n $this->assertSame($normalization['path'], $updated_normalization['path']);\n }", "title": "" }, { "docid": "722002325cce8279445570801ae067f3", "score": "0.5505911", "text": "public function testUpdateRule()\n {\n\n }", "title": "" }, { "docid": "8be0420f34ffd7e8403c0d0184c6e32b", "score": "0.5468017", "text": "public function testResourceAddsConfiguredAliases()\n {\n $configuredAliases = array(\n 'login' => 'Zend_Form'\n );\n $options = array(\n 'aliases' => $configuredAliases\n );\n $this->resource->setOptions($options);\r\n $factory = $this->resource->init();\r\n $this->assertInstanceOf('Mol_Form_Factory', $factory);\n $aliases = $factory->getAliases();\n $this->assertEquals($configuredAliases, $aliases);\n }", "title": "" }, { "docid": "832aed8c4236ad9cbec06d4b267ac4ca", "score": "0.5461408", "text": "public function testSharingDefinitionsUpdateSharingDefinition()\n {\n }", "title": "" }, { "docid": "5debc8cdb286e609c6b992c77da95196", "score": "0.54605705", "text": "public function test_fileUpdateAll() {\n\n }", "title": "" }, { "docid": "ae492241495a70ae8a80922e59bb0fca", "score": "0.5454318", "text": "public function testAttributeUpdate()\n {\n\n $data = $this->_getAttributeBasicData();\n $attribute = Attribute::create($data);\n\n $data['name'] = 'Test Attribute Update';\n $data['identifier'] = 'test-attribute-update';\n\n $response = $this->actingAs($this->adminUser,'admin')\n ->put(\"/admin/attribute/{$attribute->id}\", $data);\n\n $response->assertRedirect('/admin/attribute');\n $this->assertDatabaseHas('attributes',['identifier' => 'test-attribute-update']);\n $this->assertDatabaseHas('attribute_dropdown_options',['display_text' => 'test option1']);\n }", "title": "" }, { "docid": "dd8b4cd4e1725bb8e1cf3ecfca714bd2", "score": "0.5447176", "text": "public function testRelationAliases() {\n // it to fail in a test()-method\n try {\n $group = new Ticket_1621_Group();\n $group->name = 'group1';\n $group->save();\n \n $group2 = new Ticket_1621_Group();\n $group2->name = 'group2';\n $group2->save();\n \n $user = new Ticket_1621_User();\n $user->name = \"floriank\";\n $user->groups[] = $group;\n $user->emailAddresses[0]->address = \"floriank@localhost\";\n $user->save();\n \n $user2 = new Ticket_1621_User();\n $user2->name = \"test2\";\n $user2->emailAddresses[0]->address = \"test2@localhost\";\n $user2->save();\n \n $user3 = new Ticket_1621_User();\n $user3->name = \"test3\";\n $user3->emailAddresses[0]->address = \"test3@localhost\";\n $user3->save();\n \n $user4 = new Ticket_1621_User();\n $user4->name = \"test\";\n $user4->groups[] = $group2;\n $user4->children[] = $user2;\n $user4->parents[] = $user3;\n $user4->emailAddresses[0]->address = \"test@localhost\";\n $user4->save();\n } catch (Exception $e) {\n $this->fail($e);\n }\n \n \n \n //here is the testcode\n try {\n $user = Doctrine_Core::getTable('Ticket_1621_User')->findOneByName('floriank');\n $newChild = Doctrine_Core::getTable('Ticket_1621_User')->findOneByName('test');\n $newFriend = Doctrine_Core::getTable('Ticket_1621_User')->findOneByName('test2');\n $newGroup = Doctrine_Core::getTable('Ticket_1621_Group')->findOneByName('group2');\n \n $user->children[] = $newChild;\n $user->groups[] = $newGroup;\n $user->friends[] = $newFriend;\n \n $user->save();\n \n $this->assertEqual(count($user->children), 1);\n } catch (Exception $e) {\n $this->fail($e);\n }\n }", "title": "" }, { "docid": "eb764c72445ac69b9f9481f1d569dbc0", "score": "0.54464006", "text": "public function test_updateKit() {\n\n }", "title": "" }, { "docid": "8db15ef2a3165f50d6e489f505c49ac4", "score": "0.5437456", "text": "public function testDynamicSegmentUpdate()\n {\n $segmentName = 'Segment_' . mt_rand();\n $userName = 'user_' . mt_rand();\n\n $login = $this->login();\n /** @var Segments $login */\n $login->openSegments('Oro\\Bundle\\SegmentBundle')\n ->assertTitle('All - Manage Segments - Reports & Segments')\n ->add()\n ->setName($segmentName)\n ->setEntity('User')\n ->setType('Dynamic')\n ->setOrganization('Main')\n ->addColumn(['First name', 'Last name', 'Username'])\n ->addFilterCondition('Field condition', 'Username', $userName)\n ->save();\n /** @var Users $login */\n $login->openUsers('Oro\\Bundle\\UserBundle')\n ->assertTitle('All - Users - User Management - System')\n ->add()\n ->assertTitle('Create User - Users - User Management - System')\n ->setUsername($userName)\n ->enable()\n ->setOwner('Main')\n ->setFirstPassword('123123q')\n ->setSecondPassword('123123q')\n ->setFirstName('First_'.$userName)\n ->setLastName('Last_'.$userName)\n ->setEmail($userName.'@mail.com')\n ->setRoles(array('Manager', 'Marketing Manager'), true)\n ->setOrganization('OroCRM')\n ->uncheckInviteUser()\n ->save()\n ->assertMessage('User saved');\n /** @var Segments $login */\n $login->openSegments('Oro\\Bundle\\SegmentBundle')\n ->filterBy('Name', $segmentName)\n ->open(array($segmentName))\n ->filterBy('Username', $userName)\n ->entityExists(array($userName));\n }", "title": "" }, { "docid": "b478f518831c6b15db565b2eca037439", "score": "0.543713", "text": "public function testUpdateTask()\n {\n\n }", "title": "" }, { "docid": "26c519ff687a4181636aa939e99bfd3f", "score": "0.54201305", "text": "public function testSurveyEditorUpdateOption()\n {\n\n }", "title": "" }, { "docid": "ed7c4b86d75b716fba677d62cafd2b1b", "score": "0.54157233", "text": "function accessUpdates() {\n try {\n //update module name \n \\Cx\\Lib\\UpdateUtil::sql(\"UPDATE `\".DBPREFIX.\"modules` SET `name` = 'Access' WHERE `id` = 23\");\n //update navigation url\n \\Cx\\Lib\\UpdateUtil::sql(\"UPDATE `\".DBPREFIX.\"backend_areas` SET `uri` = 'index.php?cmd=Access', `module_id` = '23' WHERE `area_id` = 18\");\n \\Cx\\Lib\\UpdateUtil::sql(\"UPDATE `\".DBPREFIX.\"backend_areas` SET `uri` = 'index.php?cmd=Access' WHERE `area_id` = 208\");\n //Insert component entry\n \\Cx\\Lib\\UpdateUtil::sql(\"INSERT INTO `\".DBPREFIX.\"component` (`id`, `name`, `type`) VALUES ('23', 'Access', 'core_module')\");\n //update module name for frontend pages\n \\Cx\\Lib\\UpdateUtil::sql(\"UPDATE `\".DBPREFIX.\"content_page` SET `module` = 'Access' WHERE `module` = 'access'\");\n //update module name for crm core settings\n \\Cx\\Lib\\UpdateUtil::sql(\"UPDATE `\".DBPREFIX.\"core_setting` SET `section` = 'Access' WHERE `section` = 'access' AND `name` = 'providers' AND `group` = 'sociallogin'\");\n } catch (\\Cx\\Lib\\UpdateException $e) {\n return \"Error: $e->sql\";\n }\n \n //Update script for moving the folder\n $accessImgPath = ASCMS_DOCUMENT_ROOT . '/images';\n \n try {\n if (file_exists($accessImgPath . '/access') && !file_exists($accessImgPath . '/Access')) {\n \\Cx\\Lib\\FileSystem\\FileSystem::makeWritable($accessImgPath . '/access');\n if (!\\Cx\\Lib\\FileSystem\\FileSystem::move($accessImgPath . '/access', $accessImgPath . '/Access')) {\n return 'Failed to move the folder from '.$accessImgPath . '/access to '.$accessImgPath . '/Access.';\n }\n }\n } catch (\\Cx\\Lib\\FileSystem\\FileSystemException $e) {\n return $e->getMessage();\n }\n \n return 'Access updated successfully.';\n}", "title": "" }, { "docid": "d3e622eff2f7ccfad8a9679983b13ceb", "score": "0.54023737", "text": "public function testUpdate1()\n {\n }", "title": "" }, { "docid": "1b55d7518b1ec87ba917fcffd2c1ad0f", "score": "0.53813446", "text": "public function testManualSegmentUpdate()\n {\n $segmentName = 'Segment_' . mt_rand();\n $userName = 'user_' . mt_rand();\n\n $login = $this->login();\n /** @var Segments $login */\n $login->openSegments('Oro\\Bundle\\SegmentBundle')\n ->assertTitle('All - Manage Segments - Reports & Segments')\n ->add()\n ->setName($segmentName)\n ->setEntity('User')\n ->setType('Manual')\n ->setOrganization('Main')\n ->addColumn(['First name', 'Last name', 'Username'])\n ->addFilterCondition('Field condition', 'Username', $userName)\n ->save();\n /** @var Users $login */\n $login->openUsers('Oro\\Bundle\\UserBundle')\n ->assertTitle('All - Users - User Management - System')\n ->add()\n ->assertTitle('Create User - Users - User Management - System')\n ->setUsername($userName)\n ->enable()\n ->setOwner('Main')\n ->setFirstPassword('123123q')\n ->setSecondPassword('123123q')\n ->setFirstName('First_'.$userName)\n ->setLastName('Last_'.$userName)\n ->setEmail($userName.'@mail.com')\n ->setRoles(array('Manager', 'Marketing Manager'), true)\n ->setOrganization('OroCRM')\n ->uncheckInviteUser()\n ->save()\n ->assertMessage('User saved');\n /** @var Segments $login */\n $login->openSegments('Oro\\Bundle\\SegmentBundle')\n ->filterBy('Name', $segmentName)\n ->open(array($segmentName))\n ->assertNoDataMessage('No records found')\n ->refreshSegment()\n ->filterBy('Username', $userName)\n ->entityExists(array($userName));\n }", "title": "" }, { "docid": "7091bc67949898271c5b14f988f43c83", "score": "0.53761375", "text": "public function testCanFindAlias()\n {\n $aliases = array(\"one\", \"two\", \"three\");\n\n $boardEditor =new BoardEditor(\"hello\");\n $option = new BoardEditorOption($boardEditor);\n\n $option->setAliases($aliases);\n\n $this->assertTrue($option->hasAlias(\"one\"));\n $this->assertTrue($option->hasAlias(\"two\"));\n $this->assertTrue($option->hasAlias(\"three\"));\n $this->assertFalse($option->hasAlias(\"random\"));\n $this->assertFalse($option->hasAlias(\"hello\"));\n $this->assertFalse($option->hasAlias(\"myOption\"));\n }", "title": "" }, { "docid": "b2d6810521ca684ae8e9922b9d7d6714", "score": "0.53687656", "text": "function testUpdate() {\n $this->assertTrue($this->get(WEBSITE_URL . '/' . $this->aRequest['controller'] . '/1/update'));\n $this->assert404();\n }", "title": "" }, { "docid": "8dcfca02248417d71e8713e8b34e4f42", "score": "0.52912176", "text": "public function update($update = null, $alias = null);", "title": "" }, { "docid": "41c6a81e474d1f36c55cc37764aa8ee7", "score": "0.52901", "text": "public function updateIndexAlias()\n {\n $aliasName = $this->searchClient->getIndexName(); // The alias name is the unprefixed index name\n if ($this->getIndexName() === $aliasName) {\n throw new Exception('UpdateIndexAlias is only allowed to be called when $this->setIndexNamePostfix has been created.', 1383649061);\n }\n\n if (!$this->getIndex()->exists()) {\n throw new Exception('The target index for updateIndexAlias does not exist. This shall never happen.', 1383649125);\n }\n\n $aliasActions = [];\n try {\n $response = $this->searchClient->request('GET', '/_alias/' . $aliasName);\n if ($response->getStatusCode() !== 200) {\n throw new Exception('The alias \"' . $aliasName . '\" was not found with some unexpected error... (return code: ' . $response->getStatusCode() . ')', 1383650137);\n }\n\n $indexNames = array_keys($response->getTreatedContent());\n\n if ($indexNames === []) {\n // if there is an actual index with the name we want to use as alias, remove it now\n $response = $this->searchClient->request('HEAD', '/' . $aliasName);\n if ($response->getStatusCode() === 200) {\n $response = $this->searchClient->request('DELETE', '/' . $aliasName);\n if ($response->getStatusCode() !== 200) {\n throw new Exception('The index \"' . $aliasName . '\" could not be removed to be replaced by an alias. (return code: ' . $response->getStatusCode() . ')', 1395419177);\n }\n }\n } else {\n foreach ($indexNames as $indexName) {\n $aliasActions[] = [\n 'remove' => [\n 'index' => $indexName,\n 'alias' => $aliasName\n ]\n ];\n }\n }\n } catch (\\Flowpack\\ElasticSearch\\Transfer\\Exception\\ApiException $exception) {\n // in case of 404, do not throw an error...\n if ($exception->getResponse()->getStatusCode() !== 404) {\n throw $exception;\n }\n }\n\n $aliasActions[] = [\n 'add' => [\n 'index' => $this->getIndexName(),\n 'alias' => $aliasName\n ]\n ];\n\n $this->searchClient->request('POST', '/_aliases', [], \\json_encode(['actions' => $aliasActions]));\n }", "title": "" }, { "docid": "890e612beb7bbde6acb5676eb912ec5d", "score": "0.5289611", "text": "public function test_updateKitCustomFields() {\n\n }", "title": "" }, { "docid": "5634b77d46642ac2d87e632e7a7f4e48", "score": "0.5289215", "text": "function xanthia_adminapi_update()\n{\n\t// pass thru, this function has been deprecated\n\t// code removed for clarity\n}", "title": "" }, { "docid": "1fb673048ba8548eefda40f2ea3355c1", "score": "0.5288934", "text": "public function testGetGuidAliases()\n {\n }", "title": "" }, { "docid": "517d94af94f2c3c4c17be374fc0f3295", "score": "0.52856946", "text": "public function testUpdateOrganization()\n {\n }", "title": "" }, { "docid": "1eda414b27171c7b9b24a863f221cd41", "score": "0.5285408", "text": "public function testUpdateTaskForDevice()\n {\n\n }", "title": "" }, { "docid": "84f3ccfa94c80573962882dbb25f78e5", "score": "0.527122", "text": "public function testMonitoredFoldersMonitoredFolderUpdate()\n {\n }", "title": "" }, { "docid": "4d0a37519119905d0b27d543ad2d2416", "score": "0.526237", "text": "public function testSendingAliases()\n {\n $mailbox = Mailbox::factory()->create();\n $alias1 = Alias::factory()->create();\n $alias2 = Alias::factory()->create();\n $mailbox->sendingAliases()->saveMany([\n $alias1,\n $alias2\n ]);\n $this->assertTrue($mailbox->fresh()->sendingAliases->contains($alias1));\n $this->assertTrue($mailbox->fresh()->sendingAliases->contains($alias2));\n\n $otherMailbox = Mailbox::factory()->create();\n $otherAlias = Alias::factory()->create();\n $otherMailbox->sendingAliases()->save($otherAlias);\n $this->assertFalse($mailbox->fresh()->sendingAliases->contains($otherAlias));\n }", "title": "" }, { "docid": "cba14218e29201d0f0a81bf316e30c21", "score": "0.523275", "text": "public function testDomainAliasNegotiator() {\n // No domains should exist.\n $this->domainTableIsEmpty();\n\n // Create two new domains programmatically.\n $this->domainCreateTestDomains(2);\n\n // Since we cannot read the service request, we place a block\n // which shows the current domain information.\n $this->drupalPlaceBlock('domain_server_block');\n\n // To get around block access, let the anon user view the block.\n user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, ['administer domains']);\n\n // Set the storage handles.\n $domain_storage = \\Drupal::entityTypeManager()->getStorage('domain');\n $alias_storage = \\Drupal::entityTypeManager()->getStorage('domain_alias');\n\n // Set known prefixes that work with our tests. This will give us domains\n // 'example.com' and 'one.example.com' aliased to 'two.example.com' and\n // 'three.example.com'.\n $prefixes = ['two', 'three'];\n // Test the response of each home page.\n /** @var \\Drupal\\domain\\Entity\\Domain $domain */\n foreach ($domain_storage->loadMultiple() as $domain) {\n $alias_domains[] = $domain;\n $this->drupalGet($domain->getPath());\n $this->assertRaw($domain->label(), 'Loaded the proper domain.');\n $this->assertRaw('Exact match', 'Direct domain match.');\n }\n\n // Now, test an alias for each domain.\n foreach ($alias_domains as $index => $alias_domain) {\n $prefix = $prefixes[$index];\n // Set a known pattern.\n $pattern = $prefix . '.' . $this->baseHostname;\n $this->domainAliasCreateTestAlias($alias_domain, $pattern);\n $alias = $alias_storage->loadByPattern($pattern);\n // Set the URL for the request. Note that this is not saved, it is just\n // URL generation.\n $alias_domain->set('hostname', $pattern);\n $alias_domain->setPath();\n $url = $alias_domain->getPath();\n $this->drupalGet($url);\n $this->assertRaw($alias_domain->label(), 'Loaded the proper domain.');\n $this->assertRaw('ALIAS:', 'No direct domain match.');\n $this->assertRaw($alias->getPattern(), 'Alias match.');\n\n // Test redirections.\n // @TODO: This could be much more elegant: the redirects break assertRaw()\n $alias->set('redirect', 301);\n $alias->save();\n $this->drupalGet($url);\n $alias->set('redirect', 302);\n $alias->save();\n $this->drupalGet($url);\n }\n // Test a wildcard alias.\n // @TODO: Refactor this test to merge with the above.\n $alias_domain = $domain_storage->loadDefaultDomain();\n $pattern = '*.' . $this->baseHostname;\n $this->domainAliasCreateTestAlias($alias_domain, $pattern);\n $alias = $alias_storage->loadByPattern($pattern);\n // Set the URL for the request. Note that this is not saved, it is just\n // URL generation.\n $alias_domain->set('hostname', 'four.' . $this->baseHostname);\n $alias_domain->setPath();\n $url = $alias_domain->getPath();\n $this->drupalGet($url);\n $this->assertRaw($alias_domain->label(), 'Loaded the proper domain.');\n $this->assertRaw('ALIAS:', 'No direct domain match.');\n $this->assertRaw($alias->getPattern(), 'Alias match.');\n\n // Test redirections.\n // @TODO: This could be much more elegant: the redirects break assertRaw()\n $alias->set('redirect', 301);\n $alias->save();\n $this->drupalGet($url);\n $alias->set('redirect', 302);\n $alias->save();\n $this->drupalGet($url);\n\n // Revoke the permission change.\n user_role_revoke_permissions(RoleInterface::ANONYMOUS_ID, ['administer domains']);\n }", "title": "" }, { "docid": "2c17ca0f4c6df3b853a72d71a37d3b71", "score": "0.5223747", "text": "public function testAddGuidAlias()\n {\n }", "title": "" }, { "docid": "fa48b9be3b4cab56a87e4e4e30243cca", "score": "0.5223061", "text": "public function test_filePrototypeUpdateByIdResolutions() {\n\n }", "title": "" }, { "docid": "241c9f1ba48daaa6da3eb4604a69c2ac", "score": "0.5217623", "text": "public function actionAdminUpdate() {\n //$this->processItems(true);\n $this->processAdminItems(true, false);\n }", "title": "" }, { "docid": "dc8d878dd7382e15d0ba487ac678e95a", "score": "0.5216117", "text": "function doAlias()\r\n\t{\r\n //Check if there is an alias\r\n if(isset($this->_classConstruct->methodTable[$this->_methodname]) \r\n \t&& isset($this->_classConstruct->methodTable[$this->_methodname]['alias']))\r\n {\r\n \t$this->bodyObj->setMethodName($this->_classConstruct->methodTable[$this->_methodname]['alias']);\r\n \t$this->_methodname = $this->_classConstruct->methodTable[$this->_methodname]['alias'];\r\n }\r\n\t}", "title": "" }, { "docid": "8803f254930eb5ba8ccc7e629be000e5", "score": "0.52159667", "text": "public function test_updateWarehouseDocumentCustomFields() {\n\n }", "title": "" }, { "docid": "447ebffe2a3d5bea17d75d6668629883", "score": "0.5208459", "text": "public function testV1usernetkiupdate()\n {\n\n }", "title": "" }, { "docid": "8aa014eeb3e4abe9de6fd8a92d950e58", "score": "0.52043545", "text": "public function testUpdateGuid()\n {\n }", "title": "" }, { "docid": "dbf8d1f09bfffabc3ffa6a509c119606", "score": "0.51946574", "text": "private function setAliases()\n {\n $path = \"users/{$this->id}/drush_aliases\";\n $options = ['method' => 'get',];\n $response = $this->request->request($path, $options);\n\n $this->aliases = $response['data']->drush_aliases;\n }", "title": "" }, { "docid": "23a67523766993f56d3605c858972d34", "score": "0.51910967", "text": "public function testRemoteRemoteIdApplyChangesPatch()\n {\n }", "title": "" }, { "docid": "6bc6e33b0a1b77e44b0d94f97ba4ee40", "score": "0.5182983", "text": "public function testUpdateOrganizationSaml()\n {\n }", "title": "" }, { "docid": "3c26df52fbf70cee3c91c76c7c6747d9", "score": "0.5181201", "text": "public function tags_can_find_their_alias_target()\n {\n $user = factory(User::class)->create();\n $this->actingAs($user);\n\n $tag = factory(Tag::class)->create();\n $alias = factory(Tag::class)->create();\n\n $this->assertNull(Tag::find($alias->id)->aliased_to);\n\n $tag->aliases()->save($alias);\n\n $this->assertEquals($tag->id, Tag::find($alias->id)->aliased_to->id);\n }", "title": "" }, { "docid": "3f069e8dfbc9b032f8f4dcf2f2bc361a", "score": "0.51734364", "text": "function Profile_adminapi_update($args)\n{\n // Argument check\n if (!isset($args['label']) || stristr($args['label'], '-') ||\n !isset($args['dudid']) || !is_numeric($args['dudid'])) {\n return LogUtil::registerArgsError();\n }\n\n $dom = ZLanguage::getModuleDomain('Profile');\n\n // The user API function is called.\n $item = pnModAPIFunc('Profile', 'user', 'get', array('propid' => $args['dudid']));\n\n if ($item == false) {\n return LogUtil::registerError(__('Error! No such personal info item found.', $dom));\n }\n\n // Clean the label\n $permsep = pnConfigGetVar('shorturlsseparator');\n $args['label'] = str_replace($permsep, '', DataUtil::formatPermalink($args['label']));\n\n // Security check\n if (!SecurityUtil::checkPermission('Profile::Item', \"$item[prop_label]::$args[dudid]\", ACCESS_EDIT)) {\n return LogUtil::registerPermissionError();\n }\n\n if (!SecurityUtil::checkPermission('Profile::Item', \"$args[label]::$args[dudid]\", ACCESS_EDIT)) {\n return LogUtil::registerPermissionError();\n }\n\n // If there's a new label, check if it already exists\n if ($args['label'] <> $item['prop_label']) {\n $vitem = pnModAPIFunc('Profile', 'user', 'get', array('proplabel' => $args['label']));\n if ($vitem) {\n return LogUtil::registerError(__(\"Error! There is already an personal info item with the label '%s'.\", DataUtil::formatForDisplay($args['label']), $dom));\n }\n }\n\n if (isset($args['prop_weight'])) {\n if ($args['prop_weight'] == 0) {\n unset($args['prop_weight']);\n } elseif ($args['prop_weight'] <> $item['prop_weight']) {\n $result = DBUtil::selectObjectByID('user_property', $args['prop_weight'], 'prop_weight');\n $result['prop_weight'] = $item['prop_weight'];\n\n $pntable = pnDBGetTables();\n $column = $pntable['user_property_column'];\n $where = \"$column[prop_weight] = '$args[prop_weight]'\n AND $column[prop_id] <> '$args[dudid]'\";\n\n DBUtil::updateObject($result, 'user_property', $where, 'prop_id');\n }\n }\n\n // create the object to update\n $obj = array();\n $obj['prop_id'] = $args['dudid'];\n $obj['prop_dtype'] = (isset($args['dtype']) ? $args['dtype'] : $item['prop_dtype']);\n $obj['prop_weight'] = (isset($args['prop_weight']) ? $args['prop_weight'] : $item['prop_weight']);\n\n // assumes if displaytype is set, all the validation info is\n if (isset($args['displaytype'])) {\n // a checkbox can't be required\n if ($args['displaytype'] == 2 && $args['required']) {\n $args['required'] = 0;\n }\n\n // Produce the validation array\n $args['listoptions'] = str_replace(Chr(10), '', str_replace(Chr(13), '', $args['listoptions']));\n $validationinfo = array('required' => $args['required'],\n 'viewby' => $args['viewby'],\n 'displaytype' => $args['displaytype'],\n 'listoptions' => $args['listoptions'],\n 'note' => $args['note']);\n\n $obj['prop_validation'] = serialize($validationinfo);\n }\n\n // let to modify the label for normal fields only\n if ($item['prop_dtype'] == 1) {\n $obj['prop_label'] = $args['label'];\n }\n\n // before update it search for option ID change\n // to update the respective user's data\n if ($obj['prop_validation'] != $item['prop_validation']) {\n pnModAPIFunc('Profile', 'dud', 'updatedata',\n array('item' => $item['prop_validation'],\n 'newitem' => $obj['prop_validation']));\n }\n\n $res = DBUtil::updateObject($obj, 'user_property', '', 'prop_id');\n\n // Check for an error with the database code\n if (!$res) {\n return LogUtil::registerError(__('Error! Could not save your changes.', $dom));\n }\n\n // New hook functions\n pnModCallHooks('item', 'update', $args['dudid'], array('module' => 'Profile'));\n\n // Let the calling process know that we have finished successfully\n return true;\n}", "title": "" }, { "docid": "ecd83fdfdd33ddee175a5ee27a9abec2", "score": "0.5169117", "text": "public function testUpdateModuleInstall() {\n $this->assertTrue(\\Drupal::moduleHandler()->moduleExists('update'));\n }", "title": "" }, { "docid": "780da3e0120990e3837542948111f709", "score": "0.5165342", "text": "public function updateAction()\n {\n\n }", "title": "" }, { "docid": "0ab3ce416fbe693a29002fa2b29f332b", "score": "0.51441836", "text": "public function actionUpdate()\n\t{\n\n\t}", "title": "" }, { "docid": "e6eebc835f6d9e751b92ded33ff04e77", "score": "0.51414853", "text": "public function notifyAliasChange(DataContainer $dc)\r\n {\r\n \r\n $strUrl = \\PageModel::findById(\\FaqCategoryModel::findById($dc->activeRecord->pid)->jumpTo)->getAbsoluteUrl('/'.$dc->activeRecord->alias);\r\n\r\n $objAlias = \\AliasindexModel::findByUrl($strUrl,['order' => 'tstamp DESC']);\r\n\r\n if($objAlias !== NULL) return;\r\n\r\n // Insert new Record\r\n $alias = New \\AliasindexModel();\r\n\r\n $alias->alias = $dc->activeRecord->alias;\r\n $alias->currentId = $dc->activeRecord->id;\r\n $alias->ptable = $dc->table;\r\n $alias->tstamp = time();\r\n $alias->url = $strUrl;\r\n $alias->save();\r\n\r\n return;\r\n }", "title": "" }, { "docid": "1ba0efdca997c726cf2b5cd102bc65aa", "score": "0.5139771", "text": "public function testSurveyEditorUpdateSettings()\n {\n\n }", "title": "" }, { "docid": "71ecb4d03e472a6662669cf2a758dca7", "score": "0.51307964", "text": "public function calls_updater() {}", "title": "" }, { "docid": "cb530559e7c1c00ea4c480d6327d91bf", "score": "0.5126436", "text": "public function testChangeInPhotosAndAttachments()\n{\n \\Storage::fake();\n\n // set to yesterday\n Carbon::setTestNow(now()->subDay());\n\n $property = $this->createProperty();\n\n Passport::actingAs($property->agent);\n\n // revert time now\n Carbon::setTestNow();\n\n $response = $this->json('DELETE', \"/api/v1/properties/{$property->id}/attachments\", [\n 'ids' => $property->attachments->pluck('id')->toArray(),\n ]);\n\n $response->assertStatus(200);\n\n $response = $this->json('POST', \"/api/v1/properties/{$property->id}/photos\", [\n 'photos' => [\n UploadedFile::fake()->image('1.jpg'), \n ], \n ]);\n\n $response->assertStatus(200);\n\n\n Passport::actingAs($this->createAdmin());\n\n $response = $this->json('GET', \"/api/v1/properties/{$property->id}/changes\", []);\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n 'data' => [\n [\n 'photos',\n 'updated_at',\n ],\n [\n 'attachments',\n 'updated_at',\n ],\n ], \n ]);\n }", "title": "" }, { "docid": "0675cb90f3ba2e0c21052876b00d40d2", "score": "0.5119725", "text": "public function testUpdateDashboard()\n {\n }", "title": "" }, { "docid": "e59c6b7fa9c411c8e7d4f9a315d8f593", "score": "0.51192653", "text": "public function test_genre_can_be_updated()\n {\n $user1 = User::factory()->create();\n $user2 = User::factory()->create();\n $user3 = User::factory()->create();\n\n $genre = Genre::factory()->create([\n 'user_id' => $user2->id,\n ]);\n\n $response = $this->actingAs($user1)->put(route('api.v1.genres.update', [$genre->id]));\n $response->assertStatus(Response::HTTP_FORBIDDEN);\n\n $response = $this->actingAs($user2)->put(route('api.v1.genres.update', [$genre->id]));\n $response->assertStatus(Response::HTTP_FORBIDDEN);\n\n $user1->permissions()->create(['name' => 'update-any-genre']);\n\n $response = $this->actingAs($user1)->put(route('api.v1.genres.update', [$genre->id]));\n $response->assertStatus(Response::HTTP_FOUND);\n\n $response = $this->actingAs($user1)->put(route('api.v1.genres.update', [$genre->id]), [\n 'title' => 'updated title',\n 'en_title' => 'updated en title',\n 'description' => 'updated description',\n 'image' => UploadedFile::fake(),\n ]);\n $response->assertStatus(Response::HTTP_OK);\n\n $genre->refresh();\n $this->assertEquals('updated title', $genre->title);\n $this->assertEquals('updated en title', $genre->en_title);\n $this->assertEquals('updated description', $genre->description);\n\n $genre = Genre::factory()->create([\n 'user_id' => $user2->id,\n ]);\n\n $user2->permissions()->create(['name' => 'update-genre']);\n $user3->permissions()->create(['name' => 'update-genre']);\n\n $response = $this->actingAs($user3)->put(route('api.v1.genres.update', [$genre->id]));\n $response->assertStatus(Response::HTTP_FORBIDDEN);\n\n $response = $this->actingAs($user2)->put(route('api.v1.genres.update', [$genre->id]));\n $response->assertStatus(Response::HTTP_FOUND);\n }", "title": "" }, { "docid": "ac1ea66a70baaaa88470806c65a686c7", "score": "0.5111172", "text": "public function testAnalysisTemplateUpdateSecurityEntry()\r\n {\r\n\r\n }", "title": "" }, { "docid": "1571f300ade8156825f5ac0eb703bea0", "score": "0.5109501", "text": "public function testResourcesCanBeUpdated(): void\n {\n $admin = User::factory()->admin()->create();\n $resource = Resource::factory()->create();\n\n $response = $this->actingAs($admin)->put('resources/'.$resource->id, [\n 'name' => 'New Resource Name',\n ]);\n\n $response->assertRedirect('/resources');\n $this->assertDatabaseHas('resources', [\n 'name' => 'New Resource Name',\n ]);\n }", "title": "" }, { "docid": "c72773fa44260b7c03d4acd30fdda45a", "score": "0.51020294", "text": "function set_Alias ( $q , $text , $language , $mode ) {\n\t\t$ch = null;\n\t\t$res = $this->doApiQuery( [\n\t\t\t'format' => 'json',\n\t\t\t'action' => 'query' ,\n\t\t\t'meta' => 'tokens'\n\t\t], $ch );\n\t\tif ( !isset( $res->query->tokens->csrftoken ) ) {\n\t\t\t$this->error = 'Bad API response [setLabel]: <pre>' . htmlspecialchars( var_export( $res, 1 ) ) . '</pre>';\n\t\t\treturn false ;\n\t\t}\n\t\t$token = $res->query->tokens->csrftoken;\n\n\t\t$params = [\n\t\t\t'format' => 'json',\n\t\t\t'action' => 'wbsetaliases',\n\t\t\t$mode => $text ,\n\t\t\t'id' => $q,\n\t\t\t'language' => $language ,\n//\t\t\t'value' => $text ,\n\t\t\t'token' => $token,\n\t\t\t'bot' => 1\n\t\t] ;\n\n\t\tglobal $tool_hashtag ;\n\t\tif ( isset($tool_hashtag) and $tool_hashtag != '' ) $summary = isset($summary) ? trim(\"$summary #$tool_hashtag\") : \"#$tool_hashtag\" ;\n\t\tif ( isset($summary) and $summary != '' ) $params['summary'] = $summary ;\n\n\t\t// Now do that!\n\t\t$res = $this->doApiQuery( $params , $ch );\n\t\t\n\t\tif ( isset ( $res->error ) ) {\n\t\t\t$this->error = $res->error->info ;\n\t\t\treturn false ;\n\t\t}\n\n\t\t$this->sleepAfterEdit ( 'edit' ) ;\n\n\t\treturn true ;\n\t}", "title": "" }, { "docid": "209bf6e6115626cc368919573a4c80d6", "score": "0.5101589", "text": "public function test_update_nameMethod_withString_ReturnsArray()\n\t{\n\t\t$category = Category::find(self::$id)['object'];\t\t\n\t\n\t\t$exec_path_one_update_name_method_output = $category->update_name(\"updatedName\");\n\n\t\t// update the record from db\n\t\t$category = Category::find(self::$id)['object']; \n\n\t\t$this->assertArrayHasKey('failed',$exec_path_one_update_name_method_output);\n\t\t$this->assertArrayHasKey('error',$exec_path_one_update_name_method_output);\n\n\t\t$this->assertFalse($exec_path_one_update_name_method_output['failed']);\n\t\t$this->assertEmpty($exec_path_one_update_name_method_output['error']);\n\t\t$this->assertEquals('updatedName',$category->name);\n\n\t\t// Execution path 2 : invalid name format\n\n\t\t$exec_path_two_update_name_method_output = $category->update_name(\"777\");\n\n\t\t$this->assertArrayHasKey('failed',$exec_path_two_update_name_method_output);\n\t\t$this->assertArrayHasKey('error',$exec_path_two_update_name_method_output);\n\n\t\t$this->assertTrue($exec_path_two_update_name_method_output['failed']);\n\t\t$this->assertEquals('please make sure that you did enter a valid name',$exec_path_two_update_name_method_output['error']);\n\n\n\t}", "title": "" }, { "docid": "c0963763d8c86e15007ad31b129c8d86", "score": "0.50992775", "text": "public function actionUpdate() { }", "title": "" }, { "docid": "b974522a8d6eeef1a743bc356e6bdf7c", "score": "0.5086716", "text": "public function testChangePersonInfo()\n {\n }", "title": "" }, { "docid": "a878f0fd08e1aadef78ba3e100af8ae5", "score": "0.508491", "text": "public function testUpdate()\n {\n \t$id = 100;\n \t// Create test entry\n \t$entry = [\n \t\t'id' => $id,\n \t\t'title' => 'Update Title',\n \t\t'body' => 'Update Body'\n \t];\n \t// Test PUT update action\n \t$this->put('/entry/'.$id, $entry)\n \t\t->seePageIs('/entry/'.$id);\n \t// TODO more elaborate testing\n\n \t// Test PATCH update action\n \t$this->patch('/entry/'.$id, $entry)\n \t\t->seePageIs('/entry/'.$id);\n \t// TODO more elaborate testing\n }", "title": "" }, { "docid": "20796fbc19e5cb5b80259a984617349a", "score": "0.5076255", "text": "public function testApiDocAccessAdmin() {\n $assert_session = $this->assertSession();\n\n // Test the 'administer apigee api catalog' permission.\n $this->drupalLogin($this->drupalCreateUser([\n 'administer apigee api catalog',\n 'administer apidoc display',\n 'administer apidoc fields',\n 'administer apidoc form display',\n ]));\n\n $this->drupalGet($this->apidocPublished->toUrl());\n $assert_session->statusCodeEquals(200);\n $this->assertApiDocAccess($this->apidocPublished, 'view', TRUE);\n\n $this->drupalGet($this->apidocUnpublished->toUrl());\n $assert_session->statusCodeEquals(200);\n $this->assertApiDocAccess($this->apidocUnpublished, 'view', TRUE);\n\n $this->drupalGet($this->apidocPublished->toUrl('edit-form'));\n $assert_session->statusCodeEquals(200);\n $this->assertApiDocAccess($this->apidocPublished, 'update', TRUE);\n $this->drupalGet($this->apidocUnpublished->toUrl('edit-form'));\n $assert_session->statusCodeEquals(200);\n $this->assertApiDocAccess($this->apidocUnpublished, 'update', TRUE);\n\n $this->drupalGet($this->apidocPublished->toUrl('delete-form'));\n $assert_session->statusCodeEquals(200);\n $this->assertApiDocAccess($this->apidocPublished, 'delete', TRUE);\n $this->drupalGet($this->apidocUnpublished->toUrl('delete-form'));\n $assert_session->statusCodeEquals(200);\n $this->assertApiDocAccess($this->apidocUnpublished, 'delete', TRUE);\n\n $this->drupalGet(Url::fromRoute('entity.apidoc.collection'));\n $assert_session->statusCodeEquals(200);\n\n $this->drupalGet(Url::fromRoute('entity.apidoc.add_form'));\n $assert_session->statusCodeEquals(200);\n\n $this->drupalGet(Url::fromRoute('entity.apidoc.settings'));\n $assert_session->statusCodeEquals(200);\n\n // Make sure the field manipulation links are available.\n $assert_session->linkExists('Settings');\n $assert_session->linkExists('Manage fields');\n $assert_session->linkExists('Manage form display');\n $assert_session->linkExists('Manage display');\n }", "title": "" }, { "docid": "17e32d3f6e50190b95b3247d18714ca9", "score": "0.5072488", "text": "public function testV1userexchangereferralcoinsuccessful()\n {\n\n }", "title": "" }, { "docid": "d25fe5537b300e50070d3fcb40c22bb2", "score": "0.5058723", "text": "public function testMenuUpdate() {\n\n // Create and log in an administrative user.\n $this->adminUser = $this->drupalCreateUser([\n 'access toolbar',\n 'access administration pages',\n 'administer site configuration',\n 'administer menu',\n 'access media overview',\n 'administer media',\n 'administer media fields',\n 'administer media form display',\n 'administer media display',\n 'administer media types',\n ]);\n $this->drupalLogin($this->adminUser);\n\n $menu = Menu::create([\n 'id' => 'armadillo',\n 'label' => 'Armadillo',\n ]);\n $menu->save();\n\n $this->container->get('plugin.manager.menu.link')->rebuild();\n $this->drupalGet('/admin');\n\n // Assert that special menu items are present in the HTML.\n $this->assertSession()->responseContains('class=\"toolbar-icon toolbar-icon-admin-toolbar-tools-flush\"');\n\n // Assert that adding a media type adds it to the admin toolbar.\n $chinchilla_media_type = MediaType::create([\n 'id' => 'chinchilla',\n 'label' => 'Chinchilla',\n 'source' => 'image',\n ]);\n $chinchilla_media_type->save();\n $this->drupalGet('/admin');\n $this->assertMenuHasHref('/admin/structure/media/manage/chinchilla');\n\n // Assert that adding a menu adds it to the admin toolbar.\n $menu = Menu::create([\n 'id' => 'chupacabra',\n 'label' => 'Chupacabra',\n ]);\n $menu->save();\n $this->drupalGet('/admin');\n $this->assertMenuHasHref('/admin/structure/menu/manage/chupacabra');\n\n // Assert that deleting a menu removes it from the admin toolbar.\n $this->assertMenuHasHref('/admin/structure/menu/manage/armadillo');\n $menu = Menu::load('armadillo');\n $menu->delete();\n $this->drupalGet('/admin');\n $this->assertMenuDoesNotHaveHref('/admin/structure/menu/manage/armadillo');\n\n // Assert that deleting a content entity bundle removes it from admin menu.\n $this->assertMenuHasHref('/admin/structure/media/manage/chinchilla');\n $chinchilla_media_type = MediaType::load('chinchilla');\n $chinchilla_media_type->delete();\n $this->drupalGet('/admin');\n $this->assertMenuDoesNotHaveHref('/admin/structure/media/manage/chinchilla');\n }", "title": "" }, { "docid": "df15dbe0c87b20258b0e9480d7817b79", "score": "0.5052782", "text": "public function accessAdmin() {\n\n $this->drupalLogin($this->admin_user);\n\n // Access to administration page.\n $this->cacheflushUrlAccess($this->urls['admin'], 200);\n // Access to new entity create.\n $this->cacheflushUrlAccess($this->urls['new'], 200);\n // Access to cache clear.\n $this->cacheflushUrlAccess($this->urls['clear'] . '1', 200);\n $this->cacheflushUrlAccess($this->urls['clear'] . '2', 200);\n // Access to CRUD for own entity.\n $this->cacheflushUrlAccess($this->urls['view'] . '2', 200);\n $this->cacheflushUrlAccess(str_replace(\"[ID]\", 2, $this->urls['edit']), 200);\n $this->cacheflushUrlAccess(str_replace(\"[ID]\", 2, $this->urls['delete']), 200);\n // Access to CRUD for other user created entity.\n $this->cacheflushUrlAccess($this->urls['view'] . '1', 200);\n $this->cacheflushUrlAccess(str_replace(\"[ID]\", 1, $this->urls['edit']), 200);\n $this->cacheflushUrlAccess(str_replace(\"[ID]\", 1, $this->urls['delete']), 200);\n\n // Check Access on the list interface.\n $this->drupalGet('admin/structure/cacheflush');\n $this->assertRaw('LoggedUserEntity');\n $this->assertRaw('AdminUserEntity');\n $this->assertRaw('InterfaceUserEntity');\n $this->assertRaw('InterfaceUser2Entity');\n\n // User has access on the 4 entities to all operations.\n $this->assertLink('Edit', 3);\n $this->assertLink('Delete', 3);\n\n $this->drupalLogout();\n }", "title": "" }, { "docid": "c51ec883e5f7b5f752ef8dacac1ee34a", "score": "0.5041104", "text": "function testOnUpdateSwitch() {\n $this->init();\n $this->assertEquals('slave1', $this->manager->getReadManagerId());\n $readConn = $this->manager->getReadConnection();\n $readConn->query('select count(*) from business');\n $this->conn->query('UPDATE version set date = now(), hash = sha1(now())');\n $this->assertEquals('master', $this->manager->getReadManagerId());\n }", "title": "" }, { "docid": "03aa95ce419b0124002b2c32032e5dfa", "score": "0.5036869", "text": "function dbf_client_pathauto_bulk_update_batch_process(&$context) {\n if (!isset($context['sandbox']['current'])) {\n $context['sandbox']['count'] = 0;\n $context['sandbox']['current'] = 0;\n }\n\n $query = db_select('dbf_client', 'e');\n $query->leftJoin('url_alias', 'ua', \"CONCAT('dbf_client/', e.CCODCLI) = ua.source\");\n $query->addField('e', 'CCODCLI');\n $query->isNull('ua.source');\n $query->condition('e.CCODCLI', $context['sandbox']['current'], '>');\n $query->orderBy('e.CCODCLI');\n $query->addTag('pathauto_bulk_update');\n $query->addMetaData('entity', 'dbf_client');\n\n // Get the total amount of items to process.\n if (!isset($context['sandbox']['total'])) {\n $context['sandbox']['total'] = $query->countQuery()->execute()->fetchField();\n\n // If there are no nodes to update, the stop immediately.\n if (!$context['sandbox']['total']) {\n $context['finished'] = 1;\n return;\n }\n }\n\n $query->range(0, 25);\n $pids = $query->execute()->fetchCol();\n\n dbf_client_update_alias_multiple($pids, 'bulkupdate');\n $context['sandbox']['count'] += count($pids);\n $context['sandbox']['current'] = max($pids);\n $context['message'] = t('Updated alias for premise @pid.', array('@pid' => end($pids)));\n\n if ($context['sandbox']['count'] != $context['sandbox']['total']) {\n $context['finished'] = $context['sandbox']['count'] / $context['sandbox']['total'];\n }\n}", "title": "" }, { "docid": "b2e3a77feb92bba4f3e8ff4c31362353", "score": "0.5035537", "text": "function drush_ding_deploy_update_validate($alias) {\n $options = array();\n // Expand alias.\n $settings = drush_sitealias_evaluate_path($alias, $options);\n\n if (!drush_get_option('remote-user', NULL)) {\n return drush_set_error('NO_REMOTE_USER');\n }\n if (!drush_get_option('remote-host', NULL)) {\n return drush_set_error('NO_REMOTE_HOST');\n }\n}", "title": "" }, { "docid": "2318e9425a27539695aec716a41d1b4a", "score": "0.50206053", "text": "public function testSurveyEditorUpdateVisiblerule()\n {\n\n }", "title": "" }, { "docid": "a2f33b73fa1c7bcd4f3afcb857660c4c", "score": "0.5015414", "text": "abstract public function test_method_update_returnsModelInstance();", "title": "" }, { "docid": "99084e8a6eb7f9bbecf59485500415e5", "score": "0.5011695", "text": "public function testTagNameUpdate()\n {\n $user = User::all()->random();\n\n $this->actingAs($user, 'api')\n ->patch(\"api/tag/1\", [\n \"name\" => \"New name\",\n ]);\n $this->seeStatusCode(200);\n }", "title": "" }, { "docid": "3bf10ace21f7fc360a8d26b82e59c635", "score": "0.50072604", "text": "public function testUpdateActivity()\n {\n }", "title": "" }, { "docid": "89c9509e38a5f9311a876f6f01de800d", "score": "0.499467", "text": "public function testUpdateOrganizationSamlIdp()\n {\n }", "title": "" }, { "docid": "da30988cd42ce6a3c5d304963473929f", "score": "0.4991937", "text": "public function testUpdateHookN() {\n $this->assertSame('0', $this->config('system.theme')->get('admin'));\n $this->runUpdates();\n $this->assertSame('', $this->config('system.theme')->get('admin'));\n }", "title": "" }, { "docid": "c7d48749850ed45b5ff006312855f228", "score": "0.497553", "text": "public function testUpdateDevice()\n {\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.49654818", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" } ]
20ce2c25cde669462f9878f93d1153f5
Set current controller method
[ { "docid": "6dbf09a364a67c2465fa11bc4e127a03", "score": "0.65466017", "text": "private function setCurrentMethod(string $currentMethod)\n {\n $this->currentMethod = $currentMethod;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "d4eaf2aac16a28b50a3706ab11aa8a6c", "score": "0.6747673", "text": "public function setMethod($method)\n\t{\n\t\t$this->$method = null; //Reset, so it' s getting regenerated properly.\n\t\t$this->server->set('REQUEST_METHOD', strtoupper($method), true);\n\t}", "title": "" }, { "docid": "7ce4dcb7788931075b8a8825d759ffd1", "score": "0.6719707", "text": "public function setGetMethod()\n {\n $this->request->setGetMethod();\n }", "title": "" }, { "docid": "42208d7b76ff1ee12e55446ed3fb8b48", "score": "0.65699124", "text": "public function getMethod() {\n if (!empty($this->path[1])) {\n // To check if we have a method comeing in\n $method = $this->path[1];\n $controller = $this->controller . 'Controller';\n require_once 'controller/' . $this->controller . 'Controller.php';\n // For method exists to work we need the controller\n if (method_exists(new $controller, $method)) {\n $this->method = $method;\n }\n\n else {\n $this->method = $this->standardMethod;\n }\n }\n\n else {\n $this->method = $this->standardMethod;\n }\n }", "title": "" }, { "docid": "1263696036a68d93cfe2d7942313295f", "score": "0.65092653", "text": "function setMethod($method) {\n \t$this->method = $method;\n }", "title": "" }, { "docid": "d5c6b2d9c2b35ab42d7eb2217ce69c08", "score": "0.6446283", "text": "public function set_method($method = 'GET')\n {\n $this->method = strtoupper($method);\n }", "title": "" }, { "docid": "1c3ef4f54f7a779e379b39213bcb42de", "score": "0.641017", "text": "public function set_method($method) {\n\t\t$method = strtolower($method);\n\t\tif (! in_array($method, array('get', 'post'))) {\n\t\t\t$method = 'post';\n\t\t}\n\t\t$this->method = $method;\n\t}", "title": "" }, { "docid": "d5bbd261d18f41651e21f0c83370d1ac", "score": "0.6388494", "text": "public function route(){\n\t\tif (!$this->hasIdentity()) {\n\t\t\t$front = Zend_Controller_Front::getInstance();\n\t\t\t$request = $front->getRequest();\t\n\t\t\t$request->setControllerName($this->_controller);\n\t\t\t$request->setActionName($this->_action);\n\t\t}\n\t}", "title": "" }, { "docid": "9aa8c24d0465592d3e0de56648bcab3f", "score": "0.63878435", "text": "private function method () {\n return $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "4e171b60fb605df1bea3a44cd819089d", "score": "0.63769853", "text": "public function setMethod( $method )\n {\n \t$this->method = $method;\n }", "title": "" }, { "docid": "18a1ff0c9887d92c0701612f807ad8d2", "score": "0.6371688", "text": "function setMethod($method) {\r\n\t\t\t$this->method = $method;\r\n\t\t}", "title": "" }, { "docid": "ff2969243287313740802eacffdbde41", "score": "0.6371161", "text": "protected function setMethod($method)\n {\n $this->method = str_replace(Router::$actionDelimiters, '@', $method);\n }", "title": "" }, { "docid": "b586ab756c5e5b49e1378286fd66c585", "score": "0.6341405", "text": "function dispatch() {\n\t\t$oController = $this->getController();\n\t\t$sMethod = $this->getMethod();\n\t\t$oController->$sMethod();\n\t}", "title": "" }, { "docid": "cd7c763122de2a3c4cf7f9d725de2b30", "score": "0.63177127", "text": "public function setPostMethod()\n {\n $this->request->setPostMethod();\n }", "title": "" }, { "docid": "4b3195170d46f20c0ebd860337a287dc", "score": "0.6288211", "text": "public static function setMethod($method)\n { //Method inherited from \\Symfony\\Component\\HttpFoundation\\Request \n /** @var \\Illuminate\\Http\\Request $instance */\n return $instance->setMethod($method);\n }", "title": "" }, { "docid": "32ad3415d6b7d0fba81bd8f4586c12e2", "score": "0.62845737", "text": "function Controller(){\r\n $this->action = 'enter';\r\n }", "title": "" }, { "docid": "4c47b53411db948d6228f5e8a185d628", "score": "0.6277495", "text": "public function setMethod($method) \r\n { \r\n $this->method = $method; \r\n }", "title": "" }, { "docid": "786fffbb63103213761b865681346529", "score": "0.62533385", "text": "static function method()\r\n {\r\n return strtolower($_SERVER['REQUEST_METHOD']);\r\n }", "title": "" }, { "docid": "f7e90906bfe40b73559869c6144d3399", "score": "0.62505", "text": "public function setMethod( $method )\n {\n switch( $method = strtoupper( $method ) )\n {\n case 'GET': case 'PUT': case 'POST': case 'DELETE':\n case 'HEAD': case 'STATUS': case 'TRACE':\n $this->method = $method;\n }\n }", "title": "" }, { "docid": "e4a121bcaae6a138755a45bb922451b9", "score": "0.62404436", "text": "function setMethod($method)\n {\n if($method != 'get' and\n\t $method != 'put')\n\t{\n\t exit(\"FormBase::setMethod error: \" . \"unknown method $method, must be put or get\");\n\t}\n $this->method = $method;\n }", "title": "" }, { "docid": "b7e8cd316a015ef238b5221cdb006116", "score": "0.6224263", "text": "public function setMethod($method);", "title": "" }, { "docid": "35f70f956e6154b61a10cbe295dff9a9", "score": "0.6212297", "text": "protected function setMethod($Method, $data=false)\n {\n if(method_exists($this, $Method))\n {\n echo $this->$Method($data); //call choosen method\n }\n else\n {\n header(\"HTTP/1.0 405 Method Not Allowed\");\n echo $this->class.'ERROR';\n }\n }", "title": "" }, { "docid": "f86ff2bb0410d07cf823c57e1bbc24d5", "score": "0.62035555", "text": "public static function method()\n {\n /** @var \\Illuminate\\Http\\Request $instance */\n return $instance->method();\n }", "title": "" }, { "docid": "35dd2928b4b15f6d36e83a2a77f20c63", "score": "0.6185872", "text": "public function setMethod($method){\n\t\t$this->_method = $method;\n\t}", "title": "" }, { "docid": "9c60fbff64810741d378ec324a56be82", "score": "0.61771244", "text": "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 }", "title": "" }, { "docid": "e686b48e7d8c81551008b42794257f1a", "score": "0.6171633", "text": "protected function getControllerMethod()\n {\n return $this->parseControllerCallback()[1];\n }", "title": "" }, { "docid": "1b2bbcebc6cc1ef66549cebdba91b18d", "score": "0.616891", "text": "public function method($method)\n {\n $this->method = $method;\n }", "title": "" }, { "docid": "c31535702c7d070be73d4878125f71c2", "score": "0.6154607", "text": "function setMethod($method)\n {\n $this->_method = $method;\n }", "title": "" }, { "docid": "c31535702c7d070be73d4878125f71c2", "score": "0.6154607", "text": "function setMethod($method)\n {\n $this->_method = $method;\n }", "title": "" }, { "docid": "5f8a17d91ded2627f39725bd55077acb", "score": "0.61516076", "text": "public function setMethod($method) {\n\t\t$this->parentRequest->setMethod($method);\n\t}", "title": "" }, { "docid": "c56b8e4c51ff7c3a7e57e436f963ee1f", "score": "0.6151517", "text": "public function set_method ($method) {\n $this->method = $method;\n }", "title": "" }, { "docid": "087ca76effa8f9524a9523a9f55821a6", "score": "0.6150867", "text": "public function RedirectToController($method=null, $arguments=null) {$this->RedirectTo($this->request->controller, $method, $arguments);}", "title": "" }, { "docid": "db9639b9d3d7ddd36d91dff550e27da7", "score": "0.6147584", "text": "protected function getControllerMethod() {\n return $this->parseControllerCallback()[1] . $this->actionSuffix;\n }", "title": "" }, { "docid": "b5d2aecb24ac2c467bfc9cbcb9f61a2d", "score": "0.61351305", "text": "private function _setDefaultController()\n {\n if ($this->_defaultController === false)\n {\n show_error('No se puede determinar lo que se debe mostrar. La ruta por defecto no ha sido configurada.');\n }\n \n // Hay un método espesificado?\n $parts = explode('/', $this->_defaultController);\n \n if ( is_array($parts) && count($parts) >= 2)\n {\n $this->setClass($parts[1]);\n \n if ( isset($parts[2]))\n {\n $this->setMethod($parts[2]);\n }\n else\n {\n $this->setMethod('index');\n }\n \n $this->_setRequest($parts);\n }\n }", "title": "" }, { "docid": "04beb2d7601c2903ea2c9ddc91a0dae2", "score": "0.6100351", "text": "public function setMethod($method=null){\n\t\t\n\t\tif(isset($method)){\n\t\t\t$this->method = $method;\n\t\t}\n\t}", "title": "" }, { "docid": "c1c4f4fb7835e3eb47099a05d7930d0e", "score": "0.609613", "text": "public function route()\n\t{\n\t\t$this->request->setController($this->controller)\n\t\t\t->setAction($this->action)\n\t\t\t->setParameters($this->parameters);\n\t}", "title": "" }, { "docid": "671434b59464b59fd6bb4d89e9d71875", "score": "0.60913604", "text": "public function setmethod($method) {\n\t\t$this->method = $method;\n\t}", "title": "" }, { "docid": "15795eba8df8827890fe9c0059b72179", "score": "0.60828817", "text": "function setHttpMethod ($meth) {\n if ((is_string($meth)) &&\n in_array(strtolower($meth), array('get', 'put', 'post', 'delete'))) {\n $this->method = strtolower($meth);\n return $this->method;\n }\n else {\n //Error\n }\n }", "title": "" }, { "docid": "f17d2bf54741ecc7ec61d3f825b78799", "score": "0.60789955", "text": "public function set_method($method)\r\n {\r\n $this->_method = $method;\r\n }", "title": "" }, { "docid": "26e659c9379924e68b80026a65a123d9", "score": "0.60700685", "text": "public function method() {\n return $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "2c4177b3a9ed1ab6425e9eb736e61552", "score": "0.60649616", "text": "protected function determineMethod()\n {\n $methods = [\n 'delete' => ['restore', 'delete'],\n ];\n\n $this->method = array_get($methods, $this->status . '.' . $this->action);\n }", "title": "" }, { "docid": "9df8ed434edb697cd4bc66082550c4ba", "score": "0.60646784", "text": "public function method($method = 'get') {\n $this->_properties['method'] = (strtolower($method) == 'url' ? 'url' : 'get') ;\n }", "title": "" }, { "docid": "070be4aae4c7a69830ece91d14159b15", "score": "0.6050688", "text": "public function set_method($method)\n\t{\n\t\t$this->method = $method;\n\t}", "title": "" }, { "docid": "1f746249089812b598faa2828ae7ee10", "score": "0.60426676", "text": "public function setMethod($method) {\n\t\t$this->method = $method;\n\t}", "title": "" }, { "docid": "5fcdc36e3236497be83d4b12b1a04605", "score": "0.6037712", "text": "private function setMethod($method){\n self::$method = $method;\n }", "title": "" }, { "docid": "903d436a1a5865ebbf62654ab8adeef6", "score": "0.6031101", "text": "public function setMethod( $method )\n\t{\n\t\t$this->method = $method;\n\t}", "title": "" }, { "docid": "7fa232a45189a53f033ab8e76f547f54", "score": "0.6029364", "text": "public function getCurrentMethod();", "title": "" }, { "docid": "af45dee3039d59ed2e6f6a1f54fd576c", "score": "0.5990315", "text": "public static function method() {\n return $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "6de24230d00fbdad59d1c567ecc82987", "score": "0.598207", "text": "public function setMethod($method)\r\n\t{\r\n\t\t$this->method = $method;\r\n\t}", "title": "" }, { "docid": "9e609f96a6258db62380b0d75a0b8df1", "score": "0.5980278", "text": "public function setMethod($method)\r\n {\r\n $this->_method = $method;\r\n }", "title": "" }, { "docid": "ca3db725d7b17e99a83b97498385b469", "score": "0.59745264", "text": "public function getMethod(){\n\t\treturn strtolower($_SERVER['REQUEST_METHOD']);\n\t}", "title": "" }, { "docid": "d9d605a1ee7a5737653047a95bf079c2", "score": "0.59692585", "text": "public static function method()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "d9d605a1ee7a5737653047a95bf079c2", "score": "0.59692585", "text": "public static function method()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "d9d605a1ee7a5737653047a95bf079c2", "score": "0.59692585", "text": "public static function method()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "d9d605a1ee7a5737653047a95bf079c2", "score": "0.59692585", "text": "public static function method()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "d9d605a1ee7a5737653047a95bf079c2", "score": "0.59692585", "text": "public static function method()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "d9d605a1ee7a5737653047a95bf079c2", "score": "0.59692585", "text": "public static function method()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "8a08e798dcc46231fef71e90842ca625", "score": "0.59682035", "text": "public function method() {\r\n\t\treturn $_SERVER['REQUEST_METHOD'];\r\n\t}", "title": "" }, { "docid": "2bc6151931133abf802c09ab03148428", "score": "0.59562165", "text": "public function method()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "6e87294faf2284f2385d880da54a3c23", "score": "0.59557307", "text": "public function setMethod(string $method): void\n {\n $this->method = strtoupper($method);\n }", "title": "" }, { "docid": "b94ce42e918b0c6cd0cd3716e75ed31d", "score": "0.59528756", "text": "function method($meth=\"\") {\r\n if ($meth!=\"\") {\r\n $this->methodname=$meth;\r\n }\r\n return $this->methodname;\r\n }", "title": "" }, { "docid": "d55caf57fff0e67bb7996e4df318de9e", "score": "0.59421974", "text": "protected function determineMethod()\n {\n $methods = [\n 'block' => ['unblock', 'block'],\n 'delete' => ['restore', 'delete'],\n 'activate' => ['activate'],\n 'resetPassword' => ['generateNewUserPasswordResetToken'],\n 'resendInvite' => ['resendInvite'],\n 'revokeInvite' => ['revokeInvite'],\n ];\n\n $this->method = array_get($methods, $this->status . '.' . $this->action);\n }", "title": "" }, { "docid": "57d55608b5bbfecd4748f8985d3496d1", "score": "0.5915216", "text": "public function setMethod($method)\n\t{\n\t\t$this->method = $method;\n\t}", "title": "" }, { "docid": "38a9e52180c376004871dcdf97bc1342", "score": "0.590011", "text": "function initAction(){\n\t\t// then were going to call the table function to that method\n\t\tswitch ($this->method):\n\t\t\tcase 'GET':\n\t\t\t\tbreak;\n\t\t\tcase 'PUT':\n\t\t\t\tbreak;\n\t\t\tcase 'POST':\n\t\t\t\tbreak;\n\t\t\tcase 'DELETE':\n\t\t\t\tbreak;\n\t\tendswitch;\n\t}", "title": "" }, { "docid": "30fa57d28bf9fdde0d5b0896dbd91dad", "score": "0.58998954", "text": "public static function getMethod()\r\n {\r\n return strtolower($_SERVER[\"REQUEST_METHOD\"]);\r\n }", "title": "" }, { "docid": "0cec55f016b8e7075b6e4660186eca38", "score": "0.5888049", "text": "public function getCurrentMethod()\n {\n return $this->currentMethod;\n }", "title": "" }, { "docid": "5fee00a42a6641384db589f859d642c3", "score": "0.5875311", "text": "private function getControllerAndMethod()\n\t{\n\t\t$this->urlParamethers = explode('/', $this->baseUrl);\n\t}", "title": "" }, { "docid": "1c25b3ead8085ab9ad9291ba4709dfec", "score": "0.5873382", "text": "public function getMethod(){\n return $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "0961f27961f5e615edda971208fcac07", "score": "0.5861906", "text": "public function setMethod($method)\n {\n $this->method = $method;\n }", "title": "" }, { "docid": "0961f27961f5e615edda971208fcac07", "score": "0.5861906", "text": "public function setMethod($method)\n {\n $this->method = $method;\n }", "title": "" }, { "docid": "0961f27961f5e615edda971208fcac07", "score": "0.5861906", "text": "public function setMethod($method)\n {\n $this->method = $method;\n }", "title": "" }, { "docid": "89f46da78bf500ba6b446d3ffe3b23db", "score": "0.5853952", "text": "private function setAction()\n\t\t{\n\t\t\t$ac = (!isset($this->parts[1]) ||\n\t\t\t\t $this->parts[1] == NULL ||\n\t\t\t\t $this->parts[1] == 'index') ? 'index_action' : $this->parts[1];\n\t\t\t$this->action = $ac;\n\t\t}", "title": "" }, { "docid": "65553bb01bbb9f3bf3cf938d08342860", "score": "0.58486956", "text": "public static function currentRouteAction()\n {\n /** @var \\Illuminate\\Routing\\Router $instance */\n return $instance->currentRouteAction();\n }", "title": "" }, { "docid": "15c9c3888773b4fcd515b570e848364d", "score": "0.58442754", "text": "public function call_controller_method()\n {\n $length = count($this->url);\n // Make sure the method calling exists\n if ($length > 1) {\n if (!method_exists($this->controller, $this->url[1])) {\n $this->F_error();\n }\n }\n // Determine what to load\n switch ($length) {\n case 5:\n //Controller->Method(Param1, Param2, Param3)\n $this->controller->{$this->url[1]}($this->url[2], $this->url[3],\n $this->url[4]);\n break;\n\n case 4:\n //Controller->Method(Param1, Param2)\n $this->controller->{$this->url[1]}($this->url[2], $this->url[3]);\n break;\n\n case 3:\n //Controller->Method(Param1)\n $this->controller->{$this->url[1]}($this->url[2]);\n break;\n\n case 2:\n //Controller->Method()\n $this->controller->{$this->url[1]}();\n break;\n\n default:\n $this->controller->index();\n break;\n }\n }", "title": "" }, { "docid": "3d21fcc60d294c9d8735b8d4a5e1e9af", "score": "0.58325994", "text": "public function & SetMethod ($rawMethod) {\n\t\t/** @var $this \\MvcCore\\Request */\n\t\t$this->method = $rawMethod;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "270314e2c783fb319ce27e008aebe1dd", "score": "0.5831171", "text": "public function setupAction()\n {\n if(!empty($this->config['root_action'])) { \n /* user override if set */\n $this->action = $this->config['root_action'];\n } else {\n /* get from url if present, else use default */\n $this->action = !empty($this->url_segments[2]) ? $this->url_segments[2] :\n (!empty($this->config['default_action']) ? $this->config['default_action'] : 'index');\n /* cannot call method names starting with underscore */\n if(substr($this->action,0,1)=='_')\n throw new Exception(\"Action name not allowed '{$this->action}'\"); \n }\n }", "title": "" }, { "docid": "2ff3f424061a2d4e7bf4667facea8bac", "score": "0.5821001", "text": "public function method() \r\n {\r\n return $this->method; \r\n }", "title": "" }, { "docid": "d294ae6218987415bd03f2a27b0c98de", "score": "0.58199114", "text": "private function setDefaultAction()\n {\n if (!$this->attributes->isSet('action')) {\n $this->action(\\URL::current());\n }\n }", "title": "" }, { "docid": "66ef6b0bd731a956bb54002c577448fc", "score": "0.5817136", "text": "public function requestMethod()\n {\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n $this->isPost = true;\n $this->write();\n } else if ($_SERVER[\"REQUEST_METHOD\"] == \"GET\") {\n $this->isPost = false;\n $this->read();\n }\n }", "title": "" }, { "docid": "127579571147fe8dc9d150be88d4fc9c", "score": "0.58138573", "text": "public static function getMethod()\n { //Method inherited from \\Symfony\\Component\\HttpFoundation\\Request \n /** @var \\Illuminate\\Http\\Request $instance */\n return $instance->getMethod();\n }", "title": "" }, { "docid": "77008fc5d7d6dc70eeb3b7f43c76f28b", "score": "0.5799219", "text": "private function processAction(){\n Logger::writeToLog('process action for '. $this->ctrlName, __LINE__, __FILE__);\n\t\tif ($this->urlRequestValues['action'] == \"\") {\n $this->action = \"index\";\n }\n\t\telse{$this->action = $this->urlRequestValues['action'];}\n\t}", "title": "" }, { "docid": "b5d8240531efb822b8fbe58981979cd2", "score": "0.5788466", "text": "public function setMethod(string $method): self;", "title": "" }, { "docid": "bdd8a846a5423b83bd1e7f66446ac9ce", "score": "0.57863593", "text": "public function setMethod(string $method): void\n {\n $this->method = $method;\n }", "title": "" }, { "docid": "108bae73bbe18e1587cb9659612bdf1b", "score": "0.577119", "text": "public function getCurrentMethod()\r\n {\r\n return $this->registry->registry('tokenbase_method');\r\n }", "title": "" }, { "docid": "f147073dc5bcbaade47e4886095a0de8", "score": "0.5770034", "text": "public function setMethod($method = 'POST')\n {\n $this->method = $method;\n }", "title": "" }, { "docid": "3a0df6f54731656e928e2c9ba74842a8", "score": "0.5749478", "text": "public function getMethod() {\n\t\treturn strtoupper($_SERVER['REQUEST_METHOD']);\n\t}", "title": "" }, { "docid": "5130eb63d2ebe133a455b67c537ebbe3", "score": "0.57494295", "text": "public function setMethod($method)\n {\n $this->_method = strtoupper($method);\n return $this;\n }", "title": "" }, { "docid": "69529f7a965a9dff4a7ea417ce3c8182", "score": "0.57459813", "text": "private function veriFyMethodOnUrl()\n\t{\n\t\tif (array_key_exists(4, $this->urlParamethers)) {\n\t\t\t$this->method = $this->urlParamethers[4];\n\t\t} \n\t}", "title": "" }, { "docid": "192db8e058f9105cee7fe3789881ac40", "score": "0.5745179", "text": "public function invoke(){\r\n \r\n //only post requests make changes to the model\r\n if($this->request->method == \"post\"){ \r\n \r\n //set request parameters\r\n $action = $this->request->action;\r\n \r\n //check whether this is a valid request action\r\n if(method_exists($this,$action)){ \r\n $this->$action();\r\n }\r\n }\r\n }", "title": "" }, { "docid": "a08996575dfa441a5948b1ba49ef9364", "score": "0.5736294", "text": "protected function rewriteRoutingSetUpCurrentRouteByRequest () {\n\t\t$request = $this->request;\n\t\t$toolClass = self::$toolClass;\n\t\t$this->currentRoute\n\t\t\t->SetController(str_replace(['/', '\\\\\\\\'], ['\\\\', '//'],\n\t\t\t\t$toolClass::GetPascalCaseFromDashed($request->GetControllerName())\n\t\t\t))\n\t\t\t->SetAction(\n\t\t\t\t$toolClass::GetPascalCaseFromDashed($request->GetActionName())\n\t\t\t);\n\t}", "title": "" }, { "docid": "fd74d16ff6181a2c48ad85a3508c47e7", "score": "0.57291615", "text": "public static function getMethod(){\n return $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "d1c63a26624607acfb142cc81ad81236", "score": "0.5704426", "text": "protected function getControllerMethod(): string\n {\n return \\explode('@', $this->action['uses'])[1];\n }", "title": "" }, { "docid": "6e7b202162a0400ceb7dc05b63c83006", "score": "0.5703024", "text": "private function dispatch() {\n\t\t$this->controllerInstance = new $this->controllerClass($this->request);\n\t\tcall_user_func_array([$this->controllerInstance, $this->request->action], $this->request->args);\n\t}", "title": "" }, { "docid": "f9a42af40c9709f9060f5f82b134c300", "score": "0.5701531", "text": "public function __call($method, $args)\n\t{\n \t// default action method:\n// \t\tZend_Debug::dump($args, \"requestIndexDefault\", true);\n\t\tif ('Action' == substr($method, -6)) {\n return $this->indexAction();\n }\n\n throw new Zend_Controller_Exception('Invalid method called');\n }", "title": "" }, { "docid": "c1ff9a208d1ff139b3b9295055886db9", "score": "0.56967753", "text": "public function method()\n {\n return $this->method;\n }", "title": "" }, { "docid": "c1ff9a208d1ff139b3b9295055886db9", "score": "0.56967753", "text": "public function method()\n {\n return $this->method;\n }", "title": "" }, { "docid": "3670d6c8486ce22997a26b243dc09807", "score": "0.56886196", "text": "public function getMethod(): string\n {\n return strtolower($_SERVER['REQUEST_METHOD']);\n }", "title": "" }, { "docid": "ffe7da95870e47abf4bbda9b055c3d2e", "score": "0.5687151", "text": "public function _remap($method)\n\t{\n\t\tif (method_exists($this, $method))\n\t\t{\n\t\t\t$this->$method();\n\t\t}\n\t}", "title": "" }, { "docid": "557693ef30c7221d3ef7f417c30b8fc9", "score": "0.5681259", "text": "public function method($method = null)\r\n\t{\r\n\t\tif ($method) $this->method = trim($method);\r\n\t\treturn $this->method;\r\n\t}", "title": "" }, { "docid": "7fc26482386bb3377a8e4998a169804d", "score": "0.5674492", "text": "protected function getMethodName()\n {\n return Config::get('actions.method', '__invoke');\n }", "title": "" }, { "docid": "00d1c8a3f42c62b1324e7a051a37ca23", "score": "0.5667938", "text": "private function setController(){\n if(empty($this->routeElements[1])){\n throw new CustomException('No resource specified', 400);\n }\n\n $this->controller = $this->getControllerInstance();\n $this->setParams($this->postData);\n }", "title": "" } ]
100b5ce1f48a5688cf67d65aa835c906
check if tables exists and create if not
[ { "docid": "00b2d80e51a998124da073cabc7b85e3", "score": "0.7078713", "text": "function chk_tables_exists()\r\n {\r\n\r\n $conn=$this->dbconnect();\r\n$html='';\r\n foreach($this->tables[trim($_SESSION['post']['dbtype'])] as $table=>$value)\r\n {\r\n $r=$this->chk_table_exists($table,$conn);\r\n\r\n if(!$r&&($this->QUERY($value,$conn)))\r\n {\r\n #print $r.\"<hr>\";\r\n $html.='<div class=\"message\">Table '.$table.' created'.\"</div>\";\r\n }else{\r\n $html.='<div class=\"message error\">Table '.$table.' already exists'.\"</div>\";\r\n }\r\n\r\n }\r\n #die($html);\r\n $this->nextstep();\r\n return $html;\r\n }", "title": "" } ]
[ { "docid": "5a286721f73fc99fb3598087ff9344d1", "score": "0.8570036", "text": "function check_and_create_tables() {\n if ( !$this->check_table_exists( $this->table_sets )) $this->create_table_sets();\n if ( !$this->check_table_exists( $this->table_fonts )) $this->create_table_fonts();\n if ( !$this->check_table_exists( $this->table_join )) $this->create_table_join();\n if ( !$this->check_table_exists( $this->table_settings )) $this->create_table_settings();\n\t}", "title": "" }, { "docid": "d8eac0e767aed81db6f950187c8f7d39", "score": "0.80144954", "text": "private function check_table_exists() {\n\t\t// check tables nicely\n\t\t$result = array();\n\n\t\tif($this->type == 'sqlite') {\n\t\t\t// add dbprefix\n\t\t\t$tablename = $this->dbconn->dbprefix . $this->config['cache_table'];\n\t\t\t$query = \"SELECT name FROM sqlite_master WHERE name = '\" . $tablename .\"';\";\n\t\t\t$result = $this->dbconn->query($query);\n\t\t\tif($result->num_rows() == 0)\n\t\t\t\t$this->create_table();\n\t\t}\n\t\telse {\n\t\t\t$result = $this->dbconn->table_exists($this->config['cache_table']);\n\t\t\tif(!$result)\n\t\t\t\t$this->create_table();\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "90d4907c926ec3199be160acdca3b04e", "score": "0.7910434", "text": "private static function creatingTables()\n {\n // Helper::dump(!self::checkTableExist('users'));\n $i = 1;\n foreach (self::tableSQL() as $tableName => $statement) {\n if (!self::checkTableExist($tableName) === false) {\n self::$db->exec($statement);\n echo \"{$i}- Table '{$tableName}' created successfully <br>\";\n $i++;\n }\n }\n }", "title": "" }, { "docid": "af5b721e3163455e9f5e09f2c343ec15", "score": "0.78437334", "text": "public function setupDatabaseTables()\n {\n $logger = $this->getLogger();\n $database = $this->getDatabase();\n\n $databaseHandle = $database->getDatabaseConnection();\n $tableDefinition = $database->getTableDefinition();\n\n $tables = array_keys($tableDefinition);\n foreach ($tables as $tableName) {\n $logger->writeln('<info>Table \"' . $tableName . '\"</info>');\n\n $statement = $databaseHandle->prepare('SHOW TABLES LIKE :table');\n $statement->bindParam(':table', $tableName, \\PDO::PARAM_STR);\n $statement->execute();\n\n if ($statement->rowCount() == 1) {\n $logger->writeln('<info>=> Exists. Skip it</info>');\n continue;\n }\n\n // Table does not exists. Try to create it\n $createTableResult = $databaseHandle->query($tableDefinition[$tableName]);\n\n if ($createTableResult === false) {\n $databaseError = $databaseHandle->errorInfo();\n $message = 'Table \"%s\" could not be created. %s (%s)';\n $message = sprintf($message, $tableName, $databaseError[2], $databaseError[1]);\n throw new \\Exception($message, 1398100879);\n\n } else {\n $logger->writeln('<info>Not exists. Created</info>');\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "f952dfe9313fdfa2ed2c5046a0a21bcc", "score": "0.7814369", "text": "private function checkTable()\n {\n $objResult = $this->query('SHOW TABLES LIKE \"' . $this->getTableName() . '\"');\n if($objResult === false)\n {\n // Create table\n $this->createTable();\n }\n else\n {\n $this->checkTableChanges();\n }\n }", "title": "" }, { "docid": "cca9ed5d7d8d4cf5dc9b8cd08fcb7f4f", "score": "0.7768732", "text": "public function createTables(): bool\n {\n $this->dropTables();\n $sqlFile = __DIR__ . '/../../Resources/install.sql';\n $sqlQueries = explode(PHP_EOL, file_get_contents($sqlFile));\n $sqlQueries = str_replace('PREFIX_', $this->dbPrefix, $sqlQueries);\n\n foreach ($sqlQueries as $query) {\n if (empty($query)) {\n continue;\n }\n $statement = $this->connection->executeQuery($query);\n if (0 !== (int) $statement->errorCode()) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "185ac4891d08397442c3583ada26ea85", "score": "0.72748655", "text": "public function createTables(): bool\n {\n // check if db-structure file exists\n $pathToDbStructureFile = PROJECT_ROOT . 'db_structure.sql';\n if (!file_exists($pathToDbStructureFile)) {\n $this->logger->error('Could not find file db_structure.sql in project root.');\n return false;\n }\n\n // check if tables exist\n $dbConfig = $this->config->get('db');\n $db = new Db($dbConfig['host'], $dbConfig['user'], $dbConfig['pass'], $dbConfig['db']);\n $existingTables = $db->prepare('SHOW TABLES')->getResult(true);\n if (count($existingTables) > 0) {\n $this->logger->error('Could not create tables because database is not empty.');\n unset($db);\n return false;\n }\n\n // create the tables\n $mysqli = new \\mysqli($dbConfig['host'], $dbConfig['user'], $dbConfig['pass'], $dbConfig['db']);\n if ($mysqli->connect_errno) {\n $this->logger->error('Could not connect to mysql database.');\n return false;\n }\n\n $statements = file_get_contents($pathToDbStructureFile);\n $firstStatementResult = $mysqli->multi_query($statements);\n if ($firstStatementResult === false) {\n $this->logger->error('Error during create tables query. Tip: Check db_structure.sql file.');\n return false;\n }\n unset($mysqli);\n sleep(1);\n\n // check number of created tables\n $existingTables = $db->prepare('SHOW TABLES')->getResult(false);\n $existingTablesCount = count($existingTables);\n $expectedTablesCount = substr_count($statements, 'CREATE TABLE');\n if ($existingTablesCount !== $expectedTablesCount) {\n $this->logger->error(sprintf(\n 'Not all tables were created. Tables created: %d Tables expected: %d',\n $existingTablesCount,\n $expectedTablesCount\n ));\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "2f712476858c3b9f286a8777fd96fc36", "score": "0.7268659", "text": "public function tableExists();", "title": "" }, { "docid": "c2fa61bb6459ad81c578711eafcdbe31", "score": "0.7203429", "text": "public function create_tables() {\n //\n }", "title": "" }, { "docid": "1ef65ea73669b7ab545a0ef4f03d8da9", "score": "0.7183419", "text": "private function createTableIfNotExists() {\n $phrase = \"CREATE TABLE IF NOT EXISTS `\".$this->tableName.\"`\n (\n `\".FLDTABLEID[FLDNAME].\"` INT(5) NOT NULL,\n `\".TABLEIDX.\"` BIGINT(4) AUTO_INCREMENT,\n `\".FLDCREATEDDATETIME[FLDNAME].\"` DATETIME NOT NULL,\n `\".FLDCREATEDBY[FLDNAME].\"` VARCHAR(10) NOT NULL,\n `\".FLDMODIFIEDDATETIME[FLDNAME].\"` DATETIME NOT NULL,\n `\".FLDMODIFIEDBY[FLDNAME].\"` VARCHAR(10) NOT NULL,\n PRIMARY KEY (`\".TABLEIDX.\"`)\n )\n ENGINE=INNODB\";\n $this->mysqli->begin_transaction();\n $this->mysqli->query($phrase);\n $this->mysqli->commit(); \n }", "title": "" }, { "docid": "f30d258826525a4398b3c6d9da190464", "score": "0.7149016", "text": "private function upsert_tables(): void {\n\t\t$this->migration_manager->create_tables();\n\t}", "title": "" }, { "docid": "1c413cdcbce473a7a7d13b48edce842c", "score": "0.71486735", "text": "function check_table() {\n\n\t\t$tables = $this->get_tables();\n\n\t\tif( !in_array($this->tablename, $tables) ){\n\t\t\t// create the domain\n\t\t\t$table = $this->create_table();\n\t\t\tif( !$table ){\n\t\t\t\tdie(\"Could not connect to the data\");\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "319fd62e97e156bcb4b52dc6ab05147d", "score": "0.71359855", "text": "public function checkTableExists($table) {\n $columns = [];\n\n foreach ($this->columns as $column) {\n $column = str_replace('-', '_', $column);\n $column = preg_split('/(?=[A-Z])/', $column);\n array_push($columns, $column);\n }\n\n foreach ($columns as $i => $row) {\n $column = strtolower(implode('_', $columns[$i]));\n $columns[$i] = $column;\n }\n\n foreach ($columns as $i => $row) {\n $columns[$i] = $row . \" varchar(255) NOT NULL\";\n }\n\n $columns = implode(',', $columns);\n\n $table .= \"(\" . substr($table, 0, -1) . \"_id int(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\";\n $table .= \"$columns\";\n $table .= \")\";\n $sql = \"CREATE TABLE IF NOT EXISTS $table\";\n\n print_r($table);\n // $conn->query($sql);\n }", "title": "" }, { "docid": "6b7cc5df82c36b82feafc6394bfd8562", "score": "0.71312976", "text": "public static function _createTable()\n {\n if (self::_associatedTableExists()) {\n return true;\n }\n $path = new Path(\n self::_configLocation(),\n self::FILENAME_SQL_CREATE_TABLE\n );\n $data = file_get_contents($path);\n $db = Db::getInstance();\n $sql = $db->splitMultiQuery($data);\n $sql = array_shift($sql);\n $table = self::_associatedTableName();\n $reg = '/^(\\\\s?CREATE(?:\\\\s+TEMPORARY)?\\\\s+TABLE(?:\\\\s+IF\\\\s+NOT\\\\s+EXISTS)?\\\\s?)([\\'\"`]?' .\n preg_quote(self::TABLE_NAME_PLACEHOLDER) . '[\\'\"`]?)(.*)/isu';\n $sql = preg_replace($reg, '$1 `' . $table . '` $3', $sql);\n $db->query($sql);\n if (self::_associatedTableExists()) {\n return true;\n }\n throw new Exception('Unable to create table ' . $table);\n }", "title": "" }, { "docid": "a01b8e4a72db42a0d72e04421e20575a", "score": "0.70348424", "text": "private function createDbTableIfNotExists()\n {\n $ipTable = ipTable($this->_name);\n\n $attributeDefinition = '';\n foreach ($this->_columns as $column) {\n $attributeDefinition .= ' `'.$column['attribute'].'` varchar(255),';\n }\n\n $sql = \"\n CREATE TABLE IF NOT EXISTS $ipTable\n (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n $attributeDefinition\n PRIMARY KEY (`id`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8;\";\n\n try {\n ipDb()->execute($sql);\n } catch (\\Ip\\Exception\\Db $e) {\n ipLog()->error(\"Could not create data table. Statement: $sql, Message: \" . $e->getMessage());\n throw $e;\n }\n }", "title": "" }, { "docid": "bbbd7139c127854842c7dec9766e54a2", "score": "0.703124", "text": "protected function checkMultisiteCreateTables(){\r\n\t\t\t\t\t\t\r\n\t\t\tglobal $wpdb;\r\n\t\t\t$tablePrefix = $wpdb->prefix;\r\n\t\t\t\t\t\t\r\n\t\t\t$option = \"addon_library_tables_created_{$tablePrefix}\";\r\n\t\t\t\r\n\t\t\t$isCreated = get_option($option);\r\n\t\t\tif($isCreated == true)\r\n\t\t\t\treturn(true);\r\n\t\t\t\r\n\t\t\t$this->createTables();\r\n\t\t\t\r\n\t\t\tupdate_option($option, true);\r\n\t\t}", "title": "" }, { "docid": "fb86b4798a1a88bf62bf33f87799fd8e", "score": "0.7021065", "text": "private function does_table_exist() {\n\t\t\tif ( 'rdb:' !== substr( $this->wpda_schema_name, 0, 4) ) {\n\t\t\t\t$wpda_dictionary_exists = new WPDA_Dictionary_Exist( $this->wpda_schema_name, $this->wpda_table_name );\n\t\t\t\t$this->table_exists = $wpda_dictionary_exists->plain_table_exists();\n\t\t\t\tif ( ! $this->table_exists ) {\n\t\t\t\t\t$this->real_table = null;\n\t\t\t\t\t$this->real_indexes = null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No remote checks\n\t\t\t\t$this->real_table = null;\n\t\t\t\t$this->real_indexes = null;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d5a66b3038b10ac24cf226f7b4fd1713", "score": "0.69973624", "text": "function createTables() {\n global $wpdb;\n include(PLUGIN_IMAGE_VOTE . '/_table/createtable.php');\n foreach ($wp_iv_tbls as $tbl_name) {\n if ($wpdb->get_var(\"show tables like '$tbl_name'\") != $tbl_name) {\n dbDelta($wp_iv_sqls[$tbl_name]);\n }\n }\n }", "title": "" }, { "docid": "bc6dbe686f363c68236b64403356bed5", "score": "0.69834334", "text": "protected function tableExists(): bool\n {\n $sqlWhere = \" WHERE table_schema = '%s' AND table_name = '%s';\";\n $sql = sprintf(\n \"SELECT count(*) as counter FROM %s \" . $sqlWhere,\n 'information_schema.tables',\n $this->repository->getDatabase(),\n $this->repository->getTable()\n );\n $this->run($sql)->hydrate();\n $result = $this->getRowset()[0];\n $counter = (int) $result['counter'];\n return ($counter > 0);\n }", "title": "" }, { "docid": "11955c6d77709cb1bc4cfa9eb2537adf", "score": "0.69747263", "text": "function createInitialTableSet($conn) {\r\n\t// Created in this order!\r\n\tif (createUsersTable ( $conn )) {\r\n\t\t\r\n\t\tif (createAuditTable ( $conn )) {\r\n\t\t\t\r\n\t\t\tif (createPermissionsTable ( $conn )) {\r\n\t\t\t\t\r\n\t\t\t\tif (createEndUsersTable ( $conn )) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (createDevicesTable ( $conn )) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (createMessagesTable ( $conn )) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (createCallsTable ( $conn )) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t\t * If all tables are made successfully,\r\n\t\t\t\t\t\t\t\t * return true.\r\n\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t/*\r\n\t * Else, drop the tables,\r\n\t * faster for admin to recover.\r\n\t * ONLY USE THIS FUNCTION HERE.\r\n\t */\r\n\t\r\n\tdropInitialTables_asldkfffignrmsdmsicigfjkdo ( $conn );\r\n\t\r\n\treturn false;\r\n}", "title": "" }, { "docid": "06763ea932cf7ab8866aa63550097450", "score": "0.6973035", "text": "protected function is_table_exist() {\n $val = $this->dbConnection->query(\"select 1 from $this->MIGRATIONS_TABLE LIMIT 1\");\n if($val !== FALSE) {\n //table exists!\n return true;\n } else {\n //create the table and return false\n $result = $this->dbConnection->query(\"CREATE TABLE IF NOT EXISTS $this->MIGRATIONS_TABLE (\n `version` varchar(50) NOT NULL,\n UNIQUE KEY `version_UNIQUE` (`version`)\n ) DEFAULT CHARSET=utf8\");\n\n if(! $result ) {\n echo \"Could not create table: $this->MIGRATIONS_TABLE : \";\n print_r($this->dbConnection->errorInfo());\n exit;\n }\n return false;\n }\n\n }", "title": "" }, { "docid": "8f159a3aed877909676921c3e0724f9f", "score": "0.6958463", "text": "public function createTable(): void\n {\n $this->connection->connect();\n $schemaManager = $this->connection->createSchemaManager();\n\n $schema = $schemaManager->createSchema();\n if ($schema->hasTable($this->options['table_name'])) {\n return;\n }\n\n $schemaManager->createTable($this->_createTable($schema));\n }", "title": "" }, { "docid": "6f749979990531a4c830ce5fdd79a01d", "score": "0.6900219", "text": "protected function checkTable()\r\r\n\t{\r\r\n\t\t//reasons to return\r\r\n\t\tif ($this->table_exists()) return true;\r\r\n\t\tif ($this->create_table()) return true;\r\r\n\t\treturn false;\r\r\n\t}", "title": "" }, { "docid": "d7f6d890377506ca3ee9319accae8f4f", "score": "0.68978435", "text": "public function getTableExistsSql();", "title": "" }, { "docid": "cb8d2874db06c52d727ebcb07610806f", "score": "0.68949133", "text": "public static function init() {\n if(!self::table_exists()) {\n self::create_table();\n }\n }", "title": "" }, { "docid": "40b7b20630f6eada3ce5d5057498f098", "score": "0.6858065", "text": "public static function check_tables()\n\t{\n\t\tif(static::$_migrations)\n\t\t{\n\t\t\tforeach(static::$_migrations as $keys => $value)\n\t\t\t{\n\t\t\t\t$class = new $keys;\n\t\t\t\t\n\t\t\t\tif(\\DBUtil::table_exists($value))\n\t\t\t\t{\n\t\t\t\t\tstatic::$_flash['success'][] = \"$value table already exists!\";\n\t\t\t\t\tstatic::$_tablechecks[] = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$class->up();\n\t\t\t\t\n\t\t\t\t\t\tstatic::$_flash['success'][] = \"$value table installed!\";\n\t\t\t\t\t\tstatic::$_tablechecks[] = true;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tcatch(\\Database_Exception $e)\n\t\t\t\t\t{\n\t\t\t\t\t\tstatic::$_flash['error'][] = $e->getMessage();\n\t\t\t\t\t\tstatic::$_tablechecks[] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tunset($class);\n\t\t\t}\t\t\t\t\n\t\t\tstatic::get_flash();\n\t\t\t\n\t\t\treturn (in_array(false, static::$_tablechecks)) ? false: true;\n\t\t}\t\n\t\t\n\t\telse\n\t\t{\n\t\t\tstatic::$_flash['error'][] = \"There are no migration files!\";\t\t\t\t\n\t\t\tstatic::get_flash();\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\t\n\t}", "title": "" }, { "docid": "213d23114de643ce7aebe5a8861ec8d5", "score": "0.6789689", "text": "private function tablesExist()\n {\n $tables = \\ORM::get_db()->query('SHOW TABLES');\n if( !is_object($tables) ){\n return false;\n }\n $tables_list = array();\n while($result = $tables->fetch()) {\n $tables_list[] = $result[0];\n }\n if((is_array($tables_list)) && !(count($tables_list) > 0)){\n return false;\n }\n\n $status = (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_FILES_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_INVOICES_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_ITEMS_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_MESSAGES_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_METAS_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_MILESTONES_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_OPTIONS_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_PROJECTS_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_PROJECTS_META_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_QUOTATIONS_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_SUBSCRIPTIONS_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_TASKS_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_TICKETS_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_USERS_TABLE, $tables_list));\n $status &= (boolean) (in_array(TIMBER_DB_PREFIX . TIMBER_DB_USERS_META_TABLE, $tables_list));\n\n return (boolean) $status;\n }", "title": "" }, { "docid": "f4506bcb2a055841cce83eafff7b5f6d", "score": "0.67559254", "text": "function tableCheck($tableName)\r\n{\r\nglobal $dbxlink;\r\n$result = NULL;\r\n$result = $dbxlink->query(\"SHOW TABLES LIKE '{$tableName}'\");\r\nif ($result==NULL) { print_r($dbxlink->errorInfo()); die(); }\r\nif (!($row = $result->fetch (PDO::FETCH_NUM))) {\r\n $q = \"CREATE TABLE IF NOT EXISTS `{$tableName}` (\r\n \t`id` int(10) NOT NULL auto_increment,\r\n \t`object_id` int(10) NOT NULL,\r\n \t`user` varchar(40) NOT NULL,\r\n \t`date` datetime NOT NULL,\r\n \t`content` text NOT NULL,\r\n \tPRIMARY KEY (`id`)\r\n \t) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ;\";\r\n $result = $dbxlink->query($q);\r\n if ($result==NULL) { print_r($dbxlink->errorInfo()); die(); }\r\n}\r\n}", "title": "" }, { "docid": "1fcd5e8c0124a9773ca4599c5513b665", "score": "0.6751608", "text": "function create_table($db_location, $table_name, $insert_query, $force_exit){\n $check_table_query = sprintf(\"select name from sqlite_master where type='table' and name = '%s';\", $table_name);\n $db = new SQLite3($db_location);\n $results = $db->query($check_table_query)->fetchArray();\n if($results != NULL)\n return True;# if table exsists\n\n # Create the table and run again to varify table exsists and return true\n if ($insert_query != NULL and $forece_exit == False){\n $db->exec($insert_query);\n $db->close();\n return create_table($db_location, $table_name, $insert_query, $forece_exit);\n }\n\n return False;# if no table was created\n}", "title": "" }, { "docid": "136bfc90bc965fae8795928aaca17dac", "score": "0.6735045", "text": "public function checkDatabaseTables() {\n\t\t$tableListTable = new ApdDatabase( APD_TABLE_LIST_TABLE );\n\t\t//create table list\n\t\tif ( ! $tableListTable->checkTableExistence() ) {\n\t\t\t$tablename = APD_TABLE_LIST_TABLE;\n\t\t\t$database = new ApdDatabase( $tablename );\n\t\t\t$database->createTableFromArray( $this->getListFields(), 'core' );\n\t\t\t$database->modifyColumns( $this->getUniqueListFields(), 'unique' );\n\t\t}\n\n\t\t/**\n\t\t * Create asin table if it doesn't exist\n\t\t */\n\t\t$asinTable = new ApdDatabase( APD_ASIN_TABLE );\n\n\t\tif ( ! $asinTable->checkTableExistence() ) {\n\t\t\t$asinTable->createTableFromArray( ApdAsinTable::getItemFields(false), 'core' );\n\t\t\t$asinTable->multiModifyColumns( ApdAsinTable::getItemFields() );\n\t\t\t$asinTable->modifyColumns( ApdAsinTable::getUniqueItemFields(), 'unique' );\n\t\t}\n\n\t\t/**\n\t\t * Create amazon cache items table if it doesn't exist\n\t\t * If it does exist, but it's structure doesn't match the classes fields, update it\n\t\t */\n\t\t$amazonCacheTable = new ApdDatabase( APD_AMAZON_CACHE_TABLE );\n\t\t$amazonCacheDatabase = new ApdAmazonCacheDatabase();\n\t\t$amazonCacheColumns = $amazonCacheDatabase->getAmazonCacheColumns();\n\n\t\tif ( ! $amazonCacheTable->checkTableExistence() ) {\n\t\t\t$amazonCacheTable->createTableFromArray( $amazonCacheDatabase->getAmazonCacheColumns(), 'cache' );\n\t\t\t$amazonCacheTable->modifyColumns( $amazonCacheColumns, 'unique' );\n\t\t} else if ( ! $amazonCacheTable->checkTableIntegrity( $amazonCacheColumns ) ) {\n\t\t\t$columnDiff = $amazonCacheTable->getTableDiff( $amazonCacheColumns );\n\t\t\t$amazonCacheTable->addColumns( $columnDiff, 'text' );\n\t\t}\n\n\t\t/**\n\t\t * Create cache options table if it doesn't exist\n\t\t * If it does exist, but it's structure doesn't match the classes fields, update it\n\t\t */\n\t\t$cacheOptionsTable = new ApdDatabase( APD_CACHE_OPTIONS_TABLE );\n\t\t$cacheOptionsColumns = $amazonCacheDatabase->getOptionFields();\n\t\t//create amazon cache options table\n\t\tif ( ! $cacheOptionsTable->checkTableExistence() ) {\n\t\t\t$cacheOptionsTable->createTableFromArray( $cacheOptionsColumns, 'cache' );\n\t\t} else if ( ! $cacheOptionsTable->checkTableIntegrity( $cacheOptionsColumns ) ) {\n\t\t\t$columnDiff = $cacheOptionsTable->getTableDiff( $cacheOptionsColumns );\n\t\t\t$cacheOptionsTable->addColumns( $columnDiff, 'text' );\n\t\t}\n\t}", "title": "" }, { "docid": "fc30729ca8bd90b5fa5476e80bc2f7ff", "score": "0.6733746", "text": "public function createTables() {\n if ($this->db->query('\n CREATE TABLE ' . $this->prefix . 'groups' . $this->suffix . '(\n GID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,\n name VARCHAR(100) NOT NULL\n );\n\n CREATE TABLE ' . $this->prefix . 'permissions' . $this->suffix . '(\n PID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,\n name VARCHAR(100) NOT NULL,\n description VARCHAR(200) NOT NULL\n );\n\n CREATE TABLE ' . $this->prefix . 'group_permissions' . $this->suffix . '(\n GID INT NOT NULL,\n PID INT NOT NULL,\n PRIMARY KEY (GID, PID),\n CONSTRAINT GP_FK_GID FOREIGN KEY (GID)\n REFERENCES ' . $this->prefix . 'groups' . $this->suffix . ' (GID),\n CONSTRAINT GP_FK_PID FOREIGN KEY (PID)\n REFERENCES ' . $this->prefix . 'permissions' . $this->suffix . ' (PID)\n );\n\n CREATE TABLE ' . $this->prefix . 'user_groups' . $this->suffix . '(\n UID INT NOT NULL,\n GID INT NOT NULL,\n PRIMARY KEY (UID, GID),\n CONSTRAINT UG_FK_GID FOREIGN KEY (GID)\n REFERENCES ' . $this->prefix . 'groups' . $this->suffix . ' (GID)\n );\n ')) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "8109ec6105ecb3cab44831cf47d12d17", "score": "0.67285275", "text": "public function createStructure()\n {\n $this->executeCommand(['command' => 'doctrine:database:create', '--if-not-exists' => null]);\n\n if ($this->entityManager->getConnection()->getSchemaManager()->tablesExist([self::HISTORY_DEPLOY]) == false) {\n $this->executeCommand(['command' => 'doctrine:schema:create']);\n }\n }", "title": "" }, { "docid": "e37ee38b9fbaba13a034dc6fdf76dd32", "score": "0.6725051", "text": "public function createSchemaVersionsIfNotExists()\n {\n try {\n $this->db->describeTable('_schema_versions');\n } catch (Exception $e) {\n $this->db->getConnection()->query('CREATE TABLE _schema_versions (version CHAR(14) NOT NULL PRIMARY KEY)');\n }\n }", "title": "" }, { "docid": "7883046ff75fa37c8ff28ba73bb0b0eb", "score": "0.6713703", "text": "public function createTable(): bool {\n $this->db->drop(AbstractMigration::MIGRATION_TABLE_NAME);\n $pdo = $this->db->create(AbstractMigration::MIGRATION_TABLE_NAME, [\n 'id' => ['VARCHAR(32)', 'NOT NULL', 'PRIMARY KEY'],\n 'prefix' => ['CHAR(1)', 'NOT NULL'],\n 'version' => ['VARCHAR(32)', 'NULL'],\n 'file' => ['VARCHAR(256)', 'NOT NULL'],\n 'hash' => ['VARCHAR(256)', 'NULL'],\n 'status' => ['VARCHAR(32)', 'NOT NULL'],\n 'errors' => ['TEXT', 'NULL'],\n 'installed_on' => ['DATETIME', 'NULL']\n ]);\n return $pdo->errorCode() === '00000';\n }", "title": "" }, { "docid": "23fde933851ce439f82cd2123c0e76e2", "score": "0.67113477", "text": "public function checkTables(): bool\n {\n $sql = \"SHOW TABLES LIKE 'users'\";\n $query = $this->db->query($sql);\n\n if ($query->num_rows) {\n return true;\n } else {\n $this->createTables();\n return false;\n }\n\n }", "title": "" }, { "docid": "0a17a7367b1ea353175f1281bfed1fc9", "score": "0.67079234", "text": "public function fl_can_insert_system_tables(){\n\t\t\n\t\t//Check to see if any system tables exist\n\t\trequire('setup/db_setup.php');\n\t\t\n\t\t$con = $this->getConnection();\n\t\t\n\t\tif($con == false){\n\t\t $this->error = 'SETUP: '.__LINE__. ' Unable to connect to database.';\n\t\t return false;\n\t\t}\n\t\t\n\t\t$result = $con->query('SHOW TABLES');\n\t\t\n\t\tif($result === false){\n\t\t\t$this->error = 'SETUP '.__LINE__.': System table check query failed. '.$con->error;\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\twhile ($row = $result->fetch_array(MYSQLI_ASSOC)){\n\t\t if(in_array($row['Tables_in_'.$this->dbCreds['db_name']], $fl_systemTableNames)){\n\t\t $this->error = 'SETUP '.__LINE__.': '.$row['Tables_in_'.$this->dbCreds['db_name']]. ' already exists.';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "dab37819caa757e8691e5277b7230f31", "score": "0.6697529", "text": "public function testCreateTableIfNotExist()\n {\n Schema::dropIfExists('test_models');\n\n // ModelGenerator must create table\n AutoDB::laravel_model_to_database_entries(TestModel::class);\n\n // Check if table exists\n $this->assertTrue(Schema::hasTable('test_models'));\n }", "title": "" }, { "docid": "a045d1a18d48d30972307b5366b7811d", "score": "0.66948307", "text": "function ensureAlbumsTable(){\n if($this->connection){\n $queryString = \"CREATE TABLE IF NOT EXISTS albums (id INT(5) PRIMARY KEY AUTO_INCREMENT, artist VARCHAR(100) NOT NULL, title VARCHAR(255) NOT NULL)\";\n // it's okay not to use prepared statements here\n // because it is quite a static thing to do and does not take potentially harmful user input.\n $this->connection->query($queryString);\n }\n }", "title": "" }, { "docid": "85bf54dd6f1caed43dcb0b9bdebef82e", "score": "0.6684243", "text": "protected function setupTables() {\n for ($i = 0; $i < (count($this->bdsc)); $i++) {\n $schema = $this->db[$i]->createSchema('test_db');\n\n $tbl1 = $schema->createTable('test_table1');\n $tbl1->setTableComment('test_table2');\n $tbl1->setTableComment('This table is special');\n $tbl1->setTableCharset('latin1');\n $tbl1->setTableCollation('latin1_german1_ci');\n $col = $tbl1->createColumn('col_id', 'int');\n $col->setPrimaryKey(true, 'PK_COL_ID');\n $tbl1->addColumn($col);\n $schema->addTable($tbl1);\n\n\n $tbl2 = $schema->createTable('test_table2');\n $tbl2->setTableComment('This table is special too');\n $col = $tbl1->createColumn('col_id', 'blaze\\\\lang\\\\String', 10);\n $col->setPrimaryKey(true, 'PK_COL_ID');\n $tbl2->addColumn($col);\n $schema->addTable($tbl2);\n }\n }", "title": "" }, { "docid": "5f293b079391eb04c9e72da1d095dfb3", "score": "0.6669648", "text": "protected function checkIfTableExists()\n {\n $pdo = $this->connection;\n $sql = \"SELECT *\n FROM information_schema.tables\n WHERE table_schema = ?\n AND table_name = ?\n LIMIT 1;\";\n\n try {\n\n $query = $pdo->prepare($sql);\n $query->execute(array($this->dbname, $this->table));\n $result = $query->fetchAll();\n\n } catch (Exception $e) {\n return false;\n }\n\n return sizeOf($result) !== 0;\n }", "title": "" }, { "docid": "6e69640c88e0c395d1fdc417f413b263", "score": "0.6632966", "text": "public static function tableExists()\n {\n $query = 'show tables like \"' . self::getTable() . '\"';\n return count(self::query($query)) > 0;\n }", "title": "" }, { "docid": "5012384867ffdbf2a9808f5da5d37e73", "score": "0.6615845", "text": "final protected function createTables(): bool\n {\n $reflect = new \\ReflectionClass($this);\n $path = dirname($reflect->getFileName()) . DIRECTORY_SEPARATOR\n . 'models' . DIRECTORY_SEPARATOR\n . '*.php';\n\n $models = array_map(function ($filename) {\n return basename($filename, '.php');\n }, glob($path));\n\n return $this->doCreateTables($models);\n }", "title": "" }, { "docid": "8d7ae3ad28e1c2111addcea4bf5a948f", "score": "0.6607758", "text": "private function check_tables() {\n\n\t\t$missing = array();\n\t\tforeach ( $this->obit_legacy_tables as $table ) {\n\t\t\t$exists = $this->table_exists( $table );\n\t\t\tif ( $exists == false ) $missing[] = $table;\n\t\t}\n\t\tif ( count( $missing ) == 0 ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "111599ca34c2877255cbc92b3e722941", "score": "0.66035306", "text": "public function createTables(){\r\n\t\t\t\r\n\t\t\t$this->createTable(GlobalsUC::TABLE_ADDONS_NAME);\r\n\t\t\t$this->createTable(GlobalsUC::TABLE_CATEGORIES_NAME);\r\n\t\t}", "title": "" }, { "docid": "662a49b3261e31c4b2d689784ca02b23", "score": "0.658891", "text": "function create_table($name, $columns)\n{\n if (in_array($name, db::tables()))\n {\n return FALSE;\n }\n \n return (boolean) sql::execute(db::build($name, $columns));\n}", "title": "" }, { "docid": "915fb35d2a5855a50656093067699e98", "score": "0.6582701", "text": "public function tableExists($table);", "title": "" }, { "docid": "b9711e87a8236617cdee77736c7c5c7a", "score": "0.65818673", "text": "private function tableExists($table, $create, $prefix) {\n\t\t// Try a select statement against the table\n\t\t// Run it in try/catch in case PDO is in ERRMODE_EXCEPTION.\n\t\ttry {\n\t\t\t$result = $this->database->query(\"SELECT * FROM \".$prefix.$table.\" LIMIT 1\");\n\t\t\t$result->execute();\n\n\t\t\t$result = $this->database->query(\"TRUNCATE \".$prefix.$table.\"\");\n\t\t\t$result->execute();\n\t\t} catch (Exception $e) {\n\t\t\t//create table\n\t\t\ttry {\n\t\t\t\t$result = $this->database->query( str_replace(\"[prefix]\", $prefix, $create) );\n\t\t\t\t$result->execute();\n\t\t\t\techo \"table \\\"\".$prefix.$table.\"\\\" created\\n\";\n\t\t\t} catch (Exception $e) {\n\t\t\t\tdie(\"Create table error: \\n\" . $e);\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// Result is either boolean FALSE (no table found) or PDOStatement Object (table found)\n\t\treturn $result !== FALSE;\n\t}", "title": "" }, { "docid": "a32118fdd1cf327eea5b2be0d0a218cf", "score": "0.65776616", "text": "function chk_table_exists($table,$conn)\r\n {\r\n\r\n if($_SESSION['post']['dbtype']=='mysql')\r\n $rez=$this->QUERY(\"SELECT 1 FROM \".$this->Q($table,1).\"\",$conn);\r\n elseif($_SESSION['post']['dbtype']=='postgresql')\r\n $rez=$this->QUERY(\"select * from pg_tables where schemaname='public' and tablename='\".$table.\"';\",$conn);\r\nreturn @$this->affected_rows($rez);\r\n }", "title": "" }, { "docid": "9bfd0264492d2d015aa35c956d112d75", "score": "0.65571487", "text": "abstract protected function table_exists($tablename);", "title": "" }, { "docid": "31de601bb41e936f9cf994b5bb76ac4a", "score": "0.6553812", "text": "function create_table_if_needed() {\n $table_name = $wpdb->prefix . 'report_daily_morning';\n if($wpdb->get_var(\"SHOW TABLES LIKE '$table_name'\") != $table_name) {\n create_report_daily_morning();\n } else {\n echo 'false';\n }\n}", "title": "" }, { "docid": "c52e9f2e520d0768c1e3f1482d78e42e", "score": "0.6550691", "text": "protected function createTables(){\n\t\t$this->db->show_errors = false;\n\t\t$this->baseModel->init($this->models);\n\t\t$this->db->show_errors = true;\n\t}", "title": "" }, { "docid": "158009e583539cf5b84608fcdc1fd225", "score": "0.65455425", "text": "private function installTables()\n {\n $sql = '\n CREATE TABLE IF NOT EXISTS `' . pSQL(_DB_PREFIX_) . 'demoextendsymfonyform_reviewer` (\n `id_reviewer` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,\n `id_customer` INT(10) UNSIGNED NOT NULL,\n `is_allowed_for_review` TINYINT(1) NOT NULL,\n PRIMARY KEY (`id_reviewer`)\n ) ENGINE=' . pSQL(_MYSQL_ENGINE_) . ' COLLATE=utf8_unicode_ci;\n ';\n\n return Db::getInstance()->execute($sql);\n }", "title": "" }, { "docid": "60c04521a1506cbfad6aff6c3a9ed0e1", "score": "0.65443414", "text": "private function isMigrationTableExists(){\n\n $sql = \"CREATE TABLE IF NOT EXISTS `migrations` (\n `id` int(5) NOT NULL AUTO_INCREMENT,\n `phase` varchar(30) NOT NULL,\n `file_name` varchar(255) NOT NULL,\n `execution_datetime` datetime NOT NULL,\n `status` varchar(20) NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `file_name` (`file_name`)\n );ALTER TABLE `migrations` ADD UNIQUE (`file_name`);\";\n $this->db_conn->exec($sql);\n\n $sql = 'SELECT * FROM migrations ORDER BY id';\n if($migrations = $this->db_conn->query($sql)->fetchAll(PDO::FETCH_ASSOC)){\n $executed_file_list = [];\n foreach($migrations as $key=>$file){\n $executed_file_list[] = $file['file_name'];\n }\n return $executed_file_list;\n }\n }", "title": "" }, { "docid": "611529697600d0649549550c8e581530", "score": "0.6533228", "text": "public function createTable()\n {\n $query = \"CREATE TABLE \".$this -> table_name.\"\n (\".$this -> strCreateTable.\")\";\n if (mysqli_multi_query($this -> _link, $query)) {\n\t\t do {\n\t\t\t if ($result = mysqli_store_result($this -> _link)) {\n\t\t\t\t mysqli_free_result($result);\n\t\t\t }\n\t\t } while (mysqli_next_result($this -> _link));\n\t\t}\n }", "title": "" }, { "docid": "163f1a97e2cae3f2bfeea012d50797fc", "score": "0.6491218", "text": "private function doCreateTables($models): bool\n {\n // tables of module do not exists, but it's right\n $result = true;\n $db = $this->getDb();\n $logger = $this->getLogger();\n\n try {\n // trying create tables from models info\n foreach ($models as $model) {\n $className = '\\\\' . $this->moduleNamespace\n . '\\\\Models\\\\' . $model;\n $instance = new $className();\n\n $tableName = $instance->getSource();\n\n $logger->debug('Create table: ' . $tableName);\n $db->createTable(\n $tableName,\n null,\n [\n 'columns' => $className::getTableColumns()\n ]\n );\n }\n } catch (Exception $e) {\n// skip create tables on error...\n $this->getLogger()->error(\n \"Error on create tables:\\n\"\n . \"classname: $className\\n\"\n . \"message:\\n\" . $e->getMessage()\n );\n $result = false;\n }\n\n return $result;\n }", "title": "" }, { "docid": "eb592099a2bdd52a34c7aabfc15150be", "score": "0.648168", "text": "public static function table_exists() {\n $tables = DB::query(Database::SELECT, 'SHOW TABLES;')->execute()->as_array();\n\n for($i = 0; $i < count($tables); $i++) {\n $table = $tables[$i];\n\n foreach($table as $column) {\n if($column == self::MIGRATION_TABLE) {\n return true;\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "9e63803e17558c1b75441f727f21d582", "score": "0.647818", "text": "public function tableExist(){\n\t\t/*$dbName=$this->db->_getName();\n\t\tif(!isset(self::$allTables[$dbName]))\n\t\t\tself::$allTables[$dbName]=$this->db->doSelectValues('SHOW TABLES');\n\t\treturn in_array($this->tableName,self::$allTables[$dbName]);*/\n\t\treturn $this->_tableStatus()!==null;\n\t}", "title": "" }, { "docid": "9914d64d7c3d4bd7dff9b3f5d09709af", "score": "0.647147", "text": "function tableExists($tablename) {\r\n\t\t$q = $this->_dbcon->arrayQuery(\"SELECT tablename FROM pg_tables WHERE schemaname = CURRENT_SCHEMA() AND (tablename = '%s')\", array($tablename));\n\t\treturn !empty($q);\r\n\t}", "title": "" }, { "docid": "7770c19737aa4f4dc176cd11109faefd", "score": "0.6468008", "text": "function createTable(){\n\t\t$DB = VSFactory::createConnectionDB();\n\t\t$this->result['status']=true;\n\t\tif($this->tableName == \"\"){\n\t\t\t$this->result['status'] = false;\n\t\t\t$this->result['message'] .= \"Name table can't be left blank!<br>\";\n\t\t\treturn false;\n\t\t}\n\t\tif($this->check_exitTable()){\n\t\t\t$this->result['message'] .= \"Table name[\".SQL_PREFIX.$this->tableName.\"] has been exits\";\n\t\t\treturn false;\n\t\t}\t\n\t\t$sql = $this->getSQLString();\n\t\t$DB->query($sql);\n\t\tif($DB->query_id)\n\t\t \t$this->result['message'] .= \"Table name[\".SQL_PREFIX.$this->tableName.\"] has been created success\";\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e9a3fd82f4b441ececb68bc141f8d877", "score": "0.6457533", "text": "function createTable() {\n\t// The process starts on this page: \n\t//\n\t// http://craigbuilders.cat4dev.com/authorized/development/index.php?formName=createTableForm\n\t//\n\t// The input from that form gets processed by formatSqlToCreateTables(), which makes\n\t// a string that is shown to the user on showSqlForTableCreationForm.htm. The user\n\t// has a final chance to edit the SQL, and then that form is input and this function \n\t// is called to actually create the table. \n\n\tglobal $controller; \n\n\t$stringOfSql = $controller->getVar(\"stringOfSql\"); \n\t$result = $controller->command(\"makeQuery\", $stringOfSql, \"createTable\"); \n\t\n\tif ($result) {\n\t\t$message = \"The query was successful. \"; \n\t} else {\n\t\tif (is_resource($result)) {\n\t\t\t$errorMessage = mysql_error($result); \n\t\t\t$message = \"The query failed. The message from the database: '$errorMessage'. \"; \n\t\t} else {\n\t\t\t$controller->error(\"In createTable the query to the database failed and no valid resource was returned, not even one that says false\"); \n\t\t\t$controller->addToResults(\"Error: the query to the database failed and no valid resource was returned, not even one that says false\"); \n\t\t}\n\t}\n\n\t$message .= \"These tables currently exist in the database: \"; \n\t$message .= $controller->command(\"getListOfDatabaseTablesAsAString\"); \n\t$controller->addToResults($message); \n}", "title": "" }, { "docid": "2322ff03bcf02e7c255aec4d041af514", "score": "0.6454804", "text": "function tables_exist() {\n\t\tglobal $wpdb;\n\n\t\t$metrics = new \\SearchWP_Metrics();\n\n\t\t$tables_exist = true;\n\n\t\t$tables = array(\n\t\t\t$metrics->get_table_name( 'clicks' ),\n\t\t\t$metrics->get_table_name( 'ids' ),\n\t\t\t$metrics->get_table_name( 'queries' ),\n\t\t\t$metrics->get_table_name( 'searches' ),\n\t\t);\n\n\t\tforeach ( $tables as $table ) {\n\t\t\t$table_sql = $wpdb->get_results( \"SHOW TABLES LIKE '{$table}'\" , ARRAY_N );\n\t\t\tif ( empty( $table_sql ) ) {\n\t\t\t\t$tables_exist = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $tables_exist;\n\t}", "title": "" }, { "docid": "1d057de928e5875ba004a696b0c347da", "score": "0.64533657", "text": "function empty_tables()\n{\n\tglobal $logger;\n\n\t$logger->debug(\"Emptying tables\", 1);\n\tif( !mysql_query('truncate table epo_systems;') ) {\n\t\t$logger->logit(\"Could not empty epo_systems, \" . mysql_error(), LOG_ERROR);\n\t\treturn false;\n\t}\n\tif( !mysql_query('truncate table epo_versions;') ) {\n\t\t$logger->logit(\"Could not empty epo_versions, \" . mysql_error(), LOG_ERROR);\n\t\treturn false;\n\t}\n\t\n\t\t\n\treturn true;\n}", "title": "" }, { "docid": "8ba6b069fe8be64e9bb411c2d2d21c1b", "score": "0.6446133", "text": "public function hasTables() {\r\n try {\r\n $db = Zend_Db_Table::getDefaultAdapter();\r\n if ($db == null) {\r\n return self::NO_DATABASE;\r\n }\r\n } catch(Exception $e) {\r\n return self::NO_DATABASE;\r\n }\r\n\r\n foreach (self::$Tables as $tableName) {\r\n try {\r\n $result = $db->describeTable($tableName); //throws exception\r\n if (empty($result)) {\r\n return self::NO_TABLE;\r\n }\r\n } catch (Exception $e) {\r\n return self::NO_TABLE;\r\n }\r\n }\r\n // else, tables exist\r\n return true;\r\n }", "title": "" }, { "docid": "c5d633f027e9bfb4b84f210461d1bf25", "score": "0.6440203", "text": "function qa_db_install_tables()\n{\n\t$definitions = qa_db_table_definitions();\n\n\t$missingtables = qa_db_missing_tables($definitions);\n\n\tforeach ($missingtables as $rawname => $definition) {\n\t\tqa_db_query_sub(qa_db_create_table_sql($rawname, $definition));\n\n\t\tif ($rawname == 'userfields')\n\t\t\tqa_db_query_sub(qa_db_default_userfields_sql());\n\t}\n\n\tforeach ($definitions as $table => $definition) {\n\t\t$missingcolumns = qa_db_missing_columns($table, $definition);\n\n\t\tforeach ($missingcolumns as $colname => $coldefn)\n\t\t\tqa_db_query_sub('ALTER TABLE ^' . $table . ' ADD COLUMN ' . $colname . ' ' . $coldefn);\n\t}\n\n\tqa_db_set_db_version(QA_DB_VERSION_CURRENT);\n}", "title": "" }, { "docid": "e58ab4c1db19c067d6679366f8aeb2e8", "score": "0.64385295", "text": "protected function createTables()\n {\n if (!$this->haveTable('remind')) {\n $this->db->exec(\n 'CREATE TABLE\n remind\n (\n time INTEGER,\n channel TEXT,\n recipient TEXT,\n sender TEXT,\n message TEXT\n )'\n );\n }\n }", "title": "" }, { "docid": "9881dd225f22591acfc3f18525a41ba7", "score": "0.6416768", "text": "function build_tables($db_location, $force_exit){\n\n $host_table_query = \"create table host(id int primart key not null, url text not null);\";\n $results_table_query = \"create table results(id int not null, download real, upload real, ping_min real, ping_avg real, ping_max real, ping_mdev real, distance real, ins_date date, FOREIGN KEY(id) references host(id));\";\n\n create_table($db_location, 'results', $results_table_query, $force_exit);\n create_table($db_location, 'host', $host_table_query, $force_exit);\n\n}", "title": "" }, { "docid": "8bbb23e626badd20f26487b6a83f46be", "score": "0.636916", "text": "public function createTable()\r\n {\r\n if ($this->dbConnection) {\r\n $sql = <<<EOT\r\nDROP TABLE IF EXISTS `users`;\r\nCREATE TABLE `users` (\r\n `name` varchar(255) NOT NULL,\r\n `surname` varchar(255) NOT NULL,\r\n `email` varchar(255) NOT NULL\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\r\nALTER TABLE `users` ADD UNIQUE KEY `email unique` (`email`);\r\nEOT;\r\n if( $this->dbConnection->multi_query($sql) === FALSE)\r\n {\r\n throw new \\Exception(\"Cannot create database table `users`\");\r\n } else {\r\n while ($this->dbConnection->next_result()) {;} // flush multi_queries\r\n }\r\n }\r\n }", "title": "" }, { "docid": "753f287e0a2a5c3aed8a1d1c10148609", "score": "0.6367043", "text": "public function createTables() {\n $command = 'CREATE TABLE IF NOT EXISTS tasks (\n task_number VARCHAR(10) PRIMARY KEY,\n task_name VARCHAR (255) NOT NULL,\n task_status VARCHAR (30),\n task_priority VARCHAR (30)\n )';\n // execute the sql command to create new table\n $this->pdo->exec($command);\n }", "title": "" }, { "docid": "a38f4febb75a1d39cac3aa8891a62f81", "score": "0.63556707", "text": "public function fl_setup_system_tables(){\n\t\t\n\t\trequire_once('setup/db_setup.php');\n\t\t\n\t\t$con = $this->getConnection();\n\t\t\n\t\tif($con == false){\n\t\t $this->error = 'SETUP: '.__LINE__. ' Unable to connect to database.';\n\t\t return false;\n\t\t}\n\t\t\n\t\t$result = $con->multi_query($fl_systemTablesSQL);\n\t\t\t\n\t\tif($result === false){\n\t\t\t$this->error = 'SETUP '.__LINE__.': System table setup failed. '.$con->error;\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$con->close();\n\t\t\n\t\tusleep(500000);\n\t\t\n\t\t//Don't release this resource until we check if the tables exist. \n\t\tfor($i = 0; $i < 5; $i++){\n \n\t\t $systemTablesFound = 0;\n\t\t \n\t\t $con = $this->getConnection();\n\t\t \n\t\t $checkSystemTablesResult = $con->query('SHOW TABLES');\n\t\t \n\t\t if($checkSystemTablesResult === false){\n \t\t $this->error = 'SETUP '.__LINE__.': System table check query failed. '.$con->error;\n \t\t return false;\n \t\t}\n \t \t\t\n \t\twhile ($row = $checkSystemTablesResult->fetch_array(MYSQLI_ASSOC)){\n \t\t \n \t\t //echo $row['Tables_in_'.$this->dbCreds['db_name']];\n \t\t if(in_array($row['Tables_in_'.$this->dbCreds['db_name']], $fl_systemTableNames)){\n \t\t $systemTablesFound = $systemTablesFound + 1;\n \t\t } \t\t \n \t\t \n \t\t}\n \t\t\n \t\tif($systemTablesFound == sizeof($fl_systemTableNames)){\n \t\t $i = 6;\n \t\t}\n \t\t\n \t\t$con->close();\n \t\t\n \t\tusleep(500000);\n \t\t\n\t\t}\n\t\t\n\t\treturn($systemTablesFound == sizeof($fl_systemTableNames));\n\t\t\n\t}", "title": "" }, { "docid": "dbd0cfbb4ee836eb8f1cf166ab5eac3e", "score": "0.633739", "text": "function ensure_my_table() { }", "title": "" }, { "docid": "9d53581bb87a58b96eccf308c5df21fe", "score": "0.63047576", "text": "private function create_new_tables()\n\t{\n\t\tglobal $wpdb;\n\n\t\t$table_name = $wpdb->prefix . \"pv_commission\";\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\n\t\t$sql = \"CREATE TABLE $table_name (\n\t\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\t\tproduct_id bigint(20) NOT NULL,\n\t\t\torder_id bigint(20) NOT NULL,\n\t\t\tvendor_id bigint(20) NOT NULL,\n\t\t\ttotal_due decimal(20,2) NOT NULL,\n\t\t\tqty BIGINT( 20 ) NOT NULL,\n\t\t\ttotal_shipping decimal(20,2) NOT NULL,\n\t\t\ttax decimal(20,2) NOT NULL,\n\t\t\tstatus varchar(20) NOT NULL DEFAULT 'due',\n\t\t\ttime datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n\t\t\tUNIQUE KEY id (id)\n\t\t);\";\n\t\tdbDelta( $sql );\n\t}", "title": "" }, { "docid": "e3f9f26e5f15d9e919d2d19ef77ec078", "score": "0.62939066", "text": "public function validate_db_table() {\n\n\t\t\tglobal $wpdb;\n\n\t\t\tif ( $wpdb->get_var( \"SHOW TABLES LIKE '{$this->table_name()}'\" ) === $this->table_name() ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t\t$sql = \"CREATE TABLE {$this->table_name()} (\n\t\t\t\tid mediumint(9) NOT NULL AUTO_INCREMENT,\n\t\t\t\tquery_hash text NOT NULL,\n\t\t\t\turl text NOT NULL,\n\t\t\t\tPRIMARY KEY (id)\n\t\t\t) $charset_collate;\";\n\n\t\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\tdbDelta( $sql );\n\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "79d7a5b5ccbb303c3aa1ab661b9c20c7", "score": "0.628254", "text": "abstract public function createTables( $database_info, $languages );", "title": "" }, { "docid": "95d819e81f2acc3f71eb66a813673713", "score": "0.6272188", "text": "private function createStatesSQLTables()\n {\n $this->db->exec(\"DROP TABLE IF EXISTS states\");\n $this->db->exec(\"CREATE TABLE states(\n id INTEGER PRIMARY KEY, \n name VARCHAR(32) \n )\");\n }", "title": "" }, { "docid": "ebbb4f15fd83fda4ac5846f8d198e1bf", "score": "0.62621284", "text": "function load_tables() {\n $sql .= \" CREATE TABLE IF NOT EXISTS `\" . MAIN_DB_PREFIX . \"ticketfree_users_join` (`id` int(11) NOT NULL AUTO_INCREMENT,`id_dolibarr` int(11) NOT NULL, `id_hesk` int(11) NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=54 ;\";\n return $this->_load_tables($sql);\n }", "title": "" }, { "docid": "41d64a820aee57e9f0818a8535ffff00", "score": "0.6256045", "text": "public function createTable(QSqlTable $table, $drop_if_exists = false)\r\n\t{\r\n\t\tif ($this->connection)\r\n\t\t\t$this->connection->createTable($this->getName(), $table, $drop_if_exists);\r\n\t\t$this->addTable($table);\r\n\t}", "title": "" }, { "docid": "cf14ab216ba6ad68803f73a5cc7d9622", "score": "0.62440616", "text": "function createTables($db){\n try{\n $sql = \"CREATE TABLE IF NOT EXISTS allnumbers (\n id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n num INT(30) NOT NULL,\n available TEXT(30) NOT NULL\n )\";\n $db->exec($sql);\n \n }\n catch(Exception $e){\n echo \"Table could not be created.Here is the error message :\". $e->message();\n\n }\n}", "title": "" }, { "docid": "dab3f3bfc3194c9389dee465f656ef33", "score": "0.62430745", "text": "static function tableExists($tab){\n\t\t$_db = new DB_WE();\n\t\treturn ($_db->isTabExist($tab) ? true : false);\n\t}", "title": "" }, { "docid": "7372bd67b4ea58b90303dbe9dcfa80cf", "score": "0.62230676", "text": "public static function checkTable() {\r\n\t}", "title": "" }, { "docid": "c34af062bdcdbf8f935fcfea7ee9e3c6", "score": "0.622209", "text": "public function createTable()\r\n {\r\n // (removing all old data)\r\n $this->dropTable();\r\n\r\n $sql = \"\r\n CREATE TABLE IF NOT EXISTS students (\r\n id integer not null primary key auto_increment,\r\n name text)\r\n \";\r\n\r\n $this->connection->exec($sql);\r\n }", "title": "" }, { "docid": "706e6c26d1b03c6fe07e6b69de9261e9", "score": "0.6221725", "text": "public function compileTableExists()\n {\n return 'select * from information_schema.tables where table_schema = ? and table_name = ?';\n }", "title": "" }, { "docid": "71796393610c0b69fdb33487d68683c4", "score": "0.6210713", "text": "public function isDbSetup(){\n $schema = $this->conn->getSchemaManager();\n return $schema->tablesExist($this->tables['admin']);\n }", "title": "" }, { "docid": "9442b2e6cb207ce630760a3203457f84", "score": "0.6208381", "text": "public function compileTableExists()\n\t{\n\t\treturn 'select * from information_schema.tables where table_schema = ? and table_name = ?';\n\t}", "title": "" }, { "docid": "c08c2c0049a2103407f335e0556e00ca", "score": "0.62042165", "text": "public function create_table($table_name, array $columns, array $indexes, array $options, $if_not_exists = TRUE)\n {\n //abstract\n }", "title": "" }, { "docid": "49c9455243cce3d2ab82e1352822e951", "score": "0.61946654", "text": "public function createTable($table, $columns, $required, $foreignkeys, $ifnotexists = false) {\n\t\t$this->engine->createTable($table, $columns, $required, $foreignkeys, $ifnotexists);\n\t}", "title": "" }, { "docid": "5eacb32f4f63c804d4e591302641daf4", "score": "0.6189746", "text": "private function createTable($table)\n {\n try {\n // Gets the table information from the associated table file\n $tableInfo = $this->grabTableInfo($table);\n\t\t\t// Get the table schema from the file\n\t\t\t$schema = $tableInfo[0];\n // Executes the query to build the table\n DatabaseManager::Query($schema);\n\t\t\t$this->populateTable($tableInfo[1]);\n } catch (PDOException $e) {\n echo \"Adding table '$table' failed: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "5ff7604279481d0dc65b9851ebc603f7", "score": "0.6189596", "text": "private static function checkTableExist(string $tableName): bool\n {\n $dbName = self::$db->getDbName(); //get database name\n\n $sql = \"SELECT table_name FROM information_schema.tables\n WHERE table_schema = :dbName\n AND table_name = :tableName \";\n\n $data = self::$db->prepareWithoutClass($sql, compact('dbName', 'tableName'));\n\n return empty($data);\n }", "title": "" }, { "docid": "52521ca97b4bf6c8dc43374602c8be02", "score": "0.61872643", "text": "protected function checkTableExists(): bool\n {\n $checkLogTable = $this->db->query(\"SHOW TABLES LIKE '{$this->tableFilterLogs}'\");\n\n if ($checkLogTable) {\n if ($checkLogTable->rowCount() > 0) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "861e87409964b2eebd9edf3233ffac4e", "score": "0.6184084", "text": "public function createTable()\n {\n Symphony::Database()->query(\n \"CREATE TABLE IF NOT EXISTS `tbl_entries_data_\".$this->get('id').\"` (\n `id` int(11) unsigned NOT NULL auto_increment,\n `entry_id` int(11) unsigned NOT NULL,\n `author_id` int(11) unsigned NOT NULL,\n `newsletter_id` int(11) unsigned NOT NULL,\n PRIMARY KEY (`id`),\n KEY `entry_id` (`entry_id`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;\"\n );\n\n return true;\n }", "title": "" }, { "docid": "46baa50b31d03ea12d5eb12aca31f13a", "score": "0.6183829", "text": "private function createTables() {\n // Check connection\n if ($this->conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n\n // sql to create table\n $sql = \"CREATE TABLE IF NOT EXISTS \" . $GLOBALS['dbname'] . \".\" . $GLOBALS['tableprefix'] . \"config (\n option_id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n option_name VARCHAR(60) NOT NULL,\n option_value VARCHAR(60) NOT NULL\n )\";\n\n if ($this->conn->query($sql) === TRUE) {\n echo(\"Config tables created successfully. \\n\");\n } else {\n echo(\"Error creating table: \" . $this->conn->error . \"\\n\");\n\n return false;\n }\n\n // sql to create table\n $sql = \"CREATE TABLE IF NOT EXISTS \" . $GLOBALS['dbname'] . \".\" . $GLOBALS['tableprefix'] . \"comments (\n comment_id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n comment_ts VARCHAR(60) NOT NULL,\n comment_content TEXT(120) NOT NULL,\n comment_instaid VARCHAR(60) NOT NULL\n )\";\n\n if ($this->conn->query($sql) === TRUE) {\n echo(\"Comment tables created successfully. \\n\");\n } else {\n echo(\"Error creating table: \" . $this->conn->error . \"\\n\");\n\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "1c7ed57ecb046ed98d370aca5ac81e65", "score": "0.6175857", "text": "function createTables(){\n //in case the tables ever get deleted run this function\n echo \"Creating tables <br>\";\n\t\t$sql = \"CREATE TABLE Graders (\n\t\t\tid\tINT PRIMARY KEY AUTO_INCREMENT,\n\t\t\tfname VARCHAR(30) NOT NULL,\n\t\t\tlname VARCHAR(30) NOT NULL,\n\t\t\tlogin VARCHAR(30) NOT NULL,\n CONSTRAINT login_u UNIQUE (login));\";\n if (!($GLOBALS['conn']->query($sql) === TRUE)) {\n echo \"Error: \" . $sql . \"<br>\" . $GLOBALS['conn']->error . \"<br>\";\n }\n $sql = \"CREATE TABLE Instructors (\n\t\t\tid\tint PRIMARY KEY AUTO_INCREMENT,\n\t\t\tfname varchar(30) NOT NULL,\n\t\t\tlname varchar(30) NOT NULL,\n\t\t\tlogin varchar(30) NOT NULL,\n CONSTRAINT login_u UNIQUE (login));\";\n if (!($GLOBALS['conn']->query($sql) === TRUE)) {\n echo \"Error: \" . $sql . \"<br>\" . $GLOBALS['conn']->error . \"<br>\";\n }\n $sql = \"CREATE TABLE Students (\n\t\t\tid int PRIMARY KEY AUTO_INCREMENT,\n\t\t\tlogin varchar(30) NOT NULL,\n CONSTRAINT login_u UNIQUE (login));\";\n if (!($GLOBALS['conn']->query($sql) === TRUE)) {\n echo \"Error: \" . $sql . \"<br>\" . $GLOBALS['conn']->error . \"<br>\";\n }\n $sql = \"CREATE TABLE to_section (\n\t\t\tprim_id\tint PRIMARY KEY AUTO_INCREMENT,\n\t\t\tsection_id int NOT NULL,\n instructor_id int NOT NULL,\n grader_id int NULL,\n CONSTRAINT section_u UNIQUE (section_id));\n \";\n if (!($GLOBALS['conn']->query($sql) === TRUE)) {\n echo \"Error: \" . $sql . \"<br>\" . $GLOBALS['conn']->error . \"<br>\";\n }\n $sql = \"CREATE TABLE to_student (\n\t\t\tprim_id\tint PRIMARY KEY AUTO_INCREMENT,\n\t\t\tstudent_id int NOT NULL,\n section_id int NOT NULL);\n \";\n if (!($GLOBALS['conn']->query($sql) === TRUE)) {\n echo \"Error: \" . $sql . \"<br>\" . $GLOBALS['conn']->error . \"<br>\";\n }\n }", "title": "" }, { "docid": "c741447e6256bf5bfb3fd4f156a49124", "score": "0.6171968", "text": "private function verify ()\r\n\t{\r\n\t\t// test if Database exists\r\n\t\ttry {\r\n\t\t\t$db = $this->getDefaultAdapter();\r\n\t\t} catch (Exception $e) {\r\n\t\t\tthrow new Zend_Exception($e->getMessage());\r\n\t\t}\r\n\r\n\t\t// test if table exists\r\n\t\ttry {\r\n\t\t\t$result = $db->describeTable($this->_name);\r\n\r\n\t\t\tif (empty($result)) {\r\n\t\t\t\t$this->createTable();\r\n\t\t\t}\r\n\t\t} catch (Exception $e) {\r\n\t\t\t$this->createTable();\r\n\t\t\t\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "48e9ca80235d222091dba7e05ef6716f", "score": "0.6168247", "text": "protected function _duplicateTables() {\n foreach ($this->_entities as $entity) {\n\n $tableName = $this->_resource->getTableName($entity);\n\n $this->_write->query(\"CREATE TABLE IF NOT EXISTS \" . $tableName . \"_tmp LIKE $tableName\");\n $this->_write->query(\"INSERT IGNORE INTO \" . $tableName . \"_tmp SELECT * from $tableName\");\n }\n }", "title": "" }, { "docid": "b84af31add463bfb418c6068d2d949f3", "score": "0.6167741", "text": "public static function prepareDB() {\n $db = Database::getDatabase();\n try {\n foreach (DBQueries::$CREATE_TABLES as $table) {\n $db->exec($table);\n }\n } catch (PDOException $ex) {\n exit($ex->getTraceAsString() . \"<br>\" . $ex->getMessage());\n }\n }", "title": "" }, { "docid": "3ab0107dd0c1c23516c8017c8ff7a044", "score": "0.61612445", "text": "public function table_exists() {\n\t\treturn (bool) $this->get_row( 'SHOW TABLES LIKE %s', $this->table );\n\t}", "title": "" }, { "docid": "c2a3688f91e75fca4c1e1a6ef7b11ea7", "score": "0.6155425", "text": "function Sql_Tables_Exists($tables=array())\n {\n if (!is_array($tables)) { $tables=array($tables); }\n \n $rtables=array();\n foreach ($tables as $table)\n {\n if ($this->Sql_Table_Exists($table))\n {\n array_push($rtables,$table);\n }\n }\n\n return $rtables;\n }", "title": "" }, { "docid": "e8962145f491ee326cf4be336e49e8b3", "score": "0.6148473", "text": "function tableExists($table){\n global $db;\n $table_exit = $db->query('SHOW TABLES FROM '.DB_NAME.' LIKE \"'.$db->escape($table).'\"');\n if($table_exit) {\n if($db->num_rows($table_exit) > 0)\n return TRUE;\n else\n return FALSE;\n }\n}", "title": "" }, { "docid": "4478afab2f34ecdce0ee146c512223fe", "score": "0.61462486", "text": "public function checkTableExists($table)\n\t{\n\t\t$db = JFactory::getDBO();\n\t\t$config = JFactory::getConfig();\n\n\t\tif (JVERSION >= '3.0')\n\t\t{\n\t\t\t$dbname = $config->get('db');\n\t\t\t$dbprefix = $config->get('dbprefix');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$dbname = $config->getValue('config.db');\n\t\t\t$dbprefix = $config->getvalue('config.dbprefix');\n\t\t}\n\n\t\t$query = \" SELECT table_name\n\t\t FROM information_schema.tables\n\t\t WHERE table_schema='\" . $dbname . \"'\n\t\t AND table_name='\" . $dbprefix . $table . \"'\";\n\n\t\t$db->setQuery($query);\n\t\t$check = $db->loadResult();\n\n\t\tif ($check)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "21c981ba8854cd960ca53046c93e8e5f", "score": "0.6141015", "text": "function createCustomTable(){\n\t\t$result = $this->db->query(\"SHOW TABLES LIKE '\".$this->bean->table_name.\"_cstm'\");\n\n\t\tif ($this->db->getRowCount($result) == 0){\n\n\t\t\t$query = 'CREATE TABLE '.$this->bean->table_name.'_cstm ( ';\n\t\t\t$query .='id_c char(36) NOT NULL';\n\t\t\t$query .=', PRIMARY KEY ( id_c ) )';\n\n\t\t\t$this->db->query($query);\n\t\t\t$this->add_existing_custom_fields();\n\t\t\t//$this->populate_existing_ids();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\t\n\t\n\t}", "title": "" }, { "docid": "bb37a5788bfdb00cf7a1417e4cdf941d", "score": "0.6137409", "text": "public function ensureTable(Table $table) {\n\t $pdo = $this->config->pdo;\n \t$pdo->query($table->dropSQL());\n \t$pdo->query($table->createSQL());\n }", "title": "" } ]
7228483eabc2e2728c5472af284f4f04
Preview image in iframe
[ { "docid": "754d42c89ec09206dccc37542f9b81fa", "score": "0.55697453", "text": "static function preview()\n {\n $extensions = unserialize(base64_decode($_POST['wp-femu-option-extensions']));\n $dimensions = unserialize(base64_decode($_POST['wp-femu-option-dimensions']));\n\n foreach ($_FILES as $field => $file) {\n\n if ($file['error'] === UPLOAD_ERR_OK) {\n\n $id = \"user_\". uniqid();\n $temp = \"wp-content/uploads/temp/$id-{$file['name']}\";\n $path = ABSPATH . $temp;\n $preview = site_url('/') . $temp;\n\n // Check for valid extensions\n if (! self::checkExtensions($file, $extensions)) {\n $error = sprintf('The image must have a valid extension (%s).', implode(',', $extensions));\n echo sprintf('<span>%s</span>', $error);\n break;\n }\n\n // Move file to temp folder and setup correct permissions\n move_uploaded_file($file['tmp_name'], $path);\n $stat = stat(dirname($path));\n chmod($path, $stat['mode'] & 0000666);\n\n // Check image dimensions\n if (! self::checkDimensions($path, $dimensions)) {\n echo sprintf('<span>%s</span>', \"The image dimensions are too small. Must be at least {$dimensions[0]}x{$dimensions[1]} px.\");\n unlink($path);\n break;\n }\n\n self::cropImage($path, $dimensions);\n\n // Print image\n echo sprintf('<img class=\"wp-femu-image\" src=\"%s\" />', $preview);\n\n // Errors\n } elseif ($file['error'] === UPLOAD_ERR_INI_SIZE || $file['error'] === UPLOAD_ERR_FORM_SIZE) {\n echo sprintf('<span>%s</span>','The filesize is too big.');\n } elseif ($file['error'] === UPLOAD_ERR_NO_FILE) {\n echo sprintf('<span>%s</span>', 'Preview');\n } else {\n echo sprintf('<span>%s</span>', 'An error ocurred, please try again.');\n }\n }\n\n exit;\n }", "title": "" } ]
[ { "docid": "cc7df820ca818e0fd3c6e39d84fd2479", "score": "0.67910814", "text": "function modal_buddy_cover_image_iframe() {\n\t// Enqueue the Attachments scripts for the Cover Image UI\n\tbp_attachments_enqueue_scripts( 'BP_Attachment_Cover_Image' );\n\t?>\n\n\t<h1><?php esc_html_e( 'Edit Cover Image', 'modal-buddy' ); ?></h1>\n\n\t<?php bp_attachments_get_template_part( 'cover-images/index' );\n}", "title": "" }, { "docid": "5620a81002979ab2fea73607d91f49e4", "score": "0.64817697", "text": "public function getPreviewImage()\n\t{\n\t\treturn $this->previewImage;\n\t}", "title": "" }, { "docid": "c4725f13c32dfbefcb10904a2d3865c3", "score": "0.6400051", "text": "function preview() {\n\t\t$imageID = getRequest('imageID', 'integer');\n\t\t$image = new contentImageIndex($imageID);\n\t\theaders::sendNoCacheHeaders();\n\t\tif ($image->exists()) {\n\t\t\techo '<img src=\"/images/'.time().'/content/'.$image->get('image').'\" />';\n\t\t} else {\n\t\t\techo 'Image not found';\n\t\t}\n\t}", "title": "" }, { "docid": "ef4068170a79069888259d028a0846e9", "score": "0.6397095", "text": "public function useIframe();", "title": "" }, { "docid": "ac088548a9157eb270ceef1ae0c7381b", "score": "0.6392949", "text": "function modal_buddy_avatar_iframe() {\n\t// Enqueue the Attachments scripts for the Avatar UI\n\tbp_attachments_enqueue_scripts( 'BP_Attachment_Avatar' );\n\t?>\n\n\t<h1><?php esc_html_e( 'Edit Photo', 'modal-buddy' ); ?></h1>\n\n\t<?php bp_attachments_get_template_part( 'avatars/index' );\n}", "title": "" }, { "docid": "a18af074368d222f2869463d22eec29f", "score": "0.6305153", "text": "public function buildPreview(){\n\n\t\t$url = $this->getField( 'medium' );\n\n\t\tif( !$url || $url == 'false' || $url == '' )\n\t\t\t$url = $this->getField( 'full' );\n\n\n\t\techo '<div class=\"img-wrapper\">';\n\n\t\t\techo '<img src=\"'.esc_attr( $url ).'\"/>';\n\n\t\techo '</div>';\n\t\t\n\t}", "title": "" }, { "docid": "3661955ebd2cdc6ad569e59ea2580857", "score": "0.6202074", "text": "public function getPreview();", "title": "" }, { "docid": "8abf8ef8d1a5c03909b22a165e9aaf4f", "score": "0.61811", "text": "function imagepicker_image_edit($img_id) {\n $content = _imagepicker_edit_img($img_id, 'iframe');\n theme('imagepicker', $content);\n}", "title": "" }, { "docid": "345cf4b9f7a6cfd61ab3f0435365c50e", "score": "0.6157098", "text": "function html_previewImage($r, $options=array()) {\n $options = array_merge(array('title' => $r->title, 'geometry' => $this->thumb_geometry), $options);\n return $this->htmlImage($r, $options);\n }", "title": "" }, { "docid": "cef816fd098ad46c764ea93e83f03746", "score": "0.6113063", "text": "public function getPreviewImage() {\n return $this->preview_image ?? \\App\\Support\\Helper::cdn('videos/default-preview-16-9.jpg');\n }", "title": "" }, { "docid": "021a49b15e3fe803779f64edf31ea9a1", "score": "0.6107887", "text": "public function setPreview($preview);", "title": "" }, { "docid": "f92424c59c7408ec2ab301c1cb15db34", "score": "0.6102364", "text": "public function get_preview()\n {\n return $this->_preview;\n }", "title": "" }, { "docid": "12941547a4c6a4104e4816fbffd0bf40", "score": "0.6017822", "text": "public function &previewObject()\n\t{\n\t\tinclude_once \"./Modules/SurveyQuestionPool/classes/class.SurveyQuestionGUI.php\";\n\t\t$q_gui =& SurveyQuestionGUI::_getQuestionGUI(\"\", $_GET[\"preview\"]);\n\t\t$this->ctrl->setParameterByClass(get_class($q_gui), \"sel_question_types\", $q_gui->getQuestionType());\n\t\t$this->ctrl->setParameterByClass(get_class($q_gui), \"q_id\", $_GET[\"preview\"]);\n\t\t$this->ctrl->redirectByClass(get_class($q_gui), \"preview\");\n\t}", "title": "" }, { "docid": "3b62d6a23d0aa512da18f33b045b598e", "score": "0.5928546", "text": "public function preview_image()\n {\n return 'cta-area/09.png';\n }", "title": "" }, { "docid": "282964667b3a3db725d7f1f880a2a5c8", "score": "0.5914993", "text": "function getVideoPreviewPic()\n\t{\n\t\treturn $this->video_preview_pic;\n\t}", "title": "" }, { "docid": "262ada9a03c5d9e70cd53e0884af3d6f", "score": "0.59101945", "text": "public function previewImage()\n {\n return $this->morphOne(Media::class, 'mediatable')->where('field', 'preview_image');\n }", "title": "" }, { "docid": "f85032cfeec38f994bbd5c3a0552ec9c", "score": "0.57831794", "text": "protected function staticPreview()\n {\n if ($this->staticPreview === false)\n return;\n\n // The $this->bag->previewImageURL check needs to be there only\n // for the img tag generation, and not for this entire method\n // because we want the outputImage div element to be generated\n // when static preview is enabled and JavaScript is disabled\n // because this div element provides a minimum height to the\n // output sheet. Without this element, the output sheet would\n // look ridiculously short.\n?><!-- MathB\\View::staticPreview -->\n <noscript>\n <div id=\"outputImage\">\n <?php if ($this->bag->previewImageURL !== '') { ?><!-- if { -->\n <img src=\"<?php echo $this->bag->previewImageURL ?>\"\n alt=\"Markdown, LaTeX and HTML rendered as image\">\n <?php } ?><!-- } -->\n </div>\n </noscript>\n<?php\n }", "title": "" }, { "docid": "a229f58bcf8cca3fe2b12b371f4d6ed4", "score": "0.57266676", "text": "static function html_preview_box() {\n\t\t\tob_start();\n\t\t\t?>\n\t\t\t<div class=\"panel panel-default collapse <?php echo PT_CV_PREFIX; ?>wrapper\" id=\"<?php echo PT_CV_PREFIX; ?>preview-box\"></div>\n\t\t\t<div class=\"text-center hidden\" style=\"position: absolute; left: 50%; top: 160px;\">\n\t\t\t\t<?php echo self::html_loading_img(); ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\treturn ob_get_clean();\n\t\t}", "title": "" }, { "docid": "145799dcaa54c2c7791e6fb738eb0632", "score": "0.5681014", "text": "public function getPreviewUrl(){\n return $this->getFileUrl(self::PREVIEW_BASENAME);\n }", "title": "" }, { "docid": "58699af018ecdec5da0267ba0cdcb874", "score": "0.5652795", "text": "public function show_image() {\n\n\t\techo $this->url;\n\t}", "title": "" }, { "docid": "8d1b9cd5d985d9711aa7617574c6a43a", "score": "0.56231993", "text": "public function action_preview_overlay() {\n if (!$this->request->is_ajax()) {\n Request::current()->redirect('error/not_found');\n }\n $question_id = $this->request->param('id');\n $ques_obj = Question::factory((int)$question_id); \n $question_partial = $ques_obj->render_question(true);\n $this->content = $question_partial;\n }", "title": "" }, { "docid": "2df47a7ad1643d02bf00fa7e8b832887", "score": "0.5518891", "text": "public function prepare_preview_image( $_filename )\n\t{\n\t\twxInitAllImageHandlers();\n\t\n\t\t$wxbitmap = new wxBitmap(\n\t\t\t$this->website_project->media_files_path .\n\t\t\tDIRECTORY_SEPARATOR .\n\t\t\t$_filename,\n\t\t\twxBITMAP_TYPE_ANY\n\t\t);\n\t\t\n\t\t$w = $wxbitmap->GetWidth();\n\t\t$h = $wxbitmap->GetHeight();\n\t\t\n\t\t$wximage = $wxbitmap->ConvertToImage();\n\t\t\n\t\tif( $w > $h )\n\t\t{\n\t\t\t$wximage = $wximage->Scale(\n\t\t\t\tDILL2_CORE_CONSTANT_PREVIEW_IMAGE_WIDTH,\n\t\t\t\tDILL2_CORE_CONSTANT_PREVIEW_IMAGE_HEIGHT\n\t\t\t);\n\t\t}\n\t\telse if ( $w < $h )\n\t\t{\n\t\t\t$wximage = $wximage->Scale(\n\t\t\t\tDILL2_CORE_CONSTANT_PREVIEW_IMAGE_HEIGHT, // width in this case!\n\t\t\t\tDILL2_CORE_CONSTANT_PREVIEW_IMAGE_WIDTH // height in this case!\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$wximage = $wximage->Scale(\n\t\t\t\tDILL2_CORE_CONSTANT_PREVIEW_IMAGE_WIDTH,\n\t\t\t\tDILL2_CORE_CONSTANT_PREVIEW_IMAGE_WIDTH // Using same value.\n\t\t\t);\n\t\t}\n\t\t\n\t\t$wxbitmap = new wxBitmap(\n\t\t\t$wximage\n\t\t);\t\t\n\t\t\n\t\t$this->wxstaticbitmap_picture_preview->SetBitmap(\n\t\t\t$wxbitmap\n\t\t);\n\t\t\n\t\t$this->wxpanel_picture_preview->Refresh();\n\t\t\t\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "dc4d394002268f99a0e490cf710ffa9c", "score": "0.55122644", "text": "function getImagePreview($id)\n\t{\n\t\t$result = mysql_query(\"SELECT * FROM images WHERE id='$id'\");\n\t\tif (!$result)\n\t\t\treturn ERROR_DB;\n\t\t\n\t\t$imagerow = mysql_fetch_array($result);\n\t\t$filepath = SITE_MEDIADIRECTORY . $imagerow['path'];\n\t\t\n\t\tif (!is_file($filepath))\n\t\t\treturn ERROR_NOFILE;\n\t\t\n\t\ttry {\n\t\t\t$image = new Imagick($filepath);\n\t\t} catch (ImagickException $e) {\n\t\t\treturn ERROR_OPENIMAGE;\n\t\t}\n\t\t\n\t\tif ($image->getImageWidth() > 450)\n\t\t\t$image->scaleImage(450, 0);\n\t\t\n\t\tif (!$image->writeImage(SITE_TOPDIRECTORY . \"admin/img/preview.jpg\"))\n\t\t\treturn ERROR_WRITEFILE;\n\t\t$image->destroy();\n\t\t\n\t\treturn '<a href=\"media/' . $imagerow['path'] . '\"><img src=\"admin/img/preview.php\" alt=\"' . htmlentities($imagerow['caption']) . '\"></a>';\n\t}", "title": "" }, { "docid": "df5ca8fa74777934aa1cf9b160c8ce11", "score": "0.55087703", "text": "public function getPreviewUrl(){\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7a59d67cfc4540e296f4ee184e37aa07", "score": "0.5489538", "text": "public function preview() {\n\t\tif ( ! $this->job_id ) {\n\t\t\tmlog()->warn( 'No listing id provided.' );\n\t\t\treturn;\n\t\t}\n\n\t\t// refresh cache for listing\n\t\t\\MyListing\\Src\\Listing::force_get( $this->job_id );\n\n\t\tglobal $post;\n\t\t$post = get_post( $this->job_id );\n\t\t$post->post_status = 'preview';\n\t\tsetup_postdata( $post );\n\t\tmylisting_locate_template( 'templates/add-listing/preview.php', [ 'form' => $this ] );\n\t\twp_reset_postdata();\n\t}", "title": "" }, { "docid": "a5cb5e2475a062095c58c0d72659fe75", "score": "0.5486908", "text": "public function add_preview($preview){\n $_SESSION['preview'] = $preview;\n }", "title": "" }, { "docid": "35adb17e0599b036c403742f84455ffc", "score": "0.54446405", "text": "function view(){\n\t\tglobal $img;\n\t\tob_start();\n\t\timagejpeg($img, NULL, 100);\n\t\t$rawImageBytes = ob_get_clean();\n\t\techo \"<img src='data:image/jpeg;base64,\" . base64_encode($rawImageBytes) . \"' height='700' width='550' />\";\n\t}", "title": "" }, { "docid": "5f62a292b70024f7e41d55164b8e1089", "score": "0.54280186", "text": "function show_featured_image($image = null, $n = null){\n global $post;\n $upload_link = esc_url(get_upload_iframe_src('image', $post->ID));\n\n $input_name = ($n !== null)?'featured-img-id['.$n.']':'featured-img-new';\n ob_start();\n ?>\n\n <div class=\"featured-image-container\">\n <div class=\"img-container\">\n <?php if ($image['have_img'] ) { ?>\n <img src=\"<?php echo $image['featured_image_src']; ?>\" alt=\"\" style=\"max-width:100%;\" />\n <?php } ?>\n </div>\n <p class=\"hide-if-no-js\">\n <a class=\"upload-img <?php if ($image['have_img']) { echo 'hidden'; } ?>\"\n href=\"<?php echo $upload_link ?>\">\n <?php _e('Set gallery image') ?>\n </a>\n <a class=\"delete-img <?php if (!$image['have_img']) {echo 'hidden';} ?>\"\n href=\"#\">\n <?php _e('Remove this image') ?>\n </a>\n </p>\n <input class=\"image-id\" name=\"<?php echo $input_name; ?>\" type=\"hidden\" value=\"<?php echo esc_attr( $image['featured_image_id'] ); ?>\" />\n </div>\n\n<?php\n return ob_get_clean();\n}", "title": "" }, { "docid": "febb795817d6eb40da811e1bf3a7430c", "score": "0.540885", "text": "function iphorm_preview()\n{\n if (isset($_GET['iphorm_preview']) && $_GET['iphorm_preview'] == 1 && !isset($_POST['iphorm_ajax']) && current_user_can('iphorm_preview_form')) {\n $form = null;\n if (isset($_GET['id'])) {\n $form = iphorm_get_form_config(absint($_GET['id']));\n }\n\n $previewL10n = array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n 'preview_not_loaded' => __('Sorry, the form preview could not be loaded.', 'iphorm')\n );\n\n include IPHORM_ADMIN_INCLUDES_DIR . '/preview.php';\n\n exit; // Prevent the rest of WP loading\n }\n}", "title": "" }, { "docid": "d3b69623b6cfe33379da771286e5ab26", "score": "0.5396968", "text": "public function preview($args) {\n }", "title": "" }, { "docid": "d3b69623b6cfe33379da771286e5ab26", "score": "0.5396968", "text": "public function preview($args) {\n }", "title": "" }, { "docid": "d3b69623b6cfe33379da771286e5ab26", "score": "0.5396968", "text": "public function preview($args) {\n }", "title": "" }, { "docid": "d3b69623b6cfe33379da771286e5ab26", "score": "0.5396968", "text": "public function preview($args) {\n }", "title": "" }, { "docid": "479b887c7ca4756c8ecb2c557faab69b", "score": "0.53877723", "text": "public function preview($id){\n\t\t$event = Event::with(['attributes',\n\t\t\t'venuePage' => function($query){\n\t\t\t\t$query->select('id','slug','name','main_image');\n\t\t\t},\n\t\t\t'creatorPage' => function($query){\n\t\t\t\t$query->select('id','slug','name','main_image');\n\t\t\t}\n\t\t\t])->withoutGlobalScope('published')->where('published', 0)->where('id', $id)->firstOrFail();\n\t\t$this->authorize('preview', $event);\n\n\t\treturn view('events.preview', compact('event'));\n\t}", "title": "" }, { "docid": "78cd6ed9fdc18f82e6d8e6ddcf1657a2", "score": "0.5369905", "text": "public function getPreviewUrlPath();", "title": "" }, { "docid": "c7993cd9f94c9f1a455f6fcdd2f7be55", "score": "0.535838", "text": "public function run()\n\t{\n\n\t\t$this->security_element_view();\n\t\tFileTransfer::singleton()->get_image_orig($this->value);\n\t}", "title": "" }, { "docid": "fa086806c513578a16344609b899925d", "score": "0.53478855", "text": "protected function preview()\n {\n return $this->objectUrl($this->value);\n }", "title": "" }, { "docid": "3ba933a3e6b0def1a10c74a7190fb3f3", "score": "0.5345672", "text": "public function renderPreview($url)\r\n\t{\r\n\t\t$path= realpath(implode('/', array(PICS_DIR,$url)));\r\n\t\tif( !strstr( $path, realpath(PICS_DIR)) or !file_exists($path))\r\n\t\t\tthrow new Nette\\Application\\BadRequestException;\r\n\t\t\r\n\t\t$filename= implode(\"/\", array(PICS_DIR, $url));\r\n\t\t$image = Image::fromFile($filename);\r\n\t\t\r\n\t\tif( FORCE_IMAGE_SIZE and ($image->width > IMAGE_SIZE or $image->height > IMAGE_SIZE) ){\r\n\t\t\t// Shrink upto FORCE_IMAGE_SIZExFORCE_IMAGE_SIZE\r\n\t\t\t$image->resize(IMAGE_SIZE, IMAGE_SIZE, Image::FIT);\r\n\t\t\t$image->save( $filename );\r\n\t\t\t$image = Image::fromFile($filename);\r\n\t\t}\r\n\t\t\r\n\t\t$image->send();\r\n\t}", "title": "" }, { "docid": "27513cac34d1760950d497fe70f0df9a", "score": "0.533324", "text": "function makeIframeForVisual($file,$path,$limitTags,$showOnly,$preview=0)\t{\r\n\t\t$url = 'index.php?mode=display'.\r\n\t\t\t\t'&file='.rawurlencode($file).\r\n\t\t\t\t'&path='.rawurlencode($path).\r\n\t\t\t\t'&preview='.($preview?1:0).\r\n\t\t\t\t($showOnly?'&show=1':'&limitTags='.rawurlencode($limitTags));\r\n\t\treturn '<iframe width=\"100%\" height=\"500\" src=\"'.htmlspecialchars($url).'#_MARKED_UP_ELEMENT\" style=\"border: 1xpx solid black;\"></iframe>';\r\n\t}", "title": "" }, { "docid": "30d8b234c4f037838f2d13ed9cf43cb0", "score": "0.53270304", "text": "function showimage(){\r\n\t}", "title": "" }, { "docid": "56233317a46ee861d126c6706eac8241", "score": "0.5316439", "text": "public function getPreviewImageLinkAttribute()\n {\n if ($this->previewImage) {\n return url('/storage'.$this->previewImage->file_url);\n }\n\n return null;\n }", "title": "" }, { "docid": "7f4f7aa99291e7a56fb9276090db23cd", "score": "0.5308233", "text": "public function imagechoser_media_browser($x){\n\t$errors = array();\n\t$id = 0;\n/* some stuff I didn't understand yet */\n\tif ( !empty($_POST['insertonlybutton']) ) {\n //echo '$_POST[ insertonlybutton ] = '.$_POST['html-upload']; \n\t}\n\n\tif ( !empty($_POST) ) {\n\t\t//$return = media_upload_form_handler();\n\n\t\tif ( is_string($return) )\n\t\t\treturn $return;\n\t\tif ( is_array($return) )\n\t\t\t$errors = $return;\n\t}\n\n\tif ( isset($_POST['save']) ) {\n $errors['upload_notice'] = __('Saved.');\n\t\treturn media_upload_gallery();\n\t}\n\n/* Its g3! So lets do something */\n\tif ( isset($_GET['tab']) && $_GET['tab'] == 'wpg3' )\n\t\treturn wp_iframe( array(&$this, 'media_upload_type_wpg3_form') , 'wpg3', $errors, $id );\n\n\treturn wp_iframe( 'media_upload_type_form', 'wpg3', $errors, $id );\n}", "title": "" }, { "docid": "d06a22840d22069a5556f96ab38f3c65", "score": "0.5295992", "text": "public function render_preview(moodle_page $page) {\n\t\t// TODO\n\t}", "title": "" }, { "docid": "7a891258b0db4433fd86453a33256fa6", "score": "0.5295111", "text": "function setVideoPreviewPic($a_val, $a_alt = \"\")\n\t{\n\t\t$this->video_preview_pic = $a_val;\n\t\t$this->video_preview_pic_alt = $a_alt;\n\t}", "title": "" }, { "docid": "b06e99978004f31d20e913b1b793e65e", "score": "0.5262067", "text": "public function ShortcodePreview ($atts) {\n\n $data = array ();\n $papers = $this->GetDailyPapers ();\n $today = date ($this->dateFormat, strtotime (\"today\"));\n\n if (isset ($papers [\"papers\"]) && isset ($papers [\"papers\"][0]) && isset ($papers [\"papers\"][0][\"images\"])) {\n $data [\"src\"] = (isset ($papers [\"papers\"][0][\"images\"][\"lg\"])) ? $papers [\"papers\"][0][\"images\"][\"lg\"] : $this->Config (\"url\", \"default-preview-thumbnail\");\n }\n\n $data [\"date\"] = (isset ($papers [\"date\"])) ? $papers [\"date\"] : $today;\n\n return $this->View (\"preview\", $data);\n\n }", "title": "" }, { "docid": "bc9d511d2564bd8fb47dbed700a39d2a", "score": "0.5247917", "text": "public function getPreview()\n {\n if (array_key_exists(\"preview\", $this->_propDict)) {\n return $this->_propDict[\"preview\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "c01acba8ffe4739a33750284a60c1102", "score": "0.52388525", "text": "public function getPreviewImage($attach_id)\n {\n $data = false;\n\n if ($attach_id > 0)\n {\n $data = $this->getImageSizes($attach_id, $this->preview_size); //wp_get_attachment_image_src($attach_id, $this->preview_size);\n $file = get_attached_file($attach_id);\n Log::addDebug('Attached File ' . $file, $data);\n\n\n }\n\n $mime_type = get_post_mime_type($attach_id);\n\n if (! is_array($data) || ! file_exists($file) )\n {\n // if attachid higher than zero ( exists ) but not the image, fail, that's an error state.\n $icon = ($attach_id < 0) ? '' : 'dashicons-no';\n $is_document = false;\n\n $args = array(\n 'width' => $this->preview_width,\n 'height' => $this->preview_height,\n 'is_image' => false,\n 'is_document' => $is_document,\n 'icon' => $icon,\n );\n\n // failed, it might be this server doens't support PDF thumbnails. Fallback to File preview.\n if ($mime_type == 'application/pdf')\n {\n return $this->getPreviewFile($attach_id);\n }\n\n return $this->getPlaceHolder($args);\n }\n\n $url = $data[0];\n $width = $data[1];\n $height = $data[2];\n\n // SVG's without any helpers return around 0 for width / height. Fix preview.\n\n // preview width, if source if found, should be set to source.\n $this->preview_width = $width;\n $this->preview_height = $height;\n\n\n if ($width > $this->preview_max_width)\n $width = $this->preview_max_width;\n if ($height > $this->preview_max_height)\n $height = $this->preview_max_height;\n\n $image = \"<img src='$url' width='$width' height='$height' class='image' style='max-width:100%; max-height: 100%;' />\";\n\n $args = array(\n 'width' => $width,\n 'height' => $height,\n 'image' => $image,\n 'mime_type' => $mime_type,\n );\n\n $output = $this->getPlaceHolder($args);\n return $output;\n }", "title": "" }, { "docid": "5674a22ad7653eb5487c130008a456e6", "score": "0.5208233", "text": "public static function iframeIcon($imageUrl,$attributes,$defaultConfig=self::STDDIALOGATTRIBUTES)\n {\n self::dialogIcon($imageUrl,self::TYPEIFRAME,$attributes,$defaultConfig);\n }", "title": "" }, { "docid": "8f2766b304b998e791ee1d620fbd36c6", "score": "0.51412606", "text": "public function getPreviewAttribute()\n {\n foreach ($this->blocks as $b) {\n if($b->type == 0) {\n $preview=$b->content['image'];\n\n return '/storage/app/public'.$preview;\n }\n }\n }", "title": "" }, { "docid": "f9dbffd977f2841e3d03c5c4271827c6", "score": "0.5138097", "text": "function preview($estimate_id = 0, $show_close_preview = false) {\n\n $view_data = array();\n\n if ($estimate_id) {\n\n $estimate_data = get_estimate_making_data($estimate_id);\n $this->_check_estimate_access_permission($estimate_data);\n\n //get the label of the estimate\n $estimate_info = get_array_value($estimate_data, \"estimate_info\");\n $estimate_data['estimate_status_label'] = $this->_get_estimate_status_label($estimate_info);\n\n $view_data['estimate_preview'] = prepare_estimate_pdf($estimate_data, \"html\");\n\n //show a back button\n $view_data['show_close_preview'] = $show_close_preview && $this->login_user->user_type === \"staff\" ? true : false;\n\n $view_data['estimate_id'] = $estimate_id;\n\n $this->template->rander(\"estimates/estimate_preview\", $view_data);\n } else {\n show_404();\n }\n }", "title": "" }, { "docid": "692179f7635d1f67efc794970b891484", "score": "0.5137453", "text": "public function preview()\n {\n return view('admin.preview');\n }", "title": "" }, { "docid": "1bf85568c9c2c30612f659543d8db2ac", "score": "0.5135622", "text": "public function preview($args) {\n \n if (filter_var($args['video'], FILTER_VALIDATE_URL)) {\n $video = '<div>\n <p class=\"previmg\"><video controls=\"true\" style=\"width:100%;height:300px\"><source src=\"' . $args[\"video\"] . '\" type=\"video/mp4\" /></video></p>\n <p class=\"prevtext\"></p>\n </div>';\n } else {\n \n return (object) ['info' => '<div class=\"col-lg-12 merror\"><p><i class=\"fa fa-exclamation-triangle\" aria-hidden=\"true\"></i> ' . display_mess(130) . '</p></div>'];\n \n }\n \n return (object) [\n 'name' => 'youtube',\n 'icon' => '<button type=\"button\" class=\"btn btn-network-y\"><i class=\"fa fa-youtube\"></i><span data-network=\"youtube\"><i class=\"fa fa-times\"></i></span></button>',\n 'head' => '<li class=\"youtube\"><a href=\"#youtube\" data-toggle=\"tab\"><i class=\"fa fa-youtube\"></i></li>',\n 'content' => '<div class=\"tab-pane\" id=\"youtube\">\n <div class=\"youtube forall\">\n ' . $video . '\n </div>\n </div>'\n ];\n \n }", "title": "" }, { "docid": "6fe4fba7d20996094f7feb70cf45d9e9", "score": "0.5126992", "text": "public function setPreview($val)\n {\n $this->_propDict[\"preview\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "225ac6450f4b8b2cf5f92637a5f46f40", "score": "0.51242095", "text": "public function withPreview()\n {\n $this->withPreview = true;\n\n return $this;\n }", "title": "" }, { "docid": "bd1de322692a778db7cb4bd22bd57c10", "score": "0.51237655", "text": "public function getPreviewUrl(){\n\t\treturn parent::getPreviewUrl();\n\t\t// REST: http[s]://www.veoh.com/rest/v2/execute.xml?method=veoh.video.getVideoThumbnails\n\t\t// http://p-images.veoh.com/image.out?imageId=thumb-v891059AqzRAHhs-5.jpg\n\t\t// www.veoh.com/rest/video/v891059AqzRAHhs/details\n\t\tif ($videoId = $this->getVideoId()){\n\t\t\tif ($info = simplexml_load_file('http://www.veoh.com/rest/video/'.$videoId.'/details')){\n\t\t\t\t$video = $info->xpath('//video');\n\t\t\t\treturn strval($video['fullHighResImagePath']);\n\t\t\t}\n\t\t\treturn 'http://p-images.veoh.com/image.out?imageId=thumb-'.$videoId.'-30.jpg';\n\t\t}\n\t\treturn parent::getPreviewUrl();\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3a246f30dc47b7df43d7b80333e953a8", "score": "0.51091486", "text": "function html_previewYoutube($r, $options=array()) {\n if ($r->error)\n return '';\n if (isset($options['geometry']))\n list($width, $height) = explode('x', str_replace('>', '', $options['geometry']));\n else\n $width = $height = TZR_THUMB_SIZE;\n $margin = (int) -($width * $r->preview['height']/$r->preview['width'] - $height) /2;\n return '<div style=\"width:'.$width.'px;height:'.$height.'px;overflow:hidden;display:inline\"><img src=\"'.$r->preview['url'].'\" alt=\"'.$r->title.'\" width=\"'.$width.'\" class=\"tzr-externalfile\" rel=\"'.$r->file.'\"'.($margin<0?'style=\"margin-top:'.$margin.'px\"':'').'></div>';\n }", "title": "" }, { "docid": "6d8a3baefa15d091f2030a0e4be862d2", "score": "0.5099951", "text": "public function show()\n {\n $this->subscribe();\n \n header('Content-type: image/png');\n imagejpeg($this->image);\n \n imagedestroy($this->image);\n }", "title": "" }, { "docid": "7fd650e8fb91ab4b570d87b3bc0000e1", "score": "0.5074646", "text": "function qtag_FILE_PREVIEW($env, $target, &$attributes) {\n $node = empty($attributes['node']) ? NodeFactory::current($env) : NodeFactory::load($env, $attributes['node']);\n if (isset($attributes['tmp_path'])) {\n $target = $env->dir['tmp'] . '/files/' . $attributes['tmp_path'] . '/' . $target;\n $node->setName(NODE_NEW);\n }\n\n $file = new FileObject($env, $target, NODE_NEW);\n $preview = '';\n switch($file->getType()) {\n case 'image':\n $attributes['150x150'] = TRUE;\n $attributes['node'] = $node->getName();\n $preview = qtag_IMGTHUMB($env, $target, $attributes);\n break;\n\n default:\n break;\n }\n\n return '<div class=\"file-preview-item file-' . $file->getType() . '\">' . $preview . '</div>';\n}", "title": "" }, { "docid": "5486cdc4d4276797eaff16fb672b40ab", "score": "0.5050498", "text": "static function get_preview( $settings = array() ){\n\t\t\t\t$content = self::get_content($settings);\n\t\t\t\treturn $content;\n\t\t\t}", "title": "" }, { "docid": "8a2ce6726c8be897497bb119ad24a395", "score": "0.5048197", "text": "public function livepreview()\n\t{\n\t\tif ( isset($_POST['siteID']) && $_POST['siteID'] != '' ) {\n\t\t\t$siteData = $this->sitemodel->siteData( $_POST['siteID'] );\n\t\t}\n\n\t\t$meta = '';\n\t\t// Page title\n\t\tif ( isset($_POST['meta_title']) && $_POST['meta_title'] != '' ) {\n\t\t\t$meta .= '<title>' . $_POST['meta_title'] . '</title>' . \"\\n\";\n\t\t}\n\t\t// Page meta description\n\t\tif ( isset($_POST['meta_description']) && $_POST['meta_description'] != '' ) {\n\t\t\t$meta .= '<meta name=\"description\" content=\"' . $_POST['meta_description'] . '\"/>' . \"\\n\";\n\t\t}\n\t\t// Page meta keywords\n\t\tif ( isset($_POST['meta_keywords']) && $_POST['meta_keywords'] != '' ) {\n\t\t\t$meta .= '<meta name=\"keywords\" content=\"' . $_POST['meta_keywords'] . '\"/>' . \"\\n\";\n\t\t}\n\t\t// Replace meta value\n\t\t$content = str_replace('<!--pageMeta-->', $meta, \"<!DOCTYPE html>\\n\" . $_POST['page']);\n\n\t\t$head = '';\n\t\t// Page header includes\n\t\tif ( isset($_POST['header_includes']) && $_POST['header_includes'] != '' ) {\n\t\t\t$head .= $_POST['header_includes'] . \"\\n\";\n\t\t}\n\t\t// Page css\n\t\tif ( isset($_POST['page_css']) && $_POST['page_css'] != '' ) {\n\t\t\t$head .= \"\\n<style>\" . $_POST['page_css'] . \"</style>\\n\";\n\t\t}\n\t\t// Global css\n\t\tif( $siteData->global_css != '' ) {\n\t\t\t$head .= \"\\n<style>\" . $siteData->global_css . \"</style>\\n\";\n\t\t}\n\n // Custom header to deal with XSS protection\n header(\"X-XSS-Protection: 0\");\n\t\techo str_replace('<!--headerIncludes-->', $head, $content);\n\t}", "title": "" }, { "docid": "e5a9420b834f3ae18b231bc2d49dceb2", "score": "0.50458264", "text": "function preview($popup = '') {\r\n\t\t\t\tglobal $database;\r\n\t\t\t\t$sql = \"SELECT template FROM #__templates_menu WHERE client_id = 0 AND menuid = 0\";\r\n\t\t\t\t$database->setQuery($sql);\r\n\t\t\t\t$cur_template = $database->loadResult();\r\n\r\n\t\t\t\t$image = mosAdminMenus::ImageCheck('preview_f2.png','images/system/',null,null,'Просмотр','preview',1);\r\n\t\t\t\t?>\r\n\t\t<td>\r\n\t\t\t<a class=\"toolbar\" href=\"#\" onclick=\"window.open('popups/<?php echo $popup; ?>.php?t=<?php echo $cur_template; ?>', 'win1', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');\" ><?php echo $image; ?></a>\r\n\t\t</td>\r\n\t\t\t\t<?php\r\n\t\t\t}", "title": "" }, { "docid": "68098c755c6230ef6082fadd8399e9c5", "score": "0.50360113", "text": "function seminars_form_build_preview() {\n}", "title": "" }, { "docid": "5480a43b066f0bdd3f9385693196bdb9", "score": "0.50233936", "text": "function media_upload_type_wikimedia() {\r\n\t\tglobal $post_ID, $temp_ID;\r\n\t\t$uploading_iframe_ID = (int) (0 == $post_ID ? $temp_ID : $post_ID);\r\n\t\t$media_upload_iframe_src = \"media-upload.php?post_id=$uploading_iframe_ID\";\r\n\t\t$media_wikimedia_iframe_src = apply_filters('media_wikimedia_iframe_src', \"$media_upload_iframe_src&amp;type=wikimedia&amp;tab=wikimedia\");\r\n\t\tmedia_upload_header();\r\n\t\tini_set ('user_agent', '”Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)”');\r\n\r\n\t\t?>\r\n\t\t<!-- STYLE CSS WIKIMEDIA TAB -->\r\n\t\t<style type=\"text/css\">\r\n\t\t.wikimedia_photo {\r\n\t\t\twidth: 90px;\r\n\t\t\tpadding: 5px 7px;\r\n\t\t\tfloat: left;\r\n\t\t\theight: 110px;\r\n\t\t}\r\n\t\t.wikimedia_image {\r\n\t\t\tborder: 0px;\r\n\t\t\twidth: 75px;\r\n\t\t\theight: 75px;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\t\ttable#tabwikimedia\r\n\t\t{\r\n\t\t\tborder-collapse: separate;\r\n\t\t\tborder-spacing: 5px 5px;\r\n\t\t\ttext-align: center;\r\n\t\t}\r\n\t\t#search-filter label {\r\n\t\t\tdisplay: inline;\r\n\t\t\tfont-size: 80%;\r\n\t\t\t\r\n\t\t}\r\n\t\tvar uploadID = ''; /*setup the var*/\r\n\t\t</style>\r\n\t\t<script type=\"text/javascript\" src=\"http://code.jquery.com/jquery-latest.js\"></script>\r\n\t\t<!-- SCRIPT TO SEND AREA WORDPRESS -->\r\n\t\t<script type=\"text/javascript\">\r\n\t\tfunction send_to_editor(close) {\r\n\t\t\t\r\n\t\t\tvar titre = document.getElementById('img_title').value;\r\n\t\t\tvar alt = document.getElementById('img_alt').value;\r\n\t\t\tvar legende = document.getElementById('img_cap').value;\r\n\t\t\tvar link = document.getElementById('link_hrefimage').value;\r\n\t\t\tvar link2 = document.getElementById('link_hreflicence').value;\r\n\t\t\tvar taille;\r\n\t\t\tvar align;\r\n\t\t\tvar image;\r\n\t\t\t\r\n\t\t\t// TAILLE ET ALIGNEMENT\r\n\t\t\tvar inputs = document.getElementsByTagName('input'),\r\n\t\t\t inputsLength = inputs.length;\r\n\t\t\tvar j =0\r\n\t\t\tfor (var i = 0 ; i < inputsLength ; i++) {\r\n\t\t\t if (inputs[i].type == 'radio' && inputs[i].checked) {\r\n\t\t\t\tif(j==0)\r\n\t\t\t\t{\r\n\t\t\t\t taille = inputs[i].value;\r\n\t\t\t\t j++;\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t\talign = inputs[i].value;\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvar ed;\r\n\t\t\tvar total = \"<div class=\\\"wp-caption \" + align + \"\\\">\";\r\n\t\t\t\ttotal = total + \"<p><a href=\\\"\" + link + \"\\\"><img title=\\\"\" + titre + \"\\\" src=\\\"\" + taille + \"\\\" alt=\\\"\" + alt + \"\\\"></a></p>\";\r\n\r\n\t\t\ttotal = total + \"<p class=\\\"wp-caption-text\\\"><a href=\\\"\" + link + \"\\\">\" + legende + \"</a></p></div>\";\r\n\t\t\timage = total;\r\n\t\t\tif ( typeof top.tinyMCE != 'undefined' && ( ed = top.tinyMCE.activeEditor ) && !ed.isHidden() ) {\r\n\t\t\t\t// restore caret position on IE\r\n\t\t\t\tif ( top.tinymce.isIE && ed.windowManager.insertimagebookmark )\r\n\t\t\t\t\ted.selection.moveToBookmark(ed.windowManager.insertimagebookmark);\r\n\r\n\t\t\t\tif ( image.indexOf('[caption') === 0 ) {\r\n\t\t\t\t\tif ( ed.plugins.wpeditimage )\r\n\t\t\t\t\t\timage = ed.plugins.wpeditimage._do_shcode(image);\r\n\t\t\t\t} else if ( image.indexOf('[gallery') === 0 ) {\r\n\t\t\t\t\tif ( ed.plugins.wpgallery )\r\n\t\t\t\t\t\timage = ed.plugins.wpgallery._do_gallery(image);\r\n\t\t\t\t} else if ( image.indexOf('[embed') === 0 ) {\r\n\t\t\t\t\tif ( ed.plugins.wordpress )\r\n\t\t\t\t\t\timage = ed.plugins.wordpress._setEmbed(image);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ted.execCommand('mceInsertContent', false, image);\r\n\t\t\t\t$('iframe#tinymce:first').contents().find('img').each(function() { this.src = this.src });\r\n\r\n\t\t\t} else if ( typeof top.edInsertContent == 'function' ) {\r\n\t\t\t\ttop.edInsertContent(top.edCanvas, image);\r\n\t\t\t} else {\r\n\t\t\t\ttop.jQuery( top.edCanvas ).val( top.jQuery( top.edCanvas ).val() + image );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(close) {\r\n\t\t\t\ttop.tb_remove();\r\n\t\t\t}\r\n\t\t}\r\n\t\t</script>\r\n\t\t\r\n\t\t\r\n\t\t<?php\r\n\t\tif(!isset($_GET['fichier']))\r\n\t\t{\r\n\t\t\t// CREATION LIEN DE RECHERCHE\r\n\t\t\t$recherche = \"wikimedia\";\r\n\t\t\tif(isset($_GET['recherche']))\r\n\t\t\t\t$recherche = $_GET['recherche'];\r\n\t\t\tif(isset($_POST['recherche']))\r\n\t\t\t\t$recherche = $_POST['recherche'];\r\n\t\t\t\t\r\n\t\t\t$recherche = str_replace(' ', '%20', $recherche);\r\n\t\t\t$adresse = \"http://commons.wikimedia.org/w/api.php?action=query&list=allimages&format=xml&aifrom=\" . $recherche . \"&ailimit=500&aiprop=url|dimensions\";\t\r\n\t\t\t\r\n\t\t\t//RECUPERATION DU XML\r\n\t\t\t$page = file_get_contents($adresse);\r\n\t\t\t\r\n\t\t\tif(!$result = simplexml_load_string($page))\r\n\t\t\t{\r\n\t\t\t\techo '<p> Erreur, veuiller mettre un user agent dans php.ini </p>';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\r\n\t\t\t\techo '<p></p><div id=\"search-filter\">\r\n\t\t\t\t\t\t<form method=\"post\" action=\"\">\r\n\t\t\t\t\t\t<input type=\"text\" name=\"recherche\" align=\"rigth\" /><input type=\"submit\" value=\"Recherche\" class=\"button\" align=\"rigth\"/>\r\n\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t</div>';\r\n\t\t\t\techo '<table name=\"tabwikimedia\" id=\"tabwikimedia\" align=\"center\"><tr>';\r\n\t\t\t\t\r\n\t\t\t\t//si on est dans une page sup a 1...\r\n\t\t\t\tif(isset($_GET['next']) && !isset($_POST['recherche']))\r\n\t\t\t\t\t$debut = intval($_GET['next']);\r\n\t\t\t\telse\r\n\t\t\t\t\t$debut = 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$result = $result->query[0]->allimages[0];\r\n\t\t\t\tfor($i=$debut*20, $col=0;$result->img[$i] && $i<($debut*20)+20;$i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$descriptionurl =$result->img[$i]['descriptionurl'];\r\n\t\t\t\t\t$url = $result->img[$i]['url'];\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//AFFICHAGE DES NOMS DE FICHIERS\r\n\t\t\t\t\tif($col == 4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\techo '</tr><tr>';\r\n\t\t\t\t\t\tfor($j=$i-$col;$j<$i;$j++)\r\n\t\t\t\t\t\t\techo '<td>' . wordwrap($result->img[$j]['name'], 20, '<br />', true) . '</td>';\r\n\t\t\t\t\t\techo '</tr><tr>';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$col = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//VERIFICATION TAILLE IMAGE ET CREATION LIEN IMAGE\r\n\t\t\t\t\tif(intval($result->img[$j]['width'])>120 && intval($result->img[$j]['heigth'] > 120))\r\n\t\t\t\t\t\t$img = substr($url, 0 , strpos($url, 'commons/') + 8) \r\n\t\t\t\t\t\t\t\t\t\t. 'thumb/' . substr($url, strpos($url, 'commons/')+8) . '/120px-' . $result->img[$i]['name'];\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$img = $url;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t//SUPPERSSION CARACTERE GENANT\r\n\t\t\t\t\t$descriptionurl = str_replace('\\\\', '', $descriptionurl);\r\n\t\t\t\t\t$url = str_replace('\\\\', '', $url);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//AFFICHAGE IMAGE\r\n\t\t\t\t\techo '<td name =\"tdwiki\" id=\"tdwiki\"><a href=\"' . $media_wikimedia_iframe_src . '&amp;TB_iframe=true&amp;height=500&amp;width=640&amp;licence=' . $descriptionurl . '&amp;fichier='. $url. '&amp;name=' . $result->img[$i]['name'] . '\"><img src=\"' . $img . '\" class=\"wikimedia_image\" ></a></td>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t//AFFICHAGE DERNIERE LIGNE TABLEAU\r\n\t\t\t\t\tif(($i - $debut*20) == 19)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\techo '</tr><tr>';\r\n\t\t\t\t\t\tfor($j=$i-$col-1;$j<$i;$j++)\r\n\t\t\t\t\t\t\techo '<td>' . wordwrap($result->img[$j]['name'], 20, '<br />', true) . '</td>';\r\n\t\t\t\t\t\techo '</tr></table>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$col++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//LIEN SUIVANT PRECEDENT\r\n\t\t\t\techo '<table width=\"96%\"><tr><td align=\"left\">&nbsp;&nbsp;&nbsp;&nbsp;';\r\n\t\t\t\tif(isset($_GET['next']) && intval($_GET['next']) -1>=0)\r\n\t\t\t\t{\r\n\t\t\t\t\techo '<a href=\"' . $media_wikimedia_iframe_src . '&amp;TB_iframe=true&amp;height=500&amp;width=640&amp;next=' . (intval($_GET['next']) -1) . '&amp;recherche=' . $recherche . '\">' . utf8_encode('Précèdent') . '</a>';\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\techo '</td><td align=\"right\">';\r\n\t\t\t\techo '<a href=\"' . $media_wikimedia_iframe_src . '&amp;TB_iframe=true&amp;height=500&amp;width=640&amp;next=' . (intval($_GET['next']) +1) . '&amp;recherche=' . $recherche . '\" align=\"right\" >Suivant</a>';\r\n\t\t\t\techo '</td></tr></table>'; \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t//IMAGE SELECTIONNEE\r\n\t\t\t\r\n\t\t\t//SUPPRESSION CARACTERE GENANT\r\n\t\t\t$_GET['fichier'] = str_replace('\\\\', '', $_GET['fichier']);\r\n\t\t\t$_GET['licence'] = str_replace('\\\\', '', $_GET['licence']);\r\n\t\t\t$_GET['name'] = str_replace('\\\\', '', $_GET['name']);\r\n\t\t\t\r\n\t\t\t//RECUPERATION PAGE DE DESCRIPTION\r\n\t\t\t$page1 = file_get_contents($_GET['licence']);\r\n\t\t\t\r\n\t\t\t//RECHERCHE LICENCE PAR XPATH\r\n\t\t\t$doc = new DOMDocument();\r\n\t\t\t$doc->loadHTMLFile($_GET['licence']);\r\n\t\t\r\n\t\t\t$xpath = new DOMXpath($doc);\r\n\t\t\r\n\t\t\t$elements = $xpath->query(\"//span[@class='licensetpl_short']\");\r\n\t\t\t$lic = \"\";\r\n\t\t\tif (!is_null($elements)) {\r\n\t\t\t\tforeach ($elements as $element) {\t\r\n\t\t\t\t\t$nodes = $element->childNodes;\r\n\t\t\t\t\tforeach ($nodes as $node) {\r\n\t\t\t\t\t\t$lic .= $node->nodeValue. \" - \";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//RECHERCHE FULL RESOLUTION PAR XPATH\r\n\t\t\t$elements = $xpath->query(\"//div[@class='fullMedia']/a/@href\");\r\n\t\t\r\n\t\t\tif (!is_null($elements)) {\r\n\t\t\t\tforeach ($elements as $element) {\r\n\t\t\t\t\t$nodes = $element->childNodes;\r\n\t\t\t\t\tforeach ($nodes as $node) {\r\n\t\t\t\t\t\t$fullresol = 'http:'. trim($node->nodeValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//RECHERCHE OTHERS RESOLUTIONS\r\n\r\n\t\t\t//tableau de liens de toutes les resolutions\r\n\t\t\t$othresol = array();\r\n\t\t\t\r\n\t\t\t$elements = $xpath->query(\"//span[@class='mw-filepage-other-resolutions']/a/@href\");\r\n\t\t\tif (!is_null($elements)) {\r\n\t\t\t\tforeach ($elements as $element) {\r\n\t\t\t\t\t$nodes = $element->childNodes;\r\n\t\t\t\t\tforeach ($nodes as $node) {\r\n\t\t\t\t\t\t$othresol[] = 'http:'. trim($node->nodeValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//tableau de nom de resolution\r\n\t\t\t$othresolname = array();\r\n\t\t\t\r\n\t\t\t$elements = $xpath->query(\"//span[@class='mw-filepage-other-resolutions']/a\");\r\n\t\t\tif (!is_null($elements)) {\r\n\t\t\t\tforeach ($elements as $element) {\r\n\t\t\t\t\t$nodes = $element->childNodes;\r\n\t\t\t\t\tforeach ($nodes as $node) {\r\n\t\t\t\t\t\t$othresolname[] = trim($node->nodeValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//AFFICHAGE DE L'IMAGE\r\n\t\t\tif($othresol[0]) // SI il esiste d'autre resolution...\r\n\t\t\t\techo '<p><img src=\"' . $othresol[0] . '\" align=\"center\"></p>';\r\n\t\t\telse // Sinon on affiche resolution full\r\n\t\t\t\techo '<p><img src=\"' . $_GET['fichier'] . '\"></p>';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t?>\r\n\t\t\t\t<div id=\"div_basic\">\r\n\t\t\t\t<table id=\"basic\" class=\"describe\">\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th valign=\"top\" scope=\"row\" class=\"label\">\r\n\t\t\t\t\t\t<label for=\"img_alt\">\r\n\t\t\t\t\t\t\t<span class=\"alignleft\"><?php echo utf8_encode(\"Résolution\");?></span>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<td class=\"field\">\r\n\t\t\t\t\t\t\t<?php \r\n\t\t\t\t\t\t\t$check =false;\r\n\t\t\t\t\t\t\tfor($i=0;$i<sizeof($othresol);$i++)\r\n\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\tif($i==0)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"img_res\" id=\"img_res' . $i .'\" value=\"' . $othresol[$i] . '\" CHECKED/>\r\n\t\t\t\t\t\t\t\t\t<label for=\"alignnone\">' . $othresolname[$i] . '&nbsp;&nbsp;&nbsp;</label>';\r\n\t\t\t\t\t\t\t\t\t$check = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"img_res\" id=\"img_res' . $i .'\" value=\"' . $othresol[$i] . '\"/>\r\n\t\t\t\t\t\t\t\t\t<label for=\"alignnone\">' . $othresolname[$i] . '&nbsp;&nbsp;&nbsp;</label>';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif($check)\r\n\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"img_res\" id=\"img_res' . 'full' .'\" value=\"' . $fullresol . '\"/>\r\n\t\t\t\t\t\t\t\t\t<label for=\"alignnone\">' . 'full resolution' . '&nbsp;&nbsp;&nbsp;</label>';\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"img_res\" id=\"img_res' . 'full' .'\" value=\"' . $fullresol . '\" CHECKED/>\r\n\t\t\t\t\t\t\t\t\t<label for=\"alignnone\">' . 'full resolution' . '&nbsp;&nbsp;&nbsp;</label>';\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr class=\"align\">\r\n\t\t\t\t\t\t<th valign=\"top\" scope=\"row\" class=\"label\">\r\n\t\t\t\t\t\t<label for=\"img_align_td\">\r\n\t\t\t\t\t\t\t<span class=\"alignleft\">Alignement</span>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<td class=\"field\" id=\"img_align_td\">\r\n\t\t\t\t\t\t\t<input type=\"radio\" onclick=\"wpImage.imgAlignCls('alignnone')\" name=\"img_align\" id=\"alignnone\" value=\"alignnone\" CHECKED/>\r\n\t\t\t\t\t\t\t<label for=\"alignnone\" class=\"align image-align-none-label\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Aucun</label>\r\n\t\t\t\t\t\t\t<input type=\"radio\" onclick=\"wpImage.imgAlignCls('alignleft')\" name=\"img_align\" id=\"alignleft\" value=\"alignleft\"/>\r\n\t\t\t\t\t\t\t<label for=\"alignleft\" class=\"align image-align-left-label\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gauche</label>\r\n\t\t\t\t\t\t\t<input type=\"radio\" onclick=\"wpImage.imgAlignCls('aligncenter')\" name=\"img_align\" id=\"aligncenter\" value=\"aligncenter\"/>\r\n\t\t\t\t\t\t\t<label for=\"aligncenter\" class=\"align image-align-center-label\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Centre</label>\r\n\t\t\t\t\t\t\t<input type=\"radio\" onclick=\"wpImage.imgAlignCls('alignright')\" name=\"img_align\" id=\"alignright\" value=\"alignright\"/>\r\n\t\t\t\t\t\t\t<label for=\"alignright\" class=\"align image-align-right-label\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Droite</label>\r\n\t\t\t\t\t\t</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<th valign=\"top\" scope=\"row\" class=\"label\">\r\n\t\t\t\t\t\t<label for=\"img_title\">\r\n\t\t\t\t\t\t\t<span class=\"alignleft\">Titre</span>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<td class=\"field\">\r\n\t\t\t\t\t\t\t<input type=\"text\" id=\"img_title\" name=\"img_title\" value=\"<?php echo $_GET['name']; ?>\" aria-required=\"true\" size=\"60\"/>\r\n\t\t\t\t\t\t</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<th valign=\"top\" scope=\"row\" class=\"label\">\r\n\t\t\t\t\t\t<label for=\"img_alt\">\r\n\t\t\t\t\t\t\t<span class=\"alignleft\">Texte alternatif</span>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<td class=\"field\">\r\n\t\t\t\t\t\t\t<input type=\"text\" id=\"img_alt\" name=\"img_alt\" value=\"\" size=\"60\"/>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr id=\"cap_field\">\r\n\t\t\t\t\t\t<th valign=\"top\" scope=\"row\" class=\"label\">\r\n\t\t\t\t\t\t\t<label for=\"img_cap\">\r\n\t\t\t\t\t\t\t\t<span class=\"alignleft\"><?php echo utf8_encode('Légende'); ?> </span>\r\n\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<td class=\"field\">\r\n\t\t\t\t\t\t\t<input type=\"text\" id=\"img_cap\" name=\"img_cap\" value=\"<?php echo $lic; ?>\" size=\"60\"/>\r\n\t\t\t\t\t\t</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<th valign=\"top\" scope=\"row\" class=\"label\">\r\n\t\t\t\t\t\t\t<label for=\"link_href\">\r\n\t\t\t\t\t\t\t<span class=\"alignleft\" id=\"lb_link_href\">Cible du lien</span>\r\n\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<td class=\"field\">\r\n\t\t\t\t\t\t\t<input type=\"text\" id=\"link_hrefimage\" name=\"link_hrefimage\" value=\"<?php echo $_GET['licence'];?>\" size=\"60\"/>\r\n\t\t\t\t\t\t\t<input type=\"hidden\" id=\"link_hreflicence\" name=\"link_hreflicence\" value=\"<?php echo $_GET['licence'];?>\"/>\r\n\t\t\t\t\t\t\t<input type=\"hidden\" id=\"link_hreffichier\" name=\"link_hreffichier\" value=\"<?php echo $_GET['fichier'];?>\"/>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<br/>\r\n\t\t\t\t\t\t\t<p class=\"help\">Saisissez une adresse web </p>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t</div>\r\n\t\t\t<?php\r\n\t\t\techo '<input type=\"submit\" value=\"Insert\" onclick=\"send_to_editor(1)\">';\r\n\t\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "404992858eb25ece35b65e2df5792f10", "score": "0.5015336", "text": "public function getPreviewLink()\n {\n return get_preview_post_link($this->id);\n }", "title": "" }, { "docid": "fbcf1d309ca040c8be4779d716d7ecf6", "score": "0.50147414", "text": "public function showImage(){\n $path = \"src='$this->imageName'\";\n BreakLine::br(3);\n echo $image = \"<img $path />\";\n }", "title": "" }, { "docid": "b6134b251ad0f606f8eac3b465c09f1d", "score": "0.5004198", "text": "public function action_iframe_transport()\n {\n $this->response->headers('Content-type', 'text/html');\n $this->data = View::factory('system/blueimpuploader_iframe_transport');\n }", "title": "" }, { "docid": "53c483fa79d5633756d4f09bfdbc430b", "score": "0.50003314", "text": "private function _get_preview_url($server_url, $form_id)\n {\n return $this->_get_base_url().'/webform/preview?server='.$server_url.'&id='.$form_id;\n }", "title": "" }, { "docid": "e89d7cf3bc32d256ba3bef3c77336fa1", "score": "0.4998504", "text": "public function getPreview($config)\n\t{\n\t\tif ($this->_image === false)\n\t\t\t$this->_image = UploadedFile::model()->findByPk($this->image_id);\n\n\t\tif (!is_null($this->_image)) {\n\t\t\t$preview = $this->_image->getPreviewName($config, 'interiorContent');\n return $preview;\n\t\t}\n\t\t$name = $config[0].'x'.$config[1];\n\n\t\treturn UploadedFile::getDefaultImage('interiorContent', $name);\n\t}", "title": "" }, { "docid": "25610fac14758d419c29172c208675f7", "score": "0.499269", "text": "public static function addPreviewPage() {\n add_filter('query_vars', function ($vars) {\n $vars[] = 'theme-styleguide-preview';\n\n return $vars;\n });\n\n add_action('template_redirect', function() {\n global $wp_query;\n\n if (false === get_query_var('theme-styleguide-preview', false)) {\n return;\n }\n\n View::show('preview/preview', [\n 'preview' => $preview\n ]);\n exit();\n });\n }", "title": "" }, { "docid": "7fdde90ed673aac1f017dd8f87a46ce3", "score": "0.4986035", "text": "public function preview_input(){\n\n return view('preview2');\n }", "title": "" }, { "docid": "31fbab4c2c291f2f0d97758ce493f2e7", "score": "0.4981763", "text": "public static function PreviewFile($path, $mime, $iframe = false) {\n $src = self::buildPath($path);\n if ( $src[\"perm\"] ) {\n if ( file_exists($src[\"root\"]) && is_file($src[\"root\"]) ) {\n require_once PATH_LIB . \"/MediaFile.class.php\";\n return MediaFile::PreviewFile($path, $src['root'], $mime, $iframe);\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "cb431f14f8a8950d099e13bd7547eb2b", "score": "0.4971593", "text": "public function rwd_image_src(Request $request){\n\t\t$data = [];\n\t\treturn view('themes.'.Config('zmcms.frontend.theme_name').'.backend.zmcms_main_rwd_image_src_frm', compact('data'));\n\t}", "title": "" }, { "docid": "a393d868e08c6520f844866a386f484a", "score": "0.4967196", "text": "public function get_full_image()\n {\n $img_path = url('/public/uploads/full/' . $this->post_img );\n echo '<img class=\"img-responsive\" src=\"'. $img_path .'\">';\n }", "title": "" }, { "docid": "2d419c129b2df983d24ee1e8da0d5680", "score": "0.4966949", "text": "public function PreviewLink() {\n if($page = PresentationPage::get()->first()) {\n return Controller::join_links($page->Link(),'manage', $this->ID, 'preview');\n } \n }", "title": "" }, { "docid": "ec9828291e138ca235f860538f881d73", "score": "0.49659288", "text": "function get_publication_iframe($pub_id) {\n\t$docID = get_publication_docid($pub_id);\n\t$iframe = '<div><object style=\"width:100%;height:100%\"><param name=\"movie\" value=\"http://static.issuu.com/webembed/viewers/style1/v2/IssuuReader.swf?mode=mini&amp;backgroundColor=%23222222&amp;documentId='.$docID.'\" /><param name=\"allowfullscreen\" value=\"true\"/><param name=\"menu\" value=\"false\"/><param name=\"wmode\" value=\"transparent\"/><embed src=\"http://static.issuu.com/webembed/viewers/style1/v2/IssuuReader.swf\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" menu=\"false\" wmode=\"transparent\" style=\"width:100%;height:100%\" flashvars=\"mode=mini&amp;backgroundColor=%23222222&amp;documentId='.$docID.'\" /></object></div>';\n\treturn $iframe;\n}", "title": "" }, { "docid": "3bc9e8ebbb11dfaa93262e31c007b9fd", "score": "0.49658346", "text": "protected function _getIframeUrl()\n {\n $url = str_replace('{url}',$this->url, $this->_urlViewer);\n\n if($this->embedded)\n $url.='&embedded=true';\n\n $url.='&a='.$this->a;\n\n return $url;\n }", "title": "" }, { "docid": "4bd8abef26dc56952114fa15793831c0", "score": "0.49626458", "text": "public function iframe()\n\t{\n\t\t$tag = $this->input->get('tag', null, 'cmd');\n\n\t\tif (empty($tag))\n\t\t{\n\t\t\t$tag = null;\n\t\t}\n\n\t\t/** @var LogModel $model */\n\t\t$model = $this->getModel();\n\t\t$model->setState('tag', $tag);\n\n\t\tPlatform::getInstance()->load_configuration(Platform::getInstance()->get_active_profile());\n\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "e30e89758fccee6de785dd20bd9e5267", "score": "0.49604708", "text": "public function checkPreview() {\n $preview= false;\n if ($this->getResponse()) {\n $preview= $this->response->checkPreview();\n }\n return $preview;\n }", "title": "" }, { "docid": "54ec8a99e26e7026698835a9cfd310aa", "score": "0.49596563", "text": "public function onLoadImageCropPopup()\n {\n $this->abortIfReadOnly();\n\n $path = Input::get('path');\n $path = MediaLibrary::validatePath($path);\n $cropSessionKey = md5(FormHelper::getSessionKey());\n $selectionParams = $this->getSelectionParams();\n\n $urlAndSize = $this->getCropEditImageUrlAndSize($path, $cropSessionKey);\n $width = $urlAndSize['dimensions'][0];\n $height = $urlAndSize['dimensions'][1] ?: 1;\n\n $this->vars['currentSelectionMode'] = $selectionParams['mode'];\n $this->vars['currentSelectionWidth'] = $selectionParams['width'];\n $this->vars['currentSelectionHeight'] = $selectionParams['height'];\n $this->vars['cropSessionKey'] = $cropSessionKey;\n $this->vars['imageUrl'] = $urlAndSize['url'];\n $this->vars['dimensions'] = $urlAndSize['dimensions'];\n $this->vars['originalRatio'] = round($width / $height, 5);\n $this->vars['path'] = $path;\n\n return $this->makePartial('image-crop-popup-body');\n }", "title": "" }, { "docid": "82ad41b9721febe0899d69602f18cc73", "score": "0.4957404", "text": "function getImage($file,$width,$height,$preview=false) {\r\n\t\t// overwrite image sizes from TS with the values from the content-element if they exist.\r\n\t\tif ($file=='')\r\n\t\t\treturn $file;\r\n\r\n\r\n\t\t//$theImgCode = '';\r\n\t\t//$imgs = t3lib_div::trimExplode(',', $row['image'], 1);\r\n\t\t//$imgsCaptions = explode(chr(10), $row['imagecaption']);\r\n\t\t//$imgsAltTexts = explode(chr(10), $row['imagealttext']);\r\n\t\t//$imgsTitleTexts = explode(chr(10), $row['imagetitletext']);\r\n\r\n\t\t//reset($imgs);\r\n\t\t$lConf=array();\r\n\r\n\t\t$lConf['image.']['file.']['maxW']= $width;\r\n\t\t$lConf['image.']['file.']['maxH']= $height;\r\n\r\n\r\n\r\n\t\t$imgObj = t3lib_div::makeInstance('t3lib_stdGraphic'); // instantiate object for image manipulation\r\n\t\t$imgObj->init();\r\n\t\t//$imgObj->mayScaleUp = 1;\r\n\t\t$imgObj->absPrefix = PATH_site;\r\n\t\t$uploadfolder=PATH_site.'/uploads/pics/'.$file;\r\n\r\n if (!@is_file($uploadfolder)) die('Error: '.$uploadfolder.' was not a file');\r\n\r\n\t\t//$imgObj->dontCheckForExistingTempFile=true; //should be true only for debugging\r\n\t\t$imgInfo = $imgObj->imageMagickConvert($uploadfolder,'jpg',$width.' m',$height.' m','','',1);\r\n\r\n\t\t//$url='../../../../'.substr($imgInfo[3],strlen(PATH_site));\r\n\t\t$url=$imgInfo[3];\r\n\r\n\t\t$lConf['image.']['file'] =$url;\r\n\t\t$lConf['image.']['altText'] = '';\r\n\t\t$lConf['image.']['titleText'] = '';\r\n\r\n\r\n\t\t//$theImgCode .= $this->local_cObj->IMAGE($lConf['image.']);\r\n\t\tif ($preview){\r\n\t\t\t$theImgCode= '<img src=\"'. $url .'\" border=\"0\"/>';\r\n\t\t\treturn $theImgCode;\r\n\t\t} else{\r\n\t\t\t$theImgCode=array();\r\n\t\t\t$theImgCode['tag']= '<img src=\"###URL###\" style=\"height:'.$imgInfo[0].' px\" border=\"0\"/>';\r\n\t\t\t$theImgCode['url']=$url;\r\n\t\t\treturn $theImgCode;\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\r\n\t}", "title": "" }, { "docid": "6074153dda1c1a9f030ba75f808eed00", "score": "0.49556553", "text": "function _preview_new( $item_row )\n{\n\t$ret = $this->upload_fetch_photo( true );\n\n\tif ( $ret < 0 ) {\n\t\treturn $this->_preview_no_image();\n\t}\n\n\treturn $this->create_preview_new( $this->_photo_tmp_name );\n\n}", "title": "" }, { "docid": "f7bcc962782504fa41b251236eed68a5", "score": "0.49515477", "text": "protected function previewTab()\n {\n $tab = new Tab('Preview');\n\n // Preview iframe\n $sanitisedModel = str_replace('\\\\', '-', Emailing::class);\n $adminSegment = EmailTemplatesAdmin::config()->url_segment;\n $adminBaseSegment = AdminRootController::config()->url_base;\n $iframeSrc = Director::baseURL() . $adminBaseSegment . '/' . $adminSegment . '/' . $sanitisedModel . '/PreviewEmailing/?id=' . $this->ID;\n $iframe = new LiteralField('iframe', '<iframe src=\"' . $iframeSrc . '\" style=\"width:800px;background:#fff;border:1px solid #ccc;min-height:500px;vertical-align:top\"></iframe>');\n $tab->push($iframe);\n\n // Merge var helper\n $vars = $this->collectMergeVars();\n $syntax = self::config()->mail_merge_syntax;\n if (empty($vars)) {\n $varsHelperContent = \"You can use $syntax notation to use mail merge variable for the recipients\";\n } else {\n $varsHelperContent = \"The following mail merge variables are used : \" . implode(\", \", $vars);\n }\n $varsHelper = new LiteralField(\"varsHelpers\", '<div><br/><br/>' . $varsHelperContent . '</div>');\n $tab->push($varsHelper);\n\n return $tab;\n }", "title": "" }, { "docid": "c511db9c2400d22880bac97c5287c3e5", "score": "0.49488434", "text": "function displayImage(&$r,&$value,$options){\n $resizer=$this->getResizer($r->shortfilename,$r->mime,$r->originalname);\n if(!empty($resizer) && !empty($resizer['resizer'])) {\n $r->resizer=$resizer['resizer'];\n $r->weresizer=$resizer['weresizer'];\n }\n $r->isImage=true;\n if($this->usemimehtml){\n $r->html = '<img class=\"tzr-image\" src=\"'.$r->resizer.'&geometry='.$this->image_geometry.'\" alt=\"'.$r->title.'\" title=\"'.$r->title.'\">';\n if ($this->viewlink) $r->html.='<br>'.$r->html_default;\n }\n $r->html_preview = '<img class=\"tzr-image\" src=\"'.$r->resizer.'&geometry='.TZR_THUMB_SIZE.'x'.TZR_THUMB_SIZE.'%3E\" alt=\"'.$r->title.'\" title=\"'.$r->title.'\">';\n if ($this->viewlink) $r->html_preview.='<br>'.$r->html_default;\n }", "title": "" }, { "docid": "a6560ca6d8e5dba3489ec3fb3f6bb4c3", "score": "0.49438196", "text": "public function preview($id)\n {\n $data = $this->brandsAll();\n $cform = Cform::find($id);\n return view('cadmin.cforms.preview')->with(['cform'=> $cform, 'data'=>$data]);\n }", "title": "" }, { "docid": "ae1d63ec1b9362b43f358781d37de56e", "score": "0.4933951", "text": "public function AjaxGetPreviewURL()\n {\n return $this->oTableManager->oTableEditor->GetPreviewURL();\n }", "title": "" }, { "docid": "06223c3761c3805bda5041e879d7b2f8", "score": "0.49331713", "text": "public function PreviewLink() {\n if($page = PresentationPage::get()->filter('SummitID', $this->SummitID)->first()) {\n return Controller::join_links($page->Link(),'manage', $this->ID, 'preview');\n }\n }", "title": "" }, { "docid": "36647df3b81d431b6b38226720902a05", "score": "0.49318334", "text": "function acymailingredRedPreview_show(){\n\n\t\t//In this file you can use the javascript function setTag('your tag'); and insertTag(); which will set the tag and insert it in your Newsletter.\n\t\t//Please only use insertTag() if you want the tag to be direclty inserted but if you use only setTag('your tag') then the user will be able to see it and click on the insert button.\n\t\t//Your content will be inserted inside a form, you can add a submit button or whatever you want, it will do the job (if you want to add a search option).\n\t\techo '<div onclick=\"setTag(\\'{preview}\\');insertTag();\">Click here to preview start</div>';\n echo '<div onclick=\"setTag(\\'{/preview}\\');insertTag();\">Click here to preview end</div>';\n\n\t }", "title": "" }, { "docid": "95a48663f3c3d031d231e27788c3fe8e", "score": "0.4930989", "text": "private function setCurrentImage()\n {\n if ($this->request->has('current')) {\n $this->current_img = $this->request->get('current');\n }\n\n }", "title": "" }, { "docid": "0ebe23f862cd425d6ead4b21eb96ab41", "score": "0.49281996", "text": "public function output_preview_form_nonce_field() {\n\t\twp_nonce_field( 'preview-resume-' . $this->resume_id, '_wpjm_nonce' );\n\t}", "title": "" }, { "docid": "32fd8d06fda6bc03080708f1a7b627b1", "score": "0.4924499", "text": "abstract public function field_preview( $field );", "title": "" }, { "docid": "85b3148f509fe487c3e9f02bed8c58ae", "score": "0.49240962", "text": "function i_tpl_but_preview($class = ''){\n\n $params['type'] = I_FL_LABEL_TYPE_HINT;\n $params['mode'] = I_FL_SYS_WIN;\n $params['tab'] = 0;\n\n $res = array();\n $res['type'] = I_FL_ELEM_BUT_SUBMIT;\n $res['title'] = i_label(39, $params); // simple save label\n $res['name'] = 'preview';\n $res['value'] = 'preview';\n $res['class'] = $class;\n\n return $res;\n\n}", "title": "" }, { "docid": "d5cefc214e29963c014d7bc35958e373", "score": "0.4917725", "text": "function display_image($data, $parent=\"\")\n {\n extract($data);\n if(!$URL) return;\n\n $this->retval .= \"<p>\";\n if($LINK) $this->retval .= \"<a href=\\\"$LINK\\\" target=\\\"_blank\\\">\";\n $this->retval .= \"<img src=\\\"$URL\\\"\";\n if($WIDTH && $HEIGHT) $this->retval .= \" width=\\\"$WIDTH\\\" height=\\\"$HEIGHT\\\"\";\n $this->retval .= \" border=\\\"0\\\" alt=\\\"$TITLE\\\">\";\n if($LINK) $this->retval .= \"</a>\";\n $this->retval .= \"</p>\\n\\n\";\n }", "title": "" }, { "docid": "f9b9c6b190beacf8121cb5bb73a5affa", "score": "0.4917411", "text": "function efGbrowseImageRender( $input, $args, &$parser, $frame = null ) {\n\t$g = new gbrowseImage($input, $args, $parser, $frame ) ;\n\treturn $g->makeLink();\n}", "title": "" }, { "docid": "16418c34d316e5de95e3c39e7357bca0", "score": "0.4916317", "text": "public function getwebcamimageAction() {\n $request = $this->getRequest();\n\n // make sure again that it is only callable from a console as to not overload the netduino\n if (!$request instanceof ConsoleRequest) {\n throw new \\RuntimeException('You can only use this action from a console!');\n }\n\n //$url = 'http://derek.is-a-rockstar.com/weather-station/latest.jpg';\n $url = 'http://derek.is-a-rockstar.com:81/weather-station/latest.jpg';\n $image = file_get_contents($url);\n\n if ($image) {\n $latest = getcwd() . '/public/img/latest.jpg';\n $result = file_put_contents($latest, $image);\n\n if ($result)\n echo \"file saved\\n\";\n else\n echo \"image not saved\\n\";\n } else {\n echo \"could not get image\\n\\n\";\n }\n\n }", "title": "" }, { "docid": "d26df517bdd829b9b11d9dbe6e8abf7e", "score": "0.4914145", "text": "public static function live_preview() {\n wp_enqueue_script( \n 'mytheme-themecustomizer',\n \t get_template_directory_uri().'/assets/customizer/live.js',\n array( 'jquery', 'customize-preview' ),\n '', \n true \n );\n }", "title": "" }, { "docid": "57223a8862eca404e82f2accab8cdf98", "score": "0.49127457", "text": "function image_post(){\n // tidak menggunakan template\n $this->_render=0; \n $res='notfound.png';\n $var='image-data';\n /*\n menyimpan gambar dari httpuri\n misalnya capture canvas\n */\n if($this->_post->submitted($var)){\n $img=new Img;\n if(isset($this->_imgdir)) $img->setDir($this->_imgdir);\n $res=$img->post($this->_post->get($var),'jpg');\n }\n \n echo $res;\n }", "title": "" }, { "docid": "8b1b49b6095733cc7c565df521006424", "score": "0.48951748", "text": "function get_original_image($image) {\n if ($image) {\n $attrs = Fragment::elementAttributes($image);\n\n return \"<img src='\" . $attrs['data-image-original'] . \"' alt='' />\";\n }\n\n return \"\";\n}", "title": "" }, { "docid": "f96cd72c18c239bd28b419c9721fbcc4", "score": "0.48823243", "text": "public function preview($id, $post, $data) {\n\t\t(new $this->class($id, $post, $this))->preview($data);\n\t}", "title": "" }, { "docid": "fcd2042703ee927637f93b80f8bbf5cc", "score": "0.48818064", "text": "public function render() {\n \t$src \t = rtrim($this->_src, '/') . '/' . $this->getValue();\n \t$srcFull = rtrim($this->_srcFull, '/') . '/' . $this->getValue();\n \t$image = sprintf('<img src=\"%s\" alt=\"%s\" />', $src, $this->_alt);\n\t\t$image = preg_replace(\"/{([\\wd_\\-^}]+)}/ie\", \"\\$this->getData('$1')\", $image);\n\n\t\t$return = sprintf('<a target=\"_blank\" href=\"/tools/image/index?image=%s\" title=\"Klinkij by zedytować zdięcie\">%s</a>', $srcFull, $image);\n return $return;\n }", "title": "" }, { "docid": "b467450b2a931965b6c156677b80ab1c", "score": "0.48784208", "text": "public function preview(Request $request, CV $cv)\n\t{\n\t\t\n\t\treturn Response::file(public_path() . CV::$path_cv . $cv->cv);\n\t\t\n\t}", "title": "" } ]
413d1918cd355b07a4a48ac3ec37ba63
Record that a successful assertion occurred.
[ { "docid": "bca05f41c5b8b41079b52575c590ae6b", "score": "0.0", "text": "public function createSuccess(array $events = []): EventCollection\n {\n $suiteClass = $this->suiteClass;\n $suiteClass::current()->assert($this->successConfig);\n\n return new EventSequence($events, $this->callVerifierFactory);\n }", "title": "" } ]
[ { "docid": "5a5634a7cb6053593073c805ffc22025", "score": "0.66304356", "text": "public function recordSuccess();", "title": "" }, { "docid": "a57785650659c68494656f072a92a557", "score": "0.6422773", "text": "public function testSuccess()\n {\n $this->flashBag\n ->shouldReceive('add')\n ->with('success', 'Foobar Success')\n ->once();\n\n $this->flash->success('Foobar Success');\n }", "title": "" }, { "docid": "5dd2497c1caf22390bed6b7fc0027ce1", "score": "0.64059705", "text": "public function pass()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "688732d990958b6ab815e668f8b40750", "score": "0.63937855", "text": "public function was_successful();", "title": "" }, { "docid": "b9eeb9bff354b761e33cb7e74c13b6fa", "score": "0.63288283", "text": "function assert_failure()\n {\n debug_print_backtrace();\n trigger_error(\"Assert Failed\", E_USER_ERROR);\n }", "title": "" }, { "docid": "d598897855a34a255fe07be4cd68f61c", "score": "0.6166661", "text": "function assert_failure()\r\n{\r\n echo 'Assert failed..Exiting'.PHP_EOL;\r\n}", "title": "" }, { "docid": "386289ea0266f5819f63ba8f4b22b5ab", "score": "0.601165", "text": "public function testSucceeded(TestSuccess $success) {\n $this->invocations[__FUNCTION__]= [$success];\n }", "title": "" }, { "docid": "5205ff75c62c6bf490af7139399e6251", "score": "0.5926526", "text": "public function assertSuccessful()\n {\n return $this->assertExitCode(Command::SUCCESS);\n }", "title": "" }, { "docid": "723057b03cb6619639e1d9a883ef5cfc", "score": "0.58536834", "text": "public function testSuccess()\n {\n $data = [\n 'x_response_code' => 1,\n 'x_response_reason_code' => 1,\n 'x_invoice_num' => 1,\n 'x_amount' => 16,\n 'x_trans_id' => '32iiw5ve',\n 'x_card_type' => 'American Express',\n 'x_account_number' => 'XXXX0002',\n 'x_MD5_Hash' => '0EAD2F65D3D879CCB0D1A6F24883AC92'\n ];\n $this->getRequest()->setPostValue($data);\n $this->dispatch(self::$entryPoint);\n self::assertEquals(200, $this->getResponse()->getHttpResponseCode());\n self::assertContains('/sales/order/view', $this->getResponse()->getBody());\n }", "title": "" }, { "docid": "0150b8190168c1d146ad80fc47a103ce", "score": "0.58351827", "text": "function my_assert_handler($file, $line, $code)\n{\n echo \"<hr>Assertion Failed:\n File '$file'<br />\n Line '$line'<br />\n Code '$code'<br /><hr />\";\n}", "title": "" }, { "docid": "ecb9bb0a9a0f3222c16979e5f2c1a80d", "score": "0.57666314", "text": "public function setAssertion(Assertion $assertion);", "title": "" }, { "docid": "d5b692ce52c71a77e7b3c90166c74472", "score": "0.57146394", "text": "abstract function wasSuccessful();", "title": "" }, { "docid": "0416f88e4cf047666ff38336d629ecf6", "score": "0.5708587", "text": "public function testItemRecordResponseStatusSuccess()\n {\n $status = $this->testResponse->getStatus();\n\n $this->assertNotEmpty($status);\n $this->assertArrayHasKey('status-code', $status);\n $this->assertEquals(0, $status['status-code']);\n }", "title": "" }, { "docid": "1dfdd834a8f21516522c4e163ab0fa08", "score": "0.5706507", "text": "protected function assertPostConditions() {\r\n print \"---------------------------------------------------------------- \\n\";\r\n }", "title": "" }, { "docid": "325c8735e2b0fceac102c7c74c388a8a", "score": "0.5631265", "text": "protected function assertPostConditions() {\n print \"---------------------------------------------------------------- \\n\";\n }", "title": "" }, { "docid": "2061caf163ae37d3ffc1bfba974b9cb3", "score": "0.56017286", "text": "public function succeed($message = '')\n {\n $this->assertTrue(true, $message);\n }", "title": "" }, { "docid": "c9a2c72cdd70ab9b0ad984e0bbc85d27", "score": "0.5574414", "text": "public function testSendSuccess()\n {\n $this->setMockHttpResponse('VerifyEnrollmentRequestSuccess.txt');\n\n $this->request->setUserName($this->userName);\n $this->request->setPassword($this->password);\n\n /** @var VerifyEnrollmentResponse $response */\n $response = $this->request->send();\n\n $this->assertTrue($response->isSuccessful());\n $this->assertEquals($response->getCode(), 0);\n $this->assertEquals($response->getMessage(), 'Успешно');\n $this->assertEquals($response->getEmitterName(), \"TEST CARD\");\n $this->assertEquals($response->getEmitterCountryCode(), \"RU\");\n $this->assertEquals($response->getEnrolled(), \"Y\");\n }", "title": "" }, { "docid": "34bf577d82a0bc50087ddb51ca5fc447", "score": "0.5572449", "text": "public function assert(): void\n {\n // Fetch data.\n $data = $this->fetchData();\n\n if ($data === false) {\n throw new ContentNotFound(\"Fetched snapshot is empty.\");\n }\n\n $this->load();\n\n if (empty($this->dataSet)) {\n $this->printDebug('Snapshot is empty. Updating snapshot...');\n $this->dataSet = $data;\n $this->save();\n return;\n }\n\n try {\n $this->assertData($data);\n $this->printDebug('Data matches snapshot');\n // Increment the file name to make sure the next assertion will run correctly.\n $this->getFileName(true);\n } catch (AssertionFailedError $exception) {\n $this->printDebug('Snapshot assertion failed');\n\n if (!is_bool($this->refresh)) {\n $confirm = Debug::confirm('Should we update snapshot with fresh data? (Y/n) ');\n } else {\n $confirm = $this->refresh;\n }\n\n if ($confirm) {\n $this->dataSet = $data;\n $this->save();\n $this->printDebug('Snapshot data updated');\n return;\n }\n\n if ($this->showDiff) {\n throw $exception;\n }\n\n $this->fail($exception->getMessage());\n }\n }", "title": "" }, { "docid": "59daa99f39cd902e86f6cbe883c02896", "score": "0.5571362", "text": "public function testSendFailure()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "cb65a25204368f298c3665dbff24bc80", "score": "0.5544749", "text": "public function Successful(): bool {\n return true;\n }", "title": "" }, { "docid": "e9ec38f6dabb3a849fafa8c9d2c33462", "score": "0.5513896", "text": "public function recordFailure(\\Exception $exception);", "title": "" }, { "docid": "ef2f62b545613dbb9e442f3540b76e8e", "score": "0.55120724", "text": "public function assertSent($callback)\n {\n PHPUnit::assertTrue(\n $this->factory->recorded($callback)->count() > 0,\n 'An expected request was not recorded.'\n );\n }", "title": "" }, { "docid": "3553b61d2489d48f4aa952c14e717722", "score": "0.54955614", "text": "abstract public function isSuccessful();", "title": "" }, { "docid": "11d4da6fe9f4f7347d6316aead7b85b0", "score": "0.54868", "text": "function assertExample(): void\n{\n test()->assertTrue(true);\n}", "title": "" }, { "docid": "0ef104af17c8a50f0fe230096d56e099", "score": "0.5476692", "text": "public function verifyFailedAction() {\n\t}", "title": "" }, { "docid": "cf54d2decb6d9a8905f4252e2ddd82cf", "score": "0.54507685", "text": "public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)\n {\n// $this->message .= \"Error message:\\n\".$e->getMessage().\"\\n\";\n }", "title": "" }, { "docid": "ef3e802301d49e332ea1989f6861df92", "score": "0.5447315", "text": "public function testAlert()\n {\n $this->flashBag\n ->shouldReceive('add')\n ->with('alert', 'Foobar Alert')\n ->once();\n\n $this->flash->alert('Foobar Alert');\n }", "title": "" }, { "docid": "f6b9c9fb2f7297476bea58f6eab26990", "score": "0.5440821", "text": "function assertHandler($file, $line, $code, $desc = null) {\n echo \"Assertion failed at line $line \";\n if ($desc) echo \"-- $desc\";\n echo PHP_EOL;\n}", "title": "" }, { "docid": "993dd745bacfcb2966ea2f8141ea8c50", "score": "0.54407597", "text": "public function the_user_can_successfully_add_a_patient()\n {\n $response = $this->get('/patients/new');\n $hospital = factory(Hospital::class)->create(['hospital_id'=>300]);\n $response =$this->post('/patients/new', [\n 'forename' => 'Kossai',\n 'surname' => 'Sbai',\n 'patient_id' => 100,\n 'internal_id' => 200,\n 'date_of_birth' => '2000-07-01',\n 'test_frequency' => 'two-weeks',\n 'reviewed' => 'yes',\n 'preferred_contact' => 'email',\n 'email' => 'kossai.sbai@gmail.com',\n 'contact' => '074298238',\n 'hospital' => 300,\n 'sex' => 'M',\n 'is_complex' => 'no',\n 'received'=>'no'\n ]);\n $response->assertStatus(302);\n $response->assertRedirect('patients');\n $this->assertDatabaseHas('patients',['forename'=>\"Kossai\",\"patient_id\"=>100]);\n }", "title": "" }, { "docid": "66cbda5f40f8d961b621bdcb9326472b", "score": "0.543726", "text": "public function shouldBeTrue()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "e3f3c5749139ea75cc1a87eff79f7970", "score": "0.54221827", "text": "public function isSuccessful()\n {\n return true;\n }", "title": "" }, { "docid": "e3f3c5749139ea75cc1a87eff79f7970", "score": "0.54221827", "text": "public function isSuccessful()\n {\n return true;\n }", "title": "" }, { "docid": "0bf9990f607e808e111a80b8b69abd45", "score": "0.5401158", "text": "public function testOnSuccess()\n {\n $serverUrl = 'https://fcapi.example.com';\n $cloudApiMock = $this->getMockBuilder(AccessibleCloudApi::class)\n ->setConstructorArgs([$serverUrl])\n ->setMethods(['init', '__destruct', 'doPost'])\n ->getMock();\n\n $mockApiResponse = <<<RESPONSE\n<commands>\n <command>\n <type>saveattributevalues</type>\n <result>1</result>\n <message>Attribute values saved successfully (setId: 5ccafe12adccf621f80342e6 | fullpath: /tester/textfile1.txt)!</message>\n </command>\n</commands>\nRESPONSE;\n $mockApiRequest = $this->getValidApiRequest();\n\n $cloudApiMock->method('doPost')\n ->with(\"{$serverUrl}/core/saveattributevalues\", http_build_query($mockApiRequest))\n ->willReturn($mockApiResponse);\n\n /** @var CloudAPI $cloudApiMock */\n /** @var CommandRecord $commandRecord */\n $commandRecord = $cloudApiMock->saveAttributeValues(...array_values($this->getWrapperArguments()));\n $this->assertEquals(1, $commandRecord->getResult());\n $this->assertEquals('saveattributevalues', $commandRecord->getType());\n $this->assertEquals('Attribute values saved successfully (setId: 5ccafe12adccf621f80342e6 | fullpath: /tester/textfile1.txt)!', $commandRecord->getMessage());\n }", "title": "" }, { "docid": "712986638aee143076af459e96f1d1fb", "score": "0.53911614", "text": "public function seeActionSuccess(): ?string\n {\n $I = $this->tester;\n\n $I->closeNotification('Bill was created successfully');\n $I->seeInCurrentUrl('/finance/bill?id');\n\n return $this->grabBillIdFromUrl();\n }", "title": "" }, { "docid": "81f00837f37ce2c4883e2973e96c6a60", "score": "0.5388351", "text": "public function testSuccessAuthorize()\n {\n $this->assertEquals($this->hostedWindowMock, $this->hostedWindowMock->authorize($this->paymentMock, $this->amount));\n }", "title": "" }, { "docid": "04ee41dfde2b6abcb604fc93b7f61592", "score": "0.538451", "text": "public function isSuccessful();", "title": "" }, { "docid": "04ee41dfde2b6abcb604fc93b7f61592", "score": "0.538451", "text": "public function isSuccessful();", "title": "" }, { "docid": "9ea8cff521da68b79a8dfd7c871ca238", "score": "0.53680134", "text": "public function wasSuccessful(): bool;", "title": "" }, { "docid": "27cbc055eeb011ab4fc5b34b877c2718", "score": "0.5352837", "text": "public function testError()\n {\n $this->flashBag\n ->shouldReceive('add')\n ->with('danger', 'Foobar Error')\n ->once();\n\n $this->flash->error('Foobar Error');\n }", "title": "" }, { "docid": "87a0358dc3a5b754d5def073a5367ae8", "score": "0.53388536", "text": "public function testResponse()\n {\n\n $record = $this->_record();\n\n $this->_setPut();\n $this->dispatch('neatline/records/'.$record->id);\n $json = $this->_getResponseArray();\n\n // Should emit correct record.\n $this->assertEquals($record->id, $json['id']);\n\n // Should emit all attributes.\n foreach (array_keys($record->toArray()) as $k) {\n $this->assertArrayHasKey($k, $json);\n }\n\n }", "title": "" }, { "docid": "a2b86893ea533c626cdc8dbac20702c6", "score": "0.5321791", "text": "public function storeAssertion($assertionURI, $assertionID, $conditions)\n {\n return true;\n }", "title": "" }, { "docid": "25be31c1e1f492f3478767c76d766730", "score": "0.5320652", "text": "public function success($value)\n {\n $validator = $this->getValidator();\n $constraint = $this->getConstraint();\n\n $this->context\n ->expects($this->testCase->never())\n ->method('addViolation');\n\n $this->context\n ->expects($this->testCase->never())\n ->method('addViolationAtPath');\n\n $this->context\n ->expects($this->testCase->never())\n ->method('addViolationAtSubPath');\n\n $this->context\n ->expects($this->testCase->never())\n ->method('addViolationAt');\n\n $validator->validate($value, $constraint);\n }", "title": "" }, { "docid": "195027f5f7122935975175c224e150c9", "score": "0.53179306", "text": "public function testFailures0()\n{\n\n $actual = $this->mailFake->failures();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "8dc45b47750ab2e1afdc9ce2d59b577b", "score": "0.52914333", "text": "public function testStoreSuccess()\n {\n $user = factory(User::class)->make();\n\n $response = $this->json('POST', '/api/v1/users', $user->toArray());\n\n $response->assertStatus(200);\n $response->assertJson(['success' => true]);\n }", "title": "" }, { "docid": "9b2f8843d70e7462b1c16e757baf6616", "score": "0.5284841", "text": "public function toString()\n {\n return 'Assert that success message is displayed';\n }", "title": "" }, { "docid": "376187d2cd4b1a2bf31fff7aa44e393e", "score": "0.52829546", "text": "function my_assert_handler($file, $line, $code)\n{\n global $assert_errors;\n $assert_errors++;\n if(php_sapi_name()==\"cli\")\n {\n echo \"\\n\\nAssertion Failed:\n File '$file'\n Line '$line'\n Code '$code'\\n\\n\";\n }\n else\n {\n echo \"<hr>Assertion Failed:\n File '$file'<br />\n Line '$line'<br />\n Code '$code'<br /><hr />\";\n }\n}", "title": "" }, { "docid": "f7f4529a879d4b9a4eafded4c2030565", "score": "0.52742624", "text": "public function testPostVerify()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "6b5569e7f66df567b0e4c5e4363cb78f", "score": "0.52720267", "text": "protected function assertRequestIsSuccessfullyPerformed(array $responseData): void\n {\n $this->assertTrue(isset($responseData['category']['entity_id']));\n $this->assertFalse($responseData['error'], 'Response message: ' . $responseData['messages']);\n $message = str_replace('.', '\\.', (string)__('You saved the category.'));\n $this->assertMatchesRegularExpression(\"/>{$message}</\", $responseData['messages']);\n }", "title": "" }, { "docid": "3b975a1214af289ae64d0e7851ddef6f", "score": "0.52694696", "text": "public function assertNothingSent()\n {\n PHPUnit::assertEmpty(\n $this->factory->getRecorded(),\n 'Requests were recorded.'\n );\n }", "title": "" }, { "docid": "907388453fa0a9719f9520ce3b34dce1", "score": "0.5268078", "text": "public function testSetAsSuccessfulMethod()\n {\n // Create a mock for data and error\n $dataCollectionMock = $this->getMockBuilder(CollectionInterface::class)->disableOriginalConstructor()->getMock();\n $errorCollectionMock = $this->getMockBuilder(CollectionInterface::class)->disableOriginalConstructor()->getMock();\n // Create Response and call setAsSuccess method\n $response = new Response($dataCollectionMock, $errorCollectionMock);\n $response->setAsSuccess();\n // Check the validity of status\n $responseReflected = new \\ReflectionClass($response);\n $statusReflected = $responseReflected->getProperty('status');\n $statusReflected->setAccessible(true);\n $this->assertEquals($statusReflected->getValue($response), 'SUCCESSFUL');\n $this->assertNotEquals($statusReflected->getValue($response), 'FAILED');\n }", "title": "" }, { "docid": "4d83efe198943384fff938bf91bcfa9d", "score": "0.5256408", "text": "public function myTestAddToLog()\n {\n LogActivity::addToLog('My Testing Add To Log.');\n dd('log insert successfully.');\n }", "title": "" }, { "docid": "6745cc253db173e04ebb43428657aea7", "score": "0.52512664", "text": "public function myTestAddToLog()\n {\n LogActivity::logActivityLists();\n dd('log insert successfully.');\n }", "title": "" }, { "docid": "039bcbf49af3e860d5f5d993a468553f", "score": "0.52444977", "text": "public function assertionHandler($file, $line, $code)\n {\n if ($this->convertAssertionErrorsToExceptions) {\n $exception = new ErrorException('Assertion Failed - Code[ ' . $code . ' ]', 0, null, $file, $line);\n if ($this->throwAssertionExceptions) {\n throw $exception;\n } else {\n $this->tt($exception);\n }\n } else {\n $this->tt($code, 'Assertion Failed', TempusDebugger::ERROR, array('File' => $file, 'Line' => $line));\n }\n }", "title": "" }, { "docid": "0abe6bd71f2d85122016510b73670964", "score": "0.52431965", "text": "public function testTrue()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "0abe6bd71f2d85122016510b73670964", "score": "0.52431965", "text": "public function testTrue()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "bf5593893d5a49673e7412ad29a36f09", "score": "0.52338386", "text": "public function testVerificationComplete()\n {\n }", "title": "" }, { "docid": "9f209fbacf38d2880a2d4aa76c1688e6", "score": "0.52290416", "text": "public function testCreateSuccess()\n {\n $this->authentification()\n ->visit('/admin/movies/create')\n ->type('Test de mon premier film!', 'title')\n ->type(2012, 'annee')\n ->type('Warner Bros', 'distributeur')\n ->type(1515145.00, 'budget')\n ->type(4, 'duree')\n ->type(3, 'note_presse')\n ->type(\"<iframe src='//youtube.com'></iframe>\", 'trailer')\n ->type(str_repeat('bla ', 50), 'synopsis')\n ->type(str_repeat('bla ', 20), 'description')\n ->type('16/03/2017', 'date_release')\n ->attach(asset('uploads/movies/'), 'image')\n ->select('long-metrage', 'type')\n ->select('fr', 'lang')\n ->select('vost', 'bo')\n ->press('Enregistrer ce film')\n ->followRedirects()\n ->seePageIs('/admin/movies/index');\n }", "title": "" }, { "docid": "3cdef5755476cb9c988e8539cec8d1a3", "score": "0.5214099", "text": "public function verifyInteractions(): bool;", "title": "" }, { "docid": "8c45e908e625444c7120c8a7720d1d58", "score": "0.52121276", "text": "public function test_that_true_is_true()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "a138b7046f7dbcc77c6795e8e9006de5", "score": "0.52039135", "text": "public function addFailure(Test $test, AssertionFailedError $e, float $time): void\n {\n }", "title": "" }, { "docid": "383d3f4e310dec49d46c9d20d1d820e6", "score": "0.52017254", "text": "public function tally()\n {\n while (list($severity, $message, $file, $line) = $this->extract()) {\n $severity = $this->getSeverityAsString($severity);\n $this->test->error($severity, $message, $file, $line);\n }\n while (list($expected, $message) = $this->extractExpectation()) {\n $this->test->assert($expected, false, '%s -> Expected error not caught');\n }\n }", "title": "" }, { "docid": "101e49c5f7989b1c2850a31a8a498913", "score": "0.52012026", "text": "public function checkSuccessfulPageOpening() :void\n {\n $this->successLogIn();\n\n $document = Document::where($this->document_data)->first();\n $response = $this->get(route('crud.document.edit', ['id' => $document->id]));\n\n $response->assertOk();\n $response->assertViewIs(\"crud::edit\");\n }", "title": "" }, { "docid": "6cb8dafdc55531fe47f942025724c16a", "score": "0.5185623", "text": "public function testAlertAction()\n {\n $hasFailed = false;\n $message = \"testAlertAction\";\n $redirector = Redirect::to('/');\n\n $baseController = new BaseController;\n\n $result = $baseController->alertAction(\n $hasFailed,\n $message,\n $redirector\n );\n\n $this->assertEquals(Session::get('action.failed'), $hasFailed);\n $this->assertEquals(Session::get('action.message'), $message);\n $this->assertSame($result, $redirector);\n }", "title": "" }, { "docid": "1f6c92fa0adff9418f4f29f377878381", "score": "0.51830465", "text": "public function testTransactionSuccess()\n {\n $this->getConnection()->begin();\n $hello = $this->getConnection()->query()('SELECT \"Hello\"')()('fetch-all')();\n $world = $this->getConnection()->query()('SELECT \"Hello\"')()('fetch-all')();\n $valid = $this->getConnection()->validate();\n $this->getConnection()->commit();\n $this->assertTrue($valid);\n }", "title": "" }, { "docid": "e34bb13e602fd75a96e44e4a8620651f", "score": "0.5175668", "text": "public function testSuccessVoid()\n {\n $this->assertEquals($this->hostedWindowMock, $this->hostedWindowMock->void($this->paymentMock, $this->amount));\n }", "title": "" }, { "docid": "4c4e370013eb717869e1e95d8508c89a", "score": "0.5169926", "text": "public function testPassStatus()\n {\n $rule = new Rule(array(), 'testsection');\n $rule->pass();\n\n $this->assertTrue($rule->getStatus());\n }", "title": "" }, { "docid": "9e3b7d58773261df4b33e78bfcc3e5dc", "score": "0.51632726", "text": "public function testInsertError()\n {\n $user = factory(User::class)->create();\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->post(route('category.insert'), [])\n ->assertStatus(200)\n ->assertSessionHasErrors()\n ->assertSessionMissing(['flash_notification.0.message' => trans('category.flash-insert')]);\n }", "title": "" }, { "docid": "f7c556d7261c1a52746415700b65d4f9", "score": "0.51581186", "text": "public function testExample()\n {\n $this->mistake();\n $this->success();\n }", "title": "" }, { "docid": "1d6c1b788c01e9198a5b9066e45f3fda", "score": "0.51414937", "text": "public function testTrueIsTrue()\r\n {\r\n $this->assertTrue(true);\r\n }", "title": "" }, { "docid": "6cf8580b4e6134fd67ab67de63a1b91a", "score": "0.51387286", "text": "public function testSuccessOrder()\n {\n $this->assertEquals($this->hostedWindowMock, $this->hostedWindowMock->order($this->paymentMock, $this->amount));\n }", "title": "" }, { "docid": "81ba793e6e580f2b20b4ee9f67a22819", "score": "0.51301545", "text": "public function setSuccess()\n {\n $this->endDate = new \\DateTime();\n $this->state = self::STATE_SUCCESS;\n }", "title": "" }, { "docid": "ac6bbf8cb05e21434a078c8190622cb9", "score": "0.51159084", "text": "public function testSuccessCapture()\n {\n $object = new \\stdClass();\n $object->id = 25;\n $object->href = 'test';\n $object->status = 'test';\n $this->paymentMock->method('getOrder')->willReturn($this->orderMock);\n $this->transactionMock->method('capture')->with($this->orderMock, $this->amount)->willReturn(json_encode($object));\n $this->paymentMock->method('setTransactionId')->with($object->id)->willReturnSelf();\n $this->paymentMock->method('setIsTransactionClosed')->with(false)->willReturnSelf();\n $this->paymentMock->method('setAdditionalInformation')->withAnyParameters()->willReturnSelf();\n $this->paymentMock->method('setAdditionalInformation')->withAnyParameters()->willReturnSelf();\n $this->paymentMock->method('setAdditionalInformation')->withAnyParameters()->willReturnSelf();\n $this->assertEquals(true, $this->hostedWindowMock->capture($this->paymentMock, $this->amount));\n }", "title": "" }, { "docid": "ed18e847b0cf44f4bd64e41732e211e4", "score": "0.5114728", "text": "function testSuccessful(){\n\t\t$q->query = 'select * from information';\n\t\t$queries[0] = $q;\n\n\t\t//using mockPDO which extends and overrides PDO's construct and commit\n\t\t//for some reason the getMock() line throws PDOException: invalid data source name \n\t\t//will need to dig into PHPUnit internals more. PHP 5.3.10, PHPUnit 3.7.31\n\t\t//i am assuming it has to do with the call to commit and the internals of PDO\n\n\t\t$dbMock = $this->getMock('mockPDO', array('__construct','exec', 'beginTransaction', 'rollBack', 'commit'), array(''));\n\n\t\t$dbMock->expects($this->once())->method('exec');\n\t\t$dbMock->expects($this->once())->method('beginTransaction');\n\t\t$dbMock->expects($this->never())->method('rollBack');\n\t\t$dbMock->expects($this->once())->method('commit')->will($this->returnValue(true));\n\n\t\t$result = executeTransaction($dbMock, $queries);\n\t\t$this->assertEquals($result['result'], true);\n\t}", "title": "" }, { "docid": "7272fadea46104b2d5abc3f395d9fc70", "score": "0.5114709", "text": "public function markAsFailed()\n {\n $this->failed = true;\n }", "title": "" }, { "docid": "9a0ee7119a7f0d600a12b806d4e59e71", "score": "0.51133674", "text": "function testFixtureaddReturnsTrueOnSuccess() {\n $testData = $this->_testFix->get('id',1);\n $result = $this->_basicFix->add($testData);\n $this->assertTrue($result);\n }", "title": "" }, { "docid": "e7c27bbf26bdb1c0ea5296b8d2e0ce63", "score": "0.51122063", "text": "public function testShouldValidateSaveMessage ()\n {\n $this->entity->setDsSubject('assunto teste');\n\n $this->_setUser();\n\n $this->business->_validateSave($this->entity);\n }", "title": "" }, { "docid": "4003fd32999277dd1d407129ce811af9", "score": "0.51107824", "text": "function testNotifyExecutionResultSuccess($taskId, $taskName, $message) {\n\t\t$taskResult = true;\n\t\t$expectedSubject = __(SCHEDULED_TASK_MESSAGE_TYPE_COMPLETED);\n\t\t$this->_setReportErrorOnly('On');\n\t\t$expectedTestResult = false; // Will NOT send email.\n\n\t\t$helper = $this->_getHelper($expectedSubject, $message);\n\n\t\t// Exercise the system.\n\t\t$actualResult = $helper->notifyExecutionResult($taskId, $taskName, $taskResult, $message);\n\t\t$this->assertEquals($expectedTestResult, $actualResult);\n\n\t\t// Now change the report setting, so success emails will also be sent.\n\t\t$this->_setReportErrorOnly('Off');\n\t\t$expectedTestResult = null; // Will send email.\n\t\t$actualResult = $helper->notifyExecutionResult($taskId, $taskName, $taskResult, $message);\n\t\t$this->assertEquals($expectedTestResult, $actualResult);\n\t}", "title": "" }, { "docid": "2ba2b92a929d8af9854fcf6b79d57e80", "score": "0.5110478", "text": "public function expect($passed, $msg = \"Value was not what was expected\") {\n if ($passed) {\n $this->passes++;\n echo \"\\n<PASSED::>Test Passed\\n\";\n } else {\n $this->fails++;\n echo \"\\n<FAILED::>$msg\\n\";\n if (!$this->describing) throw new Exception(\"Failed Test\");\n }\n }", "title": "" }, { "docid": "85f8a24ce9acdf4767868fddc31d1e28", "score": "0.51073146", "text": "protected function assertContactCreated () {\n $contact = Contacts::model()->findByAttributes (array (\n 'firstName' => 'test',\n 'lastName' => 'test',\n 'email' => 'test@test.com',\n ));\n $this->assertTrue ($contact !== null);\n X2_TEST_DEBUG_LEVEL > 1 && println (\n 'contact created. new contact\\'s tracking key = '.$contact->trackingKey);\n return $contact;\n }", "title": "" }, { "docid": "a7efe98ae486b9367f652188a3c0c2ce", "score": "0.5103489", "text": "public function testTrueIsTrue()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "27f672338f4af534d08bfe837261434e", "score": "0.50974536", "text": "public function testOne()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "fb026d35da280c657ffb9a85cea74828", "score": "0.50944996", "text": "protected function setSuccess()\n {\n $this->setResponse(self::STATUS_CODE_OK, self::MSG_SUCCESS);\n }", "title": "" }, { "docid": "a8a8770f90114798f37f63a6b89d352e", "score": "0.5093462", "text": "public function testInfo()\n {\n $this->flashBag\n ->shouldReceive('add')\n ->with('info', 'Foobar Info')\n ->once();\n\n $this->flash->info('Foobar Info');\n }", "title": "" }, { "docid": "33dcebfc231a2ac800c2f53ee5c06532", "score": "0.5089892", "text": "public function testTrue ()\n {\n //test expects the return value for this function to be true\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "e9a40f03ad117e86324c772c5c44b3bc", "score": "0.5086019", "text": "function my_assert($val,$reason) {\n\tif(!$val) {\n\t\terror_log('assert error: '.$reason);\n\t}\n}", "title": "" }, { "docid": "7afeccecb0ade2b1bda0e7e773cffb76", "score": "0.50799394", "text": "protected function assertSuccessfulResponse($response)\n {\n $this->assertTrue(is_object($response));\n $this->assertObjectHasAttribute('meta', $response);\n $this->assertObjectHasAttribute('data', $response);\n $this->assertTrue($response->meta->status == 200);\n }", "title": "" }, { "docid": "8b668b8dc1d75df0251b85c01bdec650", "score": "0.50793266", "text": "public function testAddVoteStatusSuccess() {\n factory(Person::class)->create();\n\n $this->ipJson('POST', '/person/1/vote/3', static::$mockIpPrimary);\n $this->assertResponseStatus(201);\n }", "title": "" }, { "docid": "b9efc5d3c8435e855b4d4245f6f602bd", "score": "0.5078833", "text": "public function testSuccess($text, $log)\n\t{\n\t\t$log->success($text);\n\t\t$this->assertRegExp(sprintf(\"/.*?\\d{2}\\/\\d{2}\\/\\d{4} \\d{2}\\:\\d{2}\\:\\d{2} \\[IP\\: (?:\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}.*|\\s{15})?\\].*SUCCESS.*\\- %s.*?/\", $text), file_get_contents('./tests/fixtures/logs/utils.log'));\n\t}", "title": "" }, { "docid": "b40f0e3e274bc628e7f8248581add6f6", "score": "0.5078128", "text": "function test_history_before_retry() {\n\t\t$history = Akismet::get_comment_history( $this->comment_id );\n\t\t$this->assertEqual( 'check-error', $history[0]['event'] );\n\t}", "title": "" }, { "docid": "4f1b4528cdecdeab6d27d921a8a4a292", "score": "0.50726783", "text": "public function isSuccessful()\n {\n return $this->getState() === 'success';\n }", "title": "" }, { "docid": "0e60e3b01555a54bcf8b440c55a990bd", "score": "0.5072309", "text": "public static function LogSuccess($embed_id)\n\t{\n\t\t$video_id = self::GetSessionVideo($embed_id);\n\n\t\t//nothing we can do\n\t\tif($video_id == null)\n\t\t\treturn;\n\n\t\t$db = $GLOBALS['db'];\n\t\t$db = $db->getConn();\n\n\t\t$r = array();\n\t\t$r['video_id'] = $video_id;\n\t\t$r['action'] = \"SUCCESS\";\n\t\t$r['visitor_hash'] = self::GetVisitorHash();\n\t\ttry\n\t\t{\n\t\t\t$db->insert(\"action_log\",$r);\n\t\t\treturn true;\n\t\t}\n\t\tcatch(Exception $ex)\n\t\t{\n\t\t\t//duplicate\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "fe6f17a3f32025064dd74822570fa2bc", "score": "0.50704557", "text": "public function runBare()\n {\n MatcherAssert::resetCount();\n \n try {\n parent::runBare();\n }\n catch (\\Exception $exception) {\n // rethrown below\n }\n\n $this->addToAssertionCount(MatcherAssert::getCount());\n\n if (isset($exception)) {\n throw $exception;\n }\n\n }", "title": "" }, { "docid": "8d0581bc538b123ef44c33c62aef58e3", "score": "0.5068301", "text": "protected function assert($assertion, $errorMessage = 'An error occured') {\n if (!$assertion) {\n throw new Exception($errorMessage);\n }\n }", "title": "" }, { "docid": "45a31bf1986b5de0038402fc30e0d87a", "score": "0.50587934", "text": "public function isSuccessful()\n {\n return $this->isSuccessful === true;\n }", "title": "" }, { "docid": "ed64b6853b29491eccaeb749d5c21905", "score": "0.5056921", "text": "public function testinsertRecord() {\n\n $this->resetMyArray();\n // Reset myArray to origninal values.\n $ac_class_instance = new AssignmentsClass();\n // Start with empty db entry.\n $ac_class_instance->delRowsByStudentId($this->myArray['tA_S_ID']);\n $result = $ac_class_instance->insertRecord($this->myArray);\n // This inserts data into array but does not have a remaining value.\n $this->assertTrue(isset($ac_class_instance));\n // Number or rows affected.\n $this->assertTrue($result === 1);\n $row = $ac_class_instance->getLastDbEntryAsArray(\n $this->myArray['tA_S_ID']\n );\n // $row has both numeric and relational entries double its numbers.\n // $log_file = fopen(\"/var/www/html/jimfuqua/\n // tutor/logs/testinsertRecord.log\", \"w\");\n // $this->assertTrue(count($row) === count($this->myArray));\n // $this->assertTrue($row['tA_S_ID'] == $this->myArray['tA_S_ID']);\n // Clean Up.\n $ac_class_instance->delRowsByStudentId($this->myArray['tA_S_ID']);\n // Return $ac_class_instance; Why was this here?\n $this->resetMyArray();\n }", "title": "" }, { "docid": "a738601b52a7f4b1e8c777276e7a5082", "score": "0.50559354", "text": "public function dummy()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "ce338b005aa2fa975f6e3c8a66d3cdd5", "score": "0.5055717", "text": "public function testItShouldCreateSuccessfully()\n {\n $statusCode = 200;\n\n $this->event->expects(static::once())\n ->method('getException')\n ->willReturn($apiProblemException = $this->createMock(ApiProblemException::class));\n\n $this->event->expects(static::once())\n ->method('setResponse');\n\n $apiProblemException->expects(static::once())\n ->method('getApiProblem')\n ->willReturn($apiProblem = $this->createMock(ApiProblem::class));\n\n $apiProblem->expects(static::once())\n ->method('toArray')\n ->willReturn([]);\n\n $apiProblem->expects(static::once())\n ->method('getStatusCode')\n ->willReturn($statusCode);\n\n $this->subscriber->onKernelException($this->event);\n }", "title": "" }, { "docid": "a55eb4103016900476e06345fbbf4c54", "score": "0.50489175", "text": "public function testcreateDeckSuccessCount()\n {\n $case = createDeck();\n $this->assertCount(52, $case, $message = 'Error: Less than 52 cards in pack');\n }", "title": "" }, { "docid": "420985294a6e5709e3e0f6842c903eab", "score": "0.5044086", "text": "public function testProcessingSuccessfulEmailSubmission() {\n $this->setupSubmissionServiceFactoryMock('email', ['type' => FoiaRequestInterface::METHOD_EMAIL]);\n $this->queueWorker = new FoiaSubmissionQueueWorker($this->foiaSubmissionServiceFactory);\n\n $data = $this->foiaSubmissionsQueue->claimItem()->data;\n $foiaRequestId = $data->id;\n $foiaRequest = FoiaRequest::load($foiaRequestId);\n $this->assertEquals(FoiaRequestInterface::STATUS_QUEUED, $foiaRequest->getRequestStatus());\n $this->queueWorker->processItem($data);\n $this->assertEquals(FoiaRequestInterface::STATUS_SUBMITTED, $foiaRequest->getRequestStatus());\n $this->assertEquals(FoiaRequestInterface::METHOD_EMAIL, $foiaRequest->getSubmissionMethod());\n $timeStamp = $foiaRequest->get('field_submission_time')->value;\n $this->assertNotEmpty($timeStamp);\n }", "title": "" }, { "docid": "bc868e4f75fa3d45cc699dfffd7818d7", "score": "0.5043944", "text": "public function checkSuccessfulPageOpening() :void\n {\n $this->successLogIn();\n\n $page = Page::where($this->page_data)->first();\n $response = $this->get(route('crud.page.edit', ['id' => $page->id]));\n\n $response->assertOk();\n $response->assertViewIs(\"crud::edit\");\n }", "title": "" }, { "docid": "677c8b5da369ca49887ef0f2ced30668", "score": "0.50406444", "text": "public function testStoreSingleEntrySuccess()\n {\n $this->projectItemInput = [\n 'id' => '555',\n 'project_id' => 2, \n 'item_type' => 'Refrigerator',\n 'manufacturer' => 'Acme Ltd.',\n 'model' => 'Super Cold 3000',\n 'serial_number' => 'ABJ-9137-WOW3042',\n 'vendor' => 'Awesome Shop',\n 'comments' => 'Came with free bag of hot dogs'\n ];\n \n // Assemble\n //$this->mockedProjectItemController->shouldReceive('store')->once();\n $this->mockedProjectItemRepo->shouldReceive('saveProjectItem')->once()->with(Mockery::type('ProjectItem'));\n\n // Act \n $response = $this->route(\"POST\", \"storeItems\", $this->projectItemInput);\n\n // Assert\n $this->assertRedirectedToAction('ProjectItemController@index',2);\n }", "title": "" } ]
35abd2f333e532ab2bd734c9d3ffb9f0
Filter the query on the cardnbr column Example usage: $query>filterByCardnbr('fooValue'); // WHERE cardnbr = 'fooValue' $query>filterByCardnbr('%fooValue%', Criteria::LIKE); // WHERE cardnbr LIKE '%fooValue%'
[ { "docid": "e827a71fb9fc17d31468afee4dd00043", "score": "0.5387327", "text": "public function filterByCardnbr($cardnbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($cardnbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(PaymentTableMap::COL_CARDNBR, $cardnbr, $comparison);\n }", "title": "" } ]
[ { "docid": "a1953d45be9354d795454d985801c28e", "score": "0.4781862", "text": "public function filterByContractNo($contractNo = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($contractNo)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $contractNo)) {\n $contractNo = str_replace('*', '%', $contractNo);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(ContractPeer::CONTRACT_NO, $contractNo, $comparison);\n }", "title": "" }, { "docid": "194eac8852fed4b1ebb5b2738e078a43", "score": "0.46722668", "text": "public function filterByOrdernbr($ordernbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($ordernbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(WmpickdetTableMap::COL_ORDERNBR, $ordernbr, $comparison);\n }", "title": "" }, { "docid": "e8ffacab582a4080d9dc3b1045a459ce", "score": "0.46492913", "text": "public function contact1($value = '')\n {\n if (!empty($value)) {\n\n return $this->builder->where('cus_contact1', 'like', \"%$value%\");\n }\n }", "title": "" }, { "docid": "0ec59f17013cdfc1486ba0f2ff7603cc", "score": "0.46162918", "text": "public function filterByOrdernumber($ordn, $comparison = null) {\n\t\treturn $this->filterByOehhnbr($ordn, $comparison);\n\t}", "title": "" }, { "docid": "7ce366605fedcf905ca8e271065c7213", "score": "0.458231", "text": "public function filterByItemnbr($itemnbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($itemnbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(WmpickdetTableMap::COL_ITEMNBR, $itemnbr, $comparison);\n }", "title": "" }, { "docid": "52bbafc8d4427d1d1259a7e81a2e5b1e", "score": "0.4508385", "text": "function filter($column, $operation = IDataSource::EQUAL, $value = NULL, $chainType = NULL);", "title": "" }, { "docid": "112b3a325c85f97934b4764f3884adb9", "score": "0.45050138", "text": "public function findWhere($column, $value)\n\t{\n\t\treturn $this->model->where($column, 'LIKE', \"%$value%\");\n\t}", "title": "" }, { "docid": "ecb3d6817687a5bab5147b8cf0fbccf4", "score": "0.44518706", "text": "public function filterByNewnbr($newnbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($newnbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(BillingTableMap::COL_NEWNBR, $newnbr, $comparison);\n }", "title": "" }, { "docid": "909e59a70fe3f0f02205239b14984863", "score": "0.4436832", "text": "public function filterBySermsordnbr($sermsordnbr = null, $comparison = null)\n {\n if (is_array($sermsordnbr)) {\n $useMinMax = false;\n if (isset($sermsordnbr['min'])) {\n $this->addUsingAlias(SerialMastTableMap::COL_SERMSORDNBR, $sermsordnbr['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($sermsordnbr['max'])) {\n $this->addUsingAlias(SerialMastTableMap::COL_SERMSORDNBR, $sermsordnbr['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(SerialMastTableMap::COL_SERMSORDNBR, $sermsordnbr, $comparison);\n }", "title": "" }, { "docid": "60799f1f0400c11670e498dc308bf2f5", "score": "0.4429565", "text": "public function getCustomersNmQuery($nm_key)\n {\n\t\t$sql = $this->getQueryContent('SuggestCustomersNmQuery');\n\t\t$params = $this->getQueryParams('SuggestCustomersNmQuery');\n\t\t$sql = $this->bindSqlParams($sql,$params,$nm_key);\n\t\treturn $this->db->fireSqlFetchAll($sql,'SuggestCustomersNmQuery');\n\t}", "title": "" }, { "docid": "ed66402e290b4634d9682be85fd077c7", "score": "0.4415772", "text": "public function where_like($column_name, $value=null) {\n return $this->_add_simple_where($column_name, 'LIKE', $value);\n }", "title": "" }, { "docid": "1b06e9ca7936ee484b4d7c7294127f68", "score": "0.44009194", "text": "public function filterByServicenumber($servicenumber = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($servicenumber)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $servicenumber)) {\n $servicenumber = str_replace('*', '%', $servicenumber);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(SchoolPeer::SERVICENUMBER, $servicenumber, $comparison);\n }", "title": "" }, { "docid": "3c044c0ba4390aa6998b7a31cc705ca9", "score": "0.4366637", "text": "public function digitFilter($value) {\n\t\treturn preg_replace('/[^0-9]/', '', $value);\n\t}", "title": "" }, { "docid": "b8ea86b81ad48bcab8ecce78d4364f16", "score": "0.4343668", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'mapping': return \"kodemapping = '$key'\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "35511c2bdd637b85c2a0bb9f62cf97bd", "score": "0.4341822", "text": "public function filterByBinnbr($binnbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($binnbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(WmpickdetTableMap::COL_BINNBR, $binnbr, $comparison);\n }", "title": "" }, { "docid": "6d7f2f82fdb62e395677fdb772465989", "score": "0.43390045", "text": "public function searchByFilterPrint()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\tif(!empty($this->saldoawal_id)){\n\t\t\t$criteria->addCondition('saldoawal_id = '.$this->saldoawal_id);\n\t\t}\n\t\tif(!empty($this->rekperiod_id)){\n\t\t\t$criteria->addCondition('rekperiod_id = '.$this->rekperiod_id);\n\t\t}\n\t\t$criteria->compare('LOWER(perideawal)',strtolower($this->perideawal),true);\n\t\t$criteria->compare('LOWER(sampaidgn)',strtolower($this->sampaidgn),true);\n\t\tif(!empty($this->kursrp_id)){\n\t\t\t$criteria->addCondition('kursrp_id = '.$this->kursrp_id);\n\t\t}\n\t\t$criteria->compare('nilai',$this->nilai);\n\t\tif(!empty($this->matauang_id)){\n\t\t\t$criteria->addCondition('matauang_id = '.$this->matauang_id);\n\t\t}\n\t\t$criteria->compare('LOWER(matauang)',strtolower($this->matauang),true);\n\t\tif(!empty($this->periodeposting_id)){\n\t\t\t$criteria->addCondition('periodeposting_id = '.$this->periodeposting_id);\n\t\t}\n\t\t$criteria->compare('LOWER(periodeposting_nama)',strtolower($this->periodeposting_nama),true);\n\t\t$criteria->compare('LOWER(tglperiodeposting_awal)',strtolower($this->tglperiodeposting_awal),true);\n\t\t$criteria->compare('LOWER(tglperiodeposting_akhir)',strtolower($this->tglperiodeposting_akhir),true);\n\t\t$criteria->compare('LOWER(deskripsiperiodeposting)',strtolower($this->deskripsiperiodeposting),true);\n\t\t\n\t\tif(!empty($this->rekening5_id)){\n\t\t\t$criteria->addCondition('rekening5_id = '.$this->rekening5_id);\n\t\t}\n\t\t$criteria->compare('LOWER(kdrekening5)',strtolower($this->kdrekening5),true);\n\t\t$criteria->compare('LOWER(nmrekening5)',strtolower($this->nmrekening5),true);\n\t\t$criteria->compare('LOWER(nmrekeninglain5)',strtolower($this->nmrekeninglain5),true);\n\t\t$criteria->compare('LOWER(rekening5_nb)',strtolower($this->rekening5_nb),true);\n\t\t$criteria->compare('LOWER(keterangan)',strtolower($this->keterangan),true);\n\t\tif(!empty($this->nourutrek)){\n\t\t\t$criteria->addCondition('nourutrek = '.$this->nourutrek);\n\t\t} \n $criteria->compare('LOWER(kdstruktur)',strtolower($this->kdstruktur),true);\n $criteria->compare('LOWER(kdrincianobyek)',strtolower($this->kdrincianobyek),true);\n $criteria->compare('LOWER(kdobyek)',strtolower($this->kdobyek),true);\n $criteria->compare('LOWER(kdjenis)',strtolower($this->kdjenis),true);\n $criteria->compare('LOWER(kdkelompok)',strtolower($this->kdkelompok),true);\n\t\t$criteria->compare('rekening5_aktif',$this->rekening5_aktif);\n\t\t$criteria->compare('LOWER(kelompokrek)',strtolower($this->kelompokrek),true);\n\t\t$criteria->compare('sak',$this->sak);\n\t\t$criteria->compare('LOWER(create_time)',strtolower($this->create_time),true);\n\t\t$criteria->compare('LOWER(update_time)',strtolower($this->update_time),true);\n\t\t$criteria->compare('LOWER(create_loginpemakai_id)',strtolower($this->create_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(update_loginpemakai_id)',strtolower($this->update_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(create_ruangan)',strtolower($this->create_ruangan),true);\n\t\t$criteria->compare('jmlanggaran',$this->jmlanggaran);\n\t\t$criteria->compare('jmlsaldoawald',$this->jmlsaldoawald);\n\t\t$criteria->compare('jmlsaldoawalk',$this->jmlsaldoawalk);\n\t\t$criteria->compare('jmlmutasid',$this->jmlmutasid);\n\t\t$criteria->compare('jmlmutasik',$this->jmlmutasik);\n\t\t$criteria->compare('jmlsaldoakhird',$this->jmlsaldoakhird);\n\t\t$criteria->compare('jmlsaldoakhirk',$this->jmlsaldoakhirk);\n\t\t$criteria->order = 'nourutrek';\n\t\t$criteria->limit = -1;\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination'=>false,\n\t\t));\n\t}", "title": "" }, { "docid": "24456030fecd298d594cc21d485910f8", "score": "0.43313876", "text": "public function filterByOrdernbr($ordernbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($ordernbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(PaymentTableMap::COL_ORDERNBR, $ordernbr, $comparison);\n }", "title": "" }, { "docid": "fa92b075433840f2815ea42de04396eb", "score": "0.43012667", "text": "public function buildingName(string $value)\n {\n $this->builder->orWhere('properties.building_name', 'like', \"%{$value}%\");\n }", "title": "" }, { "docid": "69a56c3266d0a5765761c706b6064edb", "score": "0.4293648", "text": "public function filterByNit($nit = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($nit)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $nit)) {\n $nit = str_replace('*', '%', $nit);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(ProveedorPeer::NIT, $nit, $comparison);\n }", "title": "" }, { "docid": "e50c06d94ad08e4953c765e3d4faa872", "score": "0.42575127", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('id_client',$this->id_client);\n\t\t$criteria->compare('num_tc',$this->num_tc,true);\n\t\t$criteria->compare('nbr_conteneur',$this->nbr_conteneur);\n\t\t$criteria->compare('num_de',$this->num_de,true);\n\t\t$criteria->compare('num_co',$this->num_co,true);\n\t\t$criteria->compare('num_expertise',$this->num_expertise,true);\n\t\t$criteria->compare('num_facture',$this->num_facture,true);\n\t\t$criteria->compare('num_liste_colisage',$this->num_liste_colisage,true);\n\t\t$criteria->compare('num_bsc',$this->num_bsc,true);\n\t\t$criteria->compare('num_booking',$this->num_booking,true);\n\t\t$criteria->compare('num_bon_commande',$this->num_bon_commande,true);\n\t\t$criteria->compare('bae',$this->bae,true);\n\t\t$criteria->compare('faux_bel',$this->faux_bel,true);\n\t\t$criteria->compare('bul_liquidation',$this->bul_liquidation,true);\n\t\t$criteria->compare('travail_remunerer',$this->travail_remunerer,true);\n\t\t$criteria->compare('num_plomb',$this->num_plomb,true);\n\t\t$criteria->compare('page_info',$this->page_info,true);\n\t\t$criteria->compare('certificat_empotage',$this->certificat_empotage,true);\n\t\t$criteria->compare('declaration_douane',$this->declaration_douane,true);\n\t\t$criteria->compare('quitance_douane',$this->quitance_douane,true);\n\t\t$criteria->compare('recu_banq',$this->recu_banq,true);\n\t\t$criteria->compare('bon_sortie_tc',$this->bon_sortie_tc,true);\n\t\t$criteria->compare('interchange',$this->interchange,true);\n\t\t$criteria->compare('ordre_transit',$this->ordre_transit,true);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\t\t$criteria->compare('etat',$this->etat);\n\t\t$criteria->compare('img_tc',$this->img_tc,true);\n\t\t$criteria->compare('img_de',$this->img_de,true);\n\t\t$criteria->compare('img_co',$this->img_co,true);\n\t\t$criteria->compare('img_expertise',$this->img_expertise,true);\n\t\t$criteria->compare('img_facture',$this->img_facture,true);\n\t\t$criteria->compare('img_liste_colisage',$this->img_liste_colisage,true);\n\t\t$criteria->compare('img_bsc',$this->img_bsc,true);\n\t\t$criteria->compare('img_booking',$this->img_booking,true);\n\t\t$criteria->compare('img_bon_commande',$this->img_bon_commande,true);\n\t\t$criteria->compare('img_bae',$this->img_bae,true);\n\t\t$criteria->compare('img_faux_bel',$this->img_faux_bel,true);\n\t\t$criteria->compare('img_bul_liquidation',$this->img_bul_liquidation,true);\n\t\t$criteria->compare('img_travail_remunerer',$this->img_travail_remunerer,true);\n\t\t$criteria->compare('img_page_info',$this->img_page_info,true);\n\t\t$criteria->compare('img_certificat_empotage',$this->img_certificat_empotage,true);\n\t\t$criteria->compare('img_declaration_douane',$this->img_declaration_douane,true);\n\t\t$criteria->compare('img_quitance_douane',$this->img_quitance_douane,true);\n\t\t$criteria->compare('img_recu_banq',$this->img_recu_banq,true);\n\t\t$criteria->compare('img_bon_sortie_tc',$this->img_bon_sortie_tc,true);\n\t\t$criteria->compare('img_interchange',$this->img_interchange,true);\n\t\t$criteria->compare('img_ordre_transit',$this->img_ordre_transit,true);\n\t\t$criteria->compare('id_user',$this->id_user);\n\t\t$criteria->compare('numero',$this->numero,true);\n\t\t$criteria->compare('num_vgm',$this->num_vgm,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "45a7aab4ec6e6dfda08f4504fd5bb9bc", "score": "0.42557684", "text": "public function getFilter($column, $value) {\r\n\t\tif (isset($this->extraCols[$column]))\r\n\t\t\t$result = $this->extraCols[$column];\r\n\t\telse\r\n\t\t\t$result = 't.\"'.$column.'\"';\r\n\r\n\t\t$result.= ' ILIKE '.$this->db->formatQuery('%', '%'.preg_replace('/[%\\\\\\\\]/', '\\\\\\\\$0', $value).'%');\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "ddd2af8d95c145a9295348bcec06fe29", "score": "0.4236786", "text": "abstract public function filterByColumn(int $index, callable $fn);", "title": "" }, { "docid": "8ecc09acfadcd822bc0f68e8d227bde7", "score": "0.42231378", "text": "public function filterByCcno($ccno = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($ccno)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(BillingTableMap::COL_CCNO, $ccno, $comparison);\n }", "title": "" }, { "docid": "8e9792a66e7c931d5d7ab2fb8a589dee", "score": "0.4215791", "text": "public function searchPrint()\n {\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\t\t$criteria->compare('pembelianbarang_id',$this->pembelianbarang_id);\n\t\t$criteria->compare('LOWER(tglpembelian)',strtolower($this->tglpembelian),true);\n\t\t$criteria->compare('LOWER(nopembelian)',strtolower($this->nopembelian),true);\n\t\t$criteria->compare('LOWER(tgldikirim)',strtolower($this->tgldikirim),true);\n\t\t$criteria->compare('sumberdana_id',$this->sumberdana_id);\n\t\t$criteria->compare('LOWER(sumberdana_nama)',strtolower($this->sumberdana_nama),true);\n\t\t$criteria->compare('terimapersediaan_id',$this->terimapersediaan_id);\n\t\t$criteria->compare('LOWER(tglterima)',strtolower($this->tglterima),true);\n\t\t$criteria->compare('LOWER(nopenerimaan)',strtolower($this->nopenerimaan),true);\n\t\t$criteria->compare('LOWER(keterangan_persediaan)',strtolower($this->keterangan_persediaan),true);\n\t\t$criteria->compare('fakturpembelian_id',$this->fakturpembelian_id);\n\t\t$criteria->compare('LOWER(tglfaktur)',strtolower($this->tglfaktur),true);\n\t\t$criteria->compare('LOWER(nofaktur)',strtolower($this->nofaktur),true);\n\t\t$criteria->compare('LOWER(tgljatuhtempo)',strtolower($this->tgljatuhtempo),true);\n\t\t$criteria->compare('LOWER(keteranganfaktur)',strtolower($this->keteranganfaktur),true);\n\t\t$criteria->compare('totharganetto',$this->totharganetto);\n\t\t$criteria->compare('persendiscount',$this->persendiscount);\n\t\t$criteria->compare('jmldiscount',$this->jmldiscount);\n\t\t$criteria->compare('biayamaterai',$this->biayamaterai);\n\t\t$criteria->compare('totalpajakpph',$this->totalpajakpph);\n\t\t$criteria->compare('totalpajakppn',$this->totalpajakppn);\n\t\t$criteria->compare('totalhargabruto',$this->totalhargabruto);\n\t\t$criteria->compare('LOWER(nofakturpajak)',strtolower($this->nofakturpajak),true);\n\t\t$criteria->compare('instalasi_id',$this->instalasi_id);\n\t\t$criteria->compare('LOWER(instalasi_nama)',strtolower($this->instalasi_nama),true);\n\t\t$criteria->compare('ruangan_id',$this->ruangan_id);\n\t\t$criteria->compare('LOWER(ruangan_nama)',strtolower($this->ruangan_nama),true);\n\t\t$criteria->compare('syaratbayar_id',$this->syaratbayar_id);\n\t\t$criteria->compare('LOWER(syaratbayar_nama)',strtolower($this->syaratbayar_nama),true);\n\t\t$criteria->compare('terimapersdetail_id',$this->terimapersdetail_id);\n\t\t$criteria->compare('barang_id',$this->barang_id);\n\t\t$criteria->compare('LOWER(barang_kode)',strtolower($this->barang_kode),true);\n\t\t$criteria->compare('LOWER(barang_nama)',strtolower($this->barang_nama),true);\n\t\t$criteria->compare('LOWER(barang_type)',strtolower($this->barang_type),true);\n\t\t$criteria->compare('LOWER(barang_merk)',strtolower($this->barang_merk),true);\n\t\t$criteria->compare('hargabeli',$this->hargabeli);\n\t\t$criteria->compare('hargasatuan',$this->hargasatuan);\n\t\t$criteria->compare('jmlterima',$this->jmlterima);\n\t\t$criteria->compare('LOWER(satuanbeli)',strtolower($this->satuanbeli),true);\n\t\t$criteria->compare('LOWER(kondisibarang)',strtolower($this->kondisibarang),true);\n\t\t$criteria->compare('supplier_id',$this->supplier_id);\n\t\t$criteria->compare('LOWER(supplier_kode)',strtolower($this->supplier_kode),true);\n\t\t$criteria->compare('LOWER(supplier_nama)',strtolower($this->supplier_nama),true);\n\t\t$criteria->compare('bayarkesupplier_id',$this->bayarkesupplier_id);\n\t\t$criteria->compare('jurnalrekening_id',$this->jurnalrekening_id);\n // Klo limit lebih kecil dari nol itu berarti ga ada limit \n $criteria->limit=-1; \n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>false,\n ));\n }", "title": "" }, { "docid": "6069b69d87de4c23087d4a194512fdfa", "score": "0.42102692", "text": "public function criteriaSearch()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria();\n \n $filter = isset($_GET['filter'])?$_GET['filter']:null;\n $filter1 = isset($_GET['filter1'])?$_GET['filter1']:null;\n $filter2 = isset($_GET['filter2'])?$_GET['filter2']:null;\n $filter3 = isset($_GET['filter3'])?$_GET['filter3']:null;\n \n \n\t\t$criteria->addBetweenCondition('tglterimabahan',$this->tgl_awal,$this->tgl_akhir);\n \n if ($filter == 'supplier')\n {\n if (!empty($this->supplier_id))\n {\n if(is_array($this->supplier_id)){\n $criteria->addInCondition('supplier_id', $this->supplier_id);\n }\n }else{\n $criteria->addCondition('supplier_id is null');\n }\n }\n \n if ($filter1 == 'golbahanmakanan')\n {\n if(is_array($this->golbahanmakanan_id)){\n $criteria->addInCondition('golbahanmakanan_id', $this->golbahanmakanan_id);\n }else{\n $criteria->addCondition('golbahanmakanan_id is null');\n }\n }\n \n if ($filter2 == 'jenisbahanmakanan')\n {\n if(is_array($this->jenisbahanmakanan)){\n $criteria->addInCondition('jenisbahanmakanan', $this->jenisbahanmakanan);\n }else{\n $criteria->addCondition('jenisbahanmakanan is null');\n } \n }\n \n if ($filter3 == 'kelbahanmakanan')\n {\n if(is_array($this->kelbahanmakanan)){\n $criteria->addInCondition('kelbahanmakanan', $this->kelbahanmakanan);\n }else{\n $criteria->addCondition('kelbahanmakanan is null');\n } \n }\n if (!empty($this->ruangan_id)){\n $criteria->addCondition('ruangan_id = '.$this->ruangan_id);\n }\n \n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "593923f21248ce150c9073e7d88c282b", "score": "0.4204341", "text": "public function scopeSearch($query, $compras){\n return $query->where('producto','LIKE',\"%$compras%\");\n\n }", "title": "" }, { "docid": "2ca1b94eb750f202f72e465cd1a2176e", "score": "0.42009014", "text": "public function searchChambers()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('serialNum',$this->serialNum,true);\n $criteria->compare('type',$this->type);\n $criteria->compare('addedOn',$this->addedOn,true);\n $criteria->compare('addedBy',$this->addedBy);\n $criteria->addBetweenCondition('type', '1000', '1999');\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "title": "" }, { "docid": "aa0d8b81cd8b9e684603e4f2f6554c2c", "score": "0.41994134", "text": "public function criteriaSearch()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('supplier_id',$this->supplier_id);\n\t\t$criteria->compare('LOWER(supplier_kode)',strtolower($this->supplier_kode),true);\n\t\t$criteria->compare('LOWER(supplier_nama)',strtolower($this->supplier_nama),true);\n\t\t$criteria->compare('LOWER(supplier_alamat)',strtolower($this->supplier_alamat),true);\n\t\t$criteria->compare('LOWER(supplier_propinsi)',strtolower($this->supplier_propinsi),true);\n\t\t$criteria->compare('LOWER(supplier_kabupaten)',strtolower($this->supplier_kabupaten),true);\n\t\t$criteria->compare('LOWER(supplier_telp)',strtolower($this->supplier_telp),true);\n\t\t$criteria->compare('LOWER(supplier_fax)',strtolower($this->supplier_fax),true);\n\t\t$criteria->compare('LOWER(supplier_kodepos)',strtolower($this->supplier_kodepos),true);\n\t\t$criteria->compare('LOWER(supplier_npwp)',strtolower($this->supplier_npwp),true);\n\t\t$criteria->compare('LOWER(supplier_norekening)',strtolower($this->supplier_norekening),true);\n\t\t$criteria->compare('LOWER(supplier_namabank)',strtolower($this->supplier_namabank),true);\n\t\t$criteria->compare('LOWER(supplier_rekatasnama)',strtolower($this->supplier_rekatasnama),true);\n\t\t$criteria->compare('LOWER(supplier_matauang)',strtolower($this->supplier_matauang),true);\n\t\t$criteria->compare('LOWER(supplier_website)',strtolower($this->supplier_website),true);\n\t\t$criteria->compare('LOWER(supplier_email)',strtolower($this->supplier_email),true);\n\t\t$criteria->compare('LOWER(supplier_logo)',strtolower($this->supplier_logo),true);\n\t\t$criteria->compare('LOWER(supplier_cp)',strtolower($this->supplier_cp),true);\n\t\t$criteria->compare('LOWER(supplier_cp_hp)',strtolower($this->supplier_cp_hp),true);\n\t\t$criteria->compare('LOWER(supplier_cp_email)',strtolower($this->supplier_cp_email),true);\n\t\t$criteria->compare('LOWER(supplier_cp2)',strtolower($this->supplier_cp2),true);\n\t\t$criteria->compare('LOWER(supplier_cp2_hp)',strtolower($this->supplier_cp2_hp),true);\n\t\t$criteria->compare('LOWER(supplier_cp2_email)',strtolower($this->supplier_cp2_email),true);\n\t\t$criteria->compare('LOWER(supplier_jenis)',strtolower($this->supplier_jenis),true);\n\t\t$criteria->compare('supplier_termin',$this->supplier_termin);\n\t\t$criteria->compare('obatsupplier_id',$this->obatsupplier_id);\n\t\t$criteria->compare('LOWER(sumberdana_nama)',strtolower($this->sumberdana_nama),true);\n\t\t$criteria->compare('sumberdana_id',$this->sumberdana_id);\n\t\t$criteria->compare('jenisobatalkes_id',$this->jenisobatalkes_id);\n\t\t$criteria->compare('LOWER(jenisobatalkes_kode)',strtolower($this->jenisobatalkes_kode),true);\n\t\t$criteria->compare('LOWER(jenisobatalkes_nama)',strtolower($this->jenisobatalkes_nama),true);\n\t\t$criteria->compare('jenisobatalkes_farmasi',$this->jenisobatalkes_farmasi);\n\t\t$criteria->compare('generik_id',$this->generik_id);\n\t\t$criteria->compare('LOWER(generik_nama)',strtolower($this->generik_nama),true);\n\t\t$criteria->compare('obatalkes_id',$this->obatalkes_id);\n\t\t$criteria->compare('LOWER(obatalkes_barcode)',strtolower($this->obatalkes_barcode),true);\n\t\t$criteria->compare('LOWER(obatalkes_kode)',strtolower($this->obatalkes_kode),true);\n\t\t$criteria->compare('LOWER(obatalkes_nama)',strtolower($this->obatalkes_nama),true);\n\t\t$criteria->compare('LOWER(obatalkes_namalain)',strtolower($this->obatalkes_namalain),true);\n\t\t$criteria->compare('LOWER(obatalkes_golongan)',strtolower($this->obatalkes_golongan),true);\n\t\t$criteria->compare('LOWER(obatalkes_kategori)',strtolower($this->obatalkes_kategori),true);\n\t\t$criteria->compare('LOWER(obatalkes_kadarobat)',strtolower($this->obatalkes_kadarobat),true);\n\t\t$criteria->compare('satuanbesar_id',$this->satuanbesar_id);\n\t\t$criteria->compare('LOWER(satuanbesar_nama)',strtolower($this->satuanbesar_nama),true);\n\t\t$criteria->compare('kemasanbesar',$this->kemasanbesar);\n\t\t$criteria->compare('satuankecil_id',$this->satuankecil_id);\n\t\t$criteria->compare('LOWER(satuankecil_nama)',strtolower($this->satuankecil_nama),true);\n\t\t$criteria->compare('kekuatan',$this->kekuatan);\n\t\t$criteria->compare('LOWER(satuankekuatan)',strtolower($this->satuankekuatan),true);\n\t\t$criteria->compare('LOWER(tglkadaluarsa)',strtolower($this->tglkadaluarsa),true);\n\t\t$criteria->compare('minimalstok',$this->minimalstok);\n\t\t$criteria->compare('LOWER(formularium)',strtolower($this->formularium),true);\n\t\t$criteria->compare('discountinue',$this->discountinue);\n\t\t$criteria->compare('LOWER(image_obat)',strtolower($this->image_obat),true);\n\t\t$criteria->compare('LOWER(activedate)',strtolower($this->activedate),true);\n\t\t$criteria->compare('mintransaksi',$this->mintransaksi);\n\t\t$criteria->compare('obatalkes_farmasi',$this->obatalkes_farmasi);\n\t\t$criteria->compare('LOWER(noregister)',strtolower($this->noregister),true);\n\t\t$criteria->compare('LOWER(nobatch)',strtolower($this->nobatch),true);\n\t\t$criteria->compare('hargabelibesar',$this->hargabelibesar);\n\t\t$criteria->compare('diskon_persen',$this->diskon_persen);\n\t\t$criteria->compare('hargabelikecil',$this->hargabelikecil);\n\t\t$criteria->compare('ppn_persen',$this->ppn_persen);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "dcc8a475e0d3899305f126542f4d03fb", "score": "0.41980737", "text": "public function searchByFilter()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\tif(!empty($this->saldoawal_id)){\n\t\t\t$criteria->addCondition('saldoawal_id = '.$this->saldoawal_id);\n\t\t}\n\t\tif(!empty($this->rekperiod_id)){\n\t\t\t$criteria->addCondition('rekperiod_id = '.$this->rekperiod_id);\n\t\t}\n\t\t$criteria->compare('LOWER(perideawal)',strtolower($this->perideawal),true);\n\t\t$criteria->compare('LOWER(sampaidgn)',strtolower($this->sampaidgn),true);\n\t\tif(!empty($this->kursrp_id)){\n\t\t\t$criteria->addCondition('kursrp_id = '.$this->kursrp_id);\n\t\t}\n\t\t$criteria->compare('nilai',$this->nilai);\n\t\tif(!empty($this->matauang_id)){\n\t\t\t$criteria->addCondition('matauang_id = '.$this->matauang_id);\n\t\t}\n\t\t$criteria->compare('LOWER(matauang)',strtolower($this->matauang),true);\n\t\tif(!empty($this->periodeposting_id)){\n\t\t\t$criteria->addCondition('periodeposting_id = '.$this->periodeposting_id);\n\t\t}\n\t\t$criteria->compare('LOWER(periodeposting_nama)',strtolower($this->periodeposting_nama),true);\n\t\t$criteria->compare('LOWER(tglperiodeposting_awal)',strtolower($this->tglperiodeposting_awal),true);\n\t\t$criteria->compare('LOWER(tglperiodeposting_akhir)',strtolower($this->tglperiodeposting_akhir),true);\n\t\t$criteria->compare('LOWER(deskripsiperiodeposting)',strtolower($this->deskripsiperiodeposting),true);\n\t\t\n\t\tif(!empty($this->rekening5_id)){\n\t\t\t$criteria->addCondition('rekening5_id = '.$this->rekening5_id);\n\t\t}\n\t\t$criteria->compare('LOWER(kdrekening5)',strtolower($this->kdrekening5),true);\n\t\t$criteria->compare('LOWER(nmrekening5)',strtolower($this->nmrekening5),true);\n\t\t$criteria->compare('LOWER(nmrekeninglain5)',strtolower($this->nmrekeninglain5),true);\n\t\t$criteria->compare('LOWER(rekening5_nb)',strtolower($this->rekening5_nb),true);\n\t\t$criteria->compare('LOWER(keterangan)',strtolower($this->keterangan),true);\n\t\tif(!empty($this->nourutrek)){\n\t\t\t$criteria->addCondition('nourutrek = '.$this->nourutrek);\n\t\t} \n $criteria->compare('LOWER(kdstruktur)',strtolower($this->kdstruktur),true);\n $criteria->compare('LOWER(kdrincianobyek)',strtolower($this->kdrincianobyek),true);\n $criteria->compare('LOWER(kdobyek)',strtolower($this->kdobyek),true);\n $criteria->compare('LOWER(kdjenis)',strtolower($this->kdjenis),true);\n $criteria->compare('LOWER(kdkelompok)',strtolower($this->kdkelompok),true);\n\t\t$criteria->compare('rekening5_aktif',$this->rekening5_aktif);\n\t\t$criteria->compare('LOWER(kelompokrek)',strtolower($this->kelompokrek),true);\n\t\t$criteria->compare('sak',$this->sak);\n\t\t$criteria->compare('LOWER(create_time)',strtolower($this->create_time),true);\n\t\t$criteria->compare('LOWER(update_time)',strtolower($this->update_time),true);\n\t\t$criteria->compare('LOWER(create_loginpemakai_id)',strtolower($this->create_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(update_loginpemakai_id)',strtolower($this->update_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(create_ruangan)',strtolower($this->create_ruangan),true);\n\t\t$criteria->compare('jmlanggaran',$this->jmlanggaran);\n\t\t$criteria->compare('jmlsaldoawald',$this->jmlsaldoawald);\n\t\t$criteria->compare('jmlsaldoawalk',$this->jmlsaldoawalk);\n\t\t$criteria->compare('jmlmutasid',$this->jmlmutasid);\n\t\t$criteria->compare('jmlmutasik',$this->jmlmutasik);\n\t\t$criteria->compare('jmlsaldoakhird',$this->jmlsaldoakhird);\n\t\t$criteria->compare('jmlsaldoakhirk',$this->jmlsaldoakhirk);\n\t\t$criteria->order = 'nourutrek';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "2720605ca2a59956a7b71053404c7720", "score": "0.41945013", "text": "function ProcessBillNumber()\n\t\t{\n\t\t\tif(isset($_REQUEST[\"val\"]))\t\t\t\n\t\t\t{\n\t\t\t\t$string = $_REQUEST[\"val\"];\n\t\t\t\t$number = ereg_replace(\"[^0-9]\", \"\", $string); \t\t\t\t\n\t\t\t\t$legtype = strtoupper(ereg_replace(\"[^A-Z]\", \"\", $string));\t\t\t\t \n\t\t\t\t\n\t\t\t\t$return = $this->oModel->checkBillNumber($legtype, $number);\n\t\t\t\t//echo $return;\n\t\t\t\tdie($return);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d1656b50c4eaa3b37365e3ec9960655b", "score": "0.4189303", "text": "public function where_not_like($column_name, $value=null) {\n return $this->_add_simple_where($column_name, 'NOT LIKE', $value);\n }", "title": "" }, { "docid": "724efe372b18755e0ba694f1fc8e3988", "score": "0.41882643", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('detail_id',$this->detail_id);\n\t\t$criteria->compare('detail_price',$this->detail_price,true);\n\t\t$criteria->compare('bonus_price',$this->bonus_price,true);\n\t\t$criteria->compare('detail_amount',$this->detail_amount);\n\t\t$criteria->compare('weight',$this->weight,true);\n\t\t$criteria->compare('detail_send_amount',$this->detail_send_amount);\n\t\t$criteria->compare('detail_send_weight',$this->detail_send_weight,true);\n\t\t$criteria->compare('detail_output_amount',$this->detail_output_amount);\n\t\t$criteria->compare('detail_output_weight',$this->detail_output_weight,true);\n\t\t$criteria->compare('detail_warehouse_output_amount',$this->detail_warehouse_output_amount);\n\t\t$criteria->compare('detail_warehouse_output_weight',$this->detail_warehouse_output_weight,true);\n\t\t$criteria->compare('detail_card_id',$this->detail_card_id,true);\n\t\t$criteria->compare('detail_length',$this->detail_length);\n\t\t$criteria->compare('product_std',$this->product_std,true);\n\t\t$criteria->compare('product_name',$this->product_name,true);\n\t\t$criteria->compare('product_code',$this->product_code,true);\n\t\t$criteria->compare('texture_std',$this->texture_std,true);\n\t\t$criteria->compare('texture_name',$this->texture_name,true);\n\t\t$criteria->compare('texture_code',$this->texture_code,true);\n\t\t$criteria->compare('brand_std',$this->brand_std,true);\n\t\t$criteria->compare('brand_name',$this->brand_name,true);\n\t\t$criteria->compare('brand_code',$this->brand_code,true);\n\t\t$criteria->compare('rand_std',$this->rand_std,true);\n\t\t$criteria->compare('rand_name',$this->rand_name,true);\n\t\t$criteria->compare('rand_code',$this->rand_code,true);\n\t\t$criteria->compare('main_id',$this->main_id);\n\t\t$criteria->compare('main_type',$this->main_type,true);\n\t\t$criteria->compare('main_title_id',$this->main_title_id);\n\t\t$criteria->compare('title_name',$this->title_name,true);\n\t\t$criteria->compare('title_code',$this->title_code,true);\n\t\t$criteria->compare('customer_id',$this->customer_id);\n\t\t$criteria->compare('customer_name',$this->customer_name,true);\n\t\t$criteria->compare('customer_short_name',$this->customer_short_name,true);\n\t\t$criteria->compare('customer_code',$this->customer_code,true);\n\t\t$criteria->compare('owner_company_id',$this->owner_company_id);\n\t\t$criteria->compare('owner_company_name',$this->owner_company_name,true);\n\t\t$criteria->compare('owner_company_short_name',$this->owner_company_short_name,true);\n\t\t$criteria->compare('owner_company_code',$this->owner_company_code,true);\n\t\t$criteria->compare('team_id',$this->team_id);\n\t\t$criteria->compare('team_name',$this->team_name,true);\n\t\t$criteria->compare('is_yidan',$this->is_yidan);\n\t\t$criteria->compare('warehouse_id',$this->warehouse_id);\n\t\t$criteria->compare('warehouse_name',$this->warehouse_name,true);\n\t\t$criteria->compare('warehouse_code',$this->warehouse_code,true);\n\t\t$criteria->compare('main_amount',$this->main_amount);\n\t\t$criteria->compare('main_weight',$this->main_weight,true);\n\t\t$criteria->compare('main_output_amount',$this->main_output_amount);\n\t\t$criteria->compare('main_output_weight',$this->main_output_weight,true);\n\t\t$criteria->compare('confirm_amount',$this->confirm_amount);\n\t\t$criteria->compare('confirm_weight',$this->confirm_weight,true);\n\t\t$criteria->compare('confirm_status',$this->confirm_status);\n\t\t$criteria->compare('has_bonus_price',$this->has_bonus_price);\n\t\t$criteria->compare('comment',$this->comment,true);\n\t\t$criteria->compare('date_extract',$this->date_extract);\n\t\t$criteria->compare('travel',$this->travel,true);\n\t\t$criteria->compare('company_contact_id',$this->company_contact_id);\n\t\t$criteria->compare('company_contact_name',$this->company_contact_name,true);\n\t\t$criteria->compare('company_contact_mobile',$this->company_contact_mobile,true);\n\t\t$criteria->compare('common_id',$this->common_id);\n\t\t$criteria->compare('form_type',$this->form_type,true);\n\t\t$criteria->compare('form_sn',$this->form_sn,true);\n\t\t$criteria->compare('created_at',$this->created_at);\n\t\t$criteria->compare('created_by',$this->created_by);\n\t\t$criteria->compare('created_by_nickname',$this->created_by_nickname,true);\n\t\t$criteria->compare('form_time',$this->form_time,true);\n\t\t$criteria->compare('form_status',$this->form_status,true);\n\t\t$criteria->compare('approved_at',$this->approved_at);\n\t\t$criteria->compare('approved_by',$this->approved_by);\n\t\t$criteria->compare('approved_by_nickname',$this->approved_by_nickname,true);\n\t\t$criteria->compare('owned_by',$this->owned_by);\n\t\t$criteria->compare('owned_by_nickname',$this->owned_by_nickname,true);\n\t\t$criteria->compare('is_deleted',$this->is_deleted);\n\t\t$criteria->compare('last_update',$this->last_update);\n\t\t$criteria->compare('last_updated_by',$this->last_updated_by);\n\t\t$criteria->compare('last_updated_by_nickname',$this->last_updated_by_nickname,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "a971db17366cd6df43b3d915a5c55e0f", "score": "0.4187682", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('nhanvien_id',$this->nhanvien_id);\n\t\t$criteria->compare('nhanvien_ma',$this->nhanvien_ma,true);\n\t\t$criteria->compare('bophan_id',$this->bophan_id);\n\t\t$criteria->compare('phongban_id',$this->phongban_id);\n\t\t$criteria->compare('chucdanh_id',$this->chucdanh_id);\n\t\t$criteria->compare('nhanvien_ho',$this->nhanvien_ho,true);\n\t\t$criteria->compare('nhanvien_ten',$this->nhanvien_ten,true);\n\t\t$criteria->compare('nhanvien_mst',$this->nhanvien_mst,true);\n\t\t$criteria->compare('nhanvien_cmnd',$this->nhanvien_cmnd,true);\n\t\t$criteria->compare('nhanvien_cmnd_ngaycap',$this->nhanvien_cmnd_ngaycap,true);\n\t\t$criteria->compare('nhanvien_cmnd_noicap',$this->nhanvien_cmnd_noicap,true);\n\t\t$criteria->compare('nhanvien_ngaysinh',$this->nhanvien_ngaysinh,true);\n\t\t$criteria->compare('nhanvien_noisinh',$this->nhanvien_noisinh,true);\n\t\t$criteria->compare('nhanvien_gioitinh',$this->nhanvien_gioitinh,true);\n\t\t$criteria->compare('nhanvien_dienthoai',$this->nhanvien_dienthoai,true);\n\t\t$criteria->compare('nhanvien_dienthoai_nhonhan',$this->nhanvien_dienthoai_nhonhan,true);\n\t\t$criteria->compare('nhanvien_hinhanh',$this->nhanvien_hinhanh,true);\n\t\t$criteria->compare('nhanvien_ngayvao',$this->nhanvien_ngayvao,true);\n\t\t$criteria->compare('nhanvien_trangthai',$this->nhanvien_trangthai);\n\t\t$criteria->compare('nhanvien_trangthai_nghiviec',$this->nhanvien_trangthai_nghiviec);\n\t\t$criteria->compare('nhanvien_thoigianthu',$this->nhanvien_thoigianthu,true);\n\t\t$criteria->compare('nhanvien_ngayky_hdld',$this->nhanvien_ngayky_hdld,true);\n\t\t$criteria->compare('nhanvien_ngaydangky_baohiem',$this->nhanvien_ngaydangky_baohiem,true);\n\t\t$criteria->compare('nhanvien_nganhang',$this->nhanvien_nganhang,true);\n\t\t$criteria->compare('nhanvien_sotaikhoan',$this->nhanvien_sotaikhoan,true);\n\t\t$criteria->compare('nhanvien_ghichu',$this->nhanvien_ghichu,true);\n\t\t$criteria->compare('nhanvien_phepnam',$this->nhanvien_phepnam,true);\n\t\t$criteria->compare('nhanvien_hoten_search',$this->nhanvien_hoten_search,true);\n\t\t$criteria->compare('admin_id',$this->admin_id);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "d1e60f5cde12b6dae1b6bb9cd84b69de", "score": "0.41769433", "text": "public function setChargeNumber($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->charge_number !== $v) {\n\t\t\t$this->charge_number = $v;\n\t\t\t$this->modifiedColumns[] = MwgfApplicationPeer::CHARGE_NUMBER;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f5a20355b6fd7cd6e70bd88e17deae8c", "score": "0.4175417", "text": "public function search($rubro)\n {\n switch ($rubro) {\n case 'material-dxi':\n $query = PedidoInsumos::find()->andWhere(['VD_DEPOSITO' => '53']);\n break;\n case 'descartable':\n $query = PedidoInsumos::find()->andWhere(['VD_DEPOSITO' => '51']);\n break;\n case 'libreria':\n $query = PedidoInsumos::find()->andWhere(['VD_DEPOSITO' => '57']);\n break;\n\n default:\n # code...\n break;\n }\n\n $query->orderBy(['VD_FECHA' => SORT_DESC, 'VD_HORA' => SORT_DESC]);\n // add conditions that should always apply here\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n\n\n // $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n // grid filtering conditions\n // $query->andFilterWhere([\n // 'VD_NUMVALE' => $this->VD_NUMVALE,\n // 'VD_FECHA' => $this->VD_FECHA,\n // 'VD_HORA' => $this->VD_HORA,\n // 'VD_PROCESADO' => $this->VD_PROCESADO,\n // ]);\n //\n // $query->andFilterWhere(['like', 'VD_SERSOL', $this->VD_SERSOL])\n // ->andFilterWhere(['like', 'VD_SUPERV', $this->VD_SUPERV])\n // ->andFilterWhere(['like', 'VD_DEPOSITO', $this->VD_DEPOSITO]);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "8a3d924dc3171d568e19d86a99a421cc", "score": "0.41685408", "text": "public function scopeWhereLike($query, $column, $value, $boolean = 'and')\n {\n return $query->where($column, 'LIKE', \"%$value%\", $boolean);\n }", "title": "" }, { "docid": "7604cc51144bd2234ad9da188950ec3a", "score": "0.4167987", "text": "public function setArcudunsnbr($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->arcudunsnbr !== $v) {\n $this->arcudunsnbr = $v;\n $this->modifiedColumns[CustomerTableMap::COL_ARCUDUNSNBR] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "adff5277c02b5955058b0dfeb457a32a", "score": "0.41563022", "text": "public function filter(Builder $dataSource)\r\n {\r\n $model = $dataSource->getModel();\r\n if ($this->_field === static::COLUMN_ID) {\r\n $expr = $model->getPrimary();\r\n } elseif ($this->_field === static::COLUMN_NAME) {\r\n $expr = $model->getNameExpr();\r\n } else {\r\n $expr = $this->_field;\r\n }\r\n $boost = $this->getBoostParam();\r\n $slop = $this->getSlopParam();\r\n\r\n if (null === $this->_value) {\r\n $filter = new \\Elastica\\Query\\Missing($expr);\r\n //$filterMissing->addParam(\"existence\", true);\r\n //$filterMissing->addParam(\"null_value\", true);\r\n $boost = $this->getBoostParam();\r\n } else {\r\n $filter = new \\Elastica\\Query\\BoolQuery();\r\n if ($this->_criteria === static::CRITERIA_EQ || $this->_criteria === static::CRITERIA_IN) {\r\n $filterTerm = new \\Elastica\\Query\\Term();\r\n $filterTerm->setTerm($expr, $this->_value, $boost);\r\n $filter->addMust($filterTerm);\r\n } elseif ($this->_criteria === static::CRITERIA_NOTEQ || $this->_criteria === static::CRITERIA_NOTIN) {\r\n $filterTerm = new \\Elastica\\Query\\Term();\r\n $filterTerm->setTerm($expr, $this->_value, $boost);\r\n $filter->addMustNot($filterTerm);\r\n } elseif ($this->_criteria === static::CRITERIA_LIKE) {\r\n $filterQueryString = new \\Elastica\\Query\\QueryString($this->_value);\r\n $filterQueryString->setDefaultField($expr);\r\n $filter->addMust($filterQueryString);\r\n } elseif ($this->_criteria === static::CRITERIA_BEGINS) {\r\n //$filter = new \\Elastica\\Query\\Prefix();\r\n //$filter->setPrefix($expr, $this->_value);\r\n //$filterBool->addMust($filter);\r\n $filterQueryString = new \\Elastica\\Query\\QueryString($this->_value);\r\n $filterQueryString->setDefaultField($expr);\r\n $filter->addMust($filterQueryString);\r\n } elseif ($this->_criteria === static::CRITERIA_MORE) {\r\n $filterRange = new \\Elastica\\Query\\Range($expr, ['gt' => $this->_value]);\r\n $filter->addMust($filterRange);\r\n } elseif ($this->_criteria === static::CRITERIA_LESS) {\r\n $filterRange = new \\Elastica\\Query\\Range($expr, ['lt' => $this->_value]);\r\n $filter->addMust($filterRange);\r\n } elseif ($this->_criteria === static::CRITERIA_MORER) {\r\n $filterRange = new \\Elastica\\Query\\Range($expr, ['gte' => $this->_value]);\r\n $filters[] = $filter;\r\n } elseif ($this->_criteria === static::CRITERIA_LESSER) {\r\n $filterRange = new \\Elastica\\Query\\Range($expr, ['lte' => $this->_value]);\r\n $filters[] = $filter;\r\n }\r\n }\r\n\r\n return $filter;\r\n\r\n }", "title": "" }, { "docid": "21a28bc3887254c46d1d93c2bbf12438", "score": "0.4153728", "text": "function getListFilter($col,$key) {\n\t\t\tif($col == 'unit') {\n\t\t\t\tglobal $conn, $conf;\n\t\t\t\trequire_once($conf['gate_dir'].'model/m_unit.php');\n\t\t\t\t\n\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\n\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t}\n\t\t\tif($col == 'bulan')\n\t\t\t\treturn \"substring(cast(cast(r.tglkpb as date) as varchar),6,2) = '$key'\";\n\t\t\tif($col == 'tahun')\n\t\t\t\treturn \"substring(cast(cast(r.tglkpb as date) as varchar),1,4) = '$key'\";\n\t\t\tif($col == 'bulankgb')\n\t\t\t\treturn \"substring(cast(cast(r.tglkgb as date) as varchar),6,2) = '$key'\";\n\t\t\tif($col == 'tahunkgb')\n\t\t\t\treturn \"substring(cast(cast(r.tglkgb as date) as varchar),1,4) = '$key'\";\n\t\t}", "title": "" }, { "docid": "5daf403bb51d5177acd73d5992f0d470", "score": "0.41475797", "text": "public function findBy(string $column, $value);", "title": "" }, { "docid": "5daf403bb51d5177acd73d5992f0d470", "score": "0.41475797", "text": "public function findBy(string $column, $value);", "title": "" }, { "docid": "b2c9687fb672370196a5d849cdcd0435", "score": "0.414754", "text": "public function filterBySermsernbr($sermsernbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($sermsernbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(SerialMastTableMap::COL_SERMSERNBR, $sermsernbr, $comparison);\n }", "title": "" }, { "docid": "ea11d5b7873f64ef8114ddd10c40d986", "score": "0.41405994", "text": "public function filterBySaleordnbr($saleordnbr = null, $comparison = null)\n {\n if (is_array($saleordnbr)) {\n $useMinMax = false;\n if (isset($saleordnbr['min'])) {\n $this->addUsingAlias(OrdrtotTableMap::COL_SALEORDNBR, $saleordnbr['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($saleordnbr['max'])) {\n $this->addUsingAlias(OrdrtotTableMap::COL_SALEORDNBR, $saleordnbr['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(OrdrtotTableMap::COL_SALEORDNBR, $saleordnbr, $comparison);\n }", "title": "" }, { "docid": "fea7e8b3de8b364b1983afaab53ec5ed", "score": "0.41405475", "text": "public function buscar($campo=null,$filtro=null,$combo=null)\n\t{\n\t\t$modelo = $this->modelClass;\n\t\t$parametros['conditions'] = (!empty($campo) && !empty($filtro)) ? $campo.' like \"%'.$filtro.'%\"' : array();\n\t\t$lista = $this->$modelo->find('list',$parametros);\n\t\t$this->set('lista',$lista);\n\t\t$this->set('combo',$combo);\n\t\t$this->render('../cpweb_crud/buscar');\n\t}", "title": "" }, { "docid": "998c8ef9d02d614163e950120bf822db", "score": "0.41404173", "text": "function check_bankcard($code_bank,$bank_name,$cmnd){\n $sql = \"SELECT count(*) from bank_card,customers\n WHERE bank_card.CMND_customer = $cmnd and bank_card.bank_name = $bank_name and (bank_card.money_in_bankcard > 1000000) and bank_card.code_bank=$code_bank\";\n $this->setQuery($sql);\n return $this->loadRow();\n }", "title": "" }, { "docid": "a0465db485cf9e552a0834f5fffa27f4", "score": "0.41335523", "text": "function getListFilter($col,$key) {\n\t\t\tif($col == 'unit') {\n\t\t\t\tglobal $conn, $conf;\n\t\t\t\trequire_once($conf['gate_dir'].'model/m_unit.php');\n\t\t\t\t\n\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\n\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t}\n\t\t\tif($col == 'bulan')\n\t\t\t\treturn \"substring(cast(cast(r.tglpengajuan as date) as varchar),6,2) = '$key'\";\n\t\t\tif($col == 'tahun')\n\t\t\t\treturn \"substring(cast(cast(r.tglpengajuan as date) as varchar),1,4) = '$key'\";\n\t\t}", "title": "" }, { "docid": "bc18033db635e3db7c3bdd545d77534d", "score": "0.4121826", "text": "public function searchPrint()\n {\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\t\t$criteria->compare('pasienmorbiditas_id',$this->pasienmorbiditas_id);\n\t\t$criteria->compare('kamarruangan_id',$this->kamarruangan_id);\n\t\t$criteria->compare('kelompokdiagnosa_id',$this->kelompokdiagnosa_id);\n\t\t$criteria->compare('ruangan_id',$this->ruangan_id);\n\t\t$criteria->compare('pasienadmisi_id',$this->pasienadmisi_id);\n\t\t$criteria->compare('pasien_id',$this->pasien_id);\n\t\t$criteria->compare('jenisin_id',$this->jenisin_id);\n\t\t$criteria->compare('sebabdiagnosa_id',$this->sebabdiagnosa_id);\n\t\t$criteria->compare('pendaftaran_id',$this->pendaftaran_id);\n\t\t$criteria->compare('pegawai_id',$this->pegawai_id);\n\t\t$criteria->compare('kelompokumur_id',$this->kelompokumur_id);\n\t\t$criteria->compare('penyebabluarcedera_id',$this->penyebabluarcedera_id);\n\t\t$criteria->compare('diagnosa_id',$this->diagnosa_id);\n\t\t$criteria->compare('jenisketunaan_id',$this->jenisketunaan_id);\n\t\t$criteria->compare('jeniskasuspenyakit_id',$this->jeniskasuspenyakit_id);\n\t\t$criteria->compare('golonganumur_id',$this->golonganumur_id);\n\t\t$criteria->compare('morfologineoplasma_id',$this->morfologineoplasma_id);\n\t\t$criteria->compare('sebabin_id',$this->sebabin_id);\n\t\t$criteria->compare('diagnosaicdix_id',$this->diagnosaicdix_id);\n\t\t$criteria->compare('LOWER(tglmorbiditas)',strtolower($this->tglmorbiditas),true);\n\t\t$criteria->compare('LOWER(kasusdiagnosa)',strtolower($this->kasusdiagnosa),true);\n\t\t$criteria->compare('umur_0_28hr',$this->umur_0_28hr);\n\t\t$criteria->compare('umur_28hr_1thn',$this->umur_28hr_1thn);\n\t\t$criteria->compare('umur_1_4thn',$this->umur_1_4thn);\n\t\t$criteria->compare('umur_5_14thn',$this->umur_5_14thn);\n\t\t$criteria->compare('umur_15_24thn',$this->umur_15_24thn);\n\t\t$criteria->compare('umur_25_44thn',$this->umur_25_44thn);\n\t\t$criteria->compare('umur_45_64thn',$this->umur_45_64thn);\n\t\t$criteria->compare('umur_65',$this->umur_65);\n\t\t$criteria->compare('infeksinosokomial',$this->infeksinosokomial);\n\t\t$criteria->compare('LOWER(create_time)',strtolower($this->create_time),true);\n\t\t$criteria->compare('LOWER(update_time)',strtolower($this->update_time),true);\n\t\t$criteria->compare('LOWER(create_loginpemakai_id)',strtolower($this->create_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(update_loginpemakai_id)',strtolower($this->update_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(create_ruangan)',strtolower($this->create_ruangan),true);\n // Klo limit lebih kecil dari nol itu berarti ga ada limit \n $criteria->limit=-1; \n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>false,\n ));\n }", "title": "" }, { "docid": "59c320824186b95f50f809186b1f33e6", "score": "0.41193113", "text": "public function filterByArcdordrnbr($arcdordrnbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($arcdordrnbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ArPaymentPendingTableMap::COL_ARCDORDRNBR, $arcdordrnbr, $comparison);\n }", "title": "" }, { "docid": "9e63149885da69c05cc799856f6a4cb4", "score": "0.41066417", "text": "public function filterByUsprordrnbr($usprordrnbr = null, $comparison = null)\n {\n if (is_array($usprordrnbr)) {\n $useMinMax = false;\n if (isset($usprordrnbr['min'])) {\n $this->addUsingAlias(UserLastPrintJobTableMap::COL_USPRORDRNBR, $usprordrnbr['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($usprordrnbr['max'])) {\n $this->addUsingAlias(UserLastPrintJobTableMap::COL_USPRORDRNBR, $usprordrnbr['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(UserLastPrintJobTableMap::COL_USPRORDRNBR, $usprordrnbr, $comparison);\n }", "title": "" }, { "docid": "46ef4b80f2b7b5f28948dd5c7caea83c", "score": "0.4099318", "text": "public function filterByIdLike($value) {\n $this->_filter->like($this->_nameMapping['id'], '%'.$value.'%');\n }", "title": "" }, { "docid": "2118967a64d0c1e1126d3e173aaccd9c", "score": "0.40987977", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('IdNotaCredito', $this->IdNotaCredito, true);\n $criteria->compare('AutorizacionSRI', $this->AutorizacionSRI, true);\n $criteria->compare('FechaAutorizacion', $this->FechaAutorizacion, true);\n $criteria->compare('Ambiente', $this->Ambiente);\n $criteria->compare('TipoEmision', $this->TipoEmision);\n $criteria->compare('RazonSocial', $this->RazonSocial, true);\n $criteria->compare('NombreComercial', $this->NombreComercial, true);\n $criteria->compare('Ruc', $this->Ruc, true);\n $criteria->compare('ClaveAcceso', $this->ClaveAcceso, true);\n $criteria->compare('CodigoDocumento', $this->CodigoDocumento, true);\n $criteria->compare('Establecimiento', $this->Establecimiento, true);\n $criteria->compare('PuntoEmision', $this->PuntoEmision, true);\n $criteria->compare('Secuencial', $this->Secuencial, true);\n $criteria->compare('DireccionMatriz', $this->DireccionMatriz, true);\n $criteria->compare('FechaEmision', $this->FechaEmision, true);\n $criteria->compare('DireccionEstablecimiento', $this->DireccionEstablecimiento, true);\n $criteria->compare('ContribuyenteEspecial', $this->ContribuyenteEspecial);\n $criteria->compare('ObligadoContabilidad', $this->ObligadoContabilidad, true);\n $criteria->compare('TipoIdentificacionComprador', $this->TipoIdentificacionComprador, true);\n $criteria->compare('RazonSocialComprador', $this->RazonSocialComprador, true);\n $criteria->compare('IdentificacionComprador', $this->IdentificacionComprador, true);\n $criteria->compare('Rise', $this->Rise, true);\n $criteria->compare('CodDocModificado', $this->CodDocModificado, true);\n $criteria->compare('NumDocModificado', $this->NumDocModificado, true);\n $criteria->compare('FechaEmisionDocModificado', $this->FechaEmisionDocModificado, true);\n $criteria->compare('TotalSinImpuesto', $this->TotalSinImpuesto, true);\n $criteria->compare('ValorModificacion', $this->ValorModificacion, true);\n $criteria->compare('MotivoModificacion', $this->MotivoModificacion, true);\n $criteria->compare('Moneda', $this->Moneda, true);\n $criteria->compare('UsuarioCreador', $this->UsuarioCreador, true);\n $criteria->compare('EmailResponsable', $this->EmailResponsable, true);\n $criteria->compare('EstadoDocumento', $this->EstadoDocumento, true);\n $criteria->compare('DescripcionError', $this->DescripcionError, true);\n $criteria->compare('CodigoError', $this->CodigoError, true);\n $criteria->compare('DirectorioDocumento', $this->DirectorioDocumento, true);\n $criteria->compare('NombreDocumento', $this->NombreDocumento, true);\n $criteria->compare('GeneradoXls', $this->GeneradoXls);\n $criteria->compare('SecuencialERP', $this->SecuencialERP, true);\n $criteria->compare('Estado', $this->Estado);\n $criteria->compare('IdLote', $this->IdLote, true);\n $criteria->compare('CodigoTransaccionERP', $this->CodigoTransaccionERP, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "c5dcb91eccc54e2d4ab5f5217b35ddb9", "score": "0.409273", "text": "public function columnFilter($table, $column, $value)\n {\n $sql = 'SELECT * FROM ' . $table . ' WHERE `' . str_replace('`', '', $column) . '` = :value';\n $stm = $this->pdo->prepare($sql);\n $stm->bindValue(':value', $value);\n $success = $stm->execute();\n $row = $stm->fetch(PDO::FETCH_ASSOC);\n return ($success) ? $row : [];\n }", "title": "" }, { "docid": "35fc9da937b05cd8bac51d7ca83fcd7b", "score": "0.40919524", "text": "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('SupplierNo',$this->SupplierNo,true);\n\t\t$criteria->compare('SType_ID',$this->SType_ID);\n\t\t$criteria->compare('SupplierType',$this->SupplierType,true);\n\t\t$criteria->compare('TypeDescription',$this->TypeDescription,true);\n\t\t$criteria->compare('Location',$this->Location,true);\n\t\t$criteria->compare('Country_ID',$this->Country_ID);\n\t\t$criteria->compare('CountryName',$this->CountryName,true);\n\t\t$criteria->compare('SupplierName',$this->SupplierName,true);\n\t\t$criteria->compare('RegistrationNo',$this->RegistrationNo,true);\n\t\t$criteria->compare('UserID',$this->UserID,true);\n\t\t$criteria->compare('Password',$this->Password,true);\n\t\t$criteria->compare('ZipCode',$this->ZipCode,true);\n\t\t$criteria->compare('Address',$this->Address,true);\n\t\t$criteria->compare('Tel',$this->Tel,true);\n\t\t$criteria->compare('Fax',$this->Fax,true);\n\t\t$criteria->compare('Mobile',$this->Mobile,true);\n\t\t$criteria->compare('Email1',$this->Email1,true);\n\t\t$criteria->compare('Email2',$this->Email2,true);\n\t\t$criteria->compare('Website',$this->Website,true);\n\t\t$criteria->compare('BankName',$this->BankName,true);\n\t\t$criteria->compare('BranchName',$this->BranchName,true);\n\t\t$criteria->compare('BranchAddress',$this->BranchAddress,true);\n\t\t$criteria->compare('BeneficiaryName',$this->BeneficiaryName,true);\n\t\t$criteria->compare('AccountNo',$this->AccountNo,true);\n\t\t$criteria->compare('SLevel_ID',$this->SLevel_ID);\n\t\t$criteria->compare('Level_Name',$this->Level_Name,true);\n\t\t$criteria->compare('Currency_ID',$this->Currency_ID);\n\t\t$criteria->compare('CurrencyNo',$this->CurrencyNo,true);\n\t\t$criteria->compare('Language_Pair_ID',$this->Language_Pair_ID,true);\n\t\t$criteria->compare('Language_Pair_Name',$this->Language_Pair_Name,true);\n\t\t$criteria->compare('ATask_ID',$this->ATask_ID,true);\n\t\t$criteria->compare('Task_Name',$this->Task_Name,true);\n\t\t$criteria->compare('MIndustry_ID',$this->MIndustry_ID,true);\n\t\t$criteria->compare('Industry_Name',$this->Industry_Name,true);\n\t\t$criteria->compare('Status',$this->Status,true);\n\t\t$criteria->compare('RegDate',$this->RegDate,true);\n\t\t$criteria->compare('ModifyDate',$this->ModifyDate,true);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "a5c62f7c6670b5e0e8d865e333c8a6b0", "score": "0.40740997", "text": "public function filterWhere(Builder $dataSource)\r\n {\r\n\t\tif (!$this->_cache) {\r\n\t\t\treturn parent::filterWhere($dataSource);\r\n\t\t}\r\n\t\tif (count($this->_value) == 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (count($this->_value) == 1) {\r\n\t\t\t$this->_value = $this->_value[0];\r\n\t\t\treturn parent::filterWhere($dataSource);\r\n\t\t}\r\n\r\n $column = array_keys($this->_columns)[0];\r\n\r\n $model = $dataSource->getModel();\r\n if ($column === static::COLUMN_ID) {\r\n $expr = $model->getPrimary();\r\n $alias = $dataSource->getAlias();\r\n } elseif ($column=== static::COLUMN_NAME) {\r\n $expr = $model->getNameExpr();\r\n $alias = $dataSource->getAlias();\r\n } else {\r\n $expr = $column;\r\n $alias = $dataSource->getCorrelationName($column);\r\n }\r\n if (!$alias) {\r\n throw new \\Engine\\Exception('Field \\''.$column.'\\' not found in query builder');\r\n }\r\n $compare = $this->getCompareCriteria($this->_criteria, $this->_value);\r\n\r\n if (null == $this->_value) {\r\n return $alias.'.'.$expr.' '.$compare.' NULL';\r\n }\r\n\r\n $this->setBoundParamKey($alias.'_'.$expr);\r\n\r\n return $alias.'.'.$expr.' '.$compare.' (:'.$this->getBoundParamKey().':)';\r\n\t}", "title": "" }, { "docid": "c31fe2d7af16c90252f5cb4d4759be76", "score": "0.4069537", "text": "function getListFilter($col,$key,$tahun='',$bulan='') {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'jenisrawat': \n\t\t\t\t return \"p.idjenisrawat = '$key'\";\n\t\t\t break;\n\t\t\t\tcase 'periode': \n\t\t\t\t\treturn \"datepart(year,tglpengajuan) = '$tahun' and datepart(month,tglpengajuan) = '$bulan' \"; \n\t\t\t\tbreak;\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once('m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"infoleft >= \".(int)$row['infoleft'].\" and inforight <= \".(int)$row['inforight'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "db57b3b590a240b54aac6aa964e73cce", "score": "0.40664276", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('jenistindakanrm_id',$this->jenistindakanrm_id);\n\t\t$criteria->compare('jenistindakanrm_kode',$this->jenistindakanrm_kode,true);\n\t\t$criteria->compare('jenistindakanrm_urutan',$this->jenistindakanrm_urutan);\n\t\t$criteria->compare('jenistindakanrm_nama',$this->jenistindakanrm_nama,true);\n\t\t$criteria->compare('tindakanrm_id',$this->tindakanrm_id);\n\t\t$criteria->compare('tindakanrm_kode',$this->tindakanrm_kode,true);\n\t\t$criteria->compare('tindakanrm_urutan',$this->tindakanrm_urutan);\n\t\t$criteria->compare('tindakanrm_nama',$this->tindakanrm_nama,true);\n\t\t$criteria->compare('kategoritindakan_id',$this->kategoritindakan_id);\n\t\t$criteria->compare('kategoritindakan_nama',$this->kategoritindakan_nama,true);\n\t\t$criteria->compare('kelompoktindakan_id',$this->kelompoktindakan_id);\n\t\t$criteria->compare('kelompoktindakan_nama',$this->kelompoktindakan_nama,true);\n\t\t$criteria->compare('komponenunit_id',$this->komponenunit_id);\n\t\t$criteria->compare('komponenunit_nama',$this->komponenunit_nama,true);\n\t\t$criteria->compare('daftartindakan_id',$this->daftartindakan_id);\n\t\t$criteria->compare('daftartindakan_kode',$this->daftartindakan_kode,true);\n\t\t$criteria->compare('daftartindakan_nama',$this->daftartindakan_nama,true);\n\t\t$criteria->compare('daftartindakan_namalainnya',$this->daftartindakan_namalainnya,true);\n\t\t$criteria->compare('daftartindakan_katakunci',$this->daftartindakan_katakunci,true);\n\t\t$criteria->compare('instalasi_id',$this->instalasi_id);\n\t\t$criteria->compare('instalasi_nama',$this->instalasi_nama,true);\n\t\t$criteria->compare('ruangan_id',$this->ruangan_id);\n\t\t$criteria->compare('ruangan_nama',$this->ruangan_nama,true);\n\t\t$criteria->compare('kelaspelayanan_id',$this->kelaspelayanan_id);\n\t\t$criteria->compare('kelaspelayanan_nama',$this->kelaspelayanan_nama,true);\n\t\t$criteria->compare('carabayar_id',$this->carabayar_id);\n\t\t$criteria->compare('carabayar_nama',$this->carabayar_nama,true);\n\t\t$criteria->compare('penjamin_id',$this->penjamin_id);\n\t\t$criteria->compare('penjamin_nama',$this->penjamin_nama,true);\n\t\t$criteria->compare('jenistarif_id',$this->jenistarif_id);\n\t\t$criteria->compare('jenistarif_nama',$this->jenistarif_nama,true);\n\t\t$criteria->compare('perdatarif_id',$this->perdatarif_id);\n\t\t$criteria->compare('perdanama_sk',$this->perdanama_sk,true);\n\t\t$criteria->compare('noperda',$this->noperda,true);\n\t\t$criteria->compare('tglperda',$this->tglperda,true);\n\t\t$criteria->compare('perdatentang',$this->perdatentang,true);\n\t\t$criteria->compare('ditetapkanoleh',$this->ditetapkanoleh,true);\n\t\t$criteria->compare('tempatditetapkan',$this->tempatditetapkan,true);\n\t\t$criteria->compare('komponentarif_id',$this->komponentarif_id);\n\t\t$criteria->compare('komponentarif_nama',$this->komponentarif_nama,true);\n\t\t$criteria->compare('harga_tariftindakan',$this->harga_tariftindakan);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "9ab5ece4e443a03560edd7c2bc0af615", "score": "0.40649778", "text": "public function searchCustomerByCN(){\n\t\t$result=$_GET['cpName'];\n\t\t\n\t\t$customer=Customer::where('company_name','like', $result.'%')->get();\n\t\t\n\t\treturn view('searchCustomerByCN')->with('customers',$customer);\t\t\n\t}", "title": "" }, { "docid": "01d4df854db20f385c3365b95f1ccfd8", "score": "0.40604192", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'jenisperolehan': \n\t\t\t\t return \"p.idjenisperolehan = '$key'\";\n\t\t\t break;\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once('m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"infoleft >= \".(int)$row['infoleft'].\" and inforight <= \".(int)$row['inforight'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d8c346fa319d8a310d2498d12068c228", "score": "0.40571123", "text": "public function where_like($column,$value)\n {\n\n if(!is_array($this->hl_where)) $this->hl_where=array();\n\n $where = $this->format_table_column($column).' LIKE '.$this->format_value('%'.$value.'%');\n $this->hl_where[]=$where;\n\n return true;\n\n }", "title": "" }, { "docid": "5ba4b3dbd5b030814838048d6ff8874d", "score": "0.40531626", "text": "public function filterValue($value): string;", "title": "" }, { "docid": "4780ba0e9de6290e78cf5c06218e78d2", "score": "0.40507957", "text": "protected function like($column, $value): Builder\n {\n if ($this->builder->getQuery()->getConnection()->getDriverName() == 'pgsql') {\n return $this->builder->where($column, 'ILIKE', '%' . $value . '%');\n }\n\n return $this->builder->where($column, 'LIKE', '%' . $value . '%');\n }", "title": "" }, { "docid": "9c8a0ffb4a438fa6f63b9d68b4f46d00", "score": "0.40473357", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'dosen': return \"nipdosenwali = '$key'\";\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once(Route::getModelPath('unit'));\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "89a7e642194a4e7eb0fdc112bf3862ef", "score": "0.40421554", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('MaSP',$this->MaSP,true);\n\t\t$criteria->compare('TenSP',$this->TenSP,true);\n\t\t$criteria->compare('MaNganh',$this->MaNganh,true);\n\t\t$criteria->compare('MaLoai',$this->MaLoai,true);\n\t\t$criteria->compare('MaNhan',$this->MaNhan,true);\n\t\t$criteria->compare('TenNganh',$this->TenNganh,true);\n\t\t$criteria->compare('TenLoai',$this->TenLoai,true);\n\t\t$criteria->compare('TenNhan',$this->TenNhan,true);\n\t\t$criteria->compare('MaNguoiTao',$this->MaNguoiTao,true);\n\t\t$criteria->compare('TenNguoiTao',$this->TenNguoiTao,true);\n\t\t$criteria->compare('NgayTao',$this->NgayTao,true);\n\t\t$criteria->compare('TinhTrang',$this->TinhTrang,true);\n\t\t$criteria->compare('TenVietTat',$this->TenVietTat,true);\n\t\t$criteria->compare('MoTa',$this->MoTa,true);\n\t\t$criteria->compare('Color',$this->Color,true);\n\t\t$criteria->compare('QLTonKho',$this->QLTonKho,true);\n\t\t$criteria->compare('QLSerial',$this->QLSerial,true);\n\t\t$criteria->compare('MaNCC',$this->MaNCC,true);\n\t\t$criteria->compare('TenNCC',$this->TenNCC,true);\n\t\t$criteria->compare('Link',$this->Link,true);\n\t\t$criteria->compare('HinhAnh',$this->HinhAnh,true);\n\t\t$criteria->compare('ChieuDai',$this->ChieuDai,true);\n\t\t$criteria->compare('CanNang',$this->CanNang,true);\n\t\t$criteria->compare('DoSau',$this->DoSau,true);\n\t\t$criteria->compare('Lure',$this->Lure,true);\n\t\t$criteria->compare('Line',$this->Line,true);\n\t\t$criteria->compare('PE',$this->PE,true);\n\t\t$criteria->compare('Ring',$this->Ring,true);\n\t\t$criteria->compare('Hook',$this->Hook,true);\n\t\t$criteria->compare('Price',$this->Price);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "15623a498cc99a2937464e2872a367dd", "score": "0.40357402", "text": "public function scopeWhereUuidIn($query, $column, $value)\n {\n // Convert object to uuid string.\n if (is_object($value)) {\n $value = $value->uuid;\n }\n\n if (!is_array($value)) {\n $value = [$value];\n }\n\n if (count($value) == 0) {\n return $query;\n }\n\n $value = str_replace('-', '', $value);\n\n if (Config::get('uuid.binary', true)) {\n $value = preg_replace('/([a-zA-Z0-9].*)/', \"UNHEX('$1')\", $value);\n }\n\n $value = implode(',', $value);\n $sql = sprintf(\"$column IN (%s)\", $value);\n\n return $query->whereRaw($sql);\n }", "title": "" }, { "docid": "cd837e4c9311f6e3a7cc059cc886ecba", "score": "0.40324166", "text": "public function search() {\n $criteria = new CDbCriteria;\n $criteria->select = 't.id,t.status,t.gai_discount,t.member_discount,t.create_time,t.spend_money,t.distribute_money,t.remark,t.is_auto,t.symbol,t.entered_money';\n $criteria->select .= \",franchisee.name as franchisee_name,franchisee.code as franchisee_code\";\n $criteria->select .= \",member.gai_number,member.mobile\";\n $criteria->join .= \" inner join {{franchisee}} as franchisee on franchisee.id=t.franchisee_id\";\n $criteria->join .= \" inner join {{member}} as member on member.id=t.member_id\";\n\n $reback_ids = IntegralOfflineNew::getRebackData(\"\", array(FranchiseeConsumptionRecordRepeal::STATUS_APPLY,FranchiseeConsumptionRecordRepeal::STATUS_AUDITI), FALSE);\n $Consumption_ids = IntegralOfflineNew::getConsumptionData(\"\", array(FranchiseeConsumptionRecordConfirm::STATUS_APPLY,FranchiseeConsumptionRecordConfirm::STATUS_AUDITI), FALSE);\n $rids = empty($reback_ids) ? \"\" : $reback_ids;\n $cids = empty($Consumption_ids) ? \"\" : $Consumption_ids;\n if (!empty($rids)) {\n $criteria->addCondition(\"t.id not in (\" . $rids . \")\");\n }\n if (!empty($cids)) {\n $criteria->addCondition(\"t.id not in (\" . $cids . \")\");\n }\n\n $criteria->compare('member.gai_number', $this->gai_number, true);\n $criteria->compare('franchisee.name', $this->franchisee_name, true);\n $criteria->compare('franchisee.code', $this->franchisee_code);\n $criteria->compare('franchisee.mobile', $this->franchisee_mobile);\n $criteria->compare('t.status', $this->status);\n $criteria->compare('t.record_type', $this->record_type);\n $criteria->compare('franchisee.province_id', $this->franchisee_province_id);\n $criteria->compare('franchisee.city_id', $this->franchisee_city_id);\n $criteria->compare('franchisee.district_id', $this->franchisee_district_id);\n if ($this->start_time) {\n $criteria->compare('t.create_time', ' >=' . strtotime($this->start_time));\n }\n if ($this->end_time) {\n $criteria->compare('t.create_time', ' <' . (strtotime($this->end_time)));\n }\n// $criteria->addCondition(\"t.spend_money <> 0\");\n $criteria->order = 't.id desc';\n\n /*if ($this->data_style) { //如果要查询重复数据\n $sql = \"select GROUP_CONCAT(id) as ids from \" . self::tableName() . \" group by member_id,machine_id,spend_money having count(*) > 1\";\n $result = Yii::app()->db->createCommand($sql)->queryAll();\n $ids = \"\";\n foreach ($result as $key => $val) {\n $ids.= $val['ids'] . \",\";\n }\n $ids = substr($ids, 0, -1);\n if (!empty($ids)) {\n $criteria->addCondition(\"t.id in ($ids)\");\n $criteria->order = 't.member_id desc,t.machine_id desc,t.spend_money desc';\n }\n }*/\n\n $pagination = array(\n 'pageSize' => 50\n );\n\n if (!empty($this->isExport)) {\n $pagination['pageVar'] = $this->exportPageName;\n $pagination['pageSize'] = $this->exportLimit;\n }\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => $pagination,\n ));\n }", "title": "" }, { "docid": "be944aeb9f5e347bce4d3ffe46812e3d", "score": "0.40313277", "text": "function filterbyCC($id){\n\t\t$id = $this->decode($id);\n\t\t$data['title']=\"Filter By Call Champion\" . SITENAME;\n\t\tif($id!=0){\n\t\t\t$beneficiary \t= new Beneficiary;\n\t\t\t$data['result'] = $beneficiary->filterbyCC($id);\n\t\t\t$data['filterccid'] = $id;\n\t\t\treturn view('beneficiary/manage',$data);\n\t\t}else{\n\t\t\treturn redirect('/admin/beneficiary');\n\t\t}\n\t}", "title": "" }, { "docid": "b7b265d217e4c16e84986d52ae9266ab", "score": "0.40298757", "text": "private function addColumnFilters()\n {\n foreach ($this->columns as $i => $column) {\n if (static::$versionTransformer->isColumnSearched($i)) {\n $this->builder->where(\n new raw($this->getRawColumnQuery($column)),\n 'like',\n '%' . static::$versionTransformer->getColumnSearchValue($i) . '%'\n );\n }\n }\n }", "title": "" }, { "docid": "61d33522f64dc76af3cc8d55143b5a84", "score": "0.40153086", "text": "function filterNumber($number) {\n $number = filter_var(trim($number), FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);\n $number = filter_var($number, FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND);\n return $number;\n}", "title": "" }, { "docid": "0e3dcf27d44a0e33c800431464b8ef1f", "score": "0.40106", "text": "public function getCompanyByNumber($number)\n {\n return Companies::findOne(['CIF' => $number]);\n }", "title": "" }, { "docid": "a993dabc5e5428cf9f33c92d7d3a6e30", "score": "0.40041578", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n $criteria->alias = 'e';\n $criteria->select = 'concat(e.contract_value,\" \",e.contract_value_currency) as contract_value,e.proposal_status,e.created_by,e.id,d.status_name,e.project_title,e.proposal_issue_date,e.proposa_revision_number,e.attachment_image,e.created_date,e.modified_date';\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('service_type',$this->service_type,true);\n\t\t$criteria->compare('service_category',$this->service_category,true);\n\t\t$criteria->compare('service_sub_category',$this->service_sub_category,true);\n\t\t$criteria->compare('project_scale',$this->project_scale,true);\n\t\t$criteria->compare('project_type',$this->project_type,true);\n\t\t$criteria->compare('proposal_number',$this->proposal_number);\n\t\t$criteria->compare('proposal_issue_date',$this->proposal_issue_date,true);\n\t\t$criteria->compare('proposa_revision_number',$this->proposa_revision_number);\n\t\t$criteria->compare('client_name',$this->client_name,true);\n\t\t$criteria->compare('client_country',$this->client_country,true);\n\t\t$criteria->compare('proposal_status',$this->proposal_status);\n\t\t$criteria->compare('contract_signed',$this->contract_signed,true);\n\t\t$criteria->compare('contract_value',$this->contract_value);\n\t\t$criteria->compare('contract_value_currency',$this->contract_value_currency,true);\n\t\t$criteria->compare('client_representative_name',$this->client_representative_name,true);\n\t\t$criteria->compare('client_representative_email',$this->client_representative_email,true);\n\t\t$criteria->compare('client_representative_phone',$this->client_representative_phone);\n\t\t$criteria->compare('client_address',$this->client_address,true);\n\t\t$criteria->compare('project_title',$this->project_title,true);\n\t\t$criteria->compare('project_external_number',$this->project_external_number);\n\t\t$criteria->compare('team_lead',$this->team_lead);\n\t\t$criteria->compare('created_date',$this->created_date,true);\n\t\t$criteria->compare('created_by',$this->created_by);\n\t\t$criteria->compare('modified_date',$this->modified_date,true);\n\n $criteria->join= 'JOIN proposal_status d ON (d.id=e.proposal_status)';\n $criteria->together = true;\n $models = EsplProposal::model()->find($criteria);\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "5023cf394a28e4b9223ee7128f692f3c", "score": "0.400413", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('CPED_ID', $this->CPED_ID, true);\n $criteria->compare('TDOC_ID', $this->TDOC_ID, true);\n $criteria->compare('TIE_ID', $this->TIE_ID, true);\n $criteria->compare('TCPED_ID', $this->TCPED_ID, true);\n $criteria->compare('CPED_FEC_PED', $this->CPED_FEC_PED, true);\n $criteria->compare('TIP_NOF', $this->TIP_NOF, true);\n $criteria->compare('NUM_NOF', $this->NUM_NOF, true);\n $criteria->compare('FEC_VTA', $this->FEC_VTA, true);\n $criteria->compare('CPED_VAL_BRU', $this->CPED_VAL_BRU, true);\n $criteria->compare('CPED_POR_DES', $this->CPED_POR_DES, true);\n $criteria->compare('CPED_VAL_DES', $this->CPED_VAL_DES, true);\n $criteria->compare('CPED_POR_IVA', $this->CPED_POR_IVA, true);\n $criteria->compare('CPED_VAL_IVA', $this->CPED_VAL_IVA, true);\n $criteria->compare('CPED_BAS_IVA', $this->CPED_BAS_IVA, true);\n $criteria->compare('CPED_BAS_IV0', $this->CPED_BAS_IV0, true);\n $criteria->compare('CPED_VAL_FLE', $this->CPED_VAL_FLE, true);\n $criteria->compare('CPED_VAL_NET', $this->CPED_VAL_NET, true);\n $criteria->compare('CPED_EST_PED', $this->CPED_EST_PED, true);\n $criteria->compare('CPED_EST_LOG', $this->CPED_EST_LOG, true);\n $criteria->compare('CPED_FEC_MOD', $this->CPED_FEC_MOD, true);\n $criteria->compare('UTIE_ID_PED', $this->UTIE_ID_PED, true);\n $criteria->compare('UTIE_ID', $this->UTIE_ID, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "27e2961de3b0fdd72c4a296c14f3c972", "score": "0.40032262", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('PNAC_EU_ORGN_CODE',$this->PNAC_EU_ORGN_CODE,true);\n\t\t$criteria->compare('PNAC_ID',$this->PNAC_ID);\n\t\t$criteria->compare('PNAC_PER_NO',$this->PNAC_PER_NO,true);\n\t\t$criteria->compare('PNAC_CHANGE_FOR_TAB',$this->PNAC_CHANGE_FOR_TAB,true);\n\t\t$criteria->compare('PNAC_RECORD_TYPE',$this->PNAC_RECORD_TYPE,true);\n\t\t$criteria->compare('PNAC_INSERT_UPDATE_TAG',$this->PNAC_INSERT_UPDATE_TAG,true);\n\t\t$criteria->compare('PNAC_NEW_PN_NUMBER',$this->PNAC_NEW_PN_NUMBER,true);\n\t\t$criteria->compare('PNAC_NEW_PN_ISSUE_PLACE',$this->PNAC_NEW_PN_ISSUE_PLACE,true);\n\t\t$criteria->compare('PNAC_NEW_PN_ISSUE_COUNTRY_CODE',$this->PNAC_NEW_PN_ISSUE_COUNTRY_CODE,true);\n\t\t$criteria->compare('PNAC_NEW_PN_WEF_DATE',$this->PNAC_NEW_PN_WEF_DATE,true);\n\t\t$criteria->compare('PNAC_NEW_PN_WET_DATE',$this->PNAC_NEW_PN_WET_DATE,true);\n\t\t$criteria->compare('PNAC_OLD_PN_NUMBER',$this->PNAC_OLD_PN_NUMBER,true);\n\t\t$criteria->compare('PNAC_OLD_PN_ISSUE_PLACE',$this->PNAC_OLD_PN_ISSUE_PLACE,true);\n\t\t$criteria->compare('PNAC_OLD_PN_ISSUE_COUNTRY_CODE',$this->PNAC_OLD_PN_ISSUE_COUNTRY_CODE,true);\n\t\t$criteria->compare('PNAC_OLD_PN_WEF_DATE',$this->PNAC_OLD_PN_WEF_DATE,true);\n\t\t$criteria->compare('PNAC_OLD_PN_WET_DATE',$this->PNAC_OLD_PN_WET_DATE,true);\n\t\t$criteria->compare('PNAC_NEW_PPE_NUMBER_TYPE',$this->PNAC_NEW_PPE_NUMBER_TYPE,true);\n\t\t$criteria->compare('PNAC_NEW_PPE_SLNO',$this->PNAC_NEW_PPE_SLNO);\n\t\t$criteria->compare('PNAC_NEW_PPE_NUMBER_ADDRESS',$this->PNAC_NEW_PPE_NUMBER_ADDRESS,true);\n\t\t$criteria->compare('PNAC_OLD_PPE_NUMBER_TYPE',$this->PNAC_OLD_PPE_NUMBER_TYPE,true);\n\t\t$criteria->compare('PNAC_OLD_PPE_SLNO',$this->PNAC_OLD_PPE_SLNO);\n\t\t$criteria->compare('PNAC_OLD_PPE_NUMBER_ADDRESS',$this->PNAC_OLD_PPE_NUMBER_ADDRESS,true);\n\t\t$criteria->compare('PNAC_NEW_PADD_ADDRESS1',$this->PNAC_NEW_PADD_ADDRESS1,true);\n\t\t$criteria->compare('PNAC_NEW_PADD_ADDRESS2',$this->PNAC_NEW_PADD_ADDRESS2,true);\n\t\t$criteria->compare('PNAC_NEW_PADD_ADDRESS3',$this->PNAC_NEW_PADD_ADDRESS3,true);\n\t\t$criteria->compare('PNAC_NEW_PADD_CITY',$this->PNAC_NEW_PADD_CITY,true);\n\t\t$criteria->compare('PNAC_NEW_PADD_COUNTRY_CODE',$this->PNAC_NEW_PADD_COUNTRY_CODE,true);\n\t\t$criteria->compare('PNAC_NEW_PADD_ADDRESS4',$this->PNAC_NEW_PADD_ADDRESS4,true);\n\t\t$criteria->compare('PNAC_NEW_PADD_ADDRESS5',$this->PNAC_NEW_PADD_ADDRESS5,true);\n\t\t$criteria->compare('PNAC_NEW_PADD_ADDRESS6',$this->PNAC_NEW_PADD_ADDRESS6,true);\n\t\t$criteria->compare('PNAC_OLD_PADD_ADDRESS1',$this->PNAC_OLD_PADD_ADDRESS1,true);\n\t\t$criteria->compare('PNAC_OLD_PADD_ADDRESS2',$this->PNAC_OLD_PADD_ADDRESS2,true);\n\t\t$criteria->compare('PNAC_OLD_PADD_ADDRESS3',$this->PNAC_OLD_PADD_ADDRESS3,true);\n\t\t$criteria->compare('PNAC_OLD_PADD_CITY',$this->PNAC_OLD_PADD_CITY,true);\n\t\t$criteria->compare('PNAC_OLD_PADD_COUNTRY_CODE',$this->PNAC_OLD_PADD_COUNTRY_CODE,true);\n\t\t$criteria->compare('PNAC_OLD_PADD_ADDRESS4',$this->PNAC_OLD_PADD_ADDRESS4,true);\n\t\t$criteria->compare('PNAC_OLD_PADD_ADDRESS5',$this->PNAC_OLD_PADD_ADDRESS5,true);\n\t\t$criteria->compare('PNAC_OLD_PADD_ADDRESS6',$this->PNAC_OLD_PADD_ADDRESS6,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME1',$this->PNAC_COLUMN_NAME1,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE1',$this->PNAC_COLUMN_TYPE1,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE1',$this->PNAC_COLUMN_VALUE1,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME2',$this->PNAC_COLUMN_NAME2,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE2',$this->PNAC_COLUMN_TYPE2,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE2',$this->PNAC_COLUMN_VALUE2,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME3',$this->PNAC_COLUMN_NAME3,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE3',$this->PNAC_COLUMN_TYPE3,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE3',$this->PNAC_COLUMN_VALUE3,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME4',$this->PNAC_COLUMN_NAME4,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE4',$this->PNAC_COLUMN_TYPE4,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE4',$this->PNAC_COLUMN_VALUE4,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME5',$this->PNAC_COLUMN_NAME5,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE5',$this->PNAC_COLUMN_TYPE5,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE5',$this->PNAC_COLUMN_VALUE5,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME6',$this->PNAC_COLUMN_NAME6,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE6',$this->PNAC_COLUMN_TYPE6,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE6',$this->PNAC_COLUMN_VALUE6,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME7',$this->PNAC_COLUMN_NAME7,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE7',$this->PNAC_COLUMN_TYPE7,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE7',$this->PNAC_COLUMN_VALUE7,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME8',$this->PNAC_COLUMN_NAME8,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE8',$this->PNAC_COLUMN_TYPE8,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE8',$this->PNAC_COLUMN_VALUE8,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME9',$this->PNAC_COLUMN_NAME9,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE9',$this->PNAC_COLUMN_TYPE9,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE9',$this->PNAC_COLUMN_VALUE9,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME10',$this->PNAC_COLUMN_NAME10,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE10',$this->PNAC_COLUMN_TYPE10,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE10',$this->PNAC_COLUMN_VALUE10,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME11',$this->PNAC_COLUMN_NAME11,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE11',$this->PNAC_COLUMN_TYPE11,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE11',$this->PNAC_COLUMN_VALUE11,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME12',$this->PNAC_COLUMN_NAME12,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE12',$this->PNAC_COLUMN_TYPE12,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE12',$this->PNAC_COLUMN_VALUE12,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME13',$this->PNAC_COLUMN_NAME13,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE13',$this->PNAC_COLUMN_TYPE13,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE13',$this->PNAC_COLUMN_VALUE13,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME14',$this->PNAC_COLUMN_NAME14,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE14',$this->PNAC_COLUMN_TYPE14,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE14',$this->PNAC_COLUMN_VALUE14,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME15',$this->PNAC_COLUMN_NAME15,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE15',$this->PNAC_COLUMN_TYPE15,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE15',$this->PNAC_COLUMN_VALUE15,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME16',$this->PNAC_COLUMN_NAME16,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE16',$this->PNAC_COLUMN_TYPE16,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE16',$this->PNAC_COLUMN_VALUE16,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME31',$this->PNAC_COLUMN_NAME31,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE31',$this->PNAC_COLUMN_TYPE31,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE31',$this->PNAC_COLUMN_VALUE31,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME32',$this->PNAC_COLUMN_NAME32,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE32',$this->PNAC_COLUMN_TYPE32,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE32',$this->PNAC_COLUMN_VALUE32,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME33',$this->PNAC_COLUMN_NAME33,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE33',$this->PNAC_COLUMN_TYPE33,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE33',$this->PNAC_COLUMN_VALUE33,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME34',$this->PNAC_COLUMN_NAME34,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE34',$this->PNAC_COLUMN_TYPE34,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE34',$this->PNAC_COLUMN_VALUE34,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME35',$this->PNAC_COLUMN_NAME35,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE35',$this->PNAC_COLUMN_TYPE35,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE35',$this->PNAC_COLUMN_VALUE35,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME36',$this->PNAC_COLUMN_NAME36,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE36',$this->PNAC_COLUMN_TYPE36,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE36',$this->PNAC_COLUMN_VALUE36,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME37',$this->PNAC_COLUMN_NAME37,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE37',$this->PNAC_COLUMN_TYPE37,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE37',$this->PNAC_COLUMN_VALUE37,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME38',$this->PNAC_COLUMN_NAME38,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE38',$this->PNAC_COLUMN_TYPE38,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE38',$this->PNAC_COLUMN_VALUE38,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME39',$this->PNAC_COLUMN_NAME39,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE39',$this->PNAC_COLUMN_TYPE39,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE39',$this->PNAC_COLUMN_VALUE39,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME40',$this->PNAC_COLUMN_NAME40,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE40',$this->PNAC_COLUMN_TYPE40,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE40',$this->PNAC_COLUMN_VALUE40,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME41',$this->PNAC_COLUMN_NAME41,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE41',$this->PNAC_COLUMN_TYPE41,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE41',$this->PNAC_COLUMN_VALUE41,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME42',$this->PNAC_COLUMN_NAME42,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE42',$this->PNAC_COLUMN_TYPE42,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE42',$this->PNAC_COLUMN_VALUE42,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME43',$this->PNAC_COLUMN_NAME43,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE43',$this->PNAC_COLUMN_TYPE43,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE43',$this->PNAC_COLUMN_VALUE43,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME44',$this->PNAC_COLUMN_NAME44,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE44',$this->PNAC_COLUMN_TYPE44,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE44',$this->PNAC_COLUMN_VALUE44,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME45',$this->PNAC_COLUMN_NAME45,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE45',$this->PNAC_COLUMN_TYPE45,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE45',$this->PNAC_COLUMN_VALUE45,true);\n\t\t$criteria->compare('PNAC_COLUMN_NAME46',$this->PNAC_COLUMN_NAME46,true);\n\t\t$criteria->compare('PNAC_COLUMN_TYPE46',$this->PNAC_COLUMN_TYPE46,true);\n\t\t$criteria->compare('PNAC_COLUMN_VALUE46',$this->PNAC_COLUMN_VALUE46,true);\n\t\t$criteria->compare('PNAC_ENTERED_DATE',$this->PNAC_ENTERED_DATE,true);\n\t\t$criteria->compare('PNAC_IS_CANCEL_BY_REQUESTER',$this->PNAC_IS_CANCEL_BY_REQUESTER,true);\n\t\t$criteria->compare('PNAC_APPROVE_OR_REJECT_TAG',$this->PNAC_APPROVE_OR_REJECT_TAG,true);\n\t\t$criteria->compare('PNAC_APPROVE_REJECT_BY_PER_NO',$this->PNAC_APPROVE_REJECT_BY_PER_NO,true);\n\t\t$criteria->compare('PNAC_APPROVE_REJECT_DATE',$this->PNAC_APPROVE_REJECT_DATE,true);\n\t\t$criteria->compare('PNAC_EFFECT_REMARKS',$this->PNAC_EFFECT_REMARKS,true);\n\t\t$criteria->compare('PNAC_INSERT_UPDATE_STATUS',$this->PNAC_INSERT_UPDATE_STATUS,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "975c9413196aa03a48aca21cce67c0c0", "score": "0.4000047", "text": "public function search($val) {\n $this->where(function ($q) use ($val) {\n $q->orWhere('name', 'LIKE', \"%{$val}%\")\n ->orWhere('config_group', 'LIKE', \"%{$val}%\");\n }\n );\n }", "title": "" }, { "docid": "0e8c09890d00b61e54ab063782f7ff2e", "score": "0.399586", "text": "public function filterById($value) {\n $this->_filter->equalTo($this->_nameMapping['id'], $value);\n }", "title": "" }, { "docid": "fe2cd68f95fec8f0f341af64a91f12db", "score": "0.3994243", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('employee_id',$this->employee_id,true);\n\t\t$criteria->compare('employee_code',$this->employee_code,true);\n\t\t$criteria->compare('employee_card_number',$this->employee_card_number,true);\n\t\t$criteria->compare('employee_status',$this->employee_status);\n\t\t$criteria->compare('cn_name',$this->cn_name,true);\n\t\t$criteria->compare('first_name',$this->first_name,true);\n\t\t$criteria->compare('last_name',$this->last_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('nation_code',$this->nation_code,true);\n\t\t$criteria->compare('political_status',$this->political_status);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('date_of_birth',$this->date_of_birth,true);\n\t\t$criteria->compare('birth_place',$this->birth_place,true);\n\t\t$criteria->compare('card_type',$this->card_type);\n\t\t$criteria->compare('resident_id_card',$this->resident_id_card,true);\n\t\t$criteria->compare('passport_number',$this->passport_number,true);\n\t\t$criteria->compare('other_card_number',$this->other_card_number,true);\n\t\t$criteria->compare('marry_status',$this->marry_status);\n\t\t$criteria->compare('health_status',$this->health_status);\n\t\t$criteria->compare('height',$this->height,true);\n\t\t$criteria->compare('weight',$this->weight,true);\n\t\t$criteria->compare('shoe_size',$this->shoe_size,true);\n\t\t$criteria->compare('blood_type',$this->blood_type);\n\t\t$criteria->compare('working_life',$this->working_life,true);\n\t\t$criteria->compare('major',$this->major,true);\n\t\t$criteria->compare('education',$this->education);\n\t\t$criteria->compare('foreign_language',$this->foreign_language,true);\n\t\t$criteria->compare('mailing_address',$this->mailing_address,true);\n\t\t$criteria->compare('dormitory_num',$this->dormitory_num,true);\n\t\t$criteria->compare('telephone_num',$this->telephone_num,true);\n\t\t$criteria->compare('mobile_num',$this->mobile_num,true);\n\t\t$criteria->compare('emergency_contact',$this->emergency_contact,true);\n\t\t$criteria->compare('emergency_contact_phone',$this->emergency_contact_phone,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "76f839baa3793a972ad18ebcd8e95ebe", "score": "0.39910805", "text": "public function searchRD()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->addCondition('tgl_pendaftaran BETWEEN \\''.$this->tgl_awal.'\\' AND \\''.$this->tgl_akhir.'\\'');\n\t\t$criteria->compare('LOWER(tgl_pendaftaran)',strtolower($this->tgl_pendaftaran),true);\n\t\t$criteria->compare('LOWER(no_pendaftaran)',strtolower($this->no_pendaftaran),true);\n\t\t$criteria->compare('LOWER(statusperiksa)',strtolower($this->statusperiksa),true);\n\t\t$criteria->compare('LOWER(statusmasuk)',strtolower($this->statusmasuk),true);\n\t\t$criteria->compare('LOWER(no_rekam_medik)',strtolower($this->no_rekam_medik),true);\n\t\t$criteria->compare('LOWER(nama_pasien)',strtolower($this->nama_pasien),true);\n\t\t$criteria->compare('LOWER(nama_bin)',strtolower($this->nama_bin),true);\n\t\t$criteria->compare('LOWER(alamat_pasien)',strtolower($this->alamat_pasien),true);\n\t\t$criteria->compare('propinsi_id',$this->propinsi_id);\n\t\t$criteria->compare('LOWER(propinsi_nama)',strtolower($this->propinsi_nama),true);\n\t\t$criteria->compare('kabupaten_id',$this->kabupaten_id);\n\t\t$criteria->compare('LOWER(kabupaten_nama)',strtolower($this->kabupaten_nama),true);\n\t\t$criteria->compare('kecamatan_id',$this->kecamatan_id);\n\t\t$criteria->compare('LOWER(kecamatan_nama)',strtolower($this->kecamatan_nama),true);\n\t\t$criteria->compare('kelurahan_id',$this->kelurahan_id);\n\t\t$criteria->compare('LOWER(kelurahan_nama)',strtolower($this->kelurahan_nama),true);\n\t\t$criteria->compare('instalasi_id',$this->instalasi_id);\n\t\t$criteria->compare('LOWER(ruangan_nama)',strtolower($this->ruangan_nama),true);\n\t\t$criteria->compare('carabayar_id',$this->carabayar_id);\n\t\t$criteria->compare('LOWER(carabayar_nama)',strtolower($this->carabayar_nama),true);\n\t\t$criteria->compare('penjamin_id',$this->penjamin_id);\n\t\t$criteria->compare('LOWER(penjamin_nama)',strtolower($this->penjamin_nama),true);\n\t\t$criteria->compare('LOWER(nama_pegawai)',strtolower($this->nama_pegawai),true);\n\t\t$criteria->compare('LOWER(jeniskasuspenyakit_nama)',strtolower($this->jeniskasuspenyakit_nama),true);\n\t\t$criteria->compare('rujukan_id',$this->rujukan_id);\n $criteria->order = 'tgl_pendaftaran DESC';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "9b4eb4122b9b83cab71ac98647125ff8", "score": "0.39905447", "text": "public static function findByNumber($number) {\n $db = Zend_Registry::get('dbAdapter');\n\n $query = $db->select()\n ->from(array(\"b\" => \"billing\"))\n ->where(\"b.number = ?\", $number);\n\n return $db->fetchRow($query);\n }", "title": "" }, { "docid": "bc77806ba3f938a1094fdb8e755caf5e", "score": "0.39863923", "text": "public function like($column, $value)\n {\n $this->whereClause[] = ['LIKE', $column, $value];\n return $this;\n }", "title": "" }, { "docid": "8e4d2840ecee8bfb272cfb3544379d83", "score": "0.39831093", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id_val_nutricion',$this->id_val_nutricion);\n\t\t$criteria->compare('id_esquema_vac',$this->id_esquema_vac);\n\t\t$criteria->compare('id_masticacion',$this->id_masticacion);\n\t\t$criteria->compare('id_apetito',$this->id_apetito);\n\t\t$criteria->compare('id_digestion',$this->id_digestion);\n\t\t$criteria->compare('id_estado_val',$this->id_estado_val);\n\t\t$criteria->compare('id_hab_intest',$this->id_hab_intest);\n\t\t$criteria->compare('id_ingesta',$this->id_ingesta);\n\t\t$criteria->compare('id_nivel_act_fis',$this->id_nivel_act_fis);\n\t\t$criteria->compare('num_doc',$this->num_doc,true);\n\t\t$criteria->compare('id_tipo_parto',$this->id_tipo_parto);\n\t\t$criteria->compare('semanas_gestacion',$this->semanas_gestacion,true);\n\t\t$criteria->compare('talla_nacim_cms',$this->talla_nacim_cms,true);\n\t\t$criteria->compare('peso_nacim_kgs',$this->peso_nacim_kgs,true);\n\t\t$criteria->compare('observaciones_nacim',$this->observaciones_nacim,true);\n\t\t$criteria->compare('patologicos',$this->patologicos,true);\n\t\t$criteria->compare('quirurgicos',$this->quirurgicos,true);\n\t\t$criteria->compare('hospitaliz_causas',$this->hospitaliz_causas,true);\n\t\t$criteria->compare('alergicos',$this->alergicos,true);\n\t\t$criteria->compare('toxicos',$this->toxicos,true);\n\t\t$criteria->compare('familiares_nutr',$this->familiares_nutr,true);\n\t\t$criteria->compare('otros_nutr',$this->otros_nutr,true);\n\t\t$criteria->compare('obs_esquema_vac',$this->obs_esquema_vac,true);\n\t\t$criteria->compare('control_crec_des',$this->control_crec_des);\n\t\t$criteria->compare('obs_crec_des',$this->obs_crec_des,true);\n\t\t$criteria->compare('medicamentos_nutr',$this->medicamentos_nutr,true);\n\t\t$criteria->compare('procedencia_padres',$this->procedencia_padres,true);\n\t\t$criteria->compare('alimentos_preferidos',$this->alimentos_preferidos,true);\n\t\t$criteria->compare('alimentos_rechazados',$this->alimentos_rechazados,true);\n\t\t$criteria->compare('alimentos_intolerados',$this->alimentos_intolerados,true);\n\t\t$criteria->compare('supl_compl_nutr',$this->supl_compl_nutr,true);\n\t\t$criteria->compare('recibio_leche_mat',$this->recibio_leche_mat);\n\t\t$criteria->compare('tiempo_lactancia',$this->tiempo_lactancia,true);\n\t\t$criteria->compare('recibio_biberon',$this->recibio_biberon);\n\t\t$criteria->compare('tiempo_biberon',$this->tiempo_biberon,true);\n\t\t$criteria->compare('personas_alim_olla',$this->personas_alim_olla);\n\t\t$criteria->compare('quien_cocina_casa',$this->quien_cocina_casa,true);\n\t\t$criteria->compare('num_comidas_diarias',$this->num_comidas_diarias);\n\t\t$criteria->compare('donde_recibe_alim',$this->donde_recibe_alim,true);\n\t\t$criteria->compare('inicio_almient_compl',$this->inicio_almient_compl);\n\t\t$criteria->compare('desarrollo_psicomotor',$this->desarrollo_psicomotor,true);\n\t\t$criteria->compare('horas_sueno',$this->horas_sueno,true);\n\t\t$criteria->compare('examen_fisico',$this->examen_fisico,true);\n\t\t$criteria->compare('concepto_nutr',$this->concepto_nutr,true);\n\t\t$criteria->compare('estrategia_intervencion',$this->estrategia_intervencion,true);\n\t\t$criteria->compare('objetivo_aliment_nutr',$this->objetivo_aliment_nutr,true);\n\t\t$criteria->compare('diagnostico_clasif_nutr',$this->diagnostico_clasif_nutr,true);\n\t\t$criteria->compare('fecha_ini_vnutr',$this->fecha_ini_vnutr,true);\n\t\t$criteria->compare('fecha_modif_vnutr',$this->fecha_modif_vnutr,true);\n\t\t$criteria->compare('val_hab_nutr',$this->val_hab_nutr);\n\t\t$criteria->compare('val_act_nutr',$this->val_act_nutr);\n\t\t$criteria->compare('observ_estvalnutr',$this->observ_estvalnutr,true);\n\t\t$criteria->compare('estado_val_nutr',$this->estado_val_nutr);\n\t\t$criteria->compare('presenta_carne',$this->estado_val_nutr);\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "f00b66e9ee212c8fad8ef4c2d9a92927", "score": "0.3982262", "text": "protected function getFilterStr(Builder $dataSource)\r\n\t{\r\n $compare = $this->getCompareCriteria();\r\n\t\tif ((strlen(floatval($this->_value)) !== strlen($this->_value)) || (strpos($this->_value, ' ') !== false)) {\r\n $adapter = $dataSource->getModel()->getReadConnection();\r\n $this->_value = $adapter->escapeString($this->_value);\r\n\t\t}\r\n\r\n\t\treturn $compare.$this->_value;\r\n\t}", "title": "" }, { "docid": "356fe501d14e1188721416dd8d0afaa6", "score": "0.39817774", "text": "public function filterByFaxnbr($faxnbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($faxnbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(BillingTableMap::COL_FAXNBR, $faxnbr, $comparison);\n }", "title": "" }, { "docid": "d8b77f2801f75466050306e637c2ada1", "score": "0.39775005", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ORDEN_COMPRA',$this->ORDEN_COMPRA,true);\n\t\t$criteria->compare('PROVEEDOR',$this->PROVEEDOR,true);\n\t\t$criteria->compare('FECHA',$this->FECHA,true);\n\t\t$criteria->compare('BODEGA',$this->BODEGA,true);\n\t\t$criteria->compare('DEPARTAMENTO',$this->DEPARTAMENTO,true);\n\t\t$criteria->compare('FECHA_COTIZACION',$this->FECHA_COTIZACION,true);\n\t\t$criteria->compare('FECHA_OFRECIDA',$this->FECHA_OFRECIDA,true);\n\t\t$criteria->compare('FECHA_REQUERIDA',$this->FECHA_REQUERIDA,true);\n\t\t$criteria->compare('FECHA_REQ_EMBARQUE',$this->FECHA_REQ_EMBARQUE,true);\n\t\t$criteria->compare('PRIORIDAD',$this->PRIORIDAD,true);\n\t\t$criteria->compare('CONDICION_PAGO',$this->CONDICION_PAGO,true);\n\t\t$criteria->compare('DIRECCION_EMBARQUE',$this->DIRECCION_EMBARQUE,true);\n\t\t$criteria->compare('DIRECCION_COBRO',$this->DIRECCION_COBRO,true);\n\t\t$criteria->compare('RUBRO1',$this->RUBRO1,true);\n\t\t$criteria->compare('RUBRO2',$this->RUBRO2,true);\n\t\t$criteria->compare('RUBRO3',$this->RUBRO3,true);\n\t\t$criteria->compare('RUBRO4',$this->RUBRO4,true);\n\t\t$criteria->compare('RUBRO5',$this->RUBRO5,true);\n\t\t$criteria->compare('COMENTARIO_CXP',$this->COMENTARIO_CXP,true);\n\t\t$criteria->compare('INSTRUCCIONES',$this->INSTRUCCIONES,true);\n\t\t$criteria->compare('OBSERVACIONES',$this->OBSERVACIONES,true);\n\t\t$criteria->compare('PORC_DESCUENTO',$this->PORC_DESCUENTO,true);\n\t\t$criteria->compare('MONTO_FLETE',$this->MONTO_FLETE,true);\n\t\t$criteria->compare('MONTO_SEGURO',$this->MONTO_SEGURO,true);\n\t\t$criteria->compare('MONTO_ANTICIPO',$this->MONTO_ANTICIPO,true);\n\t\t$criteria->compare('TIPO_PRORRATEO_OC',$this->TIPO_PRORRATEO_OC,true);\n\t\t$criteria->compare('TOTAL_A_COMPRAR',$this->TOTAL_A_COMPRAR,true);\n\t\t$criteria->compare('USUARIO_CANCELA',$this->USUARIO_CANCELA,true);\n\t\t$criteria->compare('FECHA_CANCELA',$this->FECHA_CANCELA,true);\n\t\t$criteria->compare('ESTADO',$this->ESTADO,true);\n\t\t$criteria->compare('CREADO_POR',$this->CREADO_POR,true);\n\t\t$criteria->compare('CREADO_EL',$this->CREADO_EL,true);\n\t\t$criteria->compare('ACTUALIZADO_POR',$this->ACTUALIZADO_POR,true);\n\t\t$criteria->compare('ACTUALIZADO_EL',$this->ACTUALIZADO_EL,true);\n\t\t$criteria->compare('USUARIO_CIERRA',$this->CREADO_POR,true);\n\t\t$criteria->compare('FECHA_CIERRA',$this->CREADO_EL,true);\n\t\t$criteria->compare('AUTORIZADA_POR',$this->ACTUALIZADO_POR,true);\n\t\t$criteria->compare('FECHA_AUTORIZADA',$this->ACTUALIZADO_EL,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "fb7da37572ee2068d05c44919b8ba60a", "score": "0.39742798", "text": "public function queryLotnbr($lotnbr = null) {\n\t\t$q = $this->query();\n\n\t\tif (empty($lotnbr) === false) {\n\t\t\t$q->filterByLotnbr($lotnbr);\n\t\t}\n\t\treturn $q;\n\t}", "title": "" }, { "docid": "eed11961bb88cef0aa5ecfb94c5f2c61", "score": "0.39723724", "text": "public function search_for_account($sterm){\n\t\t$sql = \"SELECT * FROM BankAccount WHERE anum LIKE '%$sterm%'\";\n\n\t\t//execute the query\n\t\treturn $this->db_query($sql);\n\t}", "title": "" }, { "docid": "9f1dc5228d9cea8f9763829132554ecc", "score": "0.39693764", "text": "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('venta_todo_pago_id',$this->venta_todo_pago_id);\n $criteria->compare('user_id',$this->user_id);\n $criteria->compare('estado_id',$this->estado_id);\n $criteria->compare('merchant',$this->merchant);\n $criteria->compare('operationid',$this->operationid);\n $criteria->compare('currencycode',$this->currencycode);\n $criteria->compare('amount',$this->amount);\n $criteria->compare('csbtcity',$this->csbtcity,true);\n $criteria->compare('csstcity',$this->csstcity,true);\n $criteria->compare('csbtcountry',$this->csbtcountry,true);\n $criteria->compare('csstcountry',$this->csstcountry,true);\n $criteria->compare('csbtemail',$this->csbtemail,true);\n $criteria->compare('csstemail',$this->csstemail,true);\n $criteria->compare('csbtfirstname',$this->csbtfirstname,true);\n $criteria->compare('csstfirstname',$this->csstfirstname,true);\n $criteria->compare('csbtlastname',$this->csbtlastname,true);\n $criteria->compare('csstlastname',$this->csstlastname,true);\n $criteria->compare('csbtphonenumber',$this->csbtphonenumber,true);\n $criteria->compare('csstphonenumber',$this->csstphonenumber,true);\n $criteria->compare('csbtpostalcode',$this->csbtpostalcode,true);\n $criteria->compare('csstpostalcode',$this->csstpostalcode,true);\n $criteria->compare('csbtstate',$this->csbtstate,true);\n $criteria->compare('csststate',$this->csststate,true);\n $criteria->compare('csbtstreet1',$this->csbtstreet1,true);\n $criteria->compare('csststreet1',$this->csststreet1,true);\n $criteria->compare('csbtcustomerid',$this->csbtcustomerid);\n $criteria->compare('csbtipaddress',$this->csbtipaddress,true);\n $criteria->compare('csptcurrency',$this->csptcurrency,true);\n $criteria->compare('csptgrandtotalamount',$this->csptgrandtotalamount,true);\n $criteria->compare('csmdd8',$this->csmdd8,true);\n $criteria->compare('csitproductcode',$this->csitproductcode,true);\n $criteria->compare('csitproductdescription',$this->csitproductdescription,true);\n $criteria->compare('csitproductname',$this->csitproductname,true);\n $criteria->compare('csitproductsku',$this->csitproductsku,true);\n $criteria->compare('csittotalamount',$this->csittotalamount,true);\n $criteria->compare('csitquantity',$this->csitquantity,true);\n $criteria->compare('csitunitprice',$this->csitunitprice,true);\n\n return new CActiveDataProvider($this, array(\n 'pagination' => array(\n 'pageSize'=>Yii::app()->user->getState('pageSize',Yii::app()->params['defaultPageSize']),\n ),\n 'criteria'=>$criteria,\n ));\n }", "title": "" }, { "docid": "2df9b7eff5627359b7034dd514d0b836", "score": "0.39683747", "text": "public function listingId(string $value)\n {\n $this->builder->orWhere('properties.listing_id', 'like', \"%{$value}%\");\n }", "title": "" }, { "docid": "11aa5679a46bd1ef62fa0e5941dcb9ee", "score": "0.39674115", "text": "public function filterDnc( $incomingCaller )\n {\n /**\n * Search for wild cards and full number in DNC\n */\n // The str_after function returns everything after the given value in a string:\n $localNumber = Str::after( $incomingCaller, '+1' ); // get a number in local format\n\n // The str_limit function limits the number of characters in a string. The function accepts a string\n // as its first argument and the maximum number of resulting characters as its second argument:\n $wildCard = Str::limit( $localNumber, 3, '' ); // get first 3 characters\n\n // search for wildcard\n $wildCardSearch = DncNumber::where( [ 'number' => $wildCard, 'type' => 'wild_card' ] )->first();\n\n if ( ! empty( $wildCardSearch ) ) :\n $this->greetDncNumber();\n\n return true;\n else:\n\n $dnc = DncNumber::where( [ 'number' => $incomingCaller, 'type' => 'number' ] )->first();\n if ( ! empty( $dnc ) ) :\n $this->greetDncNumber();\n\n return true;\n endif;\n endif;\n\n return false;\n }", "title": "" }, { "docid": "110187b1f558a13fce9a5c54adddffea", "score": "0.39673305", "text": "public function columnSearch($model, $fieldName, $searchValue)\n {\n $searchValueLike = sprintf(\"%s%%\", $searchValue);\n return $model->where($fieldName, 'like', $searchValueLike);\n }", "title": "" }, { "docid": "9bc417a47236523e978c4757b3b5739f", "score": "0.39655086", "text": "public function searchObatStokOpname()\n\t\t{\n\t\t\t$model = $this;\n\t\t\t$criteria=new CDbCriteria;\n\t\t\t$criteria->limit = 50; //RTN-1095 //RND-9703 Reduce limit from 1000 to 50\n\t\t\tif(!Yii::app()->request->isAjaxRequest){//data hanya muncul setelah melakukan pencarian\n\t\t\t\t$criteria->limit = 0;\n\t\t\t}\n\t\t\tif(isset($_GET['formuliropname_id'])){\n\t\t\t\t$model = new GFFormstokopnameR;\n\t\t\t\t$criteria->addCondition('formuliropname_id = '.$_GET['formuliropname_id']);\n\t\t\t\t$criteria->addCondition('stokopnamedet_id IS NULL');\n\t\t\t\t$criteria->limit = -1;\n\t\t\t}else if(isset($_GET['stokopname_id'])){\n\t\t\t\t$model = new GFStokopnamedetT;\n\t\t\t\t$criteria->addCondition('stokopname_id = '.$_GET['stokopname_id']);\n\t\t\t\t$criteria->limit = -1;\n\t\t\t}else{\n\t\t\t\tif(!empty($this->obatalkes_id)){\n\t\t\t\t\t$criteria->addCondition('obatalkes_id = '.$this->obatalkes_id);\n\t\t\t\t}\n\t\t\t\tif(!empty($this->jenisobatalkes_id)){\n\t\t\t\t\t$criteria->addCondition('jenisobatalkes_id = '.$this->jenisobatalkes_id);\n\t\t\t\t}\n\t\t\t\t$criteria->compare('LOWER(obatalkes_barcode)',strtolower($this->obatalkes_barcode));\n\t\t\t\t$criteria->compare('LOWER(obatalkes_kode)',strtolower($this->obatalkes_kode),true);\n\t\t\t\t$criteria->compare('LOWER(obatalkes_nama)',strtolower($this->obatalkes_nama),true);\n\t\t\t\t$criteria->compare('LOWER(obatalkes_golongan)',strtolower($this->obatalkes_golongan),true);\n\t\t\t\t$criteria->compare('LOWER(obatalkes_kategori)',strtolower($this->obatalkes_kategori),true);\n\t\t\t\tif($this->jenisstokopname == Params::JENISSTOKOPNAME_PENYESUAIAN){\n\t\t\t\t\t$criteria->addCondition('ruangan_id = '.Yii::app()->user->getState('ruangan_id'));\n\t\t\t\t\t$model = $this;\n\t\t\t\t}else{\n\t\t\t\t\t$model = new GFObatalkesfarmasiV;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn new CActiveDataProvider($model, array(\n\t\t\t\t\t'criteria'=>$criteria,\n\t\t\t\t\t'pagination'=>false,\n\t\t\t));\n\t\t}", "title": "" }, { "docid": "92bbb2cf16af95b1ffad5ae7d1a8dc36", "score": "0.3962117", "text": "public function search($providerID = false) { //$providerID to only load employees under that provider\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n $criteria = new CDbCriteria;\n\n if ($providerID) {\n $criteria->with = array(\n 'branch',\n 'provider' => array(\n 'select' => false,\n 'condition' => \"provider.provider_id=\" . $providerID,\n ),\n );\n }\n\n $criteria->compare('employee_id', $this->employee_id, true);\n $criteria->compare('branch_id', $this->branch_id, true);\n $criteria->compare('employee_name', $this->employee_name, true);\n $criteria->compare('employee_workstart', $this->employee_workstart, true);\n $criteria->compare('employee_workend', $this->employee_workend, true);\n $criteria->compare('employee_breakstart', $this->employee_breakstart, true);\n $criteria->compare('employee_breakend', $this->employee_breakend, true);\n $criteria->compare('employee_dayoff', $this->employee_dayoff, true);\n\n //Add search function to related\n $criteria->compare('branch.branch_address', $this->branch_search, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(//add sorting to related model\n 'attributes' => array(\n 'branch_search' => array(\n 'asc' => 'branch.branch_address',\n 'desc' => 'branch.branch_address DESC',\n ),\n '*', //* means treat other fields normally\n ),\n ),\n ));\n }", "title": "" }, { "docid": "8d617cab030176045ee74f8b452d939d", "score": "0.39615995", "text": "public function criteriaSearch()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\tif(!empty($this->instalasi_id)){\n\t\t\t$criteria->addCondition('instalasi_id = '.$this->instalasi_id);\n\t\t}\n\t\t$criteria->compare('LOWER(instalasi_nama)',strtolower($this->instalasi_nama),true);\n\t\tif(!empty($this->ruangan_id)){\n\t\t\t$criteria->addCondition('ruangan_id = '.$this->ruangan_id);\n\t\t}\n\t\t$criteria->compare('LOWER(ruangan_nama)',strtolower($this->ruangan_nama),true);\n\t\tif(!empty($this->terimapersediaan_id)){\n\t\t\t$criteria->addCondition('terimapersediaan_id = '.$this->terimapersediaan_id);\n\t\t}\n\t\tif(!empty($this->pembelianbarang_id)){\n\t\t\t$criteria->addCondition('pembelianbarang_id = '.$this->pembelianbarang_id);\n\t\t}\n\t\t// if ($this->filter == 'supplier'){\n if(!empty($this->supplier_id)){\n $criteria->addInCondition('supplier_id',$this->supplier_id);\n }//else{\n // $criteria->addCondition('supplier_id IS NULL');\n // } \n // }\n\t\t$criteria->compare('LOWER(supplier_kode)',strtolower($this->supplier_kode),true);\n\t\t$criteria->compare('LOWER(supplier_nama)',strtolower($this->supplier_nama),true);\n\t\t$criteria->compare('LOWER(supplier_alamat)',strtolower($this->supplier_alamat),true);\n\t\t$criteria->compare('LOWER(supplier_propinsi)',strtolower($this->supplier_propinsi),true);\n\t\t$criteria->compare('LOWER(supplier_kabupaten)',strtolower($this->supplier_kabupaten),true);\n\t\t$criteria->compare('LOWER(supplier_telp)',strtolower($this->supplier_telp),true);\n\t\t$criteria->compare('LOWER(supplier_fax)',strtolower($this->supplier_fax),true);\n\t\t$criteria->compare('LOWER(supplier_kodepos)',strtolower($this->supplier_kodepos),true);\n\t\t$criteria->compare('LOWER(supplier_npwp)',strtolower($this->supplier_npwp),true);\n\t\t$criteria->compare('LOWER(supplier_norekening)',strtolower($this->supplier_norekening),true);\n\t\t$criteria->compare('LOWER(supplier_namabank)',strtolower($this->supplier_namabank),true);\n\t\t$criteria->compare('LOWER(supplier_rekatasnama)',strtolower($this->supplier_rekatasnama),true);\n\t\t$criteria->compare('LOWER(supplier_matauang)',strtolower($this->supplier_matauang),true);\n\t\t$criteria->compare('LOWER(supplier_website)',strtolower($this->supplier_website),true);\n\t\t$criteria->compare('LOWER(supplier_email)',strtolower($this->supplier_email),true);\n\t\t$criteria->compare('LOWER(supplier_cp)',strtolower($this->supplier_cp),true);\n\t\t$criteria->compare('LOWER(supplier_cp_hp)',strtolower($this->supplier_cp_hp),true);\n\t\t$criteria->compare('LOWER(supplier_cp_email)',strtolower($this->supplier_cp_email),true);\n\t\t$criteria->compare('LOWER(supplier_cp2)',strtolower($this->supplier_cp2),true);\n\t\t$criteria->compare('LOWER(supplier_cp2_hp)',strtolower($this->supplier_cp2_hp),true);\n\t\t$criteria->compare('LOWER(supplier_cp2_email)',strtolower($this->supplier_cp2_email),true);\n\t\t$criteria->compare('LOWER(supplier_jenis)',strtolower($this->supplier_jenis),true);\n\t\tif(!empty($this->supplier_termin)){\n\t\t\t$criteria->addCondition('supplier_termin = '.$this->supplier_termin);\n\t\t}\n\t\t$criteria->compare('LOWER(longitude)',strtolower($this->longitude),true);\n\t\t$criteria->compare('LOWER(latitude)',strtolower($this->latitude),true);\n\t\tif(!empty($this->asalbarang_id)){\n\t\t\t$criteria->addCondition('asalbarang_id = '.$this->asalbarang_id);\n\t\t}\n\t\t$criteria->compare('LOWER(asalbarang_nama)',strtolower($this->asalbarang_nama),true);\n\t\tif(!empty($this->rekeningsupplier_id)){\n\t\t\t$criteria->addCondition('rekeningsupplier_id = '.$this->rekeningsupplier_id);\n\t\t}\n\t\tif(!empty($this->bank_id)){\n\t\t\t$criteria->addCondition('bank_id = '.$this->bank_id);\n\t\t}\n\t\t$criteria->compare('LOWER(namabank)',strtolower($this->namabank),true);\n\t\t$criteria->compare('LOWER(alamatbank)',strtolower($this->alamatbank),true);\n\t\t$criteria->compare('LOWER(no_rekening)',strtolower($this->no_rekening),true);\n\t\t$criteria->compare('LOWER(tglpembelian)',strtolower($this->tglpembelian),true);\n\t\t$criteria->compare('LOWER(nopembelian)',strtolower($this->nopembelian),true);\n\t\t$criteria->compare('LOWER(tgldikirim)',strtolower($this->tgldikirim),true);\n\t\tif(!empty($this->pegawaipenerima_id)){\n\t\t\t$criteria->addCondition('pegawaipenerima_id = '.$this->pegawaipenerima_id);\n\t\t}\n\t\t$criteria->compare('LOWER(pegawaipenerima_nip)',strtolower($this->pegawaipenerima_nip),true);\n\t\t$criteria->compare('LOWER(pegawaipenerima_jenisidentitas)',strtolower($this->pegawaipenerima_jenisidentitas),true);\n\t\t$criteria->compare('LOWER(pegawaipenerima_noidentitas)',strtolower($this->pegawaipenerima_noidentitas),true);\n\t\t$criteria->compare('LOWER(pegawaipenerima_gelardepan)',strtolower($this->pegawaipenerima_gelardepan),true);\n\t\t$criteria->compare('LOWER(pegawaipenerima_nama)',strtolower($this->pegawaipenerima_nama),true);\n\t\t$criteria->compare('LOWER(pegawaipenerima_gelarbelakang)',strtolower($this->pegawaipenerima_gelarbelakang),true);\n\t\tif(!empty($this->pegawaimengetahui_id)){\n\t\t\t$criteria->addCondition('pegawaimengetahui_id = '.$this->pegawaimengetahui_id);\n\t\t}\n\t\t$criteria->compare('LOWER(pegawaimengetahui_nip)',strtolower($this->pegawaimengetahui_nip),true);\n\t\t$criteria->compare('LOWER(pegawaimengetahui_jenisidentitas)',strtolower($this->pegawaimengetahui_jenisidentitas),true);\n\t\t$criteria->compare('LOWER(pegawaimengetahui_noidentitas)',strtolower($this->pegawaimengetahui_noidentitas),true);\n\t\t$criteria->compare('LOWER(pegawaimengetahui_gelardepan)',strtolower($this->pegawaimengetahui_gelardepan),true);\n\t\t$criteria->compare('LOWER(pegawaimengetahui_nama)',strtolower($this->pegawaimengetahui_nama),true);\n\t\t$criteria->compare('LOWER(pegawaimengetahui_gelarbelakang)',strtolower($this->pegawaimengetahui_gelarbelakang),true);\n\t\t$criteria->compare('LOWER(nopenerimaan)',strtolower($this->nopenerimaan),true);\n\t\t$criteria->compare('LOWER(tglsuratjalan)',strtolower($this->tglsuratjalan),true);\n\t\t$criteria->compare('LOWER(nosuratjalan)',strtolower($this->nosuratjalan),true);\n\t\t$criteria->compare('LOWER(tgljatuhtempo)',strtolower($this->tgljatuhtempo),true);\n\t\t$criteria->compare('LOWER(tglfaktur)',strtolower($this->tglfaktur),true);\n\t\t$criteria->compare('LOWER(nofaktur)',strtolower($this->nofaktur),true);\n\t\t$criteria->compare('LOWER(keterangan_persediaan)',strtolower($this->keterangan_persediaan),true);\n\t\t$criteria->compare('totalharga',$this->totalharga);\n\t\t$criteria->compare('discount',$this->discount);\n\t\t$criteria->compare('biayaadministrasi',$this->biayaadministrasi);\n\t\t$criteria->compare('pajakpph',$this->pajakpph);\n\t\t$criteria->compare('pajakppn',$this->pajakppn);\n\t\t$criteria->compare('LOWER(nofakturpajak)',strtolower($this->nofakturpajak),true);\n\t\t$criteria->addBetweenCondition('tglterima', $this->tgl_awal, $this->tgl_akhir);\n\t\tif(isset($_GET['berdasarkanJatuhTempo'])){\n if($_GET['berdasarkanJatuhTempo']>0){\n\t\t\t\t$criteria->addBetweenCondition('tgljatuhtempo', $this->tgl_awalJatuhTempo, $this->tgl_akhirJatuhTempo);\n\t\t\t}\n\t\t}\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "48660ce91b8d0b24d9f2112202a6718c", "score": "0.39588144", "text": "public function searchPrint()\n {\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\t\t$criteria->compare('pengirimanrm_id',$this->pengirimanrm_id);\n\t\t$criteria->compare('peminjamanrm_id',$this->peminjamanrm_id);\n\t\t$criteria->compare('kembalirm_id',$this->kembalirm_id);\n\t\t$criteria->compare('pasien_id',$this->pasien_id);\n\t\t$criteria->compare('pendaftaran_id',$this->pendaftaran_id);\n\t\t$criteria->compare('dokrekammedis_id',$this->dokrekammedis_id);\n\t\t$criteria->compare('ruangan_id',$this->ruangan_id);\n\t\t$criteria->compare('LOWER(nourut_keluar)',strtolower($this->nourut_keluar),true);\n\t\t$criteria->compare('LOWER(tglpengirimanrm)',strtolower($this->tglpengirimanrm),true);\n\t\t$criteria->compare('kelengkapandokumen',$this->kelengkapandokumen);\n\t\t$criteria->compare('LOWER(petugaspengirim)',strtolower($this->petugaspengirim),true);\n\t\t$criteria->compare('printpengiriman',$this->printpengiriman);\n\t\t$criteria->compare('ruanganpengirim_id',$this->ruanganpengirim_id);\n\t\t$criteria->compare('LOWER(create_time)',strtolower($this->create_time),true);\n\t\t$criteria->compare('LOWER(update_time)',strtolower($this->update_time),true);\n\t\t$criteria->compare('LOWER(create_loginpemakai_id)',strtolower($this->create_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(update_loginpemakai_id)',strtolower($this->update_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(create_ruangan)',strtolower($this->create_ruangan),true);\n // Klo limit lebih kecil dari nol itu berarti ga ada limit \n $criteria->limit=-1; \n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>false,\n ));\n }", "title": "" }, { "docid": "262cd666b413f752a66f5e81c1484b96", "score": "0.39517838", "text": "function getListFilter($col,$key,$tahun='',$bulan='') {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'periode': \n\t\t\t\t\treturn \"datepart(year,tglpengajuan) = '$tahun' and datepart(month,tglpengajuan) = '$bulan' \"; \n\t\t\t\tbreak;\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once('m_unit.php');\n\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "860dc1dc94121f8a3f164475148c6014", "score": "0.39456528", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'periode': return \"periodedaftar = '$key'\";\n\t\t\t\tcase 'jalur': return \"jalurpenerimaan = '$key'\";\n\t\t\t\tcase 'gelombang':return \"idgelombang = '$key'\";\n\t\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "051c4b89dd85bcd6626902575b3d83ee", "score": "0.39408815", "text": "protected function typeInternationalStandardBookNumber(Fluent $column): string\n {\n return 'isbn';\n }", "title": "" }, { "docid": "0ebc0944d8041f1cb50e83baf42b3e3a", "score": "0.3937841", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('producto_proveedor_id',$this->producto_proveedor_id);\n\t\t$criteria->compare('nit',$this->nit,true);\n\t\t$criteria->compare('factura_n',$this->factura_n,true);\n\t\t$criteria->compare('forma_pago',$this->forma_pago,true);\n\t\t$criteria->compare('descuento',$this->descuento,true);\n\t\t$criteria->compare('descuento_tipo',$this->descuento_tipo);\n\t\t$criteria->compare('descuento_valor',$this->descuento_valor,true);\n\t\t$criteria->compare('descuento_total',$this->descuento_total,true);\n\t\t$criteria->compare('iva',$this->iva,true);\n\t\t$criteria->compare('iva_total',$this->iva_total,true);\n\t\t$criteria->compare('aplica_retencion',$this->aplica_retencion,true);\n\t\t$criteria->compare('retencion_id',$this->retencion_id);\n\t\t$criteria->compare('retencion_retener',$this->retencion_retener,true);\n\t\t$criteria->compare('retencion_base',$this->retencion_base,true);\n\t\t$criteria->compare('retencion_porcentaje',$this->retencion_porcentaje,true);\n\t\t$criteria->compare('rte_iva',$this->rte_iva,true);\n\t\t$criteria->compare('rte_iva_valor',$this->rte_iva_valor,true);\n\t\t$criteria->compare('rte_ica',$this->rte_ica,true);\n\t\t$criteria->compare('rte_ica_porcentaje',$this->rte_ica_porcentaje,true);\n\t\t$criteria->compare('rte_ica_valor',$this->rte_ica_valor,true);\n\t\t$criteria->compare('cantidad_productos',$this->cantidad_productos);\n\t\t$criteria->compare('total_orden',$this->total_orden,true);\n\t\t$criteria->compare('total',$this->total,true);\n\t\t$criteria->compare('total_compra',$this->total_compra,true);\n\t\t$criteria->compare('centro_costo_id',$this->centro_costo_id);\n\t\t$criteria->compare('centro_compra_id',$this->centro_compra_id);\n\t\t$criteria->compare('personal_id',$this->personal_id);\n\t\t$criteria->compare('fecha',$this->fecha,true);\n\t\t//$criteria->compare('fecha_sola',$this->fecha_sola,true);\n\t\t$criteria->compare('DATE_FORMAT(fecha_sola, \\'%d-%m-%Y\\')',$this->fecha_sola,true);\n\t\t$criteria->compare('credito_dias',$this->credito_dias,true);\n\t\t$criteria->compare('credito_fecha',$this->credito_fecha,true);\n\t\t$criteria->compare('banco_cuenta_id',$this->banco_cuenta_id);\n\t\t$criteria->compare('banco_destino',$this->banco_destino,true);\n\t\t$criteria->compare('cuenta_destino',$this->cuenta_destino,true);\n\t\t$criteria->compare('saldo',$this->saldo,true);\n\t\t$criteria->compare('estado',$this->estado,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array('pageSize'=>20),\n\t\t\t'sort'=>array(\n\t\t\t 'defaultOrder'=>'id DESC',\n\t\t\t 'attributes'=>array(\n\t\t\t),\n\t\t)));\n\t}", "title": "" }, { "docid": "a005e578630b7daed07e9c19d1abb358", "score": "0.3936268", "text": "private function generateFilterCriteria() {\r\n\t\t\r\n\t\t$criteria = new Criteria();\r\n\t\t\r\n\t\tif (isset($this->rating))\r\n\t\t\t$criteria->add(AddressPeer::RATING,$this->rating);\r\n\t\t\r\n\t\tif (isset($this->circuitId)) {\r\n\t\t\t$criteria->add(AddressPeer::CIRCUITID,$this->circuitId);\r\n\t\t\t$criteria->addAscendingOrderByColumn(AddressPeer::ORDERCIRCUIT);\r\n\t\t}\t\r\n\t\tif (isset($this->regionId))\r\n\t\t\t$criteria->add(AddressPeer::REGIONID,$this->regionId);\r\n\t\t\r\n\t\tif (isset($this->streetName)) {\r\n\t\t\t$criterionStreet = $criteria->getNewCriterion(AddressPeer::STREET,\"%\" . $this->streetName . \"%\",Criteria::LIKE);\r\n\t\t\t$criterionNickname = $criteria->getNewCriterion(AddressPeer::NICKNAME,\"%\" . $this->streetName . \"%\",Criteria::LIKE);\r\n\t\t\t$criterionStreet->addOr($criterionNickname);\r\n\r\n\t\t\t$criteria->add($criterionStreet);\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($this->billboardType) && ($this->billboardType > 0)) {\r\n\t\t\t$criteria->addJoin(AddressPeer::ID,BillboardPeer::ADDRESSID,Criteria::INNER_JOIN);\r\n\t\t\t$criteria->add(BillboardPeer::TYPE,$this->billboardType);\r\n\t\t\t$criteria->setDistinct();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$criteria->addJoin(AddressPeer::CIRCUITID,CircuitPeer::ID,Criteria::LEFT_JOIN);\r\n\r\n\t\t//ordenamiento por default pedidos\r\n\t\t$criteria->addAscendingOrderByColumn(AddressPeer::STREET);\r\n\t\t$criteria->addAscendingOrderByColumn(CircuitPeer::NAME);\r\n\t\t\r\n\t\treturn $criteria;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "7b194983e00298329aa12094431a649e", "score": "0.39320576", "text": "public function filterByNumeroOrden($numeroOrden = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($numeroOrden)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $numeroOrden)) {\n\t\t\t\t$numeroOrden = str_replace('*', '%', $numeroOrden);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(DetalleOrdenPeer::NUMERO_ORDEN, $numeroOrden, $comparison);\n\t}", "title": "" }, { "docid": "75307e4dd4493132dfd8fe7045096bdd", "score": "0.39253893", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('company_id',$this->company_id);\n\t\t$criteria->compare('contract_id',$this->contract_id);\n\t\t$criteria->compare('account_id',$this->account_id);\n\t\t$criteria->compare('firstname',$this->firstname,true);\n\t\t$criteria->compare('lastname',$this->lastname,true);\n\t\t$criteria->compare('custom_customer_id',$this->custom_customer_id,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('state',$this->state,true);\n\t\t$criteria->compare('zip',$this->zip,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email_address',$this->email_address,true);\n\t\t$criteria->compare('referral',$this->referral,true);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_updated',$this->date_updated,true);\n\t\t$criteria->compare('payment_method',$this->payment_method,true);\n\t\t$criteria->compare('credit_card_type',$this->credit_card_type,true);\n\t\t$criteria->compare('credit_card_name',$this->credit_card_name,true);\n\t\t$criteria->compare('credit_card_number',$this->credit_card_number,true);\n\t\t$criteria->compare('credit_card_security_code',$this->credit_card_security_code,true);\n\t\t$criteria->compare('credit_card_expiration_month',$this->credit_card_expiration_month,true);\n\t\t$criteria->compare('credit_card_expiration_year',$this->credit_card_expiration_year,true);\n\t\t$criteria->compare('echeck_account_number',$this->echeck_account_number,true);\n\t\t$criteria->compare('echeck_routing_number',$this->echeck_routing_number,true);\n\t\t$criteria->compare('echeck_account_type',$this->echeck_account_type,true);\n\t\t$criteria->compare('echeck_entity_name',$this->echeck_entity_name,true);\n\t\t$criteria->compare('echeck_account_name',$this->echeck_account_name,true);\n\t\t$criteria->compare('echeck_institution_name',$this->echeck_institution_name,true);\n\t\t$criteria->compare('cc_address',$this->cc_address,true);\n\t\t$criteria->compare('cc_city',$this->cc_city,true);\n\t\t$criteria->compare('cc_state',$this->cc_state,true);\n\t\t$criteria->compare('cc_zip',$this->cc_zip,true);\n\t\t$criteria->compare('signature',$this->signature,true);\n\t\t$criteria->compare('start_month',$this->start_month,true);\n\t\t$criteria->compare('notes',$this->notes,true);\n\t\t$criteria->compare('sales_rep_account_id',$this->sales_rep_account_id);\n\t\t$criteria->compare('sales_management_deleted',$this->sales_management_deleted);\n\t\t$criteria->compare('send_weekly_emails',$this->send_weekly_emails);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "994509e61d762201e11c0e218b5378f1", "score": "0.3921642", "text": "public function filterByInstallmentNo($installmentNo = null, $comparison = null)\n {\n if (is_array($installmentNo)) {\n $useMinMax = false;\n if (isset($installmentNo['min'])) {\n $this->addUsingAlias(CustomerreceiptsPeer::INSTALLMENT_NO, $installmentNo['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($installmentNo['max'])) {\n $this->addUsingAlias(CustomerreceiptsPeer::INSTALLMENT_NO, $installmentNo['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(CustomerreceiptsPeer::INSTALLMENT_NO, $installmentNo, $comparison);\n }", "title": "" } ]
e5f6956a9e2dae63fe135ef5809fb304
test for Density initialisation expected instance
[ { "docid": "bf202e02675b502f0a75d87b0edf7284", "score": "0.80532634", "text": "public function testDensityInit()\n {\n $value = new Zend_Measure_Density('100', Zend_Measure_Density::STANDARD, 'de');\n $this->assertTrue($value instanceof Zend_Measure_Density, 'Zend_Measure_Density Object not returned');\n }", "title": "" } ]
[ { "docid": "5f58bcfdeafcd9c1796bbf62270969c0", "score": "0.64559525", "text": "public function testDensitySetComputedType1()\n {\n $value = new Zend_Measure_Density('-100', Zend_Measure_Density::SILVER, 'de');\n $value->setType(Zend_Measure_Density::TONNE_PER_MILLILITER);\n $this->assertEquals(Zend_Measure_Density::TONNE_PER_MILLILITER, $value->getType(), 'Zend_Measure_Density type expected');\n }", "title": "" }, { "docid": "679a31aa4aecbd3555c3b0022a101fdf", "score": "0.6382956", "text": "public function testDensityUnknownValue()\n {\n try {\n $value = new Zend_Measure_Density('novalue', Zend_Measure_Density::STANDARD, 'de');\n $this->fail('Exception expected because of empty value');\n } catch (Zend_Measure_Exception $e) {\n // success\n }\n }", "title": "" }, { "docid": "d39c3595b6c91965ffffb6058a4fd256", "score": "0.6332325", "text": "public function testDensitySetType()\n {\n $value = new Zend_Measure_Density('-100', Zend_Measure_Density::STANDARD, 'de');\n $value->setType(Zend_Measure_Density::GOLD);\n $this->assertEquals(Zend_Measure_Density::GOLD, $value->getType(), 'Zend_Measure_Density type expected');\n }", "title": "" }, { "docid": "0499742fbfdf51aa16d33b40b4e35309", "score": "0.6242296", "text": "public function testDensitySetComputedType2()\n {\n $value = new Zend_Measure_Density('-100', Zend_Measure_Density::TONNE_PER_MILLILITER, 'de');\n $value->setType(Zend_Measure_Density::GOLD);\n $this->assertEquals(Zend_Measure_Density::GOLD, $value->getType(), 'Zend_Measure_Density type expected');\n }", "title": "" }, { "docid": "474b8bf11ea59ce1894c8a21cecac77e", "score": "0.6200373", "text": "public function testDensityEquality()\n {\n $value = new Zend_Measure_Density('-100.100,200', Zend_Measure_Density::STANDARD, 'de');\n $newvalue = new Zend_Measure_Density('-100.100,200', Zend_Measure_Density::STANDARD, 'de');\n $this->assertTrue($value->equals($newvalue), 'Zend_Measure_Density Object should be equal');\n }", "title": "" }, { "docid": "174831df7f3a28916d8bfb1d96b51bc1", "score": "0.61830854", "text": "public function testDensitySetWithNoLocale()\n {\n $value = new Zend_Measure_Density('100', Zend_Measure_Density::STANDARD, 'de');\n $value->setValue('200', Zend_Measure_Density::STANDARD);\n $this->assertEquals(200, $value->getValue(), 'Zend_Measure_Density value expected to be a positive integer');\n }", "title": "" }, { "docid": "b90bdb01b3b94d3a3daec9bbab518da2", "score": "0.6148671", "text": "public function testDensitySetPositive()\n {\n $value = new Zend_Measure_Density('100', Zend_Measure_Density::STANDARD, 'de');\n $value->setValue('200', Zend_Measure_Density::STANDARD, 'de');\n $this->assertEquals(200, $value->getValue(), 'Zend_Measure_Density value expected to be a positive integer');\n }", "title": "" }, { "docid": "b0b7425eab6e383a0ddc726c19a69beb", "score": "0.6120102", "text": "public function testDensityNoLocale()\n {\n $value = new Zend_Measure_Density('100', Zend_Measure_Density::STANDARD);\n $this->assertEquals(100, $value->getValue(), 'Zend_Measure_Density value expected');\n }", "title": "" }, { "docid": "5df29995096b8c44a772690ba58907ad", "score": "0.61085534", "text": "public function testDensityUnknownType()\n {\n try {\n $value = new Zend_Measure_Density('100', 'Density::UNKNOWN', 'de');\n $this->fail('Exception expected because of unknown type');\n } catch (Zend_Measure_Exception $e) {\n // success\n }\n }", "title": "" }, { "docid": "3aa7174002d2efd5d725bf900628a370", "score": "0.6103255", "text": "public function testDensitySetTypeFailed()\n {\n try {\n $value = new Zend_Measure_Density('-100', Zend_Measure_Density::STANDARD, 'de');\n $value->setType('Density::UNKNOWN');\n $this->fail('Exception expected because of unknown type');\n } catch (Zend_Measure_Exception $e) {\n // success\n }\n }", "title": "" }, { "docid": "3f0dc53532921106306a917cc59a18a6", "score": "0.6034471", "text": "public function testDensityValuePositive()\n {\n $value = new Zend_Measure_Density('100', Zend_Measure_Density::STANDARD, 'de');\n $this->assertEquals(100, $value->getValue(), 'Zend_Measure_Density value expected to be a positive integer');\n }", "title": "" }, { "docid": "7c794850f4e1ee19fe937b0f66872e96", "score": "0.596815", "text": "public function testDensityNoEquality()\n {\n $value = new Zend_Measure_Density('-100.100,200', Zend_Measure_Density::STANDARD, 'de');\n $newvalue = new Zend_Measure_Density('-100,200', Zend_Measure_Density::STANDARD, 'de');\n $this->assertFalse($value->equals($newvalue), 'Zend_Measure_Density Object should be not equal');\n }", "title": "" }, { "docid": "d1f1a8a57607610f0292edc7112cec71", "score": "0.59621185", "text": "public function testDensitySetString()\n {\n $value = new Zend_Measure_Density('-100.100,200', Zend_Measure_Density::STANDARD, 'de');\n $value->setValue('-200.200,200', Zend_Measure_Density::STANDARD, 'de');\n $this->assertEquals(-200200.200, $value->getValue(), 'Zend_Measure_Density Object not returned');\n }", "title": "" }, { "docid": "ddd8175214454033e639909d7e89a1c4", "score": "0.58855337", "text": "public function testDensitySetUnknownValue()\n {\n try {\n $value = new Zend_Measure_Density('100', Zend_Measure_Density::STANDARD, 'de');\n $value->setValue('novalue', Zend_Measure_Density::STANDARD, 'de');\n $this->fail('Exception expected because of empty value');\n } catch (Zend_Measure_Exception $e) {\n // success\n }\n }", "title": "" }, { "docid": "62a52888f46fab663da4b9c0f6bd5927", "score": "0.58805937", "text": "public function it_can_be_instantiated(): void\n {\n $result = $this->makeResult();\n\n static::assertIsMetricResult($result);\n\n static::assertNull($result->value);\n static::assertSame([], $result->trend);\n }", "title": "" }, { "docid": "c90d1c17e647696100ca62650a49a105", "score": "0.57652014", "text": "public function testDensitySetUnknownType()\n {\n try {\n $value = new Zend_Measure_Density('100', Zend_Measure_Density::STANDARD, 'de');\n $value->setValue('-200.200,200', 'Density::UNKNOWN', 'de');\n $this->fail('Exception expected because of unknown type');\n } catch (Zend_Measure_Exception $e) {\n // success\n }\n }", "title": "" }, { "docid": "a5922939542ce76ed70e180bf71bd62c", "score": "0.56405383", "text": "public function testDeviation()\n {\n $this->assertEquals(0, functions\\deviation(10, 10));\n $this->assertEquals(100, functions\\deviation(10, 20));\n $this->assertEquals(-10, functions\\deviation(10, 9));\n $this->assertEquals(10, functions\\deviation(10, 11));\n $this->assertEquals(11, functions\\deviation(0, 11));\n $this->assertEquals(-100, functions\\deviation(10, 0));\n $this->assertEquals(0, functions\\deviation(0, 0));\n }", "title": "" }, { "docid": "d8a9e59434e8b501ea8ca45d5a35dbcb", "score": "0.56272626", "text": "public function testDensityUnknownLocale()\n {\n try {\n $value = new Zend_Measure_Density('100', Zend_Measure_Density::STANDARD, 'nolocale');\n $this->fail('Exception expected because of unknown locale');\n } catch (Zend_Measure_Exception $e) {\n // success\n }\n }", "title": "" }, { "docid": "fd67d066a2c66ff2ed61f344b7d4ebfb", "score": "0.5604806", "text": "public function testGetDimension() {\n $this->assertEquals($this->dimension->width, $this->component->getDimension()->width);\n $this->assertEquals($this->dimension->height, $this->component->getDimension()->height);\n }", "title": "" }, { "docid": "81b483e36b9df06fe8941e79a687379f", "score": "0.5575181", "text": "public function testFactoryWithDensityImageCandidateSet()\n {\n $compilerService = CssRulesetCompilerServiceFactory::createForImageCandidates(\n new Ruleset(),\n $this->breakpoints,\n new ImageCandidateSet(new DensityImageCandidate('image.jpg', 1)),\n new ViewportCalculatorServiceFactory(),\n 16\n );\n $this->assertInstanceOf(DensityCssRulesetCompilerService::class, $compilerService);\n }", "title": "" }, { "docid": "c23372625b8c2dc92db3cd93406d0e39", "score": "0.5479684", "text": "public function testDensityValueString()\n {\n $value = new Zend_Measure_Density('-100.100,200', Zend_Measure_Density::STANDARD, 'de');\n $this->assertEquals(-100100.200, $value->getValue(), 'Zend_Measure_Density Object not returned');\n }", "title": "" }, { "docid": "9c2ffeee492f14d28baf611d56e6c9c1", "score": "0.5416221", "text": "public function testConstructor() {\n\n $obj1 = new \\WBW\\Bundle\\HighchartsBundle\\API\\Chart\\Responsive\\HighchartsRules(true);\n\n $this->assertNull($obj1->getChartOptions());\n $this->assertNull($obj1->getCondition());\n }", "title": "" }, { "docid": "82571f103637b4c41b439563249f1576", "score": "0.54092056", "text": "public function testDensityConversionList()\n {\n $value = new Zend_Measure_Density('-100', Zend_Measure_Density::STANDARD, 'de');\n $unit = $value->getConversionList();\n $this->assertTrue(is_array($unit), 'Array expected');\n }", "title": "" }, { "docid": "af7a3dc56cf3066e8c9e1bf82b136066", "score": "0.5380718", "text": "public function testInitialize() {\n\t\t$this->_targetObject->initialize();\n\t\t$this->assertFalse(empty($this->_targetObject->path));\n\t\t$this->assertData(CONFIG, $this->_targetObject->path);\n\t}", "title": "" }, { "docid": "7704ef4a4b4a69031e2a9901367e2151", "score": "0.53647643", "text": "public function testDensitySetNegative()\n {\n $value = new Zend_Measure_Density('-100', Zend_Measure_Density::STANDARD, 'de');\n $value->setValue('-200', Zend_Measure_Density::STANDARD, 'de');\n $this->assertEquals(-200, $value->getValue(), 'Zend_Measure_Density value expected to be a negative integer');\n }", "title": "" }, { "docid": "86ccf32c6e62b5e6ed9075cbc35ac39f", "score": "0.5360065", "text": "public function testDensityValueNegative()\n {\n $value = new Zend_Measure_Density('-100', Zend_Measure_Density::STANDARD, 'de');\n $this->assertEquals(-100, $value->getValue(), 'Zend_Measure_Density value expected to be a negative integer');\n }", "title": "" }, { "docid": "22c5ca5bd82c3ab7aa4d0383d5a0dff9", "score": "0.5350882", "text": "public function testDensitySetDecimal()\n {\n $value = new Zend_Measure_Density('-100,200', Zend_Measure_Density::STANDARD, 'de');\n $value->setValue('-200,200', Zend_Measure_Density::STANDARD, 'de');\n $this->assertEquals(-200.200, $value->getValue(), 'Zend_Measure_Density value expected to be a decimal value');\n }", "title": "" }, { "docid": "ad8b34c06cc15f3158d39ca2f426db52", "score": "0.53493077", "text": "public function test__construct() {\n\n $obj = new Historiquehpnl();\n\n $this->assertNull($obj->getAlpha());\n $this->assertNull($obj->getAnN());\n $this->assertNull($obj->getAnN1());\n $this->assertNull($obj->getAnN2());\n $this->assertNull($obj->getBudget1());\n $this->assertNull($obj->getBudget2());\n $this->assertNull($obj->getDate());\n $this->assertNull($obj->getFlgAnN());\n $this->assertNull($obj->getFlgAnN1());\n $this->assertNull($obj->getFlgAnN2());\n $this->assertNull($obj->getFlgBudget1());\n $this->assertNull($obj->getFlgBudget2());\n $this->assertNull($obj->getFmtDec());\n $this->assertNull($obj->getFmtInt());\n $this->assertNull($obj->getMemo());\n $this->assertNull($obj->getNoConvEuro());\n $this->assertNull($obj->getRegle());\n $this->assertNull($obj->getRub());\n $this->assertNull($obj->getTypeZone());\n }", "title": "" }, { "docid": "3b80f9bdcb91f32b624f12286ffa1a42", "score": "0.5323654", "text": "public function testInitBasic() {\n\t\t$int = array( 0, 1 );\n\t\t$percentages = new Percentages( $int );\n\t\t$percentages = $percentages->get();\n\t\t// Expect the function to return 3 arrays and the sum of rounded and rectified percentages.\n\t\t$this->assertArrayHasKey( 'absolute', $percentages );\n\t\t$this->assertArrayHasKey( 'rounded', $percentages );\n\t\t$this->assertArrayHasKey( 'corrected', $percentages );\n\t\t$this->assertArrayHasKey( 'rounded_sum', $percentages );\n\t\t$this->assertArrayHasKey( 'corrected_sum', $percentages );\n\t\t// Expect 2 items per array.\n\t\t$this->assertCount( count( $int ), $percentages['absolute'] );\n\t}", "title": "" }, { "docid": "dbcb8f67b316df7c3e91af10dfc79685", "score": "0.52992094", "text": "public function testConstructorSetsProvidedStatisticsProperty()\n {\n $mock = new Mock();\n $statisticsMock = $mock->statistics();\n $analyser = new Analyse($statisticsMock);\n $statistics = $analyser->getStatistics();\n $this->assertEmpty($statistics);\n }", "title": "" }, { "docid": "ee5e5a5402a91ccda4a47fee868bb82b", "score": "0.5249785", "text": "public function testInitialization()\n {\n $validStorage = new DummyCacheStorage();\n $validAdapter = new KeyValueCacheAdapter($validStorage);\n Assert::assertAttributeEquals($validStorage, 'keyValueStorage', $validAdapter);\n }", "title": "" }, { "docid": "c3a6681a1715a82d98be92a8f4315dad", "score": "0.5247309", "text": "public function testCreateObjectNoArgumentsMin()\n {\n $game = new \\Edni\\Game\\Histogram();\n $this->assertInstanceOf(\"\\Edni\\Game\\Histogram\", $game);\n\n $dice = new \\Edni\\Game\\DiceHistogram();\n $game->injectData($dice);\n\n\n $res = $game->min;\n $exp = 1;\n $this->assertEquals($exp, $res);\n }", "title": "" }, { "docid": "94ed5c5cd8943d0253dfa40337a6b3a2", "score": "0.5238102", "text": "public function testDensitySetDecimalSeperated()\n {\n $value = new Zend_Measure_Density('-100.100,200', Zend_Measure_Density::STANDARD, 'de');\n $value->setValue('-200.200,200', Zend_Measure_Density::STANDARD, 'de');\n $this->assertEquals(-200200.200, $value->getValue(), 'Zend_Measure_Density Object not returned');\n }", "title": "" }, { "docid": "426ccf7cc00bfed0e370529061c773d6", "score": "0.52348036", "text": "public function testConstruct()\n {\n $this->assertArrayHasKey('thumb', $this->renderer->sizes);\n $this->assertArrayHasKey('screen', $this->renderer->sizes);\n $this->assertArrayHasKey('*', $this->renderer->sizes);\n }", "title": "" }, { "docid": "a187a1ed821098e9933aa133f2651a2e", "score": "0.52120644", "text": "public function init() {\n\t\tparent::init();\n\t\ttx_pttools_assert::isEqual(count($this->dataDescriptions), 1, array('message' => sprintf('This filter can only be used with 1 dataDescription (dataDescription found: \"%s\"', count($this->dataDescriptions))));\n\t}", "title": "" }, { "docid": "3967e54dfe85895b2f00815ea978e36d", "score": "0.52036226", "text": "public function testDensityValueDecimal()\n {\n $value = new Zend_Measure_Density('-100,200', Zend_Measure_Density::STANDARD, 'de');\n $this->assertEquals(-100.200, $value->getValue(), 'Zend_Measure_Density value expected to be a decimal value');\n }", "title": "" }, { "docid": "ba2a5fd9949d81473337d5a09a4f5734", "score": "0.52015203", "text": "public function testDistributionOne(): void\n {\n $distribution = new Distribution([10]);\n iterator_to_array($distribution);\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "6052c81f13031ca44f14300d49b534b0", "score": "0.51908004", "text": "public function testDistributionZero(): void\n {\n $this->expectException(LogicException::class);\n $this->expectExceptionMessage('zero');\n new Distribution([]);\n }", "title": "" }, { "docid": "8db42359c04710c707633fc2626c6911", "score": "0.51826525", "text": "public function testDensityValueDecimalSeperated()\n {\n $value = new Zend_Measure_Density('-100.100,200', Zend_Measure_Density::STANDARD, 'de');\n $this->assertEquals(-100100.200, $value->getValue(), 'Zend_Measure_Density Object not returned');\n }", "title": "" }, { "docid": "d0bc2e05177d5146f66d2e5abf9f8f5b", "score": "0.5166519", "text": "public function testInit(): void\n {\n Factory::init();\n }", "title": "" }, { "docid": "3dae96437948fee8926528086c514fa9", "score": "0.5164673", "text": "public function test__construct() {\n\n $obj = new DataTablesOptions();\n\n $this->assertEquals([], $obj->getOptions());\n }", "title": "" }, { "docid": "76060a938c33c12d1c5f097c160cf3fc", "score": "0.5127536", "text": "public function testDefaultInstanceProperties()\n {\n $s = new \\Slim\\Slim();\n $this->assertInstanceOf('\\Slim\\Http\\Request', $s->request());\n $this->assertInstanceOf('\\Slim\\Http\\Response', $s->response());\n $this->assertInstanceOf('\\Slim\\Router', $s->router());\n $this->assertInstanceOf('\\Slim\\View', $s->view());\n $this->assertInstanceOf('\\Slim\\Log', $s->getLog());\n $this->assertEquals(\\Slim\\Log::DEBUG, $s->getLog()->getLevel());\n $this->assertTrue($s->getLog()->getEnabled());\n $this->assertInstanceOf('\\Slim\\Environment', $s->environment());\n }", "title": "" }, { "docid": "8a47a38aece02bc839b1396ea8b9631e", "score": "0.5108974", "text": "protected function setUp()\n {\n $this->demiurge = new Demiurge;\n }", "title": "" }, { "docid": "d83d5cb12d7480e6a85ef1f0449c311d", "score": "0.508123", "text": "public function testConstruct(): void\n {\n $object = new Fill();\n $this->assertEquals(Fill::FILL_NONE, $object->getFillType());\n $this->assertEquals(0, $object->getRotation());\n $this->assertInstanceOf(Color::class, $object->getStartColor());\n $this->assertEquals(Color::COLOR_WHITE, $object->getEndColor()->getARGB());\n $this->assertInstanceOf(Color::class, $object->getEndColor());\n $this->assertEquals(Color::COLOR_BLACK, $object->getStartColor()->getARGB());\n }", "title": "" }, { "docid": "09785a3a17612760576c76ed3f0d5a72", "score": "0.50746083", "text": "public function testInstantiation()\n {\n $installer = $this->createInstaller();\n\n $this->assertInstanceOf('Contao\\InstallationBundle\\Database\\Installer', $installer);\n }", "title": "" }, { "docid": "287a761210aa16d56b4b204a705e615d", "score": "0.50731784", "text": "public function testDensityToString()\n {\n $value = new Zend_Measure_Density('-100', Zend_Measure_Density::STANDARD, 'de');\n $this->assertEquals('-100 kg/m³', $value->toString(), 'Value -100 kg/m³ expected');\n }", "title": "" }, { "docid": "57e11e593b79d354d23bc6bb88f8899a", "score": "0.50707126", "text": "public function it_can_be_instantiated()\n {\n $this->assertInstanceOf(self::CARTIFY_CLASS, $this->cartify);\n $this->assertInstanceOf(self::CARTIFY_CLASS, $this->cartify->instance('main'));\n $this->assertEquals(0, $this->cartify->total());\n }", "title": "" }, { "docid": "5bc73235d7355459fabc6b0bea8932d1", "score": "0.5070217", "text": "public function testDensitySetUnknownLocale()\n {\n try {\n $value = new Zend_Measure_Density('100', Zend_Measure_Density::STANDARD, 'de');\n $value->setValue('200', Zend_Measure_Density::STANDARD, 'nolocale');\n $this->fail('Exception expected because of unknown locale');\n } catch (Zend_Measure_Exception $e) {\n // success\n }\n }", "title": "" }, { "docid": "f0e368460d4d3ed79919fca013614ec5", "score": "0.5068333", "text": "protected function setUp()\n {\n $this->object = new Power(500,20,300,600,700,120,23,55);\n }", "title": "" }, { "docid": "d0c7b468698cabfb0c92ec367d8cd8a4", "score": "0.5067909", "text": "public function testConstructor() {\n\t\t$schema = $this->dataStore->getSchema();\n\t\t$this->assertInstanceOf('Cumula\\\\CumulaSchema', $schema);\n\t\t$this->assertEquals($this->schema, $schema);\n\t}", "title": "" }, { "docid": "4c2a25e602e4afa1e51f56fe0500b1c2", "score": "0.5061575", "text": "public function testFactoryMetric() {\r\n $size = TyreSize::parseSize('215/75R15');\r\n $this->assertTrue(is_object($size));\r\n $this->assertClassesEqual('MetricTyreSize',get_class($size));\r\n \r\n }", "title": "" }, { "docid": "5c3e2a51cd24dbf4d67657f50d51084a", "score": "0.504937", "text": "public function test__construct()\n {\n $obj = Solar::factory('Solar_Path_Stack');\n $this->assertInstance($obj, 'Solar_Path_Stack');\n }", "title": "" }, { "docid": "66f83b047aed469a049f26e368553087", "score": "0.5030439", "text": "public function testCreateObjectNoArguments()\n {\n $dice = new DiceGraphic();\n $this->assertInstanceOf(\"\\Elpr\\Dice\\DiceGraphic\", $dice);\n\n $res = $dice->sides;\n $exp = 6;\n $this->assertEquals($exp, $res);\n }", "title": "" }, { "docid": "4b5ba23806ce8eaa6f15993f54367793", "score": "0.5029922", "text": "public function testStats(): void\n {\n $distribution = new Distribution([\n -50,\n 0,\n 50,\n 100,\n ]);\n\n $this->assertEquals(100, $distribution->getSum());\n $this->assertEquals(25, $distribution->getMean());\n $this->assertEquals(-50, $distribution->getMin());\n $this->assertEquals(100, $distribution->getMax());\n $this->assertEquals(56, round($distribution->getStdev()));\n $this->assertEquals(3125, $distribution->getVariance());\n $this->assertEquals(25, round($distribution->getMode()));\n }", "title": "" }, { "docid": "a354638c7bc02a4fd5b9854dab3ba152", "score": "0.50259817", "text": "public function testDistributionZeroValues(): void\n {\n $distribution = new Distribution([0, 0]);\n iterator_to_array($distribution);\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "0e6ad7930aa7b90666a547c397493efa", "score": "0.49943095", "text": "public function testDensity_ToString()\n {\n $value = new Zend_Measure_Density('-100', Zend_Measure_Density::STANDARD, 'de');\n $this->assertEquals('-100 kg/m³', $value->__toString(), 'Value -100 kg/m³ expected');\n }", "title": "" }, { "docid": "175d5607435c2ec0f27d7ef032415cde", "score": "0.49796122", "text": "public function initAsSpecimen()\n {\n global $user,$langs,$conf,$mysoc;\n\n // Initialize parameters\n $this->id=0;\n\n // There is no specific properties. All data into insert are provided as method parameter.\n }", "title": "" }, { "docid": "8b77e4acd4e1f95d5d0f110684d48da3", "score": "0.49634707", "text": "public function testCreateObjectNoArguments()\n {\n $dice = new DiceHistogram2();\n $this->assertInstanceOf(\"\\Mahw17\\Dice\\DiceHistogram2\", $dice);\n }", "title": "" }, { "docid": "3278f33a054e4707e39d4959bfd9698d", "score": "0.4958586", "text": "protected function createTestData()\n {\n //Create new element data\n $arCreateData = $this->arCreateData;\n\n $this->obElement = Measure::create($arCreateData);\n }", "title": "" }, { "docid": "e6521783e56af0d8f907315d16848595", "score": "0.49529654", "text": "public function test___construct() {\n\t\t}", "title": "" }, { "docid": "4f8a5c479aab4785c73d25ab2a19781c", "score": "0.49519357", "text": "public function testGetGDPRPDF()\n {\n }", "title": "" }, { "docid": "87ee4c62dd592c6b987a1c12c6234358", "score": "0.4948987", "text": "public function testgetHistogramMin()\n {\n $dices = 8;\n $dicehand = new DiceHandHistogram($dices);\n $res = $dicehand -> getHistogramMin();\n $exp = 1;\n $this->assertSame($exp, $res);\n }", "title": "" }, { "docid": "43291d8c74bea7887bf5cd43456f9d62", "score": "0.49401626", "text": "public function testConstructor() {\n $property = new \\ReflectionProperty($this->condition, 'aliasManager');\n $property->setAccessible(TRUE);\n\n $this->assertSame($this->aliasManager->reveal(), $property->getValue($this->condition));\n }", "title": "" }, { "docid": "81a95e92aeb3b6a1249849c328fb5898", "score": "0.49393335", "text": "public function it_can_be_instantiated(): void\n {\n static::assertInstanceOf(LogEntry::class, $this->entry);\n static::assertLogEntry('2015-01-01', $this->entry);\n static::assertFalse($this->entry->hasContext());\n }", "title": "" }, { "docid": "70ee6901b6c867b55f5e52231ba7b6da", "score": "0.49365357", "text": "public function initInstance()\n {\n }", "title": "" }, { "docid": "7d61334ee414b00d02481843759d2cc6", "score": "0.4929997", "text": "public function testGetGDPRPDFs()\n {\n }", "title": "" }, { "docid": "82e5055e8db6a783c10e95e9285894a5", "score": "0.49097458", "text": "public function initAsSpecimen()\n {\n\n\t\t$this->id = 0;\n\n\t\t$this->entity = '';\n\t\t$this->datec = '';\n\t\t$this->tms = '';\n\t\t$this->fk_product = '';\n\t\t$this->fk_soc = '';\n\t\t$this->price = '';\n\t\t$this->price_ttc = '';\n\t\t$this->price_min = '';\n\t\t$this->price_min_ttc = '';\n\t\t$this->price_base_type = '';\n\t\t$this->default_vat_code = '';\n\t\t$this->tva_tx = '';\n\t\t$this->recuperableonly = '';\n\t\t$this->localtax1_tx = '';\n\t\t$this->localtax2_tx = '';\n\t\t$this->fk_user = '';\n\t\t$this->import_key = '';\n }", "title": "" }, { "docid": "39b917095964671f7b26cf8d9880913e", "score": "0.49079305", "text": "public function test__Init() {\n\t\t// Set config for later attribute setting\n\t\t$this->_component->config = array(\n\t\t\t\"foo\" => \"bar\",\n\t\t\t\"test\" => \"one\",\n\t\t\t\"apiUrls\" => \"http://foo.bar,http://baz.bop\",\n\t\t);\n\n\t\t// Call method\n\t\t$this->_component->init();\n\n\t\t// Verify attributes were set\n\t\tverify( isset( $this->_component->attributes[ \"foo\" ] ) )->true();\n\t\tverify( isset( $this->_component->attributes[ \"test\" ] ) )->true();\n\t\tverify( $this->_component->attributes[ \"foo\" ] )->equals( \"bar\" );\n\t\tverify( $this->_component->attributes[ \"test\" ] )->equals( \"one\" );\n\n\t\t// Verify API URLs were parsed\n\t\tverify( is_array( $this->_component->attributes[ \"apiUrls\" ] ) )->true();\n\t\tverify( in_array( $this->_component->attributes[ \"apiUrl\" ], $this->_component->attributes[ \"apiUrls\" ] ) )->true();\n\t}", "title": "" }, { "docid": "122039e948fb0608af2d6de9d44556f3", "score": "0.4905647", "text": "public function testHistogramMin()\n {\n $dice = new DiceGraphic();\n $res = $dice->getHistogramMin();\n $exp = 1;\n $this->assertEquals($exp, $res);\n }", "title": "" }, { "docid": "6b7b1d1a8800e480be2286a60de3e2cc", "score": "0.48995766", "text": "public function testCreateObjectNoArguments()\n {\n $diceHand = new DiceHand();\n $this->assertInstanceOf(\"\\Rist\\Dice\\DiceHand\", $diceHand);\n\n $res = sizeof($diceHand->dices);\n $exp = 5;\n $this->assertEquals($exp, $res);\n }", "title": "" }, { "docid": "a6e2508daea7997ebc79b4883607e16a", "score": "0.48968747", "text": "public function test__construct() {\n\n $obj = new AttestationFiscale();\n\n $this->assertNull($obj->getAnnee());\n $this->assertNull($obj->getCodeArticle1());\n $this->assertNull($obj->getCodeArticle10());\n $this->assertNull($obj->getCodeArticle2());\n $this->assertNull($obj->getCodeArticle3());\n $this->assertNull($obj->getCodeArticle4());\n $this->assertNull($obj->getCodeArticle5());\n $this->assertNull($obj->getCodeArticle6());\n $this->assertNull($obj->getCodeArticle7());\n $this->assertNull($obj->getCodeArticle8());\n $this->assertNull($obj->getCodeArticle9());\n $this->assertNull($obj->getCodeClient());\n $this->assertNull($obj->getDureeAnnuelle());\n $this->assertNull($obj->getEtat());\n $this->assertNull($obj->getFamille1());\n $this->assertNull($obj->getFamille10());\n $this->assertNull($obj->getFamille2());\n $this->assertNull($obj->getFamille3());\n $this->assertNull($obj->getFamille4());\n $this->assertNull($obj->getFamille5());\n $this->assertNull($obj->getFamille6());\n $this->assertNull($obj->getFamille7());\n $this->assertNull($obj->getFamille8());\n $this->assertNull($obj->getFamille9());\n $this->assertNull($obj->getLienDocument());\n $this->assertNull($obj->getModeReglement());\n $this->assertNull($obj->getMontantTes());\n $this->assertNull($obj->getMontantTtc());\n }", "title": "" }, { "docid": "ef16e14e07673a5f422b61f0f2be67bf", "score": "0.48943236", "text": "public function testCreateObjectWithArguments()\n {\n $diceHand = new DiceHand(3);\n $this->assertInstanceOf(\"\\Rist\\Dice\\DiceHand\", $diceHand);\n\n $res = sizeof($diceHand->dices);\n $exp = 3;\n $this->assertEquals($exp, $res);\n }", "title": "" }, { "docid": "0799cb21fc3e6edb7215e72427c4b1dc", "score": "0.48912308", "text": "public function setUp() \n {\n $this->demoInstance = new demoClass();\n }", "title": "" }, { "docid": "02cbd2c3998b5a5036c18872171e3857", "score": "0.4880096", "text": "public function __construct(Devis $devis)\n {\n $this->devis = $devis;\n }", "title": "" }, { "docid": "8314e0a769827264e2cadad2b7a1830d", "score": "0.48781037", "text": "public function test__construct() {\n\n $obj = new CdeTypeInspEntetes();\n\n $this->assertNull($obj->getCodeInspecteur());\n $this->assertNull($obj->getDtValiditeDebut());\n $this->assertNull($obj->getDtValiditeFin());\n $this->assertNull($obj->getMontantBudget());\n $this->assertNull($obj->getMontantHtCde());\n }", "title": "" }, { "docid": "9af77bc22ea35b0fae3ca04e436928d4", "score": "0.48765305", "text": "public function testInit()\n {\n $settings = new Settings(new Db(), new Language());\n $this->assertObjectHasAttribute('auto_prune_threshold_options', $settings);\n \n $this->assertTrue(is_array($settings->getDefaults()));\n $this->assertCount(71, $settings->getDefaults());\n \n $this->assertTrue(is_array($settings->getCustomOptions()));\n $this->assertCount(1, $settings->getCustomOptions());\n \n $this->assertTrue(is_array($settings->getOverrides()));\n $this->assertCount(0, $settings->getOverrides());\n \n $this->assertTrue(is_array($settings->getEncrypted()));\n $this->assertCount(3, $settings->getEncrypted());\n \n $this->assertTrue($settings->getTable() == $this->expected_settings_table);\n }", "title": "" }, { "docid": "59b5a0ea3cd48c531535dcb39e1017ce", "score": "0.4861985", "text": "function initAsSpecimen()\n\t{\n\t\tglobal $user, $langs, $conf;\n\n\t\t$now=dol_now();\n\n\t\t// Initialise parametres\n\t\t$this->id=0;\n\t\t$this->ref = 'SPECIMEN';\n\t\t$this->specimen=1;\n\t\t$this->socid = 1;\n\t\t$this->date = $now;\n\t\t$this->note_public='SPECIMEN';\n\t\t$this->duree = 0;\n\t\t$nbp = 5;\n\t\t$xnbp = 0;\n\t\twhile ($xnbp < $nbp)\n\t\t{\n\n\t\t\t$this->lines[$xnbp]=$line;\n\t\t\t$xnbp++;\n\n\t\t\t$this->duree+=$line->duration;\n\t\t}\n\t}", "title": "" }, { "docid": "b76e3a0ad6ea7c04aa5fb2c2b7bf945c", "score": "0.48542562", "text": "public function test__construct() {\n\n $obj = new VisiteMedicaleEntete();\n\n $this->assertNull($obj->getAdresseMt());\n $this->assertNull($obj->getCode());\n $this->assertNull($obj->getCodeMedecineTravail());\n $this->assertNull($obj->getCodePostalMt());\n $this->assertNull($obj->getDebut1());\n $this->assertNull($obj->getDebut2());\n $this->assertNull($obj->getDebutSession());\n $this->assertNull($obj->getDescription());\n $this->assertNull($obj->getDureeVisite());\n $this->assertNull($obj->getFin1());\n $this->assertNull($obj->getFin2());\n $this->assertNull($obj->getFinSession());\n $this->assertNull($obj->getLientDocument());\n $this->assertNull($obj->getMedecinResponsable());\n $this->assertNull($obj->getNomMt());\n $this->assertNull($obj->getRdvJour1());\n $this->assertNull($obj->getRdvJour2());\n $this->assertNull($obj->getRdvJour3());\n $this->assertNull($obj->getRdvJour4());\n $this->assertNull($obj->getRdvJour5());\n $this->assertNull($obj->getRdvJour6());\n $this->assertNull($obj->getRdvJour7());\n $this->assertNull($obj->getTel1());\n $this->assertNull($obj->getVilleMt());\n }", "title": "" }, { "docid": "900bcf4e2c9184840ef3937e3a8ae997", "score": "0.48369598", "text": "public static function setUpBeforeClass()\n {\n self::$di = new DIFactoryConfig(\"testDI.php\");\n }", "title": "" }, { "docid": "8604b4fa78f7e84ebf70652ce746a43d", "score": "0.48362947", "text": "abstract protected function initialise();", "title": "" }, { "docid": "5b1676accd6d3f52837c8dcb4a9c72c3", "score": "0.48287043", "text": "protected function setUp()\r\n {\r\n get_dunamis();\r\n $this->object\t=\tnew DunObject();\r\n }", "title": "" }, { "docid": "c9744d1353c0672f908a9e8ff3d95e36", "score": "0.48281345", "text": "public function testClassCanBeConstructed()\n {\n $this->assertInstanceOf(DateRange::class, $this->dateRange);\n }", "title": "" }, { "docid": "3ed6377b2e7dcfc655748fd57381b10b", "score": "0.4826059", "text": "public function test__construct()\n {\n $obj = Solar::factory('Solar_Sql_Adapter_Oracle');\n $this->assertInstance($obj, 'Solar_Sql_Adapter_Oracle');\n }", "title": "" }, { "docid": "5c346cfa3f230233e6a899f38fb50ad4", "score": "0.4824581", "text": "protected function setUp() {\n $this->parameter = new Parameter();\n }", "title": "" }, { "docid": "99fa717fcf3353af82d7d01a77fb994f", "score": "0.48124084", "text": "abstract protected function initTestData() : void;", "title": "" }, { "docid": "67d0668a23cb8423c70aca75ab449dde", "score": "0.48109686", "text": "abstract protected function _initProperties();", "title": "" }, { "docid": "a20074fb0a81abd20f45f778644c394c", "score": "0.48061302", "text": "protected function setUp(): void\n {\n $this->object = new GdprLog();\n }", "title": "" }, { "docid": "ef394db28b46dc58a089ffb7b2b0be07", "score": "0.4803561", "text": "public function testSetFicheCliNePasProposerCreationDpdc() {\n\n $obj = new Constantes2();\n\n $obj->setFicheCliNePasProposerCreationDpdc(true);\n $this->assertEquals(true, $obj->getFicheCliNePasProposerCreationDpdc());\n }", "title": "" }, { "docid": "954136382127ddc8bc75f4b1c91109d3", "score": "0.48019835", "text": "public function testDoubleValue()\n\t{\n\t // initialize a new Float instance\n\t $float = new Float(17.05);\n\t\t// check that double value of the Float instance\n\t\t$this->assertEquals(17.05, $float->doubleValue());\n\t}", "title": "" }, { "docid": "b692b4202bbf958bae78bfcb59db3fff", "score": "0.47980678", "text": "public function test__construct()\n {\n $obj = Solar::factory('Foresmo_App_Index');\n $this->assertInstance($obj, 'Foresmo_App_Index');\n }", "title": "" }, { "docid": "40be299f07d50828d1c968484551be6c", "score": "0.47924978", "text": "public function testGenerateNewPointUsingDaA()\n {\n // array('random_number' => $random_number, 'R' => $R, 'Rx_hex' => $Rx_hex, 'Ry_hex' => $Ry_hex);\n\n $newpoint = $this->mock->GenerateNewPoint(false);\n\n $this->assertNotNull($newpoint);\n $this->assertEquals(count($newpoint), 4);\n }", "title": "" }, { "docid": "bf2ae577c670ea477fde669311e7e908", "score": "0.47858557", "text": "#[@test]\n public function initializerCalled() {\n $name= 'net.xp_framework.unittest.reflection.LoaderTestClass';\n if (class_exists(\\xp::reflect($name), false)) {\n return $this->fail('Class \"'.$name.'\" may not exist!');\n }\n\n $this->assertXPClass($name, \\lang\\ClassLoader::getDefault()->loadClass($name));\n $this->assertTrue(LoaderTestClass::initializerCalled());\n }", "title": "" }, { "docid": "d18f2a5e5dc1fb49ca12e43e854efaf7", "score": "0.47811773", "text": "abstract protected function initParameters();", "title": "" }, { "docid": "7e6fa1fb8b8ff14759115b18cbdef769", "score": "0.47799182", "text": "public function testGetFeatureDNE()\n {\n $data = (object)[];\n\n $this->request->expects($this->once())\n ->method('request')\n ->with($this->equalTo(\"sites/{$this->model->id}/features\"))\n ->willReturn(compact('data'));\n\n $feature_value = $this->model->getFeature('invalid_key');\n $this->assertNull($feature_value);\n }", "title": "" }, { "docid": "9d59939ed73a6317f079cb8c60742b70", "score": "0.4759734", "text": "public function initDimensions()\n {\n $this->log(\"Init dimension (before) newWidth x newHeight is {$this->newWidth} x {$this->newHeight}.\");\n\n // width as %\n if ($this->newWidth\n && $this->newWidth[strlen($this->newWidth)-1] == '%') {\n $this->newWidth = $this->width * substr($this->newWidth, 0, -1) / 100;\n $this->log(\"Setting new width based on % to {$this->newWidth}\");\n }\n\n // height as %\n if ($this->newHeight\n && $this->newHeight[strlen($this->newHeight)-1] == '%') {\n $this->newHeight = $this->height * substr($this->newHeight, 0, -1) / 100;\n $this->log(\"Setting new height based on % to {$this->newHeight}\");\n }\n\n is_null($this->aspectRatio) or is_numeric($this->aspectRatio) or $this->raiseError('Aspect ratio out of range');\n\n // width & height from aspect ratio\n if ($this->aspectRatio && is_null($this->newWidth) && is_null($this->newHeight)) {\n if ($this->aspectRatio >= 1) {\n $this->newWidth = $this->width;\n $this->newHeight = $this->width / $this->aspectRatio;\n $this->log(\"Setting new width & height based on width & aspect ratio (>=1) to (w x h) {$this->newWidth} x {$this->newHeight}\");\n\n } else {\n $this->newHeight = $this->height;\n $this->newWidth = $this->height * $this->aspectRatio;\n $this->log(\"Setting new width & height based on width & aspect ratio (<1) to (w x h) {$this->newWidth} x {$this->newHeight}\");\n }\n\n } elseif ($this->aspectRatio && is_null($this->newWidth)) {\n $this->newWidth = $this->newHeight * $this->aspectRatio;\n $this->log(\"Setting new width based on aspect ratio to {$this->newWidth}\");\n\n } elseif ($this->aspectRatio && is_null($this->newHeight)) {\n $this->newHeight = $this->newWidth / $this->aspectRatio;\n $this->log(\"Setting new height based on aspect ratio to {$this->newHeight}\");\n }\n\n // Change width & height based on dpr\n if ($this->dpr != 1) {\n if (!is_null($this->newWidth)) {\n $this->newWidth = round($this->newWidth * $this->dpr);\n $this->log(\"Setting new width based on dpr={$this->dpr} - w={$this->newWidth}\");\n }\n if (!is_null($this->newHeight)) {\n $this->newHeight = round($this->newHeight * $this->dpr);\n $this->log(\"Setting new height based on dpr={$this->dpr} - h={$this->newHeight}\");\n }\n }\n\n // Check values to be within domain\n is_null($this->newWidth)\n or is_numeric($this->newWidth)\n or $this->raiseError('Width not numeric');\n\n is_null($this->newHeight)\n or is_numeric($this->newHeight)\n or $this->raiseError('Height not numeric');\n\n $this->log(\"Init dimension (after) newWidth x newHeight is {$this->newWidth} x {$this->newHeight}.\");\n\n return $this;\n }", "title": "" }, { "docid": "cbbbd237e4013b4d13f7bb07f691b066", "score": "0.47544268", "text": "public function it_can_be_instantiated()\n {\n $this->assertInstanceOf(Product::class, $this->card);\n $this->assertEmpty($this->card->render());\n $this->assertEquals('product', $this->card->getType());\n }", "title": "" }, { "docid": "09a2ee59ade01cc9a7e56ef6baa53586", "score": "0.47508308", "text": "protected function setUp()\n {\n $this->object = new Number(100);\n }", "title": "" }, { "docid": "5e3b7cecb640099af200eac73db3cb68", "score": "0.47479877", "text": "public function testCreateObjectNoArguments()\n {\n $game = new Game();\n $game->player->throwDice();\n $game->computer->throwDice();\n $histogramPlayer = new Histogram();\n $histogramPlayer->injectData($game->player->dice);\n $histogramComputer = new Histogram();\n $histogramComputer->injectData($game->computer->dice);\n\n $this->assertInstanceOf(\"\\Elpr\\Dice\\Histogram\", $histogramPlayer);\n }", "title": "" }, { "docid": "97585218bd8c53b95ed897fac328e9b2", "score": "0.47456655", "text": "function __construct() {\n\t\tassert(false);\n\t}", "title": "" }, { "docid": "ab1079b9938ce6d67b10b0983acffc11", "score": "0.47455275", "text": "abstract function init();", "title": "" } ]
75c45873670c4a7ba4ff922ddf51e185
Get a list of schemaExtension objects in your tenant. The schema extensions can be InDevelopment, Available, or Deprecated and includes schema extensions:+ Created by any apps you own in the current tenant.+ Owned by other apps that are marked as Available.+ Created by other developers from other tenants and marked as Available. This is different from other APIs that only return tenantspecific data. Extension data created based on schema extension definitions is tenantspecific and can only be accessed by apps explicitly granted permission.
[ { "docid": "ad5b3dbab27c76ac9bf7c913cebfa2fb", "score": "0.0", "text": "public function toGetRequestInformation(?SchemaExtensionsRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation {\n $requestInfo = new RequestInformation();\n $requestInfo->urlTemplate = $this->urlTemplate;\n $requestInfo->pathParameters = $this->pathParameters;\n $requestInfo->httpMethod = HttpMethod::GET;\n $requestInfo->addHeader('Accept', \"application/json\");\n if ($requestConfiguration !== null) {\n $requestInfo->addHeaders($requestConfiguration->headers);\n if ($requestConfiguration->queryParameters !== null) {\n $requestInfo->setQueryParameters($requestConfiguration->queryParameters);\n }\n $requestInfo->addRequestOptions(...$requestConfiguration->options);\n }\n return $requestInfo;\n }", "title": "" } ]
[ { "docid": "32077bf8ba35a544c9aa9087edbeb7d2", "score": "0.6511878", "text": "public function getExtensions();", "title": "" }, { "docid": "86333ade67193b549624643271451f56", "score": "0.6440018", "text": "public function getExtensionFeatures();", "title": "" }, { "docid": "c906cf29921a55462975ec82712afe12", "score": "0.6298551", "text": "public function getAllExtensions()\n {\n return $this->extensionSelector->all();\n }", "title": "" }, { "docid": "5c57433a259904f9a729a6a4b212224e", "score": "0.624211", "text": "public function getExtensionsData();", "title": "" }, { "docid": "83a4f2fcfff6bb8360fb7accd6a5808a", "score": "0.62173945", "text": "public function all() {\n\t\treturn ExtensionModel::all();\n\t}", "title": "" }, { "docid": "576e21d9da2fcdbc9010e563c46cf130", "score": "0.62082523", "text": "public function getExtensions(): array;", "title": "" }, { "docid": "576e21d9da2fcdbc9010e563c46cf130", "score": "0.62082523", "text": "public function getExtensions(): array;", "title": "" }, { "docid": "b48c939947524f3581ef4efd531c3de5", "score": "0.61136955", "text": "public function getExtensions()\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "b48c939947524f3581ef4efd531c3de5", "score": "0.61136955", "text": "public function getExtensions()\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "b48c939947524f3581ef4efd531c3de5", "score": "0.61136955", "text": "public function getExtensions()\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "b48c939947524f3581ef4efd531c3de5", "score": "0.61136955", "text": "public function getExtensions()\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "b48c939947524f3581ef4efd531c3de5", "score": "0.61136955", "text": "public function getExtensions()\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "5551062f98376ce51bc93f47b1972ad9", "score": "0.61058354", "text": "public function getExtensions(){ }", "title": "" }, { "docid": "5151ccb0970a004d23e30685332738ea", "score": "0.6095395", "text": "public function getExtensions() {\n return $this->extensions;\n }", "title": "" }, { "docid": "8876272d13a197ab40e7b97b9ffa6954", "score": "0.60527855", "text": "public function getExtensionList()\n {\n $snippets = $this->getSnippets();\n $extensions = $snippets->map(function($snippet) { return $snippet->getExtension(); });\n\n return array_unique($extensions->toArray());\n }", "title": "" }, { "docid": "e930fed2e59e045371239eddeaca3e10", "score": "0.6049853", "text": "public function getExtensions()\n\t{\n\t\t$db = $this->getDbo();\n\t\t$subQuery = $db->getQuery(true)\n\t\t\t->select($db->quoteName('name'))\n\t\t\t->from($db->quoteName('#__extensions'))\n\t\t\t->where($db->quoteName('enabled') . ' = 1');\n\n\t\t$query = $db->getQuery(true)\n\t\t\t->select('DISTINCT ' . $db->quoteName('extension'))\n\t\t\t->from($db->quoteName('#__mail_templates'))\n\t\t\t->where($db->quoteName('extension') . ' IN (' . $subQuery . ')');\n\t\t$db->setQuery($query);\n\n\t\treturn $db->loadColumn();\n\t}", "title": "" }, { "docid": "06a1d6f6314dba42fa369170078649b4", "score": "0.60203165", "text": "public function getExtensions()\n {\n /** @var array $data */\n foreach ($this->data['extensions'] as $extension) {\n $data[$extension['name']] = $extension['version'];\n }\n return $data;\n }", "title": "" }, { "docid": "cb23905bbf04a2dc45667ee520561e9a", "score": "0.60004985", "text": "public function getExtensions() {\n return $this->_extensions;\n }", "title": "" }, { "docid": "4541bfd28c07fc5e61b4c6309c759f95", "score": "0.5998541", "text": "public function getExtensions()\n {\n return $this->_extensions;\n }", "title": "" }, { "docid": "5bcd76dbc1b54548dc2f5a0cf8848a40", "score": "0.5978073", "text": "public function getExtensions()\n\t{\n\t\treturn $this->extensions;\n\t}", "title": "" }, { "docid": "058ca5870f04d85d9e5b984af7261742", "score": "0.59025526", "text": "public function getExtensions()\n {\n $data = [];\n foreach ($this->data['extensions'] as $extension) {\n $data[$extension['name']] = $extension['version'];\n }\n ksort($data);\n\n return $data;\n }", "title": "" }, { "docid": "4d48b6993e8a0edd23c103f85ec7b28b", "score": "0.5860454", "text": "public function getServerExtList() {}", "title": "" }, { "docid": "5f259d4cf2f9e1deffac2b7d014bc379", "score": "0.5825535", "text": "public function getRequiredExtensions();", "title": "" }, { "docid": "083d87e5cfecb773ae2bcca34b20c9dd", "score": "0.5789732", "text": "public function getExtensions()\n\t\t{\n\n\t\t\t// Loop through extension map\n\t\t\t$exts = array();\n\t\t\tforeach (self::$extensionMap as $ext => $type) {\n\t\t\t\tif ($type == $this->type) {\n\t\t\t\t\t$exts[] = $ext;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $exts;\n\n\t\t}", "title": "" }, { "docid": "222893c42d47e8919dc2c8cd765add41", "score": "0.57444966", "text": "public function getExtensionProperties(): array;", "title": "" }, { "docid": "39549a4bf296345fa90cc0e60ffd485d", "score": "0.5743724", "text": "public function getExtensions($responseFields = null)\n\t{\n\t\t$mozuClient = TenantExtensionsClient::getExtensionsClient($responseFields);\n\t\t$mozuClient = $mozuClient->withContext($this->apiContext);\n\t\t$mozuClient->execute();\n\t\treturn $mozuClient->getResult();\n\n\t}", "title": "" }, { "docid": "63ef539f23ce99e1a5e364f4329ca991", "score": "0.5722536", "text": "public function extensions(): array;", "title": "" }, { "docid": "63ef539f23ce99e1a5e364f4329ca991", "score": "0.5722536", "text": "public function extensions(): array;", "title": "" }, { "docid": "9ec4eb2511ada704124195b720379917", "score": "0.5704486", "text": "public function getManagedFileExtensions();", "title": "" }, { "docid": "78c2bfebe3c415dd0e27d98bafc47989", "score": "0.56951493", "text": "public function getExtensions()\n\t{\n\t\t$departments = deptTb::orderBy('deptname')->paginate(1);\n\t\t$employees = empDetailsTb::where('empstatus', 1)->get();\n\t\t$extensions = extTb::orderBy('extid')->get();\n\t\t$depts = deptTb::orderBy('deptname')->get();\n\t\t$subdepartments = subDeptTb::all();\n\t\treturn view('maininfo.extensions', ['departments' => $departments, 'depts' => $depts, 'employees' => $employees, 'extensions' => $extensions, 'subdepartments' => $subdepartments]);\n\t}", "title": "" }, { "docid": "be895a5e7b551a29b81c85693d814cbb", "score": "0.56837523", "text": "public function get_supported_extensions() {\n return array();\n }", "title": "" }, { "docid": "b7d147c74e736204dd4e07da9e9b6392", "score": "0.5678399", "text": "public function getExtensions(): array\n {\n return [\n 'reason' => $this->reason,\n ];\n }", "title": "" }, { "docid": "cd6885581ea88f18df18a06c65199917", "score": "0.5648832", "text": "private function getExtensions(): array\n {\n if (!self::$extensions) {\n self::$extensions = [];\n $namespace = (new \\ReflectionClass(TemplateExtensionInterface::class))->getNamespaceName();\n\n $extensionsClasses = ClassFinder::getInstance()->findByInterface(TemplateExtensionInterface::class, $namespace, true);\n\n foreach ($extensionsClasses as $class) {\n self::$extensions[] = new $class;\n }\n }\n\n return self::$extensions;\n }", "title": "" }, { "docid": "8aac476f4538fe7afe39c0b2f02f0813", "score": "0.56482893", "text": "public function extensions(): ExtensionRegistry\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "23494f88b3740c1d699d9873c11ec681", "score": "0.5630086", "text": "private static function get_extensions_list() {\n\n\t\t$extensions = static::filter_extensions( static::$extensions, 'maybe_network' );\n\n\t\t$output = '';\n\n\t\tforeach ( $extensions as $id => $extension ) {\n\n\t\t\tif ( ! isset( $extension['slug'], $extension['type'], $extension['area'] ) )\n\t\t\t\tcontinue;\n\n\t\t\tif ( false === static::get_extension_header( $extension['slug'] ) )\n\t\t\t\tcontinue;\n\n\t\t\t$wrap = '<div class=\"tsfem-extension-icon-wrap tsfem-flex-nogrowshrink\">' . static::make_extension_list_icon( $extension ) . '</div>';\n\t\t\t$wrap .= '<div class=\"tsfem-extension-about-wrap tsfem-flex tsfem-flex-grow\">' . static::make_extension_list_about( $extension ) . '</div>';\n\t\t\t$wrap .= '<div class=\"tsfem-extension-description-wrap tsfem-flex tsfem-flex-space\">' . static::make_extension_list_description( $extension ) . '</div>';\n\n\t\t\t$class = static::is_extension_active( $extension ) ? 'tsfem-extension-activated' : 'tsfem-extension-deactivated';\n\n\t\t\t$entry = sprintf(\n\t\t\t\t'<div class=\"tsfem-extension-entry-inner tsfem-flex\"><div class=\"tsfem-extension-entry tsfem-flex tsfem-flex-noshrink tsfem-flex-row %s\" id=\"%s\">%s</div></div>',\n\t\t\t\t$class, \\esc_attr( $id . '-extension-entry' ), $wrap\n\t\t\t);\n\n\t\t\t$output .= sprintf( '<div class=\"tsfem-extension-entry-wrap tsfem-flex tsfem-flex-space\">%s</div>', $entry );\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "c4f7dd609d0893760cfe18aab44e3169", "score": "0.56042314", "text": "public function getSchemaExtension()\n {\n return $this->readOneof(1);\n }", "title": "" }, { "docid": "da8cdc6edbde348508f71acf0eb83e34", "score": "0.5562983", "text": "public function getAllowedExtensions()\n {\n return $this->_allowedExtensions;\n }", "title": "" }, { "docid": "07aa10e8608c2c748c10555c4320b9e1", "score": "0.55626845", "text": "public function setSchemaExtension($var)\n {\n GPBUtil::checkMessage($var, \\Graphqlc\\SchemaExtensionDescriptorProto::class);\n $this->writeOneof(1, $var);\n\n return $this;\n }", "title": "" }, { "docid": "fc6842d71c78a98df401569322b5c0cd", "score": "0.5555394", "text": "public function getExtensions()\n {\n if (array_key_exists(\"extensions\", $this->_propDict)) {\n return $this->_propDict[\"extensions\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "961da66cce188c68bea7a30c2cd49ae1", "score": "0.55547076", "text": "public static function getAssociatedExtensions()\n {\n return static::$extensions;\n }", "title": "" }, { "docid": "9060441b2e6347f74c6eee025ab532b8", "score": "0.55545586", "text": "function permissions_adminapi_getallschemas()\n{\n // Security check\n if (!SecurityUtil::checkPermission('Permissions::', '::', ACCESS_ADMIN)) {\n return LogUtil::registerPermissionError();\n }\n\n global $schemas;\n pnBlockLoadAll();\n $modinfos = pnModGetAllMods();\n foreach($modinfos as $modinfo) {\n if (!empty($modinfo['securityschema'])) {\n $schemas = array_merge($schemas, unserialize($modinfo['securityschema']));\n }\n }\n uksort($schemas, 'strnatcasecmp');\n return $schemas;\n}", "title": "" }, { "docid": "5aeebbdffe3c20e6918f0148a9360c01", "score": "0.5540236", "text": "protected function getSchemaEntryExtensions(string $dbKey, array $item): array\n {\n $vars = ApplicationState::getVars();\n if ($vars['standard-graphql']) {\n return [\n 'type' => $dbKey,\n 'path' => $item[Tokens::PATH],\n ];\n }\n return parent::getSchemaEntryExtensions($dbKey, $item);\n }", "title": "" }, { "docid": "0a3691fb0aac67ffe7e48247d3494e1b", "score": "0.55314523", "text": "function getInstalledExtensionsWrapper() {\n\n\t\tif (!$this->isModernEM()) {\n\t\t\t$this->initEMobj();\n\t\t\t$list = $this->EMobj->getInstalledExtensions();\n\t\t} else {\n\t\t\t$extensionList = $this->EMobj = t3lib_div::makeInstance('tx_em_Extensions_List');\n\t\t\t$list = $extensionList->getInstalledExtensions(false);\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "53a6a8a0c80f8a533d9a2a768d1b6493", "score": "0.5527039", "text": "public function extensions();", "title": "" }, { "docid": "84cf6a81af2cfed39797e950a034b56e", "score": "0.55092865", "text": "protected function getQueryEntryExtensions(): array\n {\n $vars = ApplicationState::getVars();\n if ($vars['standard-graphql']) {\n // Do not print \"type\" => \"query\"\n return [];\n }\n return parent::getQueryEntryExtensions();\n }", "title": "" }, { "docid": "a03f6d407e18651f6a3ac71259148416", "score": "0.54878706", "text": "public static function getImportFileExtensions() {\n\t\t$o_media = new Media();\n\t\t$va_plugin_names = $o_media->getPluginNames();\n\t\t\n\t\t$va_extensions = array();\n\t\tforeach ($va_plugin_names as $vs_plugin_name) {\n\t\t\tif (!$va_plugin_info = $o_media->getPlugin($vs_plugin_name)) { continue; }\n\t\t\t$o_plugin = $va_plugin_info[\"INSTANCE\"];\n\t\t\t$va_extensions = array_merge($va_extensions, $o_plugin->getImportExtensions());\n\t\t}\n\t\t\n\t\treturn array_unique($va_extensions);\n\t}", "title": "" }, { "docid": "c572499fdf12270bf447fcdb734f39e7", "score": "0.5481926", "text": "function getValidExtensions()\n\t{\n\t return $this->valid_extensions;\n\t}", "title": "" }, { "docid": "da73714aa4d7cdc82bcebbe80b9aba98", "score": "0.5477424", "text": "public function getAllowedExtensions(){\n if(is_array($this->allowedExt)){\n return $this->allowedExt;\n }\n return array();\n }", "title": "" }, { "docid": "4f6e74b4ef8b656c7269cc011463e028", "score": "0.54711574", "text": "public function getExtensionList($username)\n\t\t{\n\t\t\t\t\t\n\t\t\t$result = pg_query_params(\n\t\t\t\t\t$this->connection,\n\t\t\t\t\t'SELECT * FROM extensions WHERE username = $1',\n\t\t\t\t\tarray($username));\n\t\t\t\n\t\t\tif(!$result)\n\t\t\t{\n\t\t\t\techo 'Error: objects not found';\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\t$resultArray = array();\n\t\t\t$rows = pg_num_rows($result);\n\t\t\t\n\t\t\tfor ($i = 0; $i < $rows; $i++)\n\t\t\t{\n\t\t\t\t$resultArray[] = pg_fetch_row($result, $i);\n\t\t\t}\n\t\t\t\n\t\t\tpg_free_result($result);\t\t\t\n\t\t\treturn $resultArray;\t\t\t\n\t\t}", "title": "" }, { "docid": "02c945f01670d384812bbcd9ad86a5e8", "score": "0.54680026", "text": "function get_types_extensions() { \n $types = array();\n $query = \"SELECT field_name, type_name, widget_settings from {content_node_field_instance} \n where type_name = 'audio' or type_name = 'video' or type_name = 'image'\";\n $result = db_query($query);\n while($row = db_fetch_array($result)) {\n $data = unserialize($row['widget_settings']);\n if (isset($data['file_extensions'])) {\n $types[$row['type_name']] = $data['file_extensions'];\n }\n }\n return $types;\n }", "title": "" }, { "docid": "a0089e9088b9d4f9819bfc3d044d0a55", "score": "0.54654324", "text": "public function getAllowedExtensions()\n {\n return $this->negotiableQuoteConfig->getAllowedExtensions();\n }", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "acd836098565dcbeb67368bf094a07e2", "score": "0.5445576", "text": "public function getExtensionAttributes();", "title": "" }, { "docid": "f409c56eddf0a22ec983989a45d240d4", "score": "0.5424903", "text": "public function getServerExtList()\n {\n }", "title": "" }, { "docid": "8777a4cc1e972730a01e69ea2d078484", "score": "0.5418107", "text": "public function getExtension();", "title": "" }, { "docid": "8777a4cc1e972730a01e69ea2d078484", "score": "0.5418107", "text": "public function getExtension();", "title": "" }, { "docid": "8777a4cc1e972730a01e69ea2d078484", "score": "0.5418107", "text": "public function getExtension();", "title": "" }, { "docid": "f6e947abf1d580761a9d6c8ba72cd8b4", "score": "0.53992844", "text": "public function extensions(): array\n {\n if (is_file($this->extensionFile())) {\n return require $this->extensionFile();\n }\n\n return [];\n }", "title": "" }, { "docid": "fdc06da459a7e08fb1c1d9d4d7ba5b67", "score": "0.5385771", "text": "function getAllowedExtensions()\r\n {\r\n return $this->_allowedExtensions;\r\n }", "title": "" }, { "docid": "32f592b86b2250bd53b95a0e3413e87a", "score": "0.53774786", "text": "public static function getExportFileExtensions() {\n\t\t$o_media = new Media();\n\t\t$va_plugin_names = $o_media->getPluginNames();\n\t\t\n\t\t$va_extensions = array();\n\t\tforeach ($va_plugin_names as $vs_plugin_name) {\n\t\t\tif (!$va_plugin_info = $o_media->getPlugin($vs_plugin_name)) { continue; }\n\t\t\t$o_plugin = $va_plugin_info[\"INSTANCE\"];\n\t\t\t$va_extensions = array_merge($va_extensions, $o_plugin->getExportExtensions());\n\t\t}\n\t\t\n\t\treturn array_unique($va_extensions);\n\t}", "title": "" }, { "docid": "a2c39759d1143e6abb1151b73178555a", "score": "0.53682715", "text": "public function getAllowedExtensions() {\n $type = $this->_getMediaType();\n return $this->_imagesStorage->getAllowedExtensions($type);\n }", "title": "" }, { "docid": "677d836ab0b92ada9ce33db038c2f0ad", "score": "0.53618896", "text": "public function getExtensions(): array\n {\n return [\n RouteCollectorInterface::class => function (\n ContainerInterface $container,\n RouteCollectorInterface $routeCollector\n ) {\n $routeCollector->get(\n \"/{$container->get(AppConfigInterface::class)->get('admin.uri')}[/{relativePath:.*}]\",\n [AdminController::class, 'index']\n );\n },\n ViewRendererInterface::class => function (\n ContainerInterface $container,\n ViewRendererInterface $view\n ) {\n $view->addPathAlias(__DIR__ . '/resources/views', __NAMESPACE__);\n },\n ];\n }", "title": "" }, { "docid": "ad82f23b2bb9c50a97211f694b7bc152", "score": "0.53531426", "text": "public static function getExtensions(){\n return \\Illuminate\\View\\Compilers\\BladeCompiler::getExtensions();\n }", "title": "" }, { "docid": "c3c8f84a402d381edf18800bbfbbbc05", "score": "0.5342622", "text": "public static function getExtensions()\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n return $instance->getExtensions();\n }", "title": "" }, { "docid": "e480142a7f5089be6808f0f5e3cbe069", "score": "0.53393614", "text": "public function getAllowedExtensions()\n {\n if (isset($this->_data['allowed_extensions'])\n && $this->_data['allowed_extensions'] != '*') {\n return explode(',', $this->_data['allowed_extensions']);\n }\n\n return array();\n }", "title": "" }, { "docid": "400f37e1341a003efc586cc0a36e5e71", "score": "0.5330759", "text": "public function getFilteredExtensions(): array\n {\n return array_diff(\n config('responsive-image-craft.extensions'),\n $this->getExcludedExtensions(),\n [$this->getOriginalExtension()]\n );\n }", "title": "" }, { "docid": "095829600350c49a8dd768027786e1ab", "score": "0.5320071", "text": "public function getExtensions(): ?array {\n $val = $this->getBackingStore()->get('extensions');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, 'string');\n /** @var array<string>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'extensions'\");\n }", "title": "" }, { "docid": "1743ad569023c31d4112428fbdb2d275", "score": "0.52923673", "text": "public function getInstalledSEOExtensions() {\n\t\t$this->load->model('setting/setting');\n\t\t\t\t\n\t\t$installed_extensions = array();\n\t\t\n\t\t$query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"extension ORDER BY code\");\n\t\t\n\t\tforeach ($query->rows as $result) {\n\t\t\t$installed_extensions[] = $result['code'];\n\t\t}\n\t\t\n\t\t$installed_seo_extensions = $this->model_setting_setting->getSetting('d_seo_extension');\n\t\t$installed_seo_extensions = isset($installed_seo_extensions['d_seo_extension_install']) ? $installed_seo_extensions['d_seo_extension_install'] : array();\n\t\t\n\t\t$seo_extensions = array();\n\t\t\n\t\t$files = glob(DIR_APPLICATION . 'controller/extension/' . $this->codename . '/*.php');\n\t\t\n\t\tif ($files) {\n\t\t\tforeach ($files as $file) {\n\t\t\t\t$seo_extension = basename($file, '.php');\n\t\t\t\t\n\t\t\t\tif (in_array($seo_extension, $installed_extensions) && in_array($seo_extension, $installed_seo_extensions)) {\n\t\t\t\t\t$seo_extensions[] = $seo_extension;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $seo_extensions;\n\t}", "title": "" }, { "docid": "ac7c0a211ff74929ebccea9016a7080d", "score": "0.5289891", "text": "public function getExtensionAttributes() : array\n {\n // TODO: Implement getExtensionAttributes() method.\n }", "title": "" }, { "docid": "1ce09e0bf21f6f2296fddaedbe92c018", "score": "0.5280946", "text": "final public function extension():array\n {\n $return = $this->getAttr('extension');\n\n if(empty($return) && $this->hasVersion())\n $return = $this->defaultVersionExtension();\n\n if(!is_array($return))\n $return = (array) $return;\n\n return $return;\n }", "title": "" }, { "docid": "81c529aa95c46c123a5bda9424a86519", "score": "0.5256104", "text": "function drush_get_extensions($include_hidden = TRUE) {\n drush_include_engine('drupal', 'environment');\n $extensions = array_merge(drush_get_modules($include_hidden), drush_get_themes($include_hidden));\n foreach ($extensions as $name => $extension) {\n if (isset($extension->info['name'])) {\n $extensions[$name]->label = $extension->info['name'].' ('.$extension->name.')';\n }\n else {\n drush_log(dt(\"Extension !name provides no human-readable name in .info file.\", array('!name' => $name), 'debug'));\n $extensions[$name]->label = $name.' ('.$extension->name.')';\n }\n if (empty($extension->info['package'])) {\n $extensions[$name]->info['package'] = dt('Other');\n }\n }\n return $extensions;\n}", "title": "" }, { "docid": "4d962468c8bd33a3a15ef3d4d1794a21", "score": "0.52373934", "text": "public function index(Request $request): array\n {\n return [\n 'file_extensions' => FileExtension::withFilter($request)->get()\n ];\n }", "title": "" }, { "docid": "a86d6a43f52afbd672cae924293242a7", "score": "0.52304775", "text": "function fn_advanced_import_get_product_features_list(PresetsManager $presets_manager, array $schema)\n{\n list($features, $search,) = fn_get_product_features(\n array(\n 'plain' => true,\n 'exclude_group' => true,\n ),\n 0,\n $presets_manager->getLangCode()\n );\n\n foreach ($features as &$feature) {\n $feature['show_description'] = true;\n $feature['show_name'] = false;\n }\n unset($feature);\n\n return $features;\n}", "title": "" }, { "docid": "43c538fc94acf00abddec63428738168", "score": "0.52280945", "text": "public function getWebImageExtensions()\n {\n return $this->scopeConfig->getValue(self::XML_PATH_WEB_IMAGE_EXTENSIONS, 'store') ?: [];\n }", "title": "" }, { "docid": "0b9b9a689c92ae6555221a58d3b78f10", "score": "0.5202946", "text": "static function checkRelatedExtensions() {\n $enableDisable = NULL;\n $sql = \"SELECT is_active FROM civicrm_extension WHERE full_name IN ('biz.jmaconsulting.grantapplications')\";\n $enableDisable = CRM_Core_DAO::singleValueQuery($sql);\n return $enableDisable;\n }", "title": "" }, { "docid": "58b9a4bc8842106f714d3d1177bda7b2", "score": "0.52024925", "text": "public function getExtensions()\n {\n return $this->getStringArray('gzip_static_extensions');\n }", "title": "" }, { "docid": "f596b7fe5505d6050571aa743ca24fc4", "score": "0.52003676", "text": "public function getExtensions() {\n $unrecommended_modules = [\n 'bad_judgement' => $this->t('Joke module, framework for anarchy.'),\n 'php' => $this->t('Executable code should never be stored in the database.'),\n ];\n // If ($this->options['vendor'] == 'pantheon') { TODO.\n if (FALSE) {\n // Unsupported or redundant.\n $pantheon_unrecommended_modules = [\n 'memcache' => dt('Pantheon does not provide memcache; instead, redis is provided as a service to all customers; see http://helpdesk.getpantheon.com/customer/portal/articles/401317'),\n 'memcache_storage' => dt('Pantheon does not provide memcache; instead, redis is provided as a service to all customers; see http://helpdesk.getpantheon.com/customer/portal/articles/401317'),\n ];\n $unrecommended_modules = array_merge($unrecommended_modules, $pantheon_unrecommended_modules);\n }\n return $unrecommended_modules;\n }", "title": "" }, { "docid": "2028ece960cddc72a2278cca2b60aa78", "score": "0.51836485", "text": "public function getVectorExtensions()\n {\n return $this->scopeConfig->getValue(self::XML_PATH_VECTOR_EXTENSIONS, 'store') ?: [];\n }", "title": "" }, { "docid": "a0389f876405fbaa0acc80187e7bf9ea", "score": "0.51625377", "text": "protected static function getExtensionConfiguration(): array\n {\n $configuration = [];\n if (!empty($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['femanager'])) {\n $configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['femanager']);\n }\n return $configuration;\n }", "title": "" }, { "docid": "3b1f0a021a24a6c5340c1d9f53c64384", "score": "0.5150281", "text": "public function getMetadataSchemas();", "title": "" }, { "docid": "e2296557559d8108b6cc6bda4e5753ac", "score": "0.51477", "text": "private function extension()\n {\n return [\n '1.1' => '.json',\n '2' => '',\n ][$this->apiVersion];\n }", "title": "" }, { "docid": "4df8f13f11b8149d45bfcf2ac670c63a", "score": "0.51144946", "text": "public static function displayExtensions()\n {\n $extensionsToUpdate = 0;\n $extensionsModified = 0;\n\n $dbSchema = \\Sng\\AdditionalReports\\Utility::getDatabaseSchema();\n $allExtension = \\Sng\\AdditionalReports\\Utility::getInstExtList(PATH_typo3conf . 'ext/', $dbSchema);\n\n $listExtensionsTer = array();\n $listExtensionsDev = array();\n $listExtensionsUnloaded = array();\n\n if (count($allExtension['ter']) > 0) {\n foreach ($allExtension['ter'] as $extKey => $itemValue) {\n $currentExtension = self::getExtensionInformations($itemValue);\n if (version_compare($itemValue['EM_CONF']['version'], $itemValue['lastversion']['version'], '<')) {\n $extensionsToUpdate++;\n }\n if (count($itemValue['affectedfiles']) > 0) {\n $extensionsModified++;\n }\n $listExtensionsTer[] = $currentExtension;\n }\n }\n\n if (count($allExtension['dev']) > 0) {\n foreach ($allExtension['dev'] as $extKey => $itemValue) {\n $listExtensionsDev[] = self::getExtensionInformations($itemValue);\n }\n }\n\n if (count($allExtension['unloaded']) > 0) {\n foreach ($allExtension['unloaded'] as $extKey => $itemValue) {\n $listExtensionsUnloaded[] = self::getExtensionInformations($itemValue);\n }\n }\n\n $addContent = '';\n $addContent .= (count($allExtension['ter']) + count($allExtension['dev'])) . ' ' . self::getLl('extensions_extensions');\n $addContent .= '<br/>';\n $addContent .= count($allExtension['ter']) . ' ' . self::getLl('extensions_ter');\n $addContent .= ' / ';\n $addContent .= count($allExtension['dev']) . ' ' . self::getLl('extensions_dev');\n $addContent .= '<br/>';\n $addContent .= $extensionsToUpdate . ' ' . self::getLl('extensions_toupdate');\n $addContent .= ' / ';\n $addContent .= $extensionsModified . ' ' . self::getLl('extensions_extensionsmodified');\n $addContentItem = \\Sng\\AdditionalReports\\Utility::writeInformation(self::getLl('pluginsmode5') . '<br/>' . self::getLl('extensions_updateter') . '', $addContent);\n\n $view = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Fluid\\\\View\\\\StandaloneView');\n $view->setTemplatePathAndFilename(\\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::extPath('additional_reports') . 'Resources/Private/Templates/extensions-fluid.html');\n $view->assign('listExtensionsTer', $listExtensionsTer);\n $view->assign('listExtensionsDev', $listExtensionsDev);\n $view->assign('listExtensionsUnloaded', $listExtensionsUnloaded);\n return $addContentItem . $view->render();\n }", "title": "" }, { "docid": "3b79a9b8b6a23b4dfca8c005091529fd", "score": "0.5113592", "text": "public function getExtendedFieldTypes();", "title": "" }, { "docid": "17cf55227a1f68323262ae07d780b454", "score": "0.5108852", "text": "function wp_get_video_extensions() {}", "title": "" }, { "docid": "c0a8704c475fa59938f8b02efd2f54e7", "score": "0.5102817", "text": "public function modules()\n {\n $this->breadcrumb->onModulesList();\n $extensions = app('antares.memory')->make('component.default')->get('extensions');\n $active = isset($extensions['active']) ? array_keys($extensions['active']) : [];\n $return = new Collection();\n\n foreach ($extensions['available'] as $name => $extension) {\n if (starts_with($extension['path'], 'base::src/' . self::$ignorePath)) {\n continue;\n }\n\n $descriptor = [\n 'full_name' => $extension['full_name'],\n 'description' => $extension['description'],\n 'author' => $extension['author'],\n 'version' => $extension['version'],\n 'url' => $extension['url'],\n 'name' => $name,\n 'activated' => in_array($name, $active),\n 'started' => $this->extension->started($name),\n 'category' => $this->resolveModuleCategoryName($name)\n ];\n\n\n if (is_null($this->category) OR starts_with($name, $this->category)) {\n $return->push($descriptor);\n }\n }\n return $return;\n }", "title": "" }, { "docid": "a510f1bb293f87d1c874fb83d5d5ff0c", "score": "0.5096368", "text": "public function getMissingExtensions()\n {\n return $this->_missingExtensions;\n }", "title": "" }, { "docid": "de722682339d7f1421331ba7e3073ab9", "score": "0.5089107", "text": "public static function getSchemas(): array\n {\n return app(SchemaLoader::class)->getSchemas();\n }", "title": "" }, { "docid": "5a8ea8b2dbb8ca7de0fb66f5a0d1f921", "score": "0.5082247", "text": "public function getFileExtensions(): array\n {\n return $this->configuration['fileExtensions'] ?? self::FILE_EXTENSIONS_TO_PARSE;\n }", "title": "" }, { "docid": "ec9eee37970a0f04f72f6bcdefe26d47", "score": "0.50740016", "text": "public function getFileExtensions(): array\n {\n return $this->fileExtensions;\n }", "title": "" } ]
288ca481c4534b85ad79f18e8a33bca0
/ if $h is not put in, then $h = $w
[ { "docid": "eb3c129067a92c453f8573450636b952", "score": "0.4522711", "text": "public static function roundUpImage($src, $dest, $w, $h=0) {\n\n $file_dest = str_replace(strrchr($dest, '.'), '.png', $dest);\n\n if ($h == 0)\n $res = self::resizeImageSmaller($src, $dest, $w);\n else\n $res = self::resizeImage($src, $dest, $w, $h, false);\n\n // if the image if smaller than the original size\n if ($res != 1 && $res != 0)\n $w = $res;\n\n if ($h == 0) {\n $h = $w;\n }\n\n $output = null;\n $return_var = null;\n\n $halfH = $w / 2;\n exec(\"convert -size \" . \"$w\" . \"x$h xc:none -fill $dest -draw 'circle $halfH, $halfH, $halfH,1' $file_dest\", $output, $return_var);\n\n return true;\n }", "title": "" } ]
[ { "docid": "10a53d0a8d5edbdda38921322753092b", "score": "0.584983", "text": "function SetHight($h)\r\n {\r\n $this->rowhight=$h;\r\n }", "title": "" }, { "docid": "94b0ae2600daedfb26d1c6479080f411", "score": "0.5769437", "text": "function blended_saveWH(&$dims,&$pdf,$id='0')\r\n{\r\n\tif (!empty($id))\r\n\t{\r\n\t\t$coord=$dims->coords[$id];\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$len=count($dims->coords)-1;\r\n\t\t$coord=$dims->coords[$len];\r\n\t}\r\n\r\n\t$coord->H= $pdf->GetLastH();\r\n\t$coord->W= $pdf->GetX()-$coord->X;\r\n}", "title": "" }, { "docid": "f9b0fbc3de1f25d1687771994031adf3", "score": "0.5669436", "text": "abstract public function resizeToHeight($h);", "title": "" }, { "docid": "7b5fcaea86fefac0a350a67128f0f358", "score": "0.5645661", "text": "function hcenter($width){\n return round(($GLOBALS['w'] - $width) / 2);\n}", "title": "" }, { "docid": "ad3b0d29450c55bdcada42fe1ad5cbfa", "score": "0.5591863", "text": "public function recalcSize(){\r\n $this->width = imagesx($this->stage);\r\n $this->height = imagesy($this->stage);\r\n }", "title": "" }, { "docid": "f729547c3beb3439c117bfbee9f31581", "score": "0.55353266", "text": "public function getw();", "title": "" }, { "docid": "693a19a6609ebab90209015fd5589779", "score": "0.5535116", "text": "abstract public function resizeToWidth($w);", "title": "" }, { "docid": "6b04c00c027f1fc4458e6fdbb1e8366e", "score": "0.54211324", "text": "function ratioResize($w,$h=null,$fill=false,$resampled=false,$trueColor=null){\n\t\tif( null === $h){\n\t\t\t$h = $w/$this->ratio;\n\t\t}else if( null === $w){\n\t\t\t$w = $h*$this->ratio;\n\t\t}\n\t\t$ow = $this->width;\n\t\t$oh = $this->height;\n\t\t$w = $this->_checkPercent($w,$ow);\n\t\t$h = $this->_checkPercent($h,$oh);\n\t\t$ratio = $ow/$oh;\n\t\t$outRatio = $w/$h;\n\t\tif( $outRatio === $ratio){ // same ratio\n\t\t\t$_h = $h;\n\t\t\t$_w = $w;\n\t\t}else if( $outRatio > $ratio){ // new width is too long regarding new height so recalc new w\n\t\t\t$_w = round($h*$ratio);\n\t\t\t$_h = $h;\n\t\t}else{ // height is too important reduce it\n\t\t\t$_h = round($w*$oh/$ow);\n\t\t\t$_w = $w;\n\t\t}\n\t\tif( false === $fill){\n\t\t\t$new = gdImage::getNew($_w,$_h,true);\n\t\t\t$x = $y = 0;\n\t\t}else{\n\t\t\t$new = gdImage::getNew($w,$h,true);\n\t\t\t$fill = $new->colorallocate($fill);\n\t\t\t$new->fill(0,0,$fill);\n\t\t\t$x = floor(($w-$_w)/2);\n\t\t\t$y = floor(($h-$_h)/2);\n\t\t}\n\t\tif( $resampled){\n\t\t\t$new->copyresampled($this->_resource,$x,$y,0,0,$_w,$_h,$ow,$oh);\n\t\t}else{\n\t\t$new->copyresized($this->_resource,$x,$y,0,0,$_w,$_h,$ow,$oh);\n\t\t}\n\t\tif( null===$trueColor){\n\t\t\t$trueColor = $this->istruecolor;\n\t\t}\n\t\tif( !$trueColor){\n\t\t\t$new->truecolortopalette(self::$useDithering,256);\n\t\t}\n\t\treturn $new;\n\t}", "title": "" }, { "docid": "286bea2901c35e282cdce3cdb84ad7c3", "score": "0.5388057", "text": "public function create($w, $h);", "title": "" }, { "docid": "72a880190f3b10d637e5e6fca19aea43", "score": "0.53396636", "text": "public function resizeToWidth($w);", "title": "" }, { "docid": "5429a8f18459c338c7ae1051a3a69f38", "score": "0.53039455", "text": "public function resizeToHeight($h);", "title": "" }, { "docid": "2c90488cf8a58b9ee29ffa6160d7e4b8", "score": "0.5244074", "text": "function resize_image_ratios($w, $h, $new_size)\n { \n if ($h > $w)\n {\n $new_w = ($new_size / $h) * $w;\n $new_h = $new_size; \n }\n else\n {\n $new_h = ($new_size / $w) * $h;\n $new_w = $new_size;\n }\n \n return array($new_w, $new_h);\n }", "title": "" }, { "docid": "1867509ce3122339eec6a8883974f088", "score": "0.5180588", "text": "function redimage($img_src,$dst_w,$dst_h) {\n $size = GetImageSize($img_src); \n $src_w = $size[0]; $src_h = $size[1];\n // Teste les dimensions tenant dans la zone\n $test_h = round(($dst_w / $src_w) * $src_h);\n $test_w = round(($dst_h / $src_h) * $src_w);\n // Si Height final non précisé (0)\n if(!$dst_h) $dst_h = $test_h;\n // Sinon si Width final non précisé (0)\n elseif(!$dst_w) $dst_w = $test_w;\n // Sinon teste quel redimensionnement tient dans la zone\n elseif($test_h>$dst_h) $dst_w = $test_w;\n else $dst_h = $test_h;\n\n // Affiche les dimensions optimales\n echo \"WIDTH=\".$dst_w.\" HEIGHT=\".$dst_h;\n \n}", "title": "" }, { "docid": "dcf593a2d3948f8ca9beb9a201288263", "score": "0.50799036", "text": "public function setHeight($h)\n\t{\n\t\t$this->_h = $h;\n\t}", "title": "" }, { "docid": "a879607745d0e47e4b0d840478e0c652", "score": "0.50790524", "text": "abstract public function resize($px);", "title": "" }, { "docid": "51eebd2a8c4dc854a101d1552d6b8aa2", "score": "0.50631434", "text": "function getHeight() {}", "title": "" }, { "docid": "ef7083b30c9eee6416a7fe957008df76", "score": "0.50523597", "text": "function create_thmb ($in_file = '', $out_file = '', $dst_w = 0, $dst_h = 0, $q = 90) {\n\tif (!extension_loaded('gd')) {\n\t\tif (!dl('gd.'.PHP_SHLIB_SUFFIX)) {\n\t\t\treturn false;\n\t\t\t//exit;\n\t\t}\n\t}\n\tsettype($dst_w, 'integer');\n\tsettype($dst_h, 'integer');\n\tsettype($q, 'integer');\n\tif ( ($dst_w <= 0) || ($dst_h <= 0) ) {\n\t\t// Zero size\n\t\treturn false;\n\t}\n\n\tif (!is_writable(dirname($out_file)) || file_exists($out_file)) {\n\t\t// Read protect\n\t\treturn false;\n\t}\n\tif ( (is_file($in_file) === true) && (file_exists($in_file) === true) && (is_readable($in_file) === true) ) {\n\t\t$image = get_image($in_file);\n\t\tif ($image !== false) {\n\t\t\t$imgsize = $image['imgsize'];\n\t\t\t$src_img = $image['res'];\n\t\t\t$src_w = $imgsize[0];\n\t\t\t$src_h = $imgsize[1];\n\t\t\t$src_mime = $imgsize['mime'];\n\n\t\t\t$dst_ratio = ($src_w/$dst_w > $src_h/$dst_h) ? ($src_w/$dst_w) : ($src_h/$dst_h);\n\n\t\t\t$dst_w = round($src_w/$dst_ratio);\n\t\t\t$dst_h = round($src_h/$dst_ratio);\n\t\t\t// Create empty image\n\t\t\tif (function_exists('imagecreatetruecolor') && ($src_mime !== 'image/gif') ) {\n\t\t\t\t$dst_img = imagecreatetruecolor($dst_w, $dst_h);\n\t\t\t} else {\n\t\t\t\t$dst_img = imagecreate($dst_w, $dst_h);\n\t\t\t}\n\t\t\tif (function_exists('imagecopyresampled') ) {\n\t\t\t\t$result = imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dst_w, $dst_h, $src_w, $src_h);\n\t\t\t} else {\n\t\t\t\t$result = imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $dst_w, $dst_h, $src_w, $src_h);\n\t\t\t}\n\t\t\tif ($result !== true) {\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\t// Output the image\n\t\t\tif ($src_mime === 'image/jpeg') {\n\t\t\t\t$result = imagejpeg($dst_img, $out_file, $q);\n\t\t\t} else if ($src_mime === 'image/gif') {\n\t\t\t\t$result = imagegif($dst_img, $out_file);\n\t\t\t} else if ($src_mime === 'image/png') {\n\t\t\t\t$q = ($q >= 10) ? (round($q/10) - 1) : round($q/10);\n\t\t\t\t$result = imagepng($dst_img, $out_file, $q);\n\t\t\t}\n\t\t\timagedestroy($src_img);\n\t\t\timagedestroy($dst_img);\n\t\t\treturn $result;\n\t\t} else {\n\t\t\t// Cant open image\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\t// File Not found\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "f16a03783089e9a41832cd6c22ebe3ba", "score": "0.5018332", "text": "function ImageResize($img,$w,$h,$dest,$filename)\n{\n\t//$img = $_GET['img'];\n\t//$percent = $_GET['percent'];\n\t/*$constrain = $_GET['constrain'];\n\t$w = $_GET['w'];\n\t$h = $_GET['h'];*/\n\t//Copy Org Image To Destination\n\t//@copy($img,$dest.'/'.$filename);\n\t\n\t\n\t// get image size of img\n\t$x = @getimagesize($img);\n\t// image width\n\t$sw = $x[0];\n\t// image height\n\t$sh = $x[1];\n\t\n\tif ($percent > 0) {\n\t\t// calculate resized height and width if percent is defined\n\t\t$percent = $percent * 0.01;\n\t\t$w = $sw * $percent;\n\t\t$h = $sh * $percent;\n\t} else {\n\t\tif (isset ($w) AND !isset ($h)) {\n\t\t\t// autocompute height if only width is set\n\t\t\t$h = (100 / ($sw / $w)) * .01;\n\t\t\t$h = @round ($sh * $h);\n\t\t} elseif (isset ($h) AND !isset ($w)) {\n\t\t\t// autocompute width if only height is set\n\t\t\t$w = (100 / ($sh / $h)) * .01;\n\t\t\t$w = @round ($sw * $w);\n\t\t} elseif (isset ($h) AND isset ($w) AND isset ($constrain)) {\n\t\t\t// get the smaller resulting image dimension if both height\n\t\t\t// and width are set and $constrain is also set\n\t\t\t$hx = (100 / ($sw / $w)) * .01;\n\t\t\t$hx = @round ($sh * $hx);\n\t\n\t\t\t$wx = (100 / ($sh / $h)) * .01;\n\t\t\t$wx = @round ($sw * $wx);\n\t\n\t\t\tif ($hx < $h) {\n\t\t\t\t$h = (100 / ($sw / $w)) * .01;\n\t\t\t\t$h = @round ($sh * $h);\n\t\t\t} else {\n\t\t\t\t$w = (100 / ($sh / $h)) * .01;\n\t\t\t\t$w = @round ($sw * $w);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$im = @ImageCreateFromJPEG ($img) or // Read JPEG Image\n\t$im = @ImageCreateFromPNG ($img) or // or PNG Image\n\t$im = @ImageCreateFromGIF ($img) or // or GIF Image\n\t$im = false; // If image is not JPEG, PNG, or GIF\n\t\n\tif (!$im) {\n\t\t// We get errors from PHP's ImageCreate functions...\n\t\t// So let's echo back the contents of the actual image.\n\t\treadfile ($img);\n\t} else {\n\t\t// Create the resized image destination\n\t\t$thumb = @ImageCreateTrueColor ($w, $h);\n\t\t// Copy from image source, resize it, and paste to image destination\n\t\t@ImageCopyResampled ($thumb, $im, 0, 0, 0, 0, $w, $h, $sw, $sh);\n\t\t//@imagecopyresized($this->dest_image, $this->src_image, 0, 0, 0, 0, $thumb_w, $thumb_h, $old_x, $old_y);\n\t\t// Output resized image\n\t\t@ImageJPEG ($thumb,$dest.'/'.$filename);\n\t\t//if($thumb)copy($thumb,'thumb_'.$filename);\n\t}\n}", "title": "" }, { "docid": "e0bcaa1d3265c3ccb5001829fbf5411d", "score": "0.50021327", "text": "public function getW();", "title": "" }, { "docid": "feff5a1fc2102bd42215f2c5206eb7e2", "score": "0.4997854", "text": "public function _imageReproportion ()\r\n\t{\r\n\t\tif ( (is_numeric ($this->width) === false) || (is_numeric ($this->height) === false) || ($this->width == 0) || ($this->height == 0) )\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\r\n\t\tif ( (is_numeric ($this->origWidth) === false) || (is_numeric ($this->origHeight) === false) || ($this->origWidth == 0) || ($this->origHeight == 0) )\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$newWidth\t= ceil ($this->origWidth * $this->height / $this->origHeight);\r\n\t\t$newHeight\t= ceil ($this->width * $this->origHeight / $this->origWidth);\r\n\r\n\t\t$ratio = ( ($this->origHeight / $this->origWidth) - ($this->height / $this->width));\r\n\r\n\t\tif ( ($this->masterDim != 'width') && ($this->masterDim != 'height') )\r\n\t\t{\r\n\t\t\t$this->masterDim = ($ratio < 0) ? 'width' : 'height';\r\n\t\t}\r\n\r\n\t\tif ( ($this->width != $newWidth) && ($this->height != $newHeight))\r\n\t\t{\r\n\t\t\tif ($this->masterDim == 'height')\r\n\t\t\t{\r\n\t\t\t\t$this->width = $newWidth;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->height = $newHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a07237283300f9ddf9305fbf98e7afaa", "score": "0.498369", "text": "public function setSize($w, $h)\n\t{\n\t\t$this->size = array($w, $h);\n\t}", "title": "" }, { "docid": "b1ebef03d1246b512b2fae4cea7bb6c3", "score": "0.4977144", "text": "function setHeight() {}", "title": "" }, { "docid": "3c93c8acd9d3708f038f641d035f4c52", "score": "0.49657604", "text": "function fit_size($origW, $origH, $maxW, $maxH) {\n // but keep the original ratio of dimension\n $newH = $origH;\n $newW = $origW;\n $landscape = ($origW > $origH) ? true : false;\n\n if ($landscape) {\n if ($origW > $maxW) {\n $newW = $maxW;\n $newH = resizeHByW($origH, $maxW, $origW);\n }\n } else {\n // portrait\n if ($origH > $maxH) {\n $newH = $maxH;\n $newW = resizeWByH($origW, $maxH, $origH);\n }\n }\n return array('width' => round($newW), 'height' => round($newH));\n}", "title": "" }, { "docid": "261c9897c7ee9786c09f95642ecdb702", "score": "0.49283177", "text": "private function prepareOriginalImage()\n {\n if ( $this->or_width > self::$_maxPreviewWidth && $this->or_height > self::$_maxPreviewHeight ) {\n $kw = Warecorp_Video_Cover::$_maxPreviewWidth / $this->or_width;\n $kh = Warecorp_Video_Cover::$_maxPreviewHeight / $this->or_height;\n $k = ($kw < $kh) ? $kw : $kh;\n $this->or_width = $this->or_width * $k;\n $this->or_height = $this->or_height * $k;\n } elseif ( $this->or_width > Warecorp_Video_Cover::$_maxPreviewWidth ) {\n $k = self::$_maxPreviewWidth / $this->or_width;\n $this->or_width = Warecorp_Video_Cover::$_maxPreviewWidth;\n $this->or_height = $this->or_height * $k;\n } elseif ( $this->or_height > Warecorp_Video_Cover::$_maxPreviewHeight ) {\n $k = self::$_maxPreviewHeight / $this->or_height;\n $this->or_width = $this->or_width * $k;\n $this->or_height = Warecorp_Video_Cover::$_maxPreviewHeight;\n }\n }", "title": "" }, { "docid": "410db2fe409e3785ae846adb3ef57a52", "score": "0.48970124", "text": "public function getH();", "title": "" }, { "docid": "0000349e9b8e48b6e820d916ef84deba", "score": "0.4892299", "text": "public function crop($w, $h, $x = 0, $y = 0);", "title": "" }, { "docid": "4e52eca82ffce383c3c010b25c53cd17", "score": "0.48888585", "text": "function setheight( &$image, $args, $upscale = false ) {\n\t$w = $image->getimagewidth();\n\t$h = $image->getimageheight();\n\n\tif ( substr( $args, -1 ) == '%' )\n\t\t$new_height = round( $h * abs( intval( $args ) ) / 100 );\n\telse\n\t\t$new_height = intval( $args );\n\n\t// New height can't be calculated, then bail\n\tif ( ! $new_height )\n\t\treturn;\n\t// New height is greater than original image, but we don't have permission to upscale\n\tif ( $new_height > $h && ! $upscale )\n\t\treturn;\n\t// Sane limit when upscaling\n\tif ( $new_height > $h && $upscale && $new_height > PHOTON__UPSCALE_MAX_PIXELS )\n\t\treturn;\n\n\t$ratio = $h / $new_height;\n\n\t$new_w = round( $w / $ratio );\n\t$new_h = round( $h / $ratio );\n\t$s_x = $s_y = 0;\n\n\t$image->scaleimage( $new_w, $new_h );\n}", "title": "" }, { "docid": "2d25494e40313bd44cd42a0839bf8842", "score": "0.4866595", "text": "private function setSize()\r\n\t{\r\n\t\tif (!$this->isLoaded())\r\n\t\t\treturn false;\r\n\r\n\t\t$this->width = imagesx($this->image);\r\n\t\t$this->height = imagesy($this->image);\r\n\t}", "title": "" }, { "docid": "710004ed05365946e046a4b9d66a39b4", "score": "0.48663592", "text": "public function setWidth($w)\n\t{\n\t\t$this->_w = $w;\n\t}", "title": "" }, { "docid": "617c6d0b8afafd3279c4623eb8a894d9", "score": "0.48622948", "text": "function _fillBottom()\n {\n return (int) (($this->_top + $this->_bottom + $this->_plotHeight()) / 2);\n }", "title": "" }, { "docid": "708f8c33d7fe94e032f5f232041e694c", "score": "0.48541713", "text": "function setwidth( &$image, $args, $upscale = false ) {\n\t$w = $image->getimagewidth();\n\t$h = $image->getimageheight();\n\n\tif ( substr( $args, -1 ) == '%' )\n\t\t$new_width = round( $w * abs( intval( $args ) ) / 100 );\n\telse\n\t\t$new_width = intval( $args );\n\n\t// New width can't be calculated, then bail\n\tif ( ! $new_width )\n\t\treturn;\n\t// New height is greater than original image, but we don't have permission to upscale\n\tif ( $new_width > $w && ! $upscale )\n\t\treturn;\n\t// Sane limit when upscaling\n\tif ( $new_width > $w && $upscale && $new_width > PHOTON__UPSCALE_MAX_PIXELS )\n\t\treturn;\n\n\t$ratio = $w / $new_width;\n\n\t$new_w = round( $w / $ratio );\n\t$new_h = round( $h / $ratio );\n\t$s_x = $s_y = 0;\n\n\t$image->scaleimage( $new_w, $new_h );\n}", "title": "" }, { "docid": "e0e314fc3bc41557b756d4da0b2cc5fd", "score": "0.48409656", "text": "public function __construct($w = 128, $h = 128)\n\t{\n\t\t$this->setWidth($w);\n\t\t$this->setHeight($h);\n\t}", "title": "" }, { "docid": "b0bd4d7e292161944d8737882d74ecaa", "score": "0.48234937", "text": "public function new_Width_Height() {\n $aspectRatio = $this->width / $this->height;\n\n if($this->cropToFit && $this->newWidth && $this->newHeight) {\n $targetRatio = $this->newWidth / $this->newHeight;\n $this->cropWidth = $targetRatio > $aspectRatio ? $this->width : round($this->height * $targetRatio);\n $this->cropHeight = $targetRatio > $aspectRatio ? round($this->width / $targetRatio) : $this->height;\n if($this->verbose) { $this->verbose(\"Crop to fit into box of {$this->newWidth}x{$this->newHeight}. Cropping dimensions: {$this->cropWidth}x{$this->cropHeight}.\"); }\n }\n else if($this->newWidth && !$this->newHeight) {\n $this->newHeight = round($this->newWidth / $aspectRatio);\n if($this->verbose) { $this->verbose(\"New width is known {$this->newWidth}, height is calculated to {$this->newHeight}.\"); }\n }\n else if(!$this->newWidth && $this->newHeight) {\n $this->newWidth = round($this->newHeight * $aspectRatio);\n if($this->verbose) { $this->verbose(\"New height is known {$this->newHeight}, width is calculated to {$this->newWidth}.\"); }\n }\n else if($this->newWidth && $this->newHeight) {\n $ratioWidth = $this->width / $this->newWidth;\n $ratioHeight = $this->height / $this->newHeight;\n $ratio = ($ratioWidth > $ratioHeight) ? $ratioWidth : $ratioHeight;\n $this->newWidth = round($this->width / $ratio);\n $this->newHeight = round($this->height / $ratio);\n if($this->verbose) { $this->verbose(\"New width & height is requested, keeping aspect ratio results in {$this->newWidth}x{$this->newHeight}.\"); }\n } else {\n $this->newWidth = $this->width;\n $this->newHeight = $this->height;\n if($this->verbose) { $this->verbose(\"Keeping original width & heigth.\"); }\n }\n }", "title": "" }, { "docid": "8ea1b59c70989b704b05e916b71a025b", "score": "0.482341", "text": "private function updateSizeInfo(): void\n\t{\n\t\t[$this->xDpi, $this->yDpi] = imageresolution($this->resource);\n\t\t$this->height = imagesy($this->resource);\n\t\t$this->width = imagesx($this->resource);\n\t}", "title": "" }, { "docid": "18bc291dd9a1bd8682decc538995c739", "score": "0.4822486", "text": "private function setDimension() {\n\t\tlist($this->imagesize[\"width\"], $this->imagesize[\"height\"]) = getimagesize($this->getNewPath());\n\t}", "title": "" }, { "docid": "1522e96c6525e168893ccbc23080f3ab", "score": "0.48112676", "text": "function letterbox($src, $w, $h, $color = '#000000', $force = false) {\n\t\t \n\t\t$src = $this->photon_url($src);\n\t\t\t\t\n\t\t/* Apply letterbox\n\t\t * Photon docs: Add black letterboxing effect to images, by scaling them to width, height \n\t\t * while maintaining the aspect ratio and filling the rest with black. \n\t\t * See: http://developer.wordpress.com/docs/photon/api/#lb\n\t\t */\n\n\t\t$args = array(\n\t\t\t'lb' => $w.','.$h\n\t\t);\n\t\t \n\t\t$src = add_query_arg($args, $src);\n\t\t\n\t\treturn $src;\n\t}", "title": "" }, { "docid": "10066d0337ea3b5c4df905002d034ca3", "score": "0.48090714", "text": "function setWidth() {}", "title": "" }, { "docid": "bbd882498d02f3184825ae9766bf7d8b", "score": "0.4803421", "text": "public function resizeW($width)\n {\n $tmpHeight = $width / $this->width * $this->height;\n $this->resize((int)$width, (int)$tmpHeight);\n }", "title": "" }, { "docid": "406dc44b2ce197c79ef46873a21735af", "score": "0.4802372", "text": "public function height( $h )\n {\n $this->height = (int) $h;\n return $this;\n }", "title": "" }, { "docid": "75fa5ec7b1a88ed3e8368f2465d33aa9", "score": "0.47979048", "text": "function resize($w,$h=null,$resampled=false,$trueColor=null){\n\t\tif( null === $h){\n\t\t\t$h = $w/$this->ratio;\n\t\t}else if( null === $w){\n\t\t\t$w = $h*$this->ratio;\n\t\t}\n\t\t$ow = $this->width;\n\t\t$oh = $this->height;\n\t\t$w = $this->_checkPercent($w,$ow);\n\t\t$h = $this->_checkPercent($h,$oh);\n\t\t$new = gdImage::getNew($w,$h,true);\n\t\tif( $resampled ){\n\t\t\t$new->copyresampled($this->_resource,0,0,0,0,$w,$h,$ow,$oh);\n\t\t}else{\n\t\t$new->copyresized($this->_resource,0,0,0,0,$w,$h,$ow,$oh);\n\t\t}\n\t\tif( null===$trueColor){\n\t\t\t$trueColor = $this->istruecolor;\n\t\t}\n\t\tif( !$trueColor){\n\t\t\t$new->truecolortopalette(self::$useDithering,256);\n\t\t}\n\t\treturn $new;\n\t}", "title": "" }, { "docid": "ffdad4f6589fcfce73160dc7f040450c", "score": "0.47768494", "text": "function resizeStamp($orig,$width_max,$height_max,$rozm) {\n\n\t$in = $orig; // png\n \n\n\tif($width_max > $height_max) {\n\t\t$k_width = $width_max / $height_max;\n\t\t$k_height = 1;\n\t} elseif($height_max > $width_max) {\n\t\t$k_width = 1;\n\t\t$k_height = $height_max / $width_max;\n\t} else {\n\t\t$k_width = 1;\n\t\t$k_height = 1;\n\t}\n\t\n\tif($rozm[0] < $width_max && $rozm[1] < $height_max) {\n\t\t$width = $rozm[0];\n\t\t$height = $rozm[1];\n\t} elseif($rozm[0] / $k_width > $rozm[1] / $k_height) {\n\t\t$width = $width_max;\n\t\t$k = $rozm[0] / $width_max;\n\t\t$height = ceil($rozm[1] / $k);\n\t} elseif($rozm[0] / $k_width < $rozm[1] / $k_height) { \n \t$height = $height_max;\n\t\t$k = $rozm[1] / $height_max;\n\t\t$width = ceil($rozm[0] / $k);\n\t} else {\n\t\tif($width_max > $height_max) {\t\t\t\n\t\t\t$width = $height_max * $k_width;\n\t\t\t$height = $height_max * $k_height;\n\t\t} else {\n\t\t\t$width = $width_max * $k_width;\n\t\t\t$height = $width_max * $k_height;\t\t\t\n\t\t}\n\t\n\t}\n\n\t\n\t$out = imagecreatetruecolor($width,$height);\n\t\n\t\n\timagecopyresampled($out,$in,0,0,0,0,$width,$height,$rozm[0],$rozm[1]);\n\t\n return $out;\n}", "title": "" }, { "docid": "d3d6002d21730ea6c5b3435dc4c7235e", "score": "0.47751707", "text": "abstract public function crop($w, $h, $x = 0, $y = 0);", "title": "" }, { "docid": "f8656fdb7949eb3ba98ec9781008c34e", "score": "0.47664803", "text": "function resize($width,$height, $imageStyle='', $isStamp='') {\r\n\t\t \r\n\t\t /* ------- Added by Sagar Kshatriya Date : 20 October 2012 ------- */\r\n\t\t \r\n\t\t $x =0; $y=0;\r\n\t\t $bgwidth = $width; $bgheight = $height;\r\n\t\t \r\n\t\t if (isset($imageStyle) && $imageStyle == 'pt0') { \r\n\t\t \t\t \r\n\t\t\t\t $bgwidth = 220; $bgheight = 134;\r\n\t\t\t\t \r\n\t\t\t\t if ($width > 220 && $height > 134) {\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width < 220 && $height < 134) {\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($height == 134 && ( $width < 220 or $width > 220 ) ) { \r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width == 220 && ($height < 134 or $height > 134 ) ) {\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else {\r\n\t\t\t\t \t//echo $x . \" \". $y; exit();\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t } // end if \r\n\t\t if (isset($imageStyle) && $imageStyle == 'pt6') { \r\n\t\t \t\t \r\n\t\t\t\t $bgwidth = 660; $bgheight = 400;\r\n\t\t\t\t \r\n\t\t\t\t if ($width > 660 && $height > 400) {\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width < 660 && $height < 400) {\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($height == 400 && ( $width < 660 or $width > 660 ) ) { \r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width == 660 && ($height < 400 or $height > 400 ) ) {\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else {\r\n\t\t\t\t \t//echo $x . \" \". $y; exit();\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t } // end if \r\n\t\t if (isset($imageStyle) && $imageStyle == 'pt5') { \r\n\t\t \t\t \r\n\t\t\t\t $bgwidth = 756; $bgheight = 501;\r\n\t\t\t\t \r\n\t\t\t\t if ($width > 756 && $height > 501) {\r\n\t\t\t\t// \t$bgwidth = 756; \t$bgheight = 501;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width < 756 && $height < 501) {\r\n\t\t\t\t //\t$bgwidth = 756; \t$bgheight = 501;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($height == 501 && ( $width < 756 or $width > 756 ) ) { \r\n\t\t\t\t//\t$bgwidth = 756;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width == 756 && ($height < 501 or $height > 501 ) ) {\r\n\t\t\t\t//\t$bgheight = 501;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else {\r\n\t\t\t\t \t//echo $x . \" \". $y; exit();\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t//echo $width . \" \". $height . \" = \". $bgwidth . \" \". $bgheight . \" = \". $x . \" \". $y; exit();\r\n\t\t\t\t \r\n\t\t\t} // end if \r\n\t\t\tif (isset($imageStyle) && $imageStyle == 'pt4') { \r\n\t\t \t\t \r\n\t\t\t\t $bgwidth = 450; $bgheight = 379;\r\n\t\t\t\t \r\n\t\t\t\t if ($width > 450 && $height > 379) {\r\n\t\t\t\t// \t$bgwidth = 450; \t$bgheight = 379;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width < 450 && $height < 379) {\r\n\t\t\t\t //\t$bgwidth = 450; \t$bgheight = 379;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($height == 379 && ( $width < 450 or $width > 450 ) ) { \r\n\t\t\t\t//\t$bgwidth = 756;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width == 450 && ($height < 379 or $height > 379 ) ) {\r\n\t\t\t\t//\t$bgheight = 501;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else {\r\n\t\t\t\t \t//echo $x . \" \". $y; exit();\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t//echo $width . \" \". $height . \" = \". $bgwidth . \" \". $bgheight . \" = \". $x . \" \". $y; exit();\r\n\t\t\t\t \r\n\t\t\t} // end if \r\n\t\t\telse if (isset($imageStyle) && $imageStyle == 'pt3') { \r\n\t\t \t \t\r\n\t\t\t\t $bgwidth = 320; $bgheight = 271;\r\n\t\t \t\t if ($width > 320 && $height > 271) {\r\n\t\t\t\t// \t$bgwidth = 320; $bgheight = 271;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width < 320 && $height < 271) {\r\n\t\t\t\t // \t$bgwidth = 320; $bgheight = 271;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($height == 271 && ( $width < 320 or $width > 320 ) ) { \r\n\t\t\t\t//\t$bgwidth = 320;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width == 320 && ($height < 271 or $height > 271 ) ) {\r\n\t\t\t\t//\t$bgheight = 271;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t// echo $width . \" \". $height . \" = \". $bgwidth . \" \". $bgheight; exit();\r\n\t\t \r\n\t\t } // end else\r\n\t\t else if (isset($imageStyle) && $imageStyle == 'pt1') { \r\n\t\t \t \t\r\n\t\t\t\t $bgwidth = 158; $bgheight = 210;\r\n\t\t \t\t if ($width > 158 && $height > 210) {\r\n\t\t\t\t// \t$bgwidth = 158; $bgheight = 210;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width < 158 && $height < 210) {\r\n\t\t\t\t // \t$bgwidth = 158; $bgheight = 210;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($height == 210 && ( $width < 158 or $width > 158 ) ) { \r\n\t\t\t\t//\t$bgwidth = 320;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width == 158 && ($height < 210 or $height > 210 ) ) {\r\n\t\t\t\t//\t$bgheight = 210;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t// echo $width . \" \". $height . \" = \". $bgwidth . \" \". $bgheight; exit();\r\n\t\t \r\n\t\t } // end else\r\n\t\t else if (isset($imageStyle) && $imageStyle == 'pt2') { \r\n\t\t \t \t\r\n\t\t\t\t $bgwidth = 391; $bgheight = 528;\r\n\t\t \t\t if ($width > 391 && $height > 528) {\r\n\t\t\t\t// \t$bgwidth = 391; $bgheight = 528;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width < 391 && $height < 528) {\r\n\t\t\t\t // \t$bgwidth = 158; $bgheight = 528;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($height == 528 && ( $width < 391 or $width > 391 ) ) { \r\n\t\t\t\t//\t$bgwidth = 391;\r\n\t\t\t\t\t$x = ($bgwidth - $width) /2;\r\n\t\t\t\t }\r\n\t\t\t\t else if ($width == 391 && ($height < 528 or $height > 528 ) ) {\r\n\t\t\t\t//\t$bgheight = 528;\r\n\t\t\t\t\t$y = ($bgheight - $height) /2;\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t// echo $width . \" \". $height . \" = \". $bgwidth . \" \". $bgheight; exit();\r\n\t\t \r\n\t\t } // end else\r\n\t\t \r\n\t\t \r\n\t\t\r\n//\t\t echo $width . \" \". $height . \" = \". $bgwidth . \" \". $bgheight; exit();\r\n\t\t \r\n\t\t $new_image = imagecreatetruecolor($bgwidth, $bgheight);\r\n\t\t $bgcolor = imagecolorallocate($new_image, 255, 255, 255);\r\n \t\t \r\n\t\t imagefilledrectangle($new_image,0,0,$bgwidth,$bgheight,$bgcolor);\r\n\t\t \r\n\t\t /* ------------------------------------------------------------ */\r\n\t\t\t\r\n\t\t imagecopyresampled($new_image, $this->image, $x, $y, 0, 0, $width, $height, $this->getWidth(), $this->getHeight());\r\n\t\t \r\n\t\t // ------ place watermark on image ---------\r\n\t\t \t\r\n\t\t\tif (isset($imageStyle) && $imageStyle == 'pt5') { \r\n\t\t\t\r\n\t\t\t\tif (isset($isStamp) && $isStamp == 1) { \r\n\t\t\t\t\r\n\t\t\t\t\t$watermark = imagecreatefromgif('../images/watermark.gif');\r\n\t\t\t\t\t$marge_left = 10;\r\n\t\t\t\t\t$marge_right = 10;\r\n\t\t\t\t\t$marge_bottom = 10;\r\n\t\t\t\t\t$sx = imagesx($watermark);\r\n\t\t\t\t\t$sy = imagesy($watermark);\r\n\t\t\t\t\timagecopymerge($new_image, $watermark, -20, 170, 0, 0, imagesx($watermark), imagesy($watermark), 40);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t // -------------------------------------------\r\n\t\t \r\n\t\t $this->image = $new_image;\r\n\t }", "title": "" }, { "docid": "715ca9b57010e9ad27d0bde53e92587b", "score": "0.4759293", "text": "public function getWidth(): int | null;", "title": "" }, { "docid": "7bd7035024828bb426e5f0ec9961be74", "score": "0.47587442", "text": "public function altura_campo($w,$h,$x,$t)\n {\n $height = $h / 3;\n //resultado para sumarle dos\n $first = $height + 2;\n $second = $height + $height + $height + 3;\n //obtener la logitud de la cadena $t\n $len = strlen($t);\n\n if ($len > 23) {\n $txt = str_split($t, 21);\n $this->pdf->SetX($x);\n $this->pdf->Cell($w, $first, $txt[0], '' . '', '');\n $this->pdf->SetX($x);\n $this->pdf->Cell($w, $second, $txt[1], '' . '', '');\n $this->pdf->SetX($x);\n $this->pdf->Cell($w, $h, '', 'LTRB', 0, 'L', 0);\n } else {\n $this->pdf->SetX($x);\n $this->pdf->Cell($w, $h, $t, 'LTRB', 0, 'L', 0);\n }\n }", "title": "" }, { "docid": "07a743b6eb3355135968faa67883a169", "score": "0.47186774", "text": "private function normalizeWidthHeight(&$width, &$height)\n\t{\n\t\t// normalize width and height values\n\t\t$results = array(\n\t\t\t'width' => array(),\n\t\t\t'height' => array(),\n\t\t);\n\t\tforeach (array_keys($results) as $var) {\n\t\t\t// $var can be \"width\" or \"height\"\n\t\t\tpreg_match_all($this->widthHeightRegex, $$var, $results[$var]);\n\t\t\tif (!empty($results[$var]['cssvalue'][0])) {\n\t\t\t\t// given value is valid -> can be written to database\n\t\t\t\t$$var = $results[$var]['cssvalue'][0];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// rollback to default\n\t\t\t\t$$var = ($var === 'width' ? '100%' : '300px');\n\t\t\t\t// emit warning\n\t\t\t\t$this->content->template['osm_map_plugin']['errors'][] =\n\t\t\t\t\t&$this->content->template['plugin']['osm_map_plugin']['error']['invalid_' . $var . '_value'];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "33d5dcbb240d8056d8eaadce61f7919c", "score": "0.47185007", "text": "public function getWidth(): ?int;", "title": "" }, { "docid": "63de328a0243b026bc8a6eeaa190b17c", "score": "0.47085157", "text": "protected function resizeImageSquareScal($watermark)\r\n {\r\n $old_x = imagesx($this->src_image);\r\n $old_y = imagesy($this->src_image);\r\n $this->core->logger->debug(\"resizeImageSquare ImgName:\" . $this->imgName . \" Old x:\" . $old_x . \" old y:\" . $old_y . \" NewWidth:\" . $this->newWidth . \" NewHeight:\" . $this->newHeight);\r\n $xFact = $old_x / $this->newWidth;\r\n $yFact = $old_y / $this->newHeight;\r\n $this->core->logger->debug(\"resizeImageSquare Factx:\" . $xFact . \" Facty:\" . $yFact);\r\n // then decide dimension to use for resize image\r\n // we want to get one dimension like set and the other\r\n // one at least as big as we want it to be\r\n $thumb_w = 0;\r\n $thumb_h = 0;\r\n if ($xFact > $yFact) {\r\n $thumb_w = $this->newWidth - 4;\r\n $thumb_h = $old_y * (($this->newHeight - 4) / $old_x);\r\n } else if ($yFact > $xFact) {\r\n $thumb_w = $old_x * (($this->newWidth - 4) / $old_y);\r\n $thumb_h = $this->newHeight - 4;\r\n }\r\n\r\n if ($old_x == $old_y) {\r\n $thumb_w = $this->newWidth;\r\n $thumb_h = $this->newHeight;\r\n }\r\n $thumb_w = ceil($thumb_w);\r\n $thumb_h = ceil($thumb_h);\r\n $this->core->logger->debug(\"resizeImageSquare thumb_w: \" . $thumb_w . \" thumb_h:\" . $thumb_h);\r\n $white = imagecolorallocate($this->dest_image, 255, 255, 255);\r\n\r\n //echo(\"width used:\".$thumb_w. \" height used:\".$thumb_h.\"<br/>\");\r\n // after getting correct maximum dimension without image distortion,\r\n // create image\r\n $this->dest_image2 = imagecreatetruecolor($thumb_w, $thumb_h);\r\n imagefilledrectangle($this->dest_image2, 0, 0, $thumb_w, $thumb_h, $white);\r\n\r\n imagecopyresampled($this->dest_image2, $this->src_image, 0, 0, 0, 0, ceil($thumb_w), ceil($thumb_h), $old_x, $old_y);\r\n //after resize we should cropimage to wanted height and width\r\n $this->dest_image = imagecreatetruecolor(ceil($this->newWidth), ceil($this->newHeight));\r\n imagefilledrectangle($this->dest_image, 0, 0, ceil($this->newWidth), ceil($this->newHeight), $white);\r\n\r\n $offX = ceil(($this->newWidth - $thumb_w) / 2);\r\n $offY = ceil(($this->newHeight - $thumb_h) / 2);\r\n\r\n imagecopyresampled($this->dest_image, $this->dest_image2, $offX, $offY, 0, 0, $thumb_w, $thumb_h, $thumb_w, $thumb_h);\r\n //add watermark image\r\n if ($watermark) $this->doWatermark();\r\n }", "title": "" }, { "docid": "2e3a044e13f2bb537d25f13281a19f75", "score": "0.47035578", "text": "function _sizeRow($row) {\r\n // Look up the cell value to see if it has been changed\r\n if (isset($this->_row_sizes[$row])) {\r\n if ($this->_row_sizes[$row] == 0) {\r\n return(0);\r\n } else {\r\n return(floor(4 / 3 * $this->_row_sizes[$row]));\r\n }\r\n } else {\r\n return(17);\r\n }\r\n }", "title": "" }, { "docid": "b63936398c98dfce4ef06eec78111fca", "score": "0.46817428", "text": "abstract public function adjust();", "title": "" }, { "docid": "1c60cacfd955cd8e487a5aa44f809c68", "score": "0.4680742", "text": "final public function getW()\n {\n }", "title": "" }, { "docid": "69221e693ce6d78529e0726c3323b4bb", "score": "0.4671109", "text": "public function SetHCellSpace($var){\n\n $this->_HCellSpace = (float) $var;\n\n }", "title": "" }, { "docid": "7709bbac7527d44e9b5612862a880f1b", "score": "0.4665754", "text": "public function resize($px);", "title": "" }, { "docid": "5bef863b0edd849e0f7715c6a0b75871", "score": "0.466266", "text": "function _fillLeft()\n {\n return (int) (($this->_left + $this->_right - $this->_plotWidth()) / 2);\n }", "title": "" }, { "docid": "e46450fc7c6e8b8f2572ba6c57cb3e65", "score": "0.46622843", "text": "function CheckPageBreak($h)\n\t{\n\t\t//if($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t//\t$this->AddPage($this->CurOrientation);\n\t\tif($this->GetY()+$h>$this->PageBreakTrigger){\n\t\t\tif($this->GetX()<$this->margin+$this->cellw){\n\t\t\t\t$this->setMrgins(\"two\");\n\t\t\t\t$this->SetY($this->colTwoY);\n\t\t\t}else{\t\n\t\t\t\t$this->setMrgins(\"one\");\n\t\t\t\t$this->AddPage($this->CurOrientation);\n\t\t\t}\t\n\t\t}\n\t}", "title": "" }, { "docid": "89cfe62eacd9842802db5eabf9e3d235", "score": "0.46596622", "text": "public function adjust();", "title": "" }, { "docid": "6328bc4860c785a8febcd487c7ea2d1a", "score": "0.4643604", "text": "function uv_tty_get_winsize(UVTty $tty, int &$width, int &$height)\n{\n}", "title": "" }, { "docid": "927fdf940e8fc11b42ce0655c8f53a3f", "score": "0.4639604", "text": "function getWidth() {}", "title": "" }, { "docid": "788bb36132332cce7e5d5a6214258938", "score": "0.4638948", "text": "function resize_gd( $input , $w , $h ) {\n\t\n\t\t# error check\n\t\tif ( !is_file( $input ) OR !$w OR !$h ) {\n\t\t\treturn false;\n\t\t}\n\t \n\t # file info\n\t\t$file_info = pathinfo( $input );\n\t\t$file_ext = strtolower( $file_info['extension'] );\n\t\t\n\t\t# is there already a file that's the right size?\n\t\tif ( stristr( $input , '.'.$h.'.jpg' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t# DYNAMICALLY CHANGE MEMORY LIMIT BASED ON IMAGE\n\t\t\n\t\t$imageInfo = getimagesize( $input );\n\t\t$current_memory = ini_get( 'memory_limit' );\n\t\t$current_execution_time = ini_get( 'max_execution_time' );\n\t\t$memoryNeeded = round($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels']);\t// width x height x bits per channel x channels\n\t if ( function_exists( 'memory_get_usage' ) AND (memory_get_usage() + $memoryNeeded) > (intval(ini_get('memory_limit')) * pow(1024, 2))) {\n\t \t$new_memory = $current_memory + ceil(((memory_get_usage() + $memoryNeeded) - $current_memory * pow(1024, 2)) / pow(1024, 2));\n\t \t$new_memory_ini = $new_memory.'M';\n\t \tini_set('memory_limit', $new_memory_ini);\n\t \t$new_executiontime = ceil($memoryNeeded/500000);\n\t \tini_set('max_execution_time', $new_executiontime);\n\t } else {\n\t \tini_set('memory_limit', '128M');\n\t\t\tini_set(\"max_execution_time\",\"600\");\n\t }\n\t \n\t\tif ($imageInfo['mime']=='image/png' OR $file_ext=='png') {\n\t\t\t$img_src=imagecreatefrompng( $input );\n\t\t\tif (!$img_src) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif ($imageInfo['mime']=='image/gif' OR $file_ext=='gif') {\n\t\t\t$img_src=imagecreatefromgif( $input );\n\t\t\tif (!$img_src) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif ($imageInfo['mime']=='image/jpeg' OR $file_ext=='jpg' OR $file_ext=='jpeg') {\n\t\t\t$img_src=imagecreatefromjpeg( $input );\n\t\t\tif (!$img_src) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif ($imageInfo['mime']=='image/bmp' OR $file_ext=='bmp') {\n\t\t\t$img_src=imagecreatefromwbmp( $input );\n\t\t\tif (!$img_src) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t\n\n\t\t$img_dst = imagecreatetruecolor( $w , $h );\n\t\tif (!$img_dst) {\n\t\t\treturn;\n\t\t}\n\t\timagecopyresampled( $img_dst, $img_src, 0, 0, 0, 0, $w, $h, $imageInfo[0], $imageInfo[1]); \n\t\timagedestroy( $img_src ); \n\t\tunset( $img_src );\n\t\t\n\t\t# quality of the saved jpeg\n\t\t$quality = 85;\n\t\tif ($w<150 AND $h<150) {\n\t\t\t$quality = 100;\n\t\t} elseif ($w<300 AND $h<300) {\n\t\t\t$quality = 90;\n\t\t}\n\t\t# outputs are always jpegs, so alter the file extenstion of the output file path\n\t\t$output = $file_info['dirname'].'/'.$file_info['filename'].'.'.$h.'.jpg';\n\t\t\t\n\t\t# create the new jpeg file!\n\t\tif ( !imagejpeg( $img_dst , $output , $quality ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tImageDestroy( $img_dst );\n\t\tunset( $img_dst );\n\t\t\n\t\t# reset memory limit\n\t\tini_set( 'memory_limit' , $current_memory );\n\t ini_set( 'max_execution_time' , $current_execution_time );\n\t\n\t\tif (is_file($output)) {\n\t\t\t# check that we can modify the incoming file\n\t\t\tif ( !chmod( $output , 0777 ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn $output;\n\t\t\n\t}", "title": "" }, { "docid": "cab6bb930010b1c73094deeb323d1e36", "score": "0.46349716", "text": "function _fillTop()\n {\n return (int) (($this->_top + $this->_bottom - $this->_plotHeight()) / 2);\n }", "title": "" }, { "docid": "d6aab89e28f8957eca022e54ddc5e846", "score": "0.4622147", "text": "function _fillRight()\n {\n return (int) (($this->_left + $this->_right + $this->_plotWidth()) / 2);\n }", "title": "" }, { "docid": "402edcf05238505974e782b2ed34d195", "score": "0.4620762", "text": "public function resize($mW, $mH, $pad = false)\n {\n if ( ! $this->checkImage()) {\n return $this;\n }\n\n // calc new dimensions\n if ($this->width > $mW || $this->height > $mH) {\n if (($this->width / $this->height) > ($mW / $mH)) {\n $tnW = $mW;\n $tnH = $tnW * $this->height / $this->width;\n } else {\n $tnH = $mH;\n $tnW = $tnH * $this->width / $this->height;\n }\n } else {\n $tnW = $this->width;\n $tnH = $this->height;\n }\n // clear temp image\n $this->clearTemp();\n\n // create a temp based on new dimensions\n if ($pad) {\n $tX = $mW;\n $tY = $mH;\n $pX = ($mW - $tnW) / 2;\n $pY = ($mH - $tnH) / 2;\n } else {\n $tX = $tnW;\n $tY = $tnH;\n $pX = 0;\n $pY = 0;\n }\n $this->tempImage = imagecreatetruecolor($tX, $tY);\n\n // check it\n if ( ! is_resource($this->tempImage)) {\n $this->setError('Unable to create temp image sized ' . $tX . ' x ' . $tY);\n\n return $this;\n }\n\n // if padding, fill background\n if ($pad) {\n $col = $this->htmlToRgb($this->backgroundColor);\n $bg = imagecolorallocate($this->tempImage, $col[0], $col[1], $col[2]);\n imagefilledrectangle($this->tempImage, 0, 0, $tX, $tY, $bg);\n }\n\n // copy resized\n imagecopyresampled($this->tempImage, $this->mainImage, $pX, $pY, 0, 0, $tnW, $tnH, $this->width, $this->height);\n\n return $this;\n }", "title": "" }, { "docid": "9ddc62bfa9c53deec3bcf51a3376615c", "score": "0.4617381", "text": "public function setHeight($val);", "title": "" }, { "docid": "f22e5b34e1899bdb7291d3696aecbd95", "score": "0.46063417", "text": "private function clearCovers(&$rowsCovered, &$colsCovered, $w, $h) {\r\n for ($i = 0; $i < $h; $i++)\r\n $rowsCovered[$i] = 0;\r\n for ($j = 0; $j < $w; $j++)\r\n $colsCovered[$j] = 0;\r\n }", "title": "" }, { "docid": "1e1857a9cd3a2a22ca74e6a81e3e4caf", "score": "0.4595259", "text": "function CyGdToSl($y, $handle) {\n return imagesy($handle) - 1 - $y;\n }", "title": "" }, { "docid": "5c2cbefd76104e5c94f8976c771e275a", "score": "0.4592287", "text": "function CheckPageBreak($h)\n {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n {\n //$this->AddPage($this->CurOrientation);\n $this->AddPage('P',array(215,329));\n }\n }", "title": "" }, { "docid": "ce06f76ba7a15ddf15c605ae193d151f", "score": "0.45871165", "text": "function setHeight(int $minheight = 50) { //menjalankan fungsi dengan mngetur Heigh yang bertipe int\r\n echo \"The height is : $minheight <br>\"; //menampilkan hasil output\r\n}", "title": "" }, { "docid": "2d5ae707d828f89499128cf1253afb19", "score": "0.45858565", "text": "public function getHeight();", "title": "" }, { "docid": "2d5ae707d828f89499128cf1253afb19", "score": "0.45858565", "text": "public function getHeight();", "title": "" }, { "docid": "2d5ae707d828f89499128cf1253afb19", "score": "0.45858565", "text": "public function getHeight();", "title": "" }, { "docid": "2d5ae707d828f89499128cf1253afb19", "score": "0.45858565", "text": "public function getHeight();", "title": "" }, { "docid": "2d5ae707d828f89499128cf1253afb19", "score": "0.45858565", "text": "public function getHeight();", "title": "" }, { "docid": "2d5ae707d828f89499128cf1253afb19", "score": "0.45858565", "text": "public function getHeight();", "title": "" }, { "docid": "2d5ae707d828f89499128cf1253afb19", "score": "0.45858565", "text": "public function getHeight();", "title": "" }, { "docid": "5f1f3c03abf303ac584d3560f947ed18", "score": "0.45803916", "text": "public function getWidth(): int;", "title": "" }, { "docid": "f0c218134019e69638189bb9e82e7e01", "score": "0.45738262", "text": "public function setDimensions($boardHeight, $boardWidth);", "title": "" }, { "docid": "c779570259a855a1770b6147dc6cdbca", "score": "0.45728782", "text": "public function getHeight(): int | null;", "title": "" }, { "docid": "b8b2199a4d7c59cca2a5bdd4e8f523ff", "score": "0.45717046", "text": "function CheckPageBreak($h) {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "title": "" }, { "docid": "b8b2199a4d7c59cca2a5bdd4e8f523ff", "score": "0.45717046", "text": "function CheckPageBreak($h) {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "title": "" }, { "docid": "b8b2199a4d7c59cca2a5bdd4e8f523ff", "score": "0.45717046", "text": "function CheckPageBreak($h) {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "title": "" }, { "docid": "084a9fc6b59f7a5b4722891529286306", "score": "0.45708516", "text": "private function dimensionsBack($arrayAreaSelected, $wmax = null, $hmax = null)\r\n\t{\r\n\t\tif ($wmax || $hmax) {\r\n\t\t\t$wmax = $wmax ? $wmax : $arrayAreaSelected['w'];\r\n\t\t\t$hmax = $hmax ? $hmax : $arrayAreaSelected['h'];\r\n\t\t\t$scale = min($this->width / $wmax, $this->height / $hmax);\r\n\r\n\t\t\tif ($scale < 1) {\r\n $scale = max($this->width / $wmax, $this->height / $hmax);\r\n\t\t\t}\r\n $arrayAreaSelected['x'] = $arrayAreaSelected['x'] * $scale;\r\n $arrayAreaSelected['y'] = $arrayAreaSelected['y'] * $scale;\r\n $arrayAreaSelected['w'] = $arrayAreaSelected['w'] * $scale;\r\n $arrayAreaSelected['h'] = $arrayAreaSelected['h'] * $scale;\r\n\t\t}\r\n\t\treturn $arrayAreaSelected;\r\n\t}", "title": "" }, { "docid": "f0e610a7822141fe8c0033d5bcf460c2", "score": "0.45654938", "text": "static function resize_box_fit($x,$y=\\null,$pic=\\null){\n\t\treturn self::resizeBoxFit($x,$y,$pic);\n\t}", "title": "" }, { "docid": "4466352a4000ea9f15a34f399b20021b", "score": "0.45637262", "text": "function checkImage() {\n global $width_original, $height_original;\n if ($width_original > 1024 && $height_original > 768) {\n $width = 1024;\n $height = 768;\n printImage($width, $height);\n } else if ($width_original > 1024 && $height_original <= 768) {\n $width = 1024;\n printImage($width, $height_original);\n } else if ($width_original <= 1024 && $height_original > 768) {\n $height = 768;\n printImage($width_original, $height);\n } else {\n printImage($width_original, $height_original);\n }\n}", "title": "" }, { "docid": "f29c5f831e18a9f667d52e51017cc49a", "score": "0.45617816", "text": "static function resizeBox($x,$y=\\null,$pic=\\null){\n\t\t$pic=self::checkObject($pic);\n\t\treturn self::$pics[$pic]->resizeBox($x,$y);\n\t}", "title": "" }, { "docid": "9ee641e4811a5a28355405a23cb6661c", "score": "0.45584342", "text": "function CheckPageBreak($h){\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n}", "title": "" }, { "docid": "363e122ca25e62a71aa8ed8d8877ce64", "score": "0.4555991", "text": "private function widthLargerThanSource() {\r\n\t\t\t\r\n\t\t\t// Only one function since height can't be bigger than source like width, so it's smaller\r\n\t\t\t// It can't be equal or else it can't be width larger than source.\r\n\t\t\t$ratio = $this->srcHeight / $this->imgHeight;\r\n\t\t\t$width = $ratio * $this->imgWidth;\r\n\t\t\t$margin = (($this->srcWidth / 2) - ($width / 2));\r\n\t\t\t\r\n\t\t\t$this->image[\"width\"] = $width;\r\n\t\t\t$this->image[\"height\"] = $this->srcHeight;\r\n\t\t\t$this->image[\"margin\"] = \"0 0 0 \" . $margin . \"px\";\r\n\t\t\t\r\n\t\t\treturn $this->image;\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "3c48b7bfc36fccfeb4a7ddb9a0296e68", "score": "0.45547795", "text": "public function setOuterSize($width, $height, $unit = NULL) {\n\t\t$this->maxWidth = $width;\n\t\t$this->maxHeight = $height;\n\t\t$this->innerSize = NULL;\n\t\tif (NULL !== $unit) {\n\t\t\t$this->unit = $unit;\n\t\t}\n\t}", "title": "" }, { "docid": "44f159aa20e2bde8ff2ae1ec8e244110", "score": "0.45469284", "text": "function CheckPageBreak($h) {\r\n\t\t\t\tif($this->GetY()+$h>$this->PageBreakTrigger)\r\n\t\t\t\t$this->AddPage($this->CurOrientation); }", "title": "" }, { "docid": "7bf6d3b33549ea9912fdac0d426e14ff", "score": "0.4544623", "text": "public function Contain ($width, $height);", "title": "" }, { "docid": "627958a37971a412637628011313e364", "score": "0.45397738", "text": "public function setSize($widthPX, $heigthPX, $unite = 'px') {\n $this->width = $widthPX . $unite;\n $this->heigth = $heigthPX . $unite;\n }", "title": "" }, { "docid": "58bf9575b4b7763723a8fc395203b955", "score": "0.45347118", "text": "public function Frame ($width, $height);", "title": "" }, { "docid": "d33dfdf3a0bf93a6c025b2426c10296a", "score": "0.45327482", "text": "protected function resizeImageSquareCrop($watermark)\r\n {\r\n $old_x = imagesx($this->src_image);\r\n $old_y = imagesy($this->src_image);\r\n $this->core->logger->debug(\"resizeImageSquare ImgName:\" . $this->imgName . \" Old x:\" . $old_x . \" old y:\" . $old_y . \" NewWidth:\" . $this->newWidth . \" NewHeight:\" . $this->newHeight);\r\n $xFact = $old_x / $this->newWidth;\r\n $yFact = $old_y / $this->newHeight;\r\n $this->core->logger->debug(\"resizeImageSquare Factx:\" . $xFact . \" Facty:\" . $yFact);\r\n // then decide dimension to use for resize image\r\n // we want to get one dimension like set and the other\r\n // one at least as big as we want it to be\r\n $thumb_w = 0;\r\n $thumb_h = 0;\r\n if ($xFact < $yFact) {\r\n $thumb_w = $this->newWidth;\r\n $thumb_h = $old_y * ($this->newHeight / $old_x);\r\n } else if ($yFact < $xFact) {\r\n $thumb_w = $old_x * ($this->newWidth / $old_y);\r\n $thumb_h = $this->newHeight;\r\n }\r\n\r\n if ($old_x == $old_y) {\r\n $thumb_w = $this->newWidth;\r\n $thumb_h = $this->newHeight;\r\n }\r\n $thumb_w = ceil($thumb_w);\r\n $thumb_h = ceil($thumb_h);\r\n $this->core->logger->debug(\"resizeImageSquare thumb_w: \" . $thumb_w . \" thumb_h:\" . $thumb_h);\r\n //echo(\"width used:\".$thumb_w. \" height used:\".$thumb_h.\"<br/>\");\r\n // after getting correct maximum dimension without image distortion,\r\n // create image\r\n $this->dest_image2 = imagecreatetruecolor($thumb_w, $thumb_h);\r\n imagecopyresampled($this->dest_image2, $this->src_image, 0, 0, 0, 0, ceil($thumb_w), ceil($thumb_h), $old_x, $old_y);\r\n //after resize we should cropimage to wanted height and width\r\n $this->dest_image = imagecreatetruecolor(ceil($this->newWidth), ceil($this->newHeight));\r\n\r\n $offX = ceil(($thumb_w - $this->newWidth) / 2);\r\n $offY = ceil(($thumb_h - $this->newHeight) / 2);\r\n imagecopyresampled($this->dest_image, $this->dest_image2, 0, 0, $offX, $offY, $thumb_w, $thumb_h, $thumb_w, $thumb_h);\r\n //add watermark image\r\n if ($watermark) $this->doWatermark();\r\n }", "title": "" }, { "docid": "7c3689904ba136efa2bbcceb96f3f40f", "score": "0.4527729", "text": "function CheckPageBreak($h)\n{\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n}", "title": "" }, { "docid": "7c3689904ba136efa2bbcceb96f3f40f", "score": "0.4527729", "text": "function CheckPageBreak($h)\n{\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n}", "title": "" }, { "docid": "7c3689904ba136efa2bbcceb96f3f40f", "score": "0.4527729", "text": "function CheckPageBreak($h)\n{\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n}", "title": "" }, { "docid": "454429fedab46c433022e5dd0300d211", "score": "0.45274344", "text": "public function height();", "title": "" }, { "docid": "74307a987f0acb21bf701dbab4323b1e", "score": "0.4525547", "text": "function __construct($h, $w)\n\t{\n\t\t$this->height = $h;\n\t\t$this->width = $w;\n\t\t$this->rows = new Vector($this->height); // allocate a vector of rows\n\t\tfor($r = 0; $r < $this->height; $r++) { \n\t\t\t// each row is allocated and filled with nulls\n\t\t\t$row = new Vector($this->width);\n\t\t\tfor($c = 0; $c < $this->width; $c++) {\n\t\t\t\t$row->add(null);\n\t\t\t}\n\t\t\t$this->rows->add($row);\n\t\t}\n\t}", "title": "" }, { "docid": "cc118c1f76bd82b497902e6f8f7030ff", "score": "0.45218912", "text": "public function setImageSize(/*$fullSizeW, $fullSizeH, $thumbSizeW, $thumbSizeH*/) \n {\n $this->_fullSizeW = Yii::app()->params['sizeW'];\n $this->_fullSizeH = Yii::app()->params['sizeH'];\n $this->_thumbSizeW = Yii::app()->params['thumb_sizeW'];\n $this->_thumbSizeH = Yii::app()->params['thumb_sizeH'];\n }", "title": "" }, { "docid": "1e6941322f42a9163ccfb38cb8d4c6dd", "score": "0.4521078", "text": "private function clearPrimes(&$masks, $w, $h) {\r\n for ($i = 0; $i < $h; $i++) {\r\n for ($j = 0; $j < $w; $j++) {\r\n if ($masks[$i][$j] == 2)\r\n $masks[$i][$j] = 0;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "9718a42d12aedeafce33b7a3e791b646", "score": "0.451976", "text": "public function getWidth();", "title": "" } ]
a91a8295df69beb24664c8d9208a3f4c
Returns email and username for user.
[ { "docid": "ddf7c19dfb3a0f36c1ed4851eefb0602", "score": "0.0", "text": "public function getAnswerPointsByUser($id): object\n {\n $params = [$id];\n $this->checkDb();\n return $this->db->connect()\n ->select(\"SUM(points) AS totalPoints\")\n ->where(\"userId = ?\")\n ->from(\"Answer\")\n ->execute($params)\n ->fetchInto($this);\n }", "title": "" } ]
[ { "docid": "abe0874ac35de0fbeb31cdb4d8985b85", "score": "0.7657989", "text": "public function getUsername(): string\n {\n return $this->getEmail();\n }", "title": "" }, { "docid": "56fde19331d8e492a9fc6710d15b8585", "score": "0.7527312", "text": "public function getUsername()\n {\n return $this->getEmail();\n }", "title": "" }, { "docid": "56fde19331d8e492a9fc6710d15b8585", "score": "0.7527312", "text": "public function getUsername()\n {\n return $this->getEmail();\n }", "title": "" }, { "docid": "56fde19331d8e492a9fc6710d15b8585", "score": "0.7527312", "text": "public function getUsername()\n {\n return $this->getEmail();\n }", "title": "" }, { "docid": "c49c7eed393fac6f21ae433902a10070", "score": "0.75218153", "text": "public function getUserEmail() {\n return $this->user[User::USER_EMAIL];\n }", "title": "" }, { "docid": "9a6917ce17e22b0557104737cf44f38f", "score": "0.7498864", "text": "public function getUsername()\n\t{\n\t\treturn $this->usrEmail;\n\t}", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "0dc2d1d147c9e59e923905b8fe30d8f2", "score": "0.7452219", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "b2c11b20c9ff0d60e378270a33dafd5e", "score": "0.74387777", "text": "public function username()\n {\n return filter_var($this->loginCredential, FILTER_VALIDATE_EMAIL) ? 'email': 'username';\n }", "title": "" }, { "docid": "fde48a3e7f8f12f801c202edf9ff111c", "score": "0.74208504", "text": "public function getUsername(): string\n {\n return (string)$this->email;\n }", "title": "" }, { "docid": "fde48a3e7f8f12f801c202edf9ff111c", "score": "0.74208504", "text": "public function getUsername(): string\n {\n return (string)$this->email;\n }", "title": "" }, { "docid": "fde48a3e7f8f12f801c202edf9ff111c", "score": "0.74208504", "text": "public function getUsername(): string\n {\n return (string)$this->email;\n }", "title": "" }, { "docid": "fde48a3e7f8f12f801c202edf9ff111c", "score": "0.74208504", "text": "public function getUsername(): string\n {\n return (string)$this->email;\n }", "title": "" }, { "docid": "fde48a3e7f8f12f801c202edf9ff111c", "score": "0.74208504", "text": "public function getUsername(): string\n {\n return (string)$this->email;\n }", "title": "" }, { "docid": "fde48a3e7f8f12f801c202edf9ff111c", "score": "0.74208504", "text": "public function getUsername(): string\n {\n return (string)$this->email;\n }", "title": "" }, { "docid": "fde48a3e7f8f12f801c202edf9ff111c", "score": "0.74208504", "text": "public function getUsername(): string\n {\n return (string)$this->email;\n }", "title": "" }, { "docid": "bfb946bb5bd78605f10d9b4046773bc7", "score": "0.7413789", "text": "public function getUserEmail() : string {\n\t\treturn $this->userEmail;\n\t}", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "3f0bfbc7992b5946029147f763a3b768", "score": "0.7408313", "text": "public function getUsername(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "0303e94eb3cb41973f4245b9a9810c65", "score": "0.73548675", "text": "public function getUsername(): string {\n $first_name = $this->getFirstName();\n $last_name = $this->getLastName();\n\n // The first and last name specified. Split them by a single space.\n if ($first_name !== '' && $last_name !== '') {\n $first_name .= ' ';\n }\n\n // Use an email as a username if neither first nor last name specified.\n return $first_name . $last_name ?: $this->getEmail();\n }", "title": "" }, { "docid": "fde7ad8192f47178518220b98abfe5e8", "score": "0.7314674", "text": "public function getUserEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "b235dc9e714e72fa7b7dfdc951969da8", "score": "0.7312095", "text": "public function getUsername(): string\r\n {\r\n return (string) $this->email;\r\n }", "title": "" }, { "docid": "9ef6509a1e21c87c5f7944bdd104f265", "score": "0.73078007", "text": "public function getUserByMail(){\n\t\t\t$user = \\Business\\User_V1::loadByEmail($this->emailUser);\n\t\t\tif( $user != NULL )\n\t\t\t\treturn $user->Firstname.' '.$user->Lastname;\n\t\t\t\treturn '';\n\n\t}", "title": "" }, { "docid": "41b2b08155afd14cdab063f0bf27c177", "score": "0.7271141", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "1691d720c0967c340d3e617efe11cbee", "score": "0.7237195", "text": "public function getEmail_user()\r\n {\r\n return $this->email_user;\r\n }", "title": "" }, { "docid": "2236931a21ac9bc5c20368ecdafcdf7c", "score": "0.7225256", "text": "public function getUsername()\n {\n return $this->email;\n }", "title": "" }, { "docid": "d5eff272c23b68d17fc730c5316b5205", "score": "0.71987045", "text": "private function getUserEmail(): string\n {\n return $this->checkoutSession->getQuote()->getCustomerEmail()\n ?: $this->checkoutSession->getQuote()->getBillingAddress()->getEmail();\n }", "title": "" }, { "docid": "c30d98f6069761e0b91121c88a134b4f", "score": "0.7188059", "text": "protected function username()\n {\n return 'email';\n }", "title": "" } ]
b28c1aa40db7a1bba985299c4939b8ad
Retrieve the value for the "ResponseCode" output from this CreateDataset execution.
[ { "docid": "fca0278b0b03dac866990343f7efbd83", "score": "0.7643338", "text": "public function getResponseCode()\n {\n return $this->get('ResponseCode');\n }", "title": "" } ]
[ { "docid": "eb7eae693c064719bdde11ba7811ff24", "score": "0.78831553", "text": "public function getResponseCode()\n {\n return $this->fields[DirectResponseField::RESPONSE_CODE];\n }", "title": "" }, { "docid": "b8aa7a834efdda8d4d3fd1ebcec6b1f3", "score": "0.762154", "text": "public function getResponseCode() {\n return $this->responseCode;\n }", "title": "" }, { "docid": "98468dfd62a7d4923d3559940b1005be", "score": "0.7591229", "text": "function getResponseCode() {\n return $this->responseCode;\n }", "title": "" }, { "docid": "935c6261948c537842bd8ebb1454f1cc", "score": "0.7558771", "text": "public function getResponseCode()\n {\n return $this->responseCode;\n }", "title": "" }, { "docid": "35503c6313a7fad00c19268fd118aa17", "score": "0.75406104", "text": "public function getResponseCode()\n {\n return $this->responseCode;\n }", "title": "" }, { "docid": "32db489e552d601dc062a4cf5fe902e9", "score": "0.74637574", "text": "public function responseCode()\n {\n return $this->responseCode;\n }", "title": "" }, { "docid": "72277fd0c9df9559a003ca117ef9ae58", "score": "0.74464387", "text": "public function response_code() {\r\n return $this->response_code;\r\n }", "title": "" }, { "docid": "88e2e53c3ca0af1d931c5524fa0c017c", "score": "0.7445254", "text": "public function getResponseCode() {\r\n\t\t\treturn $this->_response_code;\r\n\t\t}", "title": "" }, { "docid": "8c8cac6dff04962864124371e356fe9c", "score": "0.7443915", "text": "public function get_response_code()\r\n {\r\n return $this->response_code;\r\n }", "title": "" }, { "docid": "99394994906219f77dc2023dbd9888bc", "score": "0.74388087", "text": "function GetResponseCode() {\n return $this->posnetResponse->errorcode;\n }", "title": "" }, { "docid": "960f6caa78720dc3215c270363b9ef20", "score": "0.7414857", "text": "function responseCode() {\n return $this->responseCode;\n }", "title": "" }, { "docid": "25e467c329b8c30f59e2f646b693d034", "score": "0.73725975", "text": "public function getResponseCode () {\n return $this->_response_code;\n }", "title": "" }, { "docid": "47a881503e48c23ee484034897eff2a3", "score": "0.7371744", "text": "final public function getResponseCode()\n {\n return (int)$this->response_code;\n }", "title": "" }, { "docid": "f0e19590709b06fb3a07bda7ce655f3a", "score": "0.736475", "text": "private static function getResponseCode()\n {\n\n return static::$responsecode;\n\n }", "title": "" }, { "docid": "3620711bd50becf16c7f35ee3cc9a46f", "score": "0.7363047", "text": "public function getResponseCode()\n\t{\n\t\treturn $this->responseCode;\n\t}", "title": "" }, { "docid": "3620711bd50becf16c7f35ee3cc9a46f", "score": "0.7363047", "text": "public function getResponseCode()\n\t{\n\t\treturn $this->responseCode;\n\t}", "title": "" }, { "docid": "0c92cdee6bb73cbd05925d4a9f7d7b7b", "score": "0.7344016", "text": "function getResponseCode() {\r\n return (integer)$this->_response_code;\r\n }", "title": "" }, { "docid": "b5f6e25712c5616d5ef533621f91ea47", "score": "0.733193", "text": "public function getCodeResult()\n {\n return $this->codeResult;\n }", "title": "" }, { "docid": "aca5da4be867ba06cb95cc9e3426a7da", "score": "0.7330569", "text": "public function getResponseCode()\n\t{\n\t\treturn $this->response_code;\n\t}", "title": "" }, { "docid": "07e055437ed404db4aab5195b90f8260", "score": "0.7280684", "text": "public function getResponseCode() {\n return $this->_respCode;\n }", "title": "" }, { "docid": "97e38d7d3621cace00e908def2fd2ef7", "score": "0.724548", "text": "public function getResultCode()\n {\n return $this->result['resultCode'];\n }", "title": "" }, { "docid": "a69f47368b28e8d77c14bb80915e7b4a", "score": "0.72126144", "text": "public function getResultCode()\n {\n return $this->result_code;\n }", "title": "" }, { "docid": "b86b937ff9d8bdd42eefeeca618b4b8a", "score": "0.7145804", "text": "public function getResponseCode()\n {\n return $this->responseCode ?: false;\n }", "title": "" }, { "docid": "9c0bc3cf232457008e4fad5ce4dae9af", "score": "0.7142211", "text": "public final function getResponseCode(): int\n\t{\n\t\treturn $this->responseCode;\n\t}", "title": "" }, { "docid": "977f13f410249d15cfc7fec84d61cc11", "score": "0.7028051", "text": "public function getLastResponseCode()\n {\n return $this->lastResponseCode;\n }", "title": "" }, { "docid": "a61d52e66ea1c6e055ee79f079bea6f9", "score": "0.70157564", "text": "public function getCode(): string\n {\n return (string)$this->data->statusCode;\n }", "title": "" }, { "docid": "c9b6efa61e8ac222cb5016d9abfc650c", "score": "0.6987344", "text": "public function getResponseCode(): string;", "title": "" }, { "docid": "31706466d74b1d526cc59d5521d01f84", "score": "0.69778574", "text": "public function getResponseCode() {\n return $this->getResponseObject()\n ->getStatus();\n }", "title": "" }, { "docid": "312b1c589bc6b4de0111cfccf7498c3a", "score": "0.6974493", "text": "public function responseCode()\n {\n return self::$httpCode;\n }", "title": "" }, { "docid": "6005612c6ff89a130e2ccf95c2efee73", "score": "0.6940183", "text": "public function getResponseCode()\n {\n return (int) $this->headers['code'];\n }", "title": "" }, { "docid": "34c63d4cda22834042506c6135d9ab70", "score": "0.6933696", "text": "public function getHeaderResponseCode() \n {\n return $this->_headerResponseCode;\n }", "title": "" }, { "docid": "d137d0fa4fa41c55fb15aefca13af315", "score": "0.68852544", "text": "public function getCode() {\n return $this->err_code;\n }", "title": "" }, { "docid": "be88463c5f4250d3664a3aa7e5bb5130", "score": "0.6875958", "text": "public function getResponseCode();", "title": "" }, { "docid": "5c7feeb7560b2da5cf2e70b279e3dfb9", "score": "0.68629366", "text": "public function get_response_code()\n {\n return $this->_server_response_code;\n }", "title": "" }, { "docid": "5c7feeb7560b2da5cf2e70b279e3dfb9", "score": "0.68629366", "text": "public function get_response_code()\n {\n return $this->_server_response_code;\n }", "title": "" }, { "docid": "830d94ae7bd4f40876d0f826d429e455", "score": "0.6861362", "text": "public function getResponseStatusCode()\n {\n return $this->responseCode;\n }", "title": "" }, { "docid": "9caf05e4f06c40bccec3c618e9e0fe73", "score": "0.68580514", "text": "public function getResponseCode(): int;", "title": "" }, { "docid": "c076a6d28ada3862f6c9b558d830feb6", "score": "0.6762071", "text": "public function getCode()\n {\n return (int) $this->data->error;\n }", "title": "" }, { "docid": "dc223209b4bf59b4c5fbe824e81e46f5", "score": "0.67599493", "text": "public function getCode()\n {\n return $this->errorCode;\n }", "title": "" }, { "docid": "67b5cac3c29ce2d5bb291064013c3c44", "score": "0.67281735", "text": "public function code() {\n return $this->info('http_code');\n }", "title": "" }, { "docid": "200c3f647af5c5bd0ee26b651e498caf", "score": "0.67072105", "text": "public function getStatusCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "72d81ddf81f5976336236f80d8cdd5ac", "score": "0.66538537", "text": "public function getCode() : int {\n\t\tif (!is_null($this->code_custom)) {\n\t\t\treturn $this->code_custom;\n\t\t}\n\t\tif ($this->getResult() === true) {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "547f32bba3abba37ced594a47757261d", "score": "0.66489244", "text": "public function getStatusCode ()\n {\n return $this->code;\n }", "title": "" }, { "docid": "f8c63326b7bf77dbb9e309352c65e36b", "score": "0.6628388", "text": "public function getCode()\n {\n return (int) $this->code;\n }", "title": "" }, { "docid": "7c08a1ba4bb51e4db9c86e3deb31801a", "score": "0.6628271", "text": "public function result(){\r\n\t\t\tif(!$this->request->successful()){\r\n\t\t\t\treturn 'request_failed';\r\n\t\t\t}\r\n\r\n\t\t\t// Response code\r\n\t\t\t$response = $this->raw();\r\n\r\n\t\t\treturn array_key_exists($response, $this->request->responseCodes)\r\n\t\t\t\t?$this->request->responseCodes[$response] :$response;\r\n\t\t}", "title": "" }, { "docid": "b046938436cf9ae5b41503fb96f269cb", "score": "0.6618293", "text": "public function getStatusCode()\n {\n return $this->getCode();\n }", "title": "" }, { "docid": "c7547c8037a8ef9a4eb44ddd99721a2b", "score": "0.6616634", "text": "public function getStatusCode() \n {\n return $this->_fields['StatusCode']['FieldValue'];\n }", "title": "" }, { "docid": "291ad82c9dba27435c0d4992c4dd1fd9", "score": "0.65977097", "text": "public function getReturnCode() {\n return $this->returnCode;\n }", "title": "" }, { "docid": "bccfc34e201bf6ea2bd215f59c9c27d5", "score": "0.65861636", "text": "public function getCodeFromRequest(){\r\n $this->code = $_GET[self::RESPONSE_TYPE_PARAM];\r\n return $this->code;\r\n }", "title": "" }, { "docid": "11cd1b0424d5d0b232cfe7d49377db9c", "score": "0.6583223", "text": "public function getStatusCode()\n {\n return $this->_code;\n }", "title": "" }, { "docid": "0b122a100c67caf16e4a2ffa67c7aa01", "score": "0.65786445", "text": "public function getCode()\n {\n if (isset($this->values['code'])) {\n return $this->values['code'];\n }\n }", "title": "" }, { "docid": "82ce0bd16ca832ab8c3959f8a867e79e", "score": "0.6568505", "text": "public function getReturnCode()\n {\n return $this->returnCode;\n }", "title": "" }, { "docid": "1747eacbdf19ef5e7f924710322c6883", "score": "0.65549356", "text": "public function responseCodeAsText()\n {\n require_once 'Zend/Http/Response.php';\n return Zend_Http_Response::responseCodeAsText($this->code);\n }", "title": "" }, { "docid": "447ae9f13d96cdbfe3e8f0c41dcc400b", "score": "0.65531355", "text": "public function getHttpResponseCode()\n {\n return $this->httpResponseCode;\n }", "title": "" }, { "docid": "a4c5c66422e2f5c250f566119c52d676", "score": "0.6528201", "text": "public function getCode(): int\n {\n return $this->code;\n }", "title": "" }, { "docid": "a4c5c66422e2f5c250f566119c52d676", "score": "0.6528201", "text": "public function getCode(): int\n {\n return $this->code;\n }", "title": "" }, { "docid": "bb95d0f909be534f75597994dcbab769", "score": "0.6525597", "text": "public function getReturnCode()\n {\n return $this->return_code;\n }", "title": "" }, { "docid": "ca67d9e9cc3aeb20545f2650ff19e2cc", "score": "0.65228456", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "ca67d9e9cc3aeb20545f2650ff19e2cc", "score": "0.65228456", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "ca67d9e9cc3aeb20545f2650ff19e2cc", "score": "0.65228456", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "ca67d9e9cc3aeb20545f2650ff19e2cc", "score": "0.65228456", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "ca67d9e9cc3aeb20545f2650ff19e2cc", "score": "0.65228456", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "ca67d9e9cc3aeb20545f2650ff19e2cc", "score": "0.65228456", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "14b4f91fb0ddf38615058f47f131bc00", "score": "0.6509593", "text": "public function getStatusCode(): int\n {\n return $this->responseCode;\n }", "title": "" }, { "docid": "faf23ad5b2ef6e6c4a718436907760b6", "score": "0.6507631", "text": "public function getStatusCode()\n {\n return $this->status['code'];\n }", "title": "" }, { "docid": "a9a249c3537f7f31c5f721ed98f2c8ad", "score": "0.6497764", "text": "public function get_http_response_code() {\n\t\treturn $this->http_response_code;\n\t}", "title": "" }, { "docid": "ff2a2e4b43c3a854836a83f566053649", "score": "0.6497336", "text": "public function get_csc_result() {\n\n\t\treturn ( ! empty( $this->response->transaction->cvvResponseCode ) ) ? $this->response->transaction->cvvResponseCode : null;\n\t}", "title": "" }, { "docid": "798eaed355c2c79cc26c1801b3c19e0e", "score": "0.6496016", "text": "public function getResponseCode() {\n return nullInt($this->settings['status'], 200);\n }", "title": "" }, { "docid": "798eaed355c2c79cc26c1801b3c19e0e", "score": "0.6496016", "text": "public function getResponseCode() {\n return nullInt($this->settings['status'], 200);\n }", "title": "" }, { "docid": "798eaed355c2c79cc26c1801b3c19e0e", "score": "0.6496016", "text": "public function getResponseCode() {\n return nullInt($this->settings['status'], 200);\n }", "title": "" }, { "docid": "798eaed355c2c79cc26c1801b3c19e0e", "score": "0.6496016", "text": "public function getResponseCode() {\n return nullInt($this->settings['status'], 200);\n }", "title": "" }, { "docid": "236bdfa532ac38158ba58fcd79ee1e0e", "score": "0.6494888", "text": "public function getResponseStatusCode()\n {\n return $this->get(self::RESPONSE_STATUS_CODE);\n }", "title": "" }, { "docid": "f9d14a43ea5b510cc4f74aa2bf5f873e", "score": "0.64736235", "text": "public function getCode()\r\n {\r\n return $this->code;\r\n }", "title": "" }, { "docid": "e94e290daa024451228d9c6e01e14dcf", "score": "0.64692754", "text": "public function getErrorCode() {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.64676327", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" } ]
114fe89543527527f92794a4091dfd68
Overrides getExternalUrl(). Return the HTML URI of a private file.
[ { "docid": "59e35958c5586bd152eb116d8f77d810", "score": "0.6719796", "text": "function getExternalUrl() {\n $path = str_replace('\\\\', '/', $this->getTarget());\n return url('shoov/images/' . $path, array('absolute' => TRUE));\n }", "title": "" } ]
[ { "docid": "ba4a8343e40053f4041b635b8aaccc5b", "score": "0.68544704", "text": "function getExternalUrl() {\n $path = str_replace('\\\\', '/', $this->getTarget());\n $path = substr($path, 0, -5);\n return url('system/docs/' . $path, array('absolute' => TRUE));\n }", "title": "" }, { "docid": "252a207ce3f2d90b936b3dd40dfbb7f3", "score": "0.6623762", "text": "public function getExternalUrl()\n {\n if (array_key_exists(\"externalUrl\", $this->_propDict)) {\n return $this->_propDict[\"externalUrl\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "b3962c6a4e9f03688fd916925efc873c", "score": "0.6514925", "text": "public function getExternalLink(){\n if($this->story_type == 'external' || $this->story_type == 'article'){\n $imgType = $this->grabStoryImageByType('small');\n\n return $imgType->link;\n }\n\n return;\n }", "title": "" }, { "docid": "fa63b7bf203dbe59c893c79ab9d7645f", "score": "0.64378506", "text": "public function url(): string\n {\n if ($this->permissions()) return (new URL('/permissioned_files/filestore:' . $this->uuid()))->__toString();\n else return parent::url();\n }", "title": "" }, { "docid": "c870b82579c393f70a9742ba0480440d", "score": "0.6400668", "text": "public function getUrl () {\n\t\treturn $this->fileUrl;\n\t}", "title": "" }, { "docid": "adcc62b64d08410ddb3463bb301976b3", "score": "0.63182664", "text": "public function asUrl()\n {\n return $this->getFileUrl();\n }", "title": "" }, { "docid": "fabfec46ab3544f9d5bf58fee53d96d1", "score": "0.62066925", "text": "public function getPublicUrl()\n {\n $path = '';\n return $path;\n }", "title": "" }, { "docid": "2a3a97f881b27036c1b2698dbc3a22e9", "score": "0.61595917", "text": "public function getURL()\n {\n return $this->File()->URL;\n }", "title": "" }, { "docid": "506458159600285c4643c4f752056068", "score": "0.6124563", "text": "public function getPublicURL()\n {\n return $this->publicURL;\n }", "title": "" }, { "docid": "a79321a1a97b881e0cc6a8bf3ed1c60d", "score": "0.6079669", "text": "public function getUrlAttribute()\n {\n $path = $this->dir . '/' . $this->file_name . '.' . $this->extension;\n if (Storage::exists('public' . $path)) {\n return Storage::url($path);\n }\n\n return Storage::url($this->dir . '/' . $this->file_name);\n }", "title": "" }, { "docid": "c6bf0186e3c108ba91cca2976e93fd76", "score": "0.606063", "text": "public function getFileUrl() {\n\t\t$fileStorageBucket = $this->getFileStorageBucket();\n\t\t$fileFullName = $this->getFileFullName();\n\t\t$defaultFileUrl = $this->getDefaultFileUrl();\n\t\tif (!empty($defaultFileUrl)) {\n\t\t\tif (!$fileStorageBucket->fileExists($fileFullName)) {\n\t\t\t\treturn $defaultFileUrl;\n\t\t\t}\n\t\t}\n\t\treturn $fileStorageBucket->getFileUrl($fileFullName);\n\t}", "title": "" }, { "docid": "76759e6fbffa3852cf71c4fa9c303750", "score": "0.6017888", "text": "public function getDirectUrl();", "title": "" }, { "docid": "3a6427afd52c04b90f08d9ad8165720b", "score": "0.5973146", "text": "public function getUrl () {\n return Constants::CIENTE_STORAGE_WEB_PATH . $this->getAtendimento() -> getId() . '/' . $this->getRealFilename();\n }", "title": "" }, { "docid": "9d9584e963cc5f15bebd2986a923fb19", "score": "0.5919299", "text": "function renderExternalLink();", "title": "" }, { "docid": "13a3e9a28823dc58922603b05c246ba9", "score": "0.58986825", "text": "public function getURL() {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "bfd8e7c771a58d886c6f58cfc5569847", "score": "0.5894878", "text": "public function get_existing_file_url() {\n $file = $this->retrieve_file();\n\n $url = \\moodle_url::make_pluginfile_url(\n $file->get_contextid(),\n $file->get_component(),\n $file->get_filearea(),\n null,\n $file->get_filepath(),\n $file->get_filename());\n\n return $url;\n }", "title": "" }, { "docid": "390a4707477bd8a30e8604297e9a1f64", "score": "0.5893598", "text": "public function getUrl()\n {\n return trailingslashit($this->rootUrl) . ltrim($this->applyMixManifest($this->src), '/\\\\');\n }", "title": "" }, { "docid": "15da8b919d594cf3a4e8b765e8ee744e", "score": "0.58824486", "text": "public function getUrl($system = false)\n {\n return $this->getUrlOf($this->filename,$system);\n }", "title": "" }, { "docid": "864bcc27086b88b9fb697c7faf94b348", "score": "0.587624", "text": "protected function getFileUrl($fileName) {\r\n return $this->getPublicPath().$fileName;\r\n }", "title": "" }, { "docid": "15bf333d9875931b8023838113a65557", "score": "0.5865046", "text": "public function getImageurl() {\n\treturn '/'.Yii::$app->params['creditPath'] . $this->file;\n }", "title": "" }, { "docid": "979aa0134a28295fb8850fc34df2a3b4", "score": "0.5863995", "text": "public function getPublicUrl(File $file, $relativeToCurrentScript = false);", "title": "" }, { "docid": "f9c05b3c305f7f6e2f7305d7b74e9499", "score": "0.58629525", "text": "public function url()\n {\n return Storage::disk('uploads')->url($this->owner_type::FILES_PATH . $this->owner->id . '/' . $this->name);\n }", "title": "" }, { "docid": "4d98a1a897d391f939382b408e43c4e2", "score": "0.5856589", "text": "public function getDirectPublicUrlForFile(FileInterface $file): string\n {\n $credentials = new Credentials();\n $enableAcReadableLinks = isset($GLOBALS[\"TSFE\"]->tmpl->setup[\"config.\"][\"enableAcReadableLinks\"])?$GLOBALS[\"TSFE\"]->tmpl->setup[\"config.\"][\"enableAcReadableLinks\"]:false;\n if($enableAcReadableLinks && !($GLOBALS['admiralcloud']['fe_group'][$file->getIdentifier()] ||PermissionUtility::getPageFeGroup())){\n \n return ConfigurationUtility::getLocalFileUrl() .\n $file->getTxAdmiralCloudConnectorLinkhash() . '/' .\n $file->getIdentifier() . '/' .\n $file->getName();\n } else {\n if($GLOBALS['admiralcloud']['fe_group'][$file->getIdentifier()] ||PermissionUtility::getPageFeGroup()){\n if($token = $this->getSecuredToken($file,$this->getMediaType($file->getProperty('type')),'player')){\n $auth = '?auth=' . base64_encode($credentials->getClientId() . ':' . $token['token']);\n return ConfigurationUtility::getDirectFileUrl() . $token['hash'] . $auth;\n }\n }\n return ConfigurationUtility::getDirectFileUrl()\n . $file->getTxAdmiralCloudConnectorLinkhash();\n }\n }", "title": "" }, { "docid": "f8abadc06c63fadeb9ee69827b036b54", "score": "0.5855437", "text": "function externalLink()\r\n {\r\n return htmlspecialchars( $this->ExternalLink );\r\n }", "title": "" }, { "docid": "bd4c20d5aabca61cc97e780e14ae9f0f", "score": "0.5836224", "text": "public function getInternalUrl()\n {\n if (array_key_exists(\"internalUrl\", $this->_propDict)) {\n return $this->_propDict[\"internalUrl\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "9cf6d4edbacffdf2051a88cf98fc2e5a", "score": "0.5823646", "text": "public function getPublicUrl(string $cut = null): ?string\n {\n if ($this->visibility == 'private') {\n return null;\n }\n\n $disk = Storage::disk($this->getDisk());\n\n if ($this->getCategory() == 'image') {\n return $disk->url($this->getRelativePath($cut));\n }\n\n return $disk->url($this->getRelativePath());\n }", "title": "" }, { "docid": "75b00dbddef83b0d8a53ff096d18db17", "score": "0.5811891", "text": "public function getUrl() : string\n {\n return config('laravel-medialibrary.s3.domain').'/'.$this->getPathRelativeToRoot();\n // if (!getUrl()) {\n // \t# code...\n // \treturn invaldiUrl();\n // }\n }", "title": "" }, { "docid": "c59e8a61d047149e2b8b1a72c0895176", "score": "0.5810527", "text": "public function getDocumentPublicUrl(FileInterface $file): string\n {\n return $this->getDirectPublicUrlForFile($file);\n }", "title": "" }, { "docid": "0e607b700af8580abb125b5e07a7a61f", "score": "0.5766965", "text": "public function getUrlFile()\n {\n return $this->urlFile;\n }", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.57576793", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.57576793", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.57576793", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.57576793", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.57576793", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.57576793", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.57576793", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.57576793", "text": "public function getUrl();", "title": "" }, { "docid": "2d97b75fb4739b35813c5431ec5dd383", "score": "0.57576793", "text": "public function getUrl();", "title": "" }, { "docid": "846d6cc2f0bf3cef50ceb8472e038dce", "score": "0.57530963", "text": "abstract protected function getUrl();", "title": "" }, { "docid": "d43728789fce6eaa2efd517c62713c15", "score": "0.57348233", "text": "function external_url($path = '')\n {\n \t$url = url();\n return str_replace(\"/public\", \"\", $url).DIRECTORY_SEPARATOR.$path;\n }", "title": "" }, { "docid": "39ef7572a5c55fb9c56c662f0dced8d2", "score": "0.5732898", "text": "public function getUrl(): string\n {\n return asset('storage/pdf/' . $this->name);\n }", "title": "" }, { "docid": "74ec5883058eaaf17c516fc44cea3c9b", "score": "0.5701039", "text": "public function getURL()\n\t\t{\n\t\t\treturn NULL;\n\t\t}", "title": "" }, { "docid": "ff88b96f06ad7bd50c2ed68af0026262", "score": "0.56758225", "text": "public function getURL()\n {\n /** @var Concrete\\Core\\File\\Version $instance */\n return $instance->getURL();\n }", "title": "" }, { "docid": "773222e2c7b999ca40b054f1bec01a8e", "score": "0.5667852", "text": "public function getUrl()\n {\n return $this->getField('url');\n }", "title": "" }, { "docid": "eae6e312d35025985bf2ac38d9c00233", "score": "0.56612325", "text": "public function getImageURL()\n {\n $url = $this->getUploadDir().\"/\".$this->getRelativePath();\n return str_replace(DS, \"/\", $url);\n }", "title": "" }, { "docid": "f844d41cd7bbf5c975b4f076846bdc29", "score": "0.5652339", "text": "public function validateExternalPictureUrl()\n {\n }", "title": "" }, { "docid": "a3066c5f653e51a9476c9bdc1e35189a", "score": "0.5643925", "text": "public function getURL()\n {\n return $this->scan->getURL();\n }", "title": "" }, { "docid": "85d6b49f578e2e6a454c1416823c2e66", "score": "0.5625819", "text": "public function getImagePublicUrl(FileInterface $file, int $width = 0, int $height = 0,string $fe_group = ''): string\n {\n $credentials = new Credentials();\n if ($file instanceof FileReference) {\n // Save crop information from FileReference and set it in the File object\n $crop = $file->getProperty('tx_admiralcloudconnector_crop');\n $file = $file->getOriginalFile();\n $file->setTxAdmiralCloudConnectorCrop($crop);\n }\n\n // Get width and height with the correct ratio\n $dimensions = ImageUtility::calculateDimensions(\n $file,\n $width,\n $height,\n (!$width) ? ConfigurationUtility::getDefaultImageWidth() : null\n );\n\n // Determine, if current file is of AdmiralCloud svg mime type\n $isSvgMimeType = ConfigurationUtility::isSvgMimeType($file->getMimeType());\n\n $fe_group = PermissionUtility::getPageFeGroup();\n if($file->getProperty('tablenames') == 'tt_content' && $file->getProperty('uid_foreign') && !$fe_group){\n $fe_group = PermissionUtility::getContentFeGroupFromReference($file->getProperty('uid_foreign'));\n } else if($file->getContentFeGroup()){\n $fe_group = $file->getContentFeGroup();\n }\n\n $token = '';\n $auth = '';\n if($fe_group){\n $token = $this->getSecuredToken($file,'image','embedlink');\n if($token){\n $auth = 'auth=' . base64_encode($credentials->getClientId() . ':' . $token['token']);\n }\n }\n\n // Get image public url\n if (!$isSvgMimeType && $file->getTxAdmiralCloudConnectorCrop()) {\n // With crop information\n $cropData = json_decode($file->getTxAdmiralCloudConnectorCrop()) or $cropData = json_decode('{\"usePNG\": \"false\"}');\n $link = ConfigurationUtility::getSmartcropUrl() .'v3/deliverEmbed/'\n . ($token ? $token['hash']:$file->getTxAdmiralCloudConnectorLinkhash())\n . '/image'.(property_exists($cropData, 'usePNG') && $cropData->usePNG == \"true\" ? '_png' : '').'/cropperjsfocus/'\n . $dimensions->width\n . '/'\n . $dimensions->height\n . '/'\n . $file->getTxAdmiralCloudConnectorCropUrlPath()\n . '?poc=true' . (!ConfigurationUtility::isProduction()?'&env=dev':'')\n . ($token ? '&' . $auth:'') ;\n } else {\n if ($isSvgMimeType) {\n $link = ConfigurationUtility::getImageUrl() . ($token ? 'v5/deliverFile/':'v3/deliverEmbed/')\n . ($token ? $token['hash']:$file->getTxAdmiralCloudConnectorLinkhash())\n . ($token ?'/': '/image/')\n . ($token ? '?' . $auth:'') ;\n } else {\n // Without crop information\n $link = ConfigurationUtility::getSmartcropUrl() . 'v3/deliverEmbed/'\n . ($token ? $token['hash']:$file->getTxAdmiralCloudConnectorLinkhash())\n . '/image/autocrop/'\n . $dimensions->width\n . '/'\n . $dimensions->height\n . '/1?poc=true'\n . ($token ? '&' . $auth:'') ;\n }\n }\n\n return $link;\n }", "title": "" }, { "docid": "5305d7a22451ab2ff85cf2f0d5168fcc", "score": "0.5621867", "text": "public function getUrl(): string;", "title": "" }, { "docid": "5305d7a22451ab2ff85cf2f0d5168fcc", "score": "0.5621867", "text": "public function getUrl(): string;", "title": "" }, { "docid": "5305d7a22451ab2ff85cf2f0d5168fcc", "score": "0.5621867", "text": "public function getUrl(): string;", "title": "" }, { "docid": "1c170ebc9ed5b2a2153cf253d688f895", "score": "0.5610851", "text": "public function getUrl() {\n return $this->getValue(self::FIELD_URL);\n }", "title": "" }, { "docid": "5cc0cf03700d1516f2ea29f201890d7c", "score": "0.5608094", "text": "public function getUrl()\n {\n return sfConfig::get('app_thumbnails_web_dir')\n . '/' \n . sfConfig::get('app_thumbnails_converted_dir_name') \n . '/' \n . $this->getPath() \n . '/'\n . $this->getUuid()\n// . '.'\n// . $this->getMimeExtension()\n ;\n }", "title": "" }, { "docid": "7f6a8633c97af5a3e041a0183d9ad045", "score": "0.5606568", "text": "public function publicUrl($size = null) {\n $publicUrl = asset($this->publicFilename());\n\n if ($size) {\n return str_replace('.'.$this->extension, '_'.$size.'x'.$size.'.'.$this->extension, $publicUrl);\n } else {\n return $publicUrl;\n }\n }", "title": "" }, { "docid": "1cd8564869b638fef841698ef75b8e77", "score": "0.5601438", "text": "public function getUrl() {\n return \\wp_get_attachment_url($this->WP_Post->ID);\n }", "title": "" }, { "docid": "9f7fad82a3a34c7bb547f5a42c438bf1", "score": "0.5601379", "text": "public function getPublicUrl(): ?string\n {\n return $this->publicUrl;\n }", "title": "" }, { "docid": "52616e502c524b1bd340bea6154797dc", "score": "0.5589992", "text": "public function setExternalUrl($val)\n {\n $this->_propDict[\"externalUrl\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "26d4195136757803be912ca9ae36537f", "score": "0.55864024", "text": "public function getUrl()\n {\n return $this->getHost().$this->getResource();\n }", "title": "" }, { "docid": "8e569c2ad91afc0bdecd996bfd0ef451", "score": "0.55830204", "text": "public function getUrl(): string ;", "title": "" }, { "docid": "4b016c1eb66254616c30198ecf913e32", "score": "0.5580534", "text": "public function getURL():string\n {\n return $this->URL;\n }", "title": "" }, { "docid": "65292f5e2511e4ed18def6d58cd4e0cb", "score": "0.5575863", "text": "public function getUrl()\r\n {\r\n return $this->buildUrl($this->url);\r\n }", "title": "" }, { "docid": "c134f9c401ee64898106dfe3a7700ef5", "score": "0.556558", "text": "public function getUrl()\n\t{\n\t\treturn App::get('request')->root(true) . 'files/' . $this->getIdentifier();\n\t}", "title": "" }, { "docid": "a27c0dcee51eab6d305368ae5c5e261d", "score": "0.55640656", "text": "public function getUrl()\n {\n $path = ltrim($this->path, '/');\n\n return Storage::disk(config('asgard.media.config.filesystem'))->url($path);\n }", "title": "" }, { "docid": "7315105ef7b0526c60577ad0fc9c4e61", "score": "0.5563339", "text": "public function get_url()\n\t{\n\t\treturn '';\n\t}", "title": "" }, { "docid": "38df4601a0052264055b1006906d9eed", "score": "0.5559017", "text": "public function url_link()\n\t{\n\t\t$link = $this->link;\n\t\tif(starts_with($link, 'http'))\n\t\t\treturn $link;\n\t\telse\n\t\t\treturn route('index', array()) . '/uploads/'. rawurlencode($link);\n\t}", "title": "" }, { "docid": "9de67de121792a085b17090f186eafa6", "score": "0.55472064", "text": "public function getPrivateCheckoutUrl()\n {\n return $this->config->getCheckoutUrl() . '?customerType=' . CustomerType::PRIVATE_CUSTOMERS;\n }", "title": "" }, { "docid": "7378f37a2e01360fe03ba244fb1ad006", "score": "0.5545908", "text": "public function getEmbedUrl();", "title": "" }, { "docid": "7378f37a2e01360fe03ba244fb1ad006", "score": "0.5545908", "text": "public function getEmbedUrl();", "title": "" }, { "docid": "24ce3a24081281bf7579854fd618c062", "score": "0.5524824", "text": "public function getUrl(): string\n {\n return $this->url;\n }", "title": "" }, { "docid": "24ce3a24081281bf7579854fd618c062", "score": "0.5524824", "text": "public function getUrl(): string\n {\n return $this->url;\n }", "title": "" }, { "docid": "24ce3a24081281bf7579854fd618c062", "score": "0.5524824", "text": "public function getUrl(): string\n {\n return $this->url;\n }", "title": "" }, { "docid": "24ce3a24081281bf7579854fd618c062", "score": "0.5524824", "text": "public function getUrl(): string\n {\n return $this->url;\n }", "title": "" }, { "docid": "24ce3a24081281bf7579854fd618c062", "score": "0.5524824", "text": "public function getUrl(): string\n {\n return $this->url;\n }", "title": "" }, { "docid": "24ce3a24081281bf7579854fd618c062", "score": "0.5524824", "text": "public function getUrl(): string\n {\n return $this->url;\n }", "title": "" }, { "docid": "24ce3a24081281bf7579854fd618c062", "score": "0.5524824", "text": "public function getUrl(): string\n {\n return $this->url;\n }", "title": "" }, { "docid": "97882bb007238934200b69ee981f2da0", "score": "0.552427", "text": "public function getPageURL()\n {\n return Director::absoluteBaseURL().substr($this->owner->Link(), 1);\n }", "title": "" }, { "docid": "7c0494564d27dfee1109300ddef864cd", "score": "0.5519162", "text": "final public function getUrl()\n {\n return $this->url;\n }", "title": "" }, { "docid": "aa5bc53fa8470dd66686bca6b1ae45d6", "score": "0.55137295", "text": "public function getSourceUrl()\n {\n return $this->getAvatarUrl();\n }", "title": "" }, { "docid": "f0d76a1ca7b2c4656cccef292077aa94", "score": "0.5509445", "text": "public function getPicUrl() {\n return $this->get(self::PIC_URL);\n }", "title": "" }, { "docid": "5fdde1576aa16829a87bb1d70e3ae74c", "score": "0.5506508", "text": "public function getUrlOf($filename,$system = false)\n {\n $dir = $system ? self::SYS_IMG_DIR : self::UPLOAD_DIR;\n return Yii::app()->request->baseUrl.'/'.$dir.'/'.$filename;\n }", "title": "" }, { "docid": "f944004153f41d856a293a09479b1334", "score": "0.54975224", "text": "public function filePublicPath();", "title": "" }, { "docid": "b536c3d2bee62943a413a5501c80bf5f", "score": "0.54921037", "text": "public function getUrl(): string\n {\n /** @var IconComponent $icon */\n $icon = app('icon');\n return $icon->getIconUrl($this->path);\n }", "title": "" }, { "docid": "c2408d4fcbce87edebbf701fc56c7f45", "score": "0.5489914", "text": "public function getUrl()\n\t\t{\n\t\t return $this->url;\n\t\t}", "title": "" }, { "docid": "570d05710a8da60fa0822fd3610a34b5", "score": "0.54812694", "text": "public function getURL(): URL\n {\n return $this->url;\n }", "title": "" }, { "docid": "9d6321af576ce800190c06b69cbc6ba5", "score": "0.54775786", "text": "public function getURL() { return $this->_url; }", "title": "" }, { "docid": "db3b6778d710ec912ffad4404a76ec16", "score": "0.545894", "text": "public static function GetURL($fileId)\n {\n $image = UploadedFiles::find($fileId);\n return isset($image) ? url($image->url) : asset('default-photo-profile.svg');\n }", "title": "" }, { "docid": "47f6b756e744545f0b59e50bd2e9b962", "score": "0.54565", "text": "public function getUrl() : string;", "title": "" }, { "docid": "0f59b326e02e2d216b1c4870d0c12588", "score": "0.5454697", "text": "public function getSrcAttribute() {\n\t\tif ($this->public) {\n\t\t\treturn Storage::disk($this->disk)->url($this->url);\n\t\t}\n\t}", "title": "" }, { "docid": "a49e198ed21f93975a97ac4a60dbfdc5", "score": "0.54455787", "text": "public function getPictureUrl()\n {\n if (($login = $this->getLogin()) !== null)\n return 'https://cdn.local.epitech.eu/userprofil/profilview/'.$login.'.jpg';\n return null;\n }", "title": "" }, { "docid": "5f0eede4dd7c6aeaf2f4cb13b13c2790", "score": "0.544426", "text": "function getDownloadLink();", "title": "" }, { "docid": "c7c03dc223dfe0b1c4cb5f7dd5fb7b46", "score": "0.5441739", "text": "abstract function getUrl();", "title": "" }, { "docid": "e333f2b1c135ef2b2a991d6fec47af2b", "score": "0.5440997", "text": "public function getFileUrl($thumbnail = false)\n\t{\n\t\treturn Site::uploadedFile($this->getFilePath($thumbnail));\n\t}", "title": "" }, { "docid": "0cc3ce70dc65d7e5dbce310c40adf47c", "score": "0.54381675", "text": "abstract public function getUserURL();", "title": "" }, { "docid": "0e3d04d8eea3b9deb5850d5b0e86c368", "score": "0.5438054", "text": "public function getURL()\n\t{\n\t\treturn $this->url;\n\t}", "title": "" }, { "docid": "c9b61989f00f2ef7f1120f846bcd0d14", "score": "0.5435967", "text": "public function getUrl()\n\t{\n\t\treturn $this->sUrl;\n\t}", "title": "" }, { "docid": "c575a57af848e40d053d471ae7463698", "score": "0.54336286", "text": "public function getUrl()\n {\n return Url::to($this->getUrlSource(), true);\n }", "title": "" }, { "docid": "64423b2a386eea1050874209a9073d36", "score": "0.5433115", "text": "public function url()\n {\n if (!$filesystem = $this->filesystem()) {\n return null;\n }\n\n $url = $filesystem->url($this->path());\n\n if (Str::startsWith($url, ['http'])) {\n $url = str_replace(' ', '+', $url);\n }\n\n return str_replace('\\\\', '/', $url);\n }", "title": "" }, { "docid": "5378e2d69fcdda29f9d87e6101a938b9", "score": "0.5429448", "text": "protected function _getUrl()\n {\n $url = parent::_getUrl();\n\n $config = $this->getFieldConfig();\n /* @var $config Varien_Simplexml_Element */\n if (!empty($config->base_url)) {\n $el = $config->descend('base_url');\n $urlType = empty($el['type']) ? 'link' : (string)$el['type'];\n $url = Mage::getBaseUrl($urlType) . (string)$config->base_url . '/' . $url;\n }\n\n return $url;\n }", "title": "" }, { "docid": "cf4221514d922fcac85d3abe53b55c2a", "score": "0.5427014", "text": "protected function getPlayerPublicUrlForFile(FileInterface $file,string $fe_group): string\n {\n if($fe_group){\n if($token = $this->getSecuredToken($file,$this->getMediaType($file->getProperty('type')),'player')){\n return ConfigurationUtility::getPlayerFileUrl() . $token['hash'] . '&token=' . $token['token'];\n }\n }\n return ConfigurationUtility::getPlayerFileUrl() . $file->getTxAdmiralCloudConnectorLinkhash();\n }", "title": "" }, { "docid": "ad15df7bccff5c7e204140c9bd23d3a8", "score": "0.54252315", "text": "abstract public function getThumbnailURL();", "title": "" } ]
93a1e9f7d0f62a8c07ad3729d2c6d771
Sequentially renumber external feeds in their sequence order.
[ { "docid": "31706e7c4f1618a97a7c4b578c923e30", "score": "0.6617758", "text": "function resequenceExternalFeeds($journalId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT feed_id FROM external_feeds WHERE journal_id = ? ORDER BY seq',\n\t\t\t$journalId\n\t\t);\n\n\t\tfor ($i=1; !$result->EOF; $i++) {\n\t\t\tlist($feedId) = $result->fields;\n\t\t\t$this->update(\n\t\t\t\t'UPDATE external_feeds SET seq = ? WHERE feed_id = ?',\n\t\t\t\tarray(\n\t\t\t\t\t$i,\n\t\t\t\t\t$feedId\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$result->moveNext();\n\t\t}\n\n\t\t$result->close();\n\t\tunset($result);\n\t}", "title": "" } ]
[ { "docid": "50d78295493e2f97e6fd533cd0be9ee0", "score": "0.57260746", "text": "function adjustNextSequenceOrder($new_first_player_id)\r\n {\r\n $players = self::getCollectionFromDB(\"SELECT player_id, next_sequence_order AS color, player_name FROM player ORDER BY next_sequence_order ASC\");\r\n $player_order = 2;\r\n $order = 0;\r\n $player = $players[$new_first_player_id];\r\n\r\n foreach($players as $player_id => $player)\r\n {\r\n if($player_id == $new_first_player_id)\r\n {\r\n $order = 1;\r\n }\r\n else\r\n {\r\n $order = $player_order++;\r\n }\r\n\r\n $sql = \"UPDATE player SET next_sequence_order = $order WHERE player_id = $player_id\";\r\n self::DbQuery($sql);\r\n }\r\n\r\n self::notifyAllPlayers( \"playerFirst\", clienttranslate('${player_name} uses Advertising and becomes 1st player for the next action sequence'), array(\r\n 'player_name' => $player['player_name']\r\n ) );\r\n }", "title": "" }, { "docid": "f5eb2271d614f1bb37a3d1a5101ecb27", "score": "0.5504669", "text": "protected function renumber_pages ($flatplan) {\n\t\t$pages = Page::where('flatplan_id', '=', $flatplan->id)->where('cover', '=', false)->get();\n\t\t$i = 1;\n\t\tforeach($pages as $page){\n\t\t\t$page->page_number = $i;\n\t\t\t$page->save();\n\t\t\t$i++;\n\t\t}\n\t\t$this->match_pages($flatplan);\n\t}", "title": "" }, { "docid": "dc2248c5f2bd443779104d039bd97f80", "score": "0.546452", "text": "function _fixAnswerSequence() {\n\t\t\n\t\t\n\t\t$re_answer = sql_query(\"\n\t\tSELECT idAnswer \n\t\tFROM \".$GLOBALS['prefix_lms'].\"_testquestanswer \n\t\tWHERE idQuest = '\".(int)$this->id.\"'\n\t\tORDER BY sequence, idAnswer\");\n\t\t\n\t\t$seq = 0;\n\t\twhile(list($id_answer ) = sql_fetch_row($re_answer)){\n\t\t\tsql_query(\"\n\t\t\tUPDATE \".$GLOBALS['prefix_lms'].\"_testquestanswer\n\t\t\tSET sequence = '\".(int)$seq.\"' \n\t\t\tWHERE idAnswer = '\".(int)$id_answer.\"'\");\n\t\t\t++$seq;\n\t\t}\n\t}", "title": "" }, { "docid": "c22a37b2caebb44271ee83b73f1a5a31", "score": "0.5354315", "text": "function get_next_sequence_number($formatted=true)\n {\n global $wpdb;\n\n $sequenceNumber = $this->get_last_sequence_number(false);\n $sequenceNumber++;\n\n if($formatted === true)\n $sequenceNumber = $this->format_sequence_number($sequenceNumber);\n\n return $sequenceNumber;\n }", "title": "" }, { "docid": "428994bb06f405393dba10e9c6625de4", "score": "0.5341249", "text": "public function incDownloads() {\r\n ++$this->downloads;\r\n $this->save();\r\n }", "title": "" }, { "docid": "34cd4f294d13d7a8dca3dec44ec0d776", "score": "0.5322025", "text": "private function doRewindInt()\n {\n if ($this->bitset) {\n $this->ordinal = -1;\n $this->next();\n } else {\n $this->ordinal = 0;\n }\n }", "title": "" }, { "docid": "02a364d10d0b122e30506a20df256158", "score": "0.51354635", "text": "protected function rearrange_seq($model, $instance, $custom_model=null) {\n\t\tif (is_null($custom_model)) {\n\t\t\t$afftected_list = $model->query()\n\t\t\t\t->where('seq', '>=', $instance->seq)\n\t\t\t\t->where('id', '!=', $instance->id)\n\t\t\t\t->order_by('seq')\n\t\t\t\t->get();\n\t\t} else {\n\t\t\t$afftected_list = $custom_model;\n\t\t}\n\t\t$next_seq = $instance->seq + 1;\n\t\t$afftected_cnt = 0;\n\t\tforeach ($afftected_list as $afftected_item) {\n\t\t\tif ($afftected_item->seq < $next_seq) {\n\t\t\t\t$afftected_item->seq = $next_seq;\n\t\t\t\t$afftected_item->save();\n\t\t\t\t$afftected_cnt++;\n\t\t\t}\n\t\t\t$next_seq++;\n\t\t}\n\t\t\\Session::set_flash('success_message', 'Rearrange is afftect for '.$afftected_cnt.' items');\n\t}", "title": "" }, { "docid": "53af16a8fcd292084b46c8fe6412f3fd", "score": "0.5080834", "text": "public function rewind(): void {\n reset($this->sequence);\n }", "title": "" }, { "docid": "4899a26dadbedd3a4642237977f15b5d", "score": "0.5045575", "text": "public function create_slags_for_numbers()\n {\n $contacts = DB::table('table_tbl_sms_contacts')->get();\n\n foreach ($contacts as $contact) {\n $slag = $this->generateRandomString();\n $message = URL::to('/api/participate') . \"/\" . $slag;\n DB::table('table_tbl_user_links')->insert(['phone' => $contact->phone_number, 'slag' => $slag]);\n $this->queue_user_sms($contact->phone_number, $message);\n }\n return \"DONE\";\n }", "title": "" }, { "docid": "bfb391f85d28b99a9094cd6c8d947216", "score": "0.4986033", "text": "public function postReorderPages()\n\t\t{\n\t\t\t$getids = Input::get('id');\n\n\t\t\t$count = 1;\n\n\t\t\tforeach ($getids as $id) {\n\t\t\t\tDB::table('pages')->where('id', $id)->update(array('sorting' => $count));\n\n\t\t\t\t$count++;\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "812050b23addb2982c56c18879578a27", "score": "0.49750108", "text": "public function init_number() {\n\t\t$next_number_store = isset( $this->settings['number_sequence'] ) ? $this->settings['number_sequence'] : \"{$this->slug}_number\";\n\t\t$number_store = new Sequential_Number_Store( $next_number_store );\n\t\t// reset invoice number yearly\n\t\tif ( isset( $this->settings['reset_number_yearly'] ) ) {\n\t\t\t$current_year = date(\"Y\");\n\t\t\t$last_number_year = $number_store->get_last_date('Y');\n\t\t\t// check if we need to reset\n\t\t\tif ( $current_year != $last_number_year ) {\n\t\t\t\t$number_store->set_next( 1 );\n\t\t\t}\n\t\t}\n\n\t\t$document_date = $this->get_date();\n\t\t$document_number = $number_store->increment( $this->order_id, $document_date->date_i18n( 'Y-m-d H:i:s' ) );\n\n\t\t$this->set_number( $document_number );\n\n\t\treturn $document_number;\n\t}", "title": "" }, { "docid": "02eacb75ec677f57d8bddc4206154e0e", "score": "0.49258152", "text": "public function createSequenceRedUp()\n {\n $arr = array();\n for($i = 1; $i < 4; $i++)\n {\n $arr[(string)$i] = $i;\n }\n \n for($i = 1; $i < 4; $i++)\n {\n $index = array_rand($arr,1);\n $this->sequenceRedUp[(string)$i] = $arr[$index];\n unset($arr[$index]);\n }\n }", "title": "" }, { "docid": "a23fb2474a908494fecc2eaa2744564c", "score": "0.49114677", "text": "public function setRestartFootnoteNumberEachPage()\n {\n $this->getNoteDocHead()->setRestartFootnoteNumberEachPage();\n }", "title": "" }, { "docid": "4a4fa8ec2fc3d5e7dbaeccebc89ac092", "score": "0.490846", "text": "public function getNextCount();", "title": "" }, { "docid": "611f98c5d899d94c3634f95607816c24", "score": "0.49038762", "text": "public static function recountQueue()\n {\n //update the row count with a raw query as this is is way faster than the object orientated way\n DB::statement(DB::raw('set @row:=0'));\n DB::statement(DB::raw('update queue set row_count = @row:=@row+1;'));\n }", "title": "" }, { "docid": "cd2e1ca8776a1a4a6dcc776a26bba11c", "score": "0.48402268", "text": "public function next(): void {\n next($this->sequence);\n }", "title": "" }, { "docid": "b77f5d4ba82eb89cb51b30c8c9bf5e4c", "score": "0.4836977", "text": "private function incrementPositionsOnAllItems()\n {\n $this->listifyList()\n ->increment($this->positionColumn());\n }", "title": "" }, { "docid": "3ca4e2e56656269732513f831d299b31", "score": "0.48368886", "text": "public function refCounterInc()\n {\n $this->ranking += 1;\n return $this;\n }", "title": "" }, { "docid": "a38f014d45e1eaf595755e76c8500f17", "score": "0.48353598", "text": "public function setRestartEndnoteNumberEachPage()\n {\n $this->getNoteDocHead()->setRestartEndnoteNumberEachPage();\n }", "title": "" }, { "docid": "bc822b60a78619e0479f7a2231047e09", "score": "0.48314703", "text": "function incrementOrder(){\n global $order;\n $order++;\n}", "title": "" }, { "docid": "aaf96273c0607e76a5e06df558879ac6", "score": "0.48074234", "text": "public function getNextBatchNumber(string $package): int;", "title": "" }, { "docid": "566b1b8a76a827fd2fb9bd165dfab5e5", "score": "0.47924566", "text": "public function getNextBatchNumber();", "title": "" }, { "docid": "8e353a930c7b6fa29599488e69ff226d", "score": "0.47905618", "text": "function ref_increment($reference, $back=false){\n // If $reference contains at least one group of digits,\n // extract first didgits group and add 1, then put all together.\n // NB. preg_match returns 1 if the regex matches completely\n // also $result[0] holds entire string, 1 the first captured, 2 the 2nd etc.\n //\n if (preg_match('/^(\\D*?)(\\d+)(.*)/', $reference, $result) == 1)\n {\n list($all, $prefix, $number, $postfix) = $result;\n $dig_count = strlen($number); // How many digits? eg. 0003 = 4\n $fmt = '%0' . $dig_count . 'd'; // Make a format string - leading zeroes\n $val = intval($number + ($back ? ($number<1 ? 0 : -1) : 1));\n $nextval = sprintf($fmt, $val); // Add one on, and put prefix back on\n\n return $prefix.$nextval.$postfix;\n }\n else\n return $reference;\n}", "title": "" }, { "docid": "4ceac1439b200e1b585cf1bb23514d49", "score": "0.477658", "text": "private function increaseCount(): void\n {\n $this->count = $this->count + 1;\n }", "title": "" }, { "docid": "a7048a2c7ea9c236c37d2a4e77101e6e", "score": "0.47619262", "text": "private function incrementChildNumber()\n {\n if (empty($this->child)) {\n return $this->childNumber = 1;\n }\n end($this->child);\n $this->childNumber = ++$this->child[key($this->child)];\n }", "title": "" }, { "docid": "49232ea086bc80a57a5b8be9e55cddea", "score": "0.4725582", "text": "public function createIncrementalReferenceNumber()\r\n\t{\r\n\t $start = 10000 ; //start number\r\n\t $id = 1;\r\n\t $date = date('Y');\r\n\t // $newNumber = $start + 1 ; // new number incremental\r\n\t //query to select the first record\r\n\t $query = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc(\"SELECT project_reference_number, id FROM e_i_a_project_detail\r\n\t ORDER BY e_i_a_project_detail.id DESC LIMIT 1\"); //this should return the last record inserted\r\n\t $number = null ;\r\n\t $primary_id = null;\r\n\t //loop\r\n\t //\r\n\t /*\r\n\t foreach($query as $q)\r\n\t {\r\n\t $number = $q['project_reference_number'] ;\r\n\t }\r\n\t //check the value of $number \r\n\t if($number == null)\r\n\t {\r\n\t //start point\r\n\t return $text.\"-\".$start.\"-\".$year;\r\n\t }\r\n\t if($number != null)\r\n\t {\r\n\t //continue with incrementing the number\r\n\t\t$value = $number + 1 ;\r\n\t\treturn $text.\"-\".$value.\"-\".$year;\r\n\t\t//return $value;\r\n\t } */\r\n\t //////\r\n\t //loop\r\n\t foreach($query as $q)\r\n\t {\r\n\t $number = $q['project_reference_number'] ;\r\n\t $primary_id = $q['id'] ;\r\n\t }\r\n\t //check the value of $number \r\n\t if($number == null && $primary_id == null)\r\n\t {\r\n\t //start point\r\n\t return $id.\"-\".$start.\"-\".$date;\r\n\t }\r\n\t if($number != null && $primary_id != null)\r\n\t {\r\n\t //continue with incrementing the number\r\n\t\t\r\n\t\t$value = $number + $start ;\r\n\t\t$id_value = $primary_id + $id ;\r\n\t\treturn $id_value.\"-\".$value.\"-\".$date;\r\n\t }\r\n\t //////\r\n\t}", "title": "" }, { "docid": "e130f581a6ad7deedf75040aeb31ce9a", "score": "0.47108194", "text": "public function incrIdTypeRessource($increment) {\n $this->setIdTypeRessource($this->getIdTypeRessource() + $increment);\n }", "title": "" }, { "docid": "b63ff0fe70b0fba3064e9fca593eafad", "score": "0.46872216", "text": "function get_next_id() {\n\t\t$query = \"select count(*) as num from ec_salesorder\";\n\t\t$result = $this->db->query($query);\n\t\t$num = $this->db->query_result($result,0,'num') + 1;\n\t\t//$num = $this->db->getUniqueID(\"ec_salesorder\");\n\t\tif($num > 99) return $num;\n\t\telseif($num > 9) return \"0\".$num;\n\t\telse return \"00\".$num;\n\t}", "title": "" }, { "docid": "d17a5cc110eb0507effba166bbd0f0bb", "score": "0.4647992", "text": "public function initializeNextOrderNumber()\n {\n \\XLite\\Core\\Database::getRepo('XLite\\Model\\Config')->createOption(\n array(\n 'category' => 'General',\n 'name' => 'order_number_counter',\n 'value' => $this->getMaxOrderNumber() + 1,\n )\n );\n }", "title": "" }, { "docid": "f590808dfb0a514add9c7d3820fc8a91", "score": "0.46476582", "text": "abstract function resetSequence(): bool;", "title": "" }, { "docid": "6e2241af66eaa73472d0ba413bd87574", "score": "0.4647358", "text": "function getNextOrder()\r\n{\r\n\tglobal $mysqli;\r\n\r\n\t$result = $mysqli->query(\"SELECT * FROM system\")\r\n\t\tor die (\"System read error\");\r\n\t$record = $result->fetch_array(MYSQLI_ASSOC);\r\n\t$ordId = $record['nextorder'] + 1;\r\n\t$sql = \"UPDATE system SET nextorder = $ordId\";\r\n\t$mysqli->query($sql);\r\n\r\n\treturn $ordId;\r\n}", "title": "" }, { "docid": "1f11acfa8a3d8d547be03a71ddd1af5e", "score": "0.46409953", "text": "private function _setSendNum()\r\n {\r\n $day = date('Y-m-d');\r\n $expireAt = strtotime($day . ' 23:59:59') - time();\r\n $key = $this->_mobile . '_' . $this->_templateId . '_' . $day;\r\n $cache = Yii::$app->cache;\r\n if (($num = $cache->get($key))) {\r\n $num++;\r\n } else {\r\n $num = 1;\r\n }\r\n $cache->set($key, $num, $expireAt);\r\n }", "title": "" }, { "docid": "695a193d66f2148a00dd2a8ea4dfc45d", "score": "0.46382546", "text": "function move_item_down($table_name, $current_id, $group_query) {\n\t$next_item = get_item($table_name, \"sequence\", $current_id, $group_query, \"next\");\n\n\t$sequence = db_fetch_cell(\"select sequence from $table_name where id=$current_id\");\n\t$sequence_next = db_fetch_cell(\"select sequence from $table_name where id=$next_item\");\n\tdb_execute(\"update $table_name set sequence=$sequence_next where id=$current_id\");\n\tdb_execute(\"update $table_name set sequence=$sequence where id=$next_item\");\n}", "title": "" }, { "docid": "a31e52e93b77de47a12cc5dace44e067", "score": "0.46247873", "text": "function resequenceGalleys($issueId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT galley_id FROM issue_galleys WHERE issue_id = ? ORDER BY seq',\n\t\t\t(int) $issueId\n\t\t);\n\n\t\tfor ($i=1; !$result->EOF; $i++) {\n\t\t\tlist($galleyId) = $result->fields;\n\t\t\t$this->update(\n\t\t\t\t'UPDATE issue_galleys SET seq = ? WHERE galley_id = ?',\n\t\t\t\tarray($i, $galleyId)\n\t\t\t);\n\t\t\t$result->moveNext();\n\t\t}\n\n\t\t$result->close();\n\t\tunset($result);\n\t}", "title": "" }, { "docid": "daf9a608d9cab2b84005148d12be0b33", "score": "0.4615691", "text": "public function getSequenceNumber(): int\n {\n return RijksregisternummerHelper::getSequenceNumber($this->rijksregisternummer);\n }", "title": "" }, { "docid": "b6af467d605bc99c079b6582ad73babc", "score": "0.4604492", "text": "function resequenceSuppFiles($articleId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT supp_id FROM article_supplementary_files WHERE article_id = ? ORDER BY seq',\n\t\t\t$articleId\n\t\t);\n\n\t\tfor ($i=1; !$result->EOF; $i++) {\n\t\t\tlist($suppId) = $result->fields;\n\t\t\t$this->update(\n\t\t\t\t'UPDATE article_supplementary_files SET seq = ? WHERE supp_id = ?',\n\t\t\t\tarray($i, $suppId)\n\t\t\t);\n\t\t\t$result->moveNext();\n\t\t}\n\n\t\t$result->close();\n\t\tunset($result);\n\t}", "title": "" }, { "docid": "8447b97ef18bdee3d49e2bda48412813", "score": "0.46031374", "text": "function ojt_reorder_topic_items($topic) {\n global $DB;\n\n $itemrs = $DB->get_recordset_sql(\n \"SELECT * FROM {ojt_topic_item} WHERE topicid = :topicid ORDER BY position, id\",\n array('topicid' => $topic->id)\n );\n\n $itemcounter = 0;\n foreach ($itemrs as $item) {\n if ($itemcounter != $item->position) {\n // Update OJT topic item position.\n $item->position = $itemcounter;\n $DB->update_record('ojt_topic_item', $item);\n }\n $itemcounter++;\n }\n}", "title": "" }, { "docid": "e67f7df14dd6baf36dbb95e8973378b5", "score": "0.4600836", "text": "private function resetProcessCount() {\n $this->processCount = 0;\n }", "title": "" }, { "docid": "c85f94da95e180db829bb1ec63161080", "score": "0.4600114", "text": "public function setOrderNumber() {\n $ordernum = $this->getNewestOrder();\n $ordernum;\n }", "title": "" }, { "docid": "f02145332b299e63c0893d6287590269", "score": "0.4567071", "text": "function set_postulation_number($casting_id)\n {\n $this->db->select('id');\n $this->db->where('casting_id', $casting_id);\n $this->db->order_by('id',\"asc\");\n $this->db->from('applies');\n $results = $this->db->get();\n \n if($results->num_rows != 0)\n {\n $results = $results->result_array();\n\n $counter= 1;\n\n foreach ($results as $apply) {\n $this->db->where('id', $apply[\"id\"]);\n $this->db->update('applies', array('postulation_number' => $counter ));\n $counter= $counter + 1;\n }\n }\n }", "title": "" }, { "docid": "ade6ed7daed4ac414ece9b794422cbef", "score": "0.45485452", "text": "public function updateRecordsWithSequence() {\n\t\treturn $this->getFocus()->updateMissingSeqNumber($this->getName());\n\t}", "title": "" }, { "docid": "3c53b027bcbcaf16f3df2dd711ab0b79", "score": "0.4548362", "text": "function getNextReferencePointer() {\n \t$conn = Doctrine_Manager::connection();\n \t$session = SessionWrapper::getInstance();\n \t$userid = $session->getVar('userid');\n\t\t$sql = \"SELECT COUNT(id) FROM seasontracking WHERE seasonid = \".$this->getSeasonID().\" \"; \n\t\t$result = $conn->fetchOne($sql);\n\t\treturn str_pad(($result+1), 3, \"0\", STR_PAD_LEFT);\n }", "title": "" }, { "docid": "4c7003f504083dc08009e5a646a6f68a", "score": "0.45311978", "text": "public function run()\n\t{\n\t\t$start = 11;\n\t\t$amount = 42;\n\n\t\tfor( $i = 0; $i < $amount; $i++ )\n\t\t{\n\t\t\t$array[$start+$i] = array (\n\t\t\t\t'id' => $start+$i,\n\t\t\t\t'stream' => 'references',\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'position' => $i+1,\n\t\t\t\t'article_id' => $start+$i,\n\t\t\t);\n\t\t}\n\t\t\\DB::table('fs_stream')->insert($array);\n\t}", "title": "" }, { "docid": "146b6172a0258a8d1cbad22c2ea90113", "score": "0.45106298", "text": "public function parseNumbers()\n {\n $this->payload = str_replace('!!NUMBER!!', $this->faker->randomDigitNotNull, $this->payload);\n }", "title": "" }, { "docid": "dcb76f1d25d1600350ab89489ef23d39", "score": "0.45069626", "text": "private function importReferences()\n {\n foreach ($this->import_in_order as $key => $import_name) {\n //get the list to import from\n $queue = $this->head_references[$import_name];\n\n //while has items in the queue\n while (count($queue)) {\n $this->iterateQueue($queue, $key);\n }\n }\n }", "title": "" }, { "docid": "dc31c0f9f37aa686ce1dd09721b93207", "score": "0.44944087", "text": "public function setReliveNum($value)\n {\n return $this->set(self::RELIVE_NUM, $value);\n }", "title": "" }, { "docid": "1ba755ab89cf7d86fad41422588c1715", "score": "0.44860354", "text": "public function getNextNumber()\n {\n $last = self::orderBy('number', 'desc')->value('number');\n\n return str_pad($last + 1, 5, '0', STR_PAD_LEFT);\n }", "title": "" }, { "docid": "7ef41e9a9f8d4306d418e0486ca4b9c0", "score": "0.44855303", "text": "public function relist_order_processed( $listing, $package ) {\n\t\twp_update_post( [\n\t\t\t'ID' => $listing->get_id(),\n\t\t\t'post_date' => current_time( 'mysql' ),\n\t\t\t'post_date_gmt' => current_time( 'mysql', 1 ),\n\t\t\t'post_status' => 'publish',\n\t\t] );\n\n\t\t$package->assign_to_listing( $listing->get_id() );\n\t}", "title": "" }, { "docid": "208d3664f9e05818564728eb55974c0a", "score": "0.4485426", "text": "public function next(): void\n {\n $this->_sort();\n next($this->_index);\n }", "title": "" }, { "docid": "29927ed16bea854132d5710281a36b6b", "score": "0.44788295", "text": "public function refCounterDec()\n {\n $this->ranking -= 1;\n return $this;\n }", "title": "" }, { "docid": "7c14697cbc94884fcd034799091a7f55", "score": "0.4474181", "text": "private function __nextsequence() {\n\t\tglobal $adb;\n\t\t$seqres = $adb->pquery('SELECT max(sequence) AS max_sequence FROM vtiger_mailscanner_rules', array());\n\t\t$maxsequence = 0;\n\t\tif ($adb->num_rows($seqres)) {\n\t\t\t$maxsequence = $adb->query_result($seqres, 0, 'max_sequence');\n\t\t}\n\t\t++$maxsequence;\n\t\treturn $maxsequence;\n\t}", "title": "" }, { "docid": "958325ff6391ac83e739a9a27fd15b1e", "score": "0.4454486", "text": "protected function modeBatchURL()\n {\n $urls = $this->urls;\n\n foreach ($urls as $url) {\n for ($pings = 0; $pings <= $this->repeat; $pings++) {\n $this->ping($url);\n }\n }\n }", "title": "" }, { "docid": "5b661eac01c72945fb32fb8f29b2bbed", "score": "0.44501188", "text": "public function plusplus($streamId){\r\n\t\t$result = $this->getDbTable()->find($streamId);\r\n if (0 == count($result)) {\r\n return;\r\n }\r\n $row = $result->current();\r\n $number = $row->click;\r\n $number++;\r\n $this->getDbTable()->update(array('click' => $number), array('streamId = ?' => $streamId));\r\n \r\n return $row->url;\r\n\t}", "title": "" }, { "docid": "e43adc634e56cecacc2b1ccaffd2512b", "score": "0.44453785", "text": "function move_item_up($table_name, $current_id, $group_query) {\n\t$last_item = get_item($table_name, \"sequence\", $current_id, $group_query, \"previous\");\n\n\t$sequence = db_fetch_cell(\"select sequence from $table_name where id=$current_id\");\n\t$sequence_last = db_fetch_cell(\"select sequence from $table_name where id=$last_item\");\n\tdb_execute(\"update $table_name set sequence=$sequence_last where id=$current_id\");\n\tdb_execute(\"update $table_name set sequence=$sequence where id=$last_item\");\n}", "title": "" }, { "docid": "fd07b8c6ed8758be60e6a14e1523c895", "score": "0.4431646", "text": "public function rescanChildrenDisplayOrder()\n {\n $db = Database::connection();\n // this should be re-run every time a new page is added, but i don't think it is yet - AE\n //$oneLevelOnly=1;\n //$children_array = $this->getCollectionChildrenArray( $oneLevelOnly );\n $q = 'SELECT cID FROM Pages WHERE cParentID = ? ORDER BY cDisplayOrder';\n $children_array = $db->getCol($q, [$this->getCollectionID()]);\n $current_count = 0;\n foreach ($children_array as $newcID) {\n $q = 'update Pages set cDisplayOrder = ? where cID = ?';\n $db->executeQuery($q, [$current_count, $newcID]);\n ++$current_count;\n }\n }", "title": "" }, { "docid": "53dc44a4d367be9a6d91c45a3de9b8a7", "score": "0.44280016", "text": "private function updatePositions()\n {\n $old_position = $this->getOriginal()[$this->positionColumn()];\n $new_position = $this->getListifyPosition();\n\n if($new_position === NULL)\n $matching_position_records = 0;\n else\n $matching_position_records = $this->listifyList()->where($this->positionColumn(), '=', $new_position)->count();\n\n if($matching_position_records <= 1)\n {\n return;\n }\n\n $this->shufflePositionsOnIntermediateItems($old_position, $new_position, $this->id);\n }", "title": "" }, { "docid": "b20c779c05a030cce9f8f8125b3a051e", "score": "0.4426524", "text": "public function rewind(): void\n {\n $this->importExportContext\n ->setValue(ContactSyncProcessor::CURRENT_BATCH_READ_ITEMS, []);\n $this->importExportContext\n ->setValue(ContactSyncProcessor::NOT_PROCESSED_ITEMS, []);\n\n parent::rewind();\n }", "title": "" }, { "docid": "64e33c4ae6ab91489fb796ab5b427eab", "score": "0.44152725", "text": "public function getNextSequence($name) {\n $this->db->trans_begin();\n $this->db->query(\"update counters set Counter=Counter+1 where Page='$name'\");\n $result = $this->db->query(\"select Counter from counters where Page='$name'\")->row()->Counter;\n if ($this->db->trans_status() === FALSE) {\n $this->db->trans_rollback();\n return false;\n }\n $this->db->trans_commit();\n return $result;\n }", "title": "" }, { "docid": "3259a450b34e82c7c8af99813d653fb4", "score": "0.4414522", "text": "public function next ()\n {\n $this->_sort ();\n next ( $this->_order );\n }", "title": "" }, { "docid": "12b0e2a27c58f70b232f8b97eddb262e", "score": "0.44136146", "text": "public function next(): void {\n ++$this->key;\n }", "title": "" }, { "docid": "abfc2b1323eb409f9e718ba2c8df483b", "score": "0.44106248", "text": "private function rankItems(array &$itemArray): void\n {\n Compare::sortArrayByFields($itemArray, ['sequenceNumber', 'listEnumInSource', 'humanCodingScheme']);\n }", "title": "" }, { "docid": "3a1f2f3debf1cb21c56ebac66bd43cec", "score": "0.44089538", "text": "private function get_next_id($type)\n {\n $data = $this->mysqli->query(\"SELECT url FROM derp_$type ORDER BY id DESC LIMIT 1\");\n $result = $data->fetch_array();\n $url = $result['url'];\n $url++;\n return $url;\n }", "title": "" }, { "docid": "154abb17a7adcfe7fb81d69e05002b37", "score": "0.44000268", "text": "public function run()\n {\n $chanOrder = array('100000', '100004', '100012', '100011', '100005', '100006', '100007', '100003', '100008', '100009', '100002', '100010', '100001', '101000', '101002', '101001', '101003', '101004', '101005', '101006', '102001', '102000', '102002', '102003', '102004', '102005', '102006', '102007', '102008', '102009');\n\t$num = count($chanOrder);\n\tfor($i = 0; $i < $num; $i++) {\n\t ChannelOrder::updateOrCreate(\n\t\t['id' => $chanOrder[$i]],\n\t\t['priority' => $num - $i,\n\t ]);\n\t}\n }", "title": "" }, { "docid": "a1551c4c531b1730e876198b20c4bcdf", "score": "0.43933088", "text": "function demote($project_id) { // Increase the order_in_project by one\n\t\t$order = $this->get_order_in_project($project_id);\n\t\t$order++;\n\t\t$this->set_order_in_project($order, $project_id);\n\t//\t$this->order = $order;\n\t}", "title": "" }, { "docid": "819f3cc41646282b76be59f96ab68271", "score": "0.43912733", "text": "private function getNextId()\n {\n $comments = $this->getComments();\n $lastComment = end($comments);\n\n return ++$lastComment['id'];\n }", "title": "" }, { "docid": "8fc9ed18ec20f604c367a66b36fe15f9", "score": "0.4386215", "text": "public function test_sequential_numbers_detector()\n {\n $instance = new PinGeneratorHandler();\n $sequential = 1234;\n $this->assertTrue($instance->checkSequential($sequential));\n }", "title": "" }, { "docid": "398f3cf97afcb78896de233a85948408", "score": "0.43847278", "text": "function acp_recount_referrals()\n{\n\tglobal $db, $mybb, $lang;\n\n\t$query = $db->simple_select(\"users\", \"COUNT(uid) as num_users\");\n\t$num_users = $db->fetch_field($query, 'num_users');\n\n\t$page = $mybb->get_input('page', MyBB::INPUT_INT);\n\t$per_page = $mybb->get_input('referral', MyBB::INPUT_INT);\n\t$start = ($page-1) * $per_page;\n\t$end = $start + $per_page;\n\n\t$query = $db->simple_select(\"users\", \"uid\", '', array('order_by' => 'uid', 'order_dir' => 'asc', 'limit_start' => $start, 'limit' => $per_page));\n\twhile($user = $db->fetch_array($query))\n\t{\n\t\t$query2 = $db->query(\"\n\t\t\tSELECT COUNT(uid) as num_referrers\n\t\t\tFROM \".TABLE_PREFIX.\"users\n\t\t\tWHERE referrer='{$user['uid']}'\n\t\t\");\n\t\t$num_referrers = $db->fetch_field($query2, \"num_referrers\");\n\n\t\t$db->update_query(\"users\", array(\"referrals\" => (int)$num_referrers), \"uid='{$user['uid']}'\");\n\t}\n\n\tcheck_proceed($num_users, $end, ++$page, $per_page, \"referral\", \"do_recountreferral\", $lang->success_rebuilt_referral);\n}", "title": "" }, { "docid": "59da57464588d436c25432f4b01f4f59", "score": "0.43823183", "text": "function next($name)\r\n\t\t{\r\n\t\t\t$next = 0;\r\n\t\t\t$lock = \"emrs.{$name}\";\r\n\t\t\t\r\n\t\t\t//acquire a lock for this number\r\n\t\t\t$result = $this->query(\"select get_lock('{$lock}', 60) as locked\");\r\n\r\n\t\t\tif ($result[0][0]['locked'] == 1)\r\n\t\t\t{\r\n\t\t\t\t//grab the next free number\r\n\t\t\t\t$data = $this->find('first', array('conditions' => array('name' => $name), 'contain' => array()));\r\n\t\t\t\t\r\n\t\t\t\tif ($data === false)\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception('Invalid free number!');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//store it and then increment it back in the database\r\n\t\t\t\t$next = $data['NextFreeNumber']['next']++;\r\n\t\t\t\t$this->save($data);\r\n\t\t\t\t\r\n\t\t\t\t//release the lock\r\n\t\t\t\t$this->query(\"do release_lock('{$lock}')\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//die if we can't acquire the lock\r\n\t\t\t\tthrow new Exception('Could not acquire lock to get the next free number.');\r\n\t\t\t}\r\n\r\n\t\t\treturn $next;\r\n\t\t}", "title": "" }, { "docid": "228fe965e59f112579199882448cc9c7", "score": "0.4378392", "text": "protected function set_order_no() {\n\n\t\t\t$shopID = $this->getConfig()->getShopId();\n\t\t\t$buffer = \"\";\n\n\t\t\tif ('oxbaseshop' !== $shopID) {\n\n\t\t\t\t$buffer = \"_\" . $shopID;\n\n\t\t\t}\n\n\n $res = oxDb::getDb( oxDB::FETCH_MODE_ASSOC ) ->execute( 'START TRANSACTION' );\n if (!$res){\n $this->msglog(\"SQL Error: \" . oxDb::getDb( oxDB::FETCH_MODE_ASSOC ) ->ErrorMsg());\n }\n $sql = \"SELECT MAX(OXCOUNT)+1 AS newordno FROM oxcounters where oxident = 'oxOrder\" . $buffer . \"';\";\n\n $this->msglog(\"SQL for getting new Ordernumber: \" . $sql);\n\n $res = oxDb::getDb( oxDB::FETCH_MODE_ASSOC ) ->Execute($sql);\n if (!$res){\n $this->msglog(\"SQL Error: \" . oxDb::getDb( oxDB::FETCH_MODE_ASSOC ) ->ErrorMsg());\n }\n\n if ($res && $res->fields['newordno'] && $res->fields['newordno']>0){\n $newordno = $res->fields['newordno'];\n $this->msglog(\"New Ordernumber is: \" . $newordno);\n }\n else {\n $newordno = 1;\n $this->msglog(\"Get new Ordernumber failed, setting to 1\");\n }\n\n $sql = \"UPDATE oxcounters\n SET OXCOUNT = '$newordno'\n WHERE OXIDENT = 'oxOrder\" . $buffer . \"'\";\n\n $this->msglog(\"SQL for Update Ordernumber: \" . $sql);\n\n $res = oxDb::getDb( oxDB::FETCH_MODE_ASSOC ) ->Execute($sql);\n if (!$res){\n $this->msglog(\"SQL Error: \" . oxDb::getDb( oxDB::FETCH_MODE_ASSOC ) ->ErrorMsg());\n }\n\n $res = oxDb::getDb( oxDB::FETCH_MODE_ASSOC ) ->Execute('COMMIT');\n if (!$res){\n $this->msglog(\"SQL Error: \" . oxDb::getDb( oxDB::FETCH_MODE_ASSOC ) ->ErrorMsg());\n }\n\n // load order for later recalculation\n // $oOrder = oxnew('oxorder');\n // $oOrder->load($order_oxid);\n\n // recalculate now\n $this->msglog(\"Order nr before recalculation: \" . $newordno .' '. $this->getConfig()->getShopId());// $oOrder->oxorder__oxordernr->value);\n //$oOrder->recalculateOrder();\n //$this->msglog(\"Order nr after recalculation: \" . $oOrder->oxorder__oxordernr->value);\n\n\t\t\treturn $newordno;\n }", "title": "" }, { "docid": "8394c5b0e5bd828636d3018788a1b0b0", "score": "0.43737888", "text": "abstract function getNextId($ref = null);", "title": "" }, { "docid": "825f21c7ddc3c331572ea097a80b40f8", "score": "0.4367445", "text": "function resequence($controlledVocabId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT controlled_vocab_entry_id FROM controlled_vocab_entries WHERE controlled_vocab_id = ? ORDER BY seq',\n\t\t\tarray((int) $controlledVocabId)\n\t\t);\n\n\t\tfor ($i=1; !$result->EOF; $i++) {\n\t\t\tlist($controlledVocabEntryId) = $result->fields;\n\t\t\t$this->update(\n\t\t\t\t'UPDATE controlled_vocab_entries SET seq = ? WHERE controlled_vocab_entry_id = ?',\n\t\t\t\tarray(\n\t\t\t\t\t(int) $i,\n\t\t\t\t\t(int) $controlledVocabEntryId\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$result->MoveNext();\n\t\t}\n\n\t\t$result->Close();\n\t\tunset($result);\n\t}", "title": "" }, { "docid": "66deb1cf6a698327017868c33ead1542", "score": "0.43514338", "text": "function increment_fileNumber($fileName)\n{\t\t\n\t// Split string by '.'\n\t$fileName_exploded = explode('.', $fileName);\n\n\t// Pop the file extension off the end\n\t$extension = array_pop($fileName_exploded);\n\n\t// Join array into string using '.' as a separator\n\t$fileName = implode('.', $fileName_exploded);\n\n\t// Split the string by '_'\n\t$fileName_exploded = explode('_', $fileName);\n\n\t// Remove the number that was previously appended to the filename\n\t$prevNumber = array_pop($fileName_exploded);\n\n\t// Add a new number to the filename\n\tarray_push($fileName_exploded, ++$prevNumber);\n\n\t// Join array into string using '_' as a separator\n\t$fileName = implode('_', $fileName_exploded) . '.' . $extension;\n\n\treturn $fileName;\n}", "title": "" }, { "docid": "b7f0f523c0be636a1b1a159d665884c6", "score": "0.4349696", "text": "function autoIncrement()\n{\n for ($i = 0; $i < 1000; $i++) {\n yield $i;\n }\n}", "title": "" }, { "docid": "5bb4ec408a64503922aa1689323ec468", "score": "0.43470186", "text": "public function next(): void\n {\n $this->position++;\n }", "title": "" }, { "docid": "2e743617384da939fdae7921fdd7b750", "score": "0.43460333", "text": "public function getNextOrderNumber() {\n\t\t$lastOrder = Order::orderBy( 'created_at', 'desc' )->first();\n\n\t\tif ( ! $lastOrder )\n\t\t\t// We get here if there is no order at all\n\t\t\t// If there is no number set it to 0, which will be 1 at the end.\n\n\t\t{\n\t\t\t$number = 0;\n\t\t} else {\n\t\t\t$number = $lastOrder->id;\n\t\t}\n\n\t\t// If we have ORD000001 in the database then we only want the number\n\t\t// So the substr returns this 000001\n\n\t\t// Add the string in front and higher up the number.\n\t\t// the %05d part makes sure that there are always 6 numbers in the string.\n\t\t// so it adds the missing zero's when needed.\n\n\t\treturn 'THY' . date( 'Ymd' ) . ( intval( $number ) + 1 );\n\t}", "title": "" }, { "docid": "014416d557d6ac82065c4fcf7f22102b", "score": "0.43426377", "text": "public function next()\n {\n $this->count++;\n $this->nextSecond();\n }", "title": "" }, { "docid": "e763ab1ef3ec6aadf55911e7d90c19ff", "score": "0.4337411", "text": "function AddLink()\n{\n\t$n=count($this->links)+1;\n\t$this->links[$n]=array(0, 0);\n\treturn $n;\n}", "title": "" }, { "docid": "cd6460e8bd392f2bf83a24fd0da2551b", "score": "0.43372458", "text": "public function run()\n {\n\n \\DB::select('select sequence_name, reset_sequence(split_part(sequence_name, \\'_id_seq\\',1)) from information_schema.sequences where sequence_schema=?', ['public']);\n \n }", "title": "" }, { "docid": "71372819af678c779c8af42969dbbd8c", "score": "0.4335584", "text": "public function next(){\n $this->index++;\n }", "title": "" }, { "docid": "94b1efbdc28845f6ff87f524a569e8a2", "score": "0.4334442", "text": "private function incrementPositionsOnHigherItems()\n {\n if($this->isNotInList()) return NULL;\n\n $this->listifyList()\n ->where($this->positionColumn(), '<', $this->getListifyPosition())\n ->increment($this->positionColumn());\n }", "title": "" }, { "docid": "19876536d6bcbd46e2fb8aa7392bde6b", "score": "0.43225986", "text": "protected function IncrementChange($resourceBoxOrRelatedEnd)\n {\n $resourceBoxOrRelatedEnd->ChangeOrder = ++$this->nextChange;\n }", "title": "" }, { "docid": "7acde98c8b01c8d22274ff8ceb945158", "score": "0.43210518", "text": "function generate_order_number() {\n $alreadyOrderExist = ItemOrder::select('order_number')->orderBy('created_at', 'DESC')->limit(1)->first();\n\n if(empty($alreadyOrderExist)) {\n $orderNumber = 'ABC'.date('jnY').'-001';\n\n return $orderNumber;\n } else {\n\n $orderNumber = $alreadyOrderExist->order_number;\n\n $orderNumberSplit = explode(\"-\", $orderNumber);\n $orderSequenceNumber = intval($orderNumberSplit[1]) + 1;\n $newOrderNumber = 'ABC'.date('jnY').'-00'.$orderSequenceNumber;\n\n return $newOrderNumber;\n }\n }", "title": "" }, { "docid": "c11acbed29d102edc53d224b3d79e1f0", "score": "0.43169913", "text": "function syncRank2Live(){\n\t\t$table_name = strtolower($this->_table_config['module_name']);\n\t\t$table_name = $this->db->dbprefix($table_name);\n\t\t$table_name_approval = $table_name . \"_live\";\n\n\t\t$this->db->select(\"id, rank\");\n\t\t$query = $this->db->get($table_name);\n\t\t$results = $query->result_array();\n\t\tforeach ($results as $result){\n\t\t\t$data = array(\"rank\" => $result['rank']);\n\t\t\t$this->db->where('id', $result['id']);\n\t\t\t$this->db->update($table_name_approval, $data);\n\t\t}\n\t}", "title": "" }, { "docid": "7cd2e7bcf98aae425b5a936a155a28ba", "score": "0.43113354", "text": "public function resetOrder()\n\t{\n\t}", "title": "" }, { "docid": "82716d3f4476cfc26f4eb216007335af", "score": "0.43111104", "text": "public function next()\n {\n $this->key++;\n }", "title": "" }, { "docid": "d08f027abe5176ff700616db0339d1c9", "score": "0.4305673", "text": "private function advance() {\n $next = $this->next($this->rotors[3]['setting']);\n $this->rotors[3]['setting'] = $next;\n\n $wheel = $this->wheel(3);\n if($next != $wheel['notch']) {\n // We are done\n return;\n }\n\n $next = $this->next($this->rotors[2]['setting']);\n $this->rotors[2]['setting'] = $next;\n\n $wheel = $this->wheel(2);\n if($next != $wheel['notch']) {\n // We are done\n return;\n }\n\n $next = $this->next($this->rotors[1]['setting']);\n $this->rotors[1]['setting'] = $next;\n }", "title": "" }, { "docid": "0ca4fc35db7e24934d9a79e1e76dbf44", "score": "0.43006858", "text": "public function sequential(string $url)\n {\n $this->sequential = $url;\n\n return $this;\n }", "title": "" }, { "docid": "85b464d121ec810ca45697f57a74530c", "score": "0.4295082", "text": "function resetAutoIncr($tab){\n\t\tswitch ($tab) {\n\t\t\tcase 'clubs':\n\t\t\t\t$this->wpdb->query(\"ALTER TABLE {$this->t1} AUTO_INCREMENT = 1\");\n\t\t\t\tbreak;\n\t\t\tcase 'matches':\n\t\t\t\t$this->wpdb->query(\"ALTER TABLE {$this->t2} AUTO_INCREMENT = 1\");\n\t\t\t\tbreak;\n\t\t\tcase 'teams':\n\t\t\t\t$this->wpdb->query(\"ALTER TABLE {$this->t3} AUTO_INCREMENT = 1\");\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "f4f24210ac12cd2ef5a705e550a08dcf", "score": "0.4294866", "text": "public function getNextOrderNr()\n {\n $sOrderNr = null;\n\n if ($this->_setNumber()) {\n $sOrderNr = $this->oxorder__oxordernr->value;\n }\n\n return $sOrderNr;\n }", "title": "" }, { "docid": "c23111b01a1d34c847c47dd03dddf46c", "score": "0.429322", "text": "public function rewind()\n {\n reset($this->flows);\n }", "title": "" }, { "docid": "b853be408513cdb02a6940b7e4b6356b", "score": "0.4292727", "text": "public function rewind(): void\n {\n $this->_iterationMax = $this->countMessages();\n $this->_iterationPos = 1;\n }", "title": "" }, { "docid": "3aad73f486c2b0c5a1ec7d4b2c6fa096", "score": "0.42915353", "text": "function do_reorder()\n\t{\n\t\t$ids = array();\n \t\t\n \t\tforeach ($this->ipsclass->input as $key => $value)\n \t\t{\n \t\t\tif ( preg_match( \"/^f_(\\d+)$/\", $key, $match ) )\n \t\t\t{\n \t\t\t\tif ($this->ipsclass->input[$match[0]])\n \t\t\t\t{\n \t\t\t\t\t$ids[ $match[1] ] = $this->ipsclass->input[$match[0]];\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t$ids = $this->ipsclass->clean_int_array( $ids );\n \t\t\n \t\t//-----------------------------------------\n \t\t// Save changes\n \t\t//-----------------------------------------\n \t\t\n \t\tif ( count($ids) )\n \t\t{ \n \t\t\tforeach( $ids as $forum_id => $new_position )\n \t\t\t{\n \t\t\t\t$this->ipsclass->DB->do_update( 'forums', array( 'position' => intval($new_position) ), 'id='.$forum_id );\n \t\t\t}\n \t\t}\n \t\t\n \t\t$this->recache_forums();\n \t\t\n \t\t$this->ipsclass->boink_it( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code );\n\t}", "title": "" }, { "docid": "b67ad479e01481bca43ec889124e51ee", "score": "0.42913347", "text": "public function next()\n {\n $this->itx++;\n }", "title": "" }, { "docid": "1f34e6601cdef75a22fea481a0cf2318", "score": "0.42887074", "text": "function next_id(){\t\n\t$file = File::last();\n\t$numero = $file->id+1;\n\treturn $numero;\n}", "title": "" }, { "docid": "eb8d0d5b0697b2d68c13551336ceecbb", "score": "0.4287347", "text": "public function next(): void\n {\n ++$this->position;\n }", "title": "" }, { "docid": "4e9f993b7157155a9a7343a951d7aaa9", "score": "0.4281655", "text": "public function setNextEventNumber($value)\n {\n return $this->set(self::NEXT_EVENT_NUMBER, $value);\n }", "title": "" }, { "docid": "2215aa57fe33076710ad3609d606c79d", "score": "0.42753193", "text": "public function run()\n {\n \t$seq = App\\Sequence::create([\n \t\t'name' => 'sequence1',\n \t\t'user_id' => 1\n \t]);\n\n \t/*\n \t$sequenceable = App\\Sequenceable::find(1);\n \t$sequenceable2 = App\\Sequenceable::find(2);\n \t$sequenceable3 = App\\Sequenceable::find(1);\n \t$sequenceable4 = App\\Sequenceable::find(2);\n\n \t$seq->replaceOrderedSequenceables(collect([\n \t\t$sequenceable, \n \t\t$sequenceable2, \n \t\t$sequenceable3,\n \t\t$sequenceable4\n \t]));\n\n \techo \"First run done\";\n\t\t*/\n\n \t$seq2 = App\\Sequence::create([\n \t\t'name' => 'sequence2',\n \t\t'user_id' => 1\n \t]);\n \t$seq3 = App\\Sequence::create([\n \t\t'name' => 'sequence3',\n \t\t'user_id' => 1\n \t]);\n \t$seq4 = App\\Sequence::create([\n \t\t'name' => 'sequence4',\n \t\t'user_id' => 1\n \t]);\n \t$sequenceable21 = App\\Sequenceable::find(1);\n \t$sequenceable22 = App\\Sequenceable::find(2);\n \t$sequenceable23 = App\\Sequenceable::find(7);\n \t$sequenceable24 = App\\Sequenceable::find(8);\n \t$sequenceable25 = App\\Sequenceable::find(9);\n \t$sequenceable26 = App\\Sequenceable::find(19);\n \t$sequenceable27 = App\\Sequenceable::find(20);\n\n\n \t\n \t/*\n \techo \"\\n-------\\n-------\\n-------\\n-------\\n-------\\n-------\\n\";\n \t$sequenceable4 = App\\Sequenceable::find(2);\n \t$seq->replaceOrderedSequenceables(collect([\n \t\t$sequenceable4,\n \t\t$sequenceable22,\n \t\t$sequenceable21 \t\t\n \t]));\n \techo \"\\n-------\\n-------\\n-------\\n-------\\nNESTED\\n-------\\n\";\n \t$seq2->replaceOrderedSequenceables(collect([\n \t\t$sequenceable4,\n \t\t$seq->sequenceable,\n \t\t$sequenceable4,\n \t\t$seq2->sequenceable\n \t])); \n \t*/\n\n \t$seq->replaceOrderedSequenceables(collect([\n \t\t$sequenceable21,\n \t\t$sequenceable23,\n \t]));\t\n\n \t$seq2->replaceOrderedSequenceables(collect([\n App\\Sequenceable::find(17), \n \t\t$seq->sequenceable,\n \t\t$seq->sequenceable,\n\n \t]));\n \n \t$seq3->replaceOrderedSequenceables(collect([\n \t\t$sequenceable26,\n \t\t$sequenceable25,\n \t\t$sequenceable24\n \t]));\n\n \t$seq4->replaceOrderedSequenceables(collect([\n \t\t$sequenceable27,\n \t\t$sequenceable26,\n \t\tApp\\Sequenceable::find(2)\n \t]));\n\n\n\n }", "title": "" }, { "docid": "fad20a55dd7d8f0436758689a6981852", "score": "0.42743304", "text": "public function reindexAll()\n {\n if (version_compare(Mage::getVersion(), '1.4') < 0)\n return; \n \n // for cron job on 1.3\n if (!Mage::getStoreConfig('amsorting/general/use_index'))\n return; \n \n $methods = Mage::helper('amsorting')->getMethods();\n foreach ($methods as $code){\n $method = Mage::getSingleton('amsorting/method_' . $code);\n $method->reindex();\n }\n \n // we need it for cron job\n $indexer = Mage::getSingleton('index/indexer');\n $process = $indexer->getProcessByCode('amsorting_summary');\n if ($process) {\n $process->setStatus(Mage_Index_Model_Process::STATUS_PENDING);\n $process->setEndedAt(date('Y-m-d H:i:s'));\n $process->save();\n } \n }", "title": "" }, { "docid": "a5cc147afb55a2fb3d59aeeb5434af8d", "score": "0.42724693", "text": "public function run()\n {\n\t\tDB::table('links')->delete();\n\n\t\tfor($i = 1; $i <= 5; ++$i)\n\t\t{\n\t\t\tDB::table('links')->insert([\n\t\t\t\t'link'\t\t=> route(\"portfolio\", ['id' => $i ]),\n\t\t\t\t'caption'\t=> \"My portfolio number $i\",\n // 'order' => $i\n\t\t\t]);\n\t\t}\n\n }", "title": "" }, { "docid": "0cfa0d4c3d3d2291444728371e00808d", "score": "0.42714518", "text": "public function sort_process()\n {\n ub_stack::discard_all();\n\n if ($this->unibox->session->env->alias->get['direction'] == 'down')\n {\n $order = 'ASC';\n $operator = '>';\n arsort($this->unibox->session->var->articles_sort_array);\n }\n else\n {\n $order = 'DESC';\n $operator = '<';\n asort($this->unibox->session->var->articles_sort_array);\n }\n\n foreach ($this->unibox->session->var->articles_sort_array as $id => $sort)\n {\n $sql_string = 'SELECT\n articles_container_id,\n articles_container_sort\n FROM\n data_articles_container\n WHERE\n articles_container_sort '.$operator.$sort.'\n AND\n category_id = '.$this->unibox->session->var->articles_sort_category_id.'\n ORDER BY\n articles_container_sort '.$order.'\n LIMIT 0, 1';\n $result = $this->unibox->db->query($sql_string, 'failed to select sort of next dataset');\n list($db_id, $db_sort) = $result->fetch_row();\n\n $sql_string = 'UPDATE\n data_articles_container\n SET\n articles_container_sort = '.$sort.'\n WHERE\n articles_container_id = '.$db_id;\n $this->unibox->db->query($sql_string, 'failed to update dataset: '.$db_id);\n\n $sql_string = 'UPDATE\n data_articles_container\n SET\n articles_container_sort = '.$db_sort.'\n WHERE\n articles_container_id = '.$id;\n $this->unibox->db->query($sql_string, 'failed to update dataset: '.$id);\n }\n\n // resort\n $this->resort();\n\n $msg = new ub_message(MSG_SUCCESS, false);\n $msg->add_text('TRL_SORT_SUCCESS');\n $msg->display();\n }", "title": "" } ]
082cbf75c3e0b83f2c8c2583e0d1eee4
Grab orders based on first and name
[ { "docid": "1e373836ff60bd6757a35e589b2d4132", "score": "0.5645465", "text": "function getOrdersName($fName, $lName)\r\n {\r\n //1. Define the query\r\n $sql = \"SELECT *\r\n FROM ordertest \r\n INNER JOIN customertest ON ordertest.customer_id = customertest.customer_id\r\n INNER JOIN pretzeltest ON pretzeltest.order_id = ordertest.order_id\r\n WHERE (customertest.first_name = :fName && customertest.last_name = :lName)\";\r\n\r\n //2. Prepare the statement\r\n $statement = $this->_dbh->prepare($sql);\r\n\r\n //3. Bind Parameters\r\n $statement->bindParam(':fName', $fName, PDO::PARAM_STR);\r\n $statement->bindParam(':lName', $lName, PDO::PARAM_STR);\r\n\r\n //4. Execute the query\r\n $statement->execute();\r\n\r\n //5. Return the result\r\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n return $result;\r\n }", "title": "" } ]
[ { "docid": "1de59c7512e9ca0b89c612030c3d288c", "score": "0.61979216", "text": "function getOrderings() ;", "title": "" }, { "docid": "cc9a00e81051bbf9d0b0a0e1e31fae9c", "score": "0.603694", "text": "public function getOrders();", "title": "" }, { "docid": "3f10d6f609b25ddfbb6e9a75c51727c9", "score": "0.57266575", "text": "function order_by()\n {\n $result = $this->nest();\n $args = func_get_args();\n $result->order_by_fields = $fields = array_flatten($args);\n \n if( count($fields) == 1 && strpos($fields[0], \",\") )\n {\n $result->order_by_fields = preg_split('/,\\s*/', $fields[0]);\n } \n \n return $result;\n }", "title": "" }, { "docid": "81b846be6ae2dd33047df4387efac179", "score": "0.57121086", "text": "public function getOrderings() {}", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.5692903", "text": "public function getOrder();", "title": "" }, { "docid": "3b3c81e72479e7f4497dfc10e87624f1", "score": "0.5643551", "text": "function getListOrders();", "title": "" }, { "docid": "b26b457cfc5106891c5aaafd9c00021e", "score": "0.5577762", "text": "function OrderBy($order);", "title": "" }, { "docid": "d53c7f42777cd0c0f4c5dc266dacfc9c", "score": "0.556908", "text": "public function orders()\n {\n $this->authorize(['manufacturer']);\n $search = null;\n $status = null;\n\n if (isset($this->request->query['search'])) {\n $search = $this->request->query['search'];\n }\n if (isset($this->request->query['status'])) {\n $status = $this->request->query['status'];\n }\n\n\n $quotes = $this->Quotes->find('all', ['contain' => [\n 'Users' => function ($q) {\n return $q->select(['username']);\n }\n ]])\n //->order(['Quotes.created' => 'DESC']);\n ->order(['Quotes.created' => 'DESC', 'FIELD(Quotes.role, \"wholesaler\", \"manufacturer\") DESC']);//, \n \n\n $quotes->where(['status !=' => 'pending']);\n $quotes->where(['status !=' => 'expired']);\n $quotes->where(['status !=' => 'archived']);\n \n\n $currentUserId = $this->Auth->user('id');\n //$quotes->where(['Users.id' => $currentUserId]);\n\t\t$quotes->where(['OR' => [['Users.id' => $currentUserId], ['Users.parent_id' => $currentUserId]]]);\n\n\n if ($search != null) {\n $quotes->where(['customer_name LIKE' => '%' . $search . '%']);\n }\n if ($status != null) {\n $quotes->where(['status' => $status]);\n }\n\n\n $this->set(compact('quotes', 'search', 'status'));\n $this->set('_serialize', ['quotes', 'search', 'status']);\n }", "title": "" }, { "docid": "2ff7be4ea3d115eefbd028ea34a61f28", "score": "0.55607784", "text": "public function getOrdersItems();", "title": "" }, { "docid": "63eca3fc9fdad89019c7ad7e84d318f8", "score": "0.55458903", "text": "function get_orders(){\n\t}", "title": "" }, { "docid": "823422e8245857256350261c4c90a066", "score": "0.55253494", "text": "public function get_search_orders($range, $name){\n\n $where_r='';\n $where_n='';\n if($range==1){\n $where_r = ' ';\n }\n if($range==2){\n $where_r = ' AND (DATE(o.order_add) >= date_sub(date(now()), INTERVAL 1 week)) ';\n }\n if($range==3){\n $where_r = ' AND (DATE(o.order_add) = date(now())) ';\n }\n \n if(!empty($name)){\n $where_n = ' AND (p.name Like \"%'.$name.'%\"\n or Concat(u.first_name,u.family_name) Like \"%'.$name.'%\"\n ) '; \n }\n \n $res = \\DB::select('Select o.id,\n Concat(u.first_name,u.family_name) as uname, \n p.name, \n p.price,\n o.quantity, \n date(o.order_add) as order_add,\n case when (o.quantity >= 3 and p.id = 2) then \n ROUND((((p.price * o.quantity)/100)*80), 2) \n else\n ROUND((p.price * o.quantity) ,2)\n end as total\n From `order` o\n Left Join product p On p.id = o.product_id\n Left Join user u On u.id = o.user_id\n Where 1=1 \n '.$where_r.' \n '.$where_n.' Order by id desc' \n );\n\n return $res;\n \n }", "title": "" }, { "docid": "d3dd8f4126fca8405bc9e7e69d7c6ce1", "score": "0.5493556", "text": "function getAllOrderSalesrep($order)\n{\n\tglobal $readConnection;\n\n\t$sql = 'SELECT DISTINCT(salesrep_id) as salesrep_id FROM sales_flat_order_item WHERE order_id = ' .$order->getId();\n\n\t$result = $readConnection->query($sql);\n\n\treturn $result->fetchAll();\n}", "title": "" }, { "docid": "c474b914cffa5bee097142e1876a93b0", "score": "0.54905766", "text": "protected function queryOrder()\n {\n }", "title": "" }, { "docid": "ceb2463700664b80b85c71a9081473e3", "score": "0.54871196", "text": "function getOrders($p){\r\n $sql = '';\r\n $id = $this->esc($p['id']);\r\n $from = $this->esc($p['from']);\r\n $to = $this->esc($p['to']);\r\n $email = $this->esc($p['email']);\r\n \r\n if(!empty($from)) $sql .= \" and o.input >= '$from'\";\r\n if(!empty($to)) $sql .= \" and o.input <= '$to'\";\r\n if(!empty($id)) $sql .= ' and o.id = '. $id;\r\n if(!empty($email)) $sql .= \" and c.email = '$email'\";\r\n\r\n $r = $this->db->getAsoc(\"select o.id, c.fname, c.lname, o.total + o.ship_price as sum, o.pay_method, o.status, o.input from orders o join clients c on o.uid = c.id where 1=1 $sql order by o.status, o.id desc limit 100\");\r\n return $r;\r\n }", "title": "" }, { "docid": "44465a830c7becd06b441e4a0f6001c2", "score": "0.54298806", "text": "public function orderByName() {\n\t\treturn Client::orderBy('client_name')->get();\n\t}", "title": "" }, { "docid": "dd53ffb7ab6ecf2bb87960975521658a", "score": "0.54065865", "text": "public function getOrders(): array;", "title": "" }, { "docid": "633143a88b3a63e1059480e79e6ac582", "score": "0.5360425", "text": "public function listOrdersOrigin(){\n\t\t\n\t\t//$mysql = new Mysql();\n\t\t\n\t\t$query = \"SELECT o.idOrder as idOrder,o.orderNumber as orderNumber,o.orderTotal as orderTotal, o.dateTime as dateTime,c.name as name, c.lastName as lastName,\n\t\t\t\t\t\tc.customerNumber as customerNumber,c.email as email,c.phone as phone,c.address as address,c.city as city,c.country as country, c.title as title \n\t\t\t\t FROM orders as o,customer as c \n WHERE o.idCustomer = c.idCustomer AND o.status=0\";\n\t\t\n\t\t\n\t\t//$query = \"SELECT * FROM orders WHERE status=0\";\n\t\t\n\t\t\n\t\t//$query = \"SELECT * FROM orders WHERE status=0\";\n\t\t$sales = $this->mysql->query($query);\n\t\t\n\t\tif($sales[0]['o']['idOrder'] != 0 ){\n\t\t\t\n\t\t\t$res = $sales;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$res = FALSE;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "4620c33dcee3c280ecc3eb9d5f4c1267", "score": "0.5332415", "text": "function fused_get_all_user_orders($user_id,$status='completed'){\n if(!$user_id)\n return false;\n \n $orders=array();//order ids\n \n $args = array(\n 'numberposts' => -1,\n 'meta_key' => '_customer_user',\n 'meta_value' => $user_id,\n 'post_type' => 'shop_order',\n 'post_status' => 'publish',\n 'tax_query'=>array(\n array(\n 'taxonomy' =>'shop_order_status',\n 'field' => 'slug',\n 'terms' =>$status\n )\n ) \n );\n \n $posts=get_posts($args);\n //get the post ids as order ids\n $orders=wp_list_pluck( $posts, 'ID' );\n \n return $orders;\n \n}", "title": "" }, { "docid": "968f85114cf4553cb2fd5aec94b5e456", "score": "0.53278655", "text": "public function getFamilyByOrder($order)\n {\n $qb = $this->createQueryBuilder('s');\n\n $qb->select('s.famille')\n ->where('s.ordre = :order')\n ->setParameter('order', $order)\n ->distinct(true)\n ;\n\n return $qb\n ->getQuery()\n ->getArrayResult();\n }", "title": "" }, { "docid": "dde7161851502c29e01c4846873ca44d", "score": "0.53081805", "text": "function getOrderById($order_id) {\n\n\t\t$this->db->select(\"m.*,CONCAT_WS(' ',mem.first_name,mem.last_name) as dealer_name,,CONCAT_WS(' ',ad.first_name,ad.last_name) as approved_by_name\");\n\t\t$this->db->where(\"m.order_id\", $order_id);\n\t\t$this->db->join(\"tbl_members mem\", \"mem.member_id = m.created_by\", \"LEFT\");\n\t\t$this->db->join(\"tbl_members ad\", \"ad.member_id = m.approved_by\", \"LEFT\");\n\t\t// $this->db->join(\"tbl_users u\", \"u.user_id = m.user_id\");\n\t\t$query = $this->db->get(\"tbl_orders m\");\n\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->row_array();\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6194d1471085122af0398662a5b461a7", "score": "0.5297859", "text": "public function items($filters = null)\n {\n $orders = array();\n\n //TODO: add full name logic\n $billingAliasName = 'billing_o_a';\n $shippingAliasName = 'shipping_o_a';\n\n /** @var $orderCollection Mage_Sales_Model_Mysql4_Order_Collection */\n $orderCollection = Mage::getModel(\"sales/order\")->getCollection();\n $billingFirstnameField = \"$billingAliasName.firstname\";\n $billingLastnameField = \"$billingAliasName.lastname\";\n $shippingFirstnameField = \"$shippingAliasName.firstname\";\n $shippingLastnameField = \"$shippingAliasName.lastname\";\n $orderCollection->addAttributeToSelect('*')\n ->addAddressFields()\n ->addExpressionFieldToSelect('billing_firstname', \"{{billing_firstname}}\",\n array('billing_firstname' => $billingFirstnameField))\n ->addExpressionFieldToSelect('billing_lastname', \"{{billing_lastname}}\",\n array('billing_lastname' => $billingLastnameField))\n ->addExpressionFieldToSelect('shipping_firstname', \"{{shipping_firstname}}\",\n array('shipping_firstname' => $shippingFirstnameField))\n ->addExpressionFieldToSelect('shipping_lastname', \"{{shipping_lastname}}\",\n array('shipping_lastname' => $shippingLastnameField))\n ->addExpressionFieldToSelect('billing_name', \"CONCAT({{billing_firstname}}, ' ', {{billing_lastname}})\",\n array('billing_firstname' => $billingFirstnameField, 'billing_lastname' => $billingLastnameField))\n ->addExpressionFieldToSelect('shipping_name', 'CONCAT({{shipping_firstname}}, \" \", {{shipping_lastname}})',\n array('shipping_firstname' => $shippingFirstnameField, 'shipping_lastname' => $shippingLastnameField)\n );\n\n /** @var $apiHelper Mage_Api_Helper_Data */\n $apiHelper = Mage::helper('api');\n $filters = $apiHelper->parseFilters($filters, $this->_attributesMap['order']);\n try {\n foreach ($filters as $field => $value) {\n $orderCollection->addFieldToFilter($field, $value);\n }\n } catch (Mage_Core_Exception $e) {\n $this->_fault('filters_invalid', $e->getMessage());\n }\n foreach ($orderCollection as $order) {\n $orders[] = $this->_getAttributes($order, 'order');\n }\n return $orders;\n }", "title": "" }, { "docid": "5fc57b892619fd46dc04528c7d20a674", "score": "0.52829325", "text": "public function getOrders()\n {\n $orders = array();\n\n if($customer = $this->token->getUser()) \n {\n \n $salesOrders = $this->em->getRepository('FoggylineSalesBundle:SalesOrder')->findBy(\n array(\n 'customer'=>$customer \n )\n );\n \n $sales = array();\n foreach( $salesOrders as $salesOrder )\n {\n $orders[] = \n array(\n 'id'=>$salesOrder->getId(),\n 'date' => $salesOrder->getCreatedAt()->format('d/m/Y H:i:s'),\n 'ship'=> $salesOrder->getCustomerLastName(),\n 'orderTotal'=> $salesOrder->getTotalPrice().' Euro',\n 'status'=> $salesOrder-> getStatus(),\n 'action'=> array(\n array('lebel'=>'cancel',\n 'path' => $this->router->generate('foggyline_sales_order_cancel',\n array('id'=>$salesOrder->getId())),\n ),\n array('lebel'=>'Print ',\n 'path' => $this->router->generate('foggyline_sales_order_print',\n array('id'=>$salesOrder->getId())),\n ),\n )\n \n \n )\n \n ;\n \n \n }\n\n return $orders;\n \n \n }\n \n\n \n \n }", "title": "" }, { "docid": "57ee4bbe0c3e81291be112d0be051749", "score": "0.526345", "text": "function fetch_order_on_condition($query)\n {\n $this->db->select('*')->from($this->table);\n\n if(isset($query['order_id'])) {\n $this->db->where('order_id', $query['order_id']);\n }\n\n if(isset($query['restaurant_id'])) {\n $this->db->where('restaurant_id', $query['restaurant_id']);\n }\n\n $this->db->group_by('order_id')->order_by('order_id', 'desc');\n if(isset($query['limit'])) {\n $this->db->limit($query['limit'], 0);\n }\n $query = $this->db->get()->result_array();\n\n // with restaurant, user, template info\n foreach ($query as $key => $order) {\n $food_prices = $this->global_model->belong_to_many('order_foods', 'food_prices', 'order_id', $order['order_id'], 'food_price_id');\n foreach ($food_prices as $ke => $food_price) {\n $food_prices[$ke]['food'] = $this->global_model->has_one('foods', 'food_id', $food_price['food_id']);\n $food_prices[$ke]['food_size'] = $this->global_model->has_one('food_sizes', 'food_size_id', $food_price['food_size_id']);\n $order_food = $this->db->select('*')\n ->from('order_foods')\n ->where(array(\n 'order_id' => $order['order_id'],\n 'food_price_id' => $food_price['food_price_id']\n ))\n ->get()\n ->row_array();\n $food_prices[$ke]['aditional_price'] = $order_food['food_aditional_price'];\n\n $food_prices[$ke]['food_aditionals'] = $this->db->select('*')\n ->from('food_aditionals')\n ->where_in('food_aditional_id', explode(',', $order_food['food_aditional_id']))\n ->get()\n ->result_array();\n }\n $query[$key]['food_prices'] = $food_prices;\n $query[$key]['customer'] = $this->global_model->has_one('customers', 'customer_id', $order['customer_id']);\n $query[$key]['restaurant'] = $this->global_model->has_one('restaurants', 'restaurant_id', $order['restaurant_id']);\n }\n return $query;\n }", "title": "" }, { "docid": "f848aa62b925729c434c17928224ceb7", "score": "0.526321", "text": "public function getOrders($status = '')\r\n {\r\n $s = array();\r\n switch($status)\r\n {\r\n case 'cancelled': \r\n $s[] = 'cancelled';\r\n break;\r\n case 'complete':\r\n $s[] = 'complete'; \r\n break;\r\n case 'processing':\r\n $s = array('new','processed','sent','received'); \r\n default:\r\n break; \r\n }\r\n \r\n $str = '';\r\n if( count($s) > 0 ) \r\n { \r\n $str = implode(\"' or orders.status='\",$s );\r\n $str = \" AND ( orders.status='\".$str.\"' ) \"; \r\n }\r\n $return = array();\r\n $db = Zend_Registry::get('dbAdaptor');\r\n \r\n $return = $db -> fetchAll(\"\r\n select orders.id as order_id, \r\n address.addressId as address_id,\r\n orders.created as order_created,\r\n address.created as address_created,\r\n orders.*, \r\n address.* \r\n from orders\r\n left join address on address.addressId=orders.addressId\r\n where orders.customerId=\" . intval(Class_Customer::getData('entityId')) .$str.\"\r\n order by orders.created DESC\r\n \"\r\n ); \r\n return $return;\r\n }", "title": "" }, { "docid": "a7ae8023b05e8378cefc9778ab11b5df", "score": "0.5252139", "text": "function get_customer_orders($status, $billing_email) {\r\n $customer_orders = get_posts( array(\r\n 'meta_query' => array(\r\n 'relation' => 'AND',\r\n array(\r\n 'key' => '_billing_email',\r\n 'value' => $billing_email,\r\n ),\r\n array(\r\n 'key' => '_payment_method',\r\n 'value' => 'paymentwall',\r\n ),\r\n\r\n ),\r\n 'post_type' => 'shop_order',\r\n 'numberposts' => -1,\r\n 'post_status' => $status,\r\n \r\n ) );\r\n\r\n return $customer_orders;\r\n }", "title": "" }, { "docid": "827e4fcadd25e23151babb2cdd68bca7", "score": "0.52449936", "text": "function getOrders(){\n $conn = createConn();\n\n $query = $conn->prepare(\"\n SELECT o.OrderID, OrderDate, ExpectedDeliveryDate, Description, StockItemName, PickedQuantity, ol.UnitPrice \n FROM orders o\n JOIN orderlines ol ON o.OrderID = ol.OrderID \n JOIN stockitems si ON ol.StockItemID = si.StockItemID \n WHERE ContactPersonID = \" . $_SESSION[\"account\"][\"id\"]\n );\n\n $query->execute();\n $result = $query->get_result();\n\n $conn->close();\n\n if($result->num_rows > 0){\n return $result->fetch_all(MYSQLI_ASSOC);\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "ac2844424ed3abe9a60fa00950704717", "score": "0.5244328", "text": "function browse_order($param=array()){\n\t\t//defaul param\n\t\t//$start = 0; $end = 10;\t\n\t\tif(isset($param['start'])){\n\t\t$start = $param['start'] ;\n\t\t}\n\t\tif(isset($param['end'])){\n\t\t$end = $param['end'] ;\t\n\t\t}\n\n\t\t$this->db->select('a.id');\n\t\t$this->dodol->db_calc_found_rows();\n\t\t$this->db->from('store_order as a');\n\t\tif(isset($param['query'])){\n\t\t\t$term = array(\n\t\t\t\t'b.first_name' => $param['query'], \n\t\t\t\t'b.last_name' => $param['query'], \n\t\t\t\t'b.email' => $param['query'], \n\t\t\t\t'c.first_name' => $param['query'],\n\t\t\t\t'c.last_name' => $param['query']\n\t\t\t);\n\t\t\t$this->db->join('store_customer as b', 'b.id=a.customer_id' );\n\t\t\t$this->db->join('store_order_shipto_data as c', 'c.order_id=a.id' );\n\t\t\t$this->db->or_like($term);\n\t\t}\n\t\t// if order id set\n\t\tif(isset($param['order_id'])){\n\t\t\t$this->db->where('a.id', $param['order_id']);\n\t\t}\n\t\t// if search by order_status\n\t\tif(isset($param['status'])){\n\t\t\t$this->db->where('a.status', $param['status']);\n\t\t}\n\t\t$this->db->order_by('a.id', 'DESC');\n\t\t$q = $this->db->get('', $end, $start);\n\t\n\t\tif($q->num_rows() < 1){\n\t\t\treturn false;\n\t\t}else{\n\t\t\t$data['orders'] = $q->result();\n\t\t\t$data['number_rec'] = $this->dodol->db_found_rows();\n\t\t\treturn $data; \n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "558864b97b87dc25703cae2498330d11", "score": "0.5236629", "text": "public function getshippeddorders()\n{\n\t\n\t$this->load->model('sale/order');\n\t\n\t$cond = array();\n\t$orders = $this->model_sale_order->getshippeddorders($_POST['keyword']);\n\n}", "title": "" }, { "docid": "ad7432406e2695a5d277fb7b9d647832", "score": "0.52286464", "text": "public function queryOrder()\n {\n }", "title": "" }, { "docid": "8da7e2cc77d8ca7963f325437336002f", "score": "0.52169144", "text": "private function getOrderItems(){\n if($this->get_request_method() != \"POST\"){\n $this->response('',406);\n }\n $idPedido = trim($this->_request['id']);\n\n $pedidoRepository = $this->em->getRepository('Pedido');\n $lastOrder = $pedidoRepository->find($idPedido);\n $pedidoBebidaRepository = $this->em->getRepository('PedidoBebida');\n\n $pedido_items = $pedidoBebidaRepository->findBy(\n array('pedido' => $lastOrder),// Critere\n array('id' => 'asc')// tri\n );\n\n $this->response($this->json($pedido_items),200);\n\n }", "title": "" }, { "docid": "b54495e1f65c24fabdf9990429a43591", "score": "0.52156836", "text": "function jsonGetOrders() {\n\t\t\n\t\t\t//Controllo i permessi\n\t\t\tif (!DMUser::getUser()) {\n\t\t\t\tparent::outputError(-100);\n\t\t\t}\n\t\t\t\n\t\t\trequire_once(DM_APP_PATH . DS . 'helpers' . DS . 'orderhelper.php');\n\t\t\t\n\t\t\t$page = DMInput::getInt('page', 1);\n\t\t\t\n\t\t\t$searchParams = array();\n\t\t\t$searchParams['limit'] = DMInput::getInt('limit', 20);\n\t\t\t$searchParams['offset'] = DMInput::getInt('offset', $searchParams['limit'] * ($page - 1));\n\t\t\t\n\t\t\t$searchParams['orderDateFrom'] = DMFormat::formatDate(DMInput::getString('orderDateFrom', ''), 'Y-m-d', 'd/m/Y');\n\t\t\t$searchParams['orderDateTo'] = DMFormat::formatDate(DMInput::getString('orderDateTo', ''), 'Y-m-d', 'd/m/Y');\n\t\t\t$searchParams['order_archived'] = DMInput::getInt('order_archived', -1);\n\t\t\t\n\t\t\t$orders = FHOrderHelper::getOrders($searchParams, $totalResults);\n\t\t\t\n\t\t\tforeach ($orders as $order) {\n\t\t\t\t$order->order_date_str = DMFormat::formatDate($order->order_date, 'd/m/Y', 'Y-m-d');\n\t\t\t\tif ($order->order_archived) {\n\t\t\t\t\t$order->order_archived_str = 'Si';\n\t\t\t\t} else {\n\t\t\t\t\t$order->order_archived_str = 'No';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tparent::outputResult(ceil($totalResults / $searchParams['limit']), $orders, 'orders');\n\t\t\n\t\t}", "title": "" }, { "docid": "5e171a138f9c3bf58d7abb3216d1934b", "score": "0.518851", "text": "public function getOrdering();", "title": "" }, { "docid": "773220312e71b8f3f6e9c74c1d90eca8", "score": "0.51602715", "text": "public function findAllOrderedByName() {\n \n $qb = $this->getEntityManager()->createQueryBuilder();\n return $qb->select('c')\n ->from('AppBundle:Criteria', 'c')\n ->orderBy('c.name', 'ASC')\n ->getQuery()->getResult(); \n\n }", "title": "" }, { "docid": "40771c983f72e92550a562364a19ea47", "score": "0.511364", "text": "public function getOrders()\n {\n return $this->hasMany(Order::className(), ['created_by' => 'id']);\n }", "title": "" }, { "docid": "2f656d079e1837d4f1cbdcf11c902524", "score": "0.51122344", "text": "function pizza_register_all_orders( $where ) {\n \n global $nypizza, $wpdb;\n $table = $wpdb->prefix . $nypizza->register->table; \n \n $query = \"SELECT * FROM {$table} WHERE {$where}\";\n\n return $wpdb->get_results( $query );\n}", "title": "" }, { "docid": "ff8f3520b33ee3a8e3578b1d0bf57eb1", "score": "0.5109989", "text": "protected function pastOrdersSelection()\n {\n $members = $this->GroupMembers();\n $memberIDArray = array(-1);\n if ($members && $members->count()) {\n foreach ($members as $member) {\n $memberIDArray[$member->ID] = $member->ID;\n }\n }\n return DataObject::get(\n \"Order\",\n \"\\\"Order\\\".\\\"MemberID\\\" IN (\".implode(\",\", $memberIDArray).\") AND (\\\"CancelledByID\\\" = 0 OR \\\"CancelledByID\\\" IS NULL) \",\n \"\\\"Created\\\" DESC\",\n //why do we have this?\n \"INNER JOIN \\\"OrderAttribute\\\" ON \\\"OrderAttribute\\\".\\\"OrderID\\\" = \\\"Order\\\".\\\"ID\\\" INNER JOIN \\\"OrderItem\\\" ON \\\"OrderItem\\\".\\\"ID\\\" = \\\"OrderAttribute\\\".\\\"ID\\\"\"\n );\n }", "title": "" }, { "docid": "a219f7685786fe21f832a5e4fbe50505", "score": "0.5098689", "text": "private function getOrderInfos()\n {\n $shipment = $this->xpath->query('/order/shipment')->item(0);\n $offer = $this->xpath->query('./offer', $shipment)->item(0);\n $this->order['url'] = $this->xpath->query('./url', $offer)->item(0)->nodeValue;\n $this->order['mode'] = $this->xpath->query('./mode', $offer)->item(0)->nodeValue;\n $this->order['offer']['operator']['code'] = $this->xpath->query('./operator/code', $offer)->item(0)->nodeValue;\n $this->order['offer']['operator']['label'] =\n $this->xpath->query('./operator/label', $offer)->item(0)->nodeValue;\n $this->order['offer']['operator']['logo'] = $this->xpath->query('./operator/logo', $offer)->item(0)->nodeValue;\n $this->order['service']['code'] = $this->xpath->query('./service/code', $offer)->item(0)->nodeValue;\n $this->order['service']['label'] = $this->xpath->query('./service/label', $offer)->item(0)->nodeValue;\n $this->order['price']['currency'] = $this->xpath->query('./service/code', $offer)->item(0)->nodeValue;\n $this->order['price']['tax-exclusive'] =\n $this->xpath->query('./price/tax-exclusive', $offer)->item(0)->nodeValue;\n $this->order['price']['tax-inclusive'] =\n $this->xpath->query('./price/tax-inclusive', $offer)->item(0)->nodeValue;\n $this->order['collection']['code'] = $this->xpath->query('./collection/type/code', $offer)->item(0)->nodeValue;\n $this->order['collection']['type_label'] =\n $this->xpath->query('./collection/type/label', $offer)->item(0)->nodeValue;\n $this->order['collection']['date'] = $this->xpath->query('./collection/date', $offer)->item(0)->nodeValue;\n $time = $this->xpath->query('./collection/time', $offer)->item(0);\n if ($time) {\n $this->order['collection']['time'] = $time->nodeValue;\n } else {\n $this->order['collection']['time'] = '';\n }\n $this->order['collection']['label'] = $this->xpath->query('./collection/label', $offer)->item(0)->nodeValue;\n $this->order['delivery']['code'] = $this->xpath->query('./delivery/type/code', $offer)->item(0)->nodeValue;\n $this->order['delivery']['type_label'] =\n $this->xpath->query('./delivery/type/label', $offer)->item(0)->nodeValue;\n $this->order['delivery']['date'] = $this->xpath->query('./delivery/date', $offer)->item(0)->nodeValue;\n $time = $this->xpath->query('./delivery/time', $offer)->item(0);\n if ($time) {\n $this->order['delivery']['time'] = $time->nodeValue;\n } else {\n $this->order['delivery']['time'] = '';\n }\n $this->order['delivery']['label'] = $this->xpath->query('./delivery/label', $offer)->item(0)->nodeValue;\n $proforma = $this->xpath->query('./proforma', $shipment)->item(0);\n if ($proforma) {\n $this->order['proforma'] = $proforma->nodeValue;\n } else {\n $this->order['proforma'] = '';\n }\n $this->order['alerts'] = array();\n $alerts_nodes = $this->xpath->query('./alert', $offer);\n foreach ($alerts_nodes as $a => $alert) {\n $this->order['alerts'][$a] = $alert->nodeValue;\n }\n $this->order['chars'] = array();\n $char_nodes = $this->xpath->query('./characteristics/label', $offer);\n foreach ($char_nodes as $c => $char) {\n $this->order['chars'][$c] = $char->nodeValue;\n }\n $this->order['labels'] = array();\n $label_nodes = $this->xpath->query('./labels/label', $shipment);\n foreach ($label_nodes as $l => $label) {\n $this->order['labels'][$l] = trim($label->nodeValue);\n }\n }", "title": "" }, { "docid": "331720a2abb0e7a8926a898078f9d185", "score": "0.5096271", "text": "protected function query_orders( $args ) {\r\r\r\n\t\t$query_args = array(\r\r\r\n\t\t\t'fields' => 'ids',\r\r\r\n\t\t\t'post_type' => 'shop_order',\r\r\r\n\t\t\t'post_status' => array_keys( wc_get_order_statuses() )\r\r\r\n\t\t);\r\r\r\n\t\t// add status argument\r\r\r\n\t\tif ( ! empty( $args['status'] ) ) {\r\r\r\n\t\t\t$statuses = 'wc-' . str_replace( ',', ',wc-', $args['status'] );\r\r\r\n\t\t\t$statuses = explode( ',', $statuses );\r\r\r\n\t\t\t$query_args['post_status'] = $statuses;\r\r\r\n\t\t\tunset( $args['status'] );\r\r\r\n\t\t}\r\r\r\n\t\tif ( ! empty( $args['customer_id'] ) ) {\r\r\r\n\t\t\t$query_args['meta_query'] = array(\r\r\r\n\t\t\t\tarray(\r\r\r\n\t\t\t\t\t'key' => '_customer_user',\r\r\r\n\t\t\t\t\t'value' => absint( $args['customer_id'] ),\r\r\r\n\t\t\t\t\t'compare' => '='\r\r\r\n\t\t\t\t)\r\r\r\n\t\t\t);\r\r\r\n\t\t}\r\r\r\n\t\t$query_args = $this->merge_query_args( $query_args, $args );\r\r\r\n\t\treturn new WP_Query( $query_args );\r\r\r\n\t}", "title": "" }, { "docid": "e455fb67ee8d462d4b037bc3cbefac9e", "score": "0.50902164", "text": "public function getBatOrders();", "title": "" }, { "docid": "7978b11c4062ed8f2691472fa8517297", "score": "0.50874627", "text": "public function getOrderBy();", "title": "" }, { "docid": "31a6b4af07066638f3128f7c01cded01", "score": "0.5075651", "text": "function pizza_pos_all_orders( $where ) {\n\t\n\tglobal $nypizza, $wpdb;\n\t$table = $wpdb->prefix . $nypizza->pos->table;\t\n\t\n\t$query = \"SELECT * FROM {$table} WHERE {$where}\";\n\n\treturn $wpdb->get_results( $query );\n}", "title": "" }, { "docid": "9a461f8e6362d69bf4d804dd40e084a9", "score": "0.50646174", "text": "public function getorderforuser($username){\n\t\t\t // $userid=$this->db->query('SELECT * FROM `user` WHERE `user_accnum`='.$username.'');\n\n\t\t\t\t \n\t\t\t // $order=$this->db->query(' select * FROM `orders` where `'.$userid.'` = 1 ORDER BY `orders`.`ord_created_at` DESC limit 0,1;');\n\n\t\t\t // $oderdetal=$this->db->query('SELECT * FROM `ordersdetailed` WHERE `ord_createid`='.$order[0]['ord_createid'].'');\n\n\t\t\t\t// $odercont =$this->db->query(SELECT * FROM `ord_contactuser` WHERE `ord_cont_ordcreateid`='.$order[0]['ord_createid'].');\n\n\n\n\t\t}", "title": "" }, { "docid": "30ee347f79823a6ec07108c5fbe905e5", "score": "0.5051452", "text": "public function searchOrders($condition, $order = null, $limit = null, $offset = null) {\n\t\tif (strpos($condition, 'orders.store_id=') === false) {\n\t\t\t$condition.=('&orders.store_id='.$this->id);\n\t\t}\n\t\treturn Model_Sellcast::searchOrders($condition, $order, $limit, $offset);\n\t}", "title": "" }, { "docid": "a957706c3418cf7481ffb0aa5a9f2a3b", "score": "0.50400186", "text": "function get_orders($status = null) {\n \n //echo '<pre>'; print_r($this->input->post()); die();\n \n // database column for searching\n $db_column = array('o.order_id', 'o.order_created_date', 'c.customer_first_name', 'c.customer_last_name', 'o.prod_ordered_total', 'os.status_name', 'smsData');\n //$db_column = array('o.order_id', 'o.order_created_date', 'c.customer_id','c.customer_first_name', 'c.customer_last_name', 'o.prod_ordered_total', 'o.order_status', 'smsData');\n \n // load product model\n $this->load->model('admin/order_model');\n \n // *****************************************\n // start: get all product or search product\n // *****************************************\n $db_where_column = array();\n $db_where_value = array();\n $db_where_column_or = array();\n $db_where_value_or = array();\n $db_limit = array();\n $db_order = array();\n \n /***** start: record length and start *****/\n if($this->input->post('length') != '-1') {\n $db_limit['limit'] = $this->input->post('length');\n $db_limit['pageStart'] = $this->input->post('start');\n }\n // end: get data order by\n \n /***** start: get data order by *****/\n $order = $this->input->post('order');\n \n if($order) {\n foreach($order as $key => $get_order) {\n \n if($get_order['column'] >= 4) {\n $db_order[$key]['title'] = $db_column[$get_order['column']];\n $db_order[$key]['order_by'] = $get_order['dir'];\n }\n else {\n $db_order[$key]['title'] = $db_column[$get_order['column']-1];\n $db_order[$key]['order_by'] = $get_order['dir'];\n }\n \n } \n }\n // end: get data order by\n \n /***** start: top search data by equal to *****/\n if($this->input->post('top_search_like')) {\n \n //echo '<pre>';\n foreach($this->input->post('top_search_like') as $key => $search_val) {\n\n if(preg_match('/order/', $key)) { //echo 'REHMAN'; echo '<br />';\n\n $search_key = substr($key, 6);\n \n if(!empty($search_val)) { \n if($search_key == \"order_created_date\"){ \n // Change the date format to get exact date for searching \n $search_val = date(\"Y-m-d\", strtotime($search_val));\n }\n $db_where_column[] = 'o.'.$search_key . ' LIKE';\n $db_where_value[] = '%' . $search_val . '%';\n }\n\n }\n \n if(preg_match('/cus/', $key)) { //echo 'ZIA'; echo '<br />';\n\n $search_key = substr($key, 4);\n \n if(!empty($search_val)) {\n \n if($search_key == 'customer_name')\n $db_where_column[] = \"concat(c.customer_first_name , ' ' , c.customer_last_name) LIKE\";\n else\n $db_where_column[] = 'c.'.$search_key . ' LIKE';\n \n $db_where_value[] = '%' . $search_val . '%';\n \n }\n\n }\n\n }\n }\n \n //echo '<pre>'; print_r($db_where_column);\n //echo '<pre>'; print_r($db_where_value);\n \n if($this->input->post('top_search')) {\n foreach($this->input->post('top_search') as $key => $search_val) {\n\n if(preg_match('/order/', $key)) { //echo 'REHMAN 11'; echo '<br />';\n\n $search_key = substr($key, 6);\n \n if(!empty($search_val)) {\n if($search_key == 'order_status'){\n $search_val =$this->order_model->getOrderStatusByName($search_val);\n }\n\n if($search_key == 'order_created_date') {\n $db_where_column[] = 'o.'.$search_key.' LIKE';\n $db_where_value[] = date(\"Y-m-d\", strtotime($search_val)) . '%';\n }\n else {\n $db_where_column[] = 'o.'.$search_key;\n $db_where_value[] = $search_val;\n }\n \n \n }\n\n }\n\n }\n }\n //die();\n // end: top search data by equal to\n \n /***** start: search data by like *****/\n $search = $this->input->post('search');\n \n if($search['value'] != '') {\n foreach($db_column as $value) {\n $db_where_column_or[] = $value . ' LIKE';\n $db_where_value_or[] = '%' . $search['value'] . '%';\n }\n }\n // end: search data by like\n \n $dataRecord = $this->order_model->get_order($db_where_column, $db_where_value, $db_where_column_or, $db_where_value_or, $db_limit, $db_order);\n \n $dataCount = $this->order_model->get_order($db_where_column, $db_where_value, $db_where_column_or, $db_where_value_or);\n // end: get all product or search product\n \n //$dt_column = array('order_id', 'order_created_date', 'customer_first_name', 'prod_ordered_total', 'order_status', 'smsData');\n $dt_column = array('order_id', 'order_created_date', 'customer_first_name', 'prod_ordered_total', 'status_name', 'smsData');\n\n $data = array();\n $i = 0;\n \n if($dataRecord) {\n \n $view = NULL;\n $edit = \"admin/order/edit_order/\";\n $remove = \"admin/order/delete_order/\";\n $btn_arr_responce = $this->create_action_array($view,$edit,$remove); \n \n foreach($dataRecord as $key => $value) {\n \n $btn_array_checked_checkbox = \"admin/order/delete_checked_checkbox/\";\n $checkbox = \"\";\n if(!$this->flexi_auth->is_privileged($this->menu_model->get_privilege_name($btn_array_checked_checkbox))){\n $checkbox=\"disabled\";\n }\n $data[$i][] = '<div class=\"checkbox-table\"><label>\n <input type=\"checkbox\" '.$checkbox.' name=\"product['.$value['order_id'].']\" class=\"flat-grey deleteThis\">\n </label></div>';\n \n foreach($dt_column as $get_dt_column) {\n \n if($get_dt_column == 'order_created_date') {\n $data[$i][] = date(\"d-m-Y\", strtotime($value['order_created_date']));\n }\n else if($get_dt_column == 'customer_first_name') {\n $data[$i][] = $value['customer_first_name'] . ' ' . $value['customer_last_name'];\n }\n else if($get_dt_column == 'prod_ordered_total') {\n $data[$i][] = number_format($value['prod_ordered_total'], 2);\n }\n else if($get_dt_column == 'smsData') {\n \n $sms_status = \"\";\n if ($value['smsData']) {\n foreach ($value['smsData'] as $recoardKey => $sms_record) {\n if ($sms_record['action'] == 'sendmessage') {\n $sms_status = \"Sent\";\n }\n if ($sms_record['action'] == 'receivemessage') {\n $sms_status = \"Confirmed\";\n }\n }\n }\n \n $data[$i][] = $sms_status;\n }\n else {\n $data[$i][] = $value[$get_dt_column];\n }\n \n }\n\n /***** start: delete and edit button *****/\n $action_btn = '';\n \n $action_btn .= '<div class=\"visible-md visible-lg hidden-sm hidden-xs\">';\n \n $btn_array_view = \"admin/order/view_detail/\";\n if($this->flexi_auth->is_privileged($this->menu_model->get_privilege_name($btn_array_view)))\n $action_btn .= '<a href=\"'.base_url().'admin/order/view_detail/'.$value['customer_id'].'/'. $value['order_id'].'\" class=\"edit_btn btn btn-xs btn-teal tooltips\" data-placement=\"top\" data-original-title=\"View\"><i class=\"fa fa-arrow-circle-right\"></i></a>'; \n \n $action_btn .= $this->create_action_buttons($btn_arr_responce,$value['order_id']);\n \n /*\n // Check user has privileges to View order, else display a message to notify the user they do not have valid privileges.\n if($this->flexi_auth->is_privileged('View Order'))\n $action_btn .= '<a href=\"'.base_url().'admin/order/view_detail/'.$value['customer_id'].'/'. $value['order_id'].'\" class=\"edit_btn btn btn-xs btn-teal tooltips\" data-placement=\"top\" data-original-title=\"View\"><i class=\"fa fa-arrow-circle-right\"></i></a>'; \n \n \n // Check user has privileges to edit order, else display a message to notify the user they do not have valid privileges.\n if($this->flexi_auth->is_privileged('Edit Order'))\n $action_btn .= '<a href=\"'.base_url().'admin/order/edit_order/'.$value['order_id'].'\" class=\"edit_btn btn btn-xs btn-teal tooltips\" data-placement=\"top\" data-original-title=\"Edit\"><i class=\"fa fa-edit\"></i></a>';\n\n // Check user has privileges to delete order, else display a message to notify the user they do not have valid privileges.\n if($this->flexi_auth->is_privileged('Delete Order'))\n $action_btn .= '<a href=\"'.base_url().'admin/order/delete_order/'.$value['order_id'].'\" class=\"btn btn-xs btn-bricky tooltips\" data-placement=\"top\" data-original-title=\"Remove\"><i class=\"fa fa-times fa fa-white\"></i></a>';\n */\n $action_btn .= '</div>';\n \n $data[$i][] = $action_btn;\n // end: delete and edit button\n \n $i++;\n }\n }\n \n $this->data['datatable']['draw'] = $this->input->post('draw');\n $this->data['datatable']['recordsTotal'] = count($dataCount);\n $this->data['datatable']['recordsFiltered'] = count($dataCount);\n $this->data['datatable']['data'] = $data;\n \n //echo '<pre>'; print_r($this->data['datatable']); die();\n \n echo json_encode($this->data['datatable']);\n \n }", "title": "" }, { "docid": "ee4577cee41a49193f51b779813693b7", "score": "0.503282", "text": "function getOrders($rows) {\r\n\r\n\t\t/*\r\n\t\t\tformato orders_V....csv\r\n\t\t\tNro,Tipo,Nro Prov,Nro Suc Prov,Tienda,Estado,Emision,Entrega,Planific Entrega,Planificación,Import,Total Import,Cant Total,Cant Pallet,Cant Camadas,Cod Art Prov,Cod Art Makro,Cant Recebida,Cant Pedida,1era Compra,Costo,Costo Neto,Folder\r\n\t\t*/\t\r\n\t\t$orders = array();\t\t\t\t\r\n\t\tforeach ($rows as $row) {\t\t\t\t\t\t\r\n\t\t\tif ( !empty($row[0]) && is_numeric($row[0]) && !empty($row[15]) && !empty($row[18]) && !empty($row[21]) && !empty($row[6]) && !empty($row[4]) ) {\r\n\t\t\t\t$item = array();\r\n\t\t\t\t$item[\"orderNumber\"] = $row[0].$row[4];\r\n\t\t\t\t$item[\"productCode\"] = str_pad($row[15], strlen($row[15])+1, \"0\", STR_PAD_LEFT);\r\n\t\t\t\t$item[\"affiliateProductCode\"] = $row[16];\r\n\t\t\t\t$item[\"quantity\"] = $row[18];\r\n\t\t\t\t$item[\"price\"] = $row[21];\r\n\t\t\t\t//si todavia no se cargo la informacion de la orden esa\r\n\t\t\t\tif ( !isset($orders[$item[\"orderNumber\"]]) ) {\r\n\t\t\t\t\t$order = array();\r\n\t\t\t\t\t$order[\"number\"] = $row[0].$row[4];\r\n\t\t\t\t\t$order[\"created\"] = $row[6];\r\n\t\t\t\t\t$order[\"branchNumber\"] = $row[4];\r\n\t\t\t\t\t$order[\"modifiedProductCodes\"] = true;\r\n\t\t\t\t\t$orders[$order[\"number\"]] = $order;\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t$orders[$item[\"orderNumber\"]][\"items\"][] = $item;\r\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $orders;\r\n\t}", "title": "" }, { "docid": "d3583a7a5584ce2ab98d02b7e132d2dc", "score": "0.5031554", "text": "public function getUser($order)\n {\n $user = [];\n $billing = $order->getBillingAddress();\n $email = $order->getBillingAddress()->getEmail();\n\n $billingStreet = '';\n\n foreach ($billing->getStreet() as $street) {\n $billingStreet .= $street . ' ';\n }\n\n $user['CRITERION.GUEST'] = $order->getCustomer()->getId() == 0 ? 'true' : 'false';\n\n $user['NAME.COMPANY'] = ($billing->getCompany() === false) ? null : trim($billing->getCompany());\n $user['NAME.GIVEN'] = trim($billing->getFirstname());\n $user['NAME.FAMILY'] = trim($billing->getLastname());\n $user['ADDRESS.STREET'] = trim($billingStreet);\n $user['ADDRESS.ZIP'] = trim($billing->getPostcode());\n $user['ADDRESS.CITY'] = trim($billing->getCity());\n $user['ADDRESS.COUNTRY'] = trim($billing->getCountryId());\n $user['CONTACT.EMAIL'] = trim($email);\n\n return $user;\n }", "title": "" }, { "docid": "51b81d7c847bab89e8ea68e3ffff9d40", "score": "0.5027379", "text": "public function findAllOrderedByName()\n {\n return $this->createQueryBuilder()\n ->sort('name', 'ASC')\n ->getQuery()\n ->execute();\n }", "title": "" }, { "docid": "3c94bade1448b1fc0441d0e48122d1d9", "score": "0.50252104", "text": "public function findAllOrderedByName()\n {\n return $this->createQueryBuilder()\n ->orderBy('name', 'ASC')\n ->getResult();\n }", "title": "" }, { "docid": "1a56c4b5e5c11e907b436a877dde3f3f", "score": "0.5007117", "text": "public function itemslist($incrementIds)\n {\n $billingAliasName = 'billing_o_a';\n $shippingAliasName = 'shipping_o_a';\n\n $collection = Mage::getModel(\"sales/order\")->getCollection()\n ->addAttributeToSelect('*')\n ->addAddressFields()\n ->addAttributeToFilter('increment_id', array(\n 'in' => $incrementIds\n ))\n ->addExpressionFieldToSelect(\n 'billing_firstname', \"{{billing_firstname}}\", array('billing_firstname'=>\"$billingAliasName.firstname\")\n )\n ->addExpressionFieldToSelect(\n 'billing_lastname', \"{{billing_lastname}}\", array('billing_lastname'=>\"$billingAliasName.lastname\")\n )\n ->addExpressionFieldToSelect(\n 'shipping_firstname', \"{{shipping_firstname}}\",\n array('shipping_firstname'=>\"$shippingAliasName.firstname\")\n )\n ->addExpressionFieldToSelect(\n 'shipping_lastname', \"{{shipping_lastname}}\", array('shipping_lastname'=>\"$shippingAliasName.lastname\")\n )\n ->addExpressionFieldToSelect(\n 'billing_name',\n \"CONCAT({{billing_firstname}}, ' ', {{billing_lastname}})\",\n array(\n 'billing_firstname'=>\"$billingAliasName.firstname\",\n 'billing_lastname'=>\"$billingAliasName.lastname\"\n )\n )\n ->addExpressionFieldToSelect(\n 'shipping_name',\n 'CONCAT({{shipping_firstname}}, \" \", {{shipping_lastname}})',\n array(\n 'shipping_firstname'=>\"$shippingAliasName.firstname\",\n 'shipping_lastname'=>\"$shippingAliasName.lastname\"\n )\n );\n\n /* if (is_array($filters)) {\n try {\n foreach ($filters as $field => $value) {\n if (isset($this->_attributesMap['order'][$field])) {\n $field = $this->_attributesMap['order'][$field];\n }\n\n $collection->addFieldToFilter($field, $value);\n }\n } catch (Mage_Core_Exception $e) {\n $this->_fault('filters_invalid', $e->getMessage());\n }\n }*/\n\n $finalresult = array();\n\n foreach ($collection as $order) {\n\n\t$result = array();\n\n $result[] = $this->_getAttributes($order, 'order');\n $result['shipping_address'] = $this->_getAttributes($order->getShippingAddress(), 'order_address');\n $result['billing_address'] = $this->_getAttributes($order->getBillingAddress(), 'order_address');\n $result['items'] = array();\n\n foreach ($order->getAllItems() as $item) {\n if ($item->getGiftMessageId() > 0) {\n $item->setGiftMessage(\n Mage::getSingleton('giftmessage/message')->load($item->getGiftMessageId())->getMessage()\n );\n }\n\n $result['items'][] = $this->_getAttributes($item, 'order_item');\n }\n\n $result['payment'] = $this->_getAttributes($order->getPayment(), 'order_payment');\n\n $result['status_history'] = array();\n\n foreach ($order->getAllStatusHistory() as $history) {\n $result['status_history'][] = $this->_getAttributes($history, 'order_status_history');\n }\n\n\t$finalresult['orders'][] = $result;\n }\n\n return $finalresult;\n }", "title": "" }, { "docid": "0d901af712752a39c030ddee5d678a59", "score": "0.49966046", "text": "public function getNameOfThePersonWhoOrder($orderID) {\n // Gets the first and lastname of the person who ordered and returns it as a string\n $db = new db();\n $s = new Security();\n\n $sql = \"SELECT klant_voornaam, klant_achternaam FROM `Order` WHERE idOrder=:orderID\";\n $input = array(\n \"orderID\" => $s->checkInput($orderID)\n );\n $result = $db->readData($sql, $input);\n\n foreach ($result as $key) {\n if (!ISSET($key['klant_tussenvoegsel'])) {\n // If the customer don't have a tussenvoegels we need to clear it\n // That it because other wise it will be saying NULL\n $key['klant_tussenvoegsel'] = '';\n }\n else {\n $key['klant_tussenvoegsel'] .= ' ';\n }\n return($key['klant_voornaam'] . ' ' . $key['klant_tussenvoegsel'] . $key['klant_achternaam']);\n }\n }", "title": "" }, { "docid": "b36a544f30a48d256febbe81331dcf2b", "score": "0.49956483", "text": "public function listCompaniesByFirstLetter()\r\n\t{\r\n\t\t$sql = $this->select()\r\n\t\t\t->distinct(\"LEFT(name,1)\")\r\n \t\t->from(array('company'=>'company'),array('LEFT(name,1) as letter'))\r\n \t\t\t->order('name');\r\n \t\t\t//echo $sql;\r\n \t//echo sprintf(\"%s\",$sql);\r\n return $this->fetchAll($sql);\r\n\t}", "title": "" }, { "docid": "448f52606a52a1b102e7cf53f669b930", "score": "0.49918264", "text": "public function getOrderDetails(Request $request) {\n $page_size = $request->get('page_size') ? $request->get('page_size') : 10;\n $current_page = $request->get('current_page') ? $request->get('current_page') : 1;\n// $start = $request->get('start') ? $request->get('start') : 1;\n// $end = $request->get('end') ? $request->get('end') : 10;\n $skip = ($current_page - 1) * $page_size;\n// $take = ($end - $start) + 1;\n\n $filter_array = array(\n 'date' => $request->get('date'),\n 'ids' => $request->get('ids'),\n 'status' => $request->get('status'),\n );\n\n $orders = Order::Where(function($query) use ($filter_array) {\n if ($filter_array['ids'] != null && $filter_array['ids'] != null) {\n $ids = explode(',', $filter_array['ids']);\n if (count($ids) == 2) {\n $query->whereBetween('id', $ids);\n } else {\n $query->where('id', $ids[0]);\n }\n }\n if ($filter_array['date'] != null && $filter_array['date'] != null) {\n $dates = explode(',', $filter_array['date']);\n if (count($dates) == 2) {\n $dates[1] = date('Y-m-d', strtotime('+1 day', strtotime($dates[1])));\n $query->whereBetween('created_at', $dates);\n } else {\n $query->where('created_at', 'like', $dates[0] . '%');\n }\n }\n if ($filter_array['status'] != null) {\n $query->Where('order_status', $filter_array['status']);\n }\n })->latest('created_at')->skip($skip)->take($page_size)->get();\n $total_order = Order::count();\n $order_array = array();\n if (!empty($orders->toArray())) {\n foreach ($orders as $key => $value) {\n $shipping_address = json_decode($value->shipping_address);\n $billing_address = json_decode($value->billing_address);\n\n\n $item_array = array();\n foreach ($value->getOrderDetailById as $k => $val) {\n $item_array[$k]['item_id'] = $val->id;\n $item_array[$k]['item_url'] = url('/products/' . $val->getProduct->product_slug);\n $item_array[$k]['track_number'] = $val->track_id != null ? $val->track_id : '';\n $item_array[$k]['track_url'] = $val->track_url != null ? $val->track_url : '';\n $item_array[$k]['product_name'] = $val->product_name;\n $item_array[$k]['sku_number'] = $val->sku_number;\n $item_array[$k]['quantity'] = $val->quantity;\n $item_array[$k]['price'] = $val->total_price - ($val->total_price * $val->discount / 100);\n $item_array[$k]['discount'] = $val->discount != null ? $val->discount : '';\n $item_array[$k]['ship_carrier'] = $val->ship_carrier != null ? $val->ship_carrier : '';\n $item_array[$k]['ship_date'] = $val->ship_date != null ? date('Y-m-d', strtotime($val->ship_date)) : '';\n $item_array[$k]['notes'] = $val->notes != null ? $val->notes : '';\n }\n $order_array['total_orders'] = $total_order;\n $order_array['page_size'] = $page_size;\n $order_array['total_pages'] = ceil($total_order / $page_size);\n $order_array['current_page'] = $current_page;\n $order_array['orders'][$key] = array(\n 'order_id' => $value->id,\n 'order_date' => date('Y-m-d', strtotime($value->created_at)),\n 'customer_name' => $shipping_address->first_name . ' ' . $shipping_address->last_name,\n 'customer_email' => $value->email,\n 'ship_price' => $value->ship_price != null ? $value->ship_price : '',\n 'tax' => $value->tax_rate != null ? $value->tax_rate : '',\n 'total_price' => $value->total_price,\n 'shipping_method' => $value->shipping_method,\n 'payment_method' => $value->payment_method,\n 'billing_address1' => $billing_address->address1,\n 'billing_address2' => $billing_address->address2,\n 'billing_city' => $billing_address->city,\n 'billing_state' => $billing_address->state_name,\n 'billing_zip' => $billing_address->zip,\n 'billing_country' => $billing_address->country_name,\n 'shipping_address1' => $shipping_address->address1,\n 'shipping_address2' => $shipping_address->address2,\n 'shipping_city' => $shipping_address->city,\n 'shipping_state' => $shipping_address->state_name,\n 'shipping_zip' => $shipping_address->zip,\n 'shipping_country' => $shipping_address->country_name,\n 'status' => $value->order_status,\n 'items' => $item_array,\n );\n }\n } else {\n return array();\n }\n return $order_array;\n }", "title": "" }, { "docid": "2e323d0e619125168a5804d647f1b450", "score": "0.49857774", "text": "public function findByFirstName($firstName) {\n\n\treturn $this->createQueryBuilder()\n\t\t\t\t\t->field('name.first')->equals($firstName)\n\t\t\t\t\t->sort('name', 'ASC')\n\t\t\t\t\t->getQuery()\n\t\t\t\t\t->execute();\n }", "title": "" }, { "docid": "767b4956148d1001b87c3e6246ed055a", "score": "0.4971304", "text": "function Fetch_DB_Orders($datefrom,$dateto)\n\t{\n\t\t$order_status_filter=$this->PrepareOscommerceOrderStatusFilter();\n\t\t\n\t\t$search=$order_status_filter.\" (( DATE_FORMAT(last_modified,\\\"%Y-%m-%d %T\\\") between '\".$this->MakeSqlSafe($this->GetServerTimeLocal(true,$datefrom)).\"' and '\".$this->MakeSqlSafe($this->GetServerTimeLocal(true,$dateto)).\"') OR ( DATE_FORMAT(date_purchased,\\\"%Y-%m-%d %T\\\") between '\".$this->MakeSqlSafe($this->GetServerTimeLocal(true,$datefrom)).\"' and '\".$this->MakeSqlSafe($this->GetServerTimeLocal(true,$dateto)).\"'))\";\n\n\t\t$orders_query_raw = \"select orders_id from \".TABLE_ORDERS.\" where \".$search .\" order by orders_id DESC\";\n\t\t\n\t\t\t \n\t\t$oscommerce_orders_res = tep_db_query($orders_query_raw);\n\t\t$counter=0;\n\t\twhile ($oscommerce_orders_row=tep_db_fetch_array($oscommerce_orders_res)) \n\t\t{\n\t\t\t$oscommerce_orders_temp=new order($this->GetFieldNumber($oscommerce_orders_row,\"orders_id\"));\n\t\t\t//print_r($oscommerce_orders_temp);exit;\n\t\t\t//prepare order array\n\t\t\t$this->oscommerce_orders[$counter]->orderid=$this->GetFieldNumber($oscommerce_orders_row,\"orders_id\");\n\t\t\t$this->oscommerce_orders[$counter]->num_of_products=count($this->GetClassProperty($oscommerce_orders_temp,\"products\"));\n\t\t\t\n\t\t\t//shipping details\n\t\t\t$this->oscommerce_orders[$counter]->order_shipping[\"FirstName\"]=$this->GetFieldString($oscommerce_orders_temp->delivery,\"name\");\n\t\t\t$this->oscommerce_orders[$counter]->order_shipping[\"LastName\"]=\"\";\n\t\t\t$this->oscommerce_orders[$counter]->order_shipping[\"Company\"]=$this->GetFieldString($oscommerce_orders_temp->delivery,\"company\");\n\t\t\t$this->oscommerce_orders[$counter]->order_shipping[\"Address1\"]=$this->GetFieldString($oscommerce_orders_temp->delivery,\"street_address\");\n\t\t\t\n\t\t\t$this->oscommerce_orders[$counter]->order_shipping[\"Address2\"]=$this->GetFieldString($oscommerce_orders_temp->delivery,\"suburb\");\n\t\t\t$this->oscommerce_orders[$counter]->order_shipping[\"City\"]=$this->GetFieldString($oscommerce_orders_temp->delivery,\"city\");\n\t\t\t$this->oscommerce_orders[$counter]->order_shipping[\"State\"]=$this->GetFieldString($oscommerce_orders_temp->delivery,\"state\");\n\t\t\t$this->oscommerce_orders[$counter]->order_shipping[\"PostalCode\"]=$this->GetFieldString($oscommerce_orders_temp->delivery,\"postcode\");\n\t\t\t$this->oscommerce_orders[$counter]->order_shipping[\"Country\"]=$this->GetFieldString($oscommerce_orders_temp->delivery,\"country\");\n\t\t\t$this->oscommerce_orders[$counter]->order_shipping[\"Phone\"]=$this->GetFieldString($oscommerce_orders_temp->customer,\"telephone\");\n\t\t\t$this->oscommerce_orders[$counter]->order_shipping[\"EMail\"]=$this->GetFieldString($oscommerce_orders_temp->customer,\"email_address\");\n\t\t\t\n\t\t\t//billing details\n\t\t\t$this->oscommerce_orders[$counter]->order_billing[\"FirstName\"]=$this->GetFieldString($oscommerce_orders_temp->billing,\"name\");\n\t\t\t$this->oscommerce_orders[$counter]->order_billing[\"LastName\"]=\"\";\n\t\t\t$this->oscommerce_orders[$counter]->order_billing[\"Company\"]=$this->GetFieldString($oscommerce_orders_temp->billing,\"company\");\n\t\t\t$this->oscommerce_orders[$counter]->order_billing[\"Address1\"]=$this->GetFieldString($oscommerce_orders_temp->billing,\"street_address\");\n\t\t\t$this->oscommerce_orders[$counter]->order_billing[\"Address2\"]=$this->GetFieldString($oscommerce_orders_temp->billing,\"suburb\");\n\t\t\t$this->oscommerce_orders[$counter]->order_billing[\"City\"]=$this->GetFieldString($oscommerce_orders_temp->billing,\"city\");\n\t\t\t$this->oscommerce_orders[$counter]->order_billing[\"State\"]=$this->GetFieldString($oscommerce_orders_temp->billing,\"state\");\n\t\t\t$this->oscommerce_orders[$counter]->order_billing[\"PostalCode\"]=$this->GetFieldString($oscommerce_orders_temp->billing,\"postcode\");\n\t\t\t$this->oscommerce_orders[$counter]->order_billing[\"Country\"]=$this->GetFieldString($oscommerce_orders_temp->billing,\"country\");\n\t\t\t$this->oscommerce_orders[$counter]->order_billing[\"Phone\"]=$this->GetFieldString($oscommerce_orders_temp->customer,\"telephone\");\n\t\t\t\n\t\t\t//order info\n\t\t\t$this->oscommerce_orders[$counter]->order_info[\"OrderDate\"]=$this->ConvertServerTimeToUTC(true,strtotime($this->GetFieldString($oscommerce_orders_temp->info,\"date_purchased\")));\n\t\t\t$key_for_shipdetails=1;\n\t\t $this->oscommerce_orders[$counter]->order_info[\"ShippingChargesPaid\"]=$this->FormatNumber(substr($this->GetFieldNumber($oscommerce_orders_temp->totals,\"text\",$key_for_shipdetails),1));\n\t\t\t$this->oscommerce_orders[$counter]->order_info[\"ShipMethod\"]=$this->GetFieldString($oscommerce_orders_temp->totals,\"title\",$key_for_shipdetails);\n\t\t\t$this->oscommerce_orders[$counter]->order_info[\"ShipMethod\"]=str_replace(\":\",\"\",$this->oscommerce_orders[$counter]->order_info[\"ShipMethod\"]);\n\t\t\t\n\t\t\t$this->oscommerce_orders[$counter]->order_info[\"OrderNumber\"]=$this->GetFieldNumber($oscommerce_orders_row,\"orders_id\");\n\t\t\t\n\t\t\t$this->oscommerce_orders[$counter]->order_info[\"PaymentType\"]=$this->ConvertPaymentType($this->GetFieldString($oscommerce_orders_temp->info,\"payment_method\"));\n\t\t\t\n\t\t\tif($this->GetFieldNumber($oscommerce_orders_temp->info,\"orders_status\")!=\"1\")\n\t\t\t\t$this->oscommerce_orders[$counter]->order_info[\"PaymentStatus\"]=2;\n\t\t\telse\n\t\t\t\t$this->oscommerce_orders[$counter]->order_info[\"PaymentStatus\"]=0;\n\t\t\t\n\t\t\t//Show Order status\t\n\t\t\tif($this->GetFieldNumber($oscommerce_orders_temp->info,\"orders_status\")==\"3\")\n\t\t\t\t$this->oscommerce_orders[$counter]->order_info[\"IsShipped\"]=1;\n\t\t\telse\n\t\t\t\t$this->oscommerce_orders[$counter]->order_info[\"IsShipped\"]=0;\n\t\t\t\n\t\t\t//Get Customer Comments\n\t\t\t$res_order_details = tep_db_query(\"SELECT * FROM \".TABLE_ORDERS_STATUS_HISTORY.\" WHERE orders_id=\".$this->oscommerce_orders[$counter]->orderid.\" order by orders_status_history_id\");\n\t\t\t$row_order_details=tep_db_fetch_array($res_order_details);\n\t\t\t$this->oscommerce_orders[$counter]->order_info[\"Comments\"]=$this->MakeXMLSafe($this->GetFieldString($row_order_details,\"comments\"));\n\t\t\t\n\t\t\t//Get order products\n\t\t\t$items_cost=0;\n\t\t\t$items_tax=0;\n\t\t\tfor($i=0;$i<count($oscommerce_orders_temp->products);$i++)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$this->oscommerce_orders[$counter]->order_product[$i][\"Name\"]=$this->GetFieldString($oscommerce_orders_temp->products,\"name\",$i);\n\t\t\t\t$this->oscommerce_orders[$counter]->order_product[$i][\"Price\"]=$this->GetFieldMoney($oscommerce_orders_temp->products,\"price\",$i);\n\t\t\t\t$this->oscommerce_orders[$counter]->order_product[$i][\"ExternalID\"]=$this->GetFieldString($oscommerce_orders_temp->products,\"model\",$i);\n\t\t\t\t$this->oscommerce_orders[$counter]->order_product[$i][\"Quantity\"]=$this->GetFieldNumber($oscommerce_orders_temp->products,\"qty\",$i);\n\t\t\t\t$this->oscommerce_orders[$counter]->order_product[$i][\"Total\"]=$this->FormatNumber($this->GetFieldNumber($oscommerce_orders_temp->products,\"price\",$i)*$this->GetFieldNumber($oscommerce_orders_temp->products,\"qty\",$i));\n\t\t\t\t\n\t\t\t\t$items_cost=$items_cost+$this->oscommerce_orders[$counter]->order_product[$i][\"Total\"];\n\t\t\t\t$items_tax=$items_tax+$this->GetFieldMoney($oscommerce_orders_temp->products,\"tax\",$i);\n\t\t\t\t\n\t\t\t\t//Get product weight & calculate total product weight \n\t\t\t\t$res_product = tep_db_query(\"select * from \" . TABLE_PRODUCTS . \" p where p.products_model = '\" . $this->GetFieldString($oscommerce_orders_temp->products,\"model\",$i) . \"'\");\n\t\t\t\t$row=tep_db_fetch_array($res_product);\n\t\t\t\t$this->oscommerce_orders[$counter]->order_product[$i][\"Total_Product_Weight\"]=$this->GetFieldNumber($row,\"products_weight\")*$this->GetFieldNumber($oscommerce_orders_temp->products,\"qty\",$i);\n\t\t\t}\n\t\t\t\n\t\t\t$this->oscommerce_orders[$counter]->order_info[\"ItemsTotal\"]=$this->FormatNumber($items_cost,2);\n\t\t\t$this->oscommerce_orders[$counter]->order_info[\"ItemsTax\"]=$this->FormatNumber($items_tax);\n\t\t\t$this->oscommerce_orders[$counter]->order_info[\"Total\"]=$this->FormatNumber(($items_cost+$this->oscommerce_orders[$counter]->order_info[\"ItemsTax\"]+$this->oscommerce_orders[$counter]->order_info[\"ShippingChargesPaid\"]));\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$counter++;\n\t\t}\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "a9cf595a6cabb1c6c4f5dc35d79a7147", "score": "0.49696192", "text": "public function buyer_orders() {\n\t\t$this->db->where('buyer_id', $this->current_user->user_id)\n\t\t\t\t ->order_by('progress asc, time desc');\n\t\t$query = $this->db->get('orders');\n\t\treturn ($query->num_rows() > 0) ? $this->build_array($query->result_array()) : array();\n\t\t\n\t}", "title": "" }, { "docid": "a134a9b49cf0691f242259cecbe84b58", "score": "0.4967736", "text": "public function getOrders($search)\n {\n trigger_error(sprintf('%s:%s is deprecated since Shopware 5.5.8 and will be removed in 5.7. Use the OrderRepository instead.', __CLASS__, __METHOD__), E_USER_DEPRECATED);\n\n $search = Shopware()->Db()->quote(\"$search%\");\n\n $sql = \"\n SELECT\n o.id,\n o.ordernumber as name,\n o.userID,\n o.invoice_amount as totalAmount,\n o.transactionID,\n o.status,\n o.cleared,\n d.type,\n d.docID,\n CONCAT(\n IF(b.company != '', b.company, CONCAT(b.firstname, ' ', b.lastname)),\n ', ',\n p.description\n ) as description\n FROM s_order o\n LEFT JOIN s_order_documents d\n ON d.orderID=o.id AND docID != '0'\n LEFT JOIN s_order_billingaddress b\n ON o.id=b.orderID\n LEFT JOIN s_core_paymentmeans p\n ON o.paymentID = p.id\n WHERE o.id != '0'\n AND (o.ordernumber LIKE $search\n OR o.transactionID LIKE $search\n OR docID LIKE $search)\n GROUP BY o.id\n ORDER BY o.ordertime DESC\n \";\n $sql = Shopware()->Db()->limit($sql, 5);\n\n return Shopware()->Db()->fetchAll($sql);\n }", "title": "" }, { "docid": "566f69f5dde37469b1f281adecca9b5a", "score": "0.49657983", "text": "public function vendor_orders() {\n\t\t$this->db->where('vendor_hash', $this->current_user->user_hash);\n\t\t$this->db->where('progress >','0');\n\t\t$this->db->order_by('progress ASC, time desc');\n\t\t$query = $this->db->get('orders');\n\t\tif($query->num_rows() > 0) {\n\t\t\t$row = $query->result_array();\n\t\t\treturn $this->build_array($row);\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t}", "title": "" }, { "docid": "6a2c70e8973eafe943bdd79d9513fff9", "score": "0.49608603", "text": "public function getAllOrders($company_id,$searchBy){\n\n $results = $this->scopeQuery(function($query) use ($searchBy,$company_id){\n $query = $query->whereHas('branch', function($q) use ($company_id) {\n $q->where('branches.company_id',$company_id);\n })\n ->with(['branch' => function($q){\n $q->select('name','id','company_id');\n }])\n ->with(['customer.room' => function($q){\n $q->select('room_hash','id');\n }])\n ->with(['customer.user' => function($q){\n $q->select('email','id');\n }])\n ->with(['photographer' => function($q){\n $q->select('id','name');\n }]);\n\n if (!empty($searchBy['branch_id'])) {\n if($searchBy['branch_id'] !== '0'){\n $query = $query->where('branch_id',$searchBy['branch_id']);\n }\n } \n\n if (!empty($searchBy['photographer_id'])) {\n if($searchBy['photographer_id'] !== '0'){\n\n $query = $query->where('photographer_id',$searchBy['photographer_id']);\n \n }\n } \n\n if (!empty($searchBy['from_day']) && !empty($searchBy['to_day'])) {\n\n $query = $query->where(DB::raw('date(purchase_date)'),'>=',$searchBy['from_day'])\n ->where(DB::raw('date(purchase_date)'),'<=',$searchBy['to_day']);\n\n } else if(!empty($searchBy['to_day'])){\n\n $query = $query->where(DB::raw('date(purchase_date)'),$searchBy['to_day']);\n\n } else if(!empty($searchBy['from_day'])){\n\n $query = $query->where(DB::raw('date(purchase_date)'),$searchBy['from_day']);\n }\n\n $query = $query->where('status','DONE');\n return $query;\n })->get();\n \n $results = $this->transform($results);\n // $this->insertCSVFile($results,$company_id);\n return $results;\n\n }", "title": "" }, { "docid": "2520aab5330153be96975b9f6edb5cc5", "score": "0.495955", "text": "public function getOrders()\n {\n $filters = [\n 'type' => 'served'\n ];\n return $this->orderRepo->getOrders($filters, 10000);\n }", "title": "" }, { "docid": "1250775cdb1dbaa4ac757b56a6743964", "score": "0.49548438", "text": "public function getOrderById() \n {\n $orderDetails = $this->oneToMany('orderdetails', 'OrderID', 'OrderID')\n ->where('orders.CustomerID', '=', $_SESSION['user_id'])\n ->get();\n\n // Adding Additional Properties To $orderDetails data collection\n $product_model = new ProductModel();\n $supplier_model = new SupplierModel();\n foreach($orderDetails as $od) {\n $pd = $product_model->oneToOne('categories', 'CategoryID', 'CategoryID')\n ->where('ProductID', '=', $od->ProductID)\n ->single(['CategoryName', 'ProductName', 'SupplierID', 'Unit', 'Price']);\n \n $od->CategoryName = $pd->CategoryName;\n $od->ProductName = $pd->ProductName;\n $od->Unit = $pd->Unit;\n $od->Price = $pd->Price;\n $od->SupplierName = $supplier_model->where('SupplierID', '=', $pd->SupplierID)\n ->single()\n ->SupplierName;\n }\n\n return $orderDetails;\n\n }", "title": "" }, { "docid": "11c5d4c4ae2c728a16e45d58aa03b765", "score": "0.49532756", "text": "private function _buildQueryOrderBy(){\n //Array of allowable order fields\n $mainframe = JFactory::getApplication();\n $orders = array('title', 'published', 'ra.id', 'start_date', 'status', 'apa.member_name', 'ordering');\n $columns = array();\n\n $filter_order = $this->getState($this->_context.'.filter_order');\n $filter_order_Dir = strtoupper($this->getState($this->_context.'.filter_order_Dir'));\n \n //Validate order direction\n if($filter_order_Dir != 'ASC' && $filter_order_Dir != 'DESC')\n $filter_order_Dir = 'ASC';\n \n if(!in_array($filter_order, $orders))\n \t$filter_order = 'start_date'; \n \n $columns[] = $filter_order.' '.$filter_order_Dir;\n $columns[] = 'created DESC'; \n\n return $columns;\n }", "title": "" }, { "docid": "f58aa193edef931d1bbafddf6b0795ea", "score": "0.4952908", "text": "public function getOrdersSelect() {\n $field = \"\";\n switch ($this->getMode()) {\n case Yourdelivery_Model_Billing::BILLING_COMPANY: {\n $field = 'billCompany';\n break;\n }\n case Yourdelivery_Model_Billing::BILLING_RESTAURANT: {\n $field = 'billRest';\n break;\n }\n case Yourdelivery_Model_Billing::BILLING_COURIER: {\n $field = 'billCourier';\n }\n }\n\n $where = $field . \"=\" . $this->getId();\n $select = $this->getTable()->getAdapter()->select();\n $select->from(array('o' => 'orders'), array(\n 'ID' => 'o.id',\n 'Eingang' => 'o.time',\n 'Lieferzeit' => 'o.deliverTime',\n 'Status' => 'o.state',\n 'StatusForOpt' => 'o.state',\n 'Typ' => 'o.mode',\n 'Payment' => 'o.payment',\n 'Preis' => new Zend_Db_Expr('o.total+o.serviceDeliverCost'),\n ))\n ->where($where);\n return $select;\n }", "title": "" }, { "docid": "5b77c77604ee676a7365ebd34486f57b", "score": "0.49505654", "text": "function pizza_register_get_orders( $user_id = 0, $checkout = 0 ) {\n \n global $nypizza, $wpdb;\n $table = $wpdb->prefix . $nypizza->register->table;\n\n if ($user_id <= 0) \n $user_id = get_current_user_id();\n \n $query = \"SELECT * FROM {$table} WHERE user_id = {$user_id}\";\n $query .= \" AND checkout = {$checkout} ORDER BY id DESC\";\n\n return $wpdb->get_results( $query );\n}", "title": "" }, { "docid": "4a4cfa375ea34ff7002f21faa17aed46", "score": "0.49437585", "text": "public abstract function orderBy();", "title": "" }, { "docid": "e4968f05472552123d3149eb0835cd4a", "score": "0.49435866", "text": "public function get_undone_orders()\n\t{\n\t\t$arr = array(\"undone\" => 1);\n\t\treturn $this->_get_orders($arr);\n\t}", "title": "" }, { "docid": "bf6ca8a67b431080e9b109334f12ad45", "score": "0.49403888", "text": "public function getWriterOrders_By_Orderstatus($where){\n//for editor A dashbord\nreturn $this->db->query(\"select writerorders.*,orders.id orderid,orders.deadline,orders.amount orderamount,ss.username client,sss.username writer,papers.topic,papers.pages,subjects.name subject,paper_types.name papertype,papers.num_cited_resources, citation_formats.name as citationformat,papers.paper_instructions,papers.created_at from writerorders left join orders on orders.id=writerorders.orderid left join users ss on ss.id=orders.user_id left join users sss on sss.id=writerorders.userid left join papers on papers.order_id=orders.id left join subjects on subjects.id=papers.subject_id left join paper_types on paper_types.id=papers.paper_type_id left join citation_formats on citation_formats.id=papers.citation_format_id $where\");\n}", "title": "" }, { "docid": "b373a6a68c2ec928ade681039f5814d9", "score": "0.49301955", "text": "function buscarFuncionario ($funcionarios, $first_name){\r\n\r\n $funcionariosFiltro = [];\r\n foreach ($funcionarios as $funcionario){\r\n if($funcionario -> first_name == $first_name){\r\n $funcionariosFiltro[] = $funcionario;\r\n }\r\n\r\n }\r\n return $funcionariosFiltro;\r\n\r\n}", "title": "" }, { "docid": "535102692034f5c8a189f466994b5acf", "score": "0.4922522", "text": "function getAllWhereOrderData($fields,$table,$where,$orders)\n\t{\n\t\t$this->db->select($fields);\n\t\t$this->db->from($table);\n\t\t$this->db->where($where);\n \t $this->db->order_by($orders);\n \t $query=$this->db->get();\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "90e62560107379b82db002c694d7d036", "score": "0.49199697", "text": "private function getOrderInfos() {\r\n\t\t$shipment = $this->xpath->query('/order/shipment')->item(0);\r\n\t\t$offer = $this->xpath->query('./offer',$shipment)->item(0);\r\n $this->order['url'] = $this->xpath->query('./url',$offer)->item(0)->nodeValue;\r\n $this->order['mode'] = $this->xpath->query('./mode',$offer)->item(0)->nodeValue;\r\n $this->order['offer'][\"operator\"][\"code\"] = $this->xpath->query('./operator/code',$offer)->item(0)->nodeValue;\r\n $this->order['offer']['operator']['label'] = $this->xpath->query('./operator/label',$offer)->item(0)->nodeValue;\r\n $this->order['offer']['operator']['logo'] = $this->xpath->query('./operator/logo',$offer)->item(0)->nodeValue;\r\n $this->order['service']['code'] = $this->xpath->query('./service/code',$offer)->item(0)->nodeValue;\r\n $this->order['service']['label'] = $this->xpath->query('./service/label',$offer)->item(0)->nodeValue;\r\n $this->order['price']['currency'] = $this->xpath->query('./service/code',$offer)->item(0)->nodeValue;\r\n $this->order['price']['tax-exclusive'] = $this->xpath->query('./price/tax-exclusive',$offer)->item(0)->nodeValue;\r\n $this->order['price']['tax-inclusive'] = $this->xpath->query('./price/tax-inclusive',$offer)->item(0)->nodeValue;\r\n $this->order['collection']['code'] = $this->xpath->query('./collection/type/code',$offer)->item(0)->nodeValue;\r\n $this->order['collection']['type_label'] = $this->xpath->query('./collection/type/label',$offer)->item(0)->nodeValue;\r\n $this->order['collection']['date'] = $this->xpath->query('./collection/date',$offer)->item(0)->nodeValue;\r\n\t\t$time = $this->xpath->query('./collection/time',$offer)->item(0);\r\n\t\tif ($time) {\r\n\t\t\t$this->order['collection']['time'] = $time->nodeValue;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$this->order['collection']['time'] = '';\r\n\t\t}\r\n $this->order['collection']['label'] = $this->xpath->query('./collection/label',$offer)->item(0)->nodeValue;\r\n $this->order['delivery']['code'] = $this->xpath->query('./delivery/type/code',$offer)->item(0)->nodeValue;\r\n $this->order['delivery']['type_label'] = $this->xpath->query('./delivery/type/label',$offer)->item(0)->nodeValue;\r\n $this->order['delivery']['date'] = $this->xpath->query('./delivery/date',$offer)->item(0)->nodeValue;\r\n\t\t$time = $this->xpath->query('./delivery/time',$offer)->item(0);\r\n\t\tif ($time) {\r\n\t\t\t$this->order['delivery']['time'] = $time->nodeValue;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$this->order['delivery']['time'] = '';\r\n\t\t}\r\n $this->order['delivery']['label'] = $this->xpath->query('./delivery/label',$offer)->item(0)->nodeValue;\r\n\t\t$proforma = $this->xpath->query('./proforma',$shipment)->item(0);\r\n\t\tif ($proforma) {\r\n\t\t\t$this->order['proforma'] = $proforma->nodeValue;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$this->order['proforma'] = '';\r\n\t\t}\r\n $this->order['alerts'] = array(); \r\n $alertsNodes = $this->xpath->query('./alert',$offer);\r\n foreach($alertsNodes as $a => $alert) {\r\n $this->order['alerts'][$a] = $alert->nodeValue; \r\n }\r\n\t\t$this->order['chars'] = array(); \r\n $charNodes = $this->xpath->query('./characteristics/label',$offer);\r\n foreach($charNodes as $c => $char) {\r\n $this->order['chars'][$c] = $char->nodeValue;\r\n }\r\n $this->order['labels'] = array();\r\n $labelNodes = $this->xpath->query('./labels/label',$shipment);\r\n foreach($labelNodes as $l => $label) {\r\n $this->order['labels'][$l] = trim($label->nodeValue); \r\n }\r\n }", "title": "" }, { "docid": "30d1bffb3ed3c33b49ebc6ef218c524d", "score": "0.49184912", "text": "public function order($order)\n {\n $query = new waDbQuery($this);\n return $query->order($order);\n }", "title": "" }, { "docid": "12c0d83860b7483a606bd6f2bb48ed70", "score": "0.4917156", "text": "public function searchOrdersPaginator($condition, $order = null) {\n\t\tif (strpos($condition, 'orders.store_id=') === false) {\n\t\t\t$condition.=('&orders.store_id='.$this->id);\n\t\t}\n\t\treturn Model_Sellcast::searchOrdersPaginator($condition, $order);\n\t}", "title": "" }, { "docid": "24fc913558b12c1bdd5cbbdc2e6f2996", "score": "0.49164084", "text": "public function sort(){\n\t\t$this->sort_by('fullname');\n\t}", "title": "" }, { "docid": "690367bddfede5e0dbe1df357158982f", "score": "0.49133012", "text": "private function _get_order_by () {\r\n\t\t$allowed = array(\r\n\t\t\t'comment_date_gmt',\r\n\t\t\t'comment_karma',\r\n\t\t\t'comment_parent',\r\n\t\t);\r\n\t\t// Defaults first\r\n\t\t$opt = 'comment_date_gmt';\r\n\r\n\t\t$order = !empty($this->_data['order']) && in_array($this->_data['order'], $allowed)\r\n\t\t\t? $this->_data['order']\r\n\t\t\t: $opt\r\n\t\t;\r\n\r\n\t\treturn $order;\r\n\t}", "title": "" }, { "docid": "92e135bdd50f06ea8c22eae5ff18b9a3", "score": "0.4899588", "text": "public function getOrders(): Orders\n {\n return $this->get('orders');\n }", "title": "" }, { "docid": "98ef77c9d5c3b1b58427889da0b17aef", "score": "0.48986626", "text": "public function orderBy_Name(){\n return $this->orderBy('name');\n }", "title": "" }, { "docid": "98ef77c9d5c3b1b58427889da0b17aef", "score": "0.48986626", "text": "public function orderBy_Name(){\n return $this->orderBy('name');\n }", "title": "" }, { "docid": "8be54ef4acc069fb8e8d3fca7d2007ad", "score": "0.4894046", "text": "public function getOrderList($limit = '', $offset = '', $store_id = '') {\r\n $limit = empty($limit) ? 100 : $limit;\r\n $offset = empty($limit) ? 0 : $offset;\r\n \r\n $this->db->select('o.id,o.order_bill_id,s.name as store_name,o.note,o.status as order_status_id,os.order_status_name,CONCAT_WS(\" \",u.name,u.lname) as user_name,'\r\n . ' o.order_date,o.payment_type,o.payment_status,o.created_on,o.amount');\r\n $this->db->from('order o');\r\n $this->db->join('table_order_status os', 'os.order_status_id = o.status', 'left');\r\n $this->db->join('stores s', 's.id = o.store_id', 'left');\r\n $this->db->join('users u', 'u.user_id = o.user_id', 'left');\r\n $this->db->order_by('o.created_on','DESC');\r\n if(!empty($store_id))\r\n $this->db->where('o.store_id',$store_id); \r\n $this->db->limit($limit,$offset);\r\n $query = $this->db->get();\r\n return $query->result_array();\r\n }", "title": "" }, { "docid": "5270af8356945391b73284f62ad4d161", "score": "0.4886799", "text": "function fetch_all_orders($limit, $start, $query)\n {\n $this->db->select('*')->from($this->table);\n $query = $this->db->limit($limit, $start)->get()->result_array();\n\n // with restaurant, user, template info\n foreach ($query as $key => $order) {\n $food_prices = $this->global_model->belong_to_many('order_foods', 'food_prices', 'order_id', $order['order_id'], 'food_price_id');\n foreach ($food_prices as $ke => $food_price) {\n $food_prices[$ke]['food'] = $this->global_model->has_one('foods', 'food_id', $food_price['food_id']);\n $food_prices[$ke]['food_size'] = $this->global_model->has_one('food_sizes', 'food_size_id', $food_price['food_size_id']);\n $order_food = $this->db->select('*')\n ->from('order_foods')\n ->where(array(\n 'order_id' => $order['order_id'],\n 'food_price_id' => $food_price['food_price_id']\n ))\n ->get()\n ->row_array();\n $food_prices[$ke]['aditional_price'] = $order_food['food_aditional_price'];\n\n $food_prices[$ke]['food_aditionals'] = $this->db->select('*')\n ->from('food_aditionals')\n ->where_in('food_aditional_id', explode(',', $order_food['food_aditional_id']))\n ->get()\n ->result_array();\n }\n $query[$key]['food_prices'] = $food_prices;\n $query[$key]['customer'] = $this->global_model->has_one('customers', 'customer_id', $order['customer_id']);\n $query[$key]['restaurant'] = $this->global_model->has_one('restaurants', 'restaurant_id', $order['restaurant_id']);\n }\n return $query;\n }", "title": "" }, { "docid": "c99a833f4492de1b84f8bfd6fb1db9c7", "score": "0.48848233", "text": "function accountName( $order )\n {\n \t\n $accountName = '';\n $xmlString = $order->attribute( 'data_text_1' );\n if ( $xmlString != null )\n {\n \t$xmlParser \t= new xml();\n \t$data\t\t= $xmlParser->parse( $xmlString );\n \t$data\t\t= $data[ 'shop_account' ];\n \t$company\t= $data[ 'company' ];\n \t\n \tif ( $company != '' and !is_array( $company ) )\n \t{\n \t\t$accountName = $company;\n \t}\n \telse\n \t{\n \t\t$accountName = $data[ 'first_name' ] . ' ' . $data[ 'last_name' ];\n \t}\n \n\n }\n return $accountName;\n }", "title": "" }, { "docid": "82e6e0ed4cfede9c97654cf452be1cdf", "score": "0.48756027", "text": "public function getHistoryOrdersByStaus($attributes){\n \n $company_id = $attributes['company_id'];\n $status = $attributes['status'];\n $allOrders = $this->scopeQuery(function($query) use ($company_id,$status){\n $query = $query->with(['branch' => function($q){\n }])\n ->with(['customer.room' => function($q){\n }])\n ->with(['customer.user' => function($q){\n }])\n ->with(['photographer' => function($q){\n }])\n ->with('orderexchange')\n ->whereHas('branch', function($q) use ($company_id,$status){\n $q->where('branches.company_id',$company_id);\n })\n ->where('status',$status);\n return $query;\n })->get();\n\n return $allOrders;\n }", "title": "" }, { "docid": "e0f4536bb14665faebd1a59df53801b5", "score": "0.48737356", "text": "function getAll($orderBy='',$order='ASC') {\n $class = $this->_model;\n $item = new $class();\n if($orderBy!=\"\")\n {\n $item->orderBy($orderBy,$order);\n }\n return $item->search();\n\t}", "title": "" }, { "docid": "cf75ef5f35ceaf965eedd72937d152e0", "score": "0.48698992", "text": "public function getOrders()\n {\n return $this->hasMany(Orders::className(), ['location_id' => 'id']);\n }", "title": "" }, { "docid": "b68ae15abfe927ec83b6cd02828470e2", "score": "0.48599184", "text": "public function findAllOrderByName()\n {\n $operacoes = $this->findAll(['no_operacao']);\n\n return $operacoes;\n }", "title": "" }, { "docid": "ce90304aff7fc4afb25c76b00aa2ed35", "score": "0.48494068", "text": "public function getCustomerOrders()\n { \n \n $i=0;$return_array =[];\n $filter = $this->rmaConfigHelper->guestOrderFilterStatus();\n\n $order_selected = $this->salesOrderFactory->create()\n ->addFieldToFilter('customer_id', array('null' => true))\n ->addFieldToFilter('status', array('in' => $filter))\n ->setOrder('created_at','desc');\n \n $order_selected->getSelect()\n ->where('updated_at > DATE_SUB(NOW(), INTERVAL ? DAY)',\n $this->rmaConfigHelper->getMinDaysAfter());\n $order_selected->load();\n $keys = [];\n \n if(count($order_selected) > 0 ) {\n foreach($order_selected->getData() as $key=>$order){\n \n $return_array =$order_selected->getData();\n $validOrder = $this->rmaOrderHelper->isValidOrder($order['increment_id']);\n \n if(!$validOrder){\n $keys[] = $key;\n }\n \n }\n for($i=0;$i<count($keys);$i++){\n\n unset($return_array[$keys[$i]]);\n\n }\n $return_array = array_values($return_array);\n return $return_array;\n } else {\n $this->generic->setError('Cannot Create RMA for given Order');\n return false;\n }\n }", "title": "" }, { "docid": "afc9aa78bd591f9fb7414ac5528652e6", "score": "0.484458", "text": "static function retrieveByFirstName($value) {\n\t\treturn Guest::retrieveByColumn('first_name', $value);\n\t}", "title": "" }, { "docid": "8f64ca4c701a4e249c130bbba992d7a8", "score": "0.484023", "text": "public function listOrderCustomer($orderNomber){\n\t \t\n\t\t$query = \"SELECT oi.idItem, oi.orderNumber, oi.sku, oi.name, oi.price, oi.quantity FROM orders as o, orderitems as oi WHERE o.idOrder=\".$orderNomber.\" and o.orderNumber= oi.orderNumber and oi.status=1\";\n\t\t\n\t\t$orderItems = $this->mysql->query($query);\n\t\t\n\t\t$cont=0;\n\t\t\n\t\t$array_data = array();\n\t\t\n\t\t$json_data = array();\n\t\t\n\t\tforeach ($orderItems as $key => $value) {\n\t\t\t\n\t\t\t$array_data['idItem'] = $value['oi']['idItem'];\n\t\t\t\n\t\t\t$array_data['orderNumber'] = $value['oi']['orderNumber'];\n\t\t\t\n\t\t\t$array_data['sku'] = $value['oi']['sku'];\n\t\t\t\n\t\t\t$array_data['name'] = $value['oi']['name'];\n\t\t\t\n\t\t\t$array_data['price'] = $value['oi']['price'];\n\t\t\t\n\t\t\t$array_data['quantity'] = $value['oi']['quantity'];\n\t\t\t\n\t\t\t$json_data[$cont] = $array_data;\n\t\t\t\n\t\t\t$cont++;\n\t\t\t\n\t\t}\n\t\t\n\t\tprint(json_encode($json_data));\n\t \t\n\t }", "title": "" }, { "docid": "cc2191d6ab440cec6c89414f6caa4cdc", "score": "0.48393863", "text": "public function findAllSearch($search, $order)\n {\n if (!isset($order)) {\n $order = 'created';\n }\n\n $search = '%' . $search . '%' ;\n $this->db->select()\n ->from($this->getSource())\n ->where('acronym LIKE ?')\n ->orderBy($order);\n $this->db->execute([$search]);\n return $this->db->fetchAll();\n }", "title": "" }, { "docid": "0b640d32a2cfd82f822eba8e4d7edd3b", "score": "0.4836276", "text": "public function getAdminOrderDetails($order){\n\t\t$select = $this->db->select()\n\t\t\t->from(array('o'=>'order'))\n\t\t\t->join(array('u'=>'user'),'o.user=u.user',array('u.fio', 'u.email'))\n\t\t\t->where('o.order =?',$order);\t\t\n\t\treturn $this->db->fetchRow($select);\n\t}", "title": "" }, { "docid": "5a8838238341e4e0e47d67e3a8218ef7", "score": "0.48360133", "text": "public static function getOrderedSelledProductsByDate($date, $order) {\n return Product::leftJoin('products_orders', 'products.id', '=', 'products_orders.product_id')\n ->leftJoin('orders', 'products_orders.order_id', '=', 'orders.id')\n ->where('orders.deliverDate', $date)\n ->orderBy('products_orders.quantity', $order)\n ->get(['products.id', 'products.name', 'products_orders.quantity']);\n }", "title": "" }, { "docid": "3bdd55a80844581cfc2b23534f72d93b", "score": "0.4831116", "text": "protected function listOrder() {\n return (array) $this->request()->meta('order');\n }", "title": "" }, { "docid": "de6b2b7cf811276ed3c2b0f14744baef", "score": "0.48221996", "text": "public function testSalesOrderGetOrderByTypeByorderTypeorderNbr()\n {\n }", "title": "" }, { "docid": "10276f968e443942d3bdb79dd059c555", "score": "0.4817125", "text": "function klippe_mikado_get_query_order_by_array( $first_empty = false, $additional_elements = array() ) {\n\t\t$orderBy = array();\n\t\t\n\t\tif ( $first_empty ) {\n\t\t\t$orderBy[''] = esc_html__( 'Default', 'klippe' );\n\t\t}\n\t\t\n\t\t$orderBy['date'] = esc_html__( 'Date', 'klippe' );\n\t\t$orderBy['ID'] = esc_html__( 'ID', 'klippe' );\n\t\t$orderBy['menu_order'] = esc_html__( 'Menu Order', 'klippe' );\n\t\t$orderBy['name'] = esc_html__( 'Post Name', 'klippe' );\n\t\t$orderBy['rand'] = esc_html__( 'Random', 'klippe' );\n\t\t$orderBy['title'] = esc_html__( 'Title', 'klippe' );\n\t\t\n\t\tif ( ! empty( $additional_elements ) ) {\n\t\t\t$orderBy = array_merge( $orderBy, $additional_elements );\n\t\t}\n\t\t\n\t\treturn $orderBy;\n\t}", "title": "" }, { "docid": "eda0e10c1e16662c68b0707daf03bebd", "score": "0.48153302", "text": "function get_all_ord()\n\t{\n\t\t$this->db->select(\"orderNumber, orderDate, requiredDate, \n\t\tshippedDate, status, comments, customerNumber\");\n\t\t$this->db->from('orders');\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "e5d9f79d9bff3e0b26a11742e3de2b56", "score": "0.48127452", "text": "public function filter_order_item( $args ) {\n\t\t$args[1] = $this->build_order_item( $args[0] );\n\t\treturn $args;\n\t}", "title": "" }, { "docid": "5355d1a4215ce3e4acc31ff984bc77c1", "score": "0.48119825", "text": "public function _loadAllOrderBy($order) {\n\t\n\t\t$results = $this->dbAdapter->select()->from($this->getTableName ())\n\t\t->order($order)\n\t\t->query()\n\t\t->fetchAll();\n\t\t\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "79c610db3fcded656b6aadd089e65393", "score": "0.48053098", "text": "public function getEditor_A_Order_By_Orderstatus($where){\n//for editor A dashbord\nreturn $this->db->query(\"select editoraorders.*,orders.id orderid,orders.deadline,orders.amount orderamount,ss.username client,sss.username writer,papers.topic,papers.pages,subjects.name subject,paper_types.name papertype,papers.num_cited_resources, citation_formats.name as citationformat,papers.paper_instructions,papers.created_at from editoraorders left join writerorders on writerorders.id=editoraorders.writerorderid left join orders on orders.id=writerorders.orderid left join users ss on ss.id=orders.user_id left join users sss on sss.id=editoraorders.userid left join papers on papers.order_id=orders.id left join subjects on subjects.id=papers.subject_id left join paper_types on paper_types.id=papers.paper_type_id left join citation_formats on citation_formats.id=papers.citation_format_id $where\");\n}", "title": "" }, { "docid": "b506c6a3c13b94f1af7136d1d2bd8dad", "score": "0.48029065", "text": "public function getUserOrders()\n\t{\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->addCondition('create_user_id = '.$this->id);\n\t\t$criteria =Payment::model()->count($criteria);\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "33fc5f02b97eaa0f6f0fb4f3c722ebc9", "score": "0.48024884", "text": "public function getOrder($fd=NULL,$td=NULL){\n try\n {\n $body=['filter'=>['orderDate'=>['fromDate'=>$fd,'toDate'=>$td]]];\n $resp=$this->_API->call(['URL' => '/sellers/v2/orders/search', 'METHOD' => 'POST','DATA'=>$body,'ALLDATA'=>true,'RETURNARRAY'=>true]);\n $result = isset($resp['orderItems'])?$resp['orderItems']:false;\n if($result){\n if($resp['hasMore']){\n while (isset($resp['hasMore']) && ($resp['hasMore'] == true)) {\n $resp=$this->_API->call(['URL' => $resp['nextPageUrl'], 'METHOD' => 'GET','ALLDATA'=>true,'RETURNARRAY'=>true]);\n if(isset($resp['orderItems'])){\n $result = array_merge($result,$resp['orderItems']);\n }\n }\n }\n }\n }\n catch (Exception $e)\n {\n $result = $e->getMessage();\n }\n return $result;\n }", "title": "" }, { "docid": "de9a6700244d37430bb2444ba4731d4c", "score": "0.48019174", "text": "function getOrdersSummary($sort,$reverse,$all)\n{\n switch($sort) {\n case \"PaidDate\":\n case \"ReleasedToShipping\":\n case \"ShippedDate\":\n case \"IsExpedited\":\n case \"RequestedPay\":\n case \"Charity\":\n\t $reverse = !$reverse;\n\t break;\n }\n\n return(dbGetOrdersSummary($sort,$reverse,$all));\n}", "title": "" }, { "docid": "736863289ef971ee0d4f04428be8ac9c", "score": "0.47996557", "text": "public static function getOrdersList()\n {\n // DB connection\n $db = Db::getConnection();\n \n // Getting and returning results\n $result = $db->query('SELECT id, user_name, user_phone, adress, date, status, comment FROM orders ORDER BY id DESC');\n $ordersList = array();\n $i = 0;\n while ($row = $result->fetch()) {\n $ordersList[$i]['id'] = $row->id;\n $ordersList[$i]['user_name'] = $row->user_name;\n $ordersList[$i]['user_phone'] = $row->user_phone;\n $ordersList[$i]['adress'] = $row->adress;\n $ordersList[$i]['date'] = $row->date;\n $ordersList[$i]['status'] = $row->status;\n $ordersList[$i]['comment'] = $row->comment;\n $i++;\n }\n return $ordersList;\n }", "title": "" } ]
15f6391ca553f47a7be37d13986a893c
end getSeatsInVenue() Returns an array of sold seats
[ { "docid": "02b216845dd060358d40ca28ab2a9e67", "score": "0.6317968", "text": "public static function getSoldSeats($theatreId)\n {\n $mappingId = self::getActiveRollover($theatreId);\n $activeMapping = self::getRolloverMapping($mappingId);\n $soldSeats = APDB::QueryAll(<<<'SQL'\n SELECT\n inv.performance_id,\n inv.seat_no,\n perfser.series_id,\n txn.order_id,\n COALESCE(show.general_admission, 0) AS ga\n FROM arts_people.t_inventory inv\n INNER JOIN arts_people.t1_item item ON item.item_id = inv.item_id\n INNER JOIN arts_people.t_transaction txn ON txn.transaction_id = item.transaction_id\n INNER JOIN public.jt_performance_series perfser ON perfser.performance_id = inv.performance_id\n INNER JOIN public.t_performance perf ON perf.performance_id = inv.performance_id\n INNER JOIN public.t_show show ON show.show_id = perf.show_id\n INNER JOIN public.l_season season ON season.season_start = show.season_start\n WHERE show.theatre_id = $1\n AND season.season_id = $2\nSQL\n , [\n $theatreId,\n $activeMapping['saved']['season']['new']\n ]\n );\n\n return $soldSeats;\n }", "title": "" } ]
[ { "docid": "67a28cb6c105a402609419bb445ed529", "score": "0.76860404", "text": "public static function getSeatsInVenue($theatreId)\n {\n \n $mappingId = self::getActiveRollover($theatreId);\n $activeMapping = self::getRolloverMapping($mappingId);\n $venueSeats = APDB::QueryAll(<<<'SQL'\n SELECT\n seat.seat_no,\n ven.venue_id,\n perfser.series_id\n FROM public.t_seat seat\n INNER JOIN public.t_venue ven ON ven.venue_id = seat.venue_id\n INNER JOIN public.t_performance perf ON perf.venue_id = seat.venue_id\n INNER JOIN public.jt_performance_series perfser ON perfser.performance_id = perf.performance_id\n INNER JOIN public.t_show show ON show.show_id = perf.show_id\n INNER JOIN public.l_season season ON season.season_start = show.season_start\n WHERE ven.theatre_id = $1\n AND season.season_id = $2\nSQL\n , [\n $theatreId,\n $activeMapping['saved']['season']['new']\n ]\n );\n\n if (!$venueSeats && pg_last_error() == '') {\n $venueSeats = [];\n }\n\n return $venueSeats;\n }", "title": "" }, { "docid": "452328b8ce4f01d2060c883168e31ef4", "score": "0.71554524", "text": "public function getSeats($event_id)\n\t{\n\t\t$seats = EventDetail::where('event_id', '=', $event_id)->first()->event_seats;\n\t\treturn $seats;\n\n\t}", "title": "" }, { "docid": "0b14e939158dfae85afe5b0069a4e455", "score": "0.63425845", "text": "public function getSeatsJson($event_id)\n\t{\n\t\t$seats = Even_t::where('id', '=', $event_id)->first()->seats;\n\t\treturn $seats;\n\n\t}", "title": "" }, { "docid": "0f703606172ba12a824eb8506a031859", "score": "0.58433074", "text": "public function getSeatReservations()\n {\n return isset($this->SeatReservations) ? $this->SeatReservations : null;\n }", "title": "" }, { "docid": "26011d869535f0e0ff8bf066d7b06844", "score": "0.57863486", "text": "function retrieve_venue_clients($venue_id, $team_fan_page_id = false){\n\t\t\n\t\t$sql = \"SELECT\n\t\t\n\t\t\t\t\tDISTINCT \ttglr.user_oauth_uid \tas tglr_user_oauth_uid\n\t\t\t\t\t\n\t\t\t\tFROM \tteams_venues_pairs tvp\n\t\t\t\t\n\t\t\t\tJOIN \tteam_venues tv\n\t\t\t\tON \t\ttvp.team_venue_id = tv.id\t\n\t\t\t\t\t\t\t\t\n\t\t\t\tJOIN\tteams_guest_list_authorizations tgla\n\t\t\t\tON \t\ttgla.team_venue_id = tv.id\n\t\t\t\t\n\t\t\t\tJOIN \tteams_guest_lists tgl\n\t\t\t\tON \t\ttgl.team_guest_list_authorization_id = tgla.id\n\t\t\t\t\n\t\t\t\tJOIN \tteams_guest_lists_reservations tglr\n\t\t\t\tON \t\ttglr.team_guest_list_id = tgl.id\n\t\t\t\t\n\t\t\t\tWHERE \ttvp.team_fan_page_id = ? \n\t\t\t\tAND tv.id = ? \n\t\t\t\tAND tgla.team_fan_page_id = ?\";\n\t\t$query = $this->db->query($sql, array($team_fan_page_id, $venue_id, $team_fan_page_id));\n\t\t\t\t\n\t\t$result = $query->result();\n\t\t\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c849f401b9115f11880e98c97e5c0530", "score": "0.5649228", "text": "public function getAll() {\n return $this->getDB()->getAll('venue')->results();\n }", "title": "" }, { "docid": "b1f3d1ad90930308bc1999c53e787bad", "score": "0.55870694", "text": "public function getVenues(){\n\t\t$venues = array();\n\n\t\t$query = \"SELECT \n\t\t\t\t\t\tvenue_id, \n\t\t\t\t\t\tvenue_name \n\t\t\t\t\tFROM venue \n\t\t\t\t\tWHERE \n\t\t\t\t\t\tcurrent = 1\";\n\t\t$res = $this->db->getAll($query);\n\n\t\tif( !empty($res) ){\n\t\t\tforeach( $res as $venue ){\n\t\t\t\t$venues[] = [\n\t\t\t\t\t'venue_id' => $venue['venue_id'],\n\t\t\t\t\t'venue_name' => $venue['venue_name']\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\n\t\treturn ['venues' => $venues];\n\t}", "title": "" }, { "docid": "2b3dc1787c744cce0be2aa0cc61e0de5", "score": "0.5547018", "text": "public function seats(): HasMany {\n return $this->hasMany(BookingSeat::class, 'flight_id');\n }", "title": "" }, { "docid": "c6d2893ac5c46fac12dae9a61778d45e", "score": "0.54265475", "text": "public function getSeatRequests()\n {\n return $this->seatRequests;\n }", "title": "" }, { "docid": "c1e17d5766cbfb04d972fcd302a813d8", "score": "0.5401342", "text": "public function cinemaWithSeats()\n {\n // first() is used because get() returns a collection of one item\n $cinema = $this->cinema->first();\n\n $cinema->seats->map(function ($seat) {\n // Only attach the current reservation for this showing\n $seat->reservation = $seat->reservations\n ->filter(function ($reservation) {\n return $reservation->showing_id === $this->getKey();\n })\n ->first();\n\n // Unset other reservations as they will not be needed\n unset($seat->reservations);\n\n return $seat;\n });\n\n return $cinema;\n }", "title": "" }, { "docid": "d4036cdb0d0a04d9038a2d6b9732c666", "score": "0.5397081", "text": "function getSeatIds(mysqli $mysqli, $showId)\n{\n $query = \"SELECT idseat FROM seat INNER JOIN room ON seat.room_idroom = idroom INNER JOIN danie298_kinobuchung.show AS s ON s.room_idroom = idroom WHERE idshow = $showId;\";\n return $mysqli->query($query)->fetch_all();\n}", "title": "" }, { "docid": "ea763da7e714e4f487a9dc0aa04de762", "score": "0.53950787", "text": "public function ajaxgetavailableseatsAction() {\n $request = $this->getRequest(); /* Fetching Request */\n $em = $this->getEntityManager(); /* Call Entity Manager */\n if ($request->isPost()) {\n $data = $request->getPost();\n $seatLabel = $data['clickID'];\n $eventID = $data['eventID'];\n $scheduleID = $data['scheduleID'];\n $zoneTitle = $data['zoneTitle'];\n $zone = $em->getRepository('Admin\\Entity\\MapZone')->getZoneByTitle($zoneTitle, $eventID);\n $zoneID = $zone['id'];\n $zoneSeats = $em->getRepository('Admin\\Entity\\ZoneSeats')->getSeatStatus($zoneID, $scheduleID);\n $available = 0;\n if ($seatLabel !== \"\") {\n foreach ($zoneSeats as $zoneSeat) {\n if ($seatLabel === $zoneSeat['seatLabel']) {\n $available = $zoneSeat['seatAvailability'];\n $em->getRepository('Admin\\Entity\\ZoneSeats')->updateSelectedSeat($zoneID, $scheduleID, $seatLabel, 1, 0, 0);\n }\n }\n }\n print json_encode(array('status' => 'success', 'zoneSeats' => $zoneSeats, 'available' => $available));\n die();\n } else {\n print json_encode(array('status' => 'error'));\n die();\n }\n }", "title": "" }, { "docid": "e31a8cf7ddd377c735505531f4aa9dcd", "score": "0.5264047", "text": "public function index()\n {\n $sedes = Sede::all();\n return $sedes;\n }", "title": "" }, { "docid": "0c035179fac96641c3be261f46c9c994", "score": "0.5230445", "text": "public function getSeatsNum();", "title": "" }, { "docid": "bc29ff2a9b9bf9318e2511681a80ca47", "score": "0.5209495", "text": "public function traerSedes($cliente)\n {\n return $this->db->table(\"Sedes g\")\n ->where(\"g.estado\", 1)\n ->where(\"g.id_cliente\", $cliente)\n ->get()->getResultArray();\n }", "title": "" }, { "docid": "bd8c7ee5b3ee1bd1c59873236ee9a7d1", "score": "0.5199436", "text": "function getStations() {\n\n\t\t$retval = array();\n\t\t$redis_key = \"stations\";\n\t\t$redis_ttl = 1800;\n\n\t\tif ($retval = $this->redisGet($redis_key)) {\n\t\t\treturn($retval);\n\n\t\t} else {\n\n\t\t\t$query = 'search index=\"septa_analytics\" earliest=-24h '\n\t\t\t\t. '| fields nextstop '\n\t\t\t\t//\n\t\t\t\t// Zero returns all results, otherwise there is a \n\t\t\t\t// default limit of 10,000. (whyyy?)\n\t\t\t\t//\n\t\t\t\t. '| sort 0 nextstop '\n\t\t\t\t. '| dedup nextstop'\n\t\t\t\t;\n\n\t\t\t$retval = $this->query($query);\n\t\t\t$retval[\"metadata\"][\"_comment\"] = \"A list of all stations\";\n\n\t\t\t$stations = array();\n\t\t\tforeach ($retval[\"data\"] as $key => $value) {\n\t\t\t\t$station = $value[\"nextstop\"];\n\t\t\t\t$stations[$station] = $station;\n\t\t\t}\n\n\t\t\t$retval[\"data\"] = $stations;\n\t\t\t$this->redisSetEx($redis_key, $retval, $redis_ttl);\n\n\t\t\treturn($retval);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "60f928e529e5306cf6e7cb8dc8c94a04", "score": "0.5186152", "text": "function getAvailableSeats(mysqli $mysqli, $row)\n{\n $availableSeatsQuery = \"SELECT count(*) FROM reserved_seats INNER JOIN reservation ON reservation_idreservation = idreservation INNER JOIN danie298_kinobuchung.show ON show_idshow = idshow WHERE idshow = \" . $row['idshow'] . \";\";\n $availableSeats = $mysqli->query($availableSeatsQuery)->fetch_assoc()['count(*)'];\n return 60 - $availableSeats;\n}", "title": "" }, { "docid": "2c13919fcbb6b96d47fe2f1472177ba9", "score": "0.5180387", "text": "function pull_sports() {\n global $CFG, $USER;\n $context = get_context_instance(CONTEXT_SYSTEM);\n\n if (has_capability('block/student_gradeviewer:sportsadmin', $context)) {\n $sports = get_records('block_courseprefs_sports');\n } else {\n $sql = \"SELECT spo.* FROM {$CFG->prefix}block_courseprefs_sports spo,\n {$CFG->prefix}block_student_sports spm\n WHERE spm.usersid = {$USER->id}\n AND spm.path = spo.id\";\n $sports = get_records_sql($sql);\n }\n\n if(!$sports) {\n $sports = array();\n }\n\n return array_map('flatten_sport', $sports);\n}", "title": "" }, { "docid": "6ce34e131d32f1c95faf59c6ca7c578b", "score": "0.51593274", "text": "public function all() {\n if ($this->side != NULL) {\n if ($this->round != NULL) {\n $seats = $this->by_round($this->round, $this->side);\n } else {\n if ($this->side == 'left') {\n $side_root = $this->bracket->_root->left;\n } else {\n $side_root = $this->bracket->_root->right;\n }\n $seats = array();\n\n $this->bracket->top_down($side_root, function($node) use (&$seats) {\n $seats[] = $node;\n });\n }\n } else {\n if ($this->round != NULL) {\n $seats = array_merge(\n $this->by_round($this->round, 'left'),\n $this->by_round($this->round, 'right')\n );\n } else {\n $seats = array();\n $this->bracket->top_down($this->bracket->_root, function($node) use (&$seats) {\n $seats[] = $node;\n });\n }\n }\n\n return $seats;\n }", "title": "" }, { "docid": "17019151ca40164912a97b64c5ba584f", "score": "0.5139996", "text": "public function getVenue() {\n if(!isset($this->venue))\n {\n $mapper = new Application_Model_VenuesMapper();\n $this->venue = $mapper->findWherePriKeyEquals($this->venues_id);\n }\n return $this->venue;\n }", "title": "" }, { "docid": "78ccf677aba96430dc69af7ac0bf5128", "score": "0.5138241", "text": "public function getEventVenue()\n {\n }", "title": "" }, { "docid": "9f032d29a6af4e43d8915a117ea91350", "score": "0.5025508", "text": "function getCatsById($id) {\n \t\treturn $this->find($id)->toArray();\n \t}", "title": "" }, { "docid": "03e2ad871c1c7cf75a2ae9b987f426be", "score": "0.5010158", "text": "protected function _build_venue_objects()\n {\n $result = array();\n foreach ($this->_records as $k => $v) {\n $result[$v->uniqueID] = new Venue($v);\n }\n return $result;\n }", "title": "" }, { "docid": "4432a486775b224f22c2b9151da2d909", "score": "0.50091326", "text": "public function getSalePoints() {\n\n $url = $this->_apiUrl.$this->_contestId.\"/contest_sale_points/\";\n\n $result = $this->call( $url );\n\n if ( is_array( $result ) && isset( $result[\"status\"] ) )\n return $result[\"data\"][\"contest_sale_points\"];\n\n throw new WoowUpAPIException('woowup api response error on getSalePoints',\n $result, $this->lastResponse);\n }", "title": "" }, { "docid": "355769341ccbb7a2e34c7a5650b788ae", "score": "0.4972332", "text": "public function show($id)\n {\n $showTime = ShowTime::find($id);\n if($showTime == null){\n http_response_code(404);\n }\n return $showTime->getSeats();\n }", "title": "" }, { "docid": "d54c03184c3d96e51a12252b4f3138ee", "score": "0.49715596", "text": "public function getShelvesArray()\r\n {\r\n return $this->pushers()\r\n ->groupBy('shelf_number')\r\n ->lists('shelf_number');\r\n }", "title": "" }, { "docid": "b0c53439ea6fac0cb572347d71de6a76", "score": "0.49642253", "text": "public function venues()\n {\n try {\n $venues = DB::table('venues')\n ->join('locations', 'locations.id', '=' ,'venues.location_id')\n ->join('shows', 'venues.id', '=' ,'shows.venue_id')\n ->join('show_times', 'shows.id', '=' ,'show_times.show_id')\n ->join('tickets', 'tickets.show_id', '=' ,'shows.id')\n ->select('venues.id','venues.name','venues.logo_url AS url','locations.city')\n ->where('venues.is_featured','>',0)->where('shows.is_active','>',0)->where('shows.is_featured','>',0)\n ->where(function($query) {\n $query->whereNull('shows.on_featured')\n ->orWhere('shows.on_featured','<=',\\Carbon\\Carbon::now());\n })\n ->where('show_times.is_active','>',0)\n ->where(DB::raw($this->cutoff_date()),'>', \\Carbon\\Carbon::now())\n ->where('tickets.is_active','>',0)\n ->whereNotNull('venues.logo_url')\n ->orderBy('venues.name')->groupBy('venues.id')\n ->distinct()->get();\n foreach ($venues as $v)\n $v->url = Image::view_image($v->url);\n return $venues;\n } catch (Exception $ex) {\n return [];\n }\n }", "title": "" }, { "docid": "949a1745f60c02469deb438fb27fcadf", "score": "0.49635026", "text": "public static function loadStocks()\n {\n $page = 1;\n\n do {\n $result = self::$api->storeInventories(array(), $page, 250);\n\n if ($result === false) {\n return $result;\n }\n\n foreach ($result['offers'] as $offer) {\n self::setQuantityOffer($offer);\n }\n\n $totalPageCount = $result['pagination']['totalPageCount'];\n $page++;\n } while ($page <= $totalPageCount);\n }", "title": "" }, { "docid": "dccd9712ce5dd1d8f9e038d152fbc51a", "score": "0.4960234", "text": "public function getVentas(){\n\t\t$sql = \"SELECT venta.id_venta as venta,cliente.nombre_cliente,cliente.apellido,cliente.correo,venta.fecha,productos.nombre , productos.precio , detalle_factura.cantidad,detalle_factura.subtotal \n FROM detalle_factura\n INNER JOIN venta ON detalle_factura.fk_id_venta = venta.id_venta\n INNER JOIN productos ON detalle_factura.fk_id_producto = productos.id_producto\n INNER JOIN cliente ON venta.fk_id_cliente = cliente.id_cliente\n ORDER BY venta.id_venta ASC\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "a3e9373f1db02a8503f70d15b8138677", "score": "0.4933481", "text": "function db_list_sleeves($db) {\n\t$sizes = [];\n\n\ttry {\n\t $sleeves = $db->query(\"SELECT Id, BGGName FROM Sleeve\" );\n\n\t\tforeach($sleeves as $sleeve) {\n\t\t\t$sizes[] = array(\n\t\t\t\t'id' => $sleeve['Id'],\n\t\t\t\t'name' => $sleeve['BGGName']\n\t\t\t);\n\t\t}\n\n\t\treturn $sizes;\n\t}\n\tcatch(PDOException $e) \t{\n\t print 'Exception : '. $e->getMessage();\n\t}\n}", "title": "" }, { "docid": "5c0202539b8a4ed10742859408a7d673", "score": "0.49302477", "text": "public function get($where) {\n return $this->getDB()->get('venue', $where)->results();\n }", "title": "" }, { "docid": "4649f3cb9a15c89c8394f495ae503b82", "score": "0.49283794", "text": "public function getSeguidos(){\n\t\t$array = array();\n\t\t// query pra ver se ta seguindo ou não\n\t\t$sql = \"SELECT id_seguido FROM relacionamentos WHERE id_seguido = '\".$_SESSION['twlg'].\"'\";\n\t\t//executa a query\n\t\t$sql = $this->db->query($sql);\n\t\t//vendo se tem alguma resposta\n\t\tif ($sql->rowCount() > 0) {\n\t\t\t//jogando informacoes em $seg\n\t\t\t$sql = $sql->fetchAll();\n\t\t\tforeach($sql as $seg){\n\t\t\t\t//dentro do array vai ficar so os ID seguido\n\t\t\t\t$array[] = $seg['id_seguido'];\n\t\t\t}\n\t\t}\n\t\t// retorna a quantidade de seguidores como array\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "4448e703678b87fe3fc9015cd57784d9", "score": "0.4923043", "text": "public function updateSeats($event_id)\n\t{\n\t}", "title": "" }, { "docid": "a35b9bcaf427a1a9d699f46cf4a88e2c", "score": "0.48916376", "text": "public function getCollectFromCustomerReservations()\n {\n\t\t/* @var $bookingDao \\DDD\\Dao\\Booking\\Booking */\n\t\t$bookingDao = $this->getServiceLocator()->get('dao_booking_booking');\n\n\t\t$collectFromCustomerReservations = $bookingDao->getCollectFromCustomerReservations();\n\n\t\treturn $collectFromCustomerReservations;\n\t}", "title": "" }, { "docid": "ebdfeac63e4365c2850f90bb4b8ae554", "score": "0.48875016", "text": "public function getExtraServiceSellings()\n {\n return $this->hasMany(ExtraServiceSelling::className(), ['client_id' => 'id']);\n }", "title": "" }, { "docid": "b9f8431fd9db80883b6189a7ffb91ce6", "score": "0.4885401", "text": "function getIncidentValues($venueID, $date, $con)\n{\n\tdate_default_timezone_set('UTC');\n\tfor($i = 0; $i < 30; $i++){\n\t\t$queryDate = $date . \" 00:00:00\";\n\t\t$sql = varIncidents($venueID, $queryDate, $con);\n\t\t\n\t\tif($sql == \"error\") echo \"Error\";\n\t\telse {\n\t\t\t$result = mysqli_query($con, $sql);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($row = mysqli_fetch_array($result))\n\t {\n\t\t $num[$i] = $row[0];\n\t\t } else $num[$i] = 0;\n\t\t\t\n\t\t\t$date_ts = strtotime($date);\n\t\t\t$date_dt = strtotime('-1 day', $date_ts);\n\t\t\t$date = date('Y-m-d', $date_dt);\n\t\t}\n\t}\n\t\n\techo $num[29];\n\tfor($i = 28; $i >= 0; $i--){\n\t\techo \",\" . $num[$i];\n\t}\n\t\n}", "title": "" }, { "docid": "f7e58c09a48eee3e329306c8b9237dcc", "score": "0.48689565", "text": "function getInactifsEvenements(){\r\n\t\r\n\t\t$BDD = new BDD();\r\n\t\r\n\t\t$evenements = $BDD->select(\r\n\t\t\t\"evenement_id, evenement_titre, evenement_ss_titre, evenement_description, evenement_participants, DATE_FORMAT(evenement_date, '%d/%b/%Y') as evenement_date\",\r\n\t\t\t\"TB_EVENEMENTS\",\r\n\t\t\t\"WHERE evenement_date < CURDATE() ORDER BY evenement_date DESC, evenement_id DESC\"\r\n\t\t);\r\n\t\r\n\t\treturn $evenements;\r\n\t\r\n\t}", "title": "" }, { "docid": "f7fd3e3a490ee2954c63b0be170a5958", "score": "0.48669416", "text": "public function getAll()\n {\n return $this->covenants;\n }", "title": "" }, { "docid": "e193477df54fb7eb85d4e83bcb95ac11", "score": "0.48633295", "text": "private function _get_stations() {\n\t\t$stations = array();\n\t\t//Check if we have stations-json in cache\n\t\tif ( ! $stations_json = apc_fetch( Travlr::STATIONS ) ) {\n\t\t\t$stations_json = $this->_setup_and_execute_curl( Travlr::STATIONS_QUERY );\n\t\t}\n\n\t\tif ( $stations_json !== null ) {\n\t\t\tapc_store( Travlr::STATIONS, $stations_json, $this->travlr_ttl * 24 );\n\t\t\t$stations = json_decode( $stations_json );\n\t\t} else {\n\t\t\treturn $stations;\n\t\t}\n\t\treturn $stations->stations->station;\n\t}", "title": "" }, { "docid": "112b84d70709198580b5f9fa60471cd3", "score": "0.48393127", "text": "public function getAllEvents()\n\t{\n\t\t$sth = $this->db->prepare(\"SELECT * , DATE_FORMAT(event_start_time, '%e %b %Y %h%p') AS event_start_time\n\t\t\t\t\t\t\t\t\tFROM events\n\t\t\t\t\t\t\t\t\tLEFT JOIN venues ON venues.venue_id = events.event_venue_id\");\n $sth->execute();\n $result = $sth->fetchAll();\n\t\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c869c6774711f9b0372f55866168dff1", "score": "0.48142117", "text": "public function call(Services_Ebay_Session $session)\n {\n $return = parent::call($session);\n \n if (!isset($return['OutageSchedules']) || !is_array($return['OutageSchedules'])) {\n return array();\n }\n \n $list = $return['OutageSchedules']['OutageSchedule'];\n if (!isset($list[0])) {\n $list = array($list);\n }\n return $list;\n }", "title": "" }, { "docid": "5b0c7680801a34cf7c863802219d5a71", "score": "0.48080412", "text": "public function getAgences(){\n $agences = [];\n $req = $this->db->prepare('SELECT * FROM agence');\n $req->execute();\n while ($donnees = $req->fetch(PDO::FETCH_ASSOC)) {\n $agences = new Agence($donnees);\n }\n return $agences;\n }", "title": "" }, { "docid": "80c6fe9a672a3b72cb2e5a3655928b23", "score": "0.4796329", "text": "public function getAllByTheaterId($idTheater)\n {\n $parameters = get_defined_vars();\n $seatTypeList = array();\n \n try{\n $query = \"SELECT SeatTypes.idSeatType, seatTypeName, description \n FROM \" . $this->tableName2.\" STT\n INNER JOIN \".$this->tableName.\" ST\n ON STT.idSeatType = ST.idSeatType\n WHERE STT.idTheater = :\".key($parameters).\" \n AND Enabled = 1\";\n \n $resultSet = $this->connection->Execute($query,$parameters);\n\n $seatTypeAttributes = array_keys(SeatType::getAttributes());\n\n foreach ($resultSet as $row)\n { \n $seatType = new SeatType();\n \n foreach ($seatTypeAttributes as $value) {\n $seatType->__set($value, $row[$value]);\n }\n\n array_push($seatTypeList, $seatType);\n }\n } catch (PDOException $ex) {\n throw new Exception (__METHOD__.\" error: \".$ex->getMessage());\n } catch (Exception $ex) {\n throw new Exception (__METHOD__.\" error: \".$ex->getMessage());\n }\n\n return $seatTypeList;\n }", "title": "" }, { "docid": "d5edfadb1ef74b9bf68a1f57086e5a4b", "score": "0.47958404", "text": "private function updateUserSelectedSeats($bookingId) {\n $em = $this->getEntityManager();\n $user_session = new Container('user');\n $selectedSeats = json_decode($user_session->eventArray['selectedSeats']);\n foreach ($selectedSeats as $row) {\n $zoneTitle = $row->zoneTitle;\n $mapZoneObj = $em->getRepository('Admin\\Entity\\MapZone')->findOneBy(array('zoneTitle' => $zoneTitle, 'eventId' => $user_session->eventArray['eventId']));\n $zoneId = $mapZoneObj->getId(); //get zone Id\n $seatIds = $row->seatIds;\n foreach ($seatIds as $seatLabel) {\n $zoneSeatsObj = $em->getRepository('Admin\\Entity\\ZoneSeats')->findOneBy(array(\n 'scheduleId' => $user_session->eventArray['scheduleId'],\n 'eventId' => $user_session->eventArray['eventId'],\n 'zoneId' => $zoneId,\n 'seatLabel' => $seatLabel\n ));\n $zoneSeatsObj->setSeatAvailability(2);\n $zoneSeatsObj->setBookingId($bookingId);\n $zoneSeatsObj->setUserId($user_session->userId);\n $em->persist($zoneSeatsObj);\n $em->flush();\n }\n }\n }", "title": "" }, { "docid": "edcd74b51bc13f4b55918cce41fc170f", "score": "0.4794092", "text": "public function getHistoryForSeat($seat_id)\n {\n // Need this function to match this query\n // select * from seats\n // where seat_id = 1\n // order by created_at DESC;\n\n $q = $this->createQuery('s')\n ->innerJoin('s.People p')\n ->leftJoin('p.Profiles pr')\n ->innerJoin('s.Routes r')\n ->where('s.seat_id = ?', $seat_id)\n ->orderBy('s.created_at DESC');\n\n return $q->execute();\n }", "title": "" }, { "docid": "4812a4ad3e71b0304f4a7b2f0ac56b4a", "score": "0.47908184", "text": "public function getEvents($fid)\n {\n $fighters = TableRegistry::get(\"Fighters\");\n $myfighter = $fighters->get($fid);\n \n $eventlistinSight=array();//array which will contain all the events in the sight fo the player\n \n $query=$this->find('all', ['order' => ['id' => 'DESC']]);//get all events\n $eventlist=$query->toArray();//put them in an array\n foreach ($eventlist as $current) { //for each event\n //if event is in the sight of the fighter\n if(abs($myfighter->coordinate_x - $current->coordinate_x)+ \n abs($myfighter->coordinate_y - $current->coordinate_y)<=$myfighter->skill_sight)\n {\n $eventlistinSight[]=$current;//add event to the list\n }\n }\n \n return $eventlistinSight;\n }", "title": "" }, { "docid": "f95163ef6ad8ae94e226c0cc419dcce2", "score": "0.47901133", "text": "public function getStations()\n\t{\n\t\t$this->update();\n\n\t\treturn Station::all();\n\t}", "title": "" }, { "docid": "7960dab20b1427f58f9eec7814779bc5", "score": "0.47885776", "text": "function getActifsEvenements(){\r\n\t\r\n\t\t$BDD = new BDD();\r\n\t\r\n\t\t$evenements = $BDD->select(\r\n\t\t\t\"evenement_id, evenement_titre, evenement_ss_titre, evenement_description, evenement_participants, DATE_FORMAT(evenement_date, '%d/%b/%Y') as evenement_date\",\r\n\t\t\t\"TB_EVENEMENTS\",\r\n\t\t\t\"WHERE evenement_date >= CURDATE() ORDER BY evenement_date DESC, evenement_id DESC\"\r\n\t\t);\r\n\t\r\n\t\treturn $evenements;\r\n\t\r\n\t}", "title": "" }, { "docid": "c1e706aad392725424d75830304ec981", "score": "0.47867462", "text": "public function getDeliveries();", "title": "" }, { "docid": "c3359c71fcf0223729ac63526e353297", "score": "0.47784784", "text": "function printSeats(mysqli $mysqli)\n{\n $showId = $mysqli->real_escape_string($_GET['showid']);\n $showId = htmlspecialchars($showId);\n $showId = strip_tags($showId);\n $reservedIdSeatsQuery = \"SELECT idseat FROM seat INNER JOIN reserved_seats ON idseat = seat_idseat INNER JOIN reservation ON reservation_idreservation = idreservation WHERE show_idshow = \" . $showId . \";\";\n $reservedSeats = $mysqli->query($reservedIdSeatsQuery)->fetch_all();\n $seatIds = getSeatIds($mysqli, $showId);\n $seatCounter = 0;\n\n foreach (range('A', 'F') as $c) {\n echo \"<tr><th class='align-middle'>$c</th>\";\n\n for ($seatNumber = 1; $seatNumber <= 10; $seatNumber++) {\n $id = $c . $seatNumber;\n $occupied = false;\n\n foreach ($reservedSeats as $reservedSeat) {\n if (in_array($reservedSeat[0], $seatIds[$seatCounter]))\n $occupied = true;\n }\n\n if ($occupied) {\n echo \"<td><a href='#'><img id='$id' src='media/seatGray.png' class='img-fluid' alt='\" . $seatIds[$seatCounter][0] . \"' onclick='fillSeat(this)'></a>\" . $seatNumber . \"</td>\";\n } else {\n echo \"<td><a href='#'><img id='$id' src='media/seatBlack.png' class='img-fluid' alt='\" . $seatIds[$seatCounter][0] . \"' onclick='fillSeat(this)'></a>\" . $seatNumber . \"</td>\";\n }\n $seatCounter++;\n }\n echo \"</tr>\";\n }\n}", "title": "" }, { "docid": "e12d9600838a96b5855914be0eaf1c54", "score": "0.47721535", "text": "public function getAvailableEvents()\n\t{\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t$query->select('event.*');\n\t\t$query->from($db->quoteName('#__swa_event') . ' AS event');\n\t\t$query->where('event.date_close >= CURDATE()');\n\n\t\t$db->setQuery($query);\n\t\t$result = $db->execute();\n\n\t\tif (!$result)\n\t\t{\n\t\t\tJLog::add(\n\t\t\t\t'SwaModelUniversityMembers::getAvailableEvents failed to do db query',\n\t\t\t\tJLog::ERROR,\n\t\t\t\t'com_swa'\n\t\t\t);\n\n\t\t\treturn array();\n\t\t}\n\n\t\treturn $db->loadObjectList();\n\t}", "title": "" }, { "docid": "ae7260693f08b2d32c1efa1fb3b82139", "score": "0.47659388", "text": "function getAllStations() {\n return json_encode($this->stations);\n }", "title": "" }, { "docid": "99b17a921b8dc3fa44d0a0e403f6ee4f", "score": "0.47630015", "text": "public static function getVenues($stateId) {\n try {\n $query = \"SELECT venueid, venuename \n FROM venues ve, cities ci, states st \n WHERE st.id = ci.state_id \n AND ci.id = ve.venuecityid\n AND st.id = \".$stateId;\n\n $result = dbconfig::run($query);\n if(!$result) {\n throw new exception(\"Venues not found.\");\n }\n $res = array();\n while($resultSet = mysqli_fetch_assoc($result)) {\n $res[$resultSet['venueid']] = $resultSet['venuename'];\n }\n $data = array('status'=>'success', 'tp'=>1, 'msg'=>\"Venues fetched successfully.\", 'result'=>$res);\n } catch (Exception $e) {\n $data = array('status'=>'error', 'tp'=>0, 'msg'=>$e->getMessage());\n } finally {\n return $data;\n }\n }", "title": "" }, { "docid": "c99445cd96ef7e1dcaf66fef36e9cb7f", "score": "0.47606036", "text": "public function index(Request $request)\n {\n $this->userseatRepository->pushCriteria(new RequestCriteria($request));\n $userseats = $this->userseatRepository->all();\n $users=User::all();\n\n if($request->expectsJson()){\n return new UserseatResourceCollection($users);\n }\n return view('userseats.index')->with('userseats', $userseats)->with('users', $users);\n \n }", "title": "" }, { "docid": "8449fb2cfd5cb7329d2e77f3d65a6255", "score": "0.474341", "text": "public function getAssociatiScaduti(){\n $associati = $this->getAssociatiNonIbernati(); \n $scaduti = array();\n \n foreach($associati as $associato){\n $a = new Associato();\n $a = $associato;\n $ultimaData = $this->getUltimaIscrizione($a->getIscrizioneRinnovo());\n \n if (strpos(getStatusAssociato($ultimaData), 'SCADUTO') !== false) {\n array_push($scaduti, $a); \n }\n /*\n if(getStatusAssociato($ultimaData) == 'SCADUTO'){ \n array_push($scaduti, $a); \n }\n */\n \n \n }\n \n return $scaduti;\n }", "title": "" }, { "docid": "629680c4e06a3a7c00263a2f7453c4fd", "score": "0.4740724", "text": "private function findReservations(string $hallID, int $startAt, int $endAt): array\n {\n $filter = [\n 'hall_id' => new ObjectId($hallID),\n 'reservations.start_at' => ['$gte' => $startAt, '$lt' => $endAt]\n ];\n return $this->recordsRepo->findReservations($filter);\n // $result = [];\n // foreach ($reservations as $r) {\n // $result = array_merge($result, $r);\n // }\n // return $result;\n }", "title": "" }, { "docid": "89f3a4c2d4632bacc84fcab23391ca45", "score": "0.47351173", "text": "public function getShd2Incidents()\r\n {\r\n return $this->_shd2Incidents;\r\n }", "title": "" }, { "docid": "00744d1ae41d0e415afdf5d7b8e4143f", "score": "0.471409", "text": "public function getStations()\r\n {\r\n //If the collection is already instantiate, the call was already done\r\n if ($this->stationsCollection instanceof StationsCollection) {\r\n return $this->stationsCollection;\r\n } else {\r\n\r\n $stationsCollection = new StationsCollection();\r\n\r\n $post = array();\r\n $post['map'] = array(\"lastUpdate\" => \"200001010000\");\r\n $raw = $this->curlThis('getAllGares', $post);\r\n\r\n if (isset($raw[0]['data'])) {\r\n foreach ($raw[0]['data'] as $rawStation) {\r\n $Station = new Station();\r\n $Station->code = $rawStation['codeTR3A'];\r\n $Station->id = $rawStation['codeTR3A'];\r\n $Station->name = $rawStation['name'];\r\n //$Station->location = $rawStation['positions'];\r\n $stationsCollection[] = $Station;\r\n }\r\n }\r\n $this->stationsCollection = $stationsCollection;\r\n return $this->stationsCollection;\r\n }\r\n }", "title": "" }, { "docid": "c82cd014bc7af5bc5a6364aacfa59800", "score": "0.47116077", "text": "public function getAvailablePlaces($seanceId)\n {\n $sql = '\n SELECT p.id as place_id, p.number as place_number\n FROM film_seance fs\n left join hall h on fs.hall_id = h.id\n left join place p on h.id = p.hall_id\n left join ticket_order o on o.film_seance_id = fs.id and o.place_id = p.id\n where fs.id = \\'' . $this->app->escape($seanceId) . '\\' and o.place_id is null\n order by p.number\n ';\n\n return $this->app['db']->fetchAll($sql);\n }", "title": "" }, { "docid": "030ce0292ea57e9c6eb96a8b7edf29f6", "score": "0.47112164", "text": "function getSpots(){\n \n $conn = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n $sql_spots = \"SELECT * FROM spots\";\n\n $query = mysqli_query($conn, $sql_spots);\n\n $result_check = mysqli_num_rows($query);\n\n $spots = array();\n\n while($r = mysqli_fetch_assoc($query)){\n $spots[] = $r;\n }\n \n $indexed = array_map('array_values', $spots);\n\n echo json_encode($indexed);\n\n if (!$spots) {\n return null;\n }\n }", "title": "" }, { "docid": "e7f2938ecff3ed45b89855e02fe62170", "score": "0.47079742", "text": "private function getArrayOpenPosEmployeeSales()\n {\n $arrOpenPosEmployeeSales = PosEmployeeSale::where('pos_cash_desk_id', $this->oPosDailyCash->pos_cash_desk_id)\n ->where('created_at', '>=', $this->oPosDailyCash->opening_timestamp)\n ->where('created_at', '<=', $this->timestampNow)\n ->where('g_state_id', self::G_STATE_SALE_DONE)\n ->where('flag_delete', false)\n ->with('paymentTypes')\n ->get();\n\n return $arrOpenPosEmployeeSales;\n }", "title": "" }, { "docid": "85b11517d1d9accd7e518346fc6c666b", "score": "0.47032022", "text": "public function getSeat()\n {\n return isset($this->Seat) ? $this->Seat : null;\n }", "title": "" }, { "docid": "a992d6da697737a294f8bea64972e582", "score": "0.46971765", "text": "public function getAllEvents() {\n\n\t\t$stmt = mysqli_prepare($this->connection, \"SELECT * FROM $this->tablename\");\t\t\n\t\t$this->throwExceptionOnError();\n\t\t\n\t\tmysqli_stmt_execute($stmt);\n\t\t$this->throwExceptionOnError();\n\t\t\n\t\t$rows = array();\n\t\t$row = new EventVO();\n\t\t\n\t\tmysqli_stmt_bind_result($stmt, $row->event_id, $row->client_id, $row->type, $row->targetdate, $row->status, $row->attention, $row->notes, $row->flagged);\n\t\t\n\t while (mysqli_stmt_fetch($stmt)) {\n\t $rows[] = $row;\n\t $row = new EventVO();\n\t mysqli_stmt_bind_result($stmt, $row->event_id, $row->client_id, $row->type, $row->targetdate, $row->status, $row->attention, $row->notes, $row->flagged);\n\t }\n\t\t\n\t\tmysqli_stmt_free_result($stmt);\n\t mysqli_close($this->connection);\n\t\n\t return $rows;\n\t}", "title": "" }, { "docid": "04742fd29344b59cb36e40ed16222ac6", "score": "0.46939516", "text": "function get_all_secciones() {\n $c = \"SELECT * FROM secciones\";\n $r = mysql_query($c);\n while ($fila = mysql_fetch_assoc($r)) {\n $secciones[] = $fila;\n }\n return $secciones;\n }", "title": "" }, { "docid": "22b725da17c8ad6059e49783515e6cf2", "score": "0.4683958", "text": "function getAvailibleSemesters() {\n\t\t$connection = new dbConnection ();\n\t\t$connection->connect ();\n\t\t$db = $connection->getDb ();\n\t\t\n\t\t$this->generateSemesters ();\n\t\t\n\t\tfor($i = 0; $i < count ( $this->checkSemesters ); $i ++) {\n\t\t\tfor($j = 0; $j < 3; $j ++) {\n\t\t\t\t\n\t\t\t\t$sql = \"SELECT * FROM CoursesOffered WHERE semester_offered LIKE '%\" . $this->checkSemesters [$i] [$j] . \"%'\"; // search the DB for matches\n\t\t\t\t$result = mysqli_query ( $db, $sql );\n\t\t\t\t\n\t\t\t\tif (mysqli_num_rows ( $result ) != 0) {\n\t\t\t\t\t\n\t\t\t\t\techo \"<option value='\" . $this->checkSemesters [$i] [$j] . \"'>\" . $this->checkSemesters [$i] [$j] . \"</option>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d3852d22d3b83c55740a395f1b5d286c", "score": "0.46749675", "text": "public function getSeasons(): array\n {\n return $this->seasons;\n }", "title": "" }, { "docid": "c3cfda7728e05be728ef48aa20f8ebfd", "score": "0.46710747", "text": "public function getBookingClients()\n {\n return $this->hasMany(BookingClient::className(), ['client_id' => 'id']);\n }", "title": "" }, { "docid": "8ec6bf26d5a518deff25ccb0ce01c69d", "score": "0.4660479", "text": "function get_reserved_slots($date,$service_name,$start_time){\n\n $query=\"SELECT reservation_time_slot.reservation_id,time_slot.timeslot_no\n FROM reservation,reservation_time_slot,time_slot,service_type\n WHERE reservation_time_slot.date='$date' AND\n service_type.type_id=reservation.service_id AND\n service_type.type_name='$service_name' AND\n time_slot.start_time='$start_time' AND\n time_slot.timeslot_no=reservation_time_slot.timeslot_no AND\n reservation.reservation_id=reservation_time_slot.reservation_id\";\n\n //echo($query);\n $result = mysqli_query($this->conn, $query);\n $details =$result -> fetch_all(MYSQLI_ASSOC);\n \n $slots=array();\n if($details){\n\n for($i=0;$i<sizeof($details);$i++){\n array_push($slots,$details[$i]['reservation_id']);\n }\n //print_r($slots);\n //Return count of array\n return(count($slots));\n }else{\n return 0;\n }\n \n }", "title": "" }, { "docid": "45dffa9b1bcfec43aca1aa47ef1c682f", "score": "0.4654506", "text": "public function getServicedClientIdsFromAppointments($data){\n \n $get = $this->DB_ReadOnly->query(\"SELECT count(DISTINCT client.ClientId) as new_client_count FROM \n \".MILL_CLIENTS_TABLE.\" client \n join \".MILL_PAST_APPTS_TABLE.\" appts on appts.ClientId=client.ClientId \n WHERE \n appts.AccountNo = '\".$data['salonAccountNo'].\"' and \n appts.SlcStatus != '2' and \n client.AccountNo = '\".$data['salonAccountNo'].\"' and \n date(AppointmentDate) >= '\".$data['startDate'].\"' and \n date(AppointmentDate) <= '\".$data['endDate'].\"' and \n date(client.clientFirstVistedDate) >= '\".$data['startDate'].\"' and \n date(client.clientFirstVistedDate) <= '\".$data['endDate'].\"' and appts.ClientId !='-999'\");\n if($get===FALSE){\n $errors = $this->DB_ReadOnly->error();\n $errors['tablename'] = 'mill_past_appointments/mill_clients';\n send_mail_database_error($errors);\n }\n return $get;\n \n }", "title": "" }, { "docid": "bf1def83935d80250c7a0ac87fec31b0", "score": "0.46516013", "text": "private function get_hotel_list(){ \n $hotelAvail = new SabreHotelAvail();\n\n return $hotelAvail->get_response(); \n }", "title": "" }, { "docid": "cb596cb93b8fd05c977a9dab059a5936", "score": "0.4646613", "text": "public function index(Request $request)\n {\n $tripInfo = $this->getTripInfo($request);\n\n $bus = $tripInfo['bus'];\n\n $fromStationName = $tripInfo['from_station']->name;\n $toStationName = $tripInfo['to_station']->name;\n $fromStationId = $tripInfo['from_station']->id;\n $toStationId = $tripInfo['to_station']->id;\n\n //If there is available seats show him that seat\n if (isset($bus, $fromStationId, $toStationId) && $bus->numberOfAvailableSeats($fromStationId, $toStationId) > 0) {\n // Get the available seat number;\n $availableSeatsNumbers = $bus->availableSeatsNumbers($fromStationId, $toStationId);\n\n if (!empty($availableSeatsNumbers)) {\n return $this->sendResponse(\n ['available_seat_numbers' => $availableSeatsNumbers],\n \"There is available seats form $fromStationName station to $toStationName station\"\n );\n } else {\n return $this->sendError('', 'We do not have seats numbers');\n }\n }\n\n return $this->sendError('', \"There is no available seats form $fromStationName station to $toStationName station\");\n }", "title": "" }, { "docid": "2fb744363796dd67ee6d13e05fc4510d", "score": "0.46453375", "text": "function getAllReservations() {\r\n global $conn;\r\n\r\n $stmt = $conn->prepare('SELECT * FROM Reservation');\r\n $stmt->execute();\r\n\r\n return $stmt->fetchAll();\r\n }", "title": "" }, { "docid": "a36152b39df154b849dbe0c01cccc9cb", "score": "0.46453148", "text": "public static function getSellers() {\n return parent::query(\"SELECT * FROM seller\"\n . \" INNER JOIN user ON user.id = seller.user_id\");\n }", "title": "" }, { "docid": "ac50f7c6a0e7514b2f1a62ab99452c80", "score": "0.4642254", "text": "public function getShelves();", "title": "" }, { "docid": "f5a9a1b4152d8a4cf6c7fc6d9d8c869b", "score": "0.46402842", "text": "public static function offerSeats($request,$context) {\r\n\r\n\t\tif (isset($_POST[\"cityFrom\"]) &&\r\n\t\t\tisset($_POST[\"cityTo\"]) &&\r\n\r\n\t\t\tisset($_POST[\"fromHour\"]) &&\r\n\r\n\t\t\tisset($_POST[\"price\"]) &&\r\n\t\t\tisset($_POST[\"seats\"])\r\n\t\t) {\r\n\r\n\t\t\t$contraintes = $_POST[\"contraints\"] ? $_POST[\"contraints\"] : \"\";\r\n\r\n\t\t\t$context->trajet = trajetTable::getTrajet(\r\n\t\t\t\t$_POST[\"cityFrom\"],\r\n\t\t\t\t$_POST[\"cityTo\"]\r\n\t\t\t);\r\n\r\n\t\t\t// Vérifie si le trajet existe vraiement\r\n\t\t\tif ($context->trajet == null) {\r\n\t\t\t\t$_SESSION[\"notification\"] = \"Trajet inconnu\";\r\n\t\t\t\t$_SESSION[\"notification_status\"] = \"warning\";\r\n\t\t\t\treturn context::ERROR;\r\n\t\t\t}\r\n\r\n\t\t\t// Ajout des voyages dans la DB\r\n\t\t\t$rslt = voyageTable::addVoyage(\r\n\t\t\t\t$_POST[\"cityFrom\"],\r\n\t\t\t\t$_POST[\"cityTo\"],\r\n\r\n\t\t\t\t$_POST[\"fromHour\"],\r\n\r\n\t\t\t\t$_POST[\"price\"],\r\n\t\t\t\t$_POST[\"seats\"],\r\n\r\n\t\t\t\t$contraintes\r\n\t\t\t);\r\n\r\n\t\t\tif ($rslt == null) {\t\t\t\t\r\n\t\t\t\t$_SESSION[\"notification\"] = \"Insertion râter\";\r\n\t\t\t\t$_SESSION[\"notification_status\"] = \"warning\";\r\n\t\t\t\treturn context::ERROR;\r\n\t\t\t} else {\r\n\t\t\t\t$_SESSION[\"notification\"] = \"Insertion réussite\";\r\n\t\t\t\t$_SESSION[\"notification_status\"] = \"success\";\r\n\t\t\t\treturn context::SUCCESS;\r\n\t\t\t}\r\n\r\n\t\t} else {\t\r\n\t\t\t$context->citiesFrom = trajetTable::getAllDepart();\r\n\t\t\t$context->citiesTo = trajetTable::getAllArrivee();\r\n\t\t}\r\n\r\n\t\treturn context::SUCCESS;\r\n\t}", "title": "" }, { "docid": "7a6872c308c5eabdab593cd370fb5305", "score": "0.46389052", "text": "public function getclientInvoicedList()\n {\n\t\t$Query = \"select u.identifier, u.email,c.company_name,up.first_name,up.last_name from User u\n\t\tLEFT JOIN UserPlus up ON u.identifier=up.user_id\n\t\tLEFT JOIN Client c ON u.identifier=c.user_id\n\t\t/*LEFT JOIN Delivery d ON u.identifier=d.user_id\n\t\tLEFT JOIN Article a ON a.delivery_id=d.id*/\n\t\twhere u.type='client' AND u.email NOT LIKE '%_new%'\";\n\t\t//u.email condition added by arun\n\t\t//AND u.invoiced = 'yes' \n\t\tif(($result = $this->getQuery($Query,true)) != NULL){\n\t\t\t$client_list=array();\n \n\t\t\tforeach($result as $key=>$value)\n\t\t\t{\n\t\t\t\tif($value['company_name'] == '')\n\t\t\t\t{\n\t\t\t\t\tif($value['first_name']==\"\")\n\t\t\t\t\t\t$value['first_name']=\"--\";\n\t\t\t\t\tif($value['last_name']==\"\")\n\t\t\t\t\t\t$value['last_name']=\"--\";\n\t\t\t\t\t\t\n\t\t\t\t\t$client_list[$value['identifier']] = strtoupper($value['email'].' ( '.$value['first_name'].' , '.$value['last_name'].' ) ');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$client_list[$value['identifier']] = strtoupper($value['email'].' ( '.$value['company_name'].' ) ');\n\t\t\t}\n\t\t\treturn $client_list;\n\t\t}else{\n\t\t\treturn \"NO\";\n\t\t}\n }", "title": "" }, { "docid": "3cb2e40421be320684e75b298f9e4d99", "score": "0.46338007", "text": "public function getSlaves();", "title": "" }, { "docid": "40de9b801c5fdfd59d9195043d9f4296", "score": "0.4633089", "text": "public function get_slots()\n {\n return $this->db->select('a.*, b.room_no AS cinema, c.title')\n ->order_by('c.title')\n ->join('tbl_room b', 'a.room_id = b.id', 'left')\n ->join('tbl_movies c', 'a.movie_id = c.id', 'left')\n ->get('tbl_showing a')\n ->result_array();\n }", "title": "" }, { "docid": "2732bbc397e8ea0cb1c962cae2022dbc", "score": "0.46328586", "text": "public function index(Sport $sport)\n {\n return $sport->events;\n }", "title": "" }, { "docid": "8b891b2cdc74c2693c5f74ab964b362f", "score": "0.4630816", "text": "public function selectReservasFromCliente($dni){\n \n $this->open();\n $consulta=\"SELECT v.idVuelo, v.origen, v.destino, v.fechaVuelo, r.asiento,r.precioR \"\n . \"FROM vuelos as v, reservas AS r \"\n . \"WHERE v.idVuelo=r.idVuelo and r.idCliente LIKE '\".$dni.\"'\";\n \n $rs = mysqli_query($this->conexion, $consulta);\n $nfilas = mysqli_num_rows($rs);\n \n if($nfilas != 0){\n \n $reservas = array();\n $i=0;\n while ($reg=mysqli_fetch_array($rs)){\n $reservas[$i]=$reg;\n $i++;\n }\n \n $this->close();\n return $reservas;\n \n }else{\n \n $this->close();\n return NULL;\n }\n\n \n \n }", "title": "" }, { "docid": "da98d0f95f20c579abe3a8f8bc0650d5", "score": "0.46302608", "text": "public function get_list($spj_id=0) {\n\t\tif ($spj_id==0) {\n\t\t\t$stickers=Sticker::all();\n\t\t}\n\t\telse {\n\t\t\t$stickers=Sticker::spjid($spj_id)->all();\n\t\t}\n\t\treturn Response::json($stickers);\n\t}", "title": "" }, { "docid": "821c69692a103b04ea2a09fe10327470", "score": "0.46267575", "text": "public function getLesStations(){\n\n $lesStations =array();\n if($this->connexion instanceof \\PDO){\n $stmt = $this->connexion->query(\"SELECT idstation,nom,adresse FROM station\")->fetchAll();\n foreach($stmt as $lastation){\n $nomAdresse=$lastation[1].\" - \".$lastation[2];\n $lesStations[$nomAdresse]= $lastation[0];\n }\n }\n return $lesStations;\n }", "title": "" }, { "docid": "d5186afd5e7ce4cf9ddc5289242a8047", "score": "0.46253014", "text": "public function getShippingInvoiced();", "title": "" }, { "docid": "5ec1dcb5b1cd0142e7415018d64d79be", "score": "0.46213198", "text": "public function getAttendees()\n {\n $query = craft()->db->createCommand()\n ->select('eventhelperattendees.*, content.title')\n ->from('eventhelperattendees')\n ->leftJoin('entries AS entries', 'entries.id = eventhelperattendees.eventId')\n ->join('content AS content', 'content.elementId = entries.id')\n ->where('content.field_dateStart > NOW()')\n ->queryAll();\n\n $data = array();\n\n foreach ($query as $row) {\n $row['dateCreated'] = date_format(date_create($row['dateCreated']), \"M d, Y\");\n $row['dateUpdated'] = date_format(date_create($row['dateUpdated']), \"M d, Y\");\n\n $data[] = $row;\n }\n\n return $data;\n }", "title": "" }, { "docid": "5bc78f517d2242c97c2b8764bbd38e2a", "score": "0.46173266", "text": "public function index()\n {\n $vouchers = VoucherCodes::all();\n return $vouchers;\n }", "title": "" }, { "docid": "fb1c91ecbcb9204357ad4052f6fbcb85", "score": "0.46165818", "text": "function crew_vessels_get()\n {\n $this->load->model('vessel_crew_model', 'model1');\n\n $search = array();\n $response = FALSE; \n \n $cache = Cache::get_instance();\n $response = $cache::get('onboards' . serialize($this->_args));\n\n if (!$response) {\n $response['_count'] = $this->model1->count_results($this->_args);\n\n if ($response['_count'] > 0)\n {\n $response['data'] = $this->model1->fetch($this->_args, true)->result();\n } \n $response['l'] = $this->db->last_query(); \n //$cache::save('onboard' . serialize($this->_args), $response);\n }\n\n $this->response($response);\n }", "title": "" }, { "docid": "e74a5a350990690f4128608b5cbaa556", "score": "0.4614573", "text": "function get_counter_Offers($Agent_ID) {\n global $db;\n $query = $db->prepare(\"SELECT * FROM CounterOffer WHERE Agent_ID = $Agent_ID AND counterOfferStatus = 'Pending' ORDER BY counterOfferTimeStamp DESC;\");\n $query->setFetchMode(PDO::FETCH_ASSOC);\n $query->execute();\n \n //Eliminating redundant Counter Offers for the same Offer. The newest Counter Offer for an Offer is kept in the array $CounterOffers\n if ($query){\n $found_CounterOffers = array();\n foreach ($query as $row){\n if (!in_array($row['Offer_ID'], $found_CounterOffers)){\n $CounterOffers[] = $row;\n $found_CounterOffers[] = $row['Offer_ID'];\n }\n }\n }\n \n //just testing values\n //echo var_dump($CounterOffers);\n \n return $CounterOffers;\n }", "title": "" }, { "docid": "78d21897916f63681423574f9222901c", "score": "0.4613247", "text": "public function siteServiceIncidents() {\n return StatusBoard_SiteServiceIncident::allForIncident($this);\n }", "title": "" }, { "docid": "836e3b49c6eff88f0094bd23acd693c9", "score": "0.46127346", "text": "function get_all_events(){\n\t\t//* loop and get all the data\n\t\t $prev = '';\n\t\t $pathApi = $this->Soket_API_URL.'/community/'.$this->Soket_Community_ID.'/events';\n\t\t $last30days = gmdate('m/d/Y', strtotime('-30 days'));\n\t\t $curdate = gmdate('m/d/Y', strtotime('+1 day'));\n\t\t //* set the parameters\n\t\t $parameters = \"?start_date=$last30days&end_date=$curdate&count=1000000\"; \n\t\t //* process and add the event datas\n\t\t $responseData = $this->createRequest($pathApi, $parameters , $this->Soket_Secret, $this->Soket_Consumer_ID);\t\t\n\t\t foreach($responseData['data'] as $event){\t\t\t \t\t\n\t\t\t $storeObjs[] = $event;\n\t\t }\t\n\t\t return $storeObjs;\n\t}", "title": "" }, { "docid": "dba83627f3e259798ef3c7c0c7903a5f", "score": "0.4611998", "text": "public function seances(){\n $seances = seance::all();\n $data = [\n 'list_seances' => $seances,\n ];\n return view('admin.seances')->with($data);\n }", "title": "" }, { "docid": "2ae12646a52a6f71a04cf147e85c36c6", "score": "0.46118242", "text": "public static function getAll()\n\t\t{\n\t\t\t$list = array();\n\t\t\t//get connection\n\t\t\t$connection = SqlSrvConnection::getConnection();\n\t\t\t//query\n\t\t\t$query = \"SELECT de.venta, v.fecha, SUM((de.cantidad * de.precio)) as costoTotal\n\t\t\t\t\t\tFROM ventas.detalle as de\n\t\t\t\t\t\tinner join ventas.ventas as v on v.id = de.venta\n\t\t\t\t\t\tinner join rh.empleados as e on e.control = de.vendedor\n\t\t\t\t\t\twhere v.status = 'UP'\n\t\t\t\t\t\tGROUP BY de.venta, v.fecha\";\n\t\t\t$command = sqlsrv_query($connection, $query);\n\t\t\twhile($ventas = sqlsrv_fetch_array($command))\n {\n\t\t\t\tarray_push($list, new Venta($ventas['venta'], $ventas['costoTotal'], $ventas['fecha']));\n } /*While*/\n sqlsrv_free_stmt($command);\n sqlsrv_close($connection);\n\t\t\t//list\n\t\t\treturn $list;\n\t\t}", "title": "" }, { "docid": "4c565e14ab3dfdbf390ea7d602e33ede", "score": "0.46064252", "text": "function get_vat(){\r\n\t\t$return = array();\r\n\t\t$so_vat = new so_sql('spireapi','spireapi_vat');\r\n\r\n\t\t$info = $so_vat->search(array('vat_appname' => array('global',$GLOBALS['egw_info']['flags']['currentapp']), 'vat_active' => true),false);\r\n\t\tforeach((array)$info as $data){\r\n\t\t\t$return[$data['vat_id']] = $data['vat_label'];\r\n\t\t}\r\n\r\n\t\treturn $return;\r\n\t}", "title": "" }, { "docid": "f09ecbd2d9e9d7fa35bdd608bce7ebc0", "score": "0.4605734", "text": "public function getSons(){\r\n $stmt = $this->db->prepare(\"call sonOfActivity(:id)\");\r\n $stmt->bindParam(\":id\", $this->id, PDO::PARAM_INT);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n return $result;\r\n }", "title": "" }, { "docid": "724adde8f2f0bfd573d9681d55032cc6", "score": "0.46046036", "text": "public function getFavoriteSellers()\n {\n return $this->favoriteSellers;\n }", "title": "" }, { "docid": "be5e98f3e115c8138e107655853ce6c0", "score": "0.46004447", "text": "function getOutboundTrains()\n {\n # According to GTFS, SEPTA may have a trip from Airport to 30th street on the \"Airport line\"\n # (which doesn't pass Suburban station) but have the same train number on a trip from 30th street to\n # Fox Chase continue afterwards.\n $sql = '\n SELECT block_id\n FROM (\n -- INBOUND TRIPS\n SELECT block_id, service_id -- TRAIN NUMBER\n FROM trips\n NATURAL JOIN routes\n WHERE route_short_name=?\n AND service_id=?\n AND trip_headsign <> \"Center City Philadelphia\"\n ) a\n \t NATURAL JOIN trips\n \t NATURAL JOIN routes\n NATURAL JOIN stop_times\n NATURAL JOIN stops\n WHERE stop_name=\"Suburban Station\"\n ORDER BY arrival_time>\"03:00:00\" DESC,\n arrival_time\n ';\n $statement = self::$database->prepare($sql);\n $statement->execute([$this->route, $this->schedule]);\n $retval = [];\n while ($row = $statement->fetch()) {\n $retval[] = $row['block_id'];\n }\n return $retval;\n }", "title": "" }, { "docid": "e8ec9dc9fe96f279dc6e19cef2e8d62e", "score": "0.4600304", "text": "function getAllEvenements(){\r\n\t\r\n\t\t$BDD = new BDD();\r\n\t\r\n\t\t$evenements = $BDD->select(\r\n\t\t\t\"evenement_id, evenement_titre, evenement_ss_titre, evenement_description, evenement_participants, DATE_FORMAT(evenement_date, '%d/%b/%Y') as evenement_date\",\r\n\t\t\t\"TB_EVENEMENTS\",\r\n\t\t\t\"ORDER BY evenement_date DESC, evenement_id DESC\"\r\n\t\t);\r\n\t\r\n\t\treturn $evenements;\r\n\t\r\n\t}", "title": "" }, { "docid": "18c6f95a3cd3191532ea50cc4bcdf643", "score": "0.45980763", "text": "function GetSoepen()\n\t{\n\t\tglobal $link;\n\t\t\t\n\t\t$array = null;\n\t\t$teller = 0;\n\t\t\t\n\t\t$result = mysqli_query($link, \"SELECT * FROM soepen\");\n\n\t\tif (mysqli_num_rows($result) > 0) \n\t\t{\n\t\t\twhile($row = mysqli_fetch_assoc($result)) \n\t\t\t{\n\t\t\t\t$array[$teller][0] = $row[\"IDsoepen\"];\n\t\t\t\t$array[$teller][1] = $row[\"omschrijving\"];\n\t\t\t\t$array[$teller][2] = $row[\"prijs\"];\n\t\t\t\t$teller++;\n\t\t\t}\n\t\t}\t\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "44de4e8475f3ae7cb1fb4a629ee981f6", "score": "0.45950353", "text": "public static function getSessList( $key ){\n\t\tif ( !isset( $_SESSION[$key] ) || !is_array( $_SESSION[$key] ) ) {\n\t\t\treturn array();\n\t\t}\n\t\treturn $_SESSION[$key];\n\t}", "title": "" }, { "docid": "ba7fce8951365fad87770a7fa80d3fee", "score": "0.4594447", "text": "private function getArrayOpenPosSales()\n {\n $arrOpenPosSales = PosSale::where('pos_cash_desk_id', $this->oPosDailyCash->pos_cash_desk_id)\n ->where('created_at', '>=', $this->oPosDailyCash->opening_timestamp)\n ->where('created_at', '<=', $this->timestampNow)\n ->where('g_state_id', self::G_STATE_SALE_DONE)\n ->where('flag_delete', false)\n ->with('paymentTypes')\n ->get();\n return $arrOpenPosSales;\n }", "title": "" }, { "docid": "8be2c531e8428d57cbec76d61375e03b", "score": "0.45934147", "text": "public function getVitesse()\r\n {\r\n return $this->vitesse;\r\n }", "title": "" } ]
8aefa813394754ef5f0dbf336a528532
Format the current link for HTML output
[ { "docid": "92704a1213af96a8f93e01664ef6f8b4", "score": "0.7652048", "text": "public function formatCurrentUrl() {}", "title": "" } ]
[ { "docid": "d2a440c03c913d2d645682e89a5832a4", "score": "0.7760042", "text": "function formatCurrentUrl() ;", "title": "" }, { "docid": "4986fb5f5f2f1e80b785607e8965b412", "score": "0.7510696", "text": "public function formatCurrentUrl() {\n\t\treturn $this->linkParts['url'];\n\t}", "title": "" }, { "docid": "b602a6124657289ef1bb6dbf85dc5574", "score": "0.71976596", "text": "public function __toString(){\n\t\t\t\t$this->_format();\n\n\t\t\t\t// adds link to formatted string\n\t\t\t\tif($this->_link){\n\t\t\t\t\treturn \"<a href='\".$this->_link.\"'>\".$this->_formatted.\"</a>\";\n\t\t\t\t} else {\n\t\t\t\t\treturn $this->_formatted;\n\t\t\t\t}\t\n\n\t\t}", "title": "" }, { "docid": "90a7cb844958b84d0c4e123c3ede64e4", "score": "0.6842739", "text": "function _formatLink($link) {\n //make sure the url is XHTML compliant (skip mailto)\n if(substr($link['url'], 0, 7) != 'mailto:') {\n $link['url'] = str_replace('&', '&amp;', $link['url']);\n $link['url'] = str_replace('&amp;amp;', '&amp;', $link['url']);\n }\n //remove double encodings in titles\n $link['title'] = str_replace('&amp;amp;', '&amp;', $link['title']);\n\n // be sure there are no bad chars in url or title\n // (we can't do this for name because it can contain an img tag)\n $link['url'] = strtr($link['url'], array('>' => '%3E', '<' => '%3C', '\"' => '%22'));\n $link['title'] = strtr($link['title'], array('>' => '&gt;', '<' => '&lt;', '\"' => '&quot;'));\n\n $ret = '';\n $ret .= $link['pre'];\n $ret .= '<a href=\"'.$link['url'].'\"';\n if(!empty($link['class'])) $ret .= ' class=\"'.$link['class'].'\"';\n if(!empty($link['target'])) $ret .= ' target=\"'.$link['target'].'\"';\n if(!empty($link['title'])) $ret .= ' title=\"'.$link['title'].'\"';\n if(!empty($link['style'])) $ret .= ' style=\"'.$link['style'].'\"';\n if(!empty($link['rel'])) $ret .= ' rel=\"'.trim($link['rel']).'\"';\n if(!empty($link['more'])) $ret .= ' '.$link['more'];\n $ret .= '>';\n $ret .= $link['name'];\n $ret .= '</a>';\n $ret .= $link['suf'];\n return $ret;\n }", "title": "" }, { "docid": "737904612dce54115db43d525c587ea6", "score": "0.6832715", "text": "protected function _link() {\n\n\t\treturn $this->lastChanges( $this->request()::$url );\n\t}", "title": "" }, { "docid": "462a0053d1460d5bcc6b3676ec80fd5e", "score": "0.6575808", "text": "public function getLink() {\r\n\t\treturn '<a rel=\"statistics\" href=\"'.self::$DISPLAY_URL.'?id='.$this->id.'\" alt=\"'.$this->description.'\">'.$this->name.'</a>';\r\n\t}", "title": "" }, { "docid": "f96ec84abcc525307f3215d4b6544c15", "score": "0.65421796", "text": "public function getLink() {\n\t\treturn '<a rel=\"statistics\" href=\"'.self::$DISPLAY_URL.'/'.$this->id().'\">'.$this->name().'</a>';\n\t}", "title": "" }, { "docid": "a7c29ea4ba1b407ae5e88d345e120845", "score": "0.64426327", "text": "public function getLink(): string\n {\n return 'Class-' . $this->getSlug() . '.html';\n }", "title": "" }, { "docid": "6e3f0d8b5bd779c97985b8e4b99dfb7e", "score": "0.63796365", "text": "public function Link() {\n\t\treturn self::$url_segment .'/';\n\t}", "title": "" }, { "docid": "53ed909ebd7e3de64f54ebcf51933f41", "score": "0.63792837", "text": "function referrer_link( $format = '%link', $title = '%title', $sep = '&raquo;', $sepdirection = 'left' ) {\n\techo Smarter_Navigation::referrer_link( $format, $title, $sep, $sepdirection );\n}", "title": "" }, { "docid": "669a77d3df2df4cb80f4c1eab883a7de", "score": "0.6372682", "text": "public function link() {\n\t\treturn $this->link_content;\n\t}", "title": "" }, { "docid": "3fd79d1b43cefc588d2ee9436550a234", "score": "0.6368122", "text": "protected function renderCurrentUrl() {}", "title": "" }, { "docid": "3fd79d1b43cefc588d2ee9436550a234", "score": "0.6368122", "text": "protected function renderCurrentUrl() {}", "title": "" }, { "docid": "0d894cdf954de752762689ae4a7a63bd", "score": "0.635858", "text": "public function getUrl()\n\t{\n\t\treturn App\\Purifier::decodeHtml($this->get('linkto'));\n\t}", "title": "" }, { "docid": "0a35bdb445f9e0daf93e68c0d65017ee", "score": "0.6346867", "text": "function renderLink($text, $href) {\n\t$dir = PUBLIC_DIR;\n\t$link = '<p class=\"summary_report\"><a href=\"'. $href . '\">' . $text . '</a></p>';\n\treturn $link;\n}", "title": "" }, { "docid": "3bf1164c11b2bd2d306c46b3ed594310", "score": "0.63206744", "text": "public function CreateLink() {\r\n\t\t$mlink = \"<a href=\\\"$this->Link\\\"\";\r\n\t\tif ($this->Key != '') $mlink .= \" accesskey=\\\"$this->Key\\\"\";\r\n\t\t$mlink .= \"><strong>$this->Text</strong> \";\r\n\t\tif ($this->Title != '') $mlink .= $this->Title;\r\n\t\t$mlink .= '</a>';\r\n\t\treturn $mlink;\r\n\t}", "title": "" }, { "docid": "d2dcbe2c2eb4d78e3cd29c71d2eec187", "score": "0.63076866", "text": "public function getLink() {\n return \"posts/single/{$this->page->charity->name}/{$this->post_id}\";\n }", "title": "" }, { "docid": "c914ca0181ac3cffb5428c3f40659f02", "score": "0.6275911", "text": "function do_html_URL($url, $name)\r\n{\r\n?>\r\n <br><a href=\"<?=$url?>\"><?=$name?></a><br>\r\n<?\r\n}", "title": "" }, { "docid": "afc0b4232e2710846ac7fb68ea9b30c0", "score": "0.6270473", "text": "public function link(): string {\n\t\treturn $this->page['link'] ?? '';\n\t}", "title": "" }, { "docid": "3f8c031d9f374d4ad78afbf8741b7a3c", "score": "0.62604344", "text": "function urlify($link, $disp, $color = '#0000FF', $bt_replace = true)\n{\n $link = htmlspecialchars($link, ENT_QUOTES);\n $disp = htmlspecialchars($disp, ENT_QUOTES);\n\n // replace backticks with html code to prevent errors\n if ($bt_replace === true) {\n $link = str_replace('`', '&#96;', $link);\n $disp = str_replace('`', '&#96;', $disp);\n }\n\n // return url\n return \"<a href='$link' target='_blank'><u><font color='$color'>$disp</font></u></a>\";\n}", "title": "" }, { "docid": "8e5e28a4d4f6f08ec8c5f768cbfcc7ff", "score": "0.6235788", "text": "function do_html_URL($url, $name) {\r\n?>\r\n <a href=\"<?php echo htmlspecialchars($url); ?>\"><?php echo htmlspecialchars($name); ?></a><br />\r\n<?php\r\n}", "title": "" }, { "docid": "69082bffb87cafdef5ffb3c37d8443d7", "score": "0.6229813", "text": "public function link() { return site_url().'/'.$this->post->post_name; }", "title": "" }, { "docid": "9181fb2e78d6a294c1574b1dd831c18d", "score": "0.62253493", "text": "function do_html_URL($url, $name) {\n?>\n <a href=\"<?php echo $url; ?>\"><?php echo $name; ?></a><br />\n<?php\n}", "title": "" }, { "docid": "a4de271e0fa6aa265b64f5253b87c176", "score": "0.6219125", "text": "protected function _toHtml(): string\n {\n if (false != $this->getTemplate()) {\n return parent::_toHtml();\n }\n\n return sprintf('<li><a %s>%s</a>',\n $this->getLinkAttributes(), $this->escapeHtml($this->getLabel())\n );\n }", "title": "" }, { "docid": "b91d08dda6fe99a6f02ec6ba77ebc29b", "score": "0.6201356", "text": "function do_html_URL($url,$name){\n?>\n\t<br/><a href=\"<?php echo $url;?>\"<?php echo $name;?></a><br/>\n<?php\n}", "title": "" }, { "docid": "edea960d327677bd2fdc79dee9f94148", "score": "0.6192343", "text": "public function __toString()\n {\n return $this->href . '';\n }", "title": "" }, { "docid": "cc1982167e762c0999d3269224b82259", "score": "0.6163174", "text": "public function toString() {\n return $this->getLinkGenerator()->generateFromLink($this);\n }", "title": "" }, { "docid": "d6bb86cf5fcf19670469a21c68398592", "score": "0.61477536", "text": "function print_link_text($table) {\n\n\t$html = \"<a class=\\\"div_class\\\" href=\\\"\" . $table['link'] . \"\\\">\\n\";\n\t$html .= \"\\t<h3>\" . $table['titre'] . \"</h3>\\n\";\n\t$html .= \"\\t<p>\" . $table['texte'] . \"</p>\\n\";\n\t$html .= \"</a>\\n\";\n\n\treturn $html;\n}", "title": "" }, { "docid": "319554e35c9931f3af5dac2fef41b008", "score": "0.61313695", "text": "public function links()\n\t{\n\t\t$this->save();\n\t\treturn $this->getView()->render();\n\t}", "title": "" }, { "docid": "e5ac1a5af0fdb1188c66bd3072369c1d", "score": "0.61272806", "text": "public function get_slug_with_link ()\n {\n $slug = $this->get_slug ();\n $slug_with_path = $this->get_slug_with_path ();\n return \"<a href='/$slug_with_path'>$slug</a>\";\n }", "title": "" }, { "docid": "3b15abf045020f487f9dc899794fc5af", "score": "0.6103919", "text": "function href ($link, $text) {\nreturn \"<a class=\\\"charList\\\" href=\\\"$link\\\">$text</a>\";\n}", "title": "" }, { "docid": "1fb99fd426a242a95023e141f3deb6fc", "score": "0.6098599", "text": "function format_link( $page, $base ) {\n\t\n\tglobal $wp_rewrite;\n\t\n\t$link = str_replace('%_%', \"?page=%#%\", $base);\n\t$link = str_replace('%#%', $page, $link);\n\t$link = str_replace( $wp_rewrite->pagination_base . '/1/','', $link );\n\t$link = str_replace('?paged=1','', $link);\n\n return str_replace(' ','+', $link);\n\n}", "title": "" }, { "docid": "e5ac8090c772c8ef2cfee0744dcaa5d0", "score": "0.60738444", "text": "public function navigation($linkFormat = '<li><a href=\"%s\">%d</a></li>', $blockFormat = '<ul>%s</ul>') {\n\t\t$links = array();\n\t\tforeach($this->_rowset->getPageRange() as $page) {\n\t\t\t$url = $this->_view->url(array('page' => $page));\n\t\t\t$links[] = sprintf($linkFormat, $url, $page);\n\t\t}\n\t\t$html = sprintf($blockFormat, implode('', $links));\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "48dbd194033b2308ef13641f0bfb9d33", "score": "0.6072712", "text": "public function getLink(): string\n {\n return $this->link;\n }", "title": "" }, { "docid": "2ed32e1a45b3da9f0427f7e3f980a1c8", "score": "0.6065335", "text": "public function toUrl()\n {\n\n return '<a href=\"'.static::$toUrl.'&amp;objid='.$this->id.'\" >'.$this->text().'</a>';\n\n }", "title": "" }, { "docid": "ebda2953b23053c8592f2e7113730d4c", "score": "0.6061484", "text": "public function url()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse\n\t\t{\n\t\t\t$url = $this->generateString();\n\t\t\treturn htmlentities( $url );\n\t\t}\n\t}", "title": "" }, { "docid": "80a3c90f4fa5aaa5212a20f413169528", "score": "0.6049597", "text": "public function link()\n {\n return url('situation/' . $this->id);\n }", "title": "" }, { "docid": "a2ef8b39530850d0951cd8b44d8554d8", "score": "0.60492533", "text": "function render_link( $args ) {\n\t\t$args['tag'] = 'a';\n\t\t$tooltip_markup = $this->render( $args );\n\n\t\treturn $tooltip_markup;\n\t}", "title": "" }, { "docid": "de85f4b7158d4d4bc8d715acddcc5fb8", "score": "0.60446423", "text": "public function Link()\n {\n return ShoppingCart_Controller::set_currency_link($this->Code);\n }", "title": "" }, { "docid": "372bcdcedf96c396b3fb0f2b8dc3fd19", "score": "0.60369074", "text": "function renderFilterCreationLink() {\n\t\t$content = tslib_CObj::getSubpart($this->fileContent, '###NEWFILTER_LINK###');\n\n\t\tif (!isset($this->conf['newfilter_link.']['form_url.']['parameter'])) {\n\t\t\t$this->conf['newfilter_link.']['form_url.']['parameter'] = $GLOBALS['TSFE']->id;\n\t\t}\n\t\t$this->conf['newfilter_link.']['form_url.']['returnLast'] = 'url';\n\t\t$content = tslib_cObj::substituteMarker($content, '###FORM_URL###', $this->cObj->typolink('', $this->conf['newfilter_link.']['form_url.']));\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "592584c875a8cb6172b12848ff083ae5", "score": "0.60141546", "text": "protected function FormatLink($year,$month,$day)\n\t{\n\t\tif (STATIC_URLS==true)\n\t\t{\n\t\t\treturn $this->link.$year.'/'.$month.'/'.$day.'/';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->link.'year='.$year.'&month='.$month.'&day='.$day;\n\t\t}\n\t}", "title": "" }, { "docid": "624c0a02b967548b7f09bbfb6efa1ac6", "score": "0.60127044", "text": "function output_link($copy, $link = \"#\", $target = false, $title = false, $wrap = false) {\n\n $title_text = \"\";\n $target_text = \"\";\n\n if( $link == \"\" || $link == false || $link == null ){\n\n return;\n }\n\n if( $copy == \"\" || $copy == false || $copy == null ){\n\n return;\n }\n\n if( $title != false ){\n\n $title_text = 'title=\"'.$title.'\"';\n }\n\n if( $target != false ){\n\n $target_text = 'target=\"'.$target.'\"';\n }\n\n if ( $wrap != false ) {\n \n echo '<'.$wrap.'>';\n }\n\n echo '<a href=\"'.$link.'\" '.$target_text.' '.$title_text.' >'.$copy.'</a>';\n\n if ( $wrap != false ) {\n \n echo '</'.$wrap.'>';\n }\n}", "title": "" }, { "docid": "6dd446dfa7a4093a9b42439551f20cbb", "score": "0.60096943", "text": "public function FormatLink($link, $format='0') { \n $isyoutube = strrpos($link, \"youtube\"); \n if($isyoutube === false) {\n return $status = \"invalid\";\n }\n else {\n $str_pos = strrpos($link, \"/v/\");\n if($str_pos !==false) {\n $you_code = substr($link, $str_pos+3, 11);\n } \n else {\n $str_pos = strrpos($link, \"?v=\");\n $you_code = substr($link, $str_pos+3, 11);\n } \n if(strlen($you_code)==11) {\n if($format=='0') { \n $you_link = 'http://www.youtube.com/v/'.$you_code;\n }\n else {\n $you_link = 'http://www.youtube.com/watch?v='.$you_code;\n }\n return $you_link;\n }\n else {\n return $status = \"invalid\";\n }\n } \n }", "title": "" }, { "docid": "be7dc81772edc02aa33028c1ea2c7f97", "score": "0.6006105", "text": "function getHtmlLink() {\n\t\treturn $this->_HtmlLink;\n\t}", "title": "" }, { "docid": "8ddc0f112b193eaa2a0a2fd4e41f8ea0", "score": "0.6005674", "text": "public function getLinkAttribute()\n\t{\n\t\treturn HTML::link('/team/view/'. $this->id, $this->name);\n\t}", "title": "" }, { "docid": "976e2b7a1776b64d7a6286733fbb3cdd", "score": "0.60035443", "text": "public function __toString()\n {\n ob_start();\n\n $link = '<a href=\"'. $this->_url .'\" rel=\"nofollow\">%s</a>';\n\n ?>\n\n <li>\n <header>\n <h3><?php printf( $link, $this->_title ); ?></h3>\n <div class=\"meta\"><strong><?php _e( 'Date posted', 'feed-scraper' ); ?></strong>: <time><?php echo $this->_pubDate->format( 'd/m/Y' ); ?></time></div>\n </header>\n <p><?php echo $this->_excerpt; ?></p>\n <footer>\n <?php printf( $link, __( 'Read more', 'feed-scraper' ) .' &raquo;' ); ?>\n </footer>\n </li>\n\n <?php\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "ef9aaa48d352c65ed0330b4b3c89e6fc", "score": "0.59974086", "text": "function acm_helper_help_link($link) {\n\techo '<a href=\"'.$link.'\" target=\"_blank\"><div class=\"dashicons dashicons-editor-help\"></div></a>';\n}", "title": "" }, { "docid": "d57c6abf3e8fb23af1e16f42ccebd09a", "score": "0.5993045", "text": "public function link() {\n\t\treturn $this->bookmark->link_url;\n\t}", "title": "" }, { "docid": "9b7686e6cb33d2e4bd7f2deb76d7e916", "score": "0.5984982", "text": "function link_to($linkText, $routeIndex, $aExtra=[]){\n $ci =& get_instance();\n $extras = \"\";\n foreach ($aExtra as $key => $value) {\n $extras.=$key.'=\"'. str_replace('\"', '\\\"', $value).'\"';\n }\n return '<a href=\"'. base_url($routeIndex).'\" '.$extras.'>'.$linkText.'</a>';\n }", "title": "" }, { "docid": "9004115c4bb7acacd865e42e37dbd3c6", "score": "0.5978269", "text": "private function make_link($link=null) {\n\t\n\t $ret = str_replace('@','?t=',$link);\n\t\t$out = str_replace('^',$this->cseparator,$ret);\n\t\treturn ($out);\n\t}", "title": "" }, { "docid": "659d17b691f8e29667ae327d19a4a708", "score": "0.5977578", "text": "public function link_for_activitylink() {\n global $DB;\n $module = $DB->get_record('course_modules', array('id' => $this->properties->activitylink));\n if ($module) {\n $modname = $DB->get_field('modules', 'name', array('id' => $module->module));\n if ($modname) {\n $instancename = $DB->get_field($modname, 'name', array('id' => $module->instance));\n if ($instancename) {\n return html_writer::link(new moodle_url('/mod/'.$modname.'/view.php', array('id'=>$this->properties->activitylink)),\n get_string('activitylinkname', 'languagelesson', $instancename),\n array('class'=>'centerpadded lessonbutton standardbutton'));\n }\n }\n }\n return '';\n }", "title": "" }, { "docid": "bb8bcbae8d75140533824fa86afd5a91", "score": "0.59745854", "text": "public function getLink() {}", "title": "" }, { "docid": "4747f8b6384b27194abdbb86311f373c", "score": "0.59731364", "text": "function _post_format_link($link, $term, $taxonomy)\n {\n }", "title": "" }, { "docid": "8babe525cc86abade4b0ec0dfe9b519f", "score": "0.59650767", "text": "public function get_book_linked_title() : string {\n\t\t$tmpl = '<p><a href=\"%s\">%s</a></p>';\n\n\t\treturn sprintf(\n\t\t\t$tmpl,\n\t\t\tesc_url( $this->link ),\n\t\t\tesc_html( $this->title )\n\t\t);\n\t}", "title": "" }, { "docid": "3636e2fe8801185a9fb5a0343e2d7606", "score": "0.5954361", "text": "public function link()\r\n\t{\r\n\t\t$language_segment = (Config::get('core::languages')) ? $this->language->uri . '/' : '';\r\n\r\n\t\treturn url($language_segment . 'galleries/' . $this->gallery->slug . '/' . $this->id);\r\n\t}", "title": "" }, { "docid": "0fd43c8c469383d462278eed1a3f930d", "score": "0.5943427", "text": "public function make_personilizedLink($link,$displayValue)\n {\n return $link.$displayValue.'</a>';\n }", "title": "" }, { "docid": "16f9a651901d6e398293e31ae3eecd24", "score": "0.5935122", "text": "public function getLink();", "title": "" }, { "docid": "16f9a651901d6e398293e31ae3eecd24", "score": "0.5935122", "text": "public function getLink();", "title": "" }, { "docid": "695f61dd01057727f5fa14ab97ca0b03", "score": "0.59350395", "text": "private static function _editorLinkTemplate()\n\t{\n\t\t$config = phplogConfig::getConfig();\n\t\t\n\t\tif (!$config['editor']['enabled']) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn <<<EOT\n\t<span>[<a onclick=\"open_this_file({line});\">Edit</a>]</span>\n\t<input type=\"hidden\" id=\"editor_line_{line}\" value=\"{caller_line}\" />\nEOT;\n\t}", "title": "" }, { "docid": "bd85c4359c6a1ebce67fa67236845e82", "score": "0.5933532", "text": "protected function _toHtml() {\r\n\t\t$html = '';\r\n\t\t$link_options = self::getData('link_options');\r\n\r\n\t\tif(empty($link_options)) {\r\n\t\t\treturn $html;\r\n\t\t}\r\n\r\n\t\t$arr_options = explode(',', $link_options);\r\n\r\n\t\tif(is_array($arr_options) && count($arr_options)) {\r\n\t\t\tforeach($arr_options as $option) {\r\n\t\t\t\tSwitch ($option) {\r\n\t\t\t\t\tcase 'print':\r\n\t\t\t\t\t\t$html .= '<div><a href=\"javascript: window.print();\">Print</a></div>';;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'email':\r\n\t\t\t\t\t\t$html .= '<div><a href=\"mailto:yourcompanyemail@domain.com&subject=Inquiry\">Contact Us</a></div>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "817afc79e375eb713c4f0698319af260", "score": "0.5932149", "text": "function twitter_format_link($s) {\n return preg_replace('@(https?://([-\\w\\.]+[-\\w])+(:\\d+)?(/([\\w/_\\.#-]*(\\?\\S+)?[^\\.\\s])?)?)@', '<a target=\"blank\" rel=\"nofollow\" href=\"$1\" target=\"_blank\">$1</a>', $s);\n}", "title": "" }, { "docid": "c52c8ae4ada8e124d916af0229ebe9d3", "score": "0.59290695", "text": "public function link() {\n if (! $this->_link) {\n return;\n }\n foreach ($this->_link as $rel => $href) {\n echo '<link rel=\"' . $rel . '\" href=\"' . $href . '\" />';\n echo \"\\n\";\n }\n }", "title": "" }, { "docid": "62e583ee4ce21c41d8ea3abaac013129", "score": "0.59256417", "text": "function get_link()\n\t{\n\t\treturn $this->private_get_link($this->get_name());\n\t}", "title": "" }, { "docid": "f0ea18faa15f1f27021869d8f1e4fb1b", "score": "0.59200376", "text": "public function CreateLink() {\n return Controller::join_links($this->Link(), 'manage','new','edit');\n }", "title": "" }, { "docid": "306b9d245be20ca9cf873b8850d8efb8", "score": "0.5919831", "text": "public function get_link() {\r\n return $this->link;\r\n }", "title": "" }, { "docid": "3d52c8722b15d7103c703b8b87be9091", "score": "0.59183854", "text": "function _kala_migrate_get_status_link($help) {\n // Run href and return it properly formatted.\n $link = _kala_migrate_get_between($help, '<a href=\"', '\"');\n return !empty($link) ? 'http://www.drupal.org' . $link : '';\n}", "title": "" }, { "docid": "99c45bfd70b795d7295e9ec973a24390", "score": "0.59069246", "text": "function formatString($string) {\n\t\tif(stripos($string, \"href=\") > -1 && !stripos($string, \"target\")) {\n\t\t\t$string = preg_replace('/href=\"(.+)\"/', 'href=\"$1\" target=\"_blank\"', $string);\n\t\t} else if(stripos($string, \"http://\") > -1) {\n\t\t\t$string = preg_replace('/(.+)/', '<a href=\"$1\" target=\"_blank\">$1</a>', $string);\n\t\t}\n\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "f8319d6c73c147c2d61c0dc83ccd460c", "score": "0.59042114", "text": "function href($label, $link, $extra='') {\n\treturn \"<a href='$link' $extra>$label</a>\\n\";\n}", "title": "" }, { "docid": "54d1ebeeee41133f2653963d4d2e7ea6", "score": "0.58974123", "text": "function mk_link($feedURL, $feedID){\r\n\r\n\t//moved feed to main page calling to make function versitile/dynamic\r\n\t$xml = LoadFeed($feedURL);\r\n\r\n\t///git250-17q1/app/proj03newsfeed/feedView.php&feedType=syfy&feedID=0&feedTitle=firefly\r\n\techo '<a class=\"btn btn-primary btn-sm\" role=\"button\" href=\"./feedView.php?feedID=' . $feedID . '\">' \r\n . strtoupper($xml->channel->title) . '</a><br />';\r\n}", "title": "" }, { "docid": "6e4ed0c0cd299cd1b209a60dc036d861", "score": "0.58961076", "text": "function getLink () {\n\t\t$baseLink = 'index.php';\n\t\tif ($this->getAction ()) {\n\t\t\treturn $baseLink .= '?action='.$this->getAction ();\n\t\t}\n\t\telseif ($this->isAdminPage ()) {\n\t\t\treturn $baseLink .= '?action=admin&pageID='.$this->getID ();\n\t\t} else {\n\t\t\treturn $baseLink .= '?action=viewPage&pageID='.$this->getID ();\n\t\t}\n\t}", "title": "" }, { "docid": "3769a9c831613cbeceda562a3cfbc679", "score": "0.5885038", "text": "function htmlLink($LinkText, $LinkURL, $LinkTarget = \"_self\", $Echo = false)\r\n{\r\n $LinkString = \"<a href='$LinkURL' target='$LinkTarget'>$LinkText</a>\";\r\n if($Echo)\r\n {\r\n echo $LinkString;\r\n }\r\n return $LinkString;\r\n}", "title": "" }, { "docid": "a14b0ed28d75742f00be15a812ed7ac1", "score": "0.58630437", "text": "function setUrlLink(){\n if( $this->id == 0 ) return;\n $url = $this->aFields[\"url\"]->toString();\n if( $url == \"\" ) return;\n $url = strip_tags( preg_replace( \"/[\\\"']/\", \"\", $url ) );\n if( !$this->aFields[\"url\"]->editable ) $this->aFields[\"url\"]->display = false;\n $this->aFields[\"url_link\"]->display = true;\n $this->aFields[\"url_link\"]->value = \"<a href=\\\"\".$url.\"\\\">\".$url.\"</a>\";\n }", "title": "" }, { "docid": "bdeb7fd8d14f7914537606b3d8b2e833", "score": "0.58565336", "text": "public function tooltipedLink(): string\n {\n return '<a class=\"name\" data-toggle=\"tooltip-ajax\" data-id=\"' . $this->id . '\"' .\n 'data-url=\"' . route('entities.tooltip', $this->id). '\" href=\"' . $this->url() . '\">' .\n e($this->name) .\n '</a>';\n }", "title": "" }, { "docid": "e2381f5df089cb18fed7f582f0c46c97", "score": "0.5855645", "text": "private function getLinks() {\n\t\t// Get new values\n\t$prevMonth = isset($_GET['month']) ? ($_GET['month'] -1) : $this->currentMonth -1;\n\t$nextMonth = isset($_GET['month']) ? ($_GET['month'] +1) : $this->currentMonth +1;\n\n\t\t//Write out links\n\t$this->prevLink = ' <a href=\"?month=' . $prevMonth . '&amp;year=' . $this->newYear . '\"> &laquo; </a> ';\n\t$this->nextLink = ' <a href=\"?month=' . $nextMonth . '&amp;year=' . $this->newYear . '\"> &raquo; </a> ';\n\n\n\t}", "title": "" }, { "docid": "383cec9f379c56e635b7a23a2f69d555", "score": "0.5850465", "text": "function get_archives_link($url, $text, $format = 'html', $before = '', $after = '', $selected = \\false)\n {\n }", "title": "" }, { "docid": "b63bbcd364a3a0d64996a17edd93a886", "score": "0.5847936", "text": "function makeLinks($linkArray)\r\n{\r\n $myReturn = '';\r\n\r\n foreach($linkArray as $url => $text)\r\n {\r\n if($url == THIS_PAGE)\r\n {//current page - add class reference\r\n\t \t$myReturn .= '<li class=\"current\"><a href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\r\n \t}else{\r\n\t \t$myReturn .= '<li><a href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\r\n \t} \r\n }\r\n \r\n return $myReturn; \r\n}", "title": "" }, { "docid": "9187d06a7c33dfbb650433ad3ac0c848", "score": "0.58403325", "text": "public static function links()\n {\n return \\Yii::t('yii', 'Designed by {developers}', [\n 'developers' => '<a href=\"http://www.yiiframework.com/\" rel=\"external\">' . \\Yii::t('yii', 'Yinan') . '</a>'\n ]);\n }", "title": "" }, { "docid": "5eb5009c72b62e706c8fd6facc2c010e", "score": "0.5832271", "text": "function printLinkedName($template=NULL){\n\t\t$_name = $this->get('lastname').', '.$this->get('firstname');\n\t\t$link = tx_div::makeInstance('tx_lib_link');\n\t\t$link->label($_name);\n\t\t$link->destination($this->controller->configurations->get('detailPage'));\n\t\t//$link->destination($this);\n\t\t$link->designator($this->getDesignator());\n\t\t$link->noHash();\n\t\tif($template != NULL) {\n\t\t\t$link->parameters(array('action' => 'showstudent', 'studentid' => $this->get('parentid'), 'template' => $template));\n\t\t}else {\n\t\t\t$link->parameters(array('action' => 'showstudent', 'studentid' => $this->get('parentid')));\n\t\t}\n\t\tprint $link->makeTag();\n\t}", "title": "" }, { "docid": "33d7873d99fcaca3ef06a4182da1d230", "score": "0.58224833", "text": "public function getLink() {\n\t\t$link = str_replace('\\\\', \"/\", $this->address);\n\t\treturn str_replace(GProject::$ADDRESS, \"\", $link);\n\t}", "title": "" }, { "docid": "845270899dbc5faedd62cfb352046d7b", "score": "0.58187556", "text": "public function toHtmlAnchor(): string\n {\n // Sanitize the provided url\n $url = $this->toString();\n // Prepare HTML anchor element\n $htmlAnchor = '<a';\n if (!empty($this->class)) {\n $htmlAnchor .= sprintf(' class=\"%s\"', $this->class);\n }\n if (!empty($this->id)) {\n $htmlAnchor .= ' id=\"' . $this->id . '\"';\n }\n if (!empty($this->tooltip)) {\n $htmlAnchor .= sprintf(' title=\"%s\"', addslashes($this->tooltip));\n }\n if (!empty($this->name)) {\n $htmlAnchor .= sprintf(' name=\"%s\"', $this->name);\n } else {\n if (!empty($this->url)) {\n $htmlAnchor .= sprintf(' href=\"%s\"', $url);\n }\n if (!empty($this->target)) {\n $htmlAnchor .= sprintf(' target=\"%s\"', $this->target);\n }\n }\n if (!empty($this->rel)) {\n $htmlAnchor .= sprintf(' rel=\"%s\"', $this->rel);\n }\n $htmlAnchor .= '>';\n if (('0' == $this->text) || (!empty($this->text))) {\n $htmlAnchor .= $this->text;\n } else {\n if (!empty($this->name)) {\n $htmlAnchor .= $this->name;\n } else {\n $htmlAnchor .= $url;\n }\n }\n $htmlAnchor .= '</a>';\n\n return $htmlAnchor;\n }", "title": "" }, { "docid": "9ebdc898fc4af37f47017c3e2a93babb", "score": "0.5813301", "text": "public function _report_link()\n\t{\n\t\t$this_sub_page = Event::$data;\n\t\techo ($this_sub_page == \"actionable\") ? Kohana::lang('actionable.actionable') : \"<a href=\\\"\".url::site().\"admin/actionable\\\">\".Kohana::lang('actionable.actionable').\"</a>\";\n\t}", "title": "" }, { "docid": "c442616c3b83e5e646d366b2bdd2910c", "score": "0.58117086", "text": "public function getLink()\n {\n $link = $this->getFunctionPath();\n $link .= \"?issueId=\".$this->issueId;\n $link .= \"&\".$this->eventGroupIdParameter.\"=\".$this->eventsGroupId;\n\n return $link;\n }", "title": "" }, { "docid": "1075955170c0783093ab7f84a5872e08", "score": "0.5807273", "text": "function makeLinks($linkArray)\n{\n $myReturn = '';\n\n foreach($linkArray as $url => $text)\n {\n if($url == THIS_PAGE)\n {//current page - add class reference\n\t \t$myReturn .= '<li class=\"current\"><a href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\n \t}else{\n\t \t$myReturn .= '<li><a href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\n \t} \n }\n \n return $myReturn; \n}", "title": "" }, { "docid": "1075955170c0783093ab7f84a5872e08", "score": "0.5807273", "text": "function makeLinks($linkArray)\n{\n $myReturn = '';\n\n foreach($linkArray as $url => $text)\n {\n if($url == THIS_PAGE)\n {//current page - add class reference\n\t \t$myReturn .= '<li class=\"current\"><a href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\n \t}else{\n\t \t$myReturn .= '<li><a href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\n \t} \n }\n \n return $myReturn; \n}", "title": "" }, { "docid": "762e162c1b64b750c4da82171b6161f4", "score": "0.5807042", "text": "function getLink() {return $this->_link;}", "title": "" }, { "docid": "762e162c1b64b750c4da82171b6161f4", "score": "0.5807042", "text": "function getLink() {return $this->_link;}", "title": "" }, { "docid": "6c6795c3bdcfe764a18ecfe31d339c0e", "score": "0.5801855", "text": "public function canonicalLink()\n\t{\n\t\treturn $this->URL();\n\t}", "title": "" }, { "docid": "c7d0ab76e72e644f9281bb115f0e840b", "score": "0.5798779", "text": "public function get_link()\n {\n\n return $this->link;\n }", "title": "" }, { "docid": "a4ea671447414c43de9c08bc9bc06143", "score": "0.57986975", "text": "private function getLink(){\n\t\treturn $this->_link;\n\t}", "title": "" }, { "docid": "2457a26020fc57bd4dbfd1e986a7d188", "score": "0.5773289", "text": "function bp_docs_get_mydocs_edited_link() {\n\t\treturn apply_filters( 'bp_docs_get_mydocs_edited_link', trailingslashit( bp_docs_get_mydocs_link() . BP_DOCS_EDITED_SLUG ) );\n\t}", "title": "" }, { "docid": "371c03e34273b9f0d629d39f89063eb5", "score": "0.5765582", "text": "public function Link()\n {\n if (!$this->owner->Slug && $this->owner->ID) {\n if ($this->canWriteSlug()) {\n $this->owner->write();\n } else {\n return '';\n }\n }\n $page = $this->owner->Page();\n if (is_string($page)) {\n return rtrim($page, '/') . '/' . $this->owner->Slug;\n }\n if (!$page) {\n if (Controller::has_curr()) {\n return Controller::curr()->Link('detail/'.$this->owner->Slug);\n }\n return '';\n }\n return $page->Link('detail/'.$this->owner->Slug);\n }", "title": "" }, { "docid": "aedda5c326c4eee4e16ca32a44049c1c", "score": "0.5757294", "text": "function rest_output_link_header()\n {\n }", "title": "" }, { "docid": "432dc404628bad8eeb1fb94d7a4fab2f", "score": "0.57555807", "text": "public function getCurrentLink(): Link\n {\n return $this->dataPersistor->get('add_by_link_link');\n }", "title": "" }, { "docid": "838c56f6526c28a3ce587599daf28702", "score": "0.5752082", "text": "protected function RenderSummary_HTML_line() {\n\t$out = \"\\n\"\n\t .$this->TitleHREF()\n\t .$this->CatNum()\n\t .' &ldquo;'\n\t .$this->NameString()\n\t .'&rdquo;</a>: '\n\t .$this->RenderStatus_HTML_line()\n\t .'<br>'\n\t ;\n\treturn $out;\n }", "title": "" }, { "docid": "a80114a257969cf02ee1541c2d6d3c51", "score": "0.5747492", "text": "function print_link($link_text, $rep, $pars = array(), $dir = '', \n\t$icon=false, $class='printlink', $id='')\n{\n\tglobal $path_to_root, $pdf_debug;\n\n\t$url = $dir == '' ? $path_to_root.'/reporting/prn_redirect.php?' : $dir;\n\n\t$id = default_focus($id);\n\tforeach($pars as $par => $val) {\n\t\t$pars[$par] = \"$par=\".urlencode($val);\n\t}\n\t$pars[] = 'REP_ID='.urlencode($rep);\n\t$url .= implode ('&', $pars);\n\n\tif ($class != '')\n\t\t$class = $pdf_debug ? '' : \" class='$class'\";\n\tif ($id != '')\n\t\t$id = \" id='$id'\";\n\t$pars = access_string($link_text);\n\tif (user_graphic_links() && $icon)\n\t\t$pars[0] = set_icon($icon, $pars[0]);\n\t\t\n\treturn \"<a target='_blank' href='$url'$id$class $pars[1]>$pars[0]</a>\";\n}", "title": "" } ]
9324b7791317a63826132aec48f0a323
get all pizzas from db
[ { "docid": "4502d5fe9ccce7530676c7a33ddfc995", "score": "0.6359216", "text": "public function index() {\n $pizzas = Pizza::orderBy('id', 'asc')->get();\n return $pizzas->toJson();\n }", "title": "" } ]
[ { "docid": "fa6294eec3f2992bf125d37c502106b0", "score": "0.73854524", "text": "static function getPizzas(){\n\t\t$sql =\"SELECT * FROM Producto where categoria_id=1\";\n\t\t$db = new Database();\n\t\tif ($rows = $db->query($sql)){\n\t\t\treturn $rows;\n\t\t}\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "9456fc3e6b24843f6eea1b1456740678", "score": "0.7289033", "text": "function fetchPais() {\n\n $paises = array();\n\n $con = new DB();\n $sql = $con->prepare(\"SELECT * FROM pais\");\n $result = $con->executeQuery($sql);\n\n foreach ($result as $row) {\n $id = $row['id'];\n $nombre = $row['nombre'];\n $pais = new Pais($id, $nombre);\n array_push($paises, $pais);\n }\n\n return $paises;\n }", "title": "" }, { "docid": "9f16bb13e08f8e0cc2c395d36a9dd2a0", "score": "0.72378737", "text": "public function list_pais()\n {\n $listpais = DB::table('par_pais')->select('id','pai_nombre')->orderBy('pai_nombre')->get();\n\t\treturn $listpais;\n }", "title": "" }, { "docid": "9fd300217852d7ff329dc6eb4ec06faa", "score": "0.7107185", "text": "function getallprefect(){\n $q = $this->db->query('SELECT * FROM prefectures');\n return $q;\n }", "title": "" }, { "docid": "322a7e55fd339abacfb31a002cbf3fc1", "score": "0.707314", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "097250a4a024b679385b5a8a3da2108d", "score": "0.6840174", "text": "public function getPolizas(){\n\t\t$this->_model_poliza = new Model_Poliza();\n\n\t\t$row = $this->_model_poliza\n\t\t->getTable()\n\t\t->createQuery()\n\t\t->andWhere('estado_id in ?',array(2))\n\t\t->andWhere('despachante_aduana_id = ?',$this->_model->despachante_aduana_id)\n\t\t->execute()\n\t\t->toArray();\n\n\t\treturn $row;\n\n\t}", "title": "" }, { "docid": "7b4b652b6c634bd78fbe355e84309531", "score": "0.6729312", "text": "public function permisos()\n {\n\n $conectar = parent::conexion();\n\n $sql = \"select * from permisos;\";\n\n $sql = $conectar->prepare($sql);\n $sql->execute();\n return $resultado = $sql->fetchAll();\n }", "title": "" }, { "docid": "3b9ea6a180d1b549f00390708b38738e", "score": "0.6728218", "text": "public function selectAll() {\n $conn = $this->conex->connectDatabase();\n $sql = \"select * from tbl_patrocinio where apagado = 0\";\n $stm = $conn->prepare($sql);\n $success = $stm->execute();\n if ($success) {\n //Criando uma lista com os dados\n $listPatrocinio = [];\n foreach ($stm->fetchAll(PDO::FETCH_ASSOC) as $result) {\n $Patrocinio = new Patrocinio();\n $Patrocinio->setId($result['id_patrocinio']);\n $Patrocinio->setNome($result['nome']);\n $Patrocinio->setDescricao($result['descricao']);\n $Patrocinio->setImagem($result['imagem']);\n $Patrocinio->setApagado($result['apagado']);\n $Patrocinio->setStatus($result['ativo']);\n array_push($listPatrocinio, $Patrocinio);\n };\n $this->conex -> closeDataBase();\n //retornando a lista\n return $listPatrocinio;\n } else {\n return \"Erro\";\n }\n }", "title": "" }, { "docid": "18244add73c3d898ad4113c56fb5ffaa", "score": "0.6636088", "text": "static public function obtenerPaises ()\n {\n $bd = GestorMySQL::obtenerInstancia();\n\n $consulta = \"SELECT id, pais FROM paises ORDER BY pais\";\n\n return $bd->obtener($consulta, 'id');\n }", "title": "" }, { "docid": "0ebbd63469b2dd9cfa6d970fd1950465", "score": "0.6634572", "text": "public function index()\n {\n //\n\n return Pais::all();\n }", "title": "" }, { "docid": "3ae1360a79e47b007569f1c12ab961fb", "score": "0.66007894", "text": "public function get_all(){\n\t\t$this->db->select('ok,valorx,valory,teta,q1,q2,q3,q4,ftang,fnormal');\n\t\treturn $this->db->limit(1)->order_by('id','desc')->get('plataforma')->result_array();\n\t}", "title": "" }, { "docid": "040f73546466e799f7dd6bc344730b1d", "score": "0.65905476", "text": "public function ListarProveedores()\n{\n\tself::SetNames();\n\t$sql = \" select * from proveedores \";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "title": "" }, { "docid": "704abe37876eedc22c576ed0cc027295", "score": "0.65801996", "text": "public function getAllPois(): array\n {\n $output = [];\n $items = $this->db->query(\"SELECT id FROM pois\")->fetchAll();\n foreach ($items as $item) {\n $output[] = $this->getPoiById($item->id);\n }\n return $output;\n }", "title": "" }, { "docid": "3a6a9254f72e9ac824b3c83ce8cd03d4", "score": "0.65585244", "text": "public function Index(){\n $this->query('SELECT quizzes.*, users.name FROM quizzes JOIN users ON quizzes.user_id = users.id ORDER BY created_at DESC');\n $rows = $this->resultSet();\n // print_r($rows);\n return $rows;\n }", "title": "" }, { "docid": "0c77e7e3b2b62d4d0c36eca74eb35fef", "score": "0.65313613", "text": "public static function getAllQuizz(){\n\n $pdo = Database::getInstance();\n\n try{\n $sql = 'SELECT * \n FROM `quizz`, `quizztheme`\n WHERE `quizz`.`id_quizzTheme` = `quizztheme`.`id_quizzTheme`\n ;';\n $stmt = $pdo->query($sql);\n return $stmt->fetchAll();\n }\n catch(PDOException $e){\n return false;\n }\n\n }", "title": "" }, { "docid": "9c478c6e23594b3831168a4f0c0c927a", "score": "0.65312", "text": "public function get_all(){\n return $this->db->get('pokemon')->result();\n }", "title": "" }, { "docid": "f6fe6d3b53b3219f06dfa9287c3efb04", "score": "0.6522645", "text": "public function getAll(){\n $query = \"SELECT pv.id, v.placa, p.cedula, p.nombre, pu.puesto, pv.created_at, pv.updated_at, pv.estado FROM personaVehiculo pv INNER JOIN vehiculos v ON pv.vehiculo = v.id INNER JOIN personas p ON v.persona = p.id INNER JOIN puestos pu ON pv.puesto = pu.id \";\n return DB::select($query);\n }", "title": "" }, { "docid": "88ec0085231b180d1c1a06213d174a16", "score": "0.6495732", "text": "public static function obtenerPaquetes()\n {\n $consulta = \"SELECT * FROM paquetes ORDER BY id_paquete\";\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute();\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n return false;\n }\n }", "title": "" }, { "docid": "14c2da8fceac2ba21082793dcf9b85c0", "score": "0.6482134", "text": "function getPagos() {\n $where = \" WHERE 1\";\n $array = \"\";\n $columns = \"`Id_pago`, `Nombre`, `Email`, `Fecha_anterior`, `Pago`, `Proxima_fecha`, `Estatus`, `Id_cliente`\";\n $response = $this->db->select3($columns, 'pagos', $where, $array);\n return $response;\n }", "title": "" }, { "docid": "12b68b89d0150e9cc675cf72d3292768", "score": "0.64723563", "text": "public function getParishes(){\r\n $select = $this->select()\r\n ->from($this->_name, array(\r\n 'osID' => 'id','uri', 'type', \r\n 'label'\r\n ))\r\n ->order('label');\r\n return $this->getAdapter()->fetchAll($select);\r\n }", "title": "" }, { "docid": "6cdf5fb9c112feca2bdddc502381dbf7", "score": "0.6471018", "text": "public function pizzas(){\n return $this->hasMany(Pizza::class);\n }", "title": "" }, { "docid": "f4d0a8a5290648b88b81fd8f4ae3b197", "score": "0.64507437", "text": "public function ListarMediosPagos()\n{\n\tself::SetNames();\n\t$sql = \" select * from mediospagos\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "title": "" }, { "docid": "426133ed721136efe422cafc069595bc", "score": "0.64322937", "text": "public static function findAll() {\n\n // on récupère la connexion à la bDD\n $connexion = \\Oquiz\\Utils\\Database::getDB();\n // requête de récupération de données\n $sql = 'SELECT *, quizzes.id AS id, CONCAT(users.first_name, \" \" , users.last_name) AS author\n FROM quizzes INNER JOIN users ON users.id = quizzes.id_author';\n // on exécute la requête dans la BDD\n $statement = $connexion->query($sql);\n\n // on retourne tous les résultats\n return $statement->fetchAll(\\PDO::FETCH_CLASS, static::class);\n }", "title": "" }, { "docid": "c1420e1a805a73682f146cb9c84c56da", "score": "0.64257705", "text": "function getAll() {\n $this->getConnection();\n $request = \"SELECT P.ID_PRODUIT, P.DATE_CREATION, P.NOM, P.PRIX, P.DESCRIPTION, P.ID_CATEGORIE, P.IMAGE, C.NOM AS CATEGORIE \n FROM PRODUIT P INNER JOIN CATEGORIE C ON P.ID_CATEGORIE=C.ID_CATEGORIE\";\n $result = $this->select($request);\n return $result;\n }", "title": "" }, { "docid": "b13a67928c0a46fa32dfe50cc9b4b640", "score": "0.6422778", "text": "function getPagosanteriores() {\n $where = \" WHERE 1\";\n $array = \"\";\n\n $columns = \"`Clave_catalogo`, `Nombre`, `Email`, `Cantidad`, `Fecha_pagada`, `Id_pago` \";\n $response = $this->db->select3($columns, 'catalogo_pagos', $where, $array);\n return $response;\n }", "title": "" }, { "docid": "10c3fc7e20298ae04770a9152387175e", "score": "0.6418429", "text": "public static function findAll() {\n\t\t$table = Database::get_main_table(ChamiloPens::TABLE_NAME);\n\t\t$sql_query = \"SELECT * FROM $table ORDER BY created_at;\";\n\t\t$results = Database::query($sql_query);\n\t\t$return = array();\n\t\twhile($assoc = Database::fetch_assoc($results)) {\n\t\t\t$return[] = new ChamiloPens($assoc);\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "3699d1bd9a313b08620c7fa12c9ef152", "score": "0.6397666", "text": "public function getAllPoliklinik()\n {\n return $this->findAll();\n }", "title": "" }, { "docid": "952328b8f2dafea42ce96e03778c9d23", "score": "0.63937926", "text": "function get_all_pembayaran()\n {\n $this->db->order_by('ID_PEMBAYARAN', 'desc');\n return $this->db->get('PEMBAYARAN')->result_array();\n }", "title": "" }, { "docid": "bbea26c0d693136e571c08dc2dcfff4d", "score": "0.6384569", "text": "function fetchPoi() {\n\n $pois = array();\n\n $con = new DB();\n $sql = $con->prepare(\"SELECT * FROM poi\");\n $result = $con->executeQuery($sql);\n\n foreach ($result as $row) {\n $id = $row['id'];\n $nombre = $row['nombre'];\n $foto = $row['foto'];\n $descripcion = $row['descripcion'];\n $url = $row['url'];\n $precio = $row['precio'];\n $horario = $row['horario'];\n $id_tipo = $row['id_tipo'];\n $id_transporte = $row['id_transporte'];\n $id_entorno = $row['id_entorno'];\n $id_ciudad = $row['id_ciudad'];\n $id_pais = $row['id_pais'];\n $id_usuario = $row['id_usuario'];\n $poi = new Poi($id, $nombre, $foto, $descripcion, $url, $precio, $horario, $id_tipo, $id_transporte, $id_entorno, $id_ciudad, $id_pais, $id_usuario);\n array_push($pois, $poi);\n }\n\n return $pois;\n }", "title": "" }, { "docid": "cd93857ef6030bdb253fa899ecabc4e7", "score": "0.6382589", "text": "public function getAll()\n {\n $sql=\"CALL SP_APODERADOS_SELECT_ALL()\";\n return $this->mysqli->findAll($sql);\n }", "title": "" }, { "docid": "a072acb61e465c398c29f697b10d63ca", "score": "0.6371961", "text": "public function getPermisos(){\n\t\t$sql = \"SELECT id_permiso, permiso FROM permisos WHERE id_permiso >1 ORDER BY id_permiso\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}", "title": "" }, { "docid": "a7b86ece5f24af0330ab29f769da26ad", "score": "0.63581467", "text": "public static function findAll():array \r\n {\r\n $db = Database::getDatabase();\r\n $db->consulta(\"SELECT * FROM puesto;\");\r\n\r\n $datos=[];\r\n while ($puesto = $db->getObjeto(\"Puesto\")) {\r\n array_push($datos, $puesto); \r\n }\r\n\r\n return $datos;\r\n }", "title": "" }, { "docid": "4198ff5e4a22e661c32c7d76dd94ac2d", "score": "0.63514096", "text": "public static function getListaPaises() {\n $droptions = Pais::find()->orderBy('nombre_pais')->asArray()->all();\n return ArrayHelper::map($droptions, 'id', 'nombre_pais');\n }", "title": "" }, { "docid": "5c89a6d223181b072efa9160914ce781", "score": "0.6338316", "text": "public function getQuizzesAll ()\n {\n \t// haven't included \"order by priority desc\" as we sort in the Quizzes class\n \treturn ($this->db_object->getRowsAll (\"Select * from \".$this->table_prefix.$this->quiz_tables['quizzes'] ));\n }", "title": "" }, { "docid": "bc3ab8cd03bd2b77a35a36aa30ba9c55", "score": "0.6322657", "text": "public function consultaPaginas(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * FROM tbpaginas order by idpaginas\";\n $sql = $this->conexao->query($sql);\n $dados = array();\n\n while ($row = $sql->fetch_assoc()) {\n\n $dado = array();\n $dado['idpaginas'] = $row['idpaginas'];\n $dado['paginas'] = $row['nome_paginas'];\n $dado['url'] = $row['paginas'];\n $dados[] = $dado;\n }\n\n return $dados;\n\n }", "title": "" }, { "docid": "c0fde84556270ceb720a362d02306fc7", "score": "0.63182884", "text": "public function index()\n {\n return Pizza::All();\n }", "title": "" }, { "docid": "484a76ea571aa9286d63069f2e0d4d8c", "score": "0.6281709", "text": "public function listing(){\n $paises = \\App\\Pais::all();\n return response()->json(\n $paises->toArray()\n );\n }", "title": "" }, { "docid": "c87af1c3479d3ac95e8fc1cd182d498a", "score": "0.62800485", "text": "public function getAllportarias() {\r\n $this->db->select('*');\r\n $this->db->from('portaria');\r\n $this->db->join('tipo', 'portaria.idTipo = tipo.idTipo');\r\n $query = $this->db->get();\r\n return $query->result();\r\n }", "title": "" }, { "docid": "a6f6ff64847334b6895ad770ecd2976c", "score": "0.62788284", "text": "public function index()\n {\n return Pizza::paginate(50);\n }", "title": "" }, { "docid": "bd88e26797d8c2e69f5bf4d910f26d7d", "score": "0.62757754", "text": "public function index()\n {\n //\n return Paciente::all();\n }", "title": "" }, { "docid": "f12701126ecfc8e854aefe6289f44b0b", "score": "0.6270947", "text": "public function ListarComprasPag()\n\t{\n\t\tself::SetNames();\t\t\n\t\t$sql = \" SELECT compras.codcompra, compras.subtotalivasic, compras.subtotalivanoc, compras.ivac, compras.totalivac, compras.descuentoc, compras.totaldescuentoc, compras.totalc, compras.statuscompra, compras.fechavencecredito, compras.fechacompra, proveedores.nomproveedor, SUM(detallecompras.cantcompra) AS articulos FROM (compras INNER JOIN proveedores ON compras.codproveedor = proveedores.codproveedor) INNER JOIN usuarios ON compras.codigo = usuarios.codigo LEFT JOIN detallecompras ON detallecompras.codcompra = compras.codcompra WHERE compras.statuscompra = 'PAGADA' GROUP BY compras.codcompra\";\n foreach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\t \n}", "title": "" }, { "docid": "4745454bb3ac5e24f9e09e2008c8c7b7", "score": "0.6269442", "text": "public static function getAll2(){\n\t\t$sql = \"select * from prueba\";\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new TemparioData());\n\t}", "title": "" }, { "docid": "987ee181c070712fb009f2bc5fe77a17", "score": "0.6262541", "text": "function fetchData(){\n $sqlTerm = \"SELECT id,pizzaName,ingredients FROM pizzas_table ORDER BY time_created\";\n $query = $this->db->query($sqlTerm);\n return $query->result();\n }", "title": "" }, { "docid": "35568679c461a065e9ee40bb277a3d12", "score": "0.6252672", "text": "static function getAllProduit() {\n $rep = Model::$pdo->query('SELECT *\n\t\t\t\t\t\t\t\tFROM PRODUIT');\n $rep->setFetchMode(PDO::FETCH_CLASS, 'ModelProduit');\n $ans = $rep->fetchAll();\n return $ans;\n }", "title": "" }, { "docid": "184016be4dc03a79b578c05174159b62", "score": "0.6239591", "text": "public function getAll()\n {\n $query = $this->db->query('\n SELECT\n professor.id, professor.graduacao, professor.mestrado, professor.doutorado,\n professor.phd, pessoa.nome, pessoa.telefone, pessoa.apelido, \n pessoa.cor, pessoa.dataNascimento, pessoa.sexo, pessoa.escolaridade, \n pessoa.foto, pessoa.cpf, pessoa.tituloEleitor, pessoa.identidade, \n pessoa.endereco_id, endereco.endereco, endereco.cidade, endereco.estado, \n endereco.pais\n FROM \n professor\n INNER JOIN \n pessoa ON pessoa.id = professor.pessoa_id\n INNER JOIN\n endereco ON endereco.id = pessoa.endereco_id\n ');\n\n if ($query->num_rows == 0) {\n throw new RuntimeException('Nenhum professor cadastrado');\n }\n\n return $query->result();\n }", "title": "" }, { "docid": "4ffd2097d21519c3f33f145dba1a110f", "score": "0.6229066", "text": "public function getPraticiens() {\r\n $sql = $this->sqlPraticien . ' order by nom_praticien';\r\n $praticiens = $this->executerRequete($sql);\r\n return $praticiens;\r\n }", "title": "" }, { "docid": "35ad02ee12eb55b3ed4595a070bb04a0", "score": "0.62185663", "text": "public function index()\n {\n //\n return DetalleProporcionPaciente::all();\n }", "title": "" }, { "docid": "a36a7c0f5d56d661799fc6081d9ccee8", "score": "0.62151015", "text": "function getPagos($id_afiliado){\n\t\t$sql = \n\t\t\"SELECT\n\t\t\t$this->_tablename.agencia,\n\t\t\t$this->_tablename.terminal,\n\t\t\t$this->_tablename.nro_transaccion,\n\t\t\t$this->_tablename.fecha_pago,\n\t\t\t$this->_tablename.importe\n\t\tFROM\n\t\t\t$this->_tablename\n\t\tINNER JOIN \n\t\t\ttarjetas ON($this->_tablename.id_tarjeta = tarjetas.id_tarjeta)\n\t\tWHERE \n\t\t\ttarjetas.id_afiliado = '$id_afiliado'\";\n\t\t\n\t\treturn $this->getQuery($sql);\t\n\t}", "title": "" }, { "docid": "4a24933c8dc2b1a106ed1aca7a698c5d", "score": "0.61983883", "text": "function get_all_pejabat()\n {\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`\")->result_array();\n return $result;\n }", "title": "" }, { "docid": "d9b7a4c76a32cadcbc3d189ae6ab9595", "score": "0.61870027", "text": "public function getList() {\r\n\t\t$query = \"\r\n\t\t\tSELECT \t*\r\n\t\t\tFROM\tprobleem\r\n\t\t\tORDER BY probleem.ProbleemID\r\n\t\t\t\";\r\n\t\t\r\n\t\t$dbh = parent::connectDB();\r\n\t\t\r\n\t\tif($dbh) {\r\n\t\t\t$sth = $dbh->query($query);\r\n\t\t\t$result = $sth->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\t$dhb = null;\r\n\r\n\t\t\treturn $result;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "e8f75c89176b6f72d28872b535236e03", "score": "0.61855614", "text": "public function all() {return $this->requete(\"SELECT * FROM \" . $this->table . \" ORDER BY marque\");}", "title": "" }, { "docid": "751277a86a3bbb2264c7a65d46a048c9", "score": "0.61804837", "text": "public function findAll()\n {\n return $this->findBy(array(), array('fechaPublicacion' => 'DESC'));\n }", "title": "" }, { "docid": "32d9df6463ec5692eb8559cb9c6244e4", "score": "0.6179171", "text": "public function listAll()\n\t{\n\t\t$sql = new Conexao;\n\n\t\treturn $sql->select(\"SELECT * FROM tb_criarapuracao\");\n\t}", "title": "" }, { "docid": "1cc0b0071cd963bcc20a553715dd4cfd", "score": "0.61746913", "text": "public function readAll(){\r\n\t\t\treturn $this->pessoaModel->readAll();\r\n\t\t}", "title": "" }, { "docid": "40a400a067d28d2c56a997220ae9a5d4", "score": "0.61635894", "text": "function listarPais(){\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='CLI_LUG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n //Definicion de la lista del resultado del query\n $this->captura('id_lugar','int4');\n $this->captura('codigo','varchar');\n $this->captura('estado_reg','varchar');\n $this->captura('id_lugar_fk','int4');\n $this->captura('nombre','varchar');\n $this->captura('sw_impuesto','varchar');\n $this->captura('sw_municipio','varchar');\n $this->captura('tipo','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('es_regional','varchar');\n\n //$this->captura('nombre_lugar','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta); exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "35d2a06fd1a4da8f1390f5c5060ed6ab", "score": "0.6162037", "text": "public function getAll(){\n \n // 1. Establece la conexion con la base de datos y trae todos los generos\n $query = $this->getDb()->prepare(\" SELECT * FROM genero\");\n $query-> execute(); \n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "065ebf494911ded86117b887092fe206", "score": "0.615467", "text": "function getAllFoodpornsByFavorite()\n {\n $stmt = self::$_db->prepare(\"SELECT fp.* FROM favorit AS fav LEFT JOIN foodporn AS fp On fav.fs_foodporn = fp.id_foodporn AND fav.fs_user=:uid WHERE id_foodporn IS NOT NULL\");\n $uid = self::getUserID();\n $stmt->bindParam(\":uid\", $uid);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "921bf73cff5241027c3c6f38a93e54af", "score": "0.61545235", "text": "public function all()\n {\n return TipoQuarto::all();\n }", "title": "" }, { "docid": "e4e050acf54e8b4e45592c64f661d3d1", "score": "0.61542165", "text": "public function getAllPenerbit(){\n if(!$this->isLoggedIn()){\n return false;\n }\n\n try {\n // Ambil data user dari database\n $query = $this->db->prepare(\"SELECT * FROM penerbit \");\n $query->execute();\n return $query->fetchAll();\n } catch (PDOException $e) {\n echo $e->getMessage();\n return false;\n }\n }", "title": "" }, { "docid": "64bdaa8645391e717dd8cad1be577f38", "score": "0.61495954", "text": "public function getAll() {\n\n $query = $this->db->prepare('SELECT * FROM comentario ORDER BY puntaje');\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "fb91cd893554b490e7213694371c32a4", "score": "0.614755", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM turma_disciplina';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "f9556b6f58ccfe848088ee88e72d81e3", "score": "0.6145548", "text": "public function getPeoples(){\n $result = $this->mysqli->query('SELECT * FROM alumno');\n $peoples = $result->fetch_all(MYSQLI_ASSOC);\n $result->close();\n return $peoples;\n }", "title": "" }, { "docid": "6f649a6a5e2371a3eaa3515e34e90650", "score": "0.61440897", "text": "public function all(){\n return Estoque::orderBy('id', 'asc')->get();\n }", "title": "" }, { "docid": "3b3b471d87d2dd197d4271360cced1e0", "score": "0.6141168", "text": "public function getAll()\n {\n //SELECT * FROM festival;\n \n //foeach TUDOQUEVIER e COLOCAR NUM ARRAY\n \n //return ARRAY;\n }", "title": "" }, { "docid": "d1b034d9da81bd98471cb22edbb8a215", "score": "0.6140287", "text": "public function getList() {\n\t\t$query = \"\n\t\t\tSELECT \t*\n\t\t\tFROM\tprobleem\n\t\t\tORDER BY probleem.ProbleemID\n\t\t\t\";\n\t\t\n\t\t$dbh = parent::connectDB();\n\t\t\n\t\tif($dbh) {\n\t\t\t$sth = $dbh->query($query);\n\t\t\t$result = $sth->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t$dhb = null;\n\n\t\t\treturn $result;\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "986f065ae317e710c3b31cb08ed98a5e", "score": "0.6132892", "text": "function listaAll() {\n require ROOT . \"config/bootstrap.php\";\n return $em->getRepository('models\\Equipamentos')->findby(array(), array(\"id\" => \"DESC\"));\n $em->flush();\n }", "title": "" }, { "docid": "927357ecc94a9b0339090b3fc3362414", "score": "0.6131301", "text": "public function pagadaall(){\n$sql = $this->db->query(\"SELECT pago_factura.*, facturas.id_factura FROM pago_factura INNER JOIN facturas ON pago_factura.factura_id = facturas.id\");\nreturn $sql;\n}", "title": "" }, { "docid": "48795dc4fd3e9a6d78ee17e6366294da", "score": "0.61306065", "text": "public function obtenerPagos()\n {\n\t\t$query = $this->db->order_by(\"id\", \"desc\");\n $query = $this->db->get('pago_proveedores'); \n\n if ($query->num_rows() > 0)\n return $query->result();\n else\n return $query->result();\n }", "title": "" }, { "docid": "0b71e42460423eb76b7adbbf30eaa7ae", "score": "0.6128805", "text": "public static function getAll(){\n\t\t$consulta = \"SELECT * FROM prestamos\";\n\t\ttry {\n\t\t\t//preparar sentencia\n\t\t\t$comando = Database::getInstance()->getDb()->prepare($consulta);\n\t\t\t//ejecutar sentencia preparada\n\t\t\t$comando->execute();\n\n\t\t\treturn $comando->fetchAll(PDO::FETCH_ASSOC);\n\t\t} catch (PDOException $e) {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "4436bce4f30851cc2ef33c8f88b16841", "score": "0.6125141", "text": "public function listarPreg(){\n $consulta = $this->ejecutar(\"SELECT * FROM cappiutep.t_usuario_pregunta WHERE id_usuario = '$this->IdUser'\");\n while($data = $this->getArreglo($consulta))$datos[] = $data;\n return $datos;\n }", "title": "" }, { "docid": "a054060fd50a165753eeb195ca2db7fa", "score": "0.61211187", "text": "public function ListarArqueoCaja()\n{\n\tself::SetNames();\n\t\n\tif($_SESSION[\"acceso\"] == \"cajero\") {\n\n\n $sql = \" select * FROM arqueocaja INNER JOIN cajas ON arqueocaja.codcaja = cajas.codcaja WHERE cajas.codigo = '\".$_SESSION[\"codigo\"].\"'\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n\n\n\t} else {\n\n\t$sql = \" select * FROM arqueocaja INNER JOIN cajas ON arqueocaja.codcaja = cajas.codcaja\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n\n\t}\n}", "title": "" }, { "docid": "296452828770980181a98e128cf8b581", "score": "0.6120839", "text": "public function listarprofessor()\n {\n return $this->db->get_where(\"funcionario\", \n array(\"nivel_acesso\" => 5))->result_array();\n }", "title": "" }, { "docid": "00aa350a47b08816b86904b95a69427f", "score": "0.61197287", "text": "public function index()\n {\n return PessoaResource::collection(CadastroPessoa::with('dependentes')->paginate(10));\n }", "title": "" }, { "docid": "dbc2665c629b95b7a6598c78b862e9b8", "score": "0.610977", "text": "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM alojamientos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "title": "" }, { "docid": "3ad7c2b078b2edb5326b01f17c141c61", "score": "0.60988235", "text": "public function getAll () {\n $query = \"SELECT * FROM equipe\";\n $stmt = $this->_pdo->query($query);\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "0a44b2ed53555c03e08894a38e50def3", "score": "0.6095426", "text": "function afficherProduits(){\n\t\t$sql=\"SElECT * From paniers \";\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\n }", "title": "" }, { "docid": "5833d53d49a8269d5b23f658a0dae729", "score": "0.6093834", "text": "public function getAllPays()\n {\n $listePays = [];\n $sql = $this->bdd->query('SELECT idpays, nompays FROM pays ORDER BY nompays') or die(print_r($this->bdd->errorInfo()));\n $i = 0;\n while ($donnees = $sql->fetch(PDO::FETCH_ASSOC))\n {\n $listePays[$i] = new Pays($donnees['nompays'], $donnees['idpays']);\n $i++;\n }\n return $listePays;\n }", "title": "" }, { "docid": "8becd6982c259c90787d470b72ed0267", "score": "0.6091523", "text": "public function showAll(){\n //global $db;\n $query = $this->db->prepare(\"SELECT * FROM `products`\");\n try{\n $query->execute();\n }catch(PDOException $e){\n die($e->getMessage());\n } \n return $query->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "93d3bf57e9e6fcfc543ce73ac0cc4514", "score": "0.60901284", "text": "public function index()\n {\n return Reparticao::all();\n }", "title": "" }, { "docid": "59dd4ffe21578603f977ae612c229071", "score": "0.60886943", "text": "public function findAll() {\r\n$sql = \"SELECT * FROM $this->tabela\";\r\n$stm = DB::prepare($sql);\r\n$stm->execute();\r\nreturn $stm->fetchAll();\r\n}", "title": "" }, { "docid": "7469e2e0fc521197bc942d6c173ac3e9", "score": "0.6079859", "text": "public function ListarProductosFavoritos()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria LEFT JOIN proveedores ON productos.codproveedor=proveedores.codproveedor WHERE productos.favorito = 'SI' and productos.existencia > '0'\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "title": "" }, { "docid": "0fe9126d6a61861b3e4149da8aa11909", "score": "0.60782355", "text": "public function getAll()\n\t{\n\t\t$query = $this->db->get('penumpang'); // SELECT * FROM mahasiswa\n\t\treturn $query->result(); // Object\n\n\t\t// Query Builder versi pendek\n\t\t// return $this->db->get('penumpang')->result();\n\t}", "title": "" }, { "docid": "86a58059c0d4275f590e42e0a681fc66", "score": "0.6077562", "text": "function get_all_persona_perfil()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('persona_perfil')->result_array();\n }", "title": "" }, { "docid": "9297b98dfbe48387a2164ba307cacfef", "score": "0.60744905", "text": "public function getAll() {\r\n $statement = \"\r\n SELECT * FROM bookillustrator;\r\n \";\r\n\r\n try {\r\n $statement = $this->db->query($statement);\r\n $result = $statement->fetchAll(\\PDO::FETCH_ASSOC);\r\n return $result;\r\n }\r\n catch(\\PDOException $e) {\r\n exit($e->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "8bef8857e6a88fe84e8119520813536b", "score": "0.6070707", "text": "public function index()\n {\n return new PacienteIngresadoResourceCollection(PacienteIngresado::paginate(10));\n }", "title": "" }, { "docid": "8dc289e316fd446f9300dc4996311a38", "score": "0.60692626", "text": "function listar2(){\n\t\t\n\t\t$sql = \"SELECT c.id, c.codigo, c.nombre from prd_pasos_producto a\n\t\tinner join prd_pasos_acciones_producto b on b.id_paso=a.id\n\t\tinner join app_productos c on c.id=a.id_producto\n\t\tgroup by a.id_producto;\";\n\n\t\treturn $this->queryArray($sql);\n\t}", "title": "" }, { "docid": "55a31731de21346b23e6c02a53b03e44", "score": "0.60660815", "text": "public function getAll()\n {\n $queryBuilder = $this->db->createQueryBuilder();\n $queryBuilder\n ->select('p.*')\n ->from('Pc', 'p');\n\n $statement = $queryBuilder->execute();\n $PcData = $statement->fetchAll();\n foreach ($PcData as $computerData) {\n $PcEntityList[$computerData['id']] = new Pc($computerData['id'], $computerData['marque']);\n }\n\n return $PcEntityList;\n }", "title": "" }, { "docid": "d16b574ca8ca969262248908fab07642", "score": "0.606451", "text": "public function getAll(){\n try{\n $sql = \"SELECT * FROM {$this->tabela}\";\n $stm = $this->pdo->prepare($sql);\n $stm->execute();\n $dados = $stm->fetchAll(PDO::FETCH_OBJ);\n return $dados;\n }catch(PDOException $erro){\n echo \"<script>alert('Erro na linha: {$erro->getLine()}')</script>\";\n }\n }", "title": "" }, { "docid": "1112560d08a15a332baffecf0c6d1610", "score": "0.60608387", "text": "public function listar(){\n $sql = \"CALL sp_ListarTipoPago\";\n return ejecutarConsulta($sql);\n }", "title": "" }, { "docid": "8e68ae069417042a3a595c4a1fc0a0eb", "score": "0.6060499", "text": "public function getAll() {\n $result = array();\n $stm = $this->conn->query('SELECT * FROM VAGAS ');\n if($stm) {\n while($row = $stm->fetch(PDO::FETCH_OBJ)) {\n $VAGAS = new vaga(); \n\t\t\t\t\t$VAGAS->setId($row->id);\n\t\t\t\t\t$VAGAS->setN_vagas($row->nvagas);\n\t\t\t\t\t$VAGAS->setRemun($row->remun);\n\t\t\t\t\t$VAGAS->setAtividades($row->atividades);\n\t\t\t\t\t$VAGAS->setHorario($row->horario);\n $result[] = $VAGAS;\n }\n }\n return $result;\n\t\t\n }", "title": "" }, { "docid": "031c582ce1a66083dd0be0f8750507aa", "score": "0.60593677", "text": "public static function all() {\n\t\t$pdo = FizzConfig::getDB();\n\t\t$sql = \"SELECT * FROM \" . static::tablename();\n\t\t$result = $pdo->query($sql);\n\t\treturn $result->fetchAll(\\PDO::FETCH_CLASS, get_called_class());\n\t}", "title": "" }, { "docid": "6df85a50f5d1a8586010796b42d386bb", "score": "0.6049735", "text": "public function readall(){ //read\r\n\r\n $sql=\"select * from proveedor\";\r\n $resul=mysqli_query($this->con(),$sql);\r\n while($row=mysqli_fetch_assoc($resul)){\r\n $this->proveedores[]=$row;\r\n }\r\n return $this->proveedores;\r\n }", "title": "" }, { "docid": "9c629886a5d9ceb7c4692410283c4de4", "score": "0.6044963", "text": "public function ListarComprasPend()\n\t{\n\t\tself::SetNames();\t\t\n\t\t$sql = \" SELECT compras.codcompra, compras.subtotalivasic, compras.subtotalivanoc, compras.ivac, compras.totalivac, compras.descuentoc, compras.totaldescuentoc, compras.totalc, compras.statuscompra, compras.fechavencecredito, compras.fechacompra, proveedores.nomproveedor, SUM(detallecompras.cantcompra) AS articulos FROM (compras INNER JOIN proveedores ON compras.codproveedor = proveedores.codproveedor) INNER JOIN usuarios ON compras.codigo = usuarios.codigo LEFT JOIN detallecompras ON detallecompras.codcompra = compras.codcompra WHERE compras.statuscompra = 'PENDIENTE' GROUP BY compras.codcompra\";\n foreach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n}", "title": "" }, { "docid": "7acc8d209bbf7cab6db1fd06080efbe2", "score": "0.60441446", "text": "public function getListePraticiens(){\n\t\t$req = \"select * from praticien order by PRA_NOM\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}", "title": "" }, { "docid": "4a80c1dc59f0c3b9a71c8cc1dfbac724", "score": "0.6043563", "text": "public function findAll() {\n $sql = \"select * from praticien\";\n $result = $this->getDb()->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $praticien = array();\n foreach ($result as $row) {\n $praticienID = $row['id_praticien'];\n $praticien[$praticienID] = $this->buildDomainObject($row);\n }\n return $praticien;\n }", "title": "" }, { "docid": "e37bb86182b17bd0e497c5d5cf24e03e", "score": "0.60435176", "text": "public function consultaPermisos() {\n\t\t\treturn $this->entidad->getRepository('\\Entidades\\Expertos\\Permisos')->findBy(array('estado' => 1), array('nombre' => 'ASC'));\n\t\t}", "title": "" }, { "docid": "92b745eb7d26bfb87cf21b02e67cebc4", "score": "0.6040754", "text": "public function ListarIngredientes()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM ingredientes LEFT JOIN proveedores ON ingredientes.codproveedor = proveedores.codproveedor\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "title": "" }, { "docid": "4f2958ce60b5440104437819d83abeee", "score": "0.6036626", "text": "public function index()\n {\n return Profesion::all();\n }", "title": "" }, { "docid": "1d05cd6de9cb0ebf54f538004153b9cc", "score": "0.60351866", "text": "function getAllPedidos()\n {\n $query = $this->db->prepare(\"SELECT * FROM pedido\");\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "976dd51750597eed929b54dd74d297f1", "score": "0.60299474", "text": "function getAll (){\n $query = $this->db->query(\"SELECT * FROM peliculas;\");\n \n if ($query->num_rows() > 0){\n foreach ($query->result_array() as $row){\n $data[] = $row;\n }\n }\n \n return $data;\n}", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "faa0db12abbbf558f2549a4f0cf070cb", "score": "0.0", "text": "public function run()\n {\n //\n\n\n $faker = Faker::create();\n for ($i=0;$i<20;$i++) {\n $government = new \\App\\Government();\n $government->name = $faker->country;\n $government->name_ar = $faker->country.' (Arabic)';\n $government->delivery_charges = $faker->numberBetween(0, 10000);\n $government->save();\n }\n\n for ($i=0;$i<50;$i++) {\n $city = new \\App\\Area();\n $city->government_id=$faker->numberBetween(1,20);\n $city->name = $faker->city;\n $city->name_ar=$faker->city.' (Arabic)';\n $city->delivery_charges=$faker->numberBetween(0,100000);\n $city->save();\n }\n }", "title": "" } ]
[ { "docid": "963776365fb19044e27fa4db733ae2fd", "score": "0.80740553", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // factory(App\\User::class, 1001)->create()->each(function ($user) {\n // $user->roles()->attach([4]);\n // });\n\n // factory(App\\Model\\Listing\\Listing::class, 1000)->create()->each(function ($listing) {\n // for ($i=1; $i < rand(1, 10); $i++) { \n // $listing->categories()->attach([rand(1, 1719)]);\n // } \n // });\n\n //factory(App\\Model\\Category\\Category::class, 1720)->create();\n\n //factory(App\\Model\\Listing\\Ratings::class, 1000)->create();\n factory(App\\Model\\Listing\\Reviews::class, 7500)->create();\n }", "title": "" }, { "docid": "0106cc017f1041544cb660c0b7b15aa4", "score": "0.80636656", "text": "public function run()\n {\n\n // $this->call(UsersTableSeeder::class);\n factory(App\\Party::class, 50)->create();\n factory(App\\Parcel::class, 100)->create();\n factory(App\\Transfer::class, 200)->create();\n\n DB::table('document_type')->insert([\n 'name' => 'Quick Claim Deed'\n ]);\n DB::table('document_type')->insert([\n 'name' => 'Warranty Deed'\n ]);\n DB::table('document_type')->insert([\n 'name' => 'Other Deed'\n ]);\n\n }", "title": "" }, { "docid": "e58d26f8aeda30b8582ea97455c145f1", "score": "0.79895705", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate();\n DB::table('posts')->truncate();\n DB::table('categories')->truncate();\n DB::table('tags')->truncate();\n\n factory(App\\User::class,10)->create();\n $users = App\\User::all();\n factory(App\\Post::class,20)->make()->each(function($post)use($users){\n // dd($users->random()->id);\n $post->user_id = $users->random()->id;\n $post->save();\n });\n factory(App\\Tag::class,10)->create();\n $tags = App\\Tag::all();\n App\\Post::all()->each(function($post)use($tags){\n $post->tags()->sync($tags->random(rand(1,3))->pluck('id')->toArray());\n });\n }", "title": "" }, { "docid": "e2ab26233d4e02ab726b5051b8407cc4", "score": "0.7973096", "text": "public function run() {\n\t\t\n\t\t$this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n\t\t\n\t\t//factory(User::class,10)->create();\n\t\t$tags = factory('App\\Tag',8)->create();\n\t\t$categories = factory('App\\Category',5)->create();\n\t\t\n\t\tfactory('App\\Post',15)->create()->each(function($post) use ($tags) {\n\t\t\t$post->comments()->save(factory('App\\Comment')->make());\n\t\t\t$post->categories()->attach(mt_rand(1,5));\n\t\t\t$post->tags()->attach($tags->random(mt_rand(1,4))->pluck('id')->toArray());\n\t\t\t});\n\t\t\n\t\t}", "title": "" }, { "docid": "f9793248863f4c34dbb3819cb4517afd", "score": "0.7960071", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $ath = Athlete::create([\n 'name' => 'Carlos',\n 'surname' => 'Cebrecos',\n 'genre' => Genre::M,\n 'role' => 'Velocista',\n 'habilities' => '100 mll - 200 mll',\n 'license' => 'CT-19433',\n 'date_birth' => '1993-08-23',\n 'active' => True\n ]);\n\n Velocity::create([\n 'athlete_id' => $ath->id,\n 'category' => Category::PR,\n 'track' => '200mll',\n 'result' => '00:00:21.970',\n 'place' => 'San Sebastián',\n 'date' => '2013-02-11',\n 'field' => 'PC'\n ]);\n \n factory(App\\Athlete::class, 12)->create()->each(function ($u){\n $u->velocities()->save(factory(App\\Velocity::class)->make());\n $u->competitions()->save(factory(App\\Competition::class)->make());\n });\n }", "title": "" }, { "docid": "5b7510aab66d08421776839e939b8736", "score": "0.79478914", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n DB::table('users')->insert([\n 'name' =>\"locphan\",\n 'email' => 'locphan.edu.@gmail.com',\n 'password' => Hash::make('12344321'),\n ]);\n\n DB::table('tags')->insert([\n 'name' =>\"HL\"\n ]);\n DB::table('tags')->insert([\n 'name' =>\"AI\"\n ]);\n\n DB::table('categories')->insert([\n 'name' =>\"Technology\"\n ]);\n DB::table('categories')->insert([\n 'name' =>\"Science\"\n ]);\n }", "title": "" }, { "docid": "71b82164ac0d4793056f9cd6e930fd2b", "score": "0.79316914", "text": "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n\n $tags = factory('App\\Tag', 8)->create();\n $categories = factory('App\\Category', 5)->create();\n\n factory('App\\Post', 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory('App\\Comment')->make());\n $post->categories()->attach(mt_rand(1,5));\n $post->tags()->attach($tags->random(mt_rand(1,4))->pluck('id')->toArray());\n });\n }", "title": "" }, { "docid": "9172ae0257f26680f6efc009f6e63b7c", "score": "0.79181814", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n DB::table('posts')->insert([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph \n ]);\n\t}\n \n\n }", "title": "" }, { "docid": "5bfaf90476324edc67c90adf206a9eca", "score": "0.78917843", "text": "public function run()\n {\n\n $this->call(UsersTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(ContactsTableSeeder::class);\n\n\n DB::table('users')->insert([\n 'name' => Str::random(10),\n 'email' => Str::random(10).'@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n\n DB::table('posts')->insert([\n 'post_id' => 1,\n 'post_content' => Str::random(10),\n 'post_title' => Str::random(10),\n 'post_status'=> Str::random(10),\n 'post_name'=> Str::random(10),\n 'post_type'=> Str::random(10),\n 'post_category'=> Str::random(10),\n 'post_date'=> '2020-03-13 12:00', \n \n ]);\n }", "title": "" }, { "docid": "9ca436f3408c7ae5cd47415014ebf341", "score": "0.7885604", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Book::truncate();\n \n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n $quantity= $faker->randomDigit;\n Book::create([\n 'title' => $faker->sentence,\n 'author' => $faker->firstName . \" \" . $faker->lastName,\n 'editor' => $faker->company,\n 'price' => $faker->randomFloat(2,5,50),\n 'quantity' => $quantity,\n 'available' => $quantity != 0\n ]);\n }\n }", "title": "" }, { "docid": "c466d72cc0a5ffc2ce690349590795f2", "score": "0.78851664", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n $programas = Programa::factory(10)->create();\n $canales = Canal::factory(10)->create();\n\n foreach($programas as $programa){\n $programa->canales()->attach([\n rand(1,4),\n rand(5,8)\n ]);\n }\n\n Plan::factory(10)->create();\n\n foreach($canales as $canal){\n $canal->plans()->attach([\n rand(1,4),\n rand(5,8)\n ]);\n }\n\n Cable::factory(10)->create();\n Internet::factory(10)->create(); \n Telefonia::factory(10)->create(); \n Paquete::factory(10)->create();\n Factura::factory(10)->create();\n\n \n }", "title": "" }, { "docid": "6b480d5190ccba10aa7f084898878fda", "score": "0.7878214", "text": "public function run()\n {\n // reset the contents table\n DB::table('contents')->truncate();\n\n // generate 10 dummy contents data\n $contents = [];\n $faker = Factory::create();\n\n for ($i = 1; $i <= 10; $i++)\n {\n $contents[] = [\n 'user_id' => rand(1, 3),\n 'cancertype_id' => rand(1, 4),\n 'treatment_stage_id' => rand(1, 5),\n 'category_id' => rand(1, 4),\n 'title' => $faker->sentence(rand(5, 10)),\n 'body' => $faker->paragraphs(rand(10, 15), true),\n ];\n }\n\n DB::table('contents')->insert($contents);\n }", "title": "" }, { "docid": "b574cee3e999997b96242d9e48e9e538", "score": "0.7860442", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n App\\User::create([\n 'name' => 'Administrador',\n 'email' => 'official.dduran@gmail.com',\n 'password' => Hash::make('abc123')\n ]);\n\n App\\NegocioDigital::create([\n 'titulo' => 'Negocio 1',\n 'descripcion' => 'Lorem ipsum dolor sit amet 1',\n 'imagen' => '1.png',\n 'orden' => 1\n ]);\n\n App\\NegocioDigital::create([\n 'titulo' => 'Negocio 2',\n 'descripcion' => 'Lorem ipsum dolor sit amet 2',\n 'imagen' => '2.png',\n 'orden' => 2\n ]);\n\n App\\NegocioDigital::create([\n 'titulo' => 'Negocio 3',\n 'descripcion' => 'Lorem ipsum dolor sit amet 3',\n 'imagen' => '3.png',\n 'orden' => 3\n ]);\n }", "title": "" }, { "docid": "82184a634a30971b8da09162488cf43d", "score": "0.7856666", "text": "public function run()\n {\n // Truncate Employee table truncate before seeding\n Employee::truncate();\n \n $faker = Factory::create();\n \n foreach (range(1,50) as $index) {\n Employee::create([\n 'first_name' => $faker->firstname,\n 'last_name' => $faker->lastname,\n 'email' => $faker->unique()->safeEmail,\n 'company_id' => $faker->numberBetween($min = 1, $max = 10),\n 'phone' => $faker->numerify('##########'),\n 'created_at' => $faker->dateTime($max = 'now', $timezone = null),\n 'updated_at' => $faker->dateTime($max = 'now', $timezone = null)\n ]);\n }\n }", "title": "" }, { "docid": "58dde04e1aff533900aaa1de2e3c771b", "score": "0.78543514", "text": "public function run()\n {\n // $this->call(ProfileSeeder::class);\n // $this->call(UserSeeder::class);\n \\DB::table('profiles')->insert(\n ['name' => 'admisnitrador']);\n\n\n \\DB::table('users')->insert(\n ['username' =>\t'Administrador',\n 'email'\t\t =>\t'Administrador@hotmail.com',\n 'password' =>\tbcrypt('1234'),\n 'act' \t\t =>\t'1',\n 'perfil_id' => '1']);\n\n \\DB::table('locations')->insert(\n ['name' =>\t'Avellaneda']);\n\n \\DB::table('streets')->insert(\n ['name' =>\t'Calle Falsa',\n 'num_from' =>\t'0',\n 'num_to' =>\t'2000',\n 'state' =>\t'Buenos Aires',\n 'locations_id' =>\t'1']);\n\n \\DB::table('ranks')->insert(\n ['name' =>\t'Bombero']);\n\n }", "title": "" }, { "docid": "039707eb1db799d2a572e0887a732e6f", "score": "0.7853228", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Country::truncate();\n State::truncate();\n City::truncate();\n $countries = [\n \t['name'=>'India'],\n \t['name'=>'US']\n ];\n $states =[\n \t['country_id'=>1,'name'=>'Gujrat'],\n \t['country_id'=>1,'name'=>'Maharashtra'],\n \t['country_id'=>2,'name'=>'New York'],\n ];\n $cities=[\n \t['state_id'=>1,'name'=>'Rajkot'],\n \t['state_id'=>1,'name'=>'Ahmedabad'],\n \t['state_id'=>2,'name'=>'Mumbai'],\n \t['state_id'=>3,'name'=>'New York'],\n ];\n\n Country::insert($countries);\n State::insert($states);\n City::insert($cities);\n\n }", "title": "" }, { "docid": "a4fd61f33599e71641de766104f5ee0f", "score": "0.7852123", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n $data = [];\n\n $users = App\\User::pluck('id')->toArray();\n \n for($i = 1; $i <= 100 ; $i++) {\n $title = $faker->sentence(rand(6,10));\n array_push($data, [\n 'title' => $title,\n 'sub_title' => $faker->sentence(rand(10, 15)),\n 'slug' => Str::slug($title),\n 'body' => $faker->realText(4000),\n 'published_at' => $faker->dateTime(),\n 'user_id' => $faker->randomElement($users),\n ]);\n }\n \n DB::table('articles')->insert($data);\n }", "title": "" }, { "docid": "9c1ad9c9a665a5e45b19a020f38bf940", "score": "0.7845105", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n DB::table('posts')->insert(['title' => 'First post','Slug' => 'First_post','user_id' => 1,'text' =>$faker->text]);\n DB::table('posts')->insert(['title' => 'Second post','Slug' => 'Second_post','user_id' => 1,'text' =>$faker->text]);\n DB::table('posts')->insert(['title' => 'Thirth post','Slug' => 'Thirth_post','user_id' => 1,'text' =>$faker->text]);\n }", "title": "" }, { "docid": "8033d2ffe9933ed1497d756039c9da85", "score": "0.7842638", "text": "public function run()\n {\n $this->call(ArticlesTableSeeder::class);\n $this->call(RecommendsTableSeeder::class);\n $this->call(HotsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(CommentsSeeder::class);\n DB::table('categories')->insert([\n 'name' => \"读书\",\n 'userid' => 1,\n 'queryid'=>md5(uniqid()),\n 'type' =>\"article\",\n ]);\n DB::table('categories')->insert([\n 'name' => \"编程\",\n 'userid' => 1,\n 'queryid'=>md5(uniqid()),\n 'type' =>\"article\",\n ]);\n DB::table('categories')->insert([\n 'name' => \"javascript\",\n 'userid' => 1,\n 'queryid'=>md5(uniqid()),\n 'type' =>\"wiki\",\n ]);\n }", "title": "" }, { "docid": "ed2ed28b5f19c08009fb043458a6ea1d", "score": "0.78390396", "text": "public function run()\n {\n $faker = Faker\\Factory::create('ja_JP');\n DB::table('MST_SALES')->delete();\n foreach (range(1, 100) as $value) {\n DB::table('MST_SALES')->insert([\n 'id' => $value,\n 'sum_price' => rand(2000,40000),\n 'name' => $faker->name(),\n 'sex' => rand(1, 2),\n 'post_num' => $faker->postcode(),\n 'address' => $faker->address(),\n 'email' => $faker->email(),\n 'created_at' => $faker->dateTime(),\n 'user_id' => NULL\n ]);\n }\n }", "title": "" }, { "docid": "7fce381c2d283331a49697d2b2a44912", "score": "0.7830409", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n Photo::create(['route_photo' => 'usuarioAnonimo.jpg']);\n Miniature::create(['route_miniature' => 'maxresdefault.jpg']);\n Video::create(['route_video' => 'https://www.youtube.com/embed/ZCsS1GGPrWU']);\n Post::factory(100)->create();\n Commentary::factory(200)->create();\n }", "title": "" }, { "docid": "6b5f92492d382fd188a9ad7effd7e348", "score": "0.783006", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Role::create([\n 'id' => 1,\n 'name' => 'Administrator',\n 'description' => 'Full access to create, edit, and update',\n ]);\n Role::create([\n 'id' => 2,\n 'name' => 'Customer',\n 'description' => 'A standard user that can have a licence assigned to them. No administrative features.',\n ]);\n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@admin.com',\n 'password' => bcrypt('admin'),\n 'role_id' => 1,\n ]);\n User::create([\n 'name' => 'User',\n 'email' => 'user@user.com',\n 'password' => bcrypt('user'),\n 'role_id' => 2,\n ]);\n }", "title": "" }, { "docid": "f40e64bcdfa16f568b70a3375936cf0c", "score": "0.78271097", "text": "public function run()\n {\n $this->seeds([\n KategoriKualifikasi::class => ['kepegawaian/kategori.csv', 13],\n Jabatan::class => ['kepegawaian/jabatans.csv', 9],\n Kualifikasi::class => ['kepegawaian/kualifikasis.csv', 167],\n Pegawai::class => ['kepegawaian/pegawais.csv', 301],\n ]);\n }", "title": "" }, { "docid": "a23bab42fc12cca6d1a9a36e50f365f4", "score": "0.78265446", "text": "public function run()\n {\n if (App::environment() === 'production') {\n exit('Do not seed in production environment');\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n\n DB::table('ratings')->truncate();\n \n // Rating::create([\n // 'id' => 1,\n // 'givenBy' => 2,\n // 'givenTo' => 3,\n // 'ratingValue' => 5\n // ]);\n\n Rating::create([\n 'id' => 2,\n 'givenBy' => 2,\n 'givenTo' => 4,\n 'ratingValue' => 3\n ]);\n\n Rating::create([\n 'id' => 3,\n 'givenBy' => 2,\n 'givenTo' => 5,\n 'ratingValue' => 4\n ]);\n\n Rating::create([\n 'id' => 4,\n 'givenBy' => 6,\n 'givenTo' => 5,\n 'ratingValue' => 3\n ]);\n \n Rating::create([\n 'id' => 1,\n 'givenBy' => 6,\n 'givenTo' => 3,\n 'ratingValue' => 5\n ]);\n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n }", "title": "" }, { "docid": "739c29c39e152a09634953cafca33ad9", "score": "0.78206795", "text": "public function run()\n\t{\n\t\t// DB::table('models')->delete();\n\n\t\t$models = array(\n\t\t\tarray('name' =>'Pamela' ,'age' => '20', 'description' =>'El video fue dirigido por Stephen Schuster. Comienza con un avión aterrizando y chicas en bikini, bronceándose y nadando en la playa.' ),\n\t\t\tarray('name' =>'Tania' ,'age' => '24', 'description' =>'l sencillo debutó el 6 de agosto de 2009, en el número ocho en la lista Swedish Singles Chart.' ),\n\t\t);\n\n\t\t// Uncomment the below to run the seeder\n\t\tDB::table('models')->insert($models);\n\t}", "title": "" }, { "docid": "e987cd48edea67e81cb2403a2e69c023", "score": "0.7820271", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n $this->call(EmployeeTableSeeder::class);\n // $this->call(PartnerTableSeeder::class);\n $this->call(OtherTableSeeder::class);\n $this->call(TrafficSignSeeder::class);\n App::truncate();\n App::create([\n 'name' => 'FASKES PROV',\n 'logo' => 'logo.png'\n ]);\n }", "title": "" }, { "docid": "717334b3d328066c91d6d64c0cb10819", "score": "0.7820166", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = factory(App\\User::class,3)->create();\n// $carteiras = factory(App\\Carteira::class,6)->create();\n $ativos = factory(App\\Ativo::class,1)->create();\n// $trades = factory(App\\Trade::class,5)->create();\n// $tradeEntradas = factory(App\\TradeEntrada::class,20)->create();\n// $tradeSaidas = factory(App\\TradeSaida::class,20)->create();\n }", "title": "" }, { "docid": "496536ac82829ff2c3488b1bc428a7f1", "score": "0.7814424", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // factory('App\\StudentUser', 100)->create();\n // factory('App\\Music', 1000)->create();\n // factory('App\\RobotOrder', 100)->create();\n // factory('App\\UserAction', 1000)->create();\n // factory('App\\Practice', 20)->create();\n }", "title": "" }, { "docid": "42081848f882af09bfd4cf0f8efe8eb5", "score": "0.7813038", "text": "public function run()\n {\n // $faker = Faker::create();\n\n // $dataClass = DB::table('users')->pluck('id')->toArray();\n // $dataClass = DB::table('movies')->pluck('id')->toArray();\n\n // foreach(range(1, 100) as $index) {\n // DB::table('movie_user')->insert([\n // 'user_id' => $faker->randomElement($dataClass),\n // 'movie_id' => $faker->randomElement($dataClass)\n // ]);\n // }\n }", "title": "" }, { "docid": "630b1e277c10f7d8cf32cba237b4da38", "score": "0.78121483", "text": "public function run()\n {\n \\DB::table('users')->delete();\n \\DB::table('answers')->delete();\n \\DB::table('questions')->delete();\n\n $user = new \\App\\User();\n $user->name = 'John Doe';\n $user->email = 'john@doe.com';\n $user->password = Hash::make('password');\n $user->save();\n\n // $this->call(UserSeeder::class);\n factory(App\\User::class, 3)->create()\n ->each(function($u) {\n $u->questions()\n ->saveMany(\n factory(App\\Question::class, rand(1, 5))->make()\n )\n ->each(function($q) {\n $q->answers()\n ->saveMany(\n factory(App\\Answer::class, rand(1, 5))->make()\n );\n });\n });\n }", "title": "" }, { "docid": "e5e2525215ec8bf3881f1c6e341aec83", "score": "0.7806573", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Brand::truncate();\n Product::truncate();\n Address::truncate();\n PaymentMethod::truncate();\n Order::truncate();\n\n $users = 1000;\n $categories = 20;\n $brands = 15;\n $products = 1000;\n $address = 3000;\n $paymentMethod = 100;\n $order = 100;\n $orderDetail = 500;\n\n factory(User::class, $users)->create();\n factory(Category::class, $categories)->create();\n factory(Brand::class, $brands)->create();\n factory(Address::class, $address)->create();\n factory(Product::class, $products)->create();\n factory(PaymentMethod::class,$paymentMethod)->create();\n factory(Order::class,$order)->create();\n factory(OrderDetails::class,$orderDetail)->create();\n }", "title": "" }, { "docid": "33db14990dd20205cbf0ed23ac91d8a5", "score": "0.7797709", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\Models\\Blog\\Category::class,10)->create();\n factory(\\App\\Models\\Blog\\Post::class,100)->create();\n $this->call(PostsCategoriesTableSeeder::class);\n }", "title": "" }, { "docid": "7d4a8acce261539d99f3a600a7fded39", "score": "0.7794814", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // Stocks\n $stocks = factory(Stock::class, 5)->create();\n\n $categories = factory(Category::class, 10)->create();\n\n $products = factory(Product::class, 500)->create();\n\n $products->each(function (Product $product) use ($categories, $stocks) {\n $randomCategories = $categories->random(3);\n $randomStocks = $stocks->random(rand(1, 3));\n\n $product->categories()->attach($randomCategories->pluck('id'));\n\n // associate with stocks\n foreach ($randomStocks as $stock) {\n $product->stocks()->attach($stock->id, [\n 'products_count' => rand(10, 100)\n ]);\n }\n });\n\n // Empty categories\n factory(Category::class, 5)->create();\n }", "title": "" }, { "docid": "8a2ce50a7068a74d62b9970c1f9302e3", "score": "0.7790919", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n foreach (range(1, 20) as $value) {\n \\App\\Models\\posts::create([\n 'title' => $faker->text('20'),\n 'content' => $faker->text('500'),\n 'user_id'=> \\App\\Models\\Users::inRandomOrder()->first()->id,\n 'cate_id'=> \\App\\Models\\Catogery::inRandomOrder()->first()->id\n ]);\n\n }\n }", "title": "" }, { "docid": "4c9d16245dfaaf355245ed6f6be2592c", "score": "0.7789509", "text": "public function run()\n {\n\n $this->call(RolSeeder::class);\n\n \\App\\Models\\User::factory(10)->create();\n\n User::create([\n 'name' => 'gabriel',\n 'email' => 'g@hotmail.com',\n 'password' => bcrypt('12345678')\n ])->assignRole('Administrador');\n\n Categoria::factory(4)->create();\n Almacen::factory(3)->create();\n Kit::factory(5)->create();\n Proveedor::factory(4)->create();\n Producto::factory(40)->create();\n Empleado::factory(5)->create();\n Proyecto::factory(5)->create();\n $this->call(PrestamoSeeder::class);\n\n\n\n // Proveedor::factory(4)->create();\n // $this->call(ProductoSeeder::class);\n }", "title": "" }, { "docid": "6e3d9c728792a048ad7cb291d3db22d9", "score": "0.77889967", "text": "public function run()\n {\n /**\n * This is a dummy data seeder. All the information is here for demonstration purposes.\n */\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n DB::statement('TRUNCATE TABLE assignments');\n \n $data = [\n ['id' => 1, 'name' => 'Biología', 'created_at' => now()],\n ['id' => 2, 'name' => 'Geografía', 'created_at' => now()],\n ['id' => 3, 'name' => 'Historia', 'created_at' => now()],\n ['id' => 4, 'name' => 'Lengua y Literatura', 'created_at' => now()],\n ['id' => 5, 'name' => 'Matemáticas', 'created_at' => now()],\n ['id' => 6, 'name' => 'Educación Física', 'created_at' => now()],\n ['id' => 7, 'name' => 'Música', 'created_at' => now()],\n ['id' => 8, 'name' => 'Educación Plástica', 'created_at' => now()],\n ['id' => 9, 'name' => 'Computación', 'created_at' => now()],\n ['id' => 10, 'name' => 'Idioma', 'created_at' => now()]\n ];\n\n DB::table('assignments')->insert($data);\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "88446e1bf24041ad962665525b97b12d", "score": "0.7787001", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = [\n [\n 'name' => 'nur',\n 'email' => 'nur@gmail.com'\n ],\n [\n 'name' => 'monjur',\n 'email' => 'monjur@gmail.com'\n ],\n [\n 'name' => 'farhana',\n 'email' => 'farhana@gmail.com'\n ],\n [\n 'name' => 'towhid',\n 'email' => 'towhid@gmail.com'\n ],\n [\n 'name' => 'majedul',\n 'email' => 'majedul@gmail.com'\n ],\n [\n 'name' => 'mobarok',\n 'email' => 'mobarok@gmail.com'\n ],\n [\n 'name' => 'jahed',\n 'email' => 'jahed@gmail.com'\n ],\n [\n 'name' => 'jb',\n 'email' => 'jb@gmail.com'\n ],\n ];\n foreach ($users as $user) {\n factory(User::class)->create([\n 'name' => $user['name'],\n 'email' => $user['email']\n ]);\n }\n factory(Note::class, 30)->create();\n }", "title": "" }, { "docid": "4b87096935422c5247afb2aaa8f23776", "score": "0.7781426", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $cats = factory(App\\ProductCategory::class, 3)->create()->each(function ($cat) {\n factory(App\\ProductCategory::class, 5)->create([\n 'parent_id' => $cat->id,\n ]);\n });\n factory(App\\User::class, 50)->create()->each(function ($user) use($cats) {\n factory(App\\Product::class, 2)->create([\n 'user_id' => $user->id,\n 'category_id' => $cats->random()->id,\n ]);\n });\n\n }", "title": "" }, { "docid": "f436dada1953139b05cfe23060658c72", "score": "0.7780704", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(0,0) as $index) {\n \t DB::table('users')->insert([\n \t 'name' => 'Vinay Paramanand',\n \t 'email' => 'vinayparamanand@gmail.com',\n 'password' => bcrypt('vinaytest'),\n 'main_image_path'=>'/img/img.jpg',\n 'active'=>1\n ]);\n }\n\n foreach (range(0,0) as $index) {\n\t DB::table('socials')->insert([\n\t 'linkedin_url' => $faker->url,\n 'contact_email' => $faker->url,\n 'rss_feed' => $faker->text,\n\t 'quora_url' => $faker->url,\n 'contact_email' => $faker->url\n ]);\n }\n\n\n\n }", "title": "" }, { "docid": "3d653e15cd03e74996be098cff42dfca", "score": "0.77792233", "text": "public function run()\n {\n \\App\\Models\\Admin::factory(10)->create();\n \\App\\Models\\User::factory(10)->create();\n\n Book::create(\n [\n \"title\" => \"Self Discipline\",\n \"author\" => \"Shawn Norman\",\n \"publisher\" => \"Google\",\n \"year\" => 2018,\n \"stock\" => 50,\n ]\n );\n\n Book::create(\n [\n \"title\" => \"Atomic Habits\",\n \"author\" => \"James Clear\",\n \"publisher\" => \"Google\",\n \"year\" => 2018,\n \"stock\" => 20,\n ]);\n\n Book::create(\n [\n \"title\" => \"The Last Thing He Told Me\",\n \"author\" => \"Laura Dave\",\n \"publisher\" => \"Google\",\n \"year\" => 2021,\n \"stock\" => 10,\n ]\n );\n }", "title": "" }, { "docid": "8a56b49c8ccacd412dc12ad6eb4f1c17", "score": "0.7772089", "text": "public function run()\n {\n User::factory(10)->create();\n Category::factory(4)->create();\n SubCategory::factory(4)->create();\n Color::factory(4)->create();\n Size::factory(4)->create();\n Product::factory(4)->create();\n ProductQuantity::factory(4)->create();\n Banner::factory(4)->create();\n Favourite::factory(4)->create();\n Gallery::factory(4)->create();\n City::factory(4)->create();\n Region::factory(4)->create();\n District::factory(4)->create();\n Address::factory(4)->create();\n RateComment::factory(4)->create();\n\n $this->call(PermissionsTableSeeder::class);\n $this->call(UpdatePermissionsTableSeeder::class);\n $this->call(SettingTableSeeder::class);\n $this->call(AddTaxToSettingTableSeeder::class);\n\n }", "title": "" }, { "docid": "defbf35392fe9a4d769e6b94f0fcd99b", "score": "0.7768574", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\tPost::truncate();\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n\t\tforeach(range(1, 30) as $index)\n\t\t{\n\t\t\t// MYSQL\n\t\t\t$userId = User::orderBy(DB::raw('RAND()'))->first()->id;\n\n\t\t\t// SQLITE\n\t\t\t// $userId = User::orderBy(DB::raw('random()'))->first()->id;\n\n\t\t\tPost::create([\n\t\t\t\t'user_id' => $userId,\n\t\t\t\t'title' => $faker->name($gender = null|'male'|'female'),\n\t\t\t\t'body' => $faker->catchPhrase\n\t\t\t]);\n\t\t}\n\n\t\t// $this->call('UserTableSeeder');\n\t}", "title": "" }, { "docid": "88876dd02f4a05f504ca51338370b797", "score": "0.7765722", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\User::class, 2)->create();\n factory(App\\Type::class, 8)->create();\n factory(App\\Room::class, 6)->create();\n \n\n // foreach($rooms as $room){\n // $room->owners()->attach(\n // $owners->random(random_int(1,3))\n // );\n // }\n \n }", "title": "" }, { "docid": "b11c80e4171d8992cf52a3d8c6ff07f3", "score": "0.77626616", "text": "public function run()\n {\n Eloquent::unguard();\n $faker = Faker::create();\n\n foreach(range(1, 3) as $index) {\n\n $title = $faker->sentence(2);\n\n Category::create(array(\n 'title' => $title,\n 'slug' => $this->generateSlug($title),\n 'description' => $faker->paragraph(2)\n ));\n }\n }", "title": "" }, { "docid": "c3a07070351bd000cfaf6a6bb53c9e90", "score": "0.77616376", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \n User::truncate();\n Products::truncate();\n \n // $this->call(UserSeeder::class);\n factory(User::class,10)->create();\n factory(Products::class,10)->create();\n \n }", "title": "" }, { "docid": "373927e90cd67705d12a2a2602b9c28a", "score": "0.7761006", "text": "public function run()\n {\n $faker = Factory::create();\n\n Product::truncate();\n Category::truncate();\n\n foreach (range(1, 10) as $key => $value) {\n Category::create([\n 'name' => $faker->word\n ]);\n }\n\n foreach (range(1,10) as $key => $value) {\n Product::create([\n 'name' => $faker->word,\n 'stock' => $faker->randomDigit(3),\n 'description' => $faker->paragraph(1),\n 'category_id' => $faker->randomDigit(2),\n 'user_id' =>$faker->randomDigit(2)\n ]);\n }\n }", "title": "" }, { "docid": "7fd6f0c247e33899edabe04b649cd22c", "score": "0.7756213", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n Model::unguard();\n $this->call(RoleTableSeeder::class);\n $this->call(TagTableSeeder::class);\n // DB::table('users')->delete();\n\n $users = [\n ['name' => 'root', 'email' => 'root@email.com',\n 'password' => Hash::make('qwerty')],\n ['name' => 'test', 'email' => 'test@email.com',\n 'password' => Hash::make('qwerty')],\n ['name' => 'vova', 'email' => 'vova@email.com',\n 'password' => Hash::make('qwerty')],\n ['name' => 'bob', 'email' => 'bob@email.com',\n 'password' => Hash::make('qwerty')],\n\n ];\n // Loop through each user above and create the record for them in the database\n foreach ($users as $user) {\n $newUser = User::create($user);\n if ($user['name'] == 'root') {\n $newUser->roles()->attach(1);\n } else {\n $newUser->roles()->attach(2);\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "05f5b66919509425a7194863454ee9d7", "score": "0.77492213", "text": "public function run()\n {\n\n $this->seedStudies();\n $this->seedCourses();\n\n }", "title": "" }, { "docid": "6ac18121221894258f25afa3e3a09f99", "score": "0.77469724", "text": "public function run()\n {\n Costumer::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Costumer::create([\n 'name' => $faker->name,\n 'phone' => $faker->sentence,\n 'Type' => $faker->sentence,\n 'city' => $faker->sentence,\n 'adress' => $faker->sentence,\n 'contact' => $faker->sentence,\n 'contact_phone' => $faker->sentence,\n 'created_by' => 1,\n ]);\n }\n }", "title": "" }, { "docid": "14aa0fd99ba18e6fb7278892a18441fc", "score": "0.7746705", "text": "public function run()\n {\n //delete all records from role table\n Role::truncate();\n\n $faker = Factory::create();\n\n for ($i = 0; $i < 50; $i++) {\n Role::create([\n 'name' => $faker->name\n ]);\n }\n }", "title": "" }, { "docid": "f5bfd65a0ab76fe80a146147ec5ed014", "score": "0.77440494", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n\n Model::reguard();\n\n # =========================================================================\n # CATEGORIES SEEDS\n # =========================================================================\n\n DB::table('categories')->delete();\n\n $categories = [\n [ 'name' => 'Wildlife',\n 'created_at' =>\\Carbon\\Carbon::now('Africa/Johannesburg')->toDateTimeString()\n ],\n [ 'name' => 'Pollution',\n 'created_at' =>\\Carbon\\Carbon::now('Africa/Johannesburg')->toDateTimeString()\n ]\n ];\n\n foreach ($categories as $category) {\n Category::create($category);\n }\n }", "title": "" }, { "docid": "ecb482ed5a02df8c19bf99957a103522", "score": "0.77431524", "text": "public function run()\n {\n Model::unguard();\n $faker = Faker::create();\n\n // DB::table('users')->delete();\n\n // $users = array(\n // ['name' => 'Tyler Torola', 'email' => 'tyler@tjt.codes', 'password' => Hash::make('password')],\n // ['name' => 'Bobby Anderson', 'email' => 'bobby@pangolin4x4.com', 'password' => Hash::make(\"***REMOVED***\")],\n // ['name' => 'Ike Goss', 'email' => 'pangolin4x4@aol.com', 'password' => Hash::make('***REMOVED***')],\n // );\n \n // // Loop through each user above and create the record for them in the database\n // foreach ($users as $user)\n // {\n // User::create($user);\n // }\n\n // foreach (range(1,10) as $index) {\n // $invoice = [\n // 'first_name' => $faker->firstName,\n // 'last_name' => $faker->lastName,\n\n // ]\n // }\n\n foreach (range(1,10) as $index) {\n \n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "115c012dd8846c3cb80cbb9f7a8327c6", "score": "0.7742761", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $categories = factory(Category::class)->times(10)->create();\n\n $users = factory(User::class)->times(20)->create();\n\n $products = factory(Product::class)->times(40)->create();\n\n $transactions = factory(Transaction::class)->times(10)->create();\n\n\n }", "title": "" }, { "docid": "0136ec9783e5809a5fe2c594d8780c7e", "score": "0.7741538", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Eloquent::unguard();\n\n $faker = Faker\\Factory::create();\n factory(App\\Answer::class, 100)->create();\n factory(App\\Kerja::class, 100)->create();\n factory(App\\Lulus::class, 100)->create();\n factory(App\\Nikah::class, 100)->create();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "42daa4f7485840fe27f640e7e7069e40", "score": "0.77378654", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([UsuarioSeed::class]);\n $this->call([CategoriasSeed::class]);\n $this->call([ExperienciaSeeder::class]);\n }", "title": "" }, { "docid": "d253031e250b9050d7af431c4c10f0bf", "score": "0.7737546", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->disableForeignKeyCheck();\n User::truncate();\n Tag::truncate();\n Post::truncate();\n\n factory(User::class, 50)->create();\n factory(Tag::class, 20)->create();\n factory(Post::class, 100)->create()->each(function ($post) {\n $tags = Tag::all()->random(mt_rand(1, 5))->pluck('id');\n $post->tags()->attach($tags);\n });\n }", "title": "" }, { "docid": "f70d3c8ab2d963dc7360a2749f67f6b7", "score": "0.7736429", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n Course::factory(3)->create();\n assignament::factory(9)->create();\n exercise::factory(6)->create();\n }", "title": "" }, { "docid": "31bba37eb86cd9ac68eaf41572a295dc", "score": "0.7735254", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n DB::table('roles')->insert([\n [ \n 'name' => 'voter'\n ],\n [ \n 'name' => 'admin'\n ],\n ]);\n\n DB::table('organizers')->insert([\n [\n 'name' => 'BEM UI'\n ],\n [\n 'name' => 'BEM FT UI'\n ]\n ]);\n\n DB::table('elections')->insert([\n [\n 'name' => 'Pemira UI',\n 'unique_code' => 'UI012021',\n 'election_date' => '2021-04-26',\n 'end_date' => '2021-05-28'\n ],\n [\n 'name' => 'Pemira FT UI',\n 'unique_code' => 'FT3012021',\n 'election_date' => '2021-05-03',\n 'end_date' => '2021-05-28'\n ]\n ]);\n\n $this->call([\n CandidateSeeder::class,\n UserSeeder::class,\n VoteSeeder::class\n ]);\n\n }", "title": "" }, { "docid": "de1da3761353d82d818811e2158ffcc6", "score": "0.77292454", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // Let's truncate our existing records to start from scratch.\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n $types = ['t-shirt', 'mug', 'boots', 'phone-case'];\n $colors = ['whitesilver','grey','black','navy','blue','cerulean','sky blue','turquoise','blue-green','azure','teal','cyan','green','lime','chartreuse','live','yellow','gold','amber','orange','brown','orange-red','red','maroon','rose','red-violet','pink','magenta','purple','blue-violet','indigo','violet','peach','apricot','ochre','plum'];\n $sizes = ['xs','s','m','l','xl'];\n\n // And now, let's create a few prods in our database:\n for ($i = 0; $i < 50; $i++) {\n\n $prod = Product::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n 'price' => rand(0, 1000)/10,\n 'productType' => $types[array_rand($types)],\n 'color' => $colors[array_rand($colors)],\n 'size' => $sizes[array_rand($sizes)],\n ]);\n }\n Schema::enableForeignKeyConstraints();\n }", "title": "" }, { "docid": "0ae073ea04e3e51b9a5a234a6645d3a1", "score": "0.77288526", "text": "public function run()\n {\n $this->truncateTables([\n //'products',\n //'services',\n //'categories',\n //'subcategories',\n 'products_users',\n //'users',\n 'avatars',\n ]);\n\n // Ejecutar los seeders:\n //$products = factory(Product::class)->times(4)->create();\n //$categories = factory(Category::class)->times(2)->create();\n //$subcategories = factory(SubCategory::class)->times(5)->create();\n //factory(Service::class)->times(4)->create();\n //factory(User::class)->times(10)->create();\n $avatars = factory(Avatar::class)->times(15)->create();\n\n /*foreach ($products as $oneProduct) {\n $oneProduct->category()->associate($categories->random(1)->first()->id);\n $oneProduct->subcategory()->associate($subcategories->random(1)->first()->id);\n $oneProduct->save();\n };*/\n\n // foreach ($products as $oneProduct) {\n // $oneProduct->category()->associate($categories->random(1)->first()->id);\n // $oneProduct->subcategory()->associate($subcategories->random(1)->first()->id);\n // $oneProduct->save();\n // };c9b1c36c8caeabda8347106e58f70033dd0265ca\n }", "title": "" }, { "docid": "a8c4b0faab2536f6924d6a6f05f50027", "score": "0.77278227", "text": "public function run()\n {\n $faker = Factory::create('fr_FR');\n $categories = ['Animaux', 'Nature', 'People', 'Sport', 'Technologie', 'Ville'];\n foreach ($categories as $category) {\n DB::table('categories')->insert([\n 'name' => $category,\n 'created_at' => $faker->date('Y-m-d H:i'),\n 'updated_at' => $faker->date('Y-m-d H:i'),\n ]);\n }\n $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "e424e7ea028abae43ad7eb31b541b451", "score": "0.771601", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // $this->call(ProductsTableSeeder::class);\n // $this->call(ProductImageSeeder::class);\n // $this->call(VariationSeeder::class);\n \\App\\Models\\Product::factory()->count(5)->create();\n \\App\\Models\\ProductImage::factory()->count(10)->create();\n //\\App\\Models\\Variation::factory()->create();\n }", "title": "" }, { "docid": "3d5934c5d799d5a3b3747a0bbd0e3d71", "score": "0.77135783", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::table('tasks')->delete();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Task::create([\n 'idCustomer' => $faker->numberBetween($min = 1, $max = 10),\n 'title' => $faker->sentence,\n 'description' => $faker->sentence,\n 'price' => $faker->numberBetween($min = 10, $max = 1000),\n 'deadline' => $faker->dateTimeBetween($startDate = 'now', $endDate = '+2 years', $timezone = 'Asia/Bishkek'),\n ]);\n }\n }", "title": "" }, { "docid": "f204d23341cb7fd2b48bb27ffde1b8f2", "score": "0.77124816", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n factory(App\\User::class, 4)->create();\n factory(App\\Group::class, 2)->create()->each(function($u) { $u->users()->save(App\\User::find(1)); });\n factory(App\\Item::class, 10)->create();\n }", "title": "" }, { "docid": "70fbcb2aeac3103c8556e273a1ea07ef", "score": "0.7712306", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'nome' => \"Felipe Gustavo Braiani Santos\",\n 'siape' => 2310754,\n 'password' => bcrypt('2310754'),\n 'perfil' => '3'\n ]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Mecânica\"]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Informática\"]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Eletrotécnica\"]);\n }", "title": "" }, { "docid": "72deab4b4ba460677188b9e5ddc3d631", "score": "0.77109", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Article::truncate();\n Store::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Store::create([\n 'name' => $faker->name,\n 'address' => $faker->address,\n ]);\n }\n }", "title": "" }, { "docid": "9877b188f4441322b489cf690def43a1", "score": "0.7704052", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\Category::class,10)->create();\n factory(\\App\\User::class,10)->create();\n\n $fake = \\Faker\\Factory::create();\n\n $users = \\App\\User::all();\n\n foreach ($users as $user){\n for ($i=0 ; $i<10 ; $i++){\n \\App\\Post::create([\n 'user_id' => $user->id,\n 'title' => $fake->name,\n 'description' => $fake->paragraph(5),\n ]);\n }\n }\n }", "title": "" }, { "docid": "b2a9f176c7df114ff184aa138ee5c05e", "score": "0.77025133", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Players::class, 10000)->create();\n \n factory(App\\GamePlay::class, 3835)->create(); \n\n $this->call(GamesTableSeeder::class);\n \n }", "title": "" }, { "docid": "3b2cd726bae9a08c2dfd89fc525f4d5f", "score": "0.77025044", "text": "public function run()\n {\n\n $this->call(UsersTableSeeder::class);\n $this->call(CuentaTableSeeder::class);\n $this->call(MovimientoTableSeeder::class);\n // factory ('App\\Vehiculo',6)->create();\n // factory ('App\\Estacionamiento',6)->create();\n $this->call(VehiculoTableSeeder::class);\n $this->call(OrigenTableSeeder::class);\n $this->call(TarifasTableSeeder::class);\n $this->call(ZonasTableSeeder::class);\n $this->call(EstaciomamientoTableSeeder::class);\n factory ('App\\Inspector',10)->create();\n }", "title": "" }, { "docid": "acf364571e79e5cefded12cff1dc405e", "score": "0.7700658", "text": "public function run()\n\t{\n\t\t$faker = Faker::create();\n\t\tforeach (range(1, 50) as $key) {\n\t\t\tDB::table('books')->insert([\n\t\t\t'title' => $faker->sentence(),\n\t\t\t'description' => $faker->paragraph(),\n\t\t\t'author' => $faker->name(),\n\t\t\t'created_at' => Carbon::now(),\n\t\t\t'updated_at' => Carbon::now(),\n\t\t\t]);\n\t\t}\n}", "title": "" }, { "docid": "443e869bc448f240356820ce99b73eba", "score": "0.76993686", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(SettingSeeder::class);\n\n factory(Category::class, 7)->create();\n\n factory(Product::class,150)->create();\n\n $categories = App\\Category::all();\n\n Product::all()->each(function ($product) use ($categories)\n {\n $product->categories()->attach(\n // $categories->random(rand(3,6))->pluck('id')->toArray()\n $categories->random(rand(1,6))->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "8fe4489137a56b956b08ecc256a24aa7", "score": "0.7697992", "text": "public function run()\n {\n //\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n\n\n $cost=$faker->randomFloat(2,0,1000);\n\n Product::create([\n 'category_id' => random_int(1,5),\n 'cost' => $cost,\n 'stock' => random_int(1,20),\n 'priceTotal' => $cost+10,\n 'tax' => random_int(1,10),\n 'description' => 'Descripcion'. $i,\n 'reference' => 'Referencia'. $i,\n 'user_id'=> random_int(1,User::count())\n ]);\n }\n }", "title": "" }, { "docid": "a3ead8af61223146f6e3fdec15b00904", "score": "0.7697128", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([QuizSeeder::class]);\n $this->call([AnswererSeeder::class]);\n $this->call([SectionSeeder::class]);\n $this->call([QuestionSeeder::class]);\n $this->call([AnswerSeeder::class]);\n $this->call([OptionSeeder::class]);\n $this->call([OptionColSeeder::class]);\n }", "title": "" }, { "docid": "02a3de1d1d158c365800c7a0830fe308", "score": "0.7693202", "text": "public function run()\n {\n //\n // DB::table('articles')->delete();\n\n\t // for ($i=0; $i < 10; $i++) {\n\t // \\App\\Article::create([\n\t // 'title' => 'Title '.$i,\n\t // 'body' => 'Body '.$i,\n\t // 'user_id' => 1,\n\t // 'like' => 0,\n\t // 'draft' => true\n\t // ]);\n\t // }\n\n\n\t // DB::table('articles')->insert([\n // 'title' => 'Title '.str_random(10),\n // 'body' => 'Body '.str_random(10),\n // 'user_id' => 1,\n // 'like' => 0,\n // 'draft' => true\n // ]);\n\n \t// factory(App\\Article::class, 50)->create()->each(function ($u) {\n\t // $u->posts()->save(factory(App\\Article::class)->make());\n\t // });\n\t factory(App\\Article::class, 50)->create();\n\n }", "title": "" }, { "docid": "1c370e9bc1f2d1d56de7442838321847", "score": "0.7689267", "text": "public function run()\n {\n $this->call(CompanySeeder::class);\n $this->call(JobsSeeder::class);\n $this->call(UserSeeder::class);\n\n $categories=[\n 'Government','NGO','Banking','software','Networking','2nd optionb'\n ];\n foreach ($categories as $category){\n \\App\\Models\\Category::create(['name'=>$category]);\n }\n }", "title": "" }, { "docid": "d821e4330d8dabc502854ce12d329af5", "score": "0.7686517", "text": "public function run()\n {\n $this->call(ColorsTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(SexesTableSeeder::class);\n $this->call(SizesTableSeeder::class);\n\n $this->call(User_StatusesTableSeeder::class);\n\n $this->call(SubcategoriesTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n\n $this->call(ProductsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n // factory(\\App\\Product::class, 62)->create();\n factory(\\App\\User::class, 25)->create();\n factory(\\App\\Cart::class, 99)->create();\n }", "title": "" }, { "docid": "29695a5ff1fa3c45993913799e105323", "score": "0.76861745", "text": "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\t$dateset = new Seed(self::TABLE_NAME);\n\n\t\tforeach ($dateset as $rows) {\n\t\t\t$records = [];\n\t\t\tforeach ($rows as $row)\n\t\t\t\t$records[] = [\n\t\t\t\t\t'id'\t\t\t=> $row->id,\n\t\t\t\t\t'created_at'\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t\t'updated_at'\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t\t'sport_id'\t\t=> $row->sport_id,\n\t\t\t\t\t'country_id'\t=> $row->country_id,\n\t\t\t\t\t'gender_id'\t\t=> $row->gender_id,\n\n\t\t\t\t\t'name'\t\t\t=> $row->name,\n\t\t\t\t\t'external_id'\t=> $row->external_id ?? null,\n\t\t\t\t\t'logo'\t\t\t=> $row->logo ?? null,\n\t\t\t\t];\n\n\t\t\tinsert(self::TABLE_NAME, $records);\n\t\t}\n\t}", "title": "" }, { "docid": "3114668392a1c46e1e1ae8969bf609b6", "score": "0.76837957", "text": "public function run()\n {\n $faker = Faker::create();\n\n // seeder for authorised member\n User::create([\n 'role' => \"auth_member\",\n 'name' => \"Mr.Django\",\n 'email' => \"fake@email.com\",\n 'password' => Hash::make('1234')\n ]);\n User::create([\n 'role' => \"auth_member\",\n 'name' => \"Mr.Prism\",\n 'email' => \"git.pyprism@gmail.com\",\n 'password' => Hash::make('1234')\n ]);\n\n // seeder for 3 second markers\n foreach(range(1, 3) as $index) {\n User::create([\n 'role' => 'second_marker',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('1234')\n ]);\n }\n\n // seeder for 4 supervisors\n foreach(range(1, 4) as $index) {\n User::create([\n 'role' => 'supervisor',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('1234')\n ]);\n }\n\n // seeder for 30 students\n foreach(range(1, 30) as $index) {\n User::create([\n 'role' => 'student',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('1234')\n ]);\n }\n }", "title": "" }, { "docid": "8b162d964f15bb87bea6b64c3def25df", "score": "0.7679688", "text": "public function run()\n {\n //TODO Seeder create X Users\n factory(\\App\\User::class, 10)->create();\n //TODO Seeder create X Authors\n factory(\\App\\Author::class, 10)->create();\n //TODO Seeder create X Libraries and looping Libraries\n factory(\\App\\Library::class, 10)->create()->each(function($library){\n //TODO Seeder create X Books and looping Books\n factory(\\App\\Book::class, 10)->make()->each(function($book) use($library){\n //TODO Seeder asign Books to Libraries (relationship)\n $library->books()->save($book);\n });\n });\n }", "title": "" }, { "docid": "bdd67eaf9bb5c705971ec25aad3d2bf9", "score": "0.76768607", "text": "public function run()\n {\n $faker = Faker\\Factory::create('es_ES');\n\n DB::table('empresas')->delete();\n for ($cantidadEmpresas = 0; $cantidadEmpresas != 6; $cantidadEmpresas++) {\n DB::table('empresas')->insert(array(\n 'nombre' => $faker->company,\n 'direccion' => $faker->address,\n 'email' => $faker->companyEmail,\n 'url' => $faker->url,\n 'telefono' => $faker->numberBetween(600000000,699999999),\n 'created_at' => date('Y-m-d H:m:s'),\n 'updated_at' => date('Y-m-d H:m:s'),\n ));\n }\n }", "title": "" }, { "docid": "01775d6adda6df1ce8c05497acdfcd54", "score": "0.76755834", "text": "public function run()\n {\n\n News::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['business', 'popular', 'hotnews', 'lifestyle', 'world', 'world', 'sports'];\n for ($i = 0; $i < count($categories); $i++) {\n for ($j = 0; $j < 5; $j++) {\n News::create([\n 'title' => $categories[$i] . ' title ' . $j,\n 'content' => $faker->paragraph(),\n 'category' => $categories[$i],\n 'image' => $faker->image('public/uploads/news/', 640, 480, null, false),\n ]);\n }\n }\n }", "title": "" }, { "docid": "b186d6546035ec76f8db21fdbd2a0e44", "score": "0.7674704", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('products')->insert([\n 'id' => $index,\n 'name' => $faker->name,\n 'image' => $faker->imageUrl(600,400),\n 'price' => $faker->numberBetween(0,1000)\n ]);\n }\n $this->call(ProductSeeder::class);\n }", "title": "" }, { "docid": "ae0478774917d2a61935b3bb56a50045", "score": "0.76742005", "text": "public function run()\n {\n State::create(['id' => 1, 'name' => 'not state']);\n State::create(['id' => 2, 'name' => 'to do']);\n State::create(['id' => 3, 'name' => 'doing']);\n State::create(['id' => 4,'name' => 'done']);\n\n Role::create(['name' => 'Scrum Master']);\n Role::create(['name' => 'Product Owner']);\n Role::create(['name' => 'Developer']);\n\n Tag::factory(5)->create();\n Category::factory(5)->create();\n\n User::create([\n // 'id' => 1,\n 'name' => 'Joel',\n 'email' => 'joel@test.com',\n 'email_verified_at' => now(),\n 'password' => bcrypt('1234567')\n ]);\n\n User::factory(10)->create()->each(function ($user) {\n $number_tasks = rand(1, 11);\n\n for ($i=0; $i < $number_tasks; $i++) {\n $user->tasks()->save(Task::factory()->make());\n }\n });\n\n Team::factory(5)->create()->each(function ($team) {\n $number_tasks = rand(1, 11);\n\n for ($i=0; $i < $number_tasks; $i++) {\n $team->tasks()->save(Task::factory()->make());\n }\n\n $team->users()->attach($this->array(rand(2, 11)));\n });\n }", "title": "" }, { "docid": "8ba9e1eb60aa2ce75e4f67b85523a3b3", "score": "0.76738054", "text": "public function run()\n {\n //\n\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n // $name = $faker->unique()->word;\n // $quantity = $faker->numberBetween(1, 50);\n // $price = $faker->randomFloat(2,10,200);\n // $value = $price * $quantity;\n User::create([\n 'name' => $faker->unique()->word,\n 'email' => $faker->unique()->word.'@gmail.com',\n 'password' => bcrypt('123456'),\n 'email_verified_at' => Carbon::now(),\n 'remember_token' => Carbon::now(),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "0a6360cbcc87c10411cfdb8218573c6a", "score": "0.7670969", "text": "public function run()\n {\n $faker = Faker::create('id_ID');\n foreach (range(1, 100) as $index) {\n DB::table('products')->insert([\n 'code' => $faker->unique()->randomNumber,\n 'name' => $faker->sentence(4),\n 'stock' => $faker->randomNumber,\n 'varian' => $faker->sentence(1),\n 'description' => $faker->text,\n 'image' => $faker->imageUrl(\n $width = 640,\n $height = 480\n ),\n 'category_id' => rand(1, 5)\n ]);\n }\n }", "title": "" }, { "docid": "e7c35bf1a78291d3c85c164ebd658980", "score": "0.7670915", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //seeding the furnitures\n $this->call(FurnituresTableSeeder::class);\n\n // seeding the tags\n $this->call(TagsTableSeeder::class);\n\n // seeding the users, houses, and rooms table by creating room for each\n // house for each user\n factory(App\\User::class, 3)->create()->each(function ($user) {\n $user->houses()->saveMany(factory(App\\House::class, 2)->create()->each(function ($house) {\n $house->rooms()->saveMany(factory(App\\Room::class, 3)->create());\n }));\n });\n }", "title": "" }, { "docid": "c4192461f63978082f8fcbfb0f3a4b92", "score": "0.7668657", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // User::create([\n\t\t// 'username' => 'admin',\n\t\t// 'password' => Hash::make('admin'),\n\t\t// 'real_password' => 'admin'\n\t\t// ]);\n\n //check and count inventory records\n $inventory = inventory::all();\n if(count($inventory)){\n $item_id = 'inv_'.$this->randomString().'_'.(count($inventory)+1);\n }else{\n $item_id = 'inv_'.$this->randomString().'_'.'1';\n }\n \n inventory::create([\n 'item_id' => $item_id,\n 'username' => 'admin',\n 'item_name' => 'Medicine 3',\n 'item_description' => 'If you take this you will eventually die',\n 'item_quantity' => 20\n ]);\n }", "title": "" }, { "docid": "7b59b344bf9bf9580742222e5ba42ec2", "score": "0.7665538", "text": "public function run()\n {\n \t // DB::table('users')->insert([\n \n // 'username' => \"quy\",\n // 'email' => \"khaquy09112@gmail.com\",\n // 'sex' => 0,\n // 'phone_number' => 0,\n // 'password' => Hash::make('123456'),\n // ]);\n $faker = Faker\\Factory::create();\n for($i = 0; $i < 20; $i++) {\n App\\news::create([\n 'tittle' => $faker->text(40),\n 'intro' => $faker->text($minNbChars = 60),\n 'content' => $faker->text($minNbChars = 400),\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n 'user_id' => 6\n ]);\n }\n\n }", "title": "" }, { "docid": "8c8e23570f05312b54416c1cbcb81e7b", "score": "0.766276", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n // $this->call([\n // UserSeeder::class,\n // PostSeeder::class,\n // CommentSeeder::class,\n // ]);\n\n // User Table Seeding\n User::factory()\n ->count(5)\n ->create();\n\n // Category Table Seeding\n ProductCategory::factory()\n ->count(5)\n ->create();\n\n // Product Table Seeding\n Product::factory()\n ->count(10)\n ->create();\n }", "title": "" }, { "docid": "d4833208ba9ca3bb97bd734168301979", "score": "0.7659574", "text": "public function run()\n {\n $this->call(ReligionsTableSeeder::class);\n $this->call(SubjectsTableSeeder::class);\n $this->call(BuildingsTableSeeder::class);\n $this->call(ScholarshipsTableSeeder::class);\n $this->call(GradesTableSeeder::class);\n $this->call(CollegesTableSeeder::class);\n $this->call(DepartmentsTableSeeder::class);\n factory('App\\Faculty', 500)->create();\n // factory('App\\Student', 1000)->create();\n factory('App\\Room', 140)->create();\n $this->call(CurriculaTableSeeder::class);\n $this->call(CurriculumSubjectsTableSeeder::class);\n $this->call(StudentsTableSeeder::class); \n }", "title": "" }, { "docid": "6fdeeeb37f42681366483a8c2c186b05", "score": "0.765777", "text": "public function run()\n {\n Model::unguard();\n $userId = DB::table('users')->pluck('id')->toArray();\n $bookId = DB::table('books')->pluck('id')->toArray();\n $faker = Faker::create();\n for ($i = 0; $i <= 15; $i++) {\n factory(App\\Model\\Post::class, 1)->create([\n 'user_id' => $faker->randomElement($userId),\n 'book_id' => $faker->randomElement($bookId)\n ]);\n }\n Model::reguard();\n }", "title": "" }, { "docid": "ade397526ae1d55557124d57dafcccd2", "score": "0.765603", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\empresa::class,10)->create();\n factory(\\App\\tut_lab::class,20)->create();\n factory(\\App\\tut_doc::class,20)->create();\n factory(\\App\\ciclo::class,20)->create();\n factory(\\App\\fecha::class,20)->create();\n factory(\\App\\alumno::class,20)->create();\n \n\n }", "title": "" }, { "docid": "43a50dd07282ff905667d4ed0c2f4a4b", "score": "0.76543665", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create(\n [\n 'email' => 'leszekstubinski@gmail.com',\n 'name' => 'Leszek'\n ]\n );\n\n factory(User::class)->create(\n [\n 'email' => 'b.project@wp.pl',\n 'name' => 'Gosia'\n ]\n );\n\n factory(User::class)->create(\n [\n 'email' => 'cafomat@cafomat.pl',\n 'name' => 'Agnieszka'\n ]\n );\n }", "title": "" }, { "docid": "f39736a1dd58b24415fb18f580a15480", "score": "0.7653886", "text": "public function run()\n {\n //$faker = Factory::create('uk_UA');\n $faker = Factory::create('ru_RU');\n\n foreach (range(1, 10) as $i) {\n Staff::create([\n 'first_name' => (($i % 2) == 0) ? $faker->firstNameMale : $faker->firstNameFemale,\n 'last_name' => $faker->lastName,\n 'middle_name' => (($i % 2) == 0) ? $faker->middleNameMale() : $faker->middleNameFemale(),\n 'sex' => (($i % 2) == 0) ? 'мужской' : 'женский',\n 'salary' => 600,\n ]);\n }\n\n foreach (Staff::all() as $people) {\n $positions = Position::inRandomOrder()->take(rand(1,3))->pluck('id');\n $people->positions()->attach($positions);\n }\n }", "title": "" }, { "docid": "727a6eb0cfb135db37a834cd42286ad5", "score": "0.7651371", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n //factory(Post::class, 48)->create();\n }", "title": "" }, { "docid": "0aa9e71a7d39d8e1c143c2676348855e", "score": "0.7650461", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // call our class and run our seeds\n\n DB::table('armari_a')->insert([\n\n 'id' => '2',\n 'nom_armari' => 'armari A',\n 'nom_producte' => 'Bosses puntes pipetes',\n 'stock_inicial' => '4',\n 'stock_actual' => '5',\n 'proveedor' => 'PIDISCAT',\n 'referencia_proveedor'=> '11971',\n 'marca_equip' => 'null',\n 'num_lot' => '0',\n\n ]);\n DB::table('armari_a')->insert([\n\n 'id' => '3',\n 'nom_armari' => 'armari A',\n 'nom_producte' => 'Puntes micropipeta',\n 'stock_inicial' => '17',\n 'stock_actual' => '17',\n 'proveedor' => 'PIDISCAT',\n 'referencia_proveedor'=> '0',\n 'marca_equip' => 'null',\n 'num_lot' => '0',\n\n\n ]);\n\n\n }", "title": "" }, { "docid": "3a36602f580a4a0d79e184724854eff2", "score": "0.76479024", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::truncate();\n Admin::truncate();\n factory(User::class, 2)->create();\n factory(Admin::class, 1)->create();\n //factory(Link::class, 10)->create();\n //factory(Category::class, 2)->create();\n }", "title": "" }, { "docid": "8a18fcb1937bb7f261796040e1fcfa6d", "score": "0.76466405", "text": "public function run()\n {\n //$this->call(StudentSeeder::class);\n $this->call(ClassroomSeeder::class);\n $this->call(FacultyMemberSeeder::class);\n $this->call(LectureSeeder::class);\n $this->call(LectureRegisterSeeder::class);\n\n DB::table('users')->insert([\n 'role' => '1',\n 'name' => 'Öğrenci işleri',\n 'email' => 'uzman@mail.com',\n 'password' => Hash::make( '123123' )\n ]);\n DB::table('users')->insert([\n 'role' => '2',\n 'name' => 'İlk',\n 'surname' => 'Öğrenci',\n 'code' => '1231231231',\n 'email' => 'ogr1@mail.com',\n 'password' => Hash::make( '123123' )\n ]);\n DB::table('users')->insert([\n 'role' => '2',\n 'name' => 'İkinci',\n 'surname' => 'Öğrenci',\n 'code' => '1231231232',\n 'email' => 'ogr2@mail.com',\n 'password' => Hash::make( '123123' )\n ]);\n }", "title": "" }, { "docid": "bcb79b7af39bcb53c4feae04acbb1a67", "score": "0.76453894", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Attribute::create(['title' => 'Expertise and Competence']);\n Attribute::create(['title' => 'Responsiveness']);\n Attribute::create(['title' => 'Communication and Reporting']);\n Attribute::create(['title' => 'Trustworthiness (Confidentiality)']);\n Attribute::create(['title' => 'Quality of Service']);\n }", "title": "" }, { "docid": "41157008c4eff9687b3dcc670f9e4f1e", "score": "0.7644173", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n User::create([\n 'username' => $faker->word,\n 'fullname' => $faker->word,\n 'state' => 0,\n 'tel' => $faker->word,\n 'whatsapp' => $faker->word,\n 'token' => $faker->sentence,\n 'address' => $faker->word,\n 'email' => $faker->email,\n 'password' => $faker->word\n ]);\n }\n }", "title": "" }, { "docid": "9fde55e4c96d4dec4240ddd0ecd757be", "score": "0.7643901", "text": "public function run()\n {\n\t\t$this->call(CategoryTableSeeder::class);\n\t\t$this->call(GenreTableSeeder::class);\n\t\t$this->call(StateTableSeeder::class);\n\t\t$this->call(ImageTableSeeder::class);\n\t\t$this->call(AuthorImageTableSeeder::class);\n\t\t$this->call(CharacterImageTableSeeder::class);\n\n\t factory(User::class, 10)->create();\n\t factory(Customer::class, 10)->create();\n\t factory(Product::class, 20)->create();\n }", "title": "" } ]
89e4525c2401b9e905ce81f339835fe5
si viene array campo/valor.
[ { "docid": "4dd3fe4e2d709dc8c843e5ad29fa2a82", "score": "0.0", "text": "public function __construct($field, $value = null, $and = true){\n\t\tif(is_array($field) && !empty($field)){\n\t\t\t$this->conditions = $field;\n\t\t}\n\t\t//si viene campo/valor.\n\t\telseif(!is_null($field) && !is_null($value)){\n\t\t\t$this->conditions[$field] = $value;\n\t\t}\t\n\t\t$this->operand = ($and)?' AND':' OR';\n\t}", "title": "" } ]
[ { "docid": "4ce0569930a2e2cd9a9182755574e274", "score": "0.6300944", "text": "function setValores($array) { $this->arValores = $array; }", "title": "" }, { "docid": "110f8d4e651ab5e23ec9e3c2374e0d1b", "score": "0.6185606", "text": "function contieneCampos($filaTabla){\n$campos0=explode(\"~\".@mysql_result($this->arrayCampos,0,\"nombrecampo\").\"~\", $filaTabla);//dividir la fila con el primer campo insertado en el informe\nif(count($campos0)>1){\nreturn true;\n}else{\nreturn false;\n}\n}", "title": "" }, { "docid": "3b27e564ae0a850df0d82b6cf20b4a39", "score": "0.61175144", "text": "public static function getArraysSelectOpcFiltro($tipoCampo = \"\"){\n\t\t// X: Clob (character large objects), or large text fields that should be shown in a <textarea>\n\t\t// D: Date field\n\t\t// T: Timestamp field\n\t\t// L: Logical field (boolean or bit-field)\n\t\t// N: Numeric field. Includes decimal, numeric, floating point, and real.\n\t\t// I: Integer field.\n\t\t// R: Counter or Autoincrement field. Must be numeric.\n\t\t// B: Blob, or binary large objects.\n\t\t$arrValue = array ();\n\t\t$arrText = array ();\n\t\t\n\t\tswitch ($tipoCampo) {\n\t\t\tcase 'C' :\n\t\t\tcase 'X' :\n\t\t\t\tarray_push($arrValue, 'Igual');\n\t\t\t\tarray_push($arrText, 'Igual');\n\t\t\t\t\n\t\t\t\tarray_push($arrValue, 'Inicia Com');\n\t\t\t\tarray_push($arrText, 'Inicia Com');\n\t\t\t\t\n\t\t\t\tarray_push($arrValue, 'Contem');\n\t\t\t\tarray_push($arrText, 'Contem');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'N' :\n\t\t\tcase 'I' :\n\t\t\tcase 'R' :\n\t\t\t\tarray_push($arrValue, 'Igual');\n\t\t\t\tarray_push($arrText, 'Igual');\n\t\t\t\t\n\t\t\t\tarray_push($arrValue, 'Maior Que');\n\t\t\t\tarray_push($arrText, 'Maior Que');\n\t\t\t\t\n\t\t\t\tarray_push($arrValue, 'Maior Ou Igual');\n\t\t\t\tarray_push($arrText, 'Maior Ou Igual');\n\t\t\t\t\n\t\t\t\tarray_push($arrValue, 'Menor Que');\n\t\t\t\tarray_push($arrText, 'Menor Que');\n\t\t\t\t\n\t\t\t\tarray_push($arrValue, 'Menor Ou Igual');\n\t\t\t\tarray_push($arrText, 'Menor Ou Igual');\n\t\t\t\t\n\t\t\t\tarray_push($arrValue, 'Diferente');\n\t\t\t\tarray_push($arrText, 'Diferente');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'D' :\n\t\t\tcase 'T' :\n\t\t\t\tarray_push($arrValue, 'Igual');\n\t\t\t\tarray_push($arrText, 'Igual');\n\t\t\t\t\n\t\t\t\tarray_push($arrValue, 'Maior Que');\n\t\t\t\tarray_push($arrText, 'Maior Que');\n\t\t\t\t\n\t\t\t\tarray_push($arrValue, 'Maior Ou Igual');\n\t\t\t\tarray_push($arrText, 'Maior Ou Igual');\n\t\t\t\t\n\t\t\t\tarray_push($arrValue, 'Menor Que');\n\t\t\t\tarray_push($arrText, 'Menor Que');\n\t\t\t\t\n\t\t\t\tarray_push($arrValue, 'Menor Ou Igual');\n\t\t\t\tarray_push($arrText, 'Menor Ou Igual');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'L' :\n\t\t\t\tarray_push($arrValue, 'Igual');\n\t\t\t\tarray_push($arrText, 'Igual');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault :\n\t\t\t\tarray_push($arrValue, 'Igual');\n\t\t\t\tarray_push($arrText, 'Igual');\n\t\t\t\t\n\t\t\t\tarray_push($arrValue, 'Inicia Com');\n\t\t\t\tarray_push($arrText, 'Inicia Com');\n\t\t\t\t\n\t\t\t\tarray_push($arrValue, 'Contem');\n\t\t\t\tarray_push($arrText, 'Contem');\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn array ($arrValue,$arrText);\n\t\n\t}", "title": "" }, { "docid": "c92ab69c288e01f6600846b3e1a6dd2f", "score": "0.6098302", "text": "private function checkField($array)\r\n {\r\n foreach ($array as $key => $value) {\r\n if($key!=\"Tax\")\r\n {\r\n if(!$this->isTextPresent($value))\r\n {\r\n $url = $this->getLocation();\r\n $this->LogReport(\"Row - \".$key.\": \".$vlaue.\" is absent || url - \".$url);\r\n } \r\n $this->assertTextPresent($value);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "8adeb58129197684351654714806737d", "score": "0.6061856", "text": "public static function arrayInserte($campo1,$tabla,$campo2) {\n $conexion = new Conexion();\n $sql = (\"INSERT INTO $tabla ($campo1) VALUES ($campo2)\");\n $preparar = $conexion->prepare($sql);\n $preparar->execute(); \n $cuenta = $preparar->rowCount(); \n if ($cuenta > 0) { $si='True'; }\n return $si;\n $conectar = $conexion->cerrarConexionMy(); \n }", "title": "" }, { "docid": "a386a230b2393ca537319ebb96034179", "score": "0.60476524", "text": "private function setArrayOrdenCarac(){\n $carBusc=caracteristicasBuscadorPrincipalBSN::getInstance();\n $this->arrayOrdenCarac=$carBusc->getArrayParametros();\n $buscador=new CaracteristicaBSN();\n $arrayBusc=$buscador->coleccionBuscadorCompleto();\n foreach ($arrayBusc as $buscado){\n if(!array_key_exists($buscado['id_carac'],$this->arrayOrdenCarac)){\n $this->arrayOrdenCarac[$buscado['id_carac']]=$buscado['titulo'];\n }\n }\n }", "title": "" }, { "docid": "7fbd11504ce277c38292c990e12570c9", "score": "0.6022903", "text": "function setValores($arreglo){\n\t\tfor($i=0;$i<count($this->datos);$i++){\n\t\t\t$aux='no';\n\t\t\tforeach($arreglo as $data){\n\n\t\t\t\tif($this->datos[$i][$data['variable']]==$data['val_ant'] && $aux=='no'){\n\n\t\t\t\t\t$this->datos[$i][$data['variable']]=$data['val_nue'];\n\t\t\t\t\t$aux='si';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "73178ac6b979245ab9a43f75cbb80b45", "score": "0.59563756", "text": "public static function arrayUpdate($campo,$tabla,$consulta) {\n $conexion = new Conexion();\n $sql = (\"UPDATE $tabla SET $campo WHERE $consulta\");\n $preparar = $conexion->prepare($sql);\n $preparar->execute(); \n $cuenta = $preparar->rowCount(); \n if ($cuenta > 0) { $si='True'; }\n return $si;\n //$conectar = $conexion->cerrarConexionMy(); \n }", "title": "" }, { "docid": "0415351ac87f43c1a710850f72e2057f", "score": "0.58178943", "text": "public function librodeEditoriales($arregloautor, $peditorial)\n{\n \n foreach($arregloautor as $array){\n \n if($array->getEditorial() == $peditorial){\n $arrayNuevo[]= $array->getTitulo(); \n }\n \n }\n\n return $arrayNuevo;\n}", "title": "" }, { "docid": "87f70011b6913969d65a0c7886c98ce3", "score": "0.58055544", "text": "public function iguales($plibro, $parreglo)\n{\n \n foreach($parreglo as $array){\n \n if($array == $plibro){\n return $mensaje = \"El libro se encuentra en la coleccion \\n\";\n break;\n }else{\n $mensaje = \"El libro no.. se encuentra en la coleccion \\n\";\n }\n }\n return $mensaje;\n}", "title": "" }, { "docid": "35ee811a23b87b2f5d58de9a06d28585", "score": "0.5788408", "text": "function campos_ocultos($campo) {\n\t\t if ($_SESSION['config']['bd']['tipo'] == 'mysql'){\n\t\t\t$field = 'Field';\n\t\t}elseif($_SESSION['config']['bd']['tipo'] == 'sqlite'){\n\t\t\t$field = 'name';\n\t\t}\n\t\tglobal $ocultar;\n\t if(in_array($campo[$field],$ocultar) && empty($campo['Relation'])){\n\t return true;\n\t }\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a0a189169d3d53fa85297985a35c0271", "score": "0.57844824", "text": "function buscarCampos(){\n try{\n if(!isset($this->idinforme)){throw \"No hay idinfome asignado\";}\n $sql=\"SELECT * FROM `caminformes` WHERE `caminformes`.`idinforme`='$this->idinforme'\";\n $res=@mysql_query($sql) or $this->error.=@mysql_error();\n $this->arrayCampos=$res;\n }catch(Exception $error){\n $this->error.=$error;\n }\n}", "title": "" }, { "docid": "cbbca077672c23a07f40098806b1cf6a", "score": "0.57458013", "text": "public function setFields($field){\n\t\t// seteo el array a la variable\n\t\tif( is_array($field) )\n\t\t\t$this->fields = $field;\n\t\telse\n\t\t\tarray_push($this->fields, $field);\n\t\t// si me setean un valor, lo meto en el array\n\t}", "title": "" }, { "docid": "f2a9fca460adeb71f602d653a80ec6fd", "score": "0.5740297", "text": "public function asignarValores ($array, $idTipoBanco){\n //así despues asigno estas variables a los atributos del objeto.\n switch ($idTipoBanco){\n case 1:\n $fecha = $array[0];\n $referencia = $array[1];\n if ($array[2])\n $importe = $array[2]*(-1);\n else\n $importe = $array[3];\n $concepto = $array[4];\n $saldo = 0; //TODO lo pongo en 0 porque no aparece en el extracto...\n break;\n case 2:\n $fecha = explode(\"-\", $array[0]);\n $fecha[2]++; //BUG: incremento el día porque cuando lo toma desde el excel le resta uno...\n $fecha = $fecha[0].\"-\".$fecha[1].\"-\".$fecha[2];\n $referencia = $array[1];\n $concepto = $array[2];\n $importe = $array[3];\n $saldo = $array[4];\n break;\n case 3:\n $fecha = $array[0];\n $referencia = $array[1];\n $concepto = $array[2];\n if ($array[3]){\n $importe = str_replace(\"\\\"\", \"\",$array[3]); //saco las comillas.\n $importe = str_replace(\",\", \"\", $importe); //saco la ,\n $importe = trim ($importe);\n $importe = $importe *(-1);\n\n }else{\n $importe = str_replace(\"\\\"\", \"\",$array[4]); //saco las comillas.\n $importe = str_replace(\",\", \"\", $importe); //saco la ,\n $importe = trim ($importe);\n }\n $saldo = str_replace(\"\\\"\", \"\",$array[5]); //saco las comillas.\n $saldo = str_replace(\",\", \"\", $saldo); //saco la ,\n $saldo = trim ($saldo);\n break;\n case 5:\n $fecha = $array[0];\n $referencia = $array[2];\n $concepto = $array[1];\n $importe = $array[3];\n $saldo = $array[4];\n break;\n }\n\n $this->fecha['valor'] = $fecha;\n $this->referencia['valor'] = $referencia;\n\n $resultado = $this->idTipoBancoConcepto['referencia']->getIdTipoBancoConcepto($idTipoBanco, $concepto);\n if($this->idTipoBancoConcepto['referencia']->result->getStatus() == STATUS_OK){\n //si encontró el concepto para ese banco lo asigno al objeto.\n $this->idTipoBancoConcepto['valor'] = $resultado['idTipoBancoConcepto'];\n }else if($this->idTipoBancoConcepto['referencia']->result->getStatus() == STATUS_ERROR){\n $resultbk = $this->idTipoBancoConcepto['referencia']->result;\n $this->idTipoBancoConcepto['referencia']->insertTipoBancoConcepto($idTipoBanco, $concepto);\n $this->idTipoBancoConcepto['referencia']->result = $resultbk; //dejo el msj que corresponde al concepto.\n }\n\n $this->importe['valor'] = $importe;\n $this->saldo['valor'] = $saldo;\n }", "title": "" }, { "docid": "3bdb34e137e4bd29febdf4ae7a97ef38", "score": "0.5676019", "text": "function validate($arrayData,$codigo=false){\n\t\t$oDBV=new PFDBValidator($this->oDBM,$this->tabla);\n\t\t$oDBV->codigo=$codigo;\n\t\t$oDBV->arrayData=$arrayData;\n\t\t$b=$oDBV->validarVector();\n\t\tif($b){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\t$this->aErrors=$oDBV->arrayErrores;\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "71e0a5617bef2c7678a620c91f701813", "score": "0.56467974", "text": "public function crear_producto($arr)\n {\n //insertar en galeria agregando galeria idNuevoGaleria\n $error = false;\n foreach ($arr as $tabla => $campos) {\n if (!$error && $this->db->insert($tabla, $campos)) {\n $ids[$tabla] = $this->db->getInsertId();\n } else {\n $error = true;\n echo 'hubo un error';\n die();\n break;\n }\n };\n\n if (!$error) {\n $idVehiculo = $ids['vehiculo'];\n unset($ids['vehiculo']);\n $ids['galeria'] = $this->crear_galeria($_FILES);\n if ($this->db->where('id', $idVehiculo)->update('vehiculo', $ids)) {\n echo 'ooooooook';\n } else {\n echo 'hubo un error al actualizar la tabla de productos';\n }\n }\n\n\n// var_dump($arr);\n// print_r($arr['vehiculo']);\n }", "title": "" }, { "docid": "4d931acdfb4796c2c4b983f29918160d", "score": "0.5645883", "text": "function actualiza($array,$id)\r\n{\r\n\tforeach($array as $campo => $cambio)\r\n\t{\r\n\t\t\r\n\t\t$bd=database::getInstance();\r\n\t\t$sql = \"Update tarea Set \".$campo.\" = \".'\"'.addslashes($cambio).'\"'.\" Where id= \".$id.\";\";\r\n\t\t$bd->Consulta($sql);\r\n\t}\r\n\t\r\n}", "title": "" }, { "docid": "f83819a728c25c4ab8faf38806bdc055", "score": "0.5622099", "text": "public function camposClave(){ \n $filas=$this->childQuery()->\n select(['nombrecampo','orden'])->\n andWhere(['esclave'=>'1'])->\n asArray()->all();\n return array_combine(ArrayHelper::getColumn($filas,'nombrecampo'),\n ArrayHelper::getColumn($filas,'orden'));\n }", "title": "" }, { "docid": "c6dfb75882a20806cfa8236d290d9019", "score": "0.55959886", "text": "function validarForm($dato,$regla) {\n \n foreach($regla as $valor){\n \n if(isset($valor['obligatorio'])) {\n \n // Valida si el campo es obligatorio\n if($valor['obligatorio'] == TRUE) {\n if(empty($_REQUEST[$valor['campo']])) {\n //$this->errores[$valor['campo']] = \"Campo Obligatorio\";\n $this->error[$valor['campo']] = \"Campo Obligatorio\";\n }\n }\n }\n }\n //return $this->errores;\n return $this->error;\n }", "title": "" }, { "docid": "cb41861fea21ca3d582bef9fc0e52555", "score": "0.55697876", "text": "function rs_convertir_asociativo($datos_recordset, $claves=array(0), $valor=1)\n\t{\n\t\tif (!isset($datos_recordset)) {\n\t\t\treturn array();\n\t\t}\n\t\t$valores = array();\n\t\tforeach ($datos_recordset as $fila){\n\t\t\t$valores_clave = array();\n\t\t\tforeach($claves as $clave) {\n\t\t\t\tif (isset($fila[$clave])) {\n\t\t\t\t\t$valores_clave[] = $fila[$clave];\n\t\t\t\t} else {\n\t\t\t\t\ttoba_logger::instancia()->error(\"La fila del recordset no contiene la clave '$clave'. \".var_export($fila, true));\n\t\t\t\t\tthrow new toba_error_def('La fila del recordset no contiene la columna indicada, revise el log ');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (! isset($fila[$valor])){\n\t\t\t\ttoba_logger::instancia()->error(\"La fila del recordset no contiene la clave '$clave'. \".var_export($fila, true));\n\t\t\t\tthrow new toba_error_def('La fila del recordset no contiene la columna indicada, revise el log ');\n\t\t\t}else{\n\t\t\t\t$valores[implode(apex_qs_separador, $valores_clave)] = $fila[$valor];\n\t\t\t}\n\t\t}\n\t\treturn $valores;\n\t}", "title": "" }, { "docid": "6b47197d4c7c5f5e3f69874050493d9c", "score": "0.5559433", "text": "function set(array $array, $inicio = 0) {\n $this->idimagen=$array[0+$inicio];\n $this->idnota=$array[1+$inicio];\n $this->imagen=$array[2+$inicio];\n }", "title": "" }, { "docid": "53f6b992a768b35e46d6b51f3eed200c", "score": "0.5452429", "text": "function get_dato_elenco($campo){\n//dato il campo prendo l'id dal post (!!!!ORRRORRRE) e restituitsco il valore di descrizione\n\n\t$dati=$this->array_dati[$this->curr_record];\n\t$tabella=$this->tabella_elenco;\n\tif (!isset($this->db)) $this->connettidb();\n\t$sql=\"select $campo from e_oneri where id=\".$_POST[\"tabella\"];\n\tif ($this->debug)\techo(\"sql=$sql\");\n\tprint_debug($sql,NULL,\"tabella\");\n\t$this->db->sql_query ($sql);\t\n\t//$elenco = $this->db->sql_fetchrowset();\n\t$elenco=$this->db->sql_fetchfield($campo);\n\tif (!$elenco){\n\t\treturn;\n\t}\n\t$ar_elenco=explode(\";\",$elenco);\n\t//echo \"array=\";print_r($ar_elenco);\n\tfor ($i=0;$i<count($ar_elenco);$i++){\n\t\tif ($ar_elenco[$i]==$dati[$campo])\n\t\t\t$retval=$ar_elenco[$i-1];\n \t}\n\treturn $retval;\n}", "title": "" }, { "docid": "d0a2bff751555b31ad0b39084d14b71d", "score": "0.5446574", "text": "function validarCargaCita($arrayDivision,$idAsesor){\n $mensaje = array();\n \n if($arrayDivision[\"tipo_registro\"] == \"\"){\n $mensaje[] = \"Tipo de Registro\";\n } \n if($arrayDivision[\"hora_cita\"] == \"\"){\n $mensaje[] = \"Hora de cita\";\n }\n if($arrayDivision[\"fecha_cita\"] == \"\"){\n $mensaje[] = \"Fecha de cita\";\n }\n if($arrayDivision[\"codigo_asesor\"] == \"\"){\n $mensaje[] = \"Código asesor\";\n }\n if($arrayDivision[\"estatus_agendamiento\"] == \"\"){\n $mensaje[] = \"Estatus agendamiento\";\n }\n if($arrayDivision[\"placa\"] == \"\"){\n $mensaje[] = \"Placa\";\n }\n if($arrayDivision[\"chasis\"] == \"\"){\n $mensaje[] = \"Chasis\";\n }\n if($arrayDivision[\"ci_cliente\"] == \"\"){\n $mensaje[] = \"CI cliente\";\n }\n if($arrayDivision[\"nombre_cliente\"] == \"\"){\n $mensaje[] = \"Nombre cliente\";\n }\n// if($arrayDivision[\"apellido_cliente\"] == \"\"){\n// $mensaje[] = \"Apellido cliente\";\n// }\n// if($arrayDivision[\"correo_cliente\"] == \"\"){\n// $mensaje[] = \"Correo cliente\";\n// }\n// if($arrayDivision[\"prefijo_celular_cliente\"] == \"\"){\n// $mensaje[] = \"Prefijo celular cliente\";\n// }\n// if($arrayDivision[\"celular_cliente\"] == \"\"){\n// $mensaje[] = \"Celular cliente\";\n// }\n \n if($idAsesor == \"\" && $arrayDivision[\"codigo_asesor\"] != \"\"){\n $mensaje[] = \"No se encuentra asociado el código del asesor\";\n }\n \n if(empty($mensaje)){\n return array(true,\"\");\n }else{\n $mensajeCompleto = \"Falta Datos: \".implode(\", \",$mensaje);\n return array(false, $mensajeCompleto);\n }\n}", "title": "" }, { "docid": "b1ee2a658844a40adc6b0ce26b770919", "score": "0.5438552", "text": "function set(array $array, $pos = 0) { /*la palabra array en el parametro del metodo obliga a que se pase un array*/\n foreach ($this as $campo => $value) {\n if (isset($array[$pos])) {\n $this->$campo = $array[$pos];\n }\n $pos++;\n }\n }", "title": "" }, { "docid": "69379f211be4b2ec179ded5e17ff8334", "score": "0.54279995", "text": "function validarTipoContenido($tipo){\r\n $tipos = ['vendedor','propiedad'];\r\n /**Con (in_array()), lo que hacemos e sbuscar un array dentro de un string, toma dos parametros:\r\n * 1) LO que vamos a buscar dentro del arreglo\r\n * 2) El arreglo sobre el cual vamos a buscar\r\n * */\r\n return in_array($tipo,$tipos);\r\n}", "title": "" }, { "docid": "60c1838acb06a4f25f2b62068de67cc3", "score": "0.5400608", "text": "public function insertArray($tabla,$data_array) {\n\t\t$this->db->insert($tabla, $data_array);\n\t}", "title": "" }, { "docid": "1d4ff770d4aed825c29feb99e2fcd1ef", "score": "0.53650606", "text": "public function listaEmpleadosNoUsuarios($opcion,$valor,$id_sistema)\n\t{ \n if($opcion==1){\n $datosSeparados = explode(\"|\",$valor);\n $apPat = $datosSeparados[0];\n $apMat = $datosSeparados[1];\n $nombre = $datosSeparados[2];\n \n if($apPat!='' && $apMat=='' && $nombre==''){\n $opcion2 = 11;\n $valor2 = $apPat;\n }\n else{\n if($apPat=='' && $apMat!='' && $nombre==''){\n $opcion2 = 12;\n $valor2 = $apMat;\n }\n else{\n if($apPat=='' && $apMat=='' && $nombre!=''){\n $opcion2 = 13;\n $valor2 = $nombre;\n }\n else{\n if($apPat!='' && $apMat!='' && $nombre==''){\n $opcion2 = 14;\n $valor2 = $apPat.' '.$apMat;\n }\n else{\n if($apPat=='' && $apMat!='' && $nombre!=''){\n $opcion2 = 15;\n $valor2 = $apMat.' '.$nombre;\n }\n else{\n if($apPat!='' && $apMat=='' && $nombre!=''){\n $opcion2 = 16;\n $valor2 = $apPat.' '.$nombre;\n }\n else{\n if($apPat!='' && $apMat!='' && $nombre!=''){\n $opcion2 = 17;\n $valor2 = $apPat.' '.$apMat.' '.$nombre;\n }\n else{\n if($apPat=='' && $apMat=='' && $nombre==''){\n $opcion2 = 18;\n $valor2 = '';\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else{\n $opcion2 = $opcion;\n $valor2 = $valor;\n }\n $oLFormulario = new LFormulario();\n $arrayFilas\t= $oLFormulario->listaEmpleadosNoUsuarios($opcion2,$valor2,$id_sistema);\n\n //$arrayCabecera = array('c_cod_per'=>\"CODIGO\",\"nom_com\"=>\"EMPLEADO\",\"c_ndide\"=>\"DOCUMENTO\");\n $arrayCabecera = array('c_cod_per'=>\"CÓDIGO\",\"nom_com\"=>\"EMPLEADO\",\"descri\"=>\"DOCUMENTO\",\"c_ndide\"=>\"NÚMERO\");\n $o_Tabla = new Tabla($arrayCabecera,$arrayFilas,'col1','col2','sele','title','js','selItem');\n $tablaHTML = $o_Tabla->getTabla();\n $row_ini = \"<table class='grid' width='100%' border='0' cellpadding='2' cellspacing='0'>\";\n $row_fin =\"</table>\";\n return $row_ini.$tablaHTML.$row_fin;\n\t}", "title": "" }, { "docid": "fa7c7198e6f9f71f35b60bb4d79ceeab", "score": "0.5338003", "text": "function novoContato($dados){\n\tglobal $app;\n $banco = Conexao();\n $dados = get_object_vars($dados);\n\t$dados = (sizeof($dados)==0)? $_POST : $dados;\n\t$keys = array_keys($dados); //Paga as chaves do array\n\t$sth = $banco->prepare(\"INSERT INTO contato (\".implode(',', $keys).\") VALUES (:\".implode(\",:\", $keys).\")\");\n \n\tforeach ($dados as $key => $value) {\n\t\t$sth ->bindValue(':'.$key,$value);\n\t}\n \n\t//Retorna o id inserido\n if($sth->execute()){ \n $response['status'] = 1;\n }\n else{\n \n $response['status'] =0;\n }\n \n \n echo json_encode($response );\n\n}", "title": "" }, { "docid": "76acd2aa083d64a3fe0afe40b9283945", "score": "0.5337065", "text": "public function guardar(array $registro){\n }", "title": "" }, { "docid": "3cea2bd298fe75300f52a6d67d7d0338", "score": "0.5331584", "text": "function CambiarValorTabla(&$registros_tabla,$change_value,$indice){\r\n //convierte la cadena a un vector\r\n $parametros_cambiar = explode(\",\",$change_value);\r\n\r\n for($i=0;$i < count($parametros_cambiar);$i+=4){\r\n //llama la clase de la tabla\r\n $gateway = Application::getDataGateway($parametros_cambiar[$i+1]);\r\n //optiene todos los datos de la tabla\r\n $datos = call_user_func(array($gateway,\"getAll\".$parametros_cambiar[$i+1]));\r\n for($z=0;$z < count($datos);$z++){\r\n //cambia el valor del vector por el nombre si los codigos son iguales\r\n $data='';\r\n if($registros_tabla[$indice][$parametros_cambiar[$i]] == $datos[$z][$parametros_cambiar[$i+2]] ){\r\n $param=explode('/',$parametros_cambiar[$i+3]);\r\n for($j=0;$j<count($param);$j++)\r\n {\r\n //$registros_tabla[$indice][$parametros_cambiar[$i]] = $datos[$z][$parametros_cambiar[$i+3]];\r\n $data.=$datos[$z][$param[$j]].\" \";\r\n }\r\n //$registros_tabla[$indice][$parametros_cambiar[$i]] = $datos[$z][$parametros_cambiar[$i+3]];\r\n $registros_tabla[$indice][$parametros_cambiar[$i]] = $data;\r\n break;\r\n }\r\n //$z++;\r\n }\r\n\r\n }\r\n}", "title": "" }, { "docid": "555ced8b4964e50add02c21f5b2dfeea", "score": "0.5298316", "text": "public function is_arr(){\n if(!is_array($this->_data['value'])){\n $this->set_error(sprintf($this->_messages['is_arr'], $this->_data['name']));\n }\n return $this;\n }", "title": "" }, { "docid": "ca2082653cdb0c22a77a18ab83d68175", "score": "0.52974427", "text": "public function preparaArrayDocumento(array $data, array $dadosMinuta = array()){\n \n $userNs = new Zend_Session_Namespace('userNs');\n $Dual = new Application_Model_DbTable_Dual();\n $datahora = $Dual->sysdate();\n $dataMinuta = array();\n $dataMofaMoviFaseMin = array();\n $anexAnexo = array();\n\n // verifica se envia para caixa de entrada da unidade ou rascunho\n if($data['DESTINO_DOCUMENTO'] == 'E'){\n $dados_input = Zend_Json::decode($data['UNIDADE']);\n\n if( !empty($dados_input) ){\n $siglaSecaoDestino = $dados_input['LOTA_SIGLA_SECAO'];\n $codCaixaDestino = $dados_input['LOTA_COD_LOTACAO'];\n $siglaCaixa = $dados_input['LOTA_SIGLA_LOTACAO'];\n }else{\n $siglaSecaoDestino = $userNs->siglasecao;\n $codCaixaDestino = $userNs->codlotacao;\n $siglaCaixa = $userNs->siglalotacao;\n }\n }\n \n // prepara arrays para insercao de movimentacao\n $dataMoviMovimentacao = array('MOVI_SG_SECAO_UNID_ORIGEM' => $siglaSecaoDestino,\n 'MOVI_CD_SECAO_UNID_ORIGEM' => $codCaixaDestino,\n 'MOVI_CD_MATR_ENCAMINHADOR' => $userNs->matricula);\n $dataModeMoviDestinatario = array('MODE_SG_SECAO_UNID_DESTINO' => $siglaSecaoDestino,\n 'MODE_CD_SECAO_UNID_DESTINO' => $codCaixaDestino,\n 'MODE_IC_RESPONSAVEL' => 'N');\n $dataMofaMoviFase = array('MOFA_ID_FASE' => 1010, /*ENCAMINHAMENTO SISAD*/\n 'MOFA_CD_MATRICULA' => $userNs->matricula,\n 'MOFA_DS_COMPLEMENTO' => 'Documento cadastrado e enviado para a Caixa da Unidade - '.$siglaCaixa\n );\n $dataModpDestinoPessoa = array();\n \n //prepara os campos que nao vem do form\n $data[\"DOCM_DH_CADASTRO\"] = new Zend_Db_Expr(\"SYSDATE\");\n $data[\"DOCM_CD_MATRICULA_CADASTRO\"] = $userNs->matricula;\n\n $aux_DOCM_CD_LOTACAO_GERADORA = $data['DOCM_CD_LOTACAO_GERADORA'];\n $docm_cd_lotacao_geradora_array = explode(' - ', $data['DOCM_CD_LOTACAO_GERADORA']);\n $data['DOCM_SG_SECAO_GERADORA'] = $docm_cd_lotacao_geradora_array[3];\n $data['DOCM_CD_LOTACAO_GERADORA'] = $docm_cd_lotacao_geradora_array[2];\n\n $aux_DOCM_CD_LOTACAO_REDATORA = $data['DOCM_CD_LOTACAO_REDATORA'];\n $docm_cd_lotacao_redatora_array = explode(' - ', $data['DOCM_CD_LOTACAO_REDATORA']);\n $data['DOCM_SG_SECAO_REDATORA'] = $docm_cd_lotacao_redatora_array[3];\n $data['DOCM_CD_LOTACAO_REDATORA'] = $docm_cd_lotacao_redatora_array[2];\n\n // prepara array cadastro de partes/vistas\n $dataPartePessoa = array();\n $dataParteLotacao = array();\n $dataPartePessExterna = array();\n $dataPartePessJur = array();\n \n if( count($data['partes_pessoa_trf']) > 0 ){\n $dataPartePessoa = array_unique($data['partes_pessoa_trf']);\n }\n if( count($data['partes_unidade']) > 0 ){\n $dataParteLotacao = array_unique($data['partes_unidade']);\n }\n if( count($data['partes_pess_ext']) > 0 ){\n $dataPartePessExterna = array_unique($data['partes_pess_ext']);\n }\n if( count($data['partes_pess_jur']) > 0 ){\n $dataPartePessJur = array_unique($data['partes_pess_jur']);\n }\n\n unset($data[\"DOCM_ID_DOCUMENTO\"]);\n\n $data[\"DOCM_NR_SEQUENCIAL_DOC\"] = $this->getNumeroSequencialDCMTO($data['DOCM_SG_SECAO_REDATORA'], $data['DOCM_CD_LOTACAO_REDATORA'], $data['DOCM_ID_TIPO_DOC']);\n $data[\"DOCM_NR_DOCUMENTO\"] = $this->getNumeroDCMTO($data['DOCM_SG_SECAO_REDATORA'],$data['DOCM_CD_LOTACAO_REDATORA'], $data['DOCM_CD_LOTACAO_GERADORA'], $data['DOCM_ID_TIPO_DOC'], $data[\"DOCM_NR_SEQUENCIAL_DOC\"]);\n $data[\"DOCM_DS_ASSUNTO_DOC\"] = new Zend_Db_Expr( \" CAST( '\". $data['DOCM_DS_ASSUNTO_DOC'] .\"' AS VARCHAR(4000)) \" );\n \n if(count($dadosMinuta) > 0){ \n $dataMinuta = array( \"DTPD_NO_TIPO\" => $dadosMinuta[\"DTPD_NO_TIPO\"], \n \"DOCM_ID_DOCUMENTO\" => $dadosMinuta[\"DOCM_ID_DOCUMENTO\"],\n \"DOCM_NR_DOCUMENTO_RED\" => $dadosMinuta[\"DOCM_NR_DOCUMENTO_RED\"]\n );\n \n $dataMofaMoviFaseMin = $dadosMinuta['dataMofaMoviFaseMin'];\n \n $anexAnexo['ANEX_ID_DOCUMENTO'] = $dadosMinuta['anexAnexo'][\"ANEX_ID_DOCUMENTO\"];\n $anexAnexo['ANEX_DH_FASE'] = $datahora;\n $anexAnexo[\"ANEX_NR_DOCUMENTO_INTERNO\"] = $dadosMinuta['anexAnexo'][\"ANEX_NR_DOCUMENTO_INTERNO\"];\n }\n \n $dadosInserir = array( \n 'dataDocmDocumento' => $data, \n 'dataMoviMovimentacao' => $dataMoviMovimentacao,\n 'dataModeMoviDestinatario' => $dataModeMoviDestinatario,\n 'dataMofaMoviFase' => $dataMofaMoviFase,\n 'dataPartePessoa' => $dataPartePessoa,\n 'dataParteLotacao' => $dataParteLotacao,\n 'dataPartePessExterna' => $dataPartePessExterna,\n 'dataPartePessJur' => $dataPartePessJur,\n 'dataMinuta' => $dataMinuta,\n 'dataMofaMoviFaseMin' => $dataMofaMoviFaseMin,\n 'dataAnexAnexoMin' => $anexAnexo,\n 'replicaVistas' => $data['REPLICA_VISTAS']\n );\n \n return $dadosInserir;\n }", "title": "" }, { "docid": "f52f0e155e943a07f2c31d4a69b8a06a", "score": "0.52917904", "text": "function guardar_atributos_opciones( $ultimo_id , $atributos ){\n var_dump($atributos);\n $contador = 1;\n foreach ($atributos as $key => $value) {\n\n $option = (int)$key;\n\n $int2 = (int) $option;\n \n if($int2 != 0){\n\n $data = array(\n 'Atributo' => $ultimo_id,\n 'attr_valor' => $value,\n 'attr_fecha_creado' => date(\"Y-m-d h:i:s\"),\n 'attr_estado' => 1\n );\n $this->db->insert(self::brand_line, $data ); \n $contador += 1;\n } \n }\n }", "title": "" }, { "docid": "9fccc9521e666ea8bc332076552fcf6e", "score": "0.52904385", "text": "function validaCampo($v,$num_de_columna,$definicion_campos){\n // echo $definicion_campos[1];\n //echo \"num_de_columna $num_de_columna\" ;\n $validaCampo[0]=-1;\n $validaCampo[3]=\"\";\n $tipo_de_dato=$definicion_campos[$num_de_columna][0];\n $acepta_nulos=$definicion_campos[$num_de_columna][1];\n $img0=$definicion_campos[$num_de_columna][2];\n $img1=$definicion_campos[$num_de_columna][3];\n $img2=$definicion_campos[$num_de_columna][4];\n $cond_ini=$definicion_campos[$num_de_columna][5];\n $cond_fin=$definicion_campos[$num_de_columna][6];\n \n if($acepta_nulos==\"SI\" && $v==\"\") {\n $validaCampo[0]=1;\n $validaCampo[2]=\" null \";\n }\n else {\n switch ($tipo_de_dato){\n case \"cadena\" : \n $v=utf8_decode($v); \n $v=trim($v);\n //$v.=strlen($v).\" ini $cond_ini, fin $cond_fin\";\n if ($v==\"\"){\n \t$v=\"vacio\";\n \t$validaCampo[3]=\"No se aceptan vacíos\";\n }\n else {\n \t\tif($v==0)\n\t\t\t\t\t$validaCampo[0]=1; \t\n\t \t\telse {\n\t \t\t\tif ($v!=\"\")\n\t\t \t\t\t$validaCampo[0]=1; \n\t\t \t\telse\t\n\t\t\t \t\t$v=\"vacios\";\n\t\t\t\t \n\t\t\t\t \n\t \t\t}\n\t \t\tif (strlen($v)<$cond_ini || strlen($v)>$cond_fin){\n\t\t\t \t$validaCampo[0]=-1;\n\t\t\t \t$validaCampo[3]=\"El dato no debe rebasar los $cond_fin caracteres\";\n\t\t\t \t}\n }\n\t $validaCampo[2]=\" '$v' \";\n\t /*\n\t if($v==0) \n\t\t $v=\" &nbsp;0\"; \n\t */\n break;\n case \"numero\":\n if (is_numeric ($v)) {\n $validaCampo[0]=1; \n $validaCampo[2]=$v; \n if ($v<$cond_ini || $v>$cond_fin) {\n\t\t\t\t $validaCampo[0]=-1; \n\t\t\t\t $validaCampo[3]=\"El dato debe ser mayor que $cond_ini o menor que $cond_fin\"; \n }\n }\n else{\n\t if ($v==0) {\n\t $validaCampo[0]=1; \n\t $validaCampo[2]=$v; \n\t }\n\t if($v==\"SDPM\" || $v==\"N/A\"){\n\t \t $validaCampo[0]=1; \n\t \t $validaCampo[2]=\" null \";\n\t }\n\t else {\n\t \t \t$validaCampo[0]=-1; \n\t \t\t$validaCampo[2]=\" null \";\n\t \t\t$validaCampo[3]=\"El dato debe ser numérico\";\n\t \t}\n }\n \n break;\n case \"flotante\" :\n if (is_float ($v)) {\n $validaCampo[0]=1; \n $validaCampo[2]=$v; \n }\n break; \n case \"fecha\":\n //suponiendo dia/mes/año\n \n if (!is_float($v)){ \n $validaCampo[0]=-1; \n $v=trim($v);\n if($v==\"SDPM\" || $v==\"N/A\"){\n \t $validaCampo[0]=1; \n \t $validaCampo[2]=\" null \";\n }\n } \n else {\n \t//$v=41850.5826388889;\n \t$v_orig =$v;\n \t$partes_num=explode(\".\",$v);\n \t\n //$fecha_new=($v-25569)*24*60*60;\n $fecha_new=($partes_num[0]-25568)*24*60*60;\n $partes_num[1]=$v-$partes_num[0];\n $num_segundos=$partes_num[1]*24*60*60;\n $num_horas=$num_segundos/(60*60);\n $part_entera_num_hora=explode(\".\",$num_horas);\n \n $num_min= ($num_segundos%(60*60))/60;\n $num_min=round($num_min);\n //$v=date(\"d/m/Y\", $fecha_new) ;\n \n \n $v=date(\"d/m/Y H:i\", $fecha_new) ;\n //$v=$v.\" $num_horas : $num_min\";\n $dia =substr($v,0,2); \n $mes =substr($v,3,2); \n $anio=substr($v,6,4);\n $fecha_creada= mktime( $part_entera_num_hora[0],$num_min,0,$mes,$dia,$anio);\n $v=date(\"d/m/Y H:i\", $fecha_creada) ;\n \n //echo \" valor_de_dato \".$v.\" \". date(\"d/m/Y\", $fecha_new);//.\" , conversion \".mktime($v);\n if (checkdate ($mes,$dia,$anio)) {\n $validaCampo[0]=1; \n //antes$v1=date(\"Y/m/d h:i\", $fecha_new) ;\n $v1=date(\"Y/m/d H:i\", $fecha_creada) ;\n $validaCampo[2]=\"'$v1'\";\n //$v=$v.\" fecha formato Y/m/d $v1 \"; \n \n }\n }\n break; \n \n }\n }\n \n if($tipo_de_dato==\"cadena\" && ($img0!=\"\" || $img1!=\"\" || $img2!=\"\") ){\n if($v==\"0\")\n \t$validaCampo[1]=\"<div align=center> <img align=middle src='./imgs/$img0'></div>\";\n else {\n \t if($v==\"1\")\n \t\t$validaCampo[1]=\"<div align=center> <img align=middle src='./imgs/$img1'></div> \";\n \telse {\n \t\t if ( $img2!=\"\") \n\t \t\t$validaCampo[1]=\"<div align=center> <img align=middle src='./imgs/$img2'></div>'\";\t \n\t \telse{\n\t \t\t if($v!=\"SDPM\" && $v!=\"N/A\")\n\t \t\t \t $validaCampo[0]=-1;\n\t \t\t$validaCampo[1]=$v;\n\t \t}\n \t}\n }\n }\n else\n \t$validaCampo[1]=$v; \n \t//echo \"valida campo 1 \".$validaCampo[1];\n \t\n return $validaCampo;\n}", "title": "" }, { "docid": "f4c8f5db0621a8e203a97b3fff163a9c", "score": "0.528448", "text": "function add_value_to_array($values, $id, $name, $info, $needed_to_fill) {\n $values[$id]['id'] = $id;\n $values[$id]['name'] = $name;\n $values[$id]['info'] = $info;\n $values[$id]['needed'] = $needed_to_fill;\n $values[$id]['type'] = FormElements::TEXTAREA;\n \n return $values;\n }", "title": "" }, { "docid": "4bb2b978bf7fe59baa6cec74ca623f7d", "score": "0.52837354", "text": "public function stdWrap_ifBlankDataProvider() : array {}", "title": "" }, { "docid": "9479ca2e1ce77a88d0e366f136951060", "score": "0.5271561", "text": "public function addHeader($campo,$valor){\n if(is_array($this->header_obj) && !empty($this->header_obj)){\n $this->header_obj[$campo] = $valor;\n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "0cc4d39a2fe00c4b9854dc42016987b3", "score": "0.5268039", "text": "function verificarRegistro($cons, $datos){\n\tglobal $pdo;\n\t$stmt = $pdo->prepare($cons);\n\tfor ($i = 0; $i < count($datos); $i++) { \n\t\t\t$stmt->bindValue($i+1, $datos[$i]);\n\t}\n\t$stmt->execute();\n\t$rows = $stmt->fetch(PDO::FETCH_ASSOC);\n\treturn $rows;\n\t\n}", "title": "" }, { "docid": "774e8d45d282df588d7b56211a7b8d21", "score": "0.5263953", "text": "public function tes0002(){\n\t\techo \"OK BRO tes selectedval bidang, alamat: \".$_POST['alamat'];\n\t}", "title": "" }, { "docid": "3cd286194206ba816692ca63322fece0", "score": "0.5261918", "text": "function mostrarErrores($errores,$campo){\n \n $alerta='';\n\n if (!empty($errores[$campo]) && isset($campo) ) {\n\n \t$alerta=$errores[$campo];\n }\n\n return $alerta;\n\n}", "title": "" }, { "docid": "690d2ab18ddc48e683320545ec18ea8c", "score": "0.52608454", "text": "public function object2array($valor){//valor\n\t\t /*if(!(is_array($valor) || is_object($valor))){ //si no es un objeto ni un array\n\t\t $dato = $valor; //lo deja\n\t\t } else { //si es un objeto\n\t\t foreach($valor as $key => $valor1){ //lo conteo \n\t\t $dato[$key] = $this->object2array($valor1); //\n\t\t }\n\t\t }\n\t\t return $dato;*/\n\t }", "title": "" }, { "docid": "151d29df4ce9a1aab4fe7f6a29efff22", "score": "0.52557963", "text": "function field_required($array) {\n\n $isNull = false;\n\n foreach ($array as $value) {\n if (!isset($value)) {\n $isNull = true;\n break;\n }\n }\n\n return $isNull;\n }", "title": "" }, { "docid": "cb43d4d375fcf3d606c29f591a58ccbf", "score": "0.5253387", "text": "function oc_checkField($fieldID, &$fieldsAR, &$saveFieldAR, &$err, $checkArrayValue=false) {\n\tif (oc_fieldEnabled($fieldID, $fieldsAR)) {\n\t\tif (isset($_POST[$fieldID]) && !empty($_POST[$fieldID])) {\n\t\t\tif ($checkArrayValue && is_array($fieldsAR[$fieldID]['values'])) {\n\t\t\t\tif ($fieldsAR[$fieldID]['usekey']) {\n\t\t\t\t\t\tif (isset($fieldsAR[$fieldID]['values'][$_POST[$fieldID]])) {\n\t\t\t\t\t\t\t$saveFieldAR[$fieldID] = \"'\" . safeSQLstr(trim($_POST[$fieldID])) . \"'\";\n\t\t\t\t\t\t}\n\t\t\t\t} elseif (in_array($_POST[$fieldID], $fieldsAR[$fieldID]['values'])) {\n\t\t\t\t\t$saveFieldAR[$fieldID] = \"'\" . safeSQLstr(trim($_POST[$fieldID])) . \"'\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$saveFieldAR[$fieldID] = \"'\" . safeSQLstr(trim($_POST[$fieldID])) . \"'\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!isset($saveFieldAR[$fieldID])) {\n\t\t\tif ( isset($fieldsAR[$fieldID]['required']) && $fieldsAR[$fieldID]['required'] ) {\n\t\t\t\t$err .= '<li>' . sprintf(oc_('%s field is required'), oc_($fieldsAR[$fieldID]['short'])) . '</li>';\n\t\t\t} else {\n\t\t\t\t$saveFieldAR[$fieldID] = \"NULL\";\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "74e1b61fee33fa7d0d05d1640d9d5412", "score": "0.52529424", "text": "public function getFieldValue($value){\n $this->arrayExel[] = $value;\n }", "title": "" }, { "docid": "7e420e3a101df93b78368ad23e3b9c9e", "score": "0.5250329", "text": "public static function addCustom($arr_campos_valores){\n\t\t//inicializacao\n\t\t$erro_bd = 0;\n\n\t\t//determina a classe derivada\n $static = self::camposFilho();\n\n\t\t//instancia o objeto AcessoBanco\n\t\t$acessoBanco = new AcessoBanco();\n\n\t\t$campos = \"\";\n\t\t$valores = \"\";\n\t\t$bool_proceder = false;\n\n\t\tif(is_array($arr_campos_valores)){\n\n\t\t\tforeach($arr_campos_valores as $this_campo => $this_valor){\n\n\t\t\t\tif ($campos != \"\") $campos .= \", \";\n\t\t\t\t$campos .= $this_campo;\n\n\t\t\t\tif ($valores != \"\") $valores .= \", \";\n\t\t\t\t$valores .= $this_valor;\n\n\t\t\t\t$bool_proceder = true;\n\n\t\t\t}//foreach\n\n\t\t\tif ($bool_proceder){\n\t\t\t\t//inseri no Banco de Dados\n\t\t\t\t$resultado = $acessoBanco->insertRegistro($static['tabela']['nome'], $campos, $valores);\n\t\t\t\tif ($resultado){\n\t\t\t\t\t$retorno = ($acessoBanco->insertId >0)?$acessoBanco->insertId:1;\n\t\t\t\t} else {\n\t\t\t\t\t$retorno = '-'.$acessoBanco->erroNo;\n\t\t\t\t}//if\n\n\t\t\t}else{\n\t\t\t\t$retorno = '-'.$erro_bd;\n\t\t\t}//if\n\t\t}//if arr\n\n\t\t//destroi objeto\n\t\tunset($acessoBanco);\n\n\t\t//retorna o n�mero do novo ID ou o Erro (codigo negativo)\n\t\treturn $retorno;\n\t}", "title": "" }, { "docid": "02ebdedd7e18f8ae52b9613dfb67ecf9", "score": "0.52428925", "text": "function mantenerDatos($arregloCampos, &$plantilla) {\n //var_dump($arregloCampos); \n $plantilla = &$plantilla;\n if (is_array($arregloCampos)) {\n foreach ($arregloCampos as $key => $value) {\n\n $plantilla->setVariable($key, $value);\n }\n }\n }", "title": "" }, { "docid": "02ebdedd7e18f8ae52b9613dfb67ecf9", "score": "0.52428925", "text": "function mantenerDatos($arregloCampos, &$plantilla) {\n //var_dump($arregloCampos); \n $plantilla = &$plantilla;\n if (is_array($arregloCampos)) {\n foreach ($arregloCampos as $key => $value) {\n\n $plantilla->setVariable($key, $value);\n }\n }\n }", "title": "" }, { "docid": "26cd7193764a52a4e0a923341996e856", "score": "0.5239055", "text": "public static function Transf_Object_Array(&$objetos){\r\n if(is_object($objetos)){\r\n $valores = $objetos->Get_Object_Vars();\r\n $objetos2 = Array();\r\n foreach ($valores as $indice2 => &$valor2){\r\n $objetos2[$indice2] = $valor2;\r\n }\r\n return $objetos2;\r\n }else if(is_array($objetos)){\r\n $objetos2 = Array();\r\n foreach($objetos as $indice=>&$valor){\r\n if(!is_object($valor)) continue;\r\n $valores = $valor->Get_Object_Vars();\r\n $objetos2[$indice] = Array();\r\n foreach ($valores as $indice2 => &$valor2){\r\n $objetos2[$indice][$indice2] = $valor2;\r\n }\r\n }\r\n return $objetos2;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "87ff1726079002c6af78c411643135ae", "score": "0.523736", "text": "public static function registroValido($nombre,$contenido){\n $error = array();\n if (strlen($nombre) < 1 || strlen($nombre) > 50) {\n $error[\"nombre\"] = \"El nombre de la Nota debe tener entre 3 y 50 caracteres.\";\n }\n if (strlen($contenido) < 1 || strlen($contenido) > 300) {\n $error[\"contenido\"] = \"El contenido de la Nota debe tener entre 5 y 300 caracteres.\";\n }\n if (sizeof($error)>0){\n echo \"No se puede resgistrar la Nota por los siguientes motivos: \";\n print_r(array_values($error));\n }\n if (sizeof($error)==0){\n return true;\n }\n}", "title": "" }, { "docid": "af471fbc138f96e8859af187bd6970c5", "score": "0.5235569", "text": "public function Set_arraycurriculumeurop_titolo(&$array){\n\tforeach ($this->curriculum_europeo_data as $key => $value) {\n\t\t//echo 'index '.$key.': '.$value;\n\t\tswitch($key){\n\t\t\tcase \"nomecognome\":\n\t\t\t\tif($value==''){\n\t\t\t\t\tif($this->society==1){\n\t\t\t\t\t\t$array[$key] = strtoupper($this->username);\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$array[$key] = $this->Get_nomeandcognome();\t\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$array[$key] = $value;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase \"sottotitolo\":\n\t\t\t\tif($value==''){\n\t\t\t\t\t$array[$key] = $this->Get_nomeandcognome();\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$array[$key] = $value;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\t}", "title": "" }, { "docid": "b72ab17553108f5494b919403d87316b", "score": "0.52267534", "text": "public function insertar(array $data)\n {\n\n\n $mesa=new MesasVotacion();\n $mesa->numero=$data['numero'];\n $mesa->id_punto=$data['id_punto'];\n $mesa->save();\n\n }", "title": "" }, { "docid": "7f56e814f6470c8f1491c03c7e7f85ba", "score": "0.5214528", "text": "public function stdWrap_fieldRequiredDataProvider() : array {}", "title": "" }, { "docid": "869f6bca8916481b28d661c508157cbe", "score": "0.5198197", "text": "public function getFieldValDataProvider() : array {}", "title": "" }, { "docid": "589b6ab22bf0fe190821bbb957963333", "score": "0.51950544", "text": "protected function postProcessArray() {\n }", "title": "" }, { "docid": "a281adff0aa28367fb7ff122ba996fe4", "score": "0.5193952", "text": "function nuevo()\n{\n\t$id= $_POST['id'];\n\t$nombre= $_POST['nombre'];\n\t$apellidos= $_POST['apellidos'];\n\t//$telefono= $_POST['telefono'];\n\t$email= $_POST['email'];\n\t$direccion= $_POST['direccion'];\n\t$array_telefono= $_POST['array_telefono'];\n\n\t$array_telefono_ok= explode(\",\", $array_telefono);\n\n\n\n\t$query1= \"SELECT nombre, apellidos FROM datos where nombre='$nombre' and apellidos='$apellidos'\";\n\n $con = new ConexionBBDD;\n\n $res1= $con->obtener($query1);\n\n if(count($res1)>0)\n {\n \techo 1;\n }\t\n\n else\n {\n \tif(empty($nombre)||empty($apellidos))\n \t{\n \t\techo 4;\n \t}\t\n \telse\n \t{\n \t\t$query= \"INSERT INTO `datos` (`id`, `nombre`, `apellidos`, `email`, `direccion`)\n\t\t VALUES ('$id', '$nombre', '$apellidos', '$email', '$direccion')\";\n\t\t \n\n\t\t $res = $con->ejecutar($query);\n\n\t\t if($res)\n\t\t {\n\t\t \t$query= \"SELECT id FROM datos where nombre='$nombre' and apellidos='$apellidos'\";\n\n\t\t \t$id_nuevo= $con->obtener($query);\n\t\t \tforeach ($id_nuevo as $fila) \n\t\t \t{\n\t\t \t\t$id_nuevo_ok= $fila['id'];\n\t\t \t}\n\n\t\t \t//$id_nuevo_ok= $id_nuevo[0]['id'];\n\n\t\t \tif ($array_telefono_ok==\"\")\n\t\t \t{\n\t\t \t\t$query2= \"INSERT INTO telefono (numero_telefono, id_contacto) VALUES ('no hay telefono asignado', '$id_nuevo_ok')\";\n\t\t \t\t$con->ejecutar($query2);\n\t\t \t}\t\n\t\t \telse\n\t\t \t{\n\t\t \t\tfor($i=0; $i<count($array_telefono_ok);$i++)\n\t\t \t\t{\n\t\t \t\t$telefono_ok= $array_telefono_ok[$i];\n\t\t \t\t$query2= \"INSERT INTO telefono (numero_telefono, id_contacto) VALUES ('$telefono_ok','$id_nuevo_ok')\";\n\t\t \t\t$con->ejecutar($query2);\t\n\t\t \t\t}\t\n\n\t\t \t}\t\n\t\t \t\n\t\t \techo 2;\n\n\t\t \t\t\t \t\n\t\t }\t\n\t\t else\n\t\t {\n\t\t \techo 3;\n\t \t}\n \t}\t\n \t\n }\t\n \n}", "title": "" }, { "docid": "2805dc4497253bcef719dbbd167dbf9f", "score": "0.5193486", "text": "public function listaUsuarios($opcion,$valor,$id_sistema)\n\t{\n if($opcion==1){\n $datosSeparados = explode(\"|\",$valor);\n $apPat = $datosSeparados[0];\n $apMat = $datosSeparados[1];\n $nombre = $datosSeparados[2];\n \n if($apPat!='' && $apMat=='' && $nombre==''){\n $opcion2 = 11;\n $valor2 = $apPat;\n }\n else{\n if($apPat=='' && $apMat!='' && $nombre==''){\n $opcion2 = 12;\n $valor2 = $apMat;\n }\n else{\n if($apPat=='' && $apMat=='' && $nombre!=''){\n $opcion2 = 13;\n $valor2 = $nombre;\n }\n else{\n if($apPat!='' && $apMat!='' && $nombre==''){\n $opcion2 = 14;\n $valor2 = $apPat.' '.$apMat;\n }\n else{\n if($apPat=='' && $apMat!='' && $nombre!=''){\n $opcion2 = 15;\n $valor2 = $apMat.' '.$nombre;\n }\n else{\n if($apPat!='' && $apMat=='' && $nombre!=''){\n $opcion2 = 16;\n $valor2 = $apPat.' '.$nombre;\n }\n else{\n if($apPat!='' && $apMat!='' && $nombre!=''){\n $opcion2 = 17;\n $valor2 = $apPat.' '.$apMat.' '.$nombre;\n }\n else{\n if($apPat=='' && $apMat=='' && $nombre==''){\n $opcion2 = 18;\n $valor2 = '';\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else{\n $opcion2 = $opcion;\n $valor2 = $valor;\n }\n\n $oLFormulario = new LFormulario();\n $arrayFilas\t= $oLFormulario->listaUsuarios($opcion2,$valor2,$id_sistema);\n $arrayCabecera = array('c_cod_per'=>\"CODIGO\",\"nom_com\"=>\"EMPLEADO\",\"descri\"=>\"DOCUMENTO\",\"c_ndide\"=>\"NUMERO\");\n $o_Tabla = new Tabla($arrayCabecera,$arrayFilas,'col1','col2','sele','title','cadenaDatosUsuario','selUsuario');\n $tablaHTML = $o_Tabla->getTabla();\n $row_ini = \"<table class='grid' width='100%' border='0' cellpadding='2' cellspacing='0'>\";\n $row_fin =\"</table>\";\n return $row_ini.$tablaHTML.$row_fin;\n\t}", "title": "" }, { "docid": "1d122b5d7269780d18b7562a17ee9c47", "score": "0.5190336", "text": "function validar($var){\n global $errors;\n foreach ($var as $field) {\n $val = clean($_POST[$field]);\n if(isset($val) && $val==''){\n $errors = \"Requerido: \". $field ;\n return $errors;\n }\n }\n}", "title": "" }, { "docid": "4a85e42b3f732cf26867012697945bae", "score": "0.51796913", "text": "public function validate($array, Constraint $constraint): void\n {\n if (\\is_array($array)) {\n $type = $constraint->type;\n $values = $type::getValues();\n $badValues = [];\n foreach ($array as $v) {\n if (!\\in_array($v, $values, true)) {\n $badValues[] = $v;\n }\n }\n if ($badValues) {\n $this->context->buildViolation($constraint->message)\n ->setParameter('{{ type }}', $constraint->type)\n ->setParameter('{{ value }}', implode(', ', $badValues))\n ->addViolation();\n }\n }\n }", "title": "" }, { "docid": "5f37fa6c71e5df70382b891d41a53d29", "score": "0.5165437", "text": "function editarRegistro($tabla,$valores){\n \n if ($this->conectar()){\n $keys= array_keys($valores);\n $values= array_values($valores);\n \n $sentenciaSQL=\"UPGRADE `$tabla` SET \";\n for ($i=0; $i<($numeroDeCampos-1);$i++){\n $sentenciaSQL.=\" $keys[$i] = $values[$i], \";\n }\n $sentenciaSQL=rtrim($sentenciaSQL, \",\");\n $sentenciaSQL=$sentenciaSQL. \" WHERE `$keys[0]`=`$values[0]`\"; \n if (!$this->conexion->query($sentenciaSQL)){\n \n echo \"Falló la modificación de la tabla: (\" . $this->conexion->errno . \") \" . $this->conexion->error;\n }\n } else {\n echo $this->conectar(); // muestra error de conexión\n }\n\n $this->desconectar();\n \n }", "title": "" }, { "docid": "ab9b2402f10cc44e606e61eb2812cc2b", "score": "0.516324", "text": "function is_array_check() {\n $array = get_records();\n return is_array($array) ? $array : array();\n}", "title": "" }, { "docid": "387d388c03175da22d2cb1cb2cca4c77", "score": "0.516278", "text": "public function formatearCampo($campo,$valor)\n \t{\t$funcion = $this->datosPOST[$campo][3];\n // Veo si es un campo Autoincrement y si quiere que el llenado\n \t\t// sea automatico o de Excel.\n \t\tif($this->datosPOST[$campo][10]==\"auto_increment\")\n \t\t{\tif($this->datosPOST[$campo][1]==1)\n \t\t\t{\t$valor = \"\";\t}\n \t\t}\n \t\t\n \t\t// Si se relaciona con otro campo veo que es lo que trae\n \t\t// para poner el valor correcto.\n\t\tif(isset($this->datosPOST[$campo][1]) && $this->datosPOST[$campo][10]!=\"auto_increment\")\n\t\t{\t$relacion\t= explode(\".\",$this->datosPOST[$campo][1]);\n\t\t\techo $consulta\t= \"SELECT $campo FROM $relacion[1] WHERE $relacion[0]='\".$valor.\"'\";\n\t\t\t\t\t\n\t\t\t$resultado\t= $this->mysqliConexion->query($consulta);\n\t\t\t$linea\t\t= $resultado->fetch_array();\n\t\t\t$valor\t\t= $linea[$campo];\n\t\t}\n\t\t\n\t\t\n\t\tif(method_exists($this,$funcion))\n \t\t{\t$valor\t\t=\t$this->$funcion($campo,$valor);\t}\n \t\telse\n \t\t{\techo \"El Metodo: <b>\".$funcion.\"</b> No existe. Se envio a un metodo\n \t\t\t\tpor defecto<br />\";\n \t\t\t$valor\t\t= $this->defecto($valor);\n \t\t}\n \t\treturn $valor;\n \t}", "title": "" }, { "docid": "666d3b376d2f55a8b0a51c79ec8891dc", "score": "0.5162377", "text": "abstract public function selectArray();", "title": "" }, { "docid": "1bf2208a2f69bbe977d456fe83783092", "score": "0.5159984", "text": "private function f_Modificar(){\n $lb_Hecho=false;\n\n $data = json_decode($this->aa_Atributos['datos_campos'], true);\n //print_r($data);\n\n for ($i=0; $i < count($data); $i++) {\n $ls_Sql=\"UPDATE T20_LIMITE_CREDITO SET MN_LIMITE_CREDITO='\".$data[$i]['monto_limite'].\"', CA_PESO_BASE='\".$data[$i]['peso_agro'].\"', MN_VALOR_PESO_BASE='\".$data[$i]['factor_agronomia'].\"' WHERE ID_REGISTRO='\".$data[$i]['id_limite_credito'].\"'\";\n $this->f_Con_ora('6232098','6236396'); //conecto a la base de datos\n $lb_Hecho=$this->f_Filtro_ora($ls_Sql);\n }\n\n\n return $lb_Hecho;\n }", "title": "" }, { "docid": "801fd31d7481a8ddad43ed279fad55d5", "score": "0.5154556", "text": "public function selectConvert($array)\r\n\t\t{\r\n\t\t\t\t/**\r\n\t\t\t\t * verisayisinin kontrolu icin gereken sayac baslatiliyor\r\n\t\t\t\t */\r\n\t\t\t\t$counter = 1;\r\n\t\t\t\t/**\r\n\t\t\t\t * gelen array'de ki ilk secenek html option id olarak kullanilacak\r\n\t\t\t\t */\r\n\t\t\t\t$idKey = '';\r\n\t\t\t\t/**\r\n\t\t\t\t * separatorleri array'den parcalayarak yeni array'e yerlestir\r\n\t\t\t\t */\r\n\t\t\t\t$expSeparators = explode('\\\\', $this->_typeArray[separators]);\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * listenin index'i ve alt arrayleri (0,1 => array)\r\n\t\t\t\t */\r\n\t\t\t\tforeach ($array as $key => $value) {\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * listenin alt arraylerinin degerleri (code,name =>)\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tforeach ($value as $subKey => $subValue) {\r\n\r\n\t\t\t\t\t\t\t\tif (debugger(\"MakeList\"))\r\n\t\t\t\t\t\t\t\t\t\techo 'counter : ' . $counter . ' value count : ' . count($value);\r\n\t\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t\t * yeni index sirasi geldi mi? (0 => 1,2,3 ise 1 => 1,2,3)\r\n\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\tif ($counter == count($value)) {\r\n\t\t\t\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t\t\t\t * sayaci sifirla\r\n\t\t\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\t\t\t$counter = 0;\r\n\t\t\t\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t\t\t\t * sonuncu separator tanimlanmis mi? (Ornegin sonunda actigimiz bir parantezi kapatmak isteyebiliriz)\r\n\t\t\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\t\t\tif ($expSeparators[count($value) - 2] != '') {\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\t * son seperator konulacak\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\t$separator = $expSeparators[count($value) - 2];\r\n\t\t\t\t\t\t\t\t\t\t} else {\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\t * tanimlanmamis! o zaman separator konulmayacak.\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\t$separator = '';\r\n\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\t\t * yeni index sirasi gelmemis sayac saymaya devam ediyor\r\n\t\t\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (debugger(\"MakeList\"))\r\n\t\t\t\t\t\t\t\t\t\t\t\techo ' separator : ' . $expSeparators[$counter - 2];\r\n\t\t\t\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t\t\t\t * yeni separatoru al\r\n\t\t\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\t\t\t$separator = $expSeparators[$counter - 2];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t\t * yeni index mi basliyor?\r\n\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\tif ($counter == 1) {\r\n\t\t\t\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t\t\t\t * o zaman yeni index'e kadar kullanilacak olan KEY'i belirle\r\n\t\t\t\t\t\t\t\t\t\t * bu KEY, SELECT listesinde HTML ID olarak kullanilacak\r\n\t\t\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\t\t\t$idKey = $subValue;\r\n\t\t\t\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t\t\t\t * deger KEY olarak kullanildigi icin stringe ekleme\r\n\t\t\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\t\t\t$currentSubValue = \"\";\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t\t\t\t * yeni index baslamiyor, stringe yeni degerleri eklemeye devam ediyoruz\r\n\t\t\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\t\t\t$currentSubValue = $subValue;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (debugger(\"MakeList\"))\r\n\t\t\t\t\t\t\t\t\t\techo ' idKey = ' . $idKey . ' currentSubValue : ' . $currentSubValue . '<br>';\r\n\t\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t\t * string eklemesi yapiliyor, array stringi genislemeye devam ediyor\r\n\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\t$cArray[$idKey] .= $currentSubValue . $separator;\r\n\t\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t\t * sayaci arttir\r\n\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\t$counter++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn $cArray;\r\n\t\t}", "title": "" }, { "docid": "74ffefea4306a61fe0b996152166311a", "score": "0.5149617", "text": "function novo($dados){\n\tglobal $app;\n $banco = Conexao();\n $dados = get_object_vars($dados);\n\t$dados = (sizeof($dados)==0)? $_POST : $dados;\n\t$keys = array_keys($dados); //Paga as chaves do array\n\t$sth = $banco->prepare(\"INSERT INTO usuario (\".implode(',', $keys).\") VALUES (:\".implode(\",:\", $keys).\")\");\n \n\tforeach ($dados as $key => $value) {\n\t\t$sth ->bindValue(':'.$key,$value);\n\t}\n \n\t//Retorna o id inserido\n if($sth->execute()){\n $response['id_usuario'] = $banco->lastInsertId();\n $response['status'] = 1;\n }\n else{\n \n $response['status'] =0;\n }\n \n \n echo json_encode($response );\n\n}", "title": "" }, { "docid": "c5bd13ab08608063a31f8fdf2b886d1b", "score": "0.51280564", "text": "function ofuscar_array($arreglo) { \n \n foreach($arreglo as $key => $f){\n \t$aux=substr($key,0,3);\n if($this->is_assoc($f)) {\n\t\t\t \t$this->ofuscar_array($f);\n\t\t\t } else {\n\t\t\t \tif(strpos($aux,'id_')!==false){\n\t\t\t\t//ofucasmos todas las variables que comiensen con id_\t\t\t\t\t\t\t\n\t\t\t $arreglo[$key] = $this->ofuscar($f);\n\t\t\t\t} elseif(strpos($aux,'id')!==false){\n\t\t\t\t\t//ofucasmos todas las variables que comiensen con id_\n\t\t\t\t\t$arreglo[$key] = $this->ofuscar($f);\n\t\t\t\t}\n\t\t\t\t//RAC 5/5/2014\n //verificamos si la varialble contiene una cadena json_\n $aux=substr($key,0,5);\n if(strpos($aux,'json_')!==false){\n //ofucasmos todas las variables que comiensen con id_\n $arreglo[$key]=$this->ofuscar_json($f); \n }\n\t\t\t } \n } \n \treturn $arreglo; \n }", "title": "" }, { "docid": "7ee953f753b89676fdca392f793b97c3", "score": "0.5126362", "text": "private function InsertTable($tabla, $array)\n\t{\n\t\t\n\t\ttry{\t\t\n\t\t\tglobal $conexionmysql;\n\t\t\t$sql= \"select * from $tabla LIMIT 1\";\t\t\n\t\t\t$recordset=$conexionmysql->Execute($sql);\t\t\t\n\t\t\t$scQuery=ereg_replace(\"\\%s\",$tabla,$recordset->connection->metaColumnsSQL);\t\n\t\t $rsdDatos=traedatosmysql($scQuery); \n\t\t\twhile(!$rsdDatos->EOF)\n\t\t\t{\n\t\t\t\t $fields[$rsdDatos->fields[\"Field\"]]=\"1\";\n\t\t\t\t $rsdDatos->MoveNext();\n\t\t\t}\t\t\t\n\t\t\t$array_int = $this->array_key_intersect($array,$fields);\t\t\n\t\t\t$insertSQL = $conexionmysql->GetInsertSQL($recordset, $array_int);\n//\t\t\techo \"el query es:\".$sql;\n//\t\t\techo \"empieza\";\t\n//\t\t\tvar_dump($array);\n//\t\t\techo \"termina\";\t\t\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\t\t\n\t\t\t$result= \"Excepcion en Insercion: \".$e->getMessage();\n\t\t\t\t\n\t\t}\t\n\t\ttry {\t\t\n\t\t\t$result=traedatosmysql($insertSQL);\t\n\t\t}\n\t\t\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$result= \"Excepcion en Insercion: \".$e->getMessage();\t\t\t\t\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "f4673558052d1dac11fda1c89fb180a8", "score": "0.512586", "text": "function obtener_descripcionxvalor($id_realiza,$idcompetencia){\n parent::conectar();\n\n /*obtener el limite */\n $sql=\"SELECT (case when LIMITES2=0 then LIMITES1 when LIMITES2!=0 then LIMITES2 END) AS LIMITE FROM `view_escalasxempresa` WHERE ID_REALIZA=$id_realiza\";\n $record_consulta=$this->obj_con->Execute($sql); \n $N=0; /* almacena el limite de la escala*/\n while(!$record_consulta->EOF){\n $N=$record_consulta->fields[\"LIMITE\"];\n $record_consulta->MoveNext();\n } \n\n $sql2=\"SELECT VALOR,DESCRIPCION FROM valoracion WHERE ID_COMPETENCIA=$idcompetencia LIMIT 0,$N\";\n $valoracion[][]=\"\";\n $i=0;\n \n \n $record_consulta2=$this->obj_con->Execute($sql2);\n $verificar = $record_consulta2->RecordCount();\n \n while(!$record_consulta2->EOF){\n $v1=$record_consulta2->fields[\"VALOR\"];\n $v2=$record_consulta2->fields[\"DESCRIPCION\"];\n $valoracion[$i][0]=$v1;\n $valoracion[$i][1]=$v2;\n $record_consulta2->MoveNext();\n $i++;\n }\n\n for($f=0;$f<$N;$f++){\n if($i!=0){\n $data1[] = array('idvalor'=>$valoracion[$f][0],'descripcion'=>$valoracion[$f][1]);\n $i--;\n }else{\n $data1[] = array('idvalor'=>($f+1),'descripcion'=>'');\n }\n }\n $repuesta = array('success'=>true,'data'=>$data1); \n\n\n\n return $repuesta;\n }", "title": "" }, { "docid": "8c61bcce2872a9e7b9a3adbefcd9fcb1", "score": "0.512284", "text": "public function Editar_datos($id) {\n $this->_validar();\n $data = $this->empresas->obtener_empresa($id);\n $datos = array();\n foreach ($data as $person) {\n $datos = array(\n 'rut_empresa' => $person->rut_empresa,\n 'nombre' => $person->nombre,\n 'rut_representante' => $person->rut_representante,\n 'nombre_representante' => $person->nombre_representante,\n 'direccion' => $person->direccion,\n 'id_comuna' => $person->id_comuna,\n 'nombre_comuna' => $this->utilidades->nombre_comuna($person->id_comuna),\n );\n }\n\n /* Nota\n * $data= $this->empresas->get_by_id($id);\n * echo json_encode($datos);\n * echo gettype($data);// No va en el codigo pero sirver para ver que formato trae\n * array_merge($data, $data2) // No sirve\n * rray_push( $data, array('jorge' => 'Hola'));// No Sirve\n * Probar con \n * $data= $this->empresas->get_by_id($id);\n $datos= json_encode($data);\n $datos.JSON_OBJECT_AS_ARRAY;\n * Para el otro codigo revisar este tema\n * toy seguro que el row hay aplicarle json_encode para poder pasarlo a un formato mas aceptable\n */\n\n//$datos=json_encode($datos);\n echo json_encode($datos);\n }", "title": "" }, { "docid": "84d61d3cb18ee6b9b06d60d0ecbb1c25", "score": "0.5121594", "text": "function setcontada_en($valor)\n {\n $this->contada_en= ($valor == '') ? 'null' : $valor;\n }", "title": "" }, { "docid": "8af6c8e980964b715b88b196b32255b4", "score": "0.5119632", "text": "public function validarDatos()\n\t\t{\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "8af6c8e980964b715b88b196b32255b4", "score": "0.5119632", "text": "public function validarDatos()\n\t\t{\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "805128b96477c06128f55d63f009cc59", "score": "0.51160985", "text": "function ARRAYdatosNota($idNota){\r\nGLOBAL $DBCFG;\r\n\r\n$idNota=secure_data($idNota);\r\n\r\n$sql=SQL(\"select\",\"notas.id as idNota, notas.tipo_nota,notas.nota,notas.lang_nota,\r\n\t\ttema.tema_id as idTema,tema.tema\r\n\t\tfrom $DBCFG[DBprefix]notas as notas,$DBCFG[DBprefix]tema as tema\r\n\t\twhere\r\n\t\tnotas.id_tema=tema.tema_id\r\n\t\tand notas.id='$idNota'\");\r\n\r\n$array=mysqli_fetch_array($sql[datos]);\r\n\r\nreturn $array;\r\n}", "title": "" }, { "docid": "62f428cb8f66abfd0384f5f356cff29e", "score": "0.511538", "text": "public function getDataWithTypeFieldAndFieldIsMultiDimensional() : void {}", "title": "" }, { "docid": "59326b17ecc1e4672e9e4bc4213b3223", "score": "0.5112641", "text": "function ARRAYIndexTema($tema_id){\r\n\r\nGLOBAL $DBCFG;\r\n\t\r\n$tema_id=secure_data($tema_id,\"sql\");\r\n\r\n$sql=SQL(\"select\",\"i.tema_id,i.indice from $DBCFG[DBprefix]indice i where i.tema_id='$tema_id'\");\t\r\n\treturn mysqli_fetch_array($sql[datos]);\r\n}", "title": "" }, { "docid": "28bbf0743cb7a066fe62c13db4436c40", "score": "0.51092577", "text": "public function updateTaskFields($array){\n // Transaction\n // First we remove all task fields from current task type\n TaskTypeField::where('task_type_id', $this->id)->delete();\n // ... then we add selected task types to project\n\n if($array != null){\n foreach($array as $id=>$value){\n Log::info($value);\n $taskTypeField = new TaskTypeField;\n $taskTypeField->task_type_id = $this->id;\n $taskTypeField->task_field_id = $value['id'];;\n $taskTypeField->row = $value['row'];\n $taskTypeField->col = $value['col'];\n $taskTypeField->index = $value['index'];\n $taskTypeField->required = 0;\n if($value['required'] == 'true')\n $taskTypeField->required = 1;\n $taskTypeField->save();\n /*\n TaskTypeField::create(['task_type_id' => $this->id, 'task_field_id' => intval ($id),\n 'row' => $value['row'], 'col' => $value['col'], 'index' => $value['index'],\n 'required' => $value['required']]);\n */\n }\n }\n //End Transactions\n }", "title": "" }, { "docid": "c10adda812696994e9438fd6bda952d1", "score": "0.51079166", "text": "function elenco_selectfield($campo,$selezionato,$filtro){\n//Utilizzata x ora solo sulla tabella per il calcolo degli oneri\n//Temporanea fino alla costruzione dell'interfaccia di gestione configurazione tabella oneri\n\n\t$tabella=$this->tabella_elenco;\n\tif (!isset($this->db)) $this->connettidb();\n\t$sql=\"select $campo from $tabella\";\n\tif (trim($filtro)){\n\t\t$filtro=\"id=\".$this->array_dati[$this->curr_record][$filtro];\n\t\t$sql.=\" where $filtro\";\n\t}\n\tif ($this->debug)\techo(\"sql=$sql\");\n\tprint_debug($sql,NULL,\"tabella\");\n\t$this->db->sql_query ($sql);\t\n\t//$elenco = $this->db->sql_fetchrowset();\n\t$elenco=$this->db->sql_fetchfield($campo);\n\tif (!$elenco){\n\t\treturn;\n\t}\n\t$ar_elenco=explode(\";\",$elenco);\n\t//echo \"array=\";print_r($ar_elenco);\n\t$nopt=count($ar_elenco)/2;\n\t$i=0;\n\twhile ($i<count($ar_elenco)){\n\t\t$desc=$ar_elenco[$i];\n\t\t$i++;\n\t\t$val=$ar_elenco[$i];\n\t\t$i++;\n\t\t($val==$selezionato)?($selected=\"selected\"):($selected=\"\");\n\t\t$retval.=\"\\n<option value=\\\"\".$val.\"\\\" $selected>\".$desc.\"</option>\";\n \t}\n\treturn $retval;\n}", "title": "" }, { "docid": "2e99a9656d4823ab9646d532a54830b4", "score": "0.51075745", "text": "public function policias($nrodoc){\n\n $dat_policia= $this->Persona_model->obt_datos_policia( $nrodoc );\n if( sizeof( $dat_policia) > 0 ){\n $this->load->view(\"paneles/personal/vista_policia\", array('poli'=>$dat_policia));\n }else{\n $err['datos']= array(\"TITULO\" => \"No se encuentra datos\", \n \"MENSAJE\" => \"No se registran datos en esta seccion\" );\n $this->load->view(\"errors/errores\", $err);\n }\n}", "title": "" }, { "docid": "b81bea26456a6b492a17f6201cf659c7", "score": "0.5107439", "text": "function cargar_dato($dato)\t\t\t\r\n {\r\n $ncampos=1;\r\n\tif($ncampos==count($dato))\r\n\t{\r\n //$this->est_codigo=$dato[0];\r\n\t $this->est_nombre=$dato[0]; \r\n\t} \r\n }", "title": "" }, { "docid": "e268b868f74bbe7c0fc066ee3c9792ad", "score": "0.51067644", "text": "function checkTableArray()\n {\n foreach ($this->arrTableParameters['answer'] as $intKey => $strValue) {\n for ($intCount = 2; $intCount <= 6; $intCount = $intCount + 2) {\n if (!$this->arrTableParameters['answer'][$intKey][$intCount]) {\n $this->arrTableParameters['answer'][$intKey][$intCount] = '';\n }\n }\n }\n }", "title": "" }, { "docid": "eab904b65694532d621921b593cd879d", "score": "0.5096626", "text": "public static function actualizar_generica($array_values){\n\t\t\t//preparo variables\n\t\t\t$tabla = \"\";\n\t\t\t$wherid=\"\";\n\t \t\t$valor_whereid=\"\";\n\t \t\t$values = \"\";\n\t \t\t$llaves = \"\";\n\t \t\t$sentencia_update = \"\";\n\t \t\t$as =0;\n\t\t\t$agregando_as=\"\";\n\t\t\tforeach(array_keys($array_values) as $key ) {//recorro el array que me envia mi json\n\t \t\t\t$as++;\n\t \t\t\tif ($key === 'table') {//obtengo tabla\n\t \t\t\t\t$tabla = $array_values[$key];\n\t \t\t\t}else if ($as===2) {//obtengo id para update\n\t \t\t\t\t$valor_whereid = $array_values[$key];\n\t \t\t\t\t$wherid= $key;\n\t \t\t\t} \n\t \t\t\telse if ($as>2) {//creo los set\n\t \t\t\t\t$llaves.=$key;\n\t\t\t\t\t$values.=\"'\".$array_values[$key].\"'\";\n\t\t\t\t\t$sentencia_update.= $key.'='.\"'\".$array_values[$key].\"'\";\n\t\t\t\t\tif ($as <count($array_values)) {\n\t\t\t\t\t\t\t$values.=\",\";\n\t\t\t\t\t\t\t$llaves.=\",\";\n\t\t\t\t\t\t\t$sentencia_update.=',';\n\t\t\t\t\t}\n\t\t\t\t\t$agregando_as.=$as;\n\t\t\t\t}\n\t \t\t}\n\n\t \t\t$sql =\"UPDATE $tabla SET $sentencia_update WHERE $wherid = '$valor_whereid'\";//String de update creada\n\t \t\t/*return array(\"1\",\"2\",$sql,$as,$agregando_as);\n\t \t\texit();*/\n\t\t\ttry {\n\t\t\t\t$comando = Conexion::getInstance()->getDb()->prepare($sql);//ejecutro la actualización\n\t \t\t$comando->execute();\n\t \t\treturn array(\"1\",array(\"Actualizado\",$sql));//retorno en caso de exito \n\t\t\t\t//echo json_encode(array(\"exito\" => $exito));\n\t\t\t} catch (Exception $e) {\n\t\t\t\treturn array(\"0\",\"Error al actualizar\",$e->getMessage(),$e->getLine(),$sql);//retorno mensajes en caso de error\n\t\t\t}\n\n\n\n\n\t\t}", "title": "" }, { "docid": "e22d352a77f734a087e5a2d86a116238", "score": "0.5090881", "text": "public function valida($valor){\n\t\t\t$res = false;\n\n\t\t\tif ($this->_tipus == \"cadena\") {\n\t\t\t\t$res = true;\n\t\t\t}\n\t\t\telse if ($this->_tipus == \"texte\") {\n\t\t\t\t$res = $this->comprovar_text($valor);\n\t\t\t}\n\t\t\telse if ($this->_tipus == \"numeric\") {\n\t\t\t\t$res = $this->comprovar_numeric($valor);\n\t\t\t}\n\t\t\telse if ($this->_tipus == \"email\") {\n\t\t\t\t$res = $this->comprovar_email($valor);\n\t\t\t}\n\t\t\telse if ($this->_tipus == \"data\") {\n\t\t\t\t$res = $this->comprovar_data($valor);\n\t\t\t}\n\t\t\telse if ($this->_tipus == \"matricula\") {\n\t\t\t\t$res = $this->comprovar_matricula($valor);\n\t\t\t}\n\t\t\telse if($this->_tipus == \"seleccio\"){\n\t\t\t\t$res = $this->comprovar_seleccio($valor);\n\t\t\t}\n\t\t\telse if($this->_tipus == \"array\"){\n\t\t\t\t$res = $this->comprovar_array($valor);\n\t\t\t}\n\t\t\treturn $res;\n\t\t}", "title": "" }, { "docid": "3a22818cb0e08fa09161ca266d06c465", "score": "0.5087091", "text": "public function setRegistro($datos)\n {\n if (!empty($datos)) {\n foreach ($datos as $field_name => $field_value) {\n if (in_array($field_name, $this->fields)) {\n $this->$field_name = ($field_value == null) ? '' : $field_value;\n }\n }\n }\n }", "title": "" }, { "docid": "fd88a1cd63fce21d972d3b0b2e3b3d26", "score": "0.5086204", "text": "function comprobar_atributos_EDIT(){\n\t$array = array();\n\t$correcto = true;\n\n\t$aux = $this->comprobar_dni();\n\tif ($aux !== true) {\n\t\t$array[0] = $aux;\n\t\t$correcto = false;\n\t}\n\n\t$aux = $this->comprobar_nombre();\n\tif ($aux !== true) {\n\t\t$array[1] = $aux;\n\t\t$correcto = false;\n\t}\n\n\t$aux = $this->comprobar_apellido();\n\tif ($aux !== true) {\n\t\t$array[2] = $aux;\n\t\t$correcto = false;\n\t}\n\n\t$aux = $this->comprobar_area();\n\tif ($aux !== true) {\n\t\t$array[3] = $aux;\n\t\t$correcto = false;\n\t}\n\t$aux = $this->comprobar_departamento();\n\tif ($aux !== true) {\n\t\t$array[4] = $aux;\n\t\t$correcto = false;\n\t}\n\n\treturn $correcto == true ? true : $array; \n}", "title": "" }, { "docid": "2c900b58e0109ba06e4ef79c2d4cfece", "score": "0.50831765", "text": "public function allowArray()\n {\n return true;\n }", "title": "" }, { "docid": "c2777219d702e83643e955f08a34aa99", "score": "0.50811553", "text": "public function accionobtenerComentarios(){\n $obJson = json_decode(file_get_contents('php://input'), true);//String JSON ----> ARRAY ASOCIATIVO\n \n \n \n \n \n \n $codPelicula = $obJson[\"codPelicula\"];\n \n $comentario = new Comentarios();\n \n $opFil[\"where\"] = \"t.cod_pelicula = \".$codPelicula;\n $comentarios = $comentario->buscarTodos($opFil);\n \n foreach ($comentarios as $clave=>$coment){\n $comentarios[$clave][\"fecha\"] = CGeneral::fechaMysqlANormal($coment[\"fecha\"]);\n \n \n $aux = valoracion_comentarios::totalValoraciones($comentarios[$clave][\"cod_comentario\"]);\n \n $comentarios[$clave][\"totalPositivos\"] = intval($aux[\"positivos\"]);\n $comentarios[$clave][\"totalNegativos\"] = intval($aux[\"negativos\"]);\n \n \n $puedeVotar = false;\n $esMio = false;\n \n \n \n if(Sistema::app()->acceso()->hayUsuario()){\n \n $codUsu = intval(Sistema::app()->ACL()->getCodUsu(Sistema::app()->acceso()->getNick()));\n \n if(empty(valoracion_comentarios::dameValoracion($comentarios[$clave][\"cod_comentario\"],$codUsu))&&\n ($codUsu!==intval($comentarios[$clave][\"cod_usuario\"])))\n $puedeVotar = true;\n \n if($codUsu===intval($comentarios[$clave][\"cod_usuario\"]))\n $esMio = true;\n \n }\n \n $comentarios[$clave][\"puedeVotar\"] = $puedeVotar;\n $comentarios[$clave][\"esMio\"] = $esMio;\n \n }\n \n \n $respuesta[\"comentarios\"] = $comentarios;\n \n \n echo json_encode($respuesta);\n \n }", "title": "" }, { "docid": "f2f2a340ddc28072b3dd394427079b6a", "score": "0.5079", "text": "public function usuarios_guardar($arrayData){\n extract($arrayData);\n \n $sql = \"INSERT INTO t_usuarios (nombres, apellidos, correo, usuario, clave, telefono, rut_pasaporte) \n VALUES ('{$nombres}', '{$apellidos}','{$correo}','{$usuario}','{$clave}','{$telefono}','{$rut_pasaporte}')\";\n $this->db->query($sql);\n //return 1;\n if ($this->db->affected_rows() > 0) {\n return 1;\n }\n else{\n return 0;\n }\n}", "title": "" }, { "docid": "72c2f9d2ebc6a121ea22ede543368de4", "score": "0.507789", "text": "function fieldsGiven(&$array){\r\n\t\tforeach ($this->formField as $key => &$field){\r\n\t\t\t/*** Look for and flag blank values ***/\r\n\t\t\tif (!isset($array[$key]) || empty($array[$key])){\r\n\t\t\t\t// $value not set or empty\r\n\t\t\t\t// if the form was submitted, they values should be set, but could be empty\r\n\t\t\t\t// check to see if we care if they are empty\r\n\t\t\t\t\r\n\t\t\t\t$field['received'] = false;\r\n\t\t\t\tunset($_SESSION[$key]);\r\n\t\t\t\tif($field['required'] === TRUE){\r\n\t\t\t\t\t// required form value not provided. Now what....\r\n\t\t\t\t\t$field['needsAttention'] = \"Required value not given\";\r\n\t\t\t\t\t$this->needsCorrection = true;\r\n\t\t\t\t}\r\n\t\t\t\telse{ // value not required\r\n\t\t\t\t\t$field['needsAttention'] = FALSE;\r\n\t\t\t\t}\r\n\t\t\t} // end if (!isset($array[$key]) || empty($array[$key]))\r\n\t\t\telse{\r\n\t\t\t\t// value received. mark formField array as such\r\n\t\t\t\t$field['received'] = TRUE;\r\n\t\t\t\t$array[$key] = trim($array[$key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tunset($field);\r\n\t\treturn;\t\t\r\n\t}", "title": "" }, { "docid": "8c0c32a945c46a16e5c5ce2c284bbe92", "score": "0.50763035", "text": "public function modificar(array $data){\n\t\t\t$class = get_class($this);\n\n\t\t\t// Solicitamos los campos del modelo\n\t\t\t$fields = $class::fields();\n\n\t\t\t// Todos los datos que queramos actualizar\n\t\t\t$updates = array();\n\n\t\t\t// Recorremos cada campo para hacer las comprobaciones\n\t\t\tforeach($fields as $colname => $default){\n\t\t\t\tif( isset($data[$colname]) && $val = trim($data[$colname]) ){\n\t\t\t\t\t$values[$colname] = \"`$colname` = '\". self::scape($val) . \"'\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( !count($values) ) throw new Exception(\"No se encuentran los indices necesarios para hacer el update de {$class}\");\n\n\t\t\t$sql = \"UPDATE \". $class::TABLE .\" SET \". implode(\",\", $values ).\" WHERE uid_$class = \". $this->getUID();\n\t\t\treturn (bool) db::get($sql);\n\t\t}", "title": "" }, { "docid": "a1b5e7cf8fa8087c885d60c16f870153", "score": "0.50733316", "text": "function consultarValores()\n\t\t{\n\t\t\t$mysqli=$this->conexionBD();\n\t\t\t$query=\"SELECT * FROM valor \";\n\t\t\t$resultado=$mysqli->query($query);\n\t\t\t if (!$resultado){\n\t\t\t\treturn 'Error en la consulta sobre la base de datos';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$toret=array();\n\t\t\t\t$i=0;\n\t\t\t\twhile ($fila= $resultado->fetch_array()) {\n\t\t\t\t\t$toret[$i]=$fila;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n return $toret;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4d16c18981da22c879c2fbda6c148539", "score": "0.50730354", "text": "public function insertarElementos($tabla, $datos){\n $claves = array();\n $valores = array();\n foreach ($datos as $clave => $valor){\n $claves[] = $clave;\n $valores[] = \"'\".$valor.\"'\"; //con esas comillas, uno de los valores guardados será '43', con comillas simples\n }\n $sql = \"INSERT INTO \".$tabla.\" (\".implode(',',$claves).\") VALUES (\".implode(',',$valores).\")\";\n //implode -> array [a],[b],[c],[d] -> implode(\"-\", array) -> string -> a-b-c-d\n //echo $sql; //me ayuda a localizar errores en la inserión\n $this->resultado = $this->conexion->query($sql);\n $res = $this->resultado;\n return $res;\n }", "title": "" }, { "docid": "0937cdc736e59229cc8ab0994eb97622", "score": "0.5071346", "text": "function getdatosItems(){\n $datos = new stdClass();\n $consulta=$_POST['_search'];\n $numero= $this->input->post('numero');\n $datos->econdicion ='ASP_ESTADO<>1';\n\t\t$user=$this->session->userdata('US_CODIGO');\n\t\t\t\t\n\t\t\t\t$datos->campoId = \"ROWNUM\";\n\t\t\t $datos->camposelect = array(\"ROWNUM\",\n\t\t\t\t\t\t\t\t\t\t\t\"ASP_SECUENCIAL\",\n\t\t\t\t\t\t\t\t\t\t\t\"ASP_FECHAINGRESO\",\n\t\t\t\t\t\t\t\t\t\t\t\"ASP_NOMBRE\",\n\t\t\t\t\t\t\t\t\t\t\t\"(ASP_NUM_TIEMPODURACION || ' dias') ASP_NUM_TIEMPODURACION\",\n\t\t\t\t\t\t\t\t\t\t\t\"ASP_OBSERVACIONES\",\n\t\t\t\t\t\t\t\t\t\t\t\"ASP_RESPONSABLE\",\n\t\t\t\t\t\t\t\t\t\t\t\"ASP_ESTADO\");\n\t\t\t $datos->campos = array( \"ROWNUM\",\n\t\t\t\t\t\t\t\t\t\t\t\"ASP_SECUENCIAL\",\n\t\t\t\t\t\t\t\t\t\t\t\"ASP_FECHAINGRESO\",\n\t\t\t\t\t\t\t\t\t\t\t\"ASP_NOMBRE\",\n\t\t\t\t\t\t\t\t\t\t\t\"ASP_NUM_TIEMPODURACION\",\n\t\t\t\t\t\t\t\t\t\t\t\"ASP_OBSERVACIONES\",\n\t\t\t\t\t\t\t\t\t\t\t\"ASP_RESPONSABLE\",\n\t\t\t\t\t\t\t\t\t\t\t\"ASP_ESTADO\");\n\t\t\t $datos->tabla=\"ASPIRANTE\";\n $datos->debug = false;\t\n return $this->jqtabla->finalizarTabla($this->jqtabla->getTabla($datos), $datos);\n }", "title": "" }, { "docid": "f4f8e19838cdcc3baef9f5e371c59868", "score": "0.5070556", "text": "public function setValoresFornecedores($iTipo, $aDados) {\n\n /**\n * Incluimos a movimentacao\n */\n $oDaoregistroMov = db_utils::getDao(\"registroprecomovimentacao\");\n $oDaoregistroMov->pc58_data = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoregistroMov->pc58_situacao = 1;\n $oDaoregistroMov->pc58_tipo = $iTipo;\n $oDaoregistroMov->pc58_usuario = db_getsession(\"DB_id_usuario\");\n $oDaoregistroMov->pc58_solicita = $this->getCodigoSolicitacao();\n $oDaoregistroMov->incluir(null);\n if ($oDaoregistroMov->erro_status == 0) {\n throw new Exception(\"Erro ao salvar Valores!\\nErro:{$oDaoregistroMov->erro_msg}\");\n }\n /**\n * Procuramos os dados do valor do orcamento\n */\n $oDaoOrcamval = db_utils::getDao(\"pcorcamval\");\n $sSqlItemOrcamVal = $oDaoOrcamval->sql_query_file(null,$aDados[0]->iItemOrcamento);\n $rsItemOrcamVal = $oDaoOrcamval->sql_record($sSqlItemOrcamVal);\n $nQuantidade = db_utils::fieldsMemory($rsItemOrcamVal, 0)->pc23_quant;\n\n\n /**\n * excluimos o valores orçados do item pelo fornecedor\n */\n $sSqlItemOrcamVal = $oDaoOrcamval->excluir(null, $aDados[0]->iItemOrcamento);\n /**\n * Procuramos todos os itens orçados do registro de preco e o desativamos.\n */\n $iCodigoItemSolicitacao = $this->getCodigoItemSolicitacaoPorOrcamento($aDados[0]->iItemOrcamento);\n foreach ($aDados as $oDados) {\n\n $oDaoRegistroPrecoValor = db_utils::getDao(\"registroprecovalores\");\n $sWhere = \"pc56_orcamitem = {$oDados->iItemOrcamento} and pc56_orcamforne = {$oDados->iItemFornecedor}\";\n\n $sSqlItem = $oDaoRegistroPrecoValor->sql_query_file(null,\"*\", null,$sWhere);\n $rsItem = $oDaoRegistroPrecoValor->sql_record($sSqlItem);\n if ($oDaoRegistroPrecoValor->numrows > 0) {\n\n $aItens = db_utils::getCollectionByRecord($rsItem);\n foreach ($aItens as $oItem) {\n\n $oDaoRegistroPrecoValor->pc56_sequencial = $oItem->pc56_sequencial;\n $oDaoRegistroPrecoValor->pc56_ativo = \"false\";\n $oDaoRegistroPrecoValor->alterar($oItem->pc56_sequencial);\n }\n }\n\n\n /**\n * Incluimos os valores novos\n */\n $oDaoOrcamval->pc23_obs = '';\n $oDaoOrcamval->pc23_orcamforne = $oDados->iItemFornecedor;\n $oDaoOrcamval->pc23_orcamitem = $oDados->iItemOrcamento;\n $oDaoOrcamval->pc23_quant = \"$nQuantidade\";\n $oDaoOrcamval->pc23_vlrun = $oDados->nValor;\n $oDaoOrcamval->pc23_valor = $oDados->nValor*$nQuantidade;\n $oDaoOrcamval->incluir($oDados->iItemFornecedor, $oDados->iItemOrcamento);\n if ($oDaoOrcamval->erro_status == 0) {\n throw new Exception(\"Erro ao salvar Valores!\\nErro:{$oDaoOrcamval->erro_msg}\");\n }\n\n /**\n * Incluimos os valores orcados do registro de preco\n */\n $oDaoRegistroPrecoValor->pc56_ativo = \"true\";\n $oDaoRegistroPrecoValor->pc56_orcamforne = $oDados->iItemFornecedor;\n $oDaoRegistroPrecoValor->pc56_orcamitem = $oDados->iItemOrcamento;\n $oDaoRegistroPrecoValor->pc56_valorunitario = $oDados->nValor;\n $oDaoRegistroPrecoValor->pc56_solicitem = $iCodigoItemSolicitacao;\n $oDaoRegistroPrecoValor->incluir(null);\n if ($oDaoRegistroPrecoValor->erro_status == 0) {\n throw new Exception(\"Erro ao salvar Valores!\\nErro:{$oDaoRegistroPrecoValor->erro_msg}\");\n }\n\n /**\n * Incluimos o itens movimentados\n */\n $oDaoRegistroMovItens = db_utils::getDao(\"registroprecomovimentacaoitens\");\n $oDaoRegistroMovItens->pc66_datainicial = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoRegistroMovItens->pc66_datafinal = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoRegistroMovItens->pc66_justificativa = $oDados->sJustificativa;\n $oDaoRegistroMovItens->pc66_pcorcamitem = $oDados->iItemOrcamento;\n $oDaoRegistroMovItens->pc66_tipomovimentacao = $oDados->iTipoMovimento;\n $oDaoRegistroMovItens->pc66_orcamforne = $oDados->iItemFornecedor;\n $oDaoRegistroMovItens->pc66_registroprecomovimentacao = $oDaoregistroMov->pc58_sequencial;\n $oDaoRegistroMovItens->pc66_solicitem = $iCodigoItemSolicitacao;\n $oDaoRegistroMovItens->incluir(null);\n if ($oDaoRegistroMovItens->erro_status == 0) {\n throw new Exception(\"Erro ao salvar Valores!\\nErro:{$oDaoRegistroMovItens->erro_msg}\");\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "56a5a731d48074979f90b8d824cc4156", "score": "0.5070419", "text": "function parametro_indice($indice){\n global $link;\n $i=0;\n $sql = \" SELECT IdParametro, Nombre, valor, comentario FROM parametro WHERE Indice=$indice AND habilitado=1\";\n $result = mysql_query($sql, $link);\n if (confirmar_consulta ($result, $sql)){\n $num = mysql_num_rows($result);\n if ($num > 0){\n\t\t\twhile ($row= mysql_fetch_array($result,MYSQL_ASSOC)){\n\t\t \t$cadena[$i]=$row;\n\t\t\t\t$i++;\n\t\t\t}\n }\n else\n $cadena=FALSE; //--- no se encontraron resultados\n }\n else{\n\t\t $cadena=FALSE;\n\t\t}\n\t\t\n\t\treturn ($cadena);\n }", "title": "" }, { "docid": "f69b73c9944f5a908df2b2ff243b8d0a", "score": "0.506989", "text": "public function unique($arr_field){\n if(!is_array($arr_field))\n return null;\n\n $query = \"select count(\".key($arr_field).\") as total from \".$this->table. \" where \".key($arr_field).\" = ? \";\n $result = $this->db->getQuery($query,$arr_field[key($arr_field)])->runQuery()->getRows(0)->total;\n if($result == 1){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "3b5c3f3ecc800f6843d82479a3c51975", "score": "0.506967", "text": "function upd_procesos_estados($array, $idpedido = \"\") {\n $res = \"\";\n $mensaje = \"\";\n $error = \"\";\n if ($idpedido <> \"\") {\n $error = 0; //HH: flag para saber si esta vacio el id\n $res = $this->db->update('pedido', $array, array('idpedido' => $idpedido));\n } else {\n $mensaje = \"Error: IdPedido esta vacio. \";\n $error = 1;\n }\n\n if (!$res) {\n if ($error === 0) {\n $msg = $this->db->_error_message();\n $num = $this->db->_error_number();\n return \"Error(\" . $num . \") \" . $msg;\n }\n if ($error === 1) {\n return $mensaje;\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "d3d57b61d574db0aca20a7b5f8f828f9", "score": "0.50626975", "text": "public function validate()\r\n {\r\n parent::validate();\r\n\r\n if (!is_array($this->varValue) || count($this->varValue) < 1) {\r\n $this->addError(sprintf($GLOBALS['TL_LANG']['tl_user']['chooseAtLeastOne'], $this->strLabel));\r\n }\r\n }", "title": "" }, { "docid": "4f9ee9e8dee257b189996c4bd87400c5", "score": "0.50561905", "text": "function set_dati($data=0,$mode=null){\n //$time_start = microtime(true);\n\n //se passo un array questo è l'array di POST altrimenti è il filtro - per default filtra su idpratica se settato\n\t\tif (is_array($data)){\t\t\n if($mode==\"list\"){\n $this->array_dati=$data;\n $this->num_record=count($data);\n $this->curr_record=0;\n }\n else{\n $this->array_dati=array(0=>$data);\n $this->num_record=1;\n $this->curr_record=0;\n }\n\t\t}\n\t\telse{\n\t\t\t$data=($data)?(\"where $data\"):(\"\");\n\t\t\t$ord='';\n\t\t\tif (isset($this->campi_ord) && $this->campi_ord) $ord= \" ORDER BY \".implode(',',$this->campi_ord);\n\t\t\tif (!isset($this->db)) $this->connettidb();\n\t\t\t$tb=$this->tabelladb;\n\t\t\t\n\t\t\t\tif (strpos($tb,\"()\") > 0) {\n\t\t\t\t\t$tb=str_replace(\"()\",\"\",$tb);\n\t\t\t\t\t$sql=\"select * from $tb($this->idpratica) $data $ord\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$sql=($this->table_list)?(\"select $this->elenco_campi,id from $this->tabelladb $data $ord\"):(\"select $this->elenco_campi,id,pratica,chk from $this->tabelladb $data $ord\");\t//aggiungo sempre il campo chk per il controllo della concorrenza\n\t\t\t//if ($_SESSION[\"USER_ID\"]==1) echo(\"<p>$sql</p>\");\n\t\t\tprint_debug($this->config_file.\"\\n\".$sql,NULL,\"tabella\");\n\t\t\tutils::debug(DEBUG_DIR.$_SESSION[\"USER_ID\"].\"_\".'tabella.debug', $sql);\n\t\t\tif ($this->db->sql_query(trim($sql))){\n\t\t\t\t$this->array_dati=$this->db->sql_fetchrowset();\n\t\t\t\t$this->num_record=$this->db->sql_numrows();\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->num_record=0;\n\t\t\t}\n /*$time_end = microtime(true);\n $time = $time_end - $time_start;\n if ($_SESSION[\"USER_ID\"]==1){\n echo \"<p>Execution of query :$sql in $time seconds</p>\";\n }*/\n $this->curr_record=0;\n\t\t\treturn $this->num_record;\t\n\t\t}\n\t}", "title": "" }, { "docid": "7d551b7b9dd78762043aa6107fe5b2b8", "score": "0.50557905", "text": "function libroValido($libro,$arrayLibros){\n\t$valido=true;\n\tfor($i=0;$i<sizeof($arrayLibros);$i++){\n\t\tif(strcmp($arrayLibros[$i][\"cod_libro\"],$libro[\"cod_libro\"])==0){\n\t\t\t$valido=false;\n\t\t}\n\t}\n\treturn $valido;\n}", "title": "" }, { "docid": "91a908f68c904579c79e8df58a5e9b1d", "score": "0.50504416", "text": "public function save( $sql , $var = array())\n{\n // verificamos si status no esta vacia\n if (is_null($var))\n {\n\n $this->consulta = mysql_query($sql,self::conectar());//errores de sintaxis\n //self::verificador($this->consulta); \n if($this->consulta){return true;}else{return false;}\n }\n else\n { \n $sQ = \"SELECT * FROM $var[0] WHERE $var[1] = '$var[2]' LIMIT 1\";\n $sq = explode(',',$sQ);\n $sql2 = implode($sq);\n $consulta = mysql_query($sql2 ,self::conectar());\n\n if(mysql_num_rows($consulta ) > 0)\n { \n return null; //si el nombre esta registrado\n }\n else{\n\n $this->consulta = mysql_query($sql,self::conectar());\n // or die(mysql_error());//errores de sintaxis\n if($this->consulta){return true;}else{return false;}//si se registro corectamente \n \n }\n }//llave de else\n}", "title": "" }, { "docid": "8cdc342db8fba969b54836de3f5c0d62", "score": "0.5049443", "text": "function extraField($registro){\t\n\t\t$this->db->where('codigo', $registro['codigo']);\n\t\t$this->db->update($this->_tablename, $registro);\n\t}", "title": "" } ]
f389f21fad5a5baaf7069d957b90771d
Hide the current custom keyboard and display the default letterkeyboard. $params = [ 'hide_keyboard' => true, 'selective' => false, ];
[ { "docid": "2adcfaaec40258d93c502039544b16d8", "score": "0.65650177", "text": "public static function hide(array $params = [])\n {\n return new static(array_merge(['hide_keyboard' => true, 'selective' => false], $params));\n }", "title": "" } ]
[ { "docid": "37b28538401cf38a24f7f87d1b72b16c", "score": "0.601139", "text": "public static function replyKeyboardHide($selective = false)\n {\n $remove_keyboard = true;\n return json_encode(compact('remove_keyboard', 'selective'));\n }", "title": "" }, { "docid": "9549d9769eba4fddc21218248fa25deb", "score": "0.56446874", "text": "public function setKeyboard(bool $keyboard): void\n {\n $this->keyboard = $keyboard;\n }", "title": "" }, { "docid": "c0e9e5621e5c61e97b41043fa4f97478", "score": "0.5321954", "text": "public static function hiddenEditor()\n {\n global $kbHiddenEditorCalled;\n\n if (!$kbHiddenEditorCalled) {\n wp_enqueue_editor();\n /** @var JSONTransport $jsonTransport */\n $jsonTransport = Kontentblocks()->getService('utility.jsontransport');\n $jsonTransport->registerData('tinymce', 'settings', self::editorDefaultSettings());\n\n echo \"<div style='display: none;'>\";\n self::editor('ghost', '', 'ghost', true, array('tinymce' => array('wp_skip_init' => false)));\n echo '</div>';\n }\n\n // make sure to no call this twice\n $kbHiddenEditorCalled = true;\n }", "title": "" }, { "docid": "260b7f10496ee8107fb802766b97d637", "score": "0.52481633", "text": "public function __construct(bool $Selective = false){\n $this->Markup['remove_keyboard'] = true;\n $this->Markup['selective'] = $Selective;\n }", "title": "" }, { "docid": "90a3006bbe7fd2befd6d446d4e1280d1", "score": "0.52382773", "text": "public function displayKeyboard()\n {\n return $this->keyBoard->display();\n }", "title": "" }, { "docid": "6e9c88a4bca02ad5b122ed3587387791", "score": "0.5205154", "text": "public function hide() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6e9c88a4bca02ad5b122ed3587387791", "score": "0.5205154", "text": "public function hide() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "214b82ab9e9d282362032b0cc8ff18ef", "score": "0.5106043", "text": "public function displayKeyboard()\n {\n $firstRow = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'];\n $secondRow = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l'];\n $thirdRow = ['z', 'x', 'c', 'v', 'b', 'n', 'm'];\n\n $html = '<form id=\"keyboard\" method=\"post\" action=\"play.php\">\n <input class=\"text\" type=text id=key name=key value=\"\" hidden/>\n <div id=\"qwerty\" class=\"section\">\n <div class=\"keyrow\">';\n foreach ($firstRow as $key) {\n $html .= $this->updateKeyboard($key);\n }\n\n $html .= '</div>';\n\n $html .= '<div class=\"keyrow\">';\n\n foreach ($secondRow as $key) {\n $html .= $this->updateKeyboard($key);\n }\n $html .= '</div>';\n\n $html .= '<div class=\"keyrow\">';\n\n foreach ($thirdRow as $key) {\n $html .= $this->updateKeyboard($key);\n }\n\n $html .= '</div></div></form>';\n\n return $html;\n\n }", "title": "" }, { "docid": "e57272b4d95dddf42c082b65c41b54f1", "score": "0.51040375", "text": "function mb_unhide_kitchensink( $args ) {\n\t$args['wordpress_adv_hidden'] = false;\n\treturn $args;\n}", "title": "" }, { "docid": "1755fa2b31722238b45e892b25a93413", "score": "0.5103317", "text": "public function displayKeyboard()\n{//update per step 10, now that key handling method created internal function used to display each keyboard letter\n $output = \"\";\n $output .= \"<form method='post' action='play.php'>\";\n $output .= \"<div id='qwerty' class='section'>\";\n $output .= \"<div class='keyrow'>\";\n $output .= $this->keyPress('q');\n $output .= $this->keyPress('w');\n $output .= $this->keyPress('e');\n $output .= $this->keyPress('r');\n $output .= $this->keyPress('t');\n $output .= $this->keyPress('y');\n $output .= $this->keyPress('u');\n $output .= $this->keyPress('i');\n $output .= $this->keyPress('o');\n $output .= $this->keyPress('p');\n $output .= \"</div>\";\n $output .= \"<div class='keyrow'>\";\n $output .= $this->keyPress('a');\n $output .= $this->keyPress('s');\n $output .= $this->keyPress('d');\n $output .= $this->keyPress('f');\n $output .= $this->keyPress('g');\n $output .= $this->keyPress('h');\n $output .= $this->keyPress('j');\n $output .= $this->keyPress('k');\n $output .= $this->keyPress('l');\n $output .= \"</div>\";\n $output .= \"<div class='keyrow'>\";\n $output .= $this->keyPress('z');\n $output .= $this->keyPress('x');\n $output .= $this->keyPress('c');\n $output .= $this->keyPress('v');\n $output .= $this->keyPress('b');\n $output .= $this->keyPress('n');\n $output .= $this->keyPress('m');\n $output .= \"</div>\";\n $output .= \"</div>\";\n $output .= \"</form>\";\n return $output;\n//original code below used for testing\n /*$this->html = \"<form method= 'POST' action='play.php'>\";\n $this->html .= '<div id=\"qwerty\" class=\"section\">';\n $this->html .= '<div class=\"keyrow\">';\n $this->html .= '<button name=\"key\" value=\"q\" class=\"key\">q</button>';\n $this->html .= '<button name=\"key\" value=\"w\" class=\"key\">w</button>';\n $this->html .= '<button name=\"key\" value=\"e\" class=\"key\">e</button>';\n $this->html .= '<button name=\"key\" value=\"r\" class=\"key\">r</button>';\n $this->html .= '<button name=\"key\" value=\"t\" class=\"key\" style=\"background-color: red\" disabled>t</button>';\n $this->html .= '<button name=\"key\" value=\"y\" class=\"key\">y</button>';\n $this->html .= '<button name=\"key\" value=\"u\" class=\"key\">u</button>';\n $this->html .= '<button name=\"key\" value=\"i\" class=\"key\">i</button>';\n $this->html .= '<button name=\"key\" value=\"o\" class=\"key\">o</button>';\n $this->html .= '<button name=\"key\" value=\"p\" class=\"key\">p</button>';\n $this->html .= '</div>';\n\n $this->html .= '<div class=\"keyrow\">';\n $this->html .= '<button name=\"key\" value=\"a\" class=\"key\">a</button>';\n $this->html .= '<button name=\"key\" value=\"s\" class=\"key\">s</button>';\n $this->html .= '<button name=\"key\" value=\"d\" class=\"key\">d</button>';\n $this->html .= '<button name=\"key\" value=\"f\" class=\"key\">f</button>';\n $this->html .= '<button name=\"key\" value=\"g\" class=\"key\">g</button>';\n $this->html .= '<button name=\"key\" value=\"h\" class=\"key\">h</button>';\n $this->html .= '<button name=\"key\" value=\"j\" class=\"key\">j</button>';\n $this->html .= '<button name=\"key\" value=\"k\" class=\"key\">k</button>';\n $this->html .= '<button name=\"key\" value=\"l\" class=\"key\">l</button>';\n $this->html .= '</div>';\n\n $this->html .= '<div class=\"keyrow\">';\n $this->html .= '<button name=\"key\" value=\"z\" class=\"key\">z</button>';\n $this->html .= '<button name=\"key\" value=\"x\" class=\"key\">x</button>';\n $this->html .= '<button name=\"key\" value=\"c\" class=\"key\">c</button>';\n $this->html .= '<button name=\"key\" value=\"v\" class=\"key\">v</button>';\n $this->html .= '<button name=\"key\" value=\"b\" class=\"key\">b</button>';\n $this->html .= '<button name=\"key\" value=\"n\" class=\"key\">n</button>';\n $this->html .= '<button name=\"key\" value=\"m\" class=\"key\">m</button>';\n $this->html .= '</div>';\n $this->html .= '</div>';\n $this->html .= '</form>';\n return $this->html;*/\n}", "title": "" }, { "docid": "bc6d8ebc8acbc227cc7c6b4314aece98", "score": "0.50280505", "text": "public function hide()\n {\n }", "title": "" }, { "docid": "1a6def8d93bf1d01f55db451de35e718", "score": "0.5016252", "text": "function displayKeyboard(){\n $selectedVar = $this->phrase->flattensArray();\n $keyRow1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'];\n $keyRow2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l'];\n $keyRow3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm'];\n \n \n //splits the phrase into an array.\n $aryPhrase = str_split($this->phrase->currentPhrase); \n \n $keyboard = '\n <form action=\"play.php\" method=\"post\">\n <div id=\"qwerty\" class=\"section\">\n <div class=\"keyrow\">';\n \n foreach($keyRow1 as $key){\n \n if (in_array($key, $selectedVar) && !in_array($key, $aryPhrase))\n { \n $keyboard .= '<input class=\"key incorrect\" id=\"' . $key . '\" type=\"submit\" name=\"letter\" value=\"' . $key . '\" disabled>';\n } else if(in_array($key, $selectedVar) && in_array($key, $aryPhrase)) {\n $keyboard .= '<input class=\"key correct\" id=\"' . $key . '\" type=\"submit\" name=\"' . $key . '\" value=\"' . $key . '\" disabled>';\n } else {\n $keyboard .= '<input class=\"key\" id=\"' . $key . '\" type=\"submit\" name=\"letter\" value=\"' . $key . '\">';\n }\n \n };\n\n $keyboard .= '</div><div class=\"keyrow\">';\n \n foreach($keyRow2 as $key){\n \n if (in_array($key, $selectedVar) && !in_array($key, $aryPhrase))\n { \n $keyboard .= '<input class=\"key incorrect\" id=\"' . $key . '\" type=\"submit\" name=\"' . $key . '\" value=\"' . $key . '\" disabled>';\n } else if(in_array($key, $selectedVar) && in_array($key, $aryPhrase)) {\n $keyboard .= '<input class=\"key correct\" id=\"' . $key . '\" type=\"submit\" name=\"' . $key . '\" value=\"' . $key . '\" disabled>';\n } else {\n $keyboard .= '<input class=\"key\" id=\"' . $key . '\" type=\"submit\" name=\"' . $key . '\" value=\"' . $key . '\">';\n }\n };\n \n $keyboard .= '</div><div class=\"keyrow\">';\n \n foreach($keyRow3 as $key){\n \n if (in_array($key, $selectedVar) && !in_array($key, $aryPhrase))\n { \n $keyboard .= '<input class=\"key incorrect\" id=\"' . $key . '\" type=\"submit\" name=\"' . $key . '\" value=\"' . $key . '\" disabled>';\n } else if(in_array($key, $selectedVar) && in_array($key, $aryPhrase)) {\n $keyboard .= '<input class=\"key correct\" id=\"' . $key . '\" type=\"submit\" name=\"' . $key . '\" value=\"' . $key . '\" disabled>';\n } else {\n $keyboard .= '<input class=\"key\" id=\"' . $key . '\" type=\"submit\" name=\"' . $key . '\" value=\"' . $key . '\">';\n }\n };\n \n $keyboard .= '</div></div></form>';\n \n return $keyboard;\n }", "title": "" }, { "docid": "5bd4d4b40e99a338594e5a222f5428c1", "score": "0.4999413", "text": "function keyboard_shortcut($atts, $content = null)\n{\n\n\n return '<kbd>' . do_shortcode($content) . '</kbd>';\n\n}", "title": "" }, { "docid": "071e3511a354b384869c3d875a52d1c4", "score": "0.4978536", "text": "public function set_symbols_keyboard (array $symbols_keyboard) {\n $this->symbols_keyboard = $symbols_keyboard;\n }", "title": "" }, { "docid": "2511ba46030f3198e5c887c59caff7af", "score": "0.49017024", "text": "public function hide();", "title": "" }, { "docid": "2511ba46030f3198e5c887c59caff7af", "score": "0.49017024", "text": "public function hide();", "title": "" }, { "docid": "a5bb98110555e1f293d3cd86cec196fe", "score": "0.4889323", "text": "function mainkeyboard($bot_token,$chat_iD,$replY,$a,$b){\n $option = [\n [$a]\n , [$b]\n //, [''\n //, '']\n //nameunicode\n ];\n // Get the keyboard\n \n $telegram = new Telegram($bot_token);\n $keyb = $telegram->buildKeyBoard($option);\n $content = ['chat_id' => $chat_iD, 'reply_markup' => $keyb, 'text' => $replY]; \n $telegram->sendMessage($content);\n}", "title": "" }, { "docid": "a16ad8ba8a71ff8616c0e928b667f8d3", "score": "0.4879082", "text": "function mgad_unhide_kitchensink( $args ) {\n\t$args['wordpress_adv_hidden'] = false;\n\treturn $args;\n}", "title": "" }, { "docid": "f715df7cc606d78a1affca8636b9e1aa", "score": "0.48396713", "text": "function unhide_kitchensink( $args ) {\n\t$args['wordpress_adv_hidden'] = false;\n\treturn $args;\n}", "title": "" }, { "docid": "84e5f95e9980e3aeb3b37a72a0791629", "score": "0.47743237", "text": "function unhide_kitchensink( $args ) {\n\t\t$args['wordpress_adv_hidden'] = false;\n\t\treturn $args;\n\t}", "title": "" }, { "docid": "5f25e37eb920a23cb28a147cfba01188", "score": "0.47735694", "text": "function wp_keyboad_actions() {\r\n add_options_page(\"Keyboard actions\", \"Keyboard actions\", \"edit_pages\", \"wp_keyboad_actions\", \"wp_keyboad_admin\");\r\n}", "title": "" }, { "docid": "8d74f296f4199d489ee66fd9192ae4e2", "score": "0.4729498", "text": "function wp_keyboard_load_javascript() {\r\n $wp_keyboard_next = get_option('wp_keyboard_next');\r\n $wp_keyboard_previous = get_option('wp_keyboard_previous');\r\n $wp_keyboard_index = get_option('wp_keyboard_index');\r\n $wp_keyboard_open = get_option('wp_keyboard_open');\r\n $wp_keyboard_enable_slide = get_option('wp_keyboard_enable_slide');\r\n $wp_keyboard_scrollspeed = get_option('wp_keyboard_scrollspeed');\r\n $wp_keyboard_enable_border = get_option('wp_keyboard_enable_border');\r\n $wp_keyboard_border_color = get_option('wp_keyboard_border_color');\r\n?>\r\n<?php \r\n/*\r\n * Set the slider speed\r\n */\r\nif($wp_keyboard_enable_slide==\"on\") {\r\n\tif($wp_keyboard_scrollspeed<>\"\"){\r\n\t\t$speed=$wp_keyboard_scrollspeed;\r\n\t}else{\r\n\t\t$speed=0;\r\n\t}\r\n}else{\r\n\t$speed=0;\r\n}\r\n/*\r\n * Set the color, default #cccccc\r\n */\r\nif($wp_keyboard_border_color==\"\"){\r\n\t$wp_keyboard_border_color=\"#cccccc\";\r\n} \r\n/*\r\n * Enable / disbale border\r\n */\r\nif($wp_keyboard_enable_border==\"\"){\r\n\t$bordersize = \"0px\";\r\n\t$paddingsize = \"0px\";\r\n}else{\r\n\t$bordersize = \"3px\";\r\n\t$paddingsize = \"5px\";\r\n}\r\n?>\r\n<!-- The following script checks if jquery is available -->\r\n<script type=\"text/javascript\">\r\n\tif (jQuery) { \r\n\t\t/*\r\n\t\t * Jquery is loaded!\r\n\t\t */\r\n\t\t jQuery(document).ready(function(){\r\n\t\t\tjQuery(document).scroll(function() {\r\n\t\t\t\tvar cutoff = jQuery(window).scrollTop();\r\n\t\t\t\tjQuery('.post').removeClass('top').each(function() {\r\n\t\t\t\t\tif (jQuery(this).offset().top > cutoff) {\r\n\t\t\t\t\t\tjQuery(this).addClass('top');\r\n\t\t\t\t\t\treturn false; // stops the iteration after the first one on screen\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\tjQuery(document).keypress(function(event) {\r\n\t\t\t\t<?php if($wp_keyboard_open==\"on\") {?>\r\n\t\t\t\t\tif ( event.which == 111 ) {\r\n\t\t\t\t\t\tif(jQuery(\".post.scrolled:last a\").length > 0){\r\n\t\t\t\t\t\t\tvar url = jQuery(\".post.scrolled:last a\").attr('href');\r\n\t\t\t\t\t\t\twindow.location = url; // redirect\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t<?php } ?>\r\n\t\t\t\t<?php if($wp_keyboard_index==\"on\") {?>\r\n\t\t\t\t\tif ( event.which == 116 ) {\r\n\t\t\t\t\t\tjQuery(\"html, body\").animate({scrollTop: 0}, <?php echo $speed; ?>);\r\n\t\t\t\t\t\tjQuery(\".post.scrolled\").each(function(){\r\n\t\t\t\t\t\t\tjQuery(this).removeClass('scrolled');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t<?php } ?>\r\n\t\t\t\t<?php if($wp_keyboard_next==\"on\") {?>\r\n\t\t\t\t\tif ( event.which == 106 ) {\r\n\t\t\t\t\t\tif(jQuery(\".post.scrolled\").length > 0){\r\n\t\t\t\t\t\t\tjQuery(\".bordered\").removeClass('.bordered').css({\r\n\t\t\t\t\t\t\t\t\"border-left\": \"none\",\r\n\t\t\t\t\t\t\t\t\"padding-left\": \"none\"\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tjQuery(\"html, body\").animate({scrollTop: jQuery(\".post.scrolled:last\").next('.post').offset().top}, <?php echo $speed; ?>);\r\n\t\t\t\t\t\t\tjQuery(\".post.scrolled:last\").next('.post').addClass('scrolled');\r\n\t\t\t\t\t\t\tjQuery(\".post.scrolled:last .entry-content\").addClass('bordered').css({ \r\n\t\t\t\t\t\t\t\t\"border-left\": \"<?php echo $bordersize; ?> solid <?php echo $wp_keyboard_border_color; ?>\",\r\n\t\t\t\t\t\t\t\t\"padding-left\": \"<?php echo $paddingsize; ?>\"\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else if(jQuery('.post.top').length > 0 && jQuery('.post').length != 1){\r\n\t\t\t\t\t\t\tjQuery(\"html, body\").animate({scrollTop: jQuery(\".post.top:not(.scrolled)\").offset().top}, <?php echo $speed; ?>);\r\n\t\t\t\t\t\t\tjQuery(\".post.top:first\").addClass('scrolled');\r\n\t\t\t\t\t\t\tjQuery(\".post.top.scrolled:first\").prevAll().addClass('scrolled');\r\n\t\t\t\t\t\t\tjQuery(\".post.top.scrolled:first .entry-content\").addClass('bordered').css({ \r\n\t\t\t\t\t\t\t\t\"border-left\": \"<?php echo $bordersize; ?> solid <?php echo $wp_keyboard_border_color; ?>\",\r\n\t\t\t\t\t\t\t\t\"padding-left\": \"<?php echo $paddingsize; ?>\"\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}else if(jQuery('.post').length != 1){\r\n\t\t\t\t\t\t\tjQuery(\"html, body\").animate({scrollTop: jQuery(\".post:not(.scrolled)\").offset().top}, <?php echo $speed; ?>);\r\n\t\t\t\t\t\t\tjQuery(\".post:first\").addClass('scrolled');\r\n\t\t\t\t\t\t\tjQuery(\".post.scrolled:first .entry-content\").addClass('bordered').css({ \r\n\t\t\t\t\t\t\t\t\"border-left\": \"<?php echo $bordersize; ?> solid <?php echo $wp_keyboard_border_color; ?>\",\r\n\t\t\t\t\t\t\t\t\"padding-left\": \"<?php echo $paddingsize; ?>\"\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<?php } ?>\r\n\t\t\t\t<?php if($wp_keyboard_next==\"on\") {?>\r\n\t\t\t\t\tif (event.which == 107 ) {\r\n\t\t\t\t\t\tif(jQuery(\".post.scrolled\").length > 0){\r\n\t\t\t\t\t\t\tjQuery(\".bordered\").removeClass('.bordered').css({\r\n\t\t\t\t\t\t\t\t\"border-left\": \"none\",\r\n\t\t\t\t\t\t\t\t\"padding-left\": \"none\"\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tjQuery(\"html, body\").animate({scrollTop: jQuery(\".post.scrolled:last\").prev('.post.scrolled').offset().top}, <?php echo $speed; ?>);\r\n\t\t\t\t\t\t\tjQuery(\".post.scrolled:last\").removeClass('scrolled');\r\n\t\t\t\t\t\t\tjQuery(\".post.scrolled:last .entry-content\").addClass('bordered').css({ \r\n\t\t\t\t\t\t\t\t\"border-left\": \"<?php echo $bordersize; ?> solid <?php echo $wp_keyboard_border_color; ?>\",\r\n\t\t\t\t\t\t\t\t\"padding-left\": \"<?php echo $paddingsize; ?>\"\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<?php } ?>\r\n\t\t\t});\r\n\t\t });\r\n\t}\r\n</script>\r\n<?php\r\n}", "title": "" }, { "docid": "ed704fda73a9d6d63c11a05cdda3c3fc", "score": "0.47199237", "text": "public static function deactivate_clear_mode()\n {\n self::$m_clear_mode = false;\n }", "title": "" }, { "docid": "d55855ae26930833c10d0ce1f1b51d72", "score": "0.46907306", "text": "public function ShowSwitchView()\n {\n return false;\n }", "title": "" }, { "docid": "8c7b0418f99ae664adcf32203d1ca30e", "score": "0.466906", "text": "public function isKeyboard(): bool\n {\n return $this->keyboard;\n }", "title": "" }, { "docid": "cca89cca9d91d48668d26a6b7bc5313e", "score": "0.46649677", "text": "static function deactivate()\n {\n if (class_exists('\\C_Photocrati_Installer'))\n \\C_Photocrati_Installer::uninstall('ngg-customdisplay');\n }", "title": "" }, { "docid": "02f8125e572b8d1007410e3aa64d1894", "score": "0.46601096", "text": "function hide_editor() {\n\t\t$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;\n\t\tif( !isset( $post_id ) ) return;\n\n\t\t// Hide the editor on a page with a specific page template\n\t\t// Get the name of the Page Template file.\n\t\t$template_file = substr( get_page_template(), strrpos( get_page_template(), '/' ) + 1 );\n\t\tif($template_file == 'page-pray-with-us.php'){ // the filename of the page template\n\t\t\tremove_post_type_support('page', 'editor');\n\t\t}\n\t}", "title": "" }, { "docid": "4a50204a28fb71df533918dddf7ecf49", "score": "0.4649981", "text": "function showInput()\n {\n $config = Package::getByHandle('in_recaptcha')->getConfig();\n\n switch ($config->get('captcha.type')) {\n case 'v2' :\n $this->showV2();\n break;\n case 'invisible' :\n $this->showInvisible();\n break;\n }\n\n }", "title": "" }, { "docid": "0b6a3b4750efe096c210c5464223472a", "score": "0.46264857", "text": "public function isFullScreenSupported() { return false; }", "title": "" }, { "docid": "5bae4356c707c71b3b5db227563354a1", "score": "0.46237707", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "7ea097a6e028a3c7ec18eda146d8bd20", "score": "0.462236", "text": "public function setThirdPartyKeyboardsBlocked(?bool $value): void {\n $this->getBackingStore()->set('thirdPartyKeyboardsBlocked', $value);\n }", "title": "" }, { "docid": "c9008fa1fef5d483de79211992070b61", "score": "0.4590112", "text": "public function get_symbols_keyboard() {\n return $this->symbols_keyboard;\n }", "title": "" }, { "docid": "8cd65afc83301ec871d3ee9c79ec3453", "score": "0.45890123", "text": "public function deactivate_view()\n {\n $this->get_module_request()\n ->get_navbar()\n ->hide_all_buttons();\n $this->get_module_request()\n ->get_navbar()\n ->deactivate_all_buttons();\n $this->get_module_request()\n ->get_template()\n ->assign('bShowCommentary', false);\n }", "title": "" }, { "docid": "6aea5048e1bf31bc9fdba2aa05c686d9", "score": "0.45853317", "text": "public function removeReplyKeyboard(): self\n {\n $this->params['reply_markup'] = json_encode(['remove_keyboard' => true]);\n\n return $this;\n }", "title": "" }, { "docid": "c77c69c375589068d00127faa7850d60", "score": "0.4563869", "text": "function deactivate()\n {\n }", "title": "" }, { "docid": "f81912d51b1ee34d08b33d8d785a872e", "score": "0.45437852", "text": "static function deactivate() {\r\n delete_option(WF_SN_OPTIONS_KEY);\r\n }", "title": "" }, { "docid": "32f0d3f7672a7368aa0a29013b6fabda", "score": "0.4531124", "text": "function keyboard_output($input){\n\t\techo \"\\t\\t<div class='keyboard'>\\n\";\n\t\tfor ($i=0;$i<strlen($input);$i++){\n\t\t\techo \"\\t\\t\\t<div class='letter'>\" . $input[$i] . \"</div>\\n\";\n\t\t}\n\t\techo \"\\t\\t\\t<div class='clear'></div>\\n\\t\\t</div>\\n\";\n\t}", "title": "" }, { "docid": "741852249151bd6c9adfa0d35efd45c0", "score": "0.45290974", "text": "function setHidden()\r\n {\r\n $this->_hidden = true;\r\n }", "title": "" }, { "docid": "ca054201a70e68b26e83e1816cf39c7d", "score": "0.45146972", "text": "function fieldHidden()\n {\n htmlp_form_hidden($this->name, $this->default);\n }", "title": "" }, { "docid": "9fb998945d286c79b7271e98473a5981", "score": "0.4507536", "text": "function wcvv_hide_meta_keys_from_dashboard( $hidden_keys ) {\n\t$hidden_keys[] = '_wcvv_base_price';\n\t$hidden_keys[] = '_wcvv_total_price';\n\t$hidden_keys[] = '_wcvv_features';\n\treturn $hidden_keys;\n}", "title": "" }, { "docid": "c757030b65235859dcf45de4e864dfbd", "score": "0.45016643", "text": "public function isDisplayChangeSupported() { return false; }", "title": "" }, { "docid": "9f3041c4440ffe8c0de5bbbd04486ab3", "score": "0.44959426", "text": "function hide_editor() {\n\t$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;\n\tif( !isset( $post_id ) ) return;\n\n\t// Hide the editor on a page with a specific page template\n\t// Get the name of the Page Template file.\n\t$template_file = get_post_meta($post_id, '_wp_page_template', true);\n\t//var_dump($template_file);\n\tif( $template_file == 'front-page.php' ){ // the filename of the page template\n\t\tremove_post_type_support('page','editor');\n\t}\n}", "title": "" }, { "docid": "db760de18c035cfdbaf62217cea5b8d2", "score": "0.44860438", "text": "private function askForKey()\n {\n $data['view'] = \"login/select_nocharacter_v\";\n $data['no_header'] = 1;\n $data['SESSION'] = $_SESSION; // not part of MY_Controller\n buildMessage('error', Msg::LOGIN_NO_CHARS);\n $this->twig->display('main/_template_v', $data);\n }", "title": "" }, { "docid": "33824e0d0074b9a565cd14039585ca0f", "score": "0.44787738", "text": "public function isHidden()\r\n {\r\n return false;\r\n }", "title": "" }, { "docid": "33824e0d0074b9a565cd14039585ca0f", "score": "0.44787738", "text": "public function isHidden()\r\n {\r\n return false;\r\n }", "title": "" }, { "docid": "4945dcd71c2cfd1ac92df05058fbb9b6", "score": "0.44742557", "text": "function peek($board) {\n $board->displayBoard();\n readline('Press Enter to hide board:');\n Board::clear_terminal();\n}", "title": "" }, { "docid": "c31898ab2f68a9aee86477a1aa87a9be", "score": "0.44740778", "text": "public function hide($hidden = true)\n {\n system('stty ' . ($hidden ? '-echo' : 'echo'));\n }", "title": "" }, { "docid": "de2b44cab58b15886b57503e808cde44", "score": "0.44723895", "text": "public function IsHidden()\n {\n return true;\n }", "title": "" }, { "docid": "e1864d33c3360872052af86d9ec8ff52", "score": "0.44695544", "text": "function wp_keyboad_admin() {\r\n include('wp_keyboard_admin.php');\r\n}", "title": "" }, { "docid": "474b2217f135237286af471c5050ce46", "score": "0.44603047", "text": "function optinforms_form3_hide_name_field() {\r\n\tglobal $optinforms_form3_hide_name_field;\r\n\treturn $optinforms_form3_hide_name_field;\r\n}", "title": "" }, { "docid": "19770e0d3dbf34bffd09d0c882510857", "score": "0.4446474", "text": "function hide_help() {\n\t\techo '<style type=\"text/css\">\n\t\t\t\t#contextual-help-link-wrap, #welcome-panel { display: none !important; }\n\t\t\t </style>';\n\t}", "title": "" }, { "docid": "2fb4913e90b743e4c94d2cbd8196e2e0", "score": "0.4446257", "text": "function deactivate() {\n\n }", "title": "" }, { "docid": "2c8c0a95f433da08b2946bea8be8efc4", "score": "0.44307804", "text": "function deactivate() {\n\n}", "title": "" }, { "docid": "2c8c0a95f433da08b2946bea8be8efc4", "score": "0.44307804", "text": "function deactivate() {\n\n}", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "a3be2c41658980a7826168dccec47002", "score": "0.44193736", "text": "public function isHidden()\n {\n return false;\n }", "title": "" }, { "docid": "3d9f5fe18fe4a4a1094b1faa00b68e30", "score": "0.43936837", "text": "function displayHideBt($state) {\n\t\t$this->displayhidebt = $state;\n\t\t$this->displayhideallbt = $state;\n\n\t}", "title": "" }, { "docid": "a423dd64e88a569f1f6657662b7efa4b", "score": "0.438872", "text": "public static function deactivate ()\n\t\t\t\t\t{\n\t\t\t\t\t\tdo_action (\"ws_widget__ad_codes_before_deactivation\", get_defined_vars ());\n\t\t\t\t\t\t/**/\n\t\t\t\t\t\tif ($GLOBALS[\"WS_WIDGET__\"][\"ad_codes\"][\"o\"][\"run_deactivation_routines\"])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdelete_option (\"ws_widget__ad_codes_configured\");\n\t\t\t\t\t\t\t\tdelete_option (\"ws_widget__ad_codes_notices\");\n\t\t\t\t\t\t\t\tdelete_option (\"ws_widget__ad_codes_options\");\n\t\t\t\t\t\t\t\tdelete_option (\"widget_ws_widget__ad_codes\");\n\t\t\t\t\t\t\t\tdelete_option (\"ws_widget__ad_codes\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/**/\n\t\t\t\t\t\tdo_action (\"ws_widget__ad_codes_after_deactivation\", get_defined_vars ());\n\t\t\t\t\t\t/**/\n\t\t\t\t\t\treturn; /* Return for uniformity. */\n\t\t\t\t\t}", "title": "" }, { "docid": "0b00366b429b64fc691fc3e9a83e78c7", "score": "0.43829954", "text": "final protected function Hide() {\n $this->status = BoxModel::STATUS_HIDDEN;\n }", "title": "" }, { "docid": "31c8591fbb302ba907f287e3bb1da777", "score": "0.4371369", "text": "public function focus()\n\t{\n\t\tthrow new TNotSupportedException('hiddenfield_focus_unsupported');\n\t}", "title": "" }, { "docid": "18fc9c6eb7c9ed52fa8661633b84f796", "score": "0.43602842", "text": "public function isHidden() {\n return false;\n }", "title": "" }, { "docid": "1b28e07d4b4897c335cdb7116b9c4b40", "score": "0.43554518", "text": "public function disable() {\n\t\t// Removes itself from the event queue\n\t\tEvent::clear('system.display', array($this, 'render'));\n\t}", "title": "" }, { "docid": "44b740b37ba148dade86b3d85e26f36a", "score": "0.4348599", "text": "function aheto_kit_auto_deactivate() {\n\tdeactivate_plugins( plugin_basename( __FILE__ ) );\n\tif ( isset( $_GET['activate'] ) ) {\n\t\tunset( $_GET['activate'] );\n\t}\n}", "title": "" }, { "docid": "0b495f6945b70dd57147eea0a2546b8c", "score": "0.43476278", "text": "function hide($bool)\n\t{\n\t\tif($bool) return 'hide';\n\t\treturn '';\n\t}", "title": "" }, { "docid": "071d065d8a28c84bd4912ed5914e1ef8", "score": "0.4342598", "text": "function printNonEditable($key) {\n\techo \"<div class='form-group'>\";\n\techo \"<label class='inputdefault'>\".$key.\"</label>\";\n\techo \"<input class='form-control' type='text' name='\".$key.\"' value='\".$_POST[$key].\"' readonly>\";\n\techo \"</div>\";\n}", "title": "" }, { "docid": "42c181d82b9a71930751d854c77c8814", "score": "0.43379602", "text": "public function __construct(...$params)\n {\n $this->value = isset($params[0]) && is_numeric($params[0]) && in_array($params[0], self::KEYS) ? $params[0] : self::KEY_UNDEFINED;\n parent::__construct(self::EVENT_KEYBOARD);\n }", "title": "" }, { "docid": "bf5b74212a108d2ca80dacd292a7be79", "score": "0.4334532", "text": "function deactivate() {\n\t\t}", "title": "" }, { "docid": "1fbc16598a8938c873f01429a415d643", "score": "0.4334089", "text": "function hideMsg()\n\t{\n\t\tjexit(JSNUtilsMessage::hideMessage(JFactory::getApplication()->input->getInt('msgId')));\n\t}", "title": "" }, { "docid": "f40abdd58b51b74083a6c2d27ff1a1ec", "score": "0.4320519", "text": "function init_digitalbees_options()\r\n{\r\n\tadd_option(DIGITALBEES_API_KEY, DIGITALBEES_API_KEY, \"\", \"yes\");\r\n\tadd_option(DIGITALBEES_API_SECRET, DIGITALBEES_API_SECRET, \"\", \"yes\");\r\n\tadd_option(DIGITALBEES_PLAYER_WIDTH, \"600\", \"\", \"yes\");\r\n\tadd_option(DIGITALBEES_PLAYER_HEIGHT, \"400\", \"\", \"yes\");\r\n}", "title": "" }, { "docid": "3ca1df0cf312d7e309eb37994b8ccbef", "score": "0.4318748", "text": "private static function appendActivateButton(Im\\Bot\\Keyboard &$keyboard): void\n\t{\n\t\t$keyboard->addButton([\n\t\t\t\"DISPLAY\" => \"LINE\",\n\t\t\t\"TEXT\" => Loc::getMessage('SUPPORT_BOX_ACTIVATE'),\n\t\t\t\"BG_COLOR\" => \"#29619b\",\n\t\t\t\"TEXT_COLOR\" => \"#fff\",\n\t\t\t\"BLOCK\" => \"Y\",\n\t\t\t\"COMMAND\" => self::COMMAND_ACTIVATE,\n\t\t]);\n\t}", "title": "" }, { "docid": "e64304d851ef0dba5cd8a1db4f274ecb", "score": "0.4310957", "text": "private function inputHidden()\n {\n ?>\n <input type=\"hidden\" name=\"_token\" value=\"<?= $this->key_csfr ?>\"/>\n <?php\n }", "title": "" }, { "docid": "b488c5d9ebe9b7dd955bdba2118a9380", "score": "0.42987353", "text": "function keyboardTemplate()\n{\n $key='{\n \t\"Type\": \"keyboard\",\n \t\"Buttons\": [{\n \t\t\"Columns\": 3,\n \t\t\"Rows\": 2,\n \t\t\"Text\": \"<font color=\\\"#494E67\\\">Smoking</font><br><br>\",\n \t\t\"TextSize\": \"medium\",\n \t\t\"TextHAlign\": \"center\",\n \t\t\"TextVAlign\": \"bottom\",\n \t\t\"ActionType\": \"reply\",\n \t\t\"ActionBody\": \"Smoking\",\n \t\t\"BgColor\": \"#f7bb3f\",\n \t\t\"Image\": \"https: //s12.postimg.org/ti4alty19/smoke.png\"\n \t}, {\n \t\t\"Columns\": 3,\n \t\t\"Rows\": 2,\n \t\t\"Text\": \"<font color=\\\"#494E67\\\">Non Smoking</font><br><br>\",\n \t\t\"TextSize\": \"medium\",\n \t\t\"TextHAlign\": \"center\",\n \t\t\"TextVAlign\": \"bottom\",\n \t\t\"ActionType\": \"reply\",\n \t\t\"ActionBody\": \"Non smoking\",\n \t\t\"BgColor\": \"# f6f7f9\",\n \t\t\"Image\": \"https: //s14.postimg.org/us7t38az5/Nonsmoke.png\"\n \t}]\n }';\n return json_decode($key,true);\n\n}", "title": "" }, { "docid": "15ed652fcc4eb657912c85678c92ccf4", "score": "0.42944646", "text": "protected function deactivate()\n {\n }", "title": "" }, { "docid": "948176b770a1575bc19da874a3a6c557", "score": "0.42918652", "text": "public function deactivate() {\n // Your implementation...\n }", "title": "" }, { "docid": "aee926f6ec31e4ab99d32a84c70671df", "score": "0.42907494", "text": "public function input_WbfsysIssue_FlagHidden( $params )\n {\n $i18n = $this->view->i18n;\n\n //tpl: class ui:Checkbox\n $inputFlagHidden = $this->view->newInput( 'inputWbfsysIssueFlagHidden', 'Checkbox' );\n $this->items['wbfsys_issue-flag_hidden'] = $inputFlagHidden;\n $inputFlagHidden->addAttributes\n (\n array\n (\n 'name' => 'wbfsys_issue[flag_hidden]',\n 'id' => 'wgt-input-wbfsys_issue_flag_hidden'.($this->suffix?'-'.$this->suffix:''),\n 'class' => 'wcm wcm_ui_tip medium'.($this->assignedForm?' asgd-'.$this->assignedForm:''),\n 'title' => $i18n->l( 'Insert value for {@attr@} ({@src@})', 'wbf.label', array( 'attr' => 'Hidden', 'src' => 'Issue' ) ),\n )\n );\n $inputFlagHidden->setWidth( 'medium' );\n\n $inputFlagHidden->setReadonly( $this->fieldReadOnly( 'wbfsys_issue', 'flag_hidden' ) );\n $inputFlagHidden->setRequired( $this->fieldRequired( 'wbfsys_issue', 'flag_hidden' ) );\n $inputFlagHidden->setActive( $this->entity->getBoolean( 'flag_hidden' ) );\n $inputFlagHidden->setLabel( $i18n->l( 'Hidden', 'wbfsys.issue.label' ) );\n\n $inputFlagHidden->refresh = $this->refresh;\n $inputFlagHidden->serializeElement = $this->sendElement;\n\n // activate the category\n $this->view->addVar\n (\n 'showCat'.$this->namespace.'_Default' ,\n true\n );\n\n\n }", "title": "" }, { "docid": "86a51f97fd75fbdc6cd45681927abfd7", "score": "0.42866737", "text": "public function stop() {\n\t\tputenv(\"DISPLAY=:{$this->oldDisplay}\");\n\t}", "title": "" }, { "docid": "5ad77950e0ddeb4ce2c77577085fc675", "score": "0.42801288", "text": "public static function deactivate() {\t\t\n\n\t}", "title": "" }, { "docid": "f5a329de7710b11b1b52c048c3031c86", "score": "0.4267107", "text": "public function hideActiveLogin()\n {\n $this->user = null;\n $this->loginHidden = true;\n }", "title": "" }, { "docid": "764beae60da43aa21e17d438a60f3a70", "score": "0.4251946", "text": "public function focusHome();", "title": "" }, { "docid": "5141754b8d931b37264a763caacf784d", "score": "0.42353788", "text": "final public function eraseInput() {\n if($this->debug) echo \"Função: \".__FUNCTION__.\"\\n\";\n\n $this->sendCommand(\"EraseInput()\");\n }", "title": "" }, { "docid": "e45a79e049d2f97d872cd70f49dcb7b9", "score": "0.4233966", "text": "public function deactivate()\n {\n\n }", "title": "" }, { "docid": "c03e626085a7cc981288306416b0814d", "score": "0.42238167", "text": "public function setHidden($hidden);", "title": "" }, { "docid": "60b9de949d4d774f7359aaa24080000b", "score": "0.42227817", "text": "public static function deactivate()\n {\n }", "title": "" }, { "docid": "60b9de949d4d774f7359aaa24080000b", "score": "0.42227817", "text": "public static function deactivate()\n {\n }", "title": "" }, { "docid": "0573f8ae00ff1d6a5707dee9804eea5b", "score": "0.421097", "text": "public static function deactivate() {\n\n\t}", "title": "" }, { "docid": "0573f8ae00ff1d6a5707dee9804eea5b", "score": "0.421097", "text": "public static function deactivate() {\n\n\t}", "title": "" }, { "docid": "e6a425d95cba31824827b8dbf12427e6", "score": "0.42065153", "text": "public static function deactivate() {\n\t}", "title": "" }, { "docid": "0bf3c3ea056cb32c1ff13d28bf6a1896", "score": "0.42041364", "text": "public static function activate_clear_mode()\n {\n self::$m_clear_mode = true;\n }", "title": "" } ]
b426f66049c1c28df8e5ec431e13c550
Outputs an HTML table displaying the top $numToGet artifacts (by view count)
[ { "docid": "d7b826a3d82be8c15b69be89d2fcb55c", "score": "0.8271441", "text": "public function showTopArtifacts($numToGet)\r\n {\r\n echo '<table class=\"sortable\" border=1>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th>Acc. Num</th>\r\n\t\t\t\t\t<th>Name</th>\r\n\t\t\t\t\t<th>Total Views</th>\r\n\t\t\t\t\t<th>Views from Random</th>\r\n\t\t\t\t\t<th>Views from Search Results</th>\r\n\t\t\t\t\t<th>Views from Details</th>\r\n\t\t\t\t\t<th>Direct Link Views</th>\r\n\t\t\t\t</tr>';\r\n $resultSet = $this->analyticalModel->getTopArtifacts($numToGet);\r\n foreach ($resultSet as $row) {\r\n echo '<tr>';\r\n echo '<td><a href=\"../details.php?a=' . $row['accession number'] . '\">' . $row['accession number'] . '</a></td>';\r\n echo '<td>' . $row['name'] . '</td>';\r\n echo '<td>' . $row['view_cnt'] . '</td>';\r\n echo '<td>' . $row['view_rnd_cnt'] . '</td>';\r\n echo '<td>' . $row['view_results_cnt'] . '</td>';\r\n echo '<td>' . $row['view_details_cnt'] . '</td>';\r\n echo '<td>' . ($row['view_cnt'] - $row['view_rnd_cnt'] - $row['view_results_cnt'] - $row['view_details_cnt']) . '</td>';\r\n echo '</tr>';\r\n }\r\n echo '</table>';\r\n }", "title": "" } ]
[ { "docid": "8e41a2b9cb9089abba6c7ec7d5cfc921", "score": "0.68553305", "text": "public function showTopSearchers($numToGet)\r\n {\r\n echo '<table class=\"sortable\" border=1>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th>IP</th>\r\n\t\t\t\t\t<th>Searches Performed</th>\r\n\t\t\t\t</tr>';\r\n $resultSet = $this->analyticalModel->getTopSearchers($numToGet);\r\n foreach ($resultSet as $row) {\r\n echo '<tr>';\r\n echo '<td><a href=\"#\" onclick=\"updateSearchesByIP(\\'' . $row['usr_ip'] . '\\')\">' . $row['usr_ip'] . '</a></td>';\r\n echo '<td>' . $row['num'] . '</td>';\r\n echo '</tr>';\r\n }\r\n echo '</table>';\r\n }", "title": "" }, { "docid": "1d06d693cf63b68a86684bc67089cb7c", "score": "0.63868904", "text": "public function itemPopularityDensity() {\n if (!$this->connected()) {\n exit(\"Database Connection Error.\");\n } //Kill method if no access to database\n $occuranceCountArray = array(); //declare empty array for top 10 items list\n $popularItems = getPopularItems(); //retrieve master popular items list \n echo \"<div><h2>Here are your top 10 most purchases items:</h2></div>\";\n for ($i = 0; $i < 10; $i++) { //loop through master items array selecting only the top 10\n array_push($occuranceCountArray, $popularItems[$i][1]);\n }\n //Create output table structure\n echo \"<br />\";\n echo \"<table style=width:25% border='1'>\"\n . \"<tr><th>Popularity Rank</th>\"\n . \"<th>Item</th>\"\n . \"</tr>\";\n //Loop and print out table rows for each of the top ten items\n foreach ($occuranceCountArray as $key => $value) {\n echo \"<tr><td>\" . ($key + 1) . \"</td><td>\" . $value . \"</td></tr>\";\n }\n echo \"</table>\";\n }", "title": "" }, { "docid": "115ada5a332c5a1c18815f8a823598cc", "score": "0.62752646", "text": "public function showMostCommonSearchQueries($numToGet)\r\n {\r\n echo '<table class=\"sortable\" border=1>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th>Term(s)</th>\r\n\t\t\t\t\t<th>Times Searched</th>\r\n\t\t\t\t\t<th>Search</th>\r\n\t\t\t\t</tr>';\r\n $resultSet = $this->analyticalModel->getMostCommonSearchQueries($numToGet);\r\n foreach ($resultSet as $row) {\r\n echo '<tr>';\r\n echo '<td>' . $row['searchq'] . '</td>';\r\n echo '<td>' . $row['num'] . '</td>';\r\n $searchRequest = new searchRequest();\r\n $searchRequest->clear();\r\n $searchRequest->setQuery($row['searchq']);\r\n echo '<td><a href=\"' . $searchRequest->getURL() . '\">View Search</a></td>';\r\n echo '</tr>';\r\n }\r\n echo '</table>';\r\n }", "title": "" }, { "docid": "14eb7b5a03e299a107b9327c5409a3b4", "score": "0.6243001", "text": "public function renderTop()\n {\n // set top 5 data and then render\n $this->configureTop();\n $this->doRender();\n }", "title": "" }, { "docid": "f4d7bcb3021ace89865b58f451c1ef41", "score": "0.6225344", "text": "public function topPage()\n {\n // get 10 top stories\n $stories = Story::all();\n $evalutedStories = [];\n foreach($stories as $story)\n {\n $votes = $story->votes;\n $up = $votes->where('vote', '=', '1')->count();\n $dn = $votes->where('vote', '=', '-1')->count();\n\n $commentaries = $story->commentaries();\n $cc = $commentaries->count();\n\n //echo \"id:\".$story->id.\"_up:\".$up.\"_dn:\".$dn.\"_cc:\".$cc;\n\n $evalutedStories[$story->getId()] = ((2 * $up) - (3 * $dn) + (5 * $cc));\n }\n\n // Sort by score\n arsort($evalutedStories);\n\n // Get top 10 keys\n $keys = array_slice(array_keys($evalutedStories), 0, 10);\n\n // Implode keys\n $implodedKeys = implode(',', $keys);\n\n // Fetch top stories\n $storiesPaged = Story::whereIn('id', $keys)->orderByRaw(DB::raw(\"FIELD(id, $implodedKeys)\"))->paginate(3);\n\n return $this->paged($storiesPaged);\n }", "title": "" }, { "docid": "162f73ea8ae67318b6ed76a703e2dca6", "score": "0.6210151", "text": "public function showRecentSearches($numToGet)\r\n {\r\n echo '<table class=\"sortable\" border=1>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th>Time</th>\r\n\t\t\t\t\t<th>IP</th>\r\n\t\t\t\t\t<th>Query</th>\r\n\t\t\t\t\t<th># Results</th>\r\n\t\t\t\t\t<th>Execution Time (s)</th>\r\n\t\t\t\t\t<th>DB Searched</th>\r\n\t\t\t\t\t<th>User Agent</th>\r\n\t\t\t\t\t<th>Search</th>\r\n\t\t\t\t</tr>';\r\n $resultSet = $this->analyticalModel->getRecentSearches($numToGet);\r\n foreach ($resultSet as $row) {\r\n echo '<tr>';\r\n echo '<td>' . $row['timestamp'] . '</td>';\r\n echo '<td>' . $row['usr_ip'] . '</td>';\r\n echo '<td>' . $row['searchq'] . '</td>';\r\n echo '<td>' . $row['num_results'] . '</td>';\r\n echo '<td>' . $row['exec_time'] . '</td>';\r\n echo '<td>' . $row['db_searched'] . '</td>';\r\n echo '<td>' . $row['usr_agent'] . '</td>';\r\n $searchRequest = unserialize($row['ser_searchq']);\r\n echo '<td><a href=\"' . $searchRequest->getURL() . '\">View Search</a></td>';\r\n echo '</tr>';\r\n }\r\n echo '</table>';\r\n }", "title": "" }, { "docid": "a88b5dd3a95b4ebe8ff14f233d51d5f0", "score": "0.6143934", "text": "public function top(){\r\n $this->model->getTopProducts();\r\n $this->extra();\r\n $this->model->setPageHeader('Top 5');\r\n include_once 'views/productTopDoc.php';\r\n $view = new productTopDoc($this->model);\r\n $view->show();\r\n }", "title": "" }, { "docid": "fc8278ed5497dc88ef195949ac284ebb", "score": "0.6138094", "text": "function ssi_topBoards($num_top = 10, $output_method = 'echo')\n{\n\tglobal $txt;\n\n\trequire_once(SUBSDIR . '/Stats.subs.php');\n\n\t// Find boards with lots of posts.\n\t$boards = topBoards($num_top, true);\n\n\tforeach ($boards as $id => $board)\n\t{\n\t\t$boards[$id]['new'] = empty($board['is_read']);\n\t}\n\n\t// If we shouldn't output or have nothing to output, just jump out.\n\tif ($output_method !== 'echo' || empty($boards))\n\t{\n\t\treturn $boards;\n\t}\n\n\techo '\n\t\t<table class=\"ssi_table\">\n\t\t\t<tr>\n\t\t\t\t<th>', $txt['board'], '</th>\n\t\t\t\t<th class=\"centertext\">', $txt['board_topics'], '</th>\n\t\t\t\t<th class=\"centertext\">', $txt['posts'], '</th>\n\t\t\t</tr>';\n\n\tforeach ($boards as $board)\n\t{\n\t\techo '\n\t\t\t<tr>\n\t\t\t\t<td>', $board['new'] ? ' <a href=\"' . $board['href'] . '\" class=\"new_posts\">' . $txt['new'] . '</a> ' : '', $board['link'], '</td>\n\t\t\t\t<td class=\"centertext\">', $board['num_topics'], '</td>\n\t\t\t\t<td class=\"centertext\">', $board['num_posts'], '</td>\n\t\t\t</tr>';\n\t}\n\n\techo '\n\t\t</table>';\n}", "title": "" }, { "docid": "efa184476281174be81c3c08b1ca149d", "score": "0.6017886", "text": "function generate_torrent_table($Caption, $Tag, $Details, $Limit) {\n\tglobal $LoggedUser, $Categories, $ReleaseTypes, $GroupBy;\n?>\n\t\t<h3>Top <?=\"$Limit $Caption\"?>\n<?\tif (empty($_GET['advanced'])) { ?>\n\t\t<small class=\"top10_quantity_links\">\n<?\n\t\tswitch ($Limit) {\n\t\t\tcase 100: ?>\n\t\t\t\t- <a href=\"top10.php?details=<?=$Tag?>\" class=\"brackets\">Top 10</a>\n\t\t\t\t- <span class=\"brackets\">Top 100</span>\n\t\t\t\t- <a href=\"top10.php?type=torrents&amp;limit=250&amp;details=<?=$Tag?>\" class=\"brackets\">Top 250</a>\n<?\t\t\t\tbreak;\n\t\t\tcase 250: ?>\n\t\t\t\t- <a href=\"top10.php?details=<?=$Tag?>\" class=\"brackets\">Top 10</a>\n\t\t\t\t- <a href=\"top10.php?type=torrents&amp;limit=100&amp;details=<?=$Tag?>\" class=\"brackets\">Top 100</a>\n\t\t\t\t- <span class=\"brackets\">Top 250</span>\n<?\t\t\t\tbreak;\n\t\t\tdefault: ?>\n\t\t\t\t- <span class=\"brackets\">Top 10</span>\n\t\t\t\t- <a href=\"top10.php?type=torrents&amp;limit=100&amp;details=<?=$Tag?>\" class=\"brackets\">Top 100</a>\n\t\t\t\t- <a href=\"top10.php?type=torrents&amp;limit=250&amp;details=<?=$Tag?>\" class=\"brackets\">Top 250</a>\n<?\t\t} ?>\n\t\t</small>\n<?\t} ?>\n\t\t</h3>\n\t<table class=\"torrent_table cats numbering border m_table\">\n\t<tr class=\"colhead\">\n\t\t<td class=\"center\" style=\"width: 15px;\"></td>\n\t\t<td class=\"cats_col\"></td>\n\t\t<td class=\"m_th_left m_th_left_collapsable\">Name</td>\n\t\t<td style=\"text-align: right;\">Size</td>\n\t\t<td style=\"text-align: right;\">Data</td>\n\t\t<td style=\"text-align: right;\" class=\"sign snatches\"><img src=\"static/styles/<?=$LoggedUser['StyleName']?>/images/snatched.png\" alt=\"Snatches\" title=\"Snatches\" class=\"tooltip\" /></td>\n\t\t<td style=\"text-align: right;\" class=\"sign seeders\"><img src=\"static/styles/<?=$LoggedUser['StyleName']?>/images/seeders.png\" alt=\"Seeders\" title=\"Seeders\" class=\"tooltip\" /></td>\n\t\t<td style=\"text-align: right;\" class=\"sign leechers\"><img src=\"static/styles/<?=$LoggedUser['StyleName']?>/images/leechers.png\" alt=\"Leechers\" title=\"Leechers\" class=\"tooltip\" /></td>\n\t\t<td style=\"text-align: right;\">Peers</td>\n\t</tr>\n<?\n\t// Server is already processing a top10 query. Starting another one will make things slow\n\tif ($Details === false) {\n?>\n\t\t<tr class=\"rowb\">\n\t\t\t<td colspan=\"9\" class=\"center\">\n\t\t\t\tServer is busy processing another top list request. Please try again in a minute.\n\t\t\t</td>\n\t\t</tr>\n\t\t</table><br />\n<?\n\t\treturn;\n\t}\n\t// in the unlikely event that query finds 0 rows...\n\tif (empty($Details)) {\n?>\n\t\t<tr class=\"rowb\">\n\t\t\t<td colspan=\"9\" class=\"center\">\n\t\t\t\tFound no torrents matching the criteria.\n\t\t\t</td>\n\t\t</tr>\n\t\t</table><br />\n<?\n\t\treturn;\n\t}\n\t$Rank = 0;\n\tforeach ($Details as $Detail) {\n\t\t$GroupIDs[] = $Detail[1];\n\t}\n\t$Artists = Artists::get_artists($GroupIDs);\n\n\tforeach ($Details as $Detail) {\n\t\tlist($TorrentID, $GroupID, $GroupName, $GroupCategoryID, $WikiImage, $TagsList,\n\t\t\t$Format, $Encoding, $Media, $Scene, $HasLog, $HasCue, $HasLogDB, $LogScore, $LogChecksum, $Year, $GroupYear,\n\t\t\t$RemasterTitle, $Snatched, $Seeders, $Leechers, $Data, $ReleaseType, $Size) = $Detail;\n\n\t\t$IsBookmarked = Bookmarks::has_bookmarked('torrent', $GroupID);\n\t\t$IsSnatched = Torrents::has_snatched($TorrentID);\n\n\t\t// highlight every other row\n\t\t$Rank++;\n\t\t$Highlight = ($Rank % 2 ? 'a' : 'b');\n\n\t\t// generate torrent's title\n\t\t$DisplayName = '';\n\n\n\t\tif (!empty($Artists[$GroupID])) {\n\t\t\t$DisplayName = Artists::display_artists($Artists[$GroupID], true, true);\n\t\t}\n\n\t\t$DisplayName .= \"<a href=\\\"torrents.php?id=$GroupID&amp;torrentid=$TorrentID\\\" class=\\\"tooltip\\\" title=\\\"View torrent\\\" dir=\\\"ltr\\\">$GroupName</a>\";\n\n\t\tif ($GroupCategoryID == 1 && $GroupYear > 0) {\n\t\t\t$DisplayName .= \" [$GroupYear]\";\n\t\t}\n\t\tif ($GroupCategoryID == 1 && $ReleaseType > 0) {\n\t\t\t$DisplayName .= ' ['.$ReleaseTypes[$ReleaseType].']';\n\t\t}\n\n\t\t// append extra info to torrent title\n\t\t$ExtraInfo = '';\n\t\t$AddExtra = '';\n\t\tif (empty($GroupBy)) {\n\t\t\tif ($Format) {\n\t\t\t\t$ExtraInfo .= $Format;\n\t\t\t\t$AddExtra = ' / ';\n\t\t\t}\n\t\t\tif ($Encoding) {\n\t\t\t\t$ExtraInfo .= $AddExtra.$Encoding;\n\t\t\t\t$AddExtra = ' / ';\n\t\t\t}\n\t\t\t// \"FLAC / Lossless / Log (100%) / Cue / CD\";\n\t\t\tif ($HasLog) {\n\t\t\t\t$ExtraInfo .= $AddExtra.'Log'.($HasLogDB ? \" ({$LogScore}%)\" : \"\");\n\t\t\t\t$AddExtra = ' / ';\n\t\t\t}\n\t\t\tif ($HasCue) {\n\t\t\t\t$ExtraInfo .= $AddExtra.'Cue';\n\t\t\t\t$AddExtra = ' / ';\n\t\t\t}\n\t\t\tif ($Media) {\n\t\t\t\t$ExtraInfo .= $AddExtra.$Media;\n\t\t\t\t$AddExtra = ' / ';\n\t\t\t}\n\t\t\tif ($Scene) {\n\t\t\t\t$ExtraInfo .= $AddExtra.'Scene';\n\t\t\t\t$AddExtra = ' / ';\n\t\t\t}\n\t\t\tif ($Year > 0) {\n\t\t\t\t$ExtraInfo .= $AddExtra.$Year;\n\t\t\t\t$AddExtra = ' ';\n\t\t\t}\n\t\t\tif ($RemasterTitle) {\n\t\t\t\t$ExtraInfo .= $AddExtra.$RemasterTitle;\n\t\t\t}\n\t\t\tif ($IsSnatched) {\n\t\t\t\tif ($GroupCategoryID == 1) {\n\t\t\t\t\t$ExtraInfo .= ' / ';\n\t\t\t\t}\n\t\t\t\t$ExtraInfo .= Format::torrent_label('Snatched!');\n\t\t\t}\n\t\t\tif ($ExtraInfo != '') {\n\t\t\t\t$ExtraInfo = \"- [$ExtraInfo]\";\n\t\t\t}\n\t\t}\n\n\t\t$TorrentTags = new Tags($TagsList);\n\n\t\t//Get report info, use the cache if available, if not, add to it.\n\t\t$Reported = false;\n\t\t$Reports = Torrents::get_reports($TorrentID);\n\t\tif (count($Reports) > 0) {\n\t\t\t$Reported = true;\n\t\t}\n\n\t\t// print row\n?>\n\t<tr class=\"torrent row<?=$Highlight . ($IsBookmarked ? ' bookmarked' : '') . ($IsSnatched ? ' snatched_torrent' : '')?>\">\n\t\t<td style=\"padding: 8px; text-align: center;\" class=\"td_rank m_td_left\"><strong><?=$Rank?></strong></td>\n\t\t<td class=\"center cats_col m_hidden\"><div title=\"<?=$TorrentTags->title()?>\" class=\"tooltip <?=Format::css_category($GroupCategoryID)?> <?=$TorrentTags->css_name()?>\"></div></td>\n\t\t<td class=\"td_info big_info\">\n<?\t\tif ($LoggedUser['CoverArt']) { ?>\n\t\t\t<div class=\"group_image float_left clear\">\n\t\t\t\t<? ImageTools::cover_thumb($WikiImage, $GroupCategoryID) ?>\n\t\t\t</div>\n<?\t\t} ?>\n\t\t\t<div class=\"group_info clear\">\n\n\t\t\t\t<span><a href=\"torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>\" title=\"Download\" class=\"brackets tooltip\">DL</a></span>\n\n\t\t\t\t<strong><?=$DisplayName?></strong> <?=$ExtraInfo?><? if ($Reported) { ?> - <strong class=\"torrent_label tl_reported\">Reported</strong><? } ?>\n<?\n\t\tif ($IsBookmarked) {\n?>\n\t\t\t\t<span class=\"remove_bookmark float_right\">\n\t\t\t\t\t<a href=\"#\" id=\"bookmarklink_torrent_<?=$GroupID?>\" class=\"bookmarklink_torrent_<?=$GroupID?> brackets\" onclick=\"Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;\">Remove bookmark</a>\n\t\t\t\t</span>\n<?\t\t} else { ?>\n\t\t\t\t<span class=\"add_bookmark float_right\">\n\t\t\t\t\t<a href=\"#\" id=\"bookmarklink_torrent_<?=$GroupID?>\" class=\"bookmarklink_torrent_<?=$GroupID?> brackets\" onclick=\"Bookmark('torrent', <?=$GroupID?>, 'Remove bookmark'); return false;\">Bookmark</a>\n\t\t\t\t</span>\n<?\t\t} ?>\n\t\t\t\t<div class=\"tags\"><?=$TorrentTags->format()?></div>\n\t\t\t</div>\n\t\t</td>\n\t\t<td class=\"td_size number_column nobr\"><?=Format::get_size($Size)?></td>\n\t\t<td class=\"td_data number_column nobr\"><?=Format::get_size($Data)?></td>\n\t\t<td class=\"td_snatched number_column m_td_right\"><?=number_format((double)$Snatched)?></td>\n\t\t<td class=\"td_seeders number_column m_td_right\"><?=number_format((double)$Seeders)?></td>\n\t\t<td class=\"td_leechers number_column m_td_right\"><?=number_format((double)$Leechers)?></td>\n\t\t<td class=\"td_seeders_leechers number_column m_hidden\"><?=number_format($Seeders + $Leechers)?></td>\n\t</tr>\n<?\n\t} //foreach ($Details as $Detail)\n?>\n\t</table><br />\n<?\n}", "title": "" }, { "docid": "a9cbd6e4b8c088b67cdcf51d48e09f98", "score": "0.6015171", "text": "function top10($tab) {\n\t\tfor ($i = 0; $i < 10; $i++) {\n\t\t\t$ii = $i + 1;\n\t\t\techo '<div>'.$ii.'. '.$tab[$i]['im:name']['label'].'</div>';\n\t\t}\n\t}", "title": "" }, { "docid": "33825e1ecf2d8f6d8a802f49893f6404", "score": "0.5999751", "text": "public function showImdbTop250()\r\n {\r\n $movies = Movie::where(\"id\", \">\", \"1\")->OrderBy(\"rating\", \"DESC\")->OrderBy(\"votes\", \"DESC\")->get();\r\n\r\n return view('imdbTop', [\"movies\"=>$movies]);\r\n }", "title": "" }, { "docid": "ebbbd5fe66cc48568ee41ac7d0044d02", "score": "0.5937831", "text": "static function sortByMostViewest(): array {\n $output = [];\n $range = range(1, self::maxPage);\n $unSorted = new LiveAction();\n $promises = [];\n foreach ($range as $number){\n $promises[] = $unSorted->sortByMostViewest($number)->requestAsync(\"GET\");\n }\n $responses = Utils::settle($promises)->wait();\n foreach ($responses as $value){\n $output[] = $value[\"value\"]->getBody()->getcontents();\n }\n return $output;\n }", "title": "" }, { "docid": "e695a4dbe0a0f2899f5780c8df126fd1", "score": "0.59055674", "text": "public function getTop($number = 1)\n {\n $sql = \"SELECt * FROM products\n ORDER BY products.view DESC \n LIMIT :number\";\n $this->db->query($sql);\n $this->db->bind(':number', $number);\n return $this->db->resultSet();\n }", "title": "" }, { "docid": "2da8bb9da763f5f1da535cdd0a78f15d", "score": "0.58685535", "text": "public function getHits($number)\n {\n \treturn $this->db->select('title, id, brief, avatar, category_id')\n \t\t\t\t\t ->where('status', 3)\n\t\t\t\t \t ->order_by('hits', 'DESC')\n\t\t\t\t \t ->limit($number)\n\t\t\t\t \t ->get()\n\t\t\t\t \t ->result();\n }", "title": "" }, { "docid": "943aae6062825795bb0bfcd902da59d8", "score": "0.5820277", "text": "function printResult($result) {\r\n echo '<div id=\"popular\">';\r\n echo '<h1><em>Top 10 Popular Channels</em></h1>';\r\n \techo '<table >';\r\n \techo '<tr>';\r\n echo '<th>ID</th>';\r\n echo '<th>Title</th>';\r\n echo '<th>Num of Viewers</th>';\r\n echo '</tr>';\r\n while ($row = oci_fetch_array($result, OCI_BOTH)) {\r\n\techo '<tr>';\r\n\techo '<td>'.$row[0].'</td>';\r\n echo '<td> <a href =channel.php?CID='.$row[0].' target=\"_blank\">'.$row[1]. '</a></td>'; \r\n\techo '<td>'.$row[2].'</td>';\r\n\techo '</tr>'; \r\n\t}\r\n echo '</table>';\r\n echo '</div>';\r\n}", "title": "" }, { "docid": "9c509cd06448382e42ca9315486c6f72", "score": "0.5808523", "text": "function ssi_topTopicsViews($num_topics = 10, $output_method = 'echo')\n{\n\treturn ssi_topTopics('views', $num_topics, $output_method);\n}", "title": "" }, { "docid": "007c684c304e651f496ba9464ed14608", "score": "0.5762836", "text": "public function showActivitysummaryTable($wherestring,$orderbystring){\n\t\n\t$this->log->showLog(3,\"Showing Activitysummary Table\");\n\t$sql=$this->getSQLStr_AllActivitysummary($wherestring,$orderbystring);\n\t\n\t$query=$this->xoopsDB->query($sql);\n\techo <<< EOF\n\t<table border='1' style=\"width:900px;\" cellspacing='3'>\n \t\t<tbody>\n \t\t\t<tr>\n\t\t\t\t<th style=\"text-align:center;\">No</th>\n\n\t\t\t\t<th style=\"text-align:center;\">Activitysummary Name</th>\n\t\t\t\t<th style=\"text-align:center;\">File Name</th>\n\t\t\t\t<th style=\"text-align:center;\">Type</th>\n\t\t\t\t<th style=\"text-align:center;width:700px;\">Active</th>\n\t\t\t\t<th style=\"text-align:center;\">Seq No</th>\n\t\t\t\t<th style=\"text-align:center;\">Operation</th>\n \t</tr>\nEOF;\n\t$rowtype=\"\";\n\t$i=0;\n\twhile ($row=$this->xoopsDB->fetchArray($query)){\n\t\t$i++;\n\t\t$activitysummary_id=$row['activitysummary_id'];\n\t\t$activitysummary_name=$row['activitysummary_name'];\n\t\t$filename=$row['filename'];\n\t\t$functiontype=$row['functiontype'];\n\t\t$seqno=$row['seqno'];\n\t\tif($functiontype=='V')\n\t\t $functiontype=\"Report\";\n\t\telseif($functiontype=='T')\n\t\t $functiontype=\"Transaction\";\n\t\telse\n\t\t $functiontype=\"Master\";\n\n\t\t$isactive=$row['isactive'];\n\t\tif($isactive=='N')\n\t\t$isactive=\"<b style='color:red;'>$isactive</b>\";\n\n\t\tif($rowtype==\"odd\")\n\t\t\t$rowtype=\"even\";\n\t\telse\n\t\t\t$rowtype=\"odd\";\n\t\t\n\t\techo <<< EOF\n\n\t\t<tr>\n\t\t\t<td class=\"$rowtype\" style=\"text-align:center;\">$i</td>\n\t\t\t<td class=\"$rowtype\" style=\"text-align:center;\">$activitysummary_name</td>\n\t\t\t<td class=\"$rowtype\" style=\"text-align:center;\">$filename</td>\n\t\t\t<td class=\"$rowtype\" style=\"text-align:center;\">$functiontype</td>\n\t\t\t<td class=\"$rowtype\" style=\"text-align:center;\">$isactive</td>\n\t\t\t<td class=\"$rowtype\" style=\"text-align:center;\">$seqno</td>\n\t\t\t<td class=\"$rowtype\" style=\"text-align:center;\">\n\t\t\t\t<form action=\"activitysummary.php\" method=\"POST\">\n\t\t\t\t<input type=\"image\" src=\"../images/edit.gif\" name=\"submit\" title='Edit this activitysummary'>\n\t\t\t\t<input type=\"hidden\" value=\"$activitysummary_id\" name=\"activitysummary_id\">\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"edit\">\n\t\t\t\t</form>\n\t\t\t</td>\n\n\t\t</tr>\nEOF;\n\t}\n\techo \"</tr></tbody></table>\";\n }", "title": "" }, { "docid": "fe8402a38f003f7cd1c973e0d452da5c", "score": "0.5740969", "text": "function getTopAll() {\n \n $result = mysql_query(\"SELECT * FROM test ORDER BY hits DESC LIMIT 10\"); \n \n // check for empty result\n\tif (mysql_num_rows($result) > 0)\n\t{ \n \n echo $result; \n \n } \n\telse \n\t{\n echo \"fehler\";\n }\n}", "title": "" }, { "docid": "5aa95c20774c30eb92ecef03e1d9973a", "score": "0.5738928", "text": "public function top($top=10);", "title": "" }, { "docid": "0d820e2f5408a8c2d3ddb8af596e7292", "score": "0.5668654", "text": "public function SalesStatsByNumViewsGrid()\n {\n $GLOBALS['OrderGrid'] = \"\"; \n if(isset($_GET['From']) && isset($_GET['To'])) {\n $from_stamp = (int)$_GET['From'];\n $to_stamp = (int)$_GET['To'];\n // How many records per page?\n if(isset($_GET['Show'])) {\n $per_page = (int)$_GET['Show'];\n }\n else {\n $per_page = 20;\n }\n \n $cursortfield = '';\n if(isset($_GET['vendorId']) && $_GET['vendorId'] != '-1') {\n $cursortfield = \" AND (orderowner='\".$_GET['vendorId'].\"')\";\n }\n\n $GLOBALS['ProductsPerPage'] = $per_page;\n $GLOBALS[\"IsShowPerPage\" . $per_page] = 'selected=\"selected\"';\n\n // Should we limit the records returned?\n if(isset($_GET['Page'])) {\n $page = (int)$_GET['Page'];\n }\n else {\n $page = 1;\n }\n\n $GLOBALS['salesByNumViewsCurrentPage'] = $page;\n\n // Workout the start and end records\n $start = ($per_page * $page) - $per_page;\n $end = $start + ($per_page - 1);\n\n // How many products are there in total?\n $CountQuery = \"\n SELECT \n count(*) AS num\n FROM [|PREFIX|]orders o\n LEFT JOIN [|PREFIX|]customers c ON (o.ordcustid=c.customerid)\n LEFT JOIN [|PREFIX|]order_status s ON (s.statusid=o.ordstatus)\n WHERE\n o.ordstatus > 0 \n AND o.orddate >= '\" . $from_stamp . \"'\n AND o.orddate <= '\" . $to_stamp . \"'\". $cursortfield ;\n $result = $GLOBALS['ISC_CLASS_DB']->Query($CountQuery);\n\n $row = $GLOBALS['ISC_CLASS_DB']->Fetch($result);\n $total_products = $row['num'];\n if ($total_products > 0) {\n //Sorting code goes by Simha\n if(isset($_GET['SortOrder']) && $_GET['SortOrder'] == \"asc\") {\n $sortOrder = 'asc';\n }\n else {\n $sortOrder = 'desc';\n }\n \n //changed field name and commented\n $sortFields = array('orderid','custname','orddate','ordstatus','ordtotalamount');//changed field name\n if(isset($_GET['SortBy']) && in_array($_GET['SortBy'], $sortFields)) {\n $sortField = $_GET['SortBy'];\n SaveDefaultSortField(\"ProductStatsByViews\", $_REQUEST['SortBy'], $sortOrder);\n }\n else {\n list($sortField, $sortOrder) = GetDefaultSortField(\"ProductStatsByViews\", \"o.orderid\", $sortOrder);\n }\n \n $sortLinks = array( \n \"OrderId\" => \"orderid\",\n \"Cusname\" => \"custname\",\n \"OrdDate\" => \"orddate\",\n \"Status\" => \"ordstatus\",\n \"Total\" => \"ordtotalamount\"\n );\n \n //Above comment and new addition belowby Simha \n //$sortLinks = array();\n \n $numSoldCounter = '921124412848294';\n BuildAdminSortingLinks($sortLinks, \"javascript:SortSalesByNumViews('%%SORTFIELD%%', '%%SORTORDER%%');\", $sortField, $sortOrder);\n //Sorting code goes ends by Simha\n \n // Workout the paging\n $num_pages = ceil($total_products / $per_page);\n // Should we limit the records returned?\n if(isset($_GET['Page']) && (int)$_GET['Page']<=$num_pages) {\n $page = (int)$_GET['Page'];\n }\n else {\n $page = 1;\n }\n\n // Workout the start and end records\n $start = ($per_page * $page) - $per_page;\n $end = $start + ($per_page - 1);\n\n $paging = sprintf(GetLang('PageXOfX'), $page, $num_pages);\n $paging .= \"&nbsp;&nbsp;&nbsp;&nbsp;\";\n\n // Is there more than one page? If so show the &laquo; to jump back to page 1\n if($num_pages > 1) {\n $paging .= \"<a href='javascript:void(0)' onclick='ChangeSalesViewsPage(1)'>&laquo;</a> | \";\n }\n else {\n $paging .= \"&laquo; | \";\n }\n\n // Are we on page 2 or above?\n if($page > 1) {\n $paging .= sprintf(\"<a href='javascript:void(0)' onclick='ChangeSalesViewsPage(%d)'>%s</a> | \", $page-1, GetLang('Prev'));\n }\n else {\n $paging .= sprintf(\"%s | \", GetLang('Prev'));\n }\n\n for($i = 1; $i <= $num_pages; $i++) {\n // Only output paging -5 and +5 pages from the page we're on\n if($i >= $page-6 && $i <= $page+5) {\n if($page == $i) {\n $paging .= sprintf(\"<strong>%d</strong> | \", $i);\n }\n else {\n $paging .= sprintf(\"<a href='javascript:void(0)' onclick='ChangeSalesViewsPage(%d)'>%d</a> | \", $i, $i);\n }\n }\n }\n\n // Are we on page 2 or above?\n if($page < $num_pages) {\n $paging .= sprintf(\"<a href='javascript:void(0)' onclick='ChangeSalesViewsPage(%d)'>%s</a> | \", $page+1, GetLang('Next'));\n }\n else {\n $paging .= sprintf(\"%s | \", GetLang('Next'));\n }\n\n // Is there more than one page? If so show the &raquo; to go to the last page\n if($num_pages > 1) {\n $paging .= sprintf(\"<a href='javascript:void(0)' onclick='ChangeSalesViewsPage(%d)'>&raquo;</a> | \", $num_pages);\n }\n else {\n $paging .= \"&raquo; | \";\n }\n\n $paging = rtrim($paging, ' |');\n $GLOBALS['Paging'] = $paging;\n\n // Should we set focus to the grid?\n if(isset($_GET['FromLink']) && $_GET['FromLink'] == \"true\") {\n $GLOBALS['JumpToOrdersByItemsSoldGrid'] = \"<script type=\\\"text/javascript\\\">document.location.href='#ordersByItemsSoldAnchor';</script>\";\n }\n //Sorting code moved to the topof this loop\n \n //Code here has been moved to the fucntion GetQueries \n \n // Add the Limit\n $mainQuery = \"SELECT o.*, c.*,us.username, s.statusdesc AS ordstatustext, CONCAT(custconfirstname, ' ', custconlastname) AS custname\n \n FROM [|PREFIX|]orders o\n LEFT JOIN [|PREFIX|]customers c ON (o.ordcustid=c.customerid)\n LEFT JOIN [|PREFIX|]order_status s ON (s.statusid=o.ordstatus)\n LEFT JOIN [|PREFIX|]users us ON us.`pk_userid` = o.orderowner \n WHERE\n o.ordstatus > 0 \n AND o.orddate >= '\" . $from_stamp . \"'\n AND o.orddate <= '\" . $to_stamp . \"' $cursortfield \n ORDER BY \" .\n $sortField . \" \" . $sortOrder;\n\n $mainQuery .= $GLOBALS['ISC_CLASS_DB']->AddLimit($start, $per_page); \n $result = $GLOBALS['ISC_CLASS_DB']->Query($mainQuery);\n\n if($GLOBALS['ISC_CLASS_DB']->CountResult($result) > 0) {\n while($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n $GLOBALS['OrderId'] = $row['orderid'];\n $GLOBALS['CustomerId'] = $row['ordcustid'];\n $GLOBALS['OrderId1'] = $row['orderid'];\n $GLOBALS['Customer'] = isc_html_escape($row['custname']);\n\n $GLOBALS['Date'] = isc_date(GetConfig('DisplayDateFormat'), $row['orddate']);\n $GLOBALS['OrderStatusOptions'] = $this->GetOrderStatusOptions($row['ordstatus']);\n\n $GLOBALS['Total'] = FormatPriceInCurrency($row['ordtotalamount'], $row['orddefaultcurrencyid'], null, true);\n $GLOBALS['TrackingNo'] = isc_html_escape($row['ordtrackingno']);\n $GLOBALS['username'] = isc_html_escape($row['username']);\n \n switch($row['requeststatus']){\n case 0:\n $orderreview = GetLang('OviewRequestNo');\n break;\n case 1:\n $orderreview = GetLang('OviewRequestYes');\n break;\n case 2:\n $orderreview = GetLang('OviewRequestSure');\n break;\n default:\n $orderreview = GetLang('OviewRequestNo');\n break;\n \n }\n $GLOBALS['Review'] = $orderreview;\n //Show payment status blow order status\n $GLOBALS['PaymentStatus'] = '';\n $GLOBALS['HidePaymentStatus'] = 'display:none;';\n $GLOBALS['PaymentStatusColor'] = '';\n if($row['ordpaymentstatus'] != '') {\n $GLOBALS['HidePaymentStatus'] = '';\n $GLOBALS['PaymentStatusColor'] = '';\n switch($row['ordpaymentstatus']) {\n case 'authorized':\n $GLOBALS['PaymentStatusColor'] = 'PaymentAuthorized';\n break;\n case 'captured':\n $GLOBALS['PaymentStatus'] = GetLang('Payment').\" \".ucfirst($row['ordpaymentstatus']);\n $GLOBALS['PaymentStatusColor'] = 'PaymentCaptured';\n break;\n case 'refunded':\n case 'partially refunded':\n case 'voided':\n $GLOBALS['PaymentStatus'] = GetLang('Payment').\" \".ucwords($row['ordpaymentstatus']);\n $GLOBALS['PaymentStatusColor'] = 'PaymentRefunded';\n break;\n }\n }\n // If the allow payment delayed capture, show the link to Delayed capture\n $GLOBALS['DelayedCaptureLink'] = '';\n $GLOBALS['VoidLink'] = '';\n $GLOBALS['RefundLink'] ='';\n $transactionId = trim($row['ordpayproviderid']);\n\n //if orginal transaction id exist and payment provider is currently enabled\n if($transactionId != '' && GetModuleById('checkout', $provider, $row['orderpaymentmodule']) && $provider->IsEnabled() && !gzte11(ISC_HUGEPRINT)) {\n //if the payment module allow delayed capture and the current payment status is authorized\n //display delay capture option\n if(method_exists($provider, \"DelayedCapture\") && $row['ordpaymentstatus'] == 'authorized') {\n $GLOBALS['DelayedCaptureLink'] = '<option value=\"delayedCapture\">'.GetLang('CaptureFunds').'</option>';\n\n $GLOBALS['PaymentStatus'] .= '<a onclick=\"Order.DelayedCapture('.$row['orderid'].'); return false;\" href=\"#\">'.GetLang('CaptureFunds').'</a>';\n }\n\n //if the payment module allow void transaction and the current payment status is authorized\n //display void option\n if(method_exists($provider, \"DoVoid\") && $row['ordpaymentstatus'] == 'authorized') {\n $GLOBALS['VoidLink'] = '<option value=\"voidTransaction\">'.GetLang('VoidTransaction').'</option>';\n }\n\n //if the payment module allow refund and the current payment status is authorized\n //display refund option\n if(method_exists($provider, \"DoRefund\") && ($row['ordpaymentstatus'] == 'captured' || $row['ordpaymentstatus'] == 'partially refunded')) {\n $GLOBALS['RefundLink'] = '<option value=\"refundOrder\">'.GetLang('Refund').'</option>';\n }\n }\n $GLOBALS[\"OrderStatusText\"] = GetOrderStatusById($row['ordstatus']);\n $GLOBALS['OrderStatusId'] = $row['ordstatus'];\n $CustomerLink = '';\n $CustomerId = $row['ordcustid'];\n $custname = isc_html_escape($row['custname']);\n if(trim($row['ordcustid']) != '0') {\n $GLOBALS['CustomerLink'] = \"<a href='index.php?ToDo=viewCustomers&amp;idFrom=$CustomerId&idTo=$CustomerId' target='_blank'>\".$custname.\"</a>\";\n }\n else {\n $GLOBALS['CustomerLink'] = $row['ordbillfirstname'].' '.$row['ordbilllastname'];\n }\n $GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"sales.manage.row\");\n $GLOBALS['OrderGrid'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate(true);\n $GLOBALS['Quickview'] =\"\n <tr id=\\\"trQ$OrderId\\\" style=\\\"display:none\\\">\n <td></td>\n <td colspan=\\\"12\\\" id=\\\"tdQ$OrderId\\\" class=\\\"QuickView\\\"></td>\n </tr> \";\n }\n }\n }\n else {\n $GLOBALS['OrderGrid'] .= sprintf(\"\n <tr class=\\\"GridRow\\\" onmouseover=\\\"this.className='GridRowOver';\\\" onmouseout=\\\"this.className='GridRow';\\\">\n <td nowrap height=\\\"22\\\" colspan=\\\"5\\\">\n <em>%s</em>\n </td>\n </tr>\n \", GetLang('StatsNoProducts')\n );\n }\n\n $GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"sales.manage.grid\");\n $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n }\n }", "title": "" }, { "docid": "5bb0b49415711efd56604e34e8cb29be", "score": "0.5658831", "text": "public function ViewedTable()\n\t{\tif ($this->id)\n\t\t{\t$times = array('Last day'=>'-1 day', 'Last week'=>'-1 week', 'Last month'=>'-1 month', 'All views'=>'');\n\t\t\tob_start();\n\t\t\techo '<table style=\"width: 200px; margin: 10px 0px 0px 200px\"><tr><th colspan=\"2\">Number of times viewed</th></tr>';\n\t\t\tforeach ($times as $text=>$datestring)\n\t\t\t{\techo '<tr><td>', $text, '</td><td>', $this->ViewCount($datestring), '</td></tr>';\n\t\t\t}\n\t\t\techo '</table>';\n\t\t\treturn ob_get_clean();\n\t\t}\n\t}", "title": "" }, { "docid": "538e3c6ccdc147975affc570c40b3ff5", "score": "0.55901676", "text": "public function get_top_reports(){\r\n\t\t$top_reports = array();\r\n\r\n\t\t$md_settings = get_option('iemop_market_downloads_settings', array());\r\n\t\t$top_reports_display = (isset($md_settings['reports_position'])) ? $md_settings['reports_position'] : 'asc';\r\n\r\n\t\tif ($top_reports_display == 'desc') {\r\n\t\t\t$sort = 'published_date DESC';\r\n\t\t\t$filters = array('sort'=>$sort, 'limit'=>4);\r\n\t\t\t$top_reports = $this->MD_Model->get_files_front(\"\", $filters);\r\n\t\t}elseif ($top_reports_display == 'manual') {\r\n\t\t\t$top_report_ids = get_option('iemop_top_reports', array());\r\n\t\t\t$count = count($top_report_ids);\r\n\t\t\t$limit = 4 - $count;\r\n\t\t\t\r\n\t\t\tif($top_report_ids){\r\n\t\t\t\tforeach ($top_report_ids as $key => $id) {\r\n\t\t\t\t\t$file_info = $this->MD_Model->get_file($id);\r\n\t\t\t\t\t$top_reports[$id] = $file_info;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif($limit > 0){\r\n\t\t\t\t$filters = array('limit'=>$limit, 'exclude'=>array_keys($top_reports));\r\n\t\t\t\t$latest = $this->MD_Model->get_files_front(\"\", $filters);\r\n\t\t\t\tforeach ($latest as $key => $file) {\r\n\t\t\t\t\t$top_reports[$file['id']] = $file;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$sort = 'published_date ASC';\r\n\t\t\t$filters = array('sort'=>$sort, 'limit'=>4);\r\n\t\t\t$top_reports = $this->MD_Model->get_files_front(\"\", $filters);\r\n\t\t}\r\n\r\n\t\treturn $top_reports;\r\n\t}", "title": "" }, { "docid": "de0e1f015d18a5d4801ecda5a6a81df3", "score": "0.5589267", "text": "public function getTopChart()\n\t{\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $this->baseurl); //Top chart\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$output = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$imdb_webpage = $output;\n\n\t\tif (preg_match('/<tbody class=\"lister-list\">(.*?)<\\/tbody>/s', $imdb_webpage, $hit))\n\t\t{\n\t\t\tif (preg_match_all('/<tr class=\"(odd|even)\">(.*?)<\\/tr>/s',$hit[0],$top))\n\t\t\t{\n\t\t\t\t$arr_top = $top[0];\n\t\t\t\tfor($i=0;$i<20;$i++)\n\t\t\t\t{\n\t\t\t\t\t$this->tops[] = $arr_top[$i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5a78e035b9748dcca151844848788b8a", "score": "0.5550877", "text": "function echoTopXX($c,$table, $site, $sid) {\nglobal $strings;\nglobal $lang;\nglobal $display;\n$ntop = $display['ntop'];\n\n// TOP XX Pages\necho \"<table class=\\\"stat\\\">\\n\";\necho \"<tr class=\\\"title\\\"><td colspan=\\\"2\\\">\".sprintf($strings[\"topPages\"],$ntop).\"</td></tr>\\n\";\n$req = \"SELECT (se+ref+other+internal+old) as count, id FROM ${table}_pages ORDER BY count DESC LIMIT 0,$ntop\";\n$res = mysql_query($req,$c);\n$n=0;\nwhile ($row = mysql_fetch_object($res)) {\n\t$n+=1;\n\t$pageid = $row->id;\n\t$count = $row->count;\n\t// $link = simplePageLink($c, $table, $sid, $lang, $row->id, 3);\n\t$pagename = shortenPage(pagename($c,$table,$row->id),3);\n\t$link = linksforpage ($sid, $pagename, $row->id);\n\tif (($n % 2) == 0) { $even = \"even\";} else {$even=\"odd\";}\n\techo \"\\n<tr class=\\\"data $even\\\"><td>$link</td><td width=\\\"25%\\\">\".pageviews($count).\"</td></tr>\\n\";\n}\nif ($n==0) echo \"<tr><td colspan=\\\"2\\\" align=\\\"center\\\">\".$strings['Nothingyet'].\"</td></tr>\\n\";\necho \"</table>\\n\";\n\n\n// Popular pages for search engines\necho \"\\n<table class=\\\"stat\\\">\n<tr class=\\\"title\\\"><td colspan=\\\"2\\\">\".sprintf($strings[\"topPagesSE\"],$ntop).\"</td></tr>\\n\";\n$req = \"SELECT id, (se*(0.+old+se+ref+other+internal)/(GREATEST(se+ref+other+internal,1))) as seC FROM ${table}_pages ORDER BY seC DESC LIMIT 0,$ntop\";\n$res = mysql_query($req,$c);\n$n = 0;\nwhile ($row = mysql_fetch_object($res)) {\n\t$countSE = intval($row->seC);\n\t$n += 1;\n\t$pagename = shortenPage(pagename($c,$table,$row->id),3);\n\t$link = linksforpage ($sid, $pagename, $row->id);\n\tif (($n % 2) == 0) { $even = \"even\";} else {$even=\"odd\";}\n\techo \"\\n<tr class=\\\"data $even\\\"><td>$link</td><td width=\\\"25%\\\">\".hits($countSE).\"</td></tr>\\n\";\n}\nif ($n==0) echo \"<tr><td colspan=\\\"2\\\" align=\\\"center\\\">\".$strings['Nothingyet'].\"</td></tr>\\n\";\necho \"</table>\\n\";\n\necho \"\\n<table class=\\\"stat\\\">\n<tr class=\\\"title\\\"><td colspan=\\\"2\\\">\".sprintf($strings[\"topPagesRef\"],$ntop).\"</td></tr>\\n\";\n$req = \"SELECT id, (ref*(0.+old+se+ref+other+internal)/(GREATEST(se+ref+other+internal,1))) as refC FROM ${table}_pages ORDER BY refC DESC LIMIT 0,$ntop\";\n$res = mysql_query($req,$c);\n$n = 0;\nwhile ($row = mysql_fetch_object($res)) {\n\t$countR = intval($row->refC);\n\t$n += 1;\n\t$pagename = shortenPage(pagename($c,$table,$row->id),3);\n\t$link = linksforpage ($sid, $pagename, $row->id);\n\tif (($n % 2) == 0) { $even = \"even\";} else {$even=\"odd\";}\n\techo \"\\n<tr class=\\\"data $even\\\"><td>$link</td><td width=\\\"25%\\\">\".hits($countR).\"</td></tr>\\n\";\n}\nif ($n==0) echo \"<tr><td colspan=\\\"2\\\" align=\\\"center\\\">\".$strings['Nothingyet'].\"</td></tr>\\n\";\necho \"</table>\\n\";\n\n// Top keywords\necho \"\\n<table class=\\\"stat\\\">\n<tr class=\\\"title\\\"><td colspan=\\\"2\\\">\".sprintf($strings[\"topKwds\"],$ntop).\"</td></tr>\\n\";\n$req = \"SELECT keyword,SUM(count) as count FROM ${table}_keyword GROUP BY LOWER(keyword) ORDER BY count DESC LIMIT 0,$ntop\";\n$res = mysql_query($req,$c);\n$n = 0;\nwhile ($row = mysql_fetch_object($res)) {\n\t$key = mb_strtolower(htmlentities($row->keyword, ENT_NOQUOTES,'UTF-8'),'UTF-8');\n\t$countSE = $row->count;\n\t$n += 1;\n\tif (($n % 2) == 0) { $even = \"even\";} else {$even=\"odd\";}\n\techo \"\\n<tr class=\\\"data $even\\\"><td>$key</td><td width=\\\"25%\\\">\".hits($countSE).\"</td></tr>\\n\";\n}\nif ($n==0) echo \"<tr><td colspan=\\\"2\\\" align=\\\"center\\\">\".$strings['Nothingyet'].\"</td></tr>\\n\";\necho \"</table>\\n\";\n\n\n// Top referrers\necho \"\\n<table class=\\\"stat\\\">\n<tr class=\\\"title\\\"><td colspan=\\\"2\\\">\".sprintf($strings[\"topRefs\"],$ntop).\"</td></tr>\\n\";\n$req = \"SELECT address,SUM(count) as count FROM ${table}_referrer GROUP BY address ORDER BY count DESC LIMIT 0,$ntop\";\n$res = mysql_query($req,$c);\n$n=0;\nwhile ($row = mysql_fetch_object($res)) {\n\t$ref = $row->address;\n\t$countR = $row->count;\n\t$n += 1;\n\t$link = urlLink($ref,3);\n\tif (($n % 2) == 0) { $even = \"even\";} else {$even=\"odd\";}\n\techo \"\\n<tr class=\\\"data $even\\\"><td>$link</td><td width=\\\"25%\\\">\".hits($countR).\"</td></tr>\\n\";\n\n}\nif ($n==0) echo \"<tr><td colspan=\\\"2\\\" align=\\\"center\\\">\".$strings['Nothingyet'].\"</td></tr>\\n\";\necho \"</table>\\n\";\n\n}", "title": "" }, { "docid": "b622268a8e7a2956059ac10bb436e223", "score": "0.55304825", "text": "public function showOSs()\r\n {\r\n echo '<table class=\"sortable\" border=1>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th>OS</th>\r\n\t\t\t\t\t<th># of searches</th>\r\n\t\t\t\t\t<th>%</th>\r\n\t\t\t\t</tr>';\r\n $OSs = $this->analyticalModel->getOSs();\r\n $total = 0;\r\n foreach ($OSs as $val) {\r\n $total += $val;\r\n }\r\n arsort($OSs);\r\n foreach ($OSs as $key => $val) {\r\n $per = $val / $total * 100;\r\n echo '<tr>';\r\n echo '<td>' . $key . '</td>';\r\n echo '<td>' . $val . '</td>';\r\n echo '<td>' . number_format($per, 1) . '%</td>';\r\n echo '</tr>';\r\n }\r\n echo '</table>';\r\n }", "title": "" }, { "docid": "3a4c9d846553089f1f119c9141f9274b", "score": "0.5433719", "text": "public function topTen()\n {\n return $this->results()->orderByDesc('point')->take(10);//take limiti evez edir..\n }", "title": "" }, { "docid": "6d3d8b65ea64f18b80e4b4698e2c575a", "score": "0.543083", "text": "public function showNList($num){\n if(!isset($this->list)) $this->rectentEvents();\n $posts=count($this->list);\n $top = ($num == 0) ? $posts : min($num, $posts);\n $i=0;\n \twhile($i<$top){\n \t\t$id = $this->list[$i][\"id_idea\"];\n \t\t$imagen = $this->list[$i]['imagen'];\n \t\t$nombre = $this->list[$i]['nombre_idea'];\n \t\t$cat = $this->list[$i]['valor'];\n $catId = $this->list[$i]['id_categoria'];\n \t\t$desc = $this->list[$i]['desc_idea'];\n $usu = $this->list[$i]['nombre'];\n\n \t\techo '<a href=\"../views/infoIdea.php?id_idea='.$id.'\">';\n \t\techo '<div id=\"relacionadas\">';\n \t\techo '<img class =\"previewImg\" src= \"'.$imagen.'\">';\n \t\techo '<div class =\"textrel\">';\n \t\techo '<p class=\"namerel\">'.$nombre.'</p>';\n \t\techo '<p class=\"usurel\">'.$usu.'</p>';\n \t\techo '<p class=\"descrel\">'.$desc.'</p>';\n \t\techo '<a class=\"catrel\" href=\"../views/masIdeas.php?cat='.$catId.'\">'.$cat.'</a>';\n \t\techo '</div></div></a>';\n \t\t$i++;\n }\n }", "title": "" }, { "docid": "a51f57d1a2e42372b61f6db0d290df21", "score": "0.5405034", "text": "public function top5()\n {\n $attractions = Attraction::where('approved', 1)->get();\n\n\t $top5 = array();\n\n\t foreach($attractions as $attraction){\n\n\t\t $reviews = Review::where('attraction_id', $attraction->id)->get();\n\n\t\t $count = 0;\n\t\t $total = 0;\n\t\t $average =0;\n\n\t\t foreach($reviews as $review){\n\t\t\t $count++;\n\t\t\t $total = $total + $review->rating;\n\t\t }\n\n\t if($count ==0){\n\t $total=0;\n\t }\n\t else{\n\t $average = $total / $count;\n\t }\n\t\n\t $top5[] = array(\n\t\t 'count' => $count,\n 'average' => $average,\n\t\t 'name' => $attraction->name);\n\t }\n\n $this->aasort($top5,\"average\");\n\n $finalTop5 = array_slice($top5, 0, 5);\n\n\t return view('attractions.top5',compact('finalTop5'));\n }", "title": "" }, { "docid": "24e8dd54cfaf19972dfb5b4eb990431b", "score": "0.53983593", "text": "public function top() {\n\t\t$artists = new Artistmodel();\n\t\t$result = $artists->topArtists();\n\n\t\t$parsedResult = [];\n\t\t\n\t\tif ($result && count($result) > 0) {\t\t\t\n\t\t\tforeach ($result as $artistmodel) {\n\t\t\t\t$parsedResult[] = $artistmodel->toArray();\n\t\t\t}\n\t\t}\n\t\t// Response\n\t\t$this->response->setStatusCode(200);\n\t\treturn $this->response->setJSON([ \n\t\t\t'success' \t=> true, \n\t\t\t'code' \t\t=> HTTP_CODE_OK, \n\t\t\t'result' \t=> $parsedResult\n\t\t]);\n\t}", "title": "" }, { "docid": "a0a041ba8f0500483f30a9be29487915", "score": "0.5362574", "text": "function print_flat_data( $url_params , $title , $flat_data , $sort , $run1 , $run2 , $limit )\n{\nglobal $stats;\nglobal $sortable_columns;\nglobal $vwbar;\nglobal $base_path;\n$size = count( $flat_data );\nif( !$limit )\n{ // no limit\n$limit = $size;\n$display_link = \"\";\n}\nelse\n{\n$display_link = xhprof_render_link( \" [ <b class=bubble>显示全部 </b>]\" , \"$base_path/index.php?\" . http_build_query( xhprof_array_set( $url_params , 'all' , 1 ) ) );\n}\nprint ( \"<h3 align=center>$title $display_link</h3><br>\" ) ;\nprint ( '<table border=1 cellpadding=2 cellspacing=1 width=\"90%\" ' . 'rules=rows bordercolor=\"#bdc7d8\" align=center>' ) ;\nprint ( '<tr bgcolor=\"#bdc7d8\" align=right>' ) ;\nforeach( $stats as $stat )\n{\n$desc = stat_description( $stat );\nif( array_key_exists( $stat , $sortable_columns ) )\n{\n\t$href = \"$base_path/index.php?\" . http_build_query( xhprof_array_set( $url_params , 'sort' , $stat ) );\n\t$header = xhprof_render_link( $desc , $href );\n}\nelse\n{\n\t$header = $desc;\n}\nif( $stat == \"fn\" )\n\tprint ( \"<th align=left><nobr>$header</th>\" ) ;\nelse\n\tprint ( \"<th \" . $vwbar . \"><nobr>$header</th>\" ) ;\n}\nprint ( \"</tr>\\n\" ) ;\nif( $limit >= 0 )\n{\n$limit = min( $size , $limit );\nfor( $i = 0; $i < $limit; $i ++ )\n{\n\tprint_function_info( $url_params , $flat_data[$i] , $sort , $run1 , $run2 );\n}\n}\nelse\n{\n// if $limit is negative, print abs($limit) items starting from the end\n$limit = min( $size , abs( $limit ) );\nfor( $i = 0; $i < $limit; $i ++ )\n{\n\tprint_function_info( $url_params , $flat_data[$size - $i - 1] , $sort , $run1 , $run2 );\n}\n}\nprint ( \"</table>\" ) ;\n// let's print the display all link at the bottom as well...\nif( $display_link )\n{\necho '<div style=\"text-align: left; padding: 2em\">' . $display_link . '</div>';\n}\n}", "title": "" }, { "docid": "b2ed72f8bdebdbcbdea90d3fd6f6a182", "score": "0.5362306", "text": "function Page_ExecutiveSummary() {\n\t\t\t$this->NewPage('pdf/02_execSummary.pdf');\n\n\t\t\t$total_num_lights = 0;\n\t\t\t$total_current_annualCost = 0;\n\t\t\t$total_current_lifetimeCost = 0;\n\t\t\t$total_hylite_annualCost = 0;\n\t\t\t$total_hylite_lifetimeCost = 0;\n\t\t\t$total_initial_investment = 0;\n\t\t\t$total_total_roi = 0;\n\t\t\t$total_payback_months = 0;\n\n\t\t\t$total_co2_offset = 0;\n\t\t\t$total_miles = 0;\n\t\t\t$total_trees = 0;\n\n\t\t\t$total_total_rebates = 0;\n\t\t\t\n\t\t\t// write out the double line column headers...\n\n\t\t\t$col_width = array(\n\t\t\t\t1 => 0.78,\n\t\t\t\t2 => 0.52,\n\t\t\t\t3 => 1.08,\n\t\t\t\t4 => 0.80, \n\t\t\t\t5 => 0.81,\n\t\t\t\t6 => 0.97,\n\t\t\t\t7 => 0.82,\n\t\t\t\t8 => 0.72,\n\t\t\t\t9 => 0.84\n\t\t\t);\n\t\t\n\t\t\t// HyLite Replacement Table\n\n\t\t\t$this->Start_Table(0.50, 2.45);\n\t\t\t$this->border = 0;\n\t\t\t$height = 0.12;\n\n\t\t\t// Column Headers\n\t\t\t$this->Set_FontAndColor('Helvetica', 7, 0, 0, 0, 'B');\n\t\t\t$this->Set_FontColor(0, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(0, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[1], $height, '');\n\t\t\t$this->Cell_RightText($col_width[2], $height, 'Number', 'C');\t\n\n\t\t\t$this->Set_FontColor(255, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(255, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[3], $height, '');\n\t\t\t$this->Cell_RightText($col_width[4], $height, 'Current Lamp', 'C');\n\t\t\t$this->Cell_RightText($col_width[5], $height, 'Current Lamp', 'C');\n\t\t\t\n\t\t\t$this->Set_FontColor(109, 193, 15);\n\t\t\t$this->pdf->SetDrawColor(109, 193, 15);\n\t\t\t$this->Cell_RightText($col_width[6], $height, 'HyLite', 'C');\n\t\t\t$this->Cell_RightText($col_width[7], $height, '');\n\t\t\t$this->Cell_RightText($col_width[8], $height, 'HyLite Lamp', 'C');\n\t\t\t$this->Cell_RightText($col_width[9], $height, 'Energy Savings', 'C');\t\t\t\n\n\t\t\t$this->Next_Row(1, $height);\n\n\t\t\t$this->Set_FontAndColor('Helvetica', 7, 0, 0, 0, 'B');\n\t\t\t$this->Set_FontColor(0, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(0, 0, 0);\t\n\t\t\t$this->Cell_RightText($col_width[1], $height, '');\n\t\t\t$this->Cell_RightText($col_width[2], $height, 'of Lights', 'C');\t\n\n\t\t\t$this->Set_FontColor(255, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(255, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[3], $height, '');\n\t\t\t$this->Cell_RightText($col_width[4], $height, 'Watts', 'C');\n\t\t\t$this->Cell_RightText($col_width[5], $height, 'Life (hrs.)', 'C');\n\t\t\t\n\t\t\t$this->Set_FontColor(109, 193, 15);\n\t\t\t$this->pdf->SetDrawColor(109, 193, 15);\n\t\t\t$this->Cell_RightText($col_width[6], $height, 'Replacement', 'C');\n\t\t\t$this->Cell_RightText($col_width[7], $height, '');\n\t\t\t$this->Cell_RightText($col_width[8], $height, 'Life (hrs.)', 'C');\n\t\t\t$this->Cell_RightText($col_width[9], $height, '(%)', 'C');\n\n\t\t\t$this->Start_Table(0.50, 2.45);\n\t\t\t$this->border = 1;\n\t\t\t$height = 0.24;\n\n\t\t\t$this->Set_FontAndColor('Helvetica', 7, 0, 0, 0, 'B');\n\t\t\t$this->Set_FontColor(0, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(0, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[1], $height, 'Section', 'C');\n\t\t\t\n\t\t\t//$this->pdf->MultiCell(0.52, $height, 'Number\\n of Lights', 'C');\n\t\t\t$this->Cell_RightText($col_width[2], $height, '');\t\n\n\t\t\t$this->Set_FontColor(255, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(255, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[3], $height, 'Current Lamps', 'C');\n\t\t\t$this->Cell_RightText($col_width[4], $height, '');\n\t\t\t$this->Cell_RightText($col_width[5], $height, '', 'C');\n\t\t\t\n\t\t\t$this->Set_FontColor(109, 193, 15);\n\t\t\t$this->pdf->SetDrawColor(109, 193, 15);\n\t\t\t$this->Cell_RightText($col_width[6], $height, '');\n\t\t\t$this->Cell_RightText($col_width[7], $height, 'HyLite Watts', 'C');\n\t\t\t$this->Cell_RightText($col_width[8], $height, '');\n\t\t\t$this->Cell_RightText($col_width[9], $height, '');\n\n\t\t\t// Section Rows\n\t\t\t$this->Start_Table(0.50, 2.69);\n\t\t\t$height = 0.21;\n\n\t\t\t$this->Set_FontAndColor('Helvetica', 7, 0, 0, 0);\n\t\t\t$this->fData->use_sectionData = true;\n\t\t\tfor ($i = 1; $i <= $this->num_sections; $i++)\n\t\t\t{\n\t\t\t\t$this->fData->current_section = $i; // set your section\n\t\t\t\t\n\t\t\t\tif ($i % 2 == 0)\n\t\t\t\t\t$this->pdf->SetFillColor(241, 241, 241);\n\t\t\t\telse\n\t\t\t\t\t$this->pdf->SetFillColor(255, 255, 255);\n\n\t\t\t\t$hylite = new HyliteProduct();\n\t\t\t\t$current = new SectionInfo();\n\t\t\t\t$hylite->Load($this->fData, $this->data('section_hylite_sku'), $current);\n\t\t\t\t$current->Load($this->fData, $hylite);\n\t\t\t\t$hylite->Load_Current($this->fData);\n\t\t\t\t$current->Load_Hylite();\n\t\t\t\t$hylite->Load_Savings();\n\t\t\t\n\t\t\t\t$this->Set_FontColor(0, 0, 0);\n\t\t\t\t$this->pdf->SetDrawColor(0, 0, 0);\n\t\t\t\t$this->Cell_Right($col_width[1], $height, 'section_name', '', 'C', true);\n\t\t\t\t$this->Cell_RightText($col_width[2], $height, $current->num_fixtures * $current->lamps_per_fixture, 'C', true);\n\t\t\t\t\n\t\t\t\t$this->Set_FontColor(255, 0, 0);\n\t\t\t\t$this->pdf->SetDrawColor(255, 0, 0);\n\t\t\t\t$this->Cell_RightText($col_width[3], $height, $current->lamp, 'C', true);\n\t\t\t\t$this->Cell_RightText($col_width[4], $height, number_format($current->watts) . 'W', 'C', true);\n\t\t\t\t$this->Cell_RightText($col_width[5], $height, number_format($current->lamp_life), 'C', true);\n\t\t\t\t\n\t\t\t\t$this->Set_FontColor(109, 193, 15);\n\t\t\t\t$this->pdf->SetDrawColor(109, 193, 15);\n\t\t\t\t$this->Cell_RightText($col_width[6], $height, $hylite->series, 'C', true);\n\t\t\t\t$this->Cell_RightText($col_width[7], $height, number_format($hylite->watts) . 'W', 'C', true);\t\t\t\t\n\t\t\t\t$this->Cell_RightText($col_width[8], $height, number_format($hylite->lamp_life_rated), 'C', true);\n\t\t\t\t\n\t\t\t\t//(Current annual kWh – HyLite annual kWh)/(Current annual kWh)\n\t\t\t\t$energy_savings = ($current->annualUsageKwh - $hylite->annualUsageKwh) / $current->annualUsageKwh;\n\t\t\t\t$energy_savings = round($energy_savings * 100, 0);\n\n\t\t\t\t$this->Cell_RightText($col_width[9], $height, $energy_savings . '%', 'C', true);\n\t\t\t\t\n\t\t\t\t$this->Next_Row($i, $height);\n\t\t\t}\n\n\t\t\t// Financial Comparison Table\n\t\t\t$this->pdf->SetFillColor(0, 0, 0);\n\t\t\t$this->Start_Table(0.50, 4.95);\n\t\t\t$this->border = 0;\n\t\t\t$height = 0.10;\n\n\t\t\t// Column Headers\n\t\t\t$this->Set_FontAndColor('Helvetica', 7, 0, 0, 0, 'B');\n\t\t\t$this->Set_FontColor(0, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(0, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[1], $height, '');\n\t\t\t$this->Cell_RightText($col_width[2], $height, '');\t\n\n\t\t\t$this->Set_FontColor(255, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(255, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[3], $height, '');\n\t\t\t$this->Cell_RightText($col_width[4], $height, 'Current Total', 'C');\n\t\t\t\n\t\t\t$this->Set_FontColor(109, 193, 15);\n\t\t\t$this->pdf->SetDrawColor(109, 193, 15);\n\t\t\t$this->Cell_RightText($col_width[5], $height, 'HyLite Annual', 'C');\n\t\t\t$this->Cell_RightText($col_width[6], $height, '');\n\t\t\t$this->Cell_RightText($col_width[7], $height, '');\n\t\t\t$this->Cell_RightText($col_width[8], $height, '');\n\t\t\t$this->Cell_RightText($col_width[9], $height, '');\n\n\t\t\t$this->Next_Row(1, $height);\n\n\t\t\t$this->Set_FontAndColor('Helvetica', 7, 0, 0, 0, 'B');\n\t\t\t$this->Set_FontColor(0, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(0, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[1], $height, '');\n\t\t\t$this->Cell_RightText($col_width[2], $height, '');\t\n\n\t\t\t$this->Set_FontColor(255, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(255, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[3], $height, '');\n\t\t\t$this->Cell_RightText($col_width[4], $height, 'Cost of', 'C');\n\t\t\t\n\t\t\t$this->Set_FontColor(109, 193, 15);\n\t\t\t$this->pdf->SetDrawColor(109, 193, 15);\n\t\t\t$this->Cell_RightText($col_width[5], $height, 'Cost of', 'C');\n\t\t\t$this->Cell_RightText($col_width[6], $height, '');\n\t\t\t$this->Cell_RightText($col_width[7], $height, '');\n\t\t\t$this->Cell_RightText($col_width[8], $height, '');\n\t\t\t$this->Cell_RightText($col_width[9], $height, '');\n\n\t\t\t$this->Next_Row(2, $height);\n\n\t\t\t$this->Set_FontAndColor('Helvetica', 7, 0, 0, 0, 'B');\n\t\t\t$this->Set_FontColor(0, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(0, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[1], $height, '');\n\t\t\t$this->Cell_RightText($col_width[2], $height, '');\t\n\n\t\t\t$this->Set_FontColor(255, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(255, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[3], $height, '');\n\t\t\t$this->Cell_RightText($col_width[4], $height, 'Ownership', 'C');\n\t\t\t\n\t\t\t$this->Set_FontColor(109, 193, 15);\n\t\t\t$this->pdf->SetDrawColor(109, 193, 15);\n\t\t\t$this->Cell_RightText($col_width[5], $height, 'Ownership', 'C');\n\t\t\t$this->Cell_RightText($col_width[6], $height, '');\n\t\t\t$this->Cell_RightText($col_width[7], $height, '');\n\t\t\t$this->Cell_RightText($col_width[8], $height, '');\n\t\t\t$this->Cell_RightText($col_width[9], $height, '');\t\t\t\n\n\t\t\t$this->Start_Table(0.50, 4.95);\n\t\t\t$this->border = 0;\n\t\t\t$height = 0.15;\n\n\t\t\t$this->Set_FontAndColor('Helvetica', 7, 0, 0, 0, 'B');\n\t\t\t$this->Set_FontColor(0, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(0, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[1], $height, '');\n\t\t\t$this->Cell_RightText($col_width[2], $height, 'Number', 'C');\t\n\n\t\t\t$this->Set_FontColor(255, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(255, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[3], $height, 'Current Annual Cost', 'C');\n\t\t\t$this->Cell_RightText($col_width[4], $height, '', 'C');\n\t\t\t\n\t\t\t$this->Set_FontColor(109, 193, 15);\n\t\t\t$this->pdf->SetDrawColor(109, 193, 15);\n\t\t\t$this->Cell_RightText($col_width[5], $height, '', 'C');\n\t\t\t$this->Cell_RightText($col_width[6], $height, 'Hylite Total Cost of', 'C');\n\t\t\t$this->Cell_RightText($col_width[7], $height, 'Initial');\n\t\t\t$this->Cell_RightText($col_width[8], $height, '');\n\t\t\t$this->Cell_RightText($col_width[9], $height, 'Payback', 'C');\n\n\t\t\t$this->Next_Row(1, $height);\n\n\t\t\t$this->Set_FontColor(0, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(0, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[1], $height, '');\n\t\t\t$this->Cell_RightText($col_width[2], $height, 'of Lights', 'C');\t\n\n\t\t\t$this->Set_FontColor(255, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(255, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[3], $height, 'of Ownership', 'C');\n\t\t\t$this->Cell_RightText($col_width[4], $height, '', 'C');\n\t\t\t\n\t\t\t$this->Set_FontColor(109, 193, 15);\n\t\t\t$this->pdf->SetDrawColor(109, 193, 15);\n\t\t\t$this->Cell_RightText($col_width[5], $height, '', 'C');\n\t\t\t$this->Cell_RightText($col_width[6], $height, 'Ownership', 'C');\n\t\t\t$this->Cell_RightText($col_width[7], $height, 'Investment');\n\t\t\t$this->Cell_RightText($col_width[8], $height, '');\n\t\t\t$this->Cell_RightText($col_width[9], $height, '(Months)', 'C');\n\n\t\t\t$this->Start_Table(0.50, 4.95);\n\t\t\t$this->border = 1;\n\t\t\t// print financial information\n\t\t\t$height = 0.30;\n\n\t\t\t$this->Set_FontAndColor('Helvetica', 7, 0, 0, 0, 'B');\n\t\t\t$this->Set_FontColor(0, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(0, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[1], $height, 'Section', 'C');\n\t\t\t\n\t\t\t//$this->pdf->MultiCell(0.52, $height, \"Number\\n of Lights\", 0);\n\t\t\t$this->Cell_RightText($col_width[2], $height, '');\t\n\n\t\t\t$this->Set_FontColor(255, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(255, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[3], $height, '');\n\t\t\t$this->Cell_RightText($col_width[4], $height, '');\n\t\t\t\n\t\t\t$this->Set_FontColor(109, 193, 15);\n\t\t\t$this->pdf->SetDrawColor(109, 193, 15);\n\t\t\t$this->Cell_RightText($col_width[5], $height, '');\n\t\t\t$this->Cell_RightText($col_width[6], $height, '');\n\t\t\t$this->Cell_RightText($col_width[7], $height, '', 'C');\n\t\t\t$this->Cell_RightText($col_width[8], $height, 'ROI (%)', 'C');\n\t\t\t$this->Cell_RightText($col_width[9], $height, '');\n\n\t\t\t// Section Rows\n\t\t\t$this->Set_FontAndColor('Helvetica', 7, 0, 0, 0); \n\t\t\t$this->Start_Table(0.50, 5.25);\n\t\t\t$height = 0.21;\n\n\t\t\tfor ($i = 1; $i <= $this->num_sections; $i++)\n\t\t\t{\n\t\t\t\t$this->fData->current_section = $i; // set your section\n\t\t\t\t\n\t\t\t\tif ($i % 2 == 0)\n\t\t\t\t\t$this->pdf->SetFillColor(241, 241, 241);\n\t\t\t\telse\n\t\t\t\t\t$this->pdf->SetFillColor(255, 255, 255);\n\n\t\t\t\t$hylite = new HyliteProduct();\n\t\t\t\t$current = new SectionInfo();\n\t\t\t\t$hylite->Load($this->fData, $this->data('section_hylite_sku'), $current);\n\t\t\t\t$current->Load($this->fData, $hylite);\n\t\t\t\t$hylite->Load_Current($this->fData);\n\t\t\t\t$current->Load_Hylite();\n\t\t\t\t$hylite->Load_Savings();\n\t\t\t\n\t\t\t\t$this->Set_FontColor(0, 0, 0);\n\t\t\t\t$this->pdf->SetDrawColor(0, 0, 0);\n\t\t\t\t$this->Cell_Right($col_width[1], $height, 'section_name', '', 'C', true);\n\t\t\t\t$this->Cell_RightText($col_width[2], $height, $current->num_fixtures * $current->lamps_per_fixture, 'C', true);\n\t\t\t\t$total_num_lights += $current->num_fixtures * $current->lamps_per_fixture;\n\t\t\t\t\n\t\t\t\t$this->Set_FontColor(255, 0, 0);\n\t\t\t\t$this->pdf->SetDrawColor(255, 0, 0);\n\t\t\t\t$this->Cell_RightText($col_width[3], $height, '$' . number_format($current->annualCost, 2), 'C', true);\n\t\t\t\t$total_current_annualCost += $current->annualCost;\n\t\t\t\t$this->Cell_RightText($col_width[4], $height, '$' . number_format($current->lifetimeCost, 2), 'C', true);\n\t\t\t\t$total_current_lifetimeCost += $current->lifetimeCost;\n\n\t\t\t\t$this->Set_FontColor(109, 193, 15);\n\t\t\t\t$this->pdf->SetDrawColor(109, 193, 15);\n\t\t\t\t$this->Cell_RightText($col_width[5], $height, '$' . number_format($hylite->annualCost, 2), 'C', true);\n\t\t\t\t$total_hylite_annualCost += $hylite->annualCost;\n\t\t\t\t$this->Cell_RightText($col_width[6], $height, '$' . number_format($hylite->lifetimeCost, 2), 'C', true);\n\t\t\t\t$total_hylite_lifetimeCost += $hylite->lifetimeCost;\n\t\t\t\t$this->Cell_RightText($col_width[7], $height, '$' . number_format($hylite->initial_investment, 2), 'C', true);\n\t\t\t\t$total_initial_investment += $hylite->initial_investment;\n\t\t\t\t$this->Cell_RightText($col_width[8], $height, number_format($hylite->total_roi) . '%', 'C', true);\n\t\t\t\t//$total_total_roi += $hylite->total_roi;\n\t\t\t\t$this->Cell_RightText($col_width[9], $height, $hylite->payback_months, 'C', true);\n\t\t\t\t//$total_payback_months += $hylite->payback_months;\n\t\t\t\t\n\t\t\t\t$total_co2_offset += $hylite->co2_offset;\n\t\t\t\t$total_miles += $hylite->miles;\n\t\t\t\t$total_trees += $hylite->trees;\n\n\t\t\t\t$total_total_rebates += $current->rebates_total;\n\n\t\t\t\t$this->Next_Row($i, $height);\n\t\t\t}\n\t\t\t$this->pdf->SetFillColor(0, 0, 0);\n\t\t\t$this->fData->use_sectionData = false;\n\t\t\t\n\t\t\t// Summary Line\n\t\t\t$this->Set_FontAndColor('Helvetica', 7, 0, 0, 0, 'B');\n\t\t\t$this->pdf->SetDrawColor(0, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[1], $height, 'Total');\n\t\t\t$this->Set_FontAndColor('Helvetica', 7, 0, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[2], $height, $total_num_lights);\n\t\t\t\n\t\t\t$this->Set_FontColor(255, 0, 0);\n\t\t\t$this->pdf->SetDrawColor(255, 0, 0);\n\t\t\t$this->Cell_RightText($col_width[3], $height, '$' . number_format($total_current_annualCost, 2));\n\t\t\t$this->Cell_RightText($col_width[4], $height, '$' . number_format($total_current_lifetimeCost, 2));\n\t\t\t\n\t\t\t$this->Set_FontColor(109, 193, 15);\n\t\t\t$this->pdf->SetDrawColor(109, 193, 15);\n\t\t\t$this->Cell_RightText($col_width[5], $height, '$' . number_format($total_hylite_annualCost, 2));\n\t\t\t$this->Cell_RightText($col_width[6], $height, '$' . number_format($total_hylite_lifetimeCost, 2));\n\t\t\t$this->Cell_RightText($col_width[7], $height, '$' . number_format($total_initial_investment, 2));\n\n\t\t\t// now subtract the rebates\n\t\t\t$total_initial_investment -= $total_total_rebates;\n\n\t\t\t$total_total_roi = ((($total_current_lifetimeCost - $total_hylite_lifetimeCost) - $total_initial_investment) / $total_initial_investment) * 100;\n\t\t\t$this->Cell_RightText($col_width[8], $height, number_format($total_total_roi) . '%');\n\t\t\t$total_payback_months = ($total_initial_investment / ($total_current_annualCost - $total_hylite_annualCost)) * 12;\n\t\t\t$this->Cell_RightText($col_width[9], $height, number_format($total_payback_months));\n\n\t\t\t// Available Incentives\n\t\t\t$y = 6.72 - ((6 - $this->num_sections) * $height);\n\t\t\t$this->Start_Table(3.68, $y);\n\t\t\t$this->Set_FontColor(109, 193, 15);\n\t\t\t$this->pdf->SetDrawColor(109, 193, 15);\n\n\t\t\t$this->Cell_RightText(1.78, $height, 'Available Incentives', 'R');\n\t\t\t$this->Cell_RightText(0.82, $height, '$' . number_format($total_total_rebates, 2));\n\t\t\t\n\t\t\t$this->Next_Row(1, $height);\n\t\t\t$this->Cell_RightText(1.78, $height, 'Net Investment', 'R');\n\t\t\t$this->Cell_RightText(0.82, $height, '$' . number_format($total_initial_investment, 2));\n\n\t\t\t// Environmental Impact, Financial Summary, Net Invetment\n\t\t\t\n\t\t\t// turn border back off\n\t\t\t$this->border = 0;\n\n\t\t\t// environmental impact\n\t\t\t$width = 0.65;\n\t\t\t$height = 0.28;\n\t\t\t$this->Start_Table(2.30, 8.22);\n\t\t\t$this->Set_FontAndColor('Helvetica', 8, 109, 193, 15);\n\t\t\t$this->Cell_DownText($width, $height, number_format($total_co2_offset));\n\t\t\t$this->Cell_DownText($width, $height, number_format($total_miles));\n\t\t\t$this->Cell_DownText($width, $height, number_format($total_trees));\n\n\t\t\t// financial summary\n\t\t\t$width = 0.75;\n\t\t\t$height = 0.30;\n\t\t\t$this->Start_Table(4.80, 8.22);\n\t\t\t$this->Set_FontAndColor('Helvetica', 8, 109, 193, 15);\n\t\t\t$this->Cell_DownText($width, $height, '$' . number_format($total_current_annualCost - $total_hylite_annualCost, 2));\n\t\t\t$this->Cell_DownText($width, $height, '$' . number_format($total_current_lifetimeCost - $total_hylite_lifetimeCost, 2));\n\t\t\t$this->Cell_DownText($width, $height, number_format($total_total_roi) . '%');\n\t\t\t$this->Cell_DownText($width, $height, number_format($total_payback_months));\n\t\t\t$this->Cell_DownText($width, $height, '$' . number_format(($total_current_annualCost - $total_hylite_annualCost) / 365, 2));\t\t\t\n\t\t\t//$this->Cell_DownText($width, $height, '$' . number_format(round($total_current_annualCost - $total_hylite_annualCost / 365, 2), 2));\n\t\t\t\n\t\t\t// net investment\n\t\t\t$this->Start_Table(5.92, 8.20);\n\t\t\t$this->Set_FontAndColor('Helvetica', 18, 109, 193, 15);\n\t\t\t$this->Cell_DownText(1.50, 0.55, '$' . number_format($total_initial_investment, 2));\n\t\t}", "title": "" }, { "docid": "1a287b4a5ca864024dcf56ab9a23598d", "score": "0.5358787", "text": "function displayStats() {\r\n \r\n $template = $this->cObj->getSubpart($this->template,\"###STATISTICS###\");\r\n\r\n // Count all entries\r\n $count_all = @mysql_fetch_object($GLOBALS['TYPO3_DB']->sql(TYPO3_db,\"\r\n SELECT \r\n count(uid) AS anzahl\r\n FROM \r\n \" . $this->dbTable1 . \"\r\n \"));\r\n \r\n // Count all hidden entries\r\n $count_hidden = @mysql_fetch_object($GLOBALS['TYPO3_DB']->sql(TYPO3_db,\"\r\n SELECT \r\n count(uid) AS anzahl\r\n FROM \r\n \" . $this->dbTable1 . \"\r\n WHERE \r\n hidden = 1\r\n AND \r\n deleted = 0\r\n \"));\r\n \r\n // Count all deleted entries\r\n $count_deleted = @mysql_fetch_object($GLOBALS['TYPO3_DB']->sql(TYPO3_db,\"\r\n SELECT \r\n count(uid) AS anzahl\r\n FROM \r\n \" . $this->dbTable1 . \"\r\n WHERE \r\n deleted = 1\r\n AND \r\n hidden = 0\r\n \"));\r\n \r\n // Count categories\r\n $count_cats = @mysql_fetch_object($GLOBALS['TYPO3_DB']->sql(TYPO3_db,\"\r\n SELECT \r\n count(uid) AS anzahl\r\n FROM \r\n \" . $this->dbTable2 . \"\r\n WHERE \r\n hidden = 0\r\n AND \r\n deleted = 0\r\n \"));\r\n \r\n // Count clicks today of all entries\r\n $count_clicks = @mysql_fetch_object($GLOBALS['TYPO3_DB']->sql(TYPO3_db,\"\r\n SELECT \r\n count(uid) AS anzahl\r\n FROM \r\n \" . $this->dbTable6 . \"\r\n WHERE \r\n hidden = 0\r\n AND \r\n deleted = 0\r\n AND \r\n logdate = CURDATE()\r\n \"));\r\n \r\n // Count all clicks of of all entries\r\n $count_clicks_all = @mysql_fetch_object($GLOBALS['TYPO3_DB']->sql(TYPO3_db,\"\r\n SELECT \r\n count(uid) AS anzahl\r\n FROM \r\n \" . $this->dbTable6 . \"\r\n WHERE \r\n hidden = 0\r\n AND \r\n deleted = 0\r\n \"));\r\n \r\n // Count all clicks yesterday of of all entries\r\n $count_clicks_yesterday = @mysql_fetch_object($GLOBALS['TYPO3_DB']->sql(TYPO3_db,\"\r\n SELECT \r\n count(uid) AS anzahl\r\n FROM \r\n \" . $this->dbTable6 . \"\r\n WHERE \r\n hidden = 0\r\n AND \r\n deleted = 0\r\n AND \r\n logdate = CURDATE()-1\r\n \"));\r\n \r\n $markerArray['###STAT_ALL###'] = isset($count_all->anzahl) ? $count_all->anzahl : '0';\r\n $markerArray['###STAT_HIDDEN###'] = isset($count_hidden->anzahl) ? $count_hidden->anzahl : '0';\r\n $markerArray['###STAT_DELETED###'] = isset($count_deleted->anzahl) ? $count_deleted->anzahl : '0';\r\n $markerArray['###STAT_CAT###'] = isset($count_cats->anzahl) ? $count_cats->anzahl : '0';\r\n $markerArray['###STAT_CLICKS_TODAY###'] = isset($count_clicks->anzahl) ? $count_clicks->anzahl : '0';\r\n $markerArray['###STAT_CLICKS_ALL###'] = isset($count_clicks_all->anzahl) ? $count_clicks_all->anzahl : '0';\r\n $markerArray['###STAT_CLICKS_YESTERDAY###'] = isset($count_clicks_yesterday->anzahl) ? $count_clicks_yesterday->anzahl : '0';\r\n\r\n $markerArray['###LANG_STATISTIC###'] = $this->sprintf2(\r\n $this->pi_getLL('statistic'), \r\n array(\r\n 'stat_all' => $markerArray['###STAT_ALL###'],\r\n 'stat_hidden' => $markerArray['###STAT_HIDDEN###'],\r\n 'stat_deleted' => $markerArray['###STAT_DELETED###'],\r\n 'stat_cat' => $markerArray['###STAT_CAT###'],\r\n 'stat_clicks_all' => $markerArray['###STAT_CLICKS_ALL###'],\r\n 'stat_clicks_today' => $markerArray['###STAT_CLICKS_TODAY###'],\r\n 'stat_clicks_yesterday' => $markerArray['###STAT_CLICKS_YESTERDAY###']\r\n )\r\n );\r\n \r\n return $this->cObj->substituteMarkerArrayCached($template,$markerArray,array(),$wrappedSubpartArray);\r\n }", "title": "" }, { "docid": "48d02f4a02915b2572917cd054b23029", "score": "0.53548956", "text": "function er_summary_table($variables){\n\t$ranges = $variables['ranges'];\n\t$debug = $variables['debug'];\n\t$ret = array('#theme'=>'table');\n\t//$content_types = er_content_types();\n\t//$ct_info = node_type_get_types();\n\t$ret['#header'][] = \"Categories of Accomplishments\";\n\t$ret['#header'][] = \"Inception<br>through<br>\" . date(ER_DATE_FORMAT);\n\tforeach ($ranges as $k=>$v)\n\t\t$ret['#header'][] = date(ER_DATE_FORMAT, $v[0]).\"<br>through<br>\".date(ER_DATE_FORMAT, $v[1]);\n\t\n\t$types = variable_get('er_summary_types');//see er/includes/er.admin.inc\n\tif (isset($types) && count($types)){\n\t\tforeach ($types as $k=>$type){\n\t\t\t$data = array();\n\t\t\t$view_name = \"er_summary_$type\";//$type.'_summary_view';\n\t\t\tif ($view = views_get_view($view_name)){\n\t\t\t\t$view->set_display('count');\n\t\t\t\t$view->execute();\n\t\t\t\t//dsm($view);\n\t\t\t\t$data[] = er_format_label($type, $view, $ranges);//$ct_info[$type]->name;\n\t\t\t\tif (isset($view->result[0]->nid))\n\t\t\t\t\t$data[] = $view->result[0]->nid;//this is the node count //old way: $view->total_rows;\n\t\t\t\telse\n\t\t\t\t\t$data[] = $view->result[0]->uid;//need this for the participants row...\n\t\t\t\tforeach ($ranges as $k=>$v){\n\t\t\t\t\t$view = views_get_view($view_name);\n\t\t\t\t\t$view->set_display('count');\n\t\t\t\t\t//dsm(date('Y-m-d', $v[0]) . ' through '. date('Y-m-d', $v[1]));\n\t\t\t\t\t\t$view->exposed_input['start_date']['value']['date'] = date('Y-m-d', $v[0]);\n\t\t\t\t\t$view->exposed_input['end_date']['value']['date'] = date('Y-m-d', $v[1]);\n\t\t\t\t\t//$view->set_items_per_page(1);\n\t\t\t\t\t$view->execute();\n\t\t\t\t\t$count = isset($view->result[0]->nid)?$view->result[0]->nid:$view->result[0]->uid;//count nodes or users\n\t\t\t\t\t$data[] = $count>0?$count:0;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdrupal_set_message(t('View not found: @name', array('@name'=>$view_name)), 'error');\n\t\t\t}\n\t\t\t$ret['#rows'][] = $data;\n\t\t\t//d($data, '$data');\n\t\t}\n\t}else{\n\t\t$link = l('click here', 'admin/config/epscor/er');\n\t\t$message = \"An administrator needs to select which content types you want to see on the summary table! $link\";\n\t\tdrupal_set_message($message, 'error');\n\t}\n\t\n\t$range = er_get_reporting_range();\n\t$date_label = ' ('.date('n/j/y', $range[0]).' - '.date('n/j/y', $range[1]).')';\n\t\n\t$user_can_download = user_access(ER_DOWNLOAD_PERMISSION);\n\t$ret = array(\n\t\t'table'=>$ret,\n\t\t'asterisk' => array(\n\t\t\t'#type' => 'markup',\n\t\t\t'#markup' => \"* Grant/Proposal counts include all grants regardless of status.\"\n\t\t),\n\t\t'download' => array(\n\t\t\t'#type' => 'markup',\n\t\t\t'#access' => $user_can_download,\n\t\t\t'#markup' => '<p style=\"text-align:center;\">'.er_create_download_link('Download EPSCoR Reporting Core Tables'.$date_label, 'excel').\"</p>\",\n\t\t)\n\t);\n\treturn render($ret);\n}", "title": "" }, { "docid": "cf5b7cf76b7d3025b980f32ee2ed3cb6", "score": "0.53509736", "text": "function summary_print_by_age() {\n\t$t_project_id = helper_get_current_project();\n\t$t_resolved = config_get( 'bug_resolved_status_threshold' );\n\n\t$t_specific_where = helper_project_specific_where( $t_project_id );\n\tif( ' 1<>1' == $t_specific_where ) {\n\t\treturn;\n\t}\n\tdb_param_push();\n\t$t_query = 'SELECT * FROM {bug}\n\t\t\t\tWHERE status < ' . db_param() . '\n\t\t\t\tAND ' . $t_specific_where . '\n\t\t\t\tORDER BY date_submitted ASC, priority DESC';\n\t$t_result = db_query( $t_query, array( $t_resolved ) );\n\n\t$t_count = 0;\n\t$t_private_bug_threshold = config_get( 'private_bug_threshold' );\n\n\twhile( $t_row = db_fetch_array( $t_result ) ) {\n\t\t# as we select all from bug_table, inject into the cache.\n\t\tbug_cache_database_result( $t_row );\n\n\t\t# Skip private bugs unless user has proper permissions\n\t\tif( ( VS_PRIVATE == bug_get_field( $t_row['id'], 'view_state' ) ) && ( false == access_has_bug_level( $t_private_bug_threshold, $t_row['id'] ) ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif( $t_count++ == 10 ) {\n\t\t\tbreak;\n\t\t}\n\n\t\t$t_bugid = string_get_bug_view_link( $t_row['id'], false );\n\t\t$t_summary = string_display_line( $t_row['summary'] );\n\t\t$t_days_open = intval( ( time() - $t_row['date_submitted'] ) / SECONDS_PER_DAY );\n\n\t\techo '<tr>' . \"\\n\";\n\t\techo '<td class=\"small\">' . $t_bugid . ' - ' . $t_summary . '</td><td class=\"align-right\">' . $t_days_open . '</td>' . \"\\n\";\n\t\techo '</tr>' . \"\\n\";\n\t}\n}", "title": "" }, { "docid": "b0aa03f74c7e1199208a89e0c14b1f4a", "score": "0.53441614", "text": "function show_more($iter,$maxiter,$url,$urlquery) {\n global $sess;\n\n $iter /=10;\n echo \"<table border=0 width=600><tr>\";\n echo \"<td>&nbsp;</td>\\n\";\n echo \"<td align=right>\";\n\n $maxiter= Floor($maxiter);\n\n if ($iter > 3) {\n echo \"<a href=\\\"\".$sess->url($url).$sess->add_query($urlquery).$sess->add_query(array(\"iter\" => 0)).\"\\\">&lt;&lt;</a>\\n\";\n }\n\n $number = $iter - 3;\n if ($number < 0) $number = 0;\n if ($iter > 2) {\n echo \"<a href=\\\"\".$sess->url($url).$sess->add_query($urlquery).$sess->add_query(array(\"iter\" => $number)).\"\\\">&lt;</a>\\n\";\n }\n\n switch ($iter) {\n case 0: $bias=0; break;\n case 1: $bias=1; break;\n case ($maxiter-1): if ($iter>3) {$bias=3;} else {$bias=2;} break;\n case ($maxiter): if ($iter>4) {$bias=4;} else {$bias=2;} break;\n default: $bias=2; break;\n }\n\n for($i=$iter-$bias;$i<$maxiter+1 && $i<($iter+5-$bias);$i++) {\n $number1 = $i*10 +1;\n $number2 = $number1 + 9;\n $number = strval($number1).\"-\".strval($number2);\n if ($i != $iter) {\n echo \"<a href=\\\"\".$sess->url($url).$sess->add_query($urlquery).$sess->add_query(array(\"iter\" => $i)).\"\\\">&nbsp;$number</a>\\n\";\n }\n else echo \"<B>&nbsp;$number</B>\\n\"; \n }\n\n $number = $iter + 5 - $bias;\n if ($number > $maxiter+$bias) $number =$maxiter+$bias;\n if ($iter < $maxiter-4+$bias) {\n echo \"<a href=\\\"\".$sess->url($url).$sess->add_query($urlquery).$sess->add_query(array(\"iter\" => $number)).\"\\\"> &gt;</a>\\n\";\n }\n\n $number = $iter + 10 - $bias;\n if ($number > $maxiter) $number = $maxiter;\n if ($iter < $maxiter-5 +$bias) {\n echo \"<a href=\\\"\".$sess->url($url).$sess->add_query($urlquery).$sess->add_query(array(\"iter\" => $number)).\"\\\"> &gt;&gt;</a>\\n\";\n }\n\n echo \"</td>\\n\";\n echo \"</tr></table><BR>\";\n}", "title": "" }, { "docid": "74de433f0303325a8fe6cd2786d2fb48", "score": "0.5333642", "text": "public function display_top_reports(){\r\n\t\tob_start();\r\n\r\n\t\t$top_reports = $this->get_top_reports();\r\n\r\n\t\t$mr_page_id = get_page_id_by_template('page-templates/market-reports-template.php');\r\n\t\t$mr_url = (isset($mr_page_id[0])) ? get_permalink($mr_page_id[0]) : ''; \r\n\t\t\r\n\t\tinclude($this->public_url . '/view/market-reports-homepage.php');\r\n\r\n\t\treturn ob_get_clean();\r\n\t}", "title": "" }, { "docid": "aa94a228b5f4b662d66305500de49990", "score": "0.531859", "text": "public function run()\n {\n //\n $top = User::join('addresses','addresses.user_id','=','users.id')\n ->join('provinsis','provinsis.kode_provinsi' ,'=','addresses.provinsi')\n ->select('provinsis.provinsi',\\DB::raw(' COUNT(provinsis.provinsi) as total'))->groupBy('provinsis.provinsi')\n ->orderBy('total','desc')\n ->take(5)\n ->get();\n\n return view('widgets.top_daerah', [\n 'config' => $this->config,\n 'top' => $top,\n ]);\n }", "title": "" }, { "docid": "447e36b4ccf2a71cc24fc72adf603450", "score": "0.52963644", "text": "function show_tshirt_summary ()\n{\n\n if (! user_has_priv (PRIV_CON_COM))\n return display_access_error ();\n\n $small = 0;\n $medium = 0;\n $large = 0;\n $xlarge = 0;\n $xxlarge = 0;\n $x3large = 0;\n $x4large = 0;\n $x5large = 0;\n\n $small_2 = 0;\n $medium_2 = 0;\n $large_2 = 0;\n $xlarge_2 = 0;\n $xxlarge_2 = 0;\n $x3large_2 = 0;\n $x4large_2 = 0;\n $x5large_2 = 0;\n\n $count = 0;\n\n // Get the list of orders\n\n $sql = 'SELECT Small, Medium, Large, XLarge, XXLarge,';\n $sql .= ' X3Large, X4Large, X5Large,';\n $sql .= ' Small_2, Medium_2, Large_2, XLarge_2, XXLarge_2,';\n $sql .= ' X3Large_2, X4Large_2, X5Large_2';\n $sql .= ' FROM TShirts';\n $result = mysql_query ($sql);\n if (! $result)\n return display_mysql_error ('Query for TShirts failed', $sql);\n\n display_header (CON_NAME . ' Shirt Order Summary');\n\n while ($row = mysql_fetch_object ($result))\n {\n $small += $row->Small;\n $medium += $row->Medium;\n $large += $row->Large;\n $xlarge += $row->XLarge;\n $xxlarge += $row->XXLarge;\n $x3large += $row->X3Large;\n $x4large += $row->X4Large;\n $x5large += $row->X5Large;\n\n $small_2 += $row->Small_2;\n $medium_2 += $row->Medium_2;\n $large_2 += $row->Large_2;\n $xlarge_2 += $row->XLarge_2;\n $xxlarge_2 += $row->XXLarge_2;\n $x3large_2 += $row->X3Large_2;\n $x4large_2 += $row->X4Large_2;\n $x5large_2 += $row->X5Large_2;\n\n if ((0 != $row->Small) ||\n\t(0 != $row->Medium) ||\n\t(0 != $row->Large) ||\n\t(0 != $row->XLarge) ||\n\t(0 != $row->XXLarge) ||\n\t(0 != $row->X3Large) ||\n\t(0 != $row->X4Large) ||\n\t(0 != $row->X5Large) ||\n\t(0 != $row->Small_2) ||\n\t(0 != $row->Medium_2) ||\n\t(0 != $row->Large_2) ||\n\t(0 != $row->XLarge_2) ||\n\t(0 != $row->XXLarge_2) ||\n\t(0 != $row->X3Large_2) ||\n\t(0 != $row->X4Large_2) ||\n\t(0 != $row->X5Large_2))\n $count++;\n }\n\n $total = $small + $medium + $large + $xlarge + $xxlarge;\n $total += $x3large + $x4large + $x5large;\n\n $total += $small_2 + $medium_2 + $large_2 + $xlarge_2 + $xxlarge_2;\n $total += $x3large_2 + $x4large_2 + $x5large_2;\n\n echo \"<table border=\\\"1\\\">\\n\";\n printf (\" <tr><th>&nbsp;</th><th>%s</th><th>%s</th></tr>\\n\",\n\t SHIRT_NAME, SHIRT_2_NAME);\n printf (\" <tr align=\\\"center\\\"><th>%s:</th><td>%d</td><td>%d</td></tr>\\n\",\n\t 'Small', $small, $small_2);\n printf (\" <tr align=\\\"center\\\"><th>%s:</th><td>%d</td><td>%d</td></tr>\\n\",\n\t 'Medium', $medium, $medium_2);\n printf (\" <tr align=\\\"center\\\"><th>%s:</th><td>%d</td><td>%d</td></tr>\\n\",\n\t 'Large', $large, $large_2);\n printf (\" <tr align=\\\"center\\\"><th>%s:</th><td>%d</td><td>%d</td></tr>\\n\",\n\t 'XLarge', $xlarge, $xlarge_2);\n printf (\" <tr align=\\\"center\\\"><th>%s:</th><td>%d</td><td>%d</td></tr>\\n\",\n\t 'XXLarge', $xxlarge, $xxlarge_2);\n printf (\" <tr align=\\\"center\\\"><th>%s:</th><td>%d</td><td>%d</td></tr>\\n\",\n\t 'X3Large', $x3large, $x3large_2);\n printf (\" <tr align=\\\"center\\\"><th>%s:</th><td>%d</td><td>%d</td></tr>\\n\",\n\t 'X4Large', $x4large, $x4large_2);\n printf (\" <tr align=\\\"center\\\"><th>%s:</th><td>%d</td><td>%d</td></tr>\\n\",\n\t 'X5Large', $x5large, $x5large_2);\n echo \" <tr align=\\\"center\\\"><th>Total:</th><th colspan=\\\"2\\\">$total shirts</th></tr>\\n\";\n echo \"</table>\\n\";\n}", "title": "" }, { "docid": "f1660ef06e0627fa4df634dcbd3eef94", "score": "0.52698797", "text": "function overview()\n\t{\n\t\t$page_request=_request_page(get_zone_default_page(''),'');\n\t\t$page=$page_request[count($page_request)-1];\n\t\tif (is_array($page)) $page=$page['r_to_page'];\n\n\t\t$title=get_page_title('OVERVIEW_STATISTICS');\n\n\t\tlist($graph_views_monthly,$list_views_monthly)=array_values($this->views_per_x($page,'views_hourly','VIEWS_PER_MONTH','DESCRIPTION_VIEWS_PER_MONTH',730,8766));\n\n\t\t//************************************************************************************************\n\t\t// Views\n\t\t//************************************************************************************************\n\t\t$start=get_param_integer('start_views',0);\n\t\t$max=get_param_integer('max_views',30);\n\t\t$sortables=array('date_and_time'=>do_lang_tempcode('DATE_TIME'));\n\t\tlist($sortable,$sort_order)=explode(' ',get_param('sort_views','date_and_time DESC'));\n\t\tif (((strtoupper($sort_order)!='ASC') && (strtoupper($sort_order)!='DESC')) || (!array_key_exists($sortable,$sortables)))\n\t\t\tlog_hack_attack_and_exit('ORDERBY_HACK');\n\t\tglobal $NON_CANONICAL_PARAMS;\n\t\t$NON_CANONICAL_PARAMS[]='sort_views';\n\n\t\t// NB: not used in default templates\n\t\t$where=db_string_equal_to('the_page',$page);\n\t\tif (substr($page,0,6)=='pages/') $where.=' OR '.db_string_equal_to('the_page','/'.$page); // Legacy compatibility\n\t\t$rows=$GLOBALS['SITE_DB']->query('SELECT date_and_time FROM '.get_table_prefix().'stats WHERE ('.$where.') ORDER BY '.$sortable.' '.$sort_order);\n\t\tif (count($rows)<1)\n\t\t{\n\t\t\t$list_views=new ocp_tempcode();\n\t\t}\n\t\telse\n\t\t{\n\t\t\trequire_code('templates_results_table');\n\t\t\t$fields_title=results_field_title(array(do_lang_tempcode('DATE_TIME'),do_lang_tempcode('COUNT_VIEWS')),$sortables,'sort',$sortable.' '.$sort_order);\n\t\t\t$fields=new ocp_tempcode();\n\t\t\t$i=0;\n\t\t\twhile (array_key_exists($i,$rows))\n\t\t\t{\n\t\t\t\t$row=$rows[$i];\n\t\t\t\t$date=get_timezoned_date($row['date_and_time'],false);\n\t\t\t\t$week=round($row['date_and_time']/(60*60*24*7));\n\t\t\t\t$views=0;\n\t\t\t\twhile (array_key_exists($i+$views,$rows))\n\t\t\t\t{\n\t\t\t\t\t$_week=round($row['date_and_time']/(60*60*24*7));\n\n\t\t\t\t\tif ($_week!=$week) break;\n\n\t\t\t\t\t$views++;\n\t\t\t\t}\n\t\t\t\t$i+=$views;\n\t\t\t\tif ($i<$start) continue; elseif ($i>=$start+$max) break;\n\t\t\t\t$fields->attach(results_entry(array($date,integer_format($views)),true));\n\t\t\t}\n\t\t\t$list_views=results_table(do_lang_tempcode('PAGES_STATISTICS',escape_html($page)),$start,'start_views',$max,'max_views',$i,$fields_title,$fields,$sortables,$sortable,$sort_order,'sort_views');\n\t\t}\n\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('SITE_STATISTICS'))));\n\n\t\treturn do_template('STATS_OVERVIEW_SCREEN',array('_GUID'=>'71be91ba0d83368e1e1ceaf39e506610','TITLE'=>$title,'STATS_VIEWS'=>$list_views,'GRAPH_VIEWS_MONTHLY'=>$graph_views_monthly,'STATS_VIEWS_MONTHLY'=>$list_views_monthly,));\n\t}", "title": "" }, { "docid": "3ba6ae531652543dc45d30fb0066a55a", "score": "0.5269571", "text": "public function showBrowsers()\r\n {\r\n echo '<table class=\"sortable\" border=1>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th>Browser</th>\r\n\t\t\t\t\t<th># of searches</th>\r\n\t\t\t\t\t<th>%</th>\r\n\t\t\t\t</tr>';\r\n $browsers = $this->analyticalModel->getBrowsers();\r\n $total = 0;\r\n foreach ($browsers as $val) {\r\n $total += $val;\r\n }\r\n arsort($browsers);\r\n foreach ($browsers as $key => $val) {\r\n $per = $val / $total * 100;\r\n echo '<tr>';\r\n echo '<td>' . $key . '</td>';\r\n echo '<td>' . $val . '</td>';\r\n echo '<td>' . number_format($per, 1) . '%</td>';\r\n echo '</tr>';\r\n }\r\n echo '</table>';\r\n }", "title": "" }, { "docid": "4f316ba41cd0f4a49bb3fe7e39f96bc7", "score": "0.5259112", "text": "public function getMostViewedBooks($connection){\n $query = \"SELECT * FROM book_info ORDER BY view_count DESC LIMIT 0,3\";\n $result = $connection->query($query);\n return $result;\n }", "title": "" }, { "docid": "9b3e740d69d7be2cedd5dac62780dfa8", "score": "0.5224925", "text": "function ssi_topTopics($type = 'replies', $num_topics = 10, $output_method = 'echo')\n{\n\tglobal $txt, $scripturl;\n\n\trequire_once(SUBSDIR . '/Stats.subs.php');\n\n\tif (function_exists('topTopic' . ucfirst($type)))\n\t{\n\t\t$function = 'topTopic' . ucfirst($type);\n\t}\n\telse\n\t{\n\t\t$function = 'topTopicReplies';\n\t}\n\n\t$topics = $function($num_topics);\n\n\tforeach ($topics as $topic_id => $row)\n\t{\n\t\t$row['subject'] = censor($row['subject']);\n\n\t\t$topics[$topic_id]['href'] = $scripturl . '?topic=' . $row['id'] . '.0';\n\t\t$topics[$topic_id]['link'] = '<a href=\"' . $scripturl . '?topic=' . $row['id'] . '.0\">' . $row['subject'] . '</a>';\n\t}\n\n\tif ($output_method !== 'echo' || empty($topics))\n\t{\n\t\treturn $topics;\n\t}\n\n\techo '\n\t\t<table class=\"top_topic ssi_table\">\n\t\t\t<tr>\n\t\t\t\t<th class=\"link\"></th>\n\t\t\t\t<th class=\"centertext views\">', $txt['views'], '</th>\n\t\t\t\t<th class=\"centertext num_replies\">', $txt['replies'], '</th>\n\t\t\t</tr>';\n\n\tforeach ($topics as $topic)\n\t{\n\t\techo '\n\t\t\t<tr>\n\t\t\t\t<td class=\"link\">\n\t\t\t\t\t', $topic['link'], '\n\t\t\t\t</td>\n\t\t\t\t<td class=\"centertext views\">', $topic['num_views'], '</td>\n\t\t\t\t<td class=\"centertext num_replies\">', $topic['num_replies'], '</td>\n\t\t\t</tr>';\n\t}\n\n\techo '\n\t\t</table>';\n}", "title": "" }, { "docid": "6a4e178697e7f7b7cbe5fbc6b66bcdc2", "score": "0.5201694", "text": "public static function dislay_top_abandoned_products() {\n global $wpdb;\n $abandoned_products = $wpdb->get_results($wpdb->prepare(\"SELECT DISTINCT product.ID,count(product.ID) as count FROM {$wpdb->postmeta} as pm \n INNER JOIN {$wpdb->posts} as product ON FIND_IN_SET(product.ID, pm.meta_value) \n INNER JOIN {$wpdb->posts} as cartlist ON cartlist.ID=pm.post_id\n WHERE pm.meta_key=%s AND product.post_type=%s AND cartlist.post_type=%s AND cartlist.post_status=%s\n GROUP BY product.ID order by count(product.ID) DESC LIMIT 10\", 'rac_product_details', 'product', 'raccartlist', 'rac-cart-abandon'), ARRAY_A);\n ?>\n <style>\n .fp_rac_top_abandoned_products{\n width:100%;\n border:1px solid #f2f2f2;\n border-collapse: collapse;\n }\n\n .fp_rac_top_abandoned_products tr td{\n padding-top: 10px;\n padding-bottom: 10px;\n padding-left:10px;\n vertical-align: left;\n border:none !important;\n }\n .fp_rac_top_abandoned_products tr:nth-child(odd){\n background-color: #f2f2f2;\n }\n </style>\n <table class=\"fp_rac_top_abandoned_products\" cellpadding='2'>\n <tr>\n <td><?php _e('S.No', 'recoverabandoncart'); ?></td>\n <td><?php _e('Product Name', 'recoverabandoncart'); ?></td>\n <td><?php _e('Abandoned Count', 'recoverabandoncart'); ?></td>\n </tr>\n <tbody>\n <?php foreach ($abandoned_products as $key => $abandoned_product) { ?>\n <tr>\n <td>\n <span> <?php echo $key + 1; ?></span>\n </td>\n <td>\n <span style=\"font-weight:bold;\"> <?php echo get_the_title($abandoned_product['ID']); ?> </span>\n </td>\n <td>\n <span> <?php echo $abandoned_product['count']; ?></span>\n </td>\n </tr>\n <?php } ?>\n </tbody>\n </table>\n <?php\n }", "title": "" }, { "docid": "9832a4847552588792f74dbac8b70e44", "score": "0.51949245", "text": "public function numberOfTopSoftKeyPages();", "title": "" }, { "docid": "c70acd49e9167091622cc7274614137d", "score": "0.51774335", "text": "private function displayCities() {\n\t\techo '<table style=\"width:25%;\" class=\"right zebra-style\">';\n\t\techo '<thead><tr><th colspan=\"2\">'.__('Most frequent places').'</th></tr></thead>';\n\t\techo '<tbody>';\n\t\t\n\t\t$i = 1;\n\n\t\tif (empty($this->Cities)) {\n\t\t\techo HTML::emptyTD(2, HTML::em( __('There are no routes.') ));\n\t\t}\n\n\t\tforeach ($this->Cities as $city => $num) {\n\t\t\t$i++;\n\t\t\techo '<tr class=\"a'.($i%2+1).'\">\n\t\t\t\t\t<td>'.$num.'x</td>\n\t\t\t\t\t<td>'.SearchLink::to('route', $city, $city, 'like').'</td>\n\t\t\t\t</tr>';\n\n\t\t\tif ($i == 11) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\techo '</tbody>';\n\t\techo '</table>';\n\t}", "title": "" }, { "docid": "e79f23234f90ba9a9be072ce1ef6e4e8", "score": "0.5165851", "text": "public function getTop10Title()\n {\n $sql = <<<eof\n select d.seqno, d.id, d.name\n\t\t from (select rownum as rn, c.*\n\t\t from (select count(a.title) n,\n\t\t b.title as seqno,\n\t\t b.title_no_sz as id,\n\t\t b.titlename as name\n\t\t from hr_personnel_base a, hr_title b\n\t\t where a.title = b.title\n\t\t and a.seg_segment_no = b.seg_segment_no\n\t\t and b.seg_segment_no = :company_id\n\t\t group by b.title, b.title_no_sz, b.titlename\n\t\t order by n desc) c) d\n\t\t where rn <= 10\neof;\n return $this->_dbConn->CacheGetAll(self::DATA_CACHE_SECS,$sql,array('company_id'=>$this->_companyId));\n }", "title": "" }, { "docid": "0ca550a647e42f35b9ed24ecf60617f8", "score": "0.5163069", "text": "public function topKills($file) {\n $cells = $this->getFile($file);\n $killcount = array();\n $killerarray = array();\n $killer = array();\n if($cells != null){\n foreach($cells as $key => $row){\n foreach($row as $k =>$r){\n \tif($k == 13){\n\t \t$values = explode(':', $r);\n\t \t$kill = str_replace('\"','',$values[1]);\n\t \t$kill = str_replace('\"','',$kill);\n\t \t$kill = intval($kill);\n\t \tif($kill == 1){\n\t\t\t\t\t //If there is a kills on this record\n\t\t\t\t\t$killcount = array();\n\t\t\t\t\t$values = explode(':', $row[1]);\n\t\t\t\t\tarray_push($killer,str_replace('\"','',$values[1]));\n\t\t\t\t\t$killerarray = array_count_values($killer);\n\t\t\t\t\tarsort($killerarray);\n\t \t}else{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n \t\t}\n\t\t}\n\t}\n\t$table = \"<table id='myTable'>\";\n\t$table .=\"<tr>\";\n\t$table .=\"<th>Player Name</th><th>Kill Count</th>\";\n\t$table .=\"</tr>\";\n\t$table .=\"<tr>\";\n\tforeach($killerarray as $key => $row){\n\t\t$table .= \"<tr><td>$key</td><td>$row</td></tr>\";\n\t}\n\t$table .=\"</tr>\";\n\t$table .=\"</table>\";\n\t}\n\n\n return $table;\n}", "title": "" }, { "docid": "c3f23276a6a178f7a784ef1930304f27", "score": "0.5161807", "text": "public function display() {\n\n // Find the sequence number for the FYI state.\n $storage = $this->entityTypeManager()->getStorage('taxonomy_term');\n $query = $storage->getQuery()->accessCheck(FALSE);\n $query->condition('vid', 'states');\n $query->condition('field_text_id', 'fyi');\n $ids = $query->execute();\n $fyi = $storage->load(reset($ids));\n $fyi_sequence = $fyi->field_sequence->value;\n\n // We're not interested in packets reviewed more than two years ago.\n $cutoff = new \\DateTime();\n $cutoff->sub(new \\DateInterval('P2Y'));\n $cutoff = $cutoff->format('Y-m-d');\n ebms_debug_log(\"completed packets cutoff is $cutoff\");\n\n // Find the packets which might be included on this page. Note that we're\n // not checking whether the packet is still active. It's enough that the\n // user has reviewed all of the articles before the packet was deactivated.\n // This conforms with the original logic for this page.\n // Doesn't seem to be a way to use an aggregate in a TableSort query.\n // See https://drupal.stackexchange.com/questions/311200.\n $uid = $this->currentUser()->id();\n $storage = $this->entityTypeManager()->getStorage('ebms_packet');\n $query = $storage->getQuery()->accessCheck(FALSE);\n $query->condition('articles.entity.reviews.entity.reviewer', $uid);\n $query->condition('articles.entity.reviews.entity.posted', $cutoff, '>=');\n $packets = $storage->loadMultiple($query->execute());\n ebms_debug_log('packet count: ' . count($packets));\n $rows = [];\n\n // Decide which of the packets are completed.\n foreach ($packets as $packet) {\n\n // Set initial values for the packet.\n $topic_id = $packet->topic->target_id;\n $count = 0;\n $completed = TRUE;\n $latest = '';\n $packet_id = $packet->id();\n ebms_debug_log(\"completed packets: checking packet $packet_id\");\n\n // Walk through each of the packet's articles.\n foreach ($packet->articles as $packet_article) {\n\n // Find out if this user has reviewed the article.\n $reviewed = FALSE;\n $packet_article = $packet_article->entity;\n $article_id = $packet_article->article->target_id;\n foreach ($packet_article->reviews as $review) {\n $review = $review->entity;\n if ($review->reviewer->target_id == $uid) {\n ebms_debug_log(\"completed packets: found one of the current user's reviews\");\n $reviewed = TRUE;\n $count++;\n if (strcmp($review->posted->value, $latest) > 0) {\n $latest = $review->posted->value;\n ebms_debug_log(\"completed packets: latest review for this packet is now $latest\");\n }\n }\n }\n\n // If not, see if that prevents us from including the packet.\n if (!$reviewed) {\n\n // OK if the article has been dropped (this is a change from the\n // original logic, which ignored the drop flag in this situation).\n if (!empty($packet_article->dropped->value)) {\n continue;\n }\n\n // OK if the article has moved on to a later state.\n $article = $packet_article->article->entity;\n $current_state = $article->getCurrentState($topic_id);\n $state = $current_state->value->entity;\n if ($state->field_sequence->value > $fyi_sequence) {\n ebms_debug_log(\"completed packets: skipping article $article_id which has moved on to greener pastures\");\n continue;\n }\n\n // The reviewer isn't expected to review FYI articles.\n if ($state->field_text_id->value === 'fyi') {\n ebms_debug_log('completed packets: skipping FYI article');\n continue;\n }\n\n // If we got here, there's an article in the packet still\n // waiting to be reviewed. Don't include the packet.\n $completed = FALSE;\n break;\n }\n }\n\n // Add the packet if the board member reviewed the reviewable articles.\n ebms_debug_log(\"completed packets: count is $count and completed is \" . ($completed ? 'TRUE' : 'FALSE'));\n if (!empty($count) && $completed) {\n $rows[] = [\n $packet->title->value,\n substr($latest, 0, 10),\n $count,\n $packet->id(),\n ];\n }\n }\n\n // Sort the rows by hand.\n usort($rows, function(array &$a, array &$b): int {\n return $b[1] <=> $a[1] ?: $a[0] <=> $b[0];\n });\n\n // Inject links for the first column.\n foreach ($rows as &$row) {\n $name = $row[0];\n $packet_id = $row[3];\n unset($row[3]);\n $row[0] = Link::createFromRoute($name, 'ebms_review.completed_packet', ['packet_id' => $packet_id]);\n }\n // Assemble the render array for the page.\n return [\n '#title' => 'Completed Packets',\n '#cache' => ['max-age' => 0],\n 'packets' => [\n '#theme' => 'table',\n '#rows' => $rows,\n '#header' => ['Packet Name', 'Date Completed', 'Number of Reviews'],\n '#empty' => 'No packets have been completed in the past two years.',\n ],\n ];\n }", "title": "" }, { "docid": "3f6cca39c18faf6458483ab1e2970baf", "score": "0.5158488", "text": "public function getPostsTop();", "title": "" }, { "docid": "a53e613c063b2d318ed89c41a6f06cc9", "score": "0.5151407", "text": "function fOutputTable(&$data, $trace = 0, $rank = 1) {\r\n\t$table = \"\"; // initialize\r\n\t$table = \"<table>\\n\\t\"; // opening tag\r\n\t\r\n\tfor ($r = 0; $r < sizeof($data); ++$r) { // number of rows\r\n\t\tif ($r == 0) { // first row, print keys as column headers\r\n\t\t\t$table .= \"<tr>\\n\";\r\n\t\t\tif ($rank) $table .= \"<th>Rank</th>\";\r\n\t\t\tforeach($data[$r] as $key => $value) $table .= \"<th>$key</th>\\n\";\r\n\t\t\t$table .= \"</tr>\\n\";\r\n\t\t}\r\n\t\t$table .= \"<tr>\\n\"; // begin row\r\n\t\t($r % 2 != 0) ? $tint = \" class=\\\"alt\\\"\" : $tint = \"\"; // alternating rows shading\r\n\t\tif ($rank) $table .= \"<td\".$tint.\">\". ($r + 1) .\") </td>\\n\"; // rank column\r\n\t\tforeach($data[$r] as $key => $value) $table .= \"<td\".$tint.\">\".urldecode($value).\"</td>\\n\";\r\n\t\t$table .= \"</tr>\\n\";\t// end row\r\n\t}\r\n\t\r\n\t$table .= \"\\n\\t</table>\\n<br clear=\\\"all\\\" />\\n\"; // closing tag\r\n\treturn $table;\r\n}", "title": "" }, { "docid": "0444118030772e1dab7a2e4987fb13ff", "score": "0.5150402", "text": "function html_test_results_menu( $db, $page, $project_id, $table_display_properties=null, $filter=null ) {\n\n\n $release_tbl = RELEASE_TBL;\n $f_release_id = RELEASE_TBL .\".\". RELEASE_ID;\n $f_project_id\t\t= RELEASE_TBL .\".\". PROJECT_ID;\n $f_release_name = RELEASE_TBL .\".\". RELEASE_NAME;\n $f_release_archive = RELEASE_TBL .\".\". RELEASE_ARCHIVE;\n\n $build_tbl = BUILD_TBL;\n $f_build_id = BUILD_TBL .\".\". BUILD_ID;\n $f_build_rel_id = BUILD_TBL .\".\". BUILD_REL_ID;\n $f_build_name = BUILD_TBL .\".\". BUILD_NAME;\n $f_build_archive = BUILD_TBL .\".\". BUILD_ARCHIVE;\n\n $testset_tbl = TS_TBL;\n $f_testset_id = TS_TBL .\".\". TS_ID;\n $f_testset_name = TS_TBL .\".\". TS_NAME;\n\n $test_tbl\t\t\t= TEST_TBL;\n $f_test_id\t\t\t= TEST_ID;\n $f_test_name\t\t= TEST_NAME;\n\n $test_run_page = \"results_test_run_page.php\";\n\n\t$release_id\t\t= $table_display_properties['release_id'];\n\t$build_id\t\t= $table_display_properties['build_id'];\n\t$testset_id\t\t= $table_display_properties['testset_id'];\n\t$test_id\t\t= $table_display_properties['test_id'];\n\n if( empty( $filter['release_id'] ) ) {\n $show_all = true;\n } else {\n $show_all = false;\n }\n\n //<!--Table for holding all other tables-->\n print\"<table class='hide100'>\". NEWLINE;\n print\"<tr>\". NEWLINE;\n print\"<td>\". NEWLINE;\n\n\t# Release Name\n print\"<table align='left'>\". NEWLINE;\n print\"<tr>\". NEWLINE;\n print\"<td class='sub_menu' nowrap><b><a href='$page?release_id=all'>\". lang_get( 'release_name' ) .\"</a></b></td>\". NEWLINE;\n print\"</tr>\". NEWLINE;\n\n # if the user has not selected a release show all releases\n if ( ( empty($release_id) || $release_id == 'all') && $show_all == true ) {\n\n\t\t$q \t\t= \"SELECT DISTINCT $f_release_name, $f_release_id FROM $release_tbl WHERE $f_project_id = '$project_id' AND $f_release_archive = 'N' ORDER BY $f_release_id\";\n\t\t$rs \t= db_query( $db, $q);\n\t\t$rows\t= db_fetch_array( $db, $rs );\n\n if($rows) {\n\n \tforeach($rows as $row_release) {\n\t\t\t\t$rel_id \t= $row_release[RELEASE_ID];\n\t\t\t\t$rel_name \t= $row_release[RELEASE_NAME];\n\t\t\t\tprint\"<tr>\". NEWLINE;\n\t\t\t\tprint\"<td class='sub_menu'><a href='$page?release_id=$rel_id'>$rel_name</a></td>\". NEWLINE;\n\t\t\t\tprint\"</tr>\". NEWLINE;\n\t\t\t}\n } else {\n\n\t\t\tprint\"<tr>\". NEWLINE;\n\t\t\tprint\"<td class='error'>\".lang_get('no_releases_in_project').\"</td>\". NEWLINE;\n\t\t\tprint\"</tr>\". NEWLINE;\n }\n\n print\"</table>\". NEWLINE;\n } else { # Show the selected release and the build information\n\n $q_rel_name = \"SELECT $f_release_name FROM $release_tbl WHERE $f_release_id = '$table_display_properties[release_id]'\";\n $release_name = db_get_one( $db, $q_rel_name );\n\n print\"<tr>\". NEWLINE;\n print\"<td class='sub_menu' nowrap>$release_name</td>\". NEWLINE;\n print\"</tr>\". NEWLINE;\n print\"</table>\". NEWLINE;\n\n\t\tprint\"<table align='left'>\". NEWLINE;\n\t\tprint\"<tr>\". NEWLINE;\n\t\tprint\"<td class='sub_menu'>&nbsp;</td>\". NEWLINE;\n\t\tprint\"</tr>\". NEWLINE;\n\t\tprint\"</table>\". NEWLINE;\n\n $q_build = \"SELECT DISTINCT $f_build_name, $f_build_id FROM $build_tbl WHERE $f_build_archive = 'N' AND $f_build_rel_id = '$table_display_properties[release_id]' ORDER BY $f_build_name\";\n $rs_build = db_query( $db, $q_build );\n $num_build = db_num_rows( $db, $rs_build );\n\n print\"<table align='left'>\". NEWLINE;\n print\"<tr>\". NEWLINE;\n print\"<td class='sub_menu' nowrap><b><a href='$page?release_id=$table_display_properties[release_id]&amp;build_id=all'>\". lang_get('build_name') .\"</a></b></td>\". NEWLINE;\n print\"</tr>\". NEWLINE;\n\n # if the user has not selected a build, show all builds\n if ( ( empty( $build_id ) || $build_id == 'all' ) && $show_all == true ) {\n if($num_build == 0) { # if there are no builds display a message\n print\"<tr>\". NEWLINE;\n print\"<td class='sub_menu'>\". lang_get('builds_none') .\"\t</td>\". NEWLINE;\n print\"</tr>\". NEWLINE;\n print\"</table>\". NEWLINE;\n } else { # Show all builds associated to the selected release\n while($row_build = db_fetch_row( $db, $rs_build ) ) {\n\n $b_name = $row_build[BUILD_NAME];\n $b_id\t= $row_build[BUILD_ID];\n print\"<tr>\". NEWLINE;\n print\"<td class='sub_menu'><a href='$page?release_id=$table_display_properties[release_id]&amp;build_id=$b_id'>$b_name</a></td>\". NEWLINE;\n print\"</tr>\". NEWLINE;\n }\n print\"</table>\". NEWLINE;\n }\n } else { # show the selected build and testset information\n $q_build_name = \"SELECT $f_build_name FROM $build_tbl WHERE $f_build_id = '$table_display_properties[build_id]'\";\n $build_name = db_get_one( $db, $q_build_name );\n\n print\"<tr>\". NEWLINE;\n print\"<td class='sub_menu'>$build_name</td>\". NEWLINE;\n print\"</tr>\". NEWLINE;\n print\"</table>\";\n\n\t\t\tprint\"<table align='left'>\". NEWLINE;\n\t\t\tprint\"<tr>\". NEWLINE;\n\t\t\tprint\"<td class='sub_menu'>&nbsp;</td>\". NEWLINE;\n\t\t\tprint\"</tr>\". NEWLINE;\n\t\t\tprint\"</table>\". NEWLINE;\n\n # MAY NEED TO CHANGE THE LOGIC TO EXCLUDE ALL\n # WHEN A USER CLICKS ALL THE TABLE SHOULD APPEAR WITHOUT A SELECTED\n # if the\n if( isset( $table_display_properties['testset_id'] ) && $table_display_properties['testset_id'] != 'all' ) {\n $q_testset_name = \"SELECT $f_testset_name FROM $testset_tbl WHERE $f_testset_id = '$table_display_properties[testset_id]'\";\n $testset_name = db_get_one( $db, $q_testset_name );\n print\"<table align='left'>\". NEWLINE;\n print\"<tr>\". NEWLINE;\n print\"<td class='sub_menu' nowrap><b><a href='$page?release_id=$table_display_properties[release_id]&amp;build_id=$table_display_properties[build_id]&amp;testset_id=all'>\" .lang_get('testset_name'). \"</a></b></td>\". NEWLINE;\n print\"</tr>\". NEWLINE;\n //print\"<tr><td class='sub_menu'>$testset_name</td></tr>\". NEWLINE;\n print\"<tr>\". NEWLINE;\n\t\t\t\tprint\"<td class='sub_menu'><a href='$page?release_id=$table_display_properties[release_id]&amp;build_id=$table_display_properties[build_id]&amp;testset_id=$table_display_properties[testset_id]&amp;test_id=none'>$testset_name</a></td>\". NEWLINE;\n\t\t\t\tprint\"</tr>\". NEWLINE;\n print\"</table>\". NEWLINE;\n }\n\n if( !empty($testset_id) && $testset_id != 'all' && !empty($test_id) && $test_id != 'none') {\n\n \t$q_testname = \"SELECT $f_test_name FROM $test_tbl WHERE $f_test_id = '$table_display_properties[test_id]'\";\n \t$test_name = db_get_one( $db, $q_testname );\n\n\t\t\t\t# Only display the link if not on the test run page\n \t$current_page = basename($_SERVER[\"PHP_SELF\"]);\n \tif( $test_run_page!=$current_page ) {\n\n \t\t$test_name = \"<a href='$test_run_page?release_id=$table_display_properties[release_id]&amp;build_id=$table_display_properties[build_id]&amp;testset_id=$table_display_properties[testset_id]&amp;test_id=$table_display_properties[test_id]'>$test_name</a>\";\n \t}\n\n \tprint\"<table>\". NEWLINE;\n\t\t\t\tprint\"<tr>\". NEWLINE;\n\t\t\t\tprint\"<td class='sub_menu' nowrap><b>\" .lang_get('test_run'). \"</b></td>\". NEWLINE;\n\t\t\t\tprint\"</tr>\". NEWLINE;\n\t\t\t\tprint\"<tr><td class='sub_menu'>$test_name</td></tr>\". NEWLINE;\n print\"</table>\". NEWLINE;\n }\n }\n }\n\n print\"</td>\". NEWLINE;\n print\"</tr>\". NEWLINE;\n print\"</table>\". NEWLINE;\n\n}", "title": "" }, { "docid": "ab3314d4fa6b8e252b22c7e66d9147da", "score": "0.5145974", "text": "public function findTopTen($sortFields=null){\n $sql = $this->getTopTen();\n // add sort order if required\n if (! is_null($sortFields)) {\n $sql .= ' ORDER BY ' . $sortFields;\n }\n $statement = DatabaseHelper::runQuery($this->connection, $sql, null);\n return $statement->fetchAll();\n}", "title": "" }, { "docid": "bfcfd195a98133010aab028eeea952bc", "score": "0.514322", "text": "public static function dislay_top_recovered_products() {\n global $wpdb;\n $recovered_products = $wpdb->get_results($wpdb->prepare(\"SELECT DISTINCT product.ID,count(product.ID) as count FROM {$wpdb->postmeta} as pm \n INNER JOIN {$wpdb->posts} as product ON FIND_IN_SET(product.ID, pm.meta_value) \n INNER JOIN {$wpdb->posts} as cartlist ON cartlist.ID=pm.post_id\n WHERE pm.meta_key=%s AND product.post_type=%s AND cartlist.post_type=%s AND cartlist.post_status=%s\n GROUP BY product.ID order by count(product.ID) DESC LIMIT 10\", 'rac_product_details', 'product', 'racrecoveredorder', 'publish'), ARRAY_A);\n ?>\n <style>\n .fp_rac_top_recovered_products{\n width:100%;\n border:1px solid #f2f2f2;\n border-collapse: collapse;\n }\n\n .fp_rac_top_recovered_products tr td{\n padding-top: 10px;\n padding-bottom: 10px;\n padding-left:10px;\n vertical-align: left;\n border:none !important;\n }\n .fp_rac_top_recovered_products tr:nth-child(odd){\n background-color: #f2f2f2;\n }\n </style>\n <table class=\"fp_rac_top_recovered_products\" cellpadding='2'>\n <tbody>\n <tr>\n <td><?php _e('S.No', 'recoverabandoncart'); ?></td>\n <td><?php _e('Product Name', 'recoverabandoncart'); ?></td>\n <td><?php _e('Recovered Count', 'recoverabandoncart'); ?></td>\n </tr>\n <?php foreach ($recovered_products as $key => $recovered_product) { ?>\n <tr>\n <td>\n <span> <?php echo $key + 1; ?></span>\n </td>\n <td>\n <span style=\"font-weight:bold;\"> <?php echo get_the_title($recovered_product['ID']); ?> </span>\n </td>\n <td>\n <span> <?php echo $recovered_product['count']; ?></span>\n </td>\n </tr>\n <?php } ?>\n </tbody>\n </table>\n <?php\n }", "title": "" }, { "docid": "87a480cb2b69618d387ddf00ca68a451", "score": "0.5138167", "text": "function print_function_info( $url_params , $info , $sort , $run1 , $run2 )\n{\nstatic $odd_even = 0;\nglobal $totals;\nglobal $sort_col;\nglobal $metrics;\nglobal $format_cbk;\nglobal $display_calls;\nglobal $base_path;\n// Toggle $odd_or_even\n$odd_even = 1 - $odd_even;\nif( $odd_even )\n{\nprint ( \"<tr>\" ) ;\n}\nelse\n{\nprint ( '<tr bgcolor=\"#e5e5e5\">' ) ;\n}\n$href = \"$base_path/index.php?\" . http_build_query( xhprof_array_set( $url_params , 'symbol' , $info[\"fn\"] ) );\nprint ( '<td>' ) ;\nprint ( xhprof_render_link( $info[\"fn\"] , $href ) ) ;\nprint ( \"</td>\\n\" ) ;\nif( $display_calls )\n{\n// Call Count..\nprint_td_num( $info[\"ct\"] , $format_cbk[\"ct\"] , ( $sort_col == \"ct\" ) );\nprint_td_pct( $info[\"ct\"] , $totals[\"ct\"] , ( $sort_col == \"ct\" ) );\n}\n// Other metrics..\nforeach( $metrics as $metric )\n{\n// Inclusive metric\nprint_td_num( $info[$metric] , $format_cbk[$metric] , ( $sort_col == $metric ) );\nprint_td_pct( $info[$metric] , $totals[$metric] , ( $sort_col == $metric ) );\n// Exclusive Metric\nprint_td_num( $info[\"excl_\" . $metric] , $format_cbk[\"excl_\" . $metric] , ( $sort_col == \"excl_\" . $metric ) );\nprint_td_pct( $info[\"excl_\" . $metric] , $totals[$metric] , ( $sort_col == \"excl_\" . $metric ) );\n}\nprint ( \"</tr>\\n\" ) ;\n}", "title": "" }, { "docid": "08a4076883c852ab6798ebfb933a61d3", "score": "0.5134341", "text": "public function showPastWeek()\r\n {\r\n echo '<table class=\"sortable\" border=1>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th>Day</th>\r\n\t\t\t\t\t<th># of searches</th>\r\n\t\t\t\t</tr>';\r\n $resultSet = $this->analyticalModel->getPastWeekGroupedByDay();\r\n if (count($resultSet) < 1) {\r\n echo '<tr><td colspan=\"2\">No Data</td></tr>';\r\n }\r\n $total = 0;\r\n foreach ($resultSet as $row) {\r\n $total += $row['cnt'];\r\n echo '<tr>';\r\n echo '<td>' . $row['day'] . '</td>';\r\n echo '<td>' . $row['cnt'] . '</td>';\r\n echo '</tr>';\r\n }\r\n echo '<tr><td><i>Total</i></td><td>' . $total . '</td></tr>';\r\n echo '</table>';\r\n }", "title": "" }, { "docid": "c9cb3e02a256e8b459904d1a2514e0c1", "score": "0.5132274", "text": "function outputTopButtons()\n {\n global $application;\n\n $output = '';\n\n $template_contents = array(\n 'AddLinkID' => ((@$this -> _search_filter['product']['id'])\n ? '&product_id=' .\n $this -> _search_filter['product']['id']\n : ''\n )\n );\n $this -> _Template_Contents = $template_contents;\n $application -> registerAttributes($this -> _Template_Contents);\n\n if (count($this -> _found_reviews) > 0)\n $output = $this -> mTmplFiller -> fill(\n 'customer_reviews/manage_customer_reviews/',\n 'search-results-buttons-top.tpl.html',\n array()\n );\n else\n $output = $this -> mTmplFiller -> fill(\n 'customer_reviews/manage_customer_reviews/',\n 'search-results-nobuttons.tpl.html',\n array()\n );\n\n return $output;\n }", "title": "" }, { "docid": "4eff14d816430dbc839421e169765872", "score": "0.51320654", "text": "function topc_highest_rated($num = 10) {\r\n\t$top_rated = (array) get_option('topc-top-rated');\r\n\r\n\tif ( $num < count($top_rated) )\r\n\t\t$top_rated = array_slice($top_rated, 0, $num);\r\n\r\n\techo \"<ul class='topc-comments'>\\n\";\r\n\tforeach ( $top_rated as $row )\r\n\t\techo \"\\t<li>\".stripslashes($row).\"</li>\\n\";\r\n\r\n\techo \"</ul>\\n\";\r\n}", "title": "" }, { "docid": "443ebc19840fd9711f5a2bbe00cc7634", "score": "0.5126498", "text": "public function topIndexAction()\n {\n $request = $this->getRequest();\n $custom = '';\n $start_date = $request->request->get('start_date');\n $end_date = $request->request->get('end_date');\n $user_repository = $this->getDoctrine()->getRepository('IBWWebsiteBundle:User');\n $all_time_top = $user_repository->getTop(null, null, null, 10);\n if(date('D') != 'Sun') {\n $this_week_top = $user_repository->getTop(\n date('Y-m-d 00:01:00', strtotime('Monday this week', time())), null, null, 10);\n } else {\n $this_week_top = $user_repository->getTop(\n date('Y-m-d 00:01:00', strtotime('Monday last week', time())), null, null, 10);\n }\n $this_month_top = $user_repository->getTop(date('Y-m-01 00:01:00'), null, null, 10);\n if(date('D') != 'Sun') {\n $last_week_top = $user_repository->getTop(\n date('Y-m-d 00:01:00', strtotime('Monday last week', time())), \n date('Y-m-d 23:59:00', strtotime('Sunday last week', time())), null, 10);\n }\n else {\n $last_week_top = $user_repository->getTop(\n date('Y-m-d 00:01:00', strtotime('Monday -2 week', time())), \n date('Y-m-d 23:59:00', strtotime('Sunday -1 week', time())), null, 10);\n }\n $last_month_top = $user_repository->getTop(\n date('Y-m-d 00:01:00', strtotime('First day of last month', time())),\n date('Y-m-t 23:59:00', strtotime('Last month', time())), null, 10);\n if ($start_date || $end_date) {\n $custom = $user_repository->getTop($start_date, $end_date, null, 10);\n }\n\n return $this->render('IBWWebsiteBundle:Stairs:generalTop.html.twig', \n array('all_time_top' => $all_time_top,\n 'this_week_top' => $this_week_top,\n 'this_month_top' => $this_month_top,\n 'last_week_top' => $last_week_top,\n 'last_month_top' => $last_month_top,\n 'ctop' => $custom));\n }", "title": "" }, { "docid": "0f0fb8cd192bdc63ffa7b4506096838c", "score": "0.5122303", "text": "function teamlead_agent_overall_count_summary()\n {\n\t//COUNT QUERY\n\n\t$result_count=(\"SELECT capmus_users.id,capmus_users.LeadId,campus_schedule.std_status,count(campus_schedule.studentID) as cnt,campus_schedule.status \n\tFROM capmus_users \n\tINNER JOIN campus_schedule \n\tON capmus_users.id=campus_schedule.agentId and campus_schedule.status=1 and campus_schedule.agentId!=0 GROUP BY campus_schedule.std_status\");\n\t$result_count=mysql_query($result_count);\n\t\n\twhile($row_count = mysql_fetch_array($result_count))\n\t{ \n\t\techo \"<br><b><div style='float:left'>\". getData(nl2br( $row_count['std_status']),'stdStatusmo-list') . \" : \" . $row_count['cnt'].\"</b>&nbsp;&nbsp;&nbsp;\";\n\t}\t\n\techo \"<hr>\";\n }", "title": "" }, { "docid": "0435cee1d1ac104a98b2a7fd0831e873", "score": "0.51137865", "text": "function coverage_summary() {\n global $dir,$set,$id,$corpus;\n\n if (array_key_exists(\"by\",$_GET)) { $by = $_GET['by']; }\n else { $by = 'token'; }\n\n $total = array(); $count = array();\n foreach (array(\"ttable\",\"corpus\") as $corpus) {\n foreach (array(\"token\",\"type\") as $b) {\n foreach (array(\"6+\",\"2-5\",\"1\",\"0\") as $c) {\n $count[$corpus][$b][$c] = 0;\n }\n $total[$corpus][$b] = 0;\n }\n $data = file(filename_fallback_to_factored(get_current_analysis_filename(\"coverage\",\"$corpus-coverage-summary\")));\n for($i=0;$i<count($data);$i++) {\n $item = split(\"\\t\",$data[$i]);\n if ($item[0] == 1) {\n if ($item[1]>5) {\n $count[$corpus][\"type\"][\"6+\"] += $item[2];\n\t $count[$corpus][\"token\"][\"6+\"] += $item[3];\n }\n else if ($item[1]>1) {\n $count[$corpus][\"type\"][\"2-5\"] += $item[2];\n \t $count[$corpus][\"token\"][\"2-5\"] += $item[3];\n }\n else if ($item[1]==1) {\n $count[$corpus][\"type\"][\"1\"] += $item[2];\n\t $count[$corpus][\"token\"][\"1\"] += $item[3];\n }\n else {\n $count[$corpus][\"type\"][\"0\"] += $item[2];\n\t $count[$corpus][\"token\"][\"0\"] += $item[3];\n }\n $total[$corpus][\"type\"] += $item[2];\n $total[$corpus][\"token\"] += $item[3];\n }\n }\n }\n\n print \"<b>Coverage</b>\\n\";\n print \"<table><tr><td></td><td>model</td><td>corpus</td></tr>\\n\";\n foreach (array(\"0\",\"1\",\"2-5\",\"6+\") as $range) {\n print \"<tr><td>$range</td>\";\n foreach (array(\"ttable\",\"corpus\") as $corpus) {\n printf(\"<td align=right nowrap>%d (%.1f%s)</td>\",$count[$corpus][$by][$range],100*$count[$corpus][$by][$range]/($total[$corpus][$by]+0.0001),\"%\");\n }\n print \"</tr>\\n\";\n }\n print \"</table>\\n\";\n if ($by == 'token') { print \"by token\"; } else {\n print \"<A HREF=\\\"javascript:generic_show('CoverageSummary','by=token')\\\">by token</A> \";\n }\n print \" / \";\n if ($by == 'type') { print \"by type\"; } else {\n print \"<A HREF=\\\"javascript:generic_show('CoverageSummary','by=type')\\\">by type</A> \";\n }\n print \" / \";\n print \"<div id=\\\"CoverageDetailsLink\\\"><A HREF=\\\"javascript:generic_show('CoverageDetails','')\\\">details</A></div> \";\n}", "title": "" }, { "docid": "60a7878533ad2215f72ccfb61275b93d", "score": "0.5111587", "text": "function display($title, &$matrix, $indexesList) {\n echo '<div class=\"result-table\">';\n echo $title;\n echo '<table class=\"sorted-tasks\">';\n // Loop through assignements\n $previousTask = null;\n foreach ($indexesList as $indexes) {\n // Locate assignement\n $assignement = $matrix[$indexes[0]][$indexes[1]];\n \n // Display task name if new\n if ($assignement->getTask()->name != $previousTask) {\n echo '</table>';\n echo '<h4> ' . $assignement->getTask()->name . '</h4>';\n echo '<table class=\"sorted-tasks\">';\n $previousTask = $assignement->getTask()->name;\n }\n \n // Is it a good match?\n $quality = '';\n switch ($assignement->getValue()) {\n case FIRST_CHOICE_COST :\n $quality = 1;\n break;\n case SECOND_CHOICE_COST :\n $quality = 2;\n break;\n case THIRD_CHOICE_COST :\n $quality = 3;\n break;\n case FOURTH_CHOICE_COST :\n $quality = 4;\n break;\n default :\n $quality = 'x';\n break;\n }\n \n // Display worker\n echo '<tr>';\n echo '<td class=\"quality choice-' . $quality . '\">Choix ' . $quality . '</td>';\n echo '<td class=\"worker\">' . $assignement->getWorker()->fullname .'</td>';\n echo '<td class=\"worker\">' . $assignement->getWorker()->email .'</td>';\n \n echo '</tr>';\n }\n echo '</table>';\n echo '</div>';\n }", "title": "" }, { "docid": "9cea4bf6b5035c5fca0958e09687e166", "score": "0.5110776", "text": "public function showStats()\r\n {\r\n echo \"<p>\r\n\t\t\t\tClick-Through Rate: \" . number_format($this->analyticalModel->getClickThroughRate(), 3) . \" [% of searches that resulted in a details view]<br>\r\n\t\t\r\n\t\t\t</p>\";\r\n }", "title": "" }, { "docid": "ceec1262b972bd01b7f88beeeb2ca995", "score": "0.5100589", "text": "public function actionStatistic() {\n\t\t$this->header('Remember some command statistic and show it at the end of script execution');\n\n\t\tfor ($i = 1; $i <= rand(50, 100); $i+= rand(1,3)) {\n\t\t\t$this->inc('Total numbers');\n\n\t\t\tif ($i % 2 == 0) {\n\t\t\t\t$this->inc('Even numbers');\n\t\t\t} else {\n\t\t\t\t$this->inc('Odd numbers');\n\t\t\t}\n\n\t\t\t$this->inc('Overall sum', $i);\n\t\t}\n\n\t\t$this->printStat();\n\t}", "title": "" }, { "docid": "72920f4bb10cba44c405765b5ba71634", "score": "0.5099658", "text": "public function top_artists($limit=3, $offset=0)\r\r\n\t{\r\r\n\t\t$s = \"SELECT \r\r\n\t\t\t\tC.content_id, C.title, C.ver1, C.slug, I.image, I.image_path FROM tbl_content C \r\r\n\t\t\t\tINNER JOIN tbl_content_counter CC ON C.module_id = 11 AND C.content_id = CC.content_id \r\r\n\t\t\t\tLEFT JOIN tbl_image I ON C.content_id = I.content_id \r\r\n\t\t\t\tWHERE C.del_flag=0 AND C.status=1 ORDER BY CC.total_count DESC LIMIT $offset, $limit\";\r\r\n\t\t\r\r\n\t\t$r = $this->db->query($s);\r\r\n\t\t$rs = $r->result();\r\r\n\t\treturn $r->num_rows() ? $rs : false;\r\r\n\t}", "title": "" }, { "docid": "0039fc4db69af6b358156fa483c9b2c0", "score": "0.5087384", "text": "function pageNationalResultSummary($connid)\r\n\t{\r\n\t\t$paperDetailsArray = array();\r\n\t\t$this->fetchPaperDetails(&$paperDetailsArray,$connid);\r\n\t\t$totalColumns = $this->totaltest_classes * $this->total_subjects * 3 + 1 + $this->totaltest_classes + ($this->totaltest_classes * $this->total_subjects * 2);\r\n\t\t$output_string = \"<table border=1 style='border-collapse: collapse' align='center' bordercolor='#A8D8FF'>\";\r\n\t\t//$output_string .= \"<tr><td bgcolor='#bf0000' colspan='\".$totalColumns.\"' align='left'><b><font size='2' color='#FFFFFF'>National Level All Round Result - Summary Report</font>&nbsp;&nbsp;&nbsp;<a class='Links' href='bt_regionwiseResultSummaryGraph.php'>(Show Graphically)</a></b></td></tr>\";\r\n\t\t$output_string .= \"<tr><td bgcolor='#bf0000' colspan='\".$totalColumns.\"' align='left'><b><font size='2' color='#FFFFFF'>National Level All Round Result - Summary Report</font></b></td></tr>\";\r\n\r\n\t\t$output_string_header = $this->prepareNationLevelHeader(\"D\");\r\n\t\t$output_string .= $output_string_header;\r\n\r\n\t\tfor($te=0; $te<$this->total_test_editions; $te++)\r\n\t\t{\r\n\t\t\t$test_edition = $this->test_edition_array[$te];\r\n\t\t\t$resultArray = $this->fetchNationalResultSummary($test_edition,$connid);\r\n\t\t\tif($te%2 == 1)\r\n\t\t\t\t$bgcolor = \"#FFDDDD\";\r\n\t\t\telse\r\n\t\t\t\t$bgcolor = \"#DDEBFF\";\r\n\t\t\t$output_string .= \"<tr bgcolor='\".$bgcolor.\"'><td align='center'>\".$this->test_edition_names_array[$test_edition].\"</td>\";\r\n\t\t\tfor($i=0; $i<$this->totaltest_classes; $i++)\r\n\t\t\t{\r\n\t\t\t\t$class = $this->testclass_array[$i];\r\n\t\t\t\tfor($j=0; $j<$this->total_subjects; $j++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$subject = $this->subject_array[$j];\r\n\t\t\t\t\t$subjectcode = $j+1;\r\n\t\t\t\t\t$subjectchar = strtolower(substr($this->subject_array[$j],0,1));\r\n\t\t\t\t\t$papercode = $subjectcode.$class.$test_edition;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$droppedquestion=0;\r\n\t\t\t\t\t$droppedquestion = $this->countdroppedquestion_ASSL($papercode,$connid);\r\n\t\t\t\t\t$totalQuestion = $paperDetailsArray[$papercode]-$droppedquestion;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($totalQuestion == \"\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$output_string .= \"<td align='center'>--</td>\";\r\n\t\t\t\t\t\t$output_string .= \"<td align='center'>--</td>\";\r\n\t\t\t\t\t\t$output_string .= \"<td align='center'>--</td>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$N = $resultArray[$class][$subjectchar]['N'];\r\n\t\t\t\t\t\t$AVG = Donumber_format(($resultArray[$class][$subjectchar]['AVG']/$totalQuestion)*100,1);\r\n\t\t\t\t\t\t$STD = Donumber_format(($resultArray[$class][$subjectchar]['STD']/$totalQuestion)*100,1);\r\n\t\t\t\t\t\t$output_string .= \"<td align='center'>\".$N.\"</td>\";\r\n\t\t\t\t\t\t$output_string .= \"<td align='center'>\".$AVG.\"</td>\";\r\n\t\t\t\t\t\t$output_string .= \"<td align='center'>\".$STD.\"</td>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($j!=$this->total_subjects-1)\r\n\t\t\t\t\t\t$output_string .= \"<td align='center' bgcolor='#bf0000'></td>\";\r\n\t\t\t\t}\r\n\t\t\t\t$output_string .= \"<td align='center' bgcolor='#bf0000'></td>\";\r\n\t\t\t}\r\n\t\t\t$output_string .= \"</tr>\";\r\n\t\t}\r\n\r\n\t\t$output_string .= \"<tr><td colspan='\".$totalColumns.\"' align='center'><b>N:</b> Total Students, <b>AVG:</b> Average <b>SD:</b> Standard Deviation</td></tr>\";\r\n\t\t$output_string .= \"</table>\";\r\n\t\treturn $output_string;\r\n\t}", "title": "" }, { "docid": "c44b2a1fd6b5b2c65a6c82a0d94367b9", "score": "0.5084955", "text": "public function statisticAction() {\n\n //GET NAVIGATION\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('sitecrowdfunding_admin_main', array(), 'sitecrowdfunding_admin_main_statistics_report');\n //GET NAVIGATION FOR SUB TABS\n $this->view->navigationGeneral = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitecrowdfunding_admin_main_statistics_report', array(), 'sitecrowdfunding_admin_main_statistics');\n\n //GET TABLE\n $projectTable = Engine_Api::_()->getDbtable('projects', 'sitecrowdfunding');\n $projectTableName = $projectTable->info('name');\n\n $backerTable = Engine_Api::_()->getDbtable('backers', 'sitecrowdfunding');\n $backerTableName = $backerTable->info('name');\n\n //GET Project DETAILS\n $select = $projectTable->select()->from($projectTableName, 'count(*) AS totalproject');\n\n $this->view->totalProjects = $select->query()->fetchColumn();\n\n //Total Projects in Draft\n $select = $projectTable->select()->from($projectTableName, 'count(*) AS totaldrafted')->where('state = ?', 'draft');\n $this->view->totalDrafted = $select->query()->fetchColumn();\n include APPLICATION_PATH . '/application/modules/Sitecrowdfunding/controllers/license/license2.php';\n\n //Total Failed Projects\n $select = $projectTable->select()->from($projectTableName, 'count(*) AS totalfailed')->where('state = ?', 'failed');\n $this->view->totalFailed = $select->query()->fetchColumn();\n\n //Total Successfull Projects\n $select = $projectTable->select()->from($projectTableName, 'count(*) AS totalsuccessfull')->where('state = ?', 'successful');\n $this->view->totalSuccessfull = $select->query()->fetchColumn();\n\n //Total Approved projects\n $select = $projectTable->select()->from($projectTableName, 'count(*) AS totalapproved')\n ->where('approved = ?', 1)\n ->where('state <> ?', 'draft');\n $this->view->totalApproved = $select->query()->fetchColumn();\n\n //Total Disapproved projects\n $select = $projectTable->select()->from($projectTableName, 'count(*) AS totaldisapproved')\n ->where('approved = ?', 0)\n ->where('state <> ?', 'draft');\n $this->view->totalDisapproved = $select->query()->fetchColumn();\n\n //Total Funded Amount\n $select = $backerTable->select()->from($backerTableName, 'sum(amount) AS totalfunded')\n ->where('payment_status = \"active\"')\n ->where('payout_status = \"success\"');\n\n $this->view->totalFundedAmount = $select->query()->fetchColumn();\n\n\n //Total Backed Amount\n $select = $backerTable->select()->from($backerTableName, 'sum(amount) AS totalfund')\n ->where('payment_status = \"active\" OR payment_status = \"authorised\"');\n $this->view->totalBackedAmount = $select->query()->fetchColumn();\n }", "title": "" }, { "docid": "02189d3bf0f5d83ca1f252acc22c71f5", "score": "0.5071523", "text": "public function displayTopRated()\n {\n // we first fetch all products with reviews. Then get those that meet our criteria\n // our criteria states that a top rated product should have at least 4.0 stars and\n // be reviewed at least 2 times. The hard coded values are just defaults, just in-case\n // the ones in our config are missing\n\n // for now, that criteria will be ok, since we have a few products and users\n $data = $this->repository->with(['reviews'])->whereHas('reviews', function ($q) {\n\n $q->where('stars', '>=', config('site.reviews.hottest', 3.5));\n\n }, '>=', config('site.reviews.count', 10))->get();\n\n return $data->sortBy(function ($p) {\n $p->name;\n });\n }", "title": "" }, { "docid": "b5bd1815639064322a925d74c14a6029", "score": "0.5059969", "text": "private function get_popular_articles()\n\t{\n\t\t$result = query(\"SELECT article_id,title, cover_pic FROM article ORDER BY views DESC, time_published DESC LIMIT 5\");\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "45c467030c1c196b50b99fd5f71acde7", "score": "0.50573516", "text": "public function numberOfTopSoftKeysPerPage();", "title": "" }, { "docid": "dd15d945d45e1e091c48ddc9c5b7e2d2", "score": "0.5043957", "text": "public function index()\n {\n $tops = Top::orderBy('position')->limit(10)->get();\n return view('Admin::pages.tops.browse', compact('tops'));\n }", "title": "" }, { "docid": "d36a02f41adec024d667d9326f2faaa6", "score": "0.5041241", "text": "public function sortList () {\n $toplist = DB::table('reviews')\n ->join('animes', 'reviews.animeid', '=', 'animes.id')\n ->select(array('animes.*',\n DB::raw('round(AVG(rating),2) as ratings_average')))\n // make a group according to animes;id\n ->groupby('animes.id')\n // make a order according to rating-average from high to low \n ->orderBy('ratings_average', 'DESC')\n ->get();\n // views\n return view('top', [\"toplists\" => $toplist]);\n \n }", "title": "" }, { "docid": "7ad33d229922e1dad717a71c639e8f06", "score": "0.50372773", "text": "function topTenGameScoresforAllTimeByUser($UserID){\n\t\t$db = new PDO(\"mysql:host=localhost;dbname=capstonegames\", \"root\", \"\");\n $dbs = $db->prepare('SELECT scores.score \n\t\tFROM (scores INNER JOIN games ON scores.gameID = games.gameID )\n\t\tINNER JOIN users ON(users.userID = scores.userID)\n\t\tWHERE users.UserID = :UserID\n\t\tORDER BY score DESC LIMIT 10'); \n\t\t$dbs->bindParam(':UserID', $UserID);\n\t\t\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\n $scores = $dbs->fetchAll(PDO::FETCH_ASSOC); \n\t\t\tforeach ($scores as $value) {\n\t\t\techo '<td>', $value['score'],'</td>';?></br><?php\n\t\t\techo '</tr>';\n\t\t\t\t}\n\t\t\t}\n}", "title": "" }, { "docid": "f47e9804b5d5aa3a76ac707ef15789af", "score": "0.5027551", "text": "public function get_top_offers_preview()\n\t{\n\t\t$date = new DateTime(\"now\");\n\t\t$curr_date = $date->format('Y-m-d h:i:s A');\n\t\t$this->db->select('top_offers.*,products.item_name,products.item_image,')->from('top_offers');\n\t\t$this->db->join('products', 'products.item_id = top_offers.item_id', 'left');\n $this->db->where('home_page_status',1);\n\t\t$this->db->order_by('top_offers.offer_percentage desc');\n\t\t$this->db->where('top_offers.expairdate >=', $curr_date);\n\t\treturn $this->db->get()->result_array();\n\t}", "title": "" }, { "docid": "e32c63b7a0ee2f70a46d6f07c1d89097", "score": "0.50255823", "text": "public function top250() {\n if ($this->pilot_imdbfill==FULL_ACCESS) $this->main_top250 = $this->imdb->top250();\n return $this->main_top250;\n }", "title": "" }, { "docid": "78833e312bc68593c3c852387369578d", "score": "0.502487", "text": "function retrieve_top_10() {\r\n exec('python application/models/overall_mentions.py BANANA KING',\r\n $mentions);\r\n return json_decode(implode(\"\\n\", $mentions));\r\n }", "title": "" }, { "docid": "bbc5d3cc09a18b74c8046f6209f67e79", "score": "0.502351", "text": "function best_review_main(){\n\t$qry=\"SELECT b.minimage, a.id,a.name,a.reserve,a.display,a.content,a.date,a.productcode,b.productname,b.tinyimage,b.selfcode,a.upfile,\n\tb.assembleuse, a.best_type, a.marks FROM tblproductreview a, tblproduct b WHERE best_type='1' AND a.productcode = b.productcode\n\tORDER BY a.date DESC, marks desc limit 4\";\n\n\t$res=pmysql_query($qry);\n\n\t$loop=0;\n\t$num=0;\n\twhile($row=pmysql_fetch_array($res)){\n\n\t\t$data[$num][]=$row;\n\n\t\t/*$loop++;\n\t\tif($loop==3){\n\t\t\t$loop=0;\n\t\t\t$num++;\n\t\t}*/\n\t}\n\treturn $data;\n}", "title": "" }, { "docid": "ba44b06392171e042739e080e1b864c1", "score": "0.5020422", "text": "public function mostPopular()\n {\n\n // return collection of orderDetails from the last 30 days\n $recentSales = OrderDetail::where('created_at', '>', Carbon::now()->subDays(30))->get();\n\n $products = DB::table('order_details')\n ->groupBy('product_id')\n ->select('product_id', DB::raw('sum(qty) as qty'))\n ->where('created_at', '>', Carbon::now()->subDays(30))\n ->orderBy('qty', 'desc')\n ->take(5)\n ->get();\n\n $data = [\n 'title' => 'Most Popular Items',\n 'products' => $products\n ];\n\n // dd($products);\n return view('products.most-popular')->with($data);\n }", "title": "" }, { "docid": "82ebe6d8b823d5242c492e5cd51b0c29", "score": "0.5018993", "text": "public function index()\n {\n $data = $this->getIndexData();\n $data['action'] = [\n 'form' => $this->getService('config')->get()['routes']['order-number-of-products'],\n ];\n $data['percentage'] = (empty($data['order']))\n ? $this->getPercentage([]) : $this->getPercentage($data['order']);\n\n return $this->render('Dealers/website/order/website-package/number-of-products.twig', $data);\n }", "title": "" }, { "docid": "509e86bc6ab8b647cac9b728dfe541d5", "score": "0.5017859", "text": "function getTopRows(){\n $where = \" 1 = 1 and doitac_active = 1\";\n $rows = $this->getDBList($where,\" doitac_id DESC\",true,\" Limit 1\");\n return $rows;\n }", "title": "" }, { "docid": "28fae7ae15c7aee2822830cbc404948b", "score": "0.50103676", "text": "function getTopRows(){\n $where = \" 1 = 1 and tientrinh_active = 1\";\n $rows = $this->getDBList($where,\" tientrinh_id DESC\",true,\" Limit 1\");\n return $rows;\n }", "title": "" }, { "docid": "63a2e3aa1bb46ac6c22a40891bed1c8d", "score": "0.5005371", "text": "function show_tshirt_report ()\n{\n\n if (! user_has_priv (PRIV_REGISTRAR))\n return display_access_error ();\n\n // If not specified, sort by name\n\n if (array_key_exists ('OrderBy', $_REQUEST))\n $OrderBy = intval ($_REQUEST['OrderBy']);\n else\n $OrderBy = ORDER_BY_NAME;\n\n // Initialize our counters\n\n $small = 0;\n $medium = 0;\n $large = 0;\n $xlarge = 0;\n $xxlarge = 0;\n $x3large = 0;\n $x4large = 0;\n $x5large = 0;\n\n $small_2 = 0;\n $medium_2 = 0;\n $large_2 = 0;\n $xlarge_2 = 0;\n $xxlarge_2 = 0;\n $x3large_2 = 0;\n $x4large_2 = 0;\n $x5large_2 = 0;\n\n $count = 0;\n\n // Get the list of orders\n\n $sql = 'SELECT Users.FirstName, Users.LastName, Users.EMail,';\n $sql .= 'TShirts.*';\n $sql .= ' FROM TShirts, Users';\n $sql .= ' WHERE Users.UserId=TShirts.UserId';\n\n if (ORDER_BY_NAME == $OrderBy)\n $sql .= ' ORDER BY LastName, FirstName';\n else\n $sql .= ' ORDER BY TShirtID';\n\n $result = mysql_query ($sql);\n if (! $result)\n return display_mysql_error ('Query for TShirts failed', $sql);\n\n display_header (CON_NAME . ' Shirt Order Report');\n\n echo \"<p>Click on the user name to send mail<br>\\n\";\n echo \"Click on the status to update the order<br>\\n\";\n printf (\"<a href=\\\"TShirts.php?action=%d\\\">Add new shirt sale</a><p>\\n\",\n\t SELECT_USER_TO_SELL_SHIRT);\n\n // Display the orders\n\n echo \"<table border=1>\\n\";\n echo \" <tr>\\n\";\n printf (\" <th rowspan=\\\"2\\\"><a href=TShirts.php?action=%d&OrderBy=%d>ID</a></th>\\n\",\n\t SHOW_TSHIRT_REPORT,\n\t ORDER_BY_SEQ);\n printf (\" <th align=left rowspan=\\\"2\\\"><a href=TShirts.php?action=%d&OrderBy=%d>Name</a></th>\\n\",\n\t SHOW_TSHIRT_REPORT,\n\t ORDER_BY_NAME);\n echo \" <th rowspan=\\\"2\\\">Status</th>\\n\";\n printf (\" <th colspan=\\\"6\\\">%s</th>\\n\", SHIRT_NAME);\n if (SHIRT_TWO_SHIRTS)\n printf (\" <th colspan=\\\"6\\\">%s</th>\\n\", SHIRT_2_NAME);\n echo \" </tr>\\n\";\n echo \" <tr>\\n\";\n echo \" <th>Small</th>\\n\";\n echo \" <th>Medium</th>\\n\";\n echo \" <th>Large</th>\\n\";\n echo \" <th>XLarge</th>\\n\";\n echo \" <th>XXLarge</th>\\n\";\n echo \" <th>X3Large</th>\\n\";\n // echo \" <th>X4Large</th>\\n\";\n // echo \" <th>X5Large</th>\\n\";\n if (SHIRT_TWO_SHIRTS)\n {\n echo \" <th>Small</th>\\n\";\n echo \" <th>Medium</th>\\n\";\n echo \" <th>Large</th>\\n\";\n echo \" <th>XLarge</th>\\n\";\n echo \" <th>XXLarge</th>\\n\";\n echo \" <th>X3Large</th>\\n\";\n // echo \" <th>X4Large</th>\\n\";\n // echo \" <th>X5Large</th>\\n\";\n }\n echo \" </tr>\\n\";\n\n // Now display each order, skipping any empty ones\n\n while ($row = mysql_fetch_object ($result))\n {\n if ((0 == $row->Small) &&\n\t(0 == $row->Medium) &&\n\t(0 == $row->Large) &&\n\t(0 == $row->XLarge) &&\n\t(0 == $row->XXLarge) &&\n\t(0 == $row->X3Large) &&\n\t(0 == $row->X4Large) &&\n\t(0 == $row->X5Large) &&\n (0 == $row->Small_2) &&\n\t(0 == $row->Medium_2) &&\n\t(0 == $row->Large_2) &&\n\t(0 == $row->XLarge_2) &&\n\t(0 == $row->XXLarge_2) &&\n\t(0 == $row->X3Large_2) &&\n\t(0 == $row->X4Large_2) &&\n\t(0 == $row->X5Large_2))\n continue;\n\n switch ($row->Status)\n {\n case 'Paid': $bgcolor = get_bgcolor('Confirmed'); break; // Green\n case 'Unpaid': $bgcolor = get_bgcolor('Waitlisted'); break; // Yellow\n case 'Cancelled': $bgcolor = get_bgcolor('Away'); break; // Gray\n default: $bgcolor = get_bgcolor('Full'); break; // Red\n }\n\n if ($row->Status!='Cancelled')\n {\n $count++;\n\n $small += $row->Small;\n $medium += $row->Medium;\n $large += $row->Large;\n $xlarge += $row->XLarge;\n $xxlarge += $row->XXLarge;\n $x3large += $row->X3Large;\n // $x4large += $row->X4Large;\n // $x5large += $row->X5Large;\n\n $small_2 += $row->Small_2;\n $medium_2 += $row->Medium_2;\n $large_2 += $row->Large_2;\n $xlarge_2 += $row->XLarge_2;\n $xxlarge_2 += $row->XXLarge_2;\n $x3large_2 += $row->X3Large_2;\n // $x4large_2 += $row->X4Large_2;\n // $x5large_2 += $row->X5Large_2;\n }\n\n echo \" <tr align=\\\"center\\\" $bgcolor>\\n\";\n show_quantity ($row->TShirtID);\n echo \" <td align=\\\"left\\\"><a href=mailto:$row->EMail>$row->LastName, $row->FirstName</a></td>\\n\";\n printf (\" <td align=\\\"center\\\"><a href=TShirts.php?action=%d&ID=%d>$row->Status</a></td>\\n\",\n\t SHOW_INDIV_TSHIRT_FORM,\n\t $row->TShirtID);\n show_quantity ($row->Small);\n show_quantity ($row->Medium);\n show_quantity ($row->Large);\n show_quantity ($row->XLarge);\n show_quantity ($row->XXLarge);\n show_quantity ($row->X3Large);\n // show_quantity ($row->X4Large);\n // show_quantity ($row->X5Large);\n\n if (SHIRT_TWO_SHIRTS)\n {\n show_quantity ($row->Small_2);\n show_quantity ($row->Medium_2);\n show_quantity ($row->Large_2);\n show_quantity ($row->XLarge_2);\n show_quantity ($row->XXLarge_2);\n show_quantity ($row->X3Large_2);\n // show_quantity ($row->X4Large_2);\n // show_quantity ($row->X5Large_2);\n }\n echo \" </tr>\\n\";\n }\n\n // Display the summary\n\n echo \" <tr>\\n\";\n echo \" <th align=left colspan=3>Total Active Orders: $count</th>\\n\";\n echo \" <th>$small</th>\\n\";\n echo \" <th>$medium</th>\\n\";\n echo \" <th>$large</th>\\n\";\n echo \" <th>$xlarge</th>\\n\";\n echo \" <th>$xxlarge</th>\\n\";\n echo \" <th>$x3large</th>\\n\";\n // echo \" <th>$x4large</th>\\n\";\n // echo \" <th>$x5large</th>\\n\";\n if (SHIRT_TWO_SHIRTS)\n {\n echo \" <th>$small_2</th>\\n\";\n echo \" <th>$medium_2</th>\\n\";\n echo \" <th>$large_2</th>\\n\";\n echo \" <th>$xlarge_2</th>\\n\";\n echo \" <th>$xxlarge_2</th>\\n\";\n echo \" <th>$x3large_2</th>\\n\";\n // echo \" <th>$x4large_2</th>\\n\";\n // echo \" <th>$x5large_2</th>\\n\";\n }\n echo \" </tr>\\n\";\n echo \"</table>\\n\";\n}", "title": "" }, { "docid": "4183e849ec1087c72853d4d5c74ba1ae", "score": "0.50049645", "text": "function topTenGameNamesforAllTimeByuser($UserID){\n\t\t$db = new PDO(\"mysql:host=localhost;dbname=capstonegames\", \"root\", \"\");\n $dbs = $db->prepare('SELECT games.GameName \n\t\tFROM (scores INNER JOIN games ON scores.gameID = games.gameID )\n\t\tINNER JOIN users ON(users.userID = scores.userID)\n\t\tWHERE users.UserID = :UserID\n\t\tORDER BY score DESC LIMIT 10'); \n\t\t$dbs->bindParam(':UserID', $UserID);\n\t\t\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\n $scores = $dbs->fetchAll(PDO::FETCH_ASSOC); \n\t\t\tforeach ($scores as $value) {\n\t\t\techo '<td>', $value['GameName'],'</td>';?></br><?php\n\t\t\techo '</tr>';\n\t\t\t\t}\n\t\t\t}\n}", "title": "" }, { "docid": "339416bbd5a1c5018834f3880d5324aa", "score": "0.50011325", "text": "function teamlead_teacher_overall_count_summary()\n {\n\t//COUNT QUERY\n\n\t$result_count=(\"SELECT capmus_users.id,capmus_users.LeadId,campus_schedule.std_status,count(campus_schedule.studentID) as cnt,campus_schedule.status \n\tFROM capmus_users \n\tINNER JOIN campus_schedule \n\tON capmus_users.id=campus_schedule.teacherID and campus_schedule.status=1 and campus_schedule.teacherID!=0 GROUP BY campus_schedule.std_status\");\n\t$result_count=mysql_query($result_count);\n\t\n\twhile($row_count = mysql_fetch_array($result_count))\n\t{ \n\t\techo \"<br><b><div style='float:left'>\". getData(nl2br( $row_count['std_status']),'stdStatusmo-list') . \" : \" . $row_count['cnt'].\"</b>&nbsp;&nbsp;&nbsp;\";\n\t}\t\n\techo \"<hr>\";\n }", "title": "" }, { "docid": "fa9751c37cfcf13763ebf02e8b0ac370", "score": "0.4999831", "text": "function printResult1($result) {\r\n echo '<div id=\"rich\">';\r\n echo '<h1><em>Top 10 Rich Channels</em></h1>';\r\n echo '<table>';\r\n echo '<tr>';\r\n echo '<th>ID</th>';\r\n echo '<th>Title</th>';\r\n echo '<th>Total Donations Received</th>';\r\n echo '</tr>';\r\n while ($row = oci_fetch_array($result, OCI_BOTH)) {\r\n echo '<tr>';\r\n echo '<td>'.$row[0].'</td>';\r\n echo '<td> <a href =channel.php?CID='.$row[0].' target=\"_blank\">'.$row[1]. '</a></td>'; \r\n echo '<td>'.$row[2].'</td>';\r\n echo '</tr>'; \r\n }\r\n echo '</table>';\r\n echo '</div>';\r\n}", "title": "" }, { "docid": "35af926da91fb001f46b760568b7b21a", "score": "0.49928012", "text": "protected function display_dashboard_count( $number, $label ) {\n ?>\n<tr>\n<td class=\"first b b-commerce\"><?php echo esc_html( $number ); ?></td>\n<td class=\"t commerce\"><?php echo esc_html( $label ); ?></td>\n</tr>\n<?php\n }", "title": "" }, { "docid": "9fd616921cdbbf6d5e99dc805a29773b", "score": "0.49905714", "text": "public function getallsummary(){\n\n\t\t\t/*$sql = \"SELECT COUNT(*) FROM products AS products;\n\t\t\t\t\tSELECT * FROM products AS activeproducts;\n\t\t\t\t\tSELECT COUNT(*) FROM orders AS pending;\n\t\t\t\t\tSELECT COUNT(*) FROM cart AS cart;\n\t\t\t\t\tSELECT COUNT(*) FROM orders AS orders;\n\t\t\t\t\tSELECT COUNT(*) FROM users AS users\";\n\n\t\t\t$statement = $this->conn->prepare($sql);\n\t\t\t$result = $statement->execute();\n\t\t\t$data['products'] = $statement->fetchColumn(0);\n\t\t\t$data['activeproducts'] = $statement->fetchColumn(1);\n\t\t\t$data['pending'] = $statement->fetchColumn(2);\n\t\t\t$data['carts'] = $statement->fetchColumn(3);\n\t\t\t$data['orders'] = $statement->fetchColumn(4);\n\t\t\t$data['users'] = $statement->fetchColumn(5);*/\n\n\t\t\t$sql = \"SELECT COUNT(*) FROM products\";\n\t\t\t$statement = $this->conn->prepare($sql);\n\t\t\t$result = $statement->execute();\n\t\t\t$data['products'] = $statement->fetchColumn();\n\n\t\t\t$sql = \"SELECT * FROM products\";\n\t\t\t$statement = $this->conn->prepare($sql);\n\t\t\t$result = $statement->execute();\n\t\t\t$data['activeproducts'] = $statement->fetchColumn();\n\n\t\t\t$sql = \"SELECT COUNT(*) FROM orders\";\n\t\t\t$statement = $this->conn->prepare($sql);\n\t\t\t$result = $statement->execute();\n\t\t\t$data['pending'] = $statement->fetchColumn();\n\n\t\t\t$sql = \"SELECT COUNT(*) FROM cart\";\n\t\t\t$statement = $this->conn->prepare($sql);\n\t\t\t$result = $statement->execute();\n\t\t\t$data['carts'] = $statement->fetchColumn();\n\n\t\t\t$sql = \"SELECT COUNT(*) FROM orders\";\n\t\t\t$statement = $this->conn->prepare($sql);\n\t\t\t$result = $statement->execute();\n\t\t\t$data['orders'] = $statement->fetchColumn();\n\n\t\t\t$sql = \"SELECT COUNT(*) FROM users\";\n\t\t\t$statement = $this->conn->prepare($sql);\n\t\t\t$result = $statement->execute();\n\t\t\t$data['users'] = $statement->fetchColumn();\n\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "d4e4f12068215808baab6ffbabae7ebf", "score": "0.4979406", "text": "function topTenGameScoresforAllTime($gameID){\n\t$db = new PDO(\"mysql:host=localhost;dbname=capstonegames\", \"root\", \"\");\n $dbs = $db->prepare('SELECT scores.score\n\t\tFROM scores INNER JOIN games ON scores.gameID = games.gameID \n\t\tWHERE games.gameID = :gameID\n\t\tORDER BY score DESC LIMIT 10'); \n\t\t$dbs->bindParam(':gameID', $gameID);\n\t\t\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\n $scores = $dbs->fetchAll(PDO::FETCH_ASSOC); \n\t\t\tforeach ($scores as $value) {\n\t\t\techo '<td>', $value['score'],'</td>';?></br><?php\n\t\t\techo '</tr>';\n\t\t\t\t}\n\t\t\t}\n}", "title": "" }, { "docid": "f70747d89f3def96b85f8730d83f6938", "score": "0.49763694", "text": "function getTopRows(){\n\t\t$where = \" 1 = 1 and cv_cat_active = 1\";\n \t$rows = $this->getDBList($where,\" cv_cat_id DESC\",true,\" Limit 1\");\n \treturn $rows;\n }", "title": "" }, { "docid": "7df6c8b71004814abb2486a3279622c7", "score": "0.4974166", "text": "function summary_print_by_activity() {\n\t$t_project_id = helper_get_current_project();\n\t$t_resolved = config_get( 'bug_resolved_status_threshold' );\n\n\tdb_param_push();\n\t$t_specific_where = helper_project_specific_where( $t_project_id );\n\tif( ' 1<>1' == $t_specific_where ) {\n\t\treturn;\n\t}\n\t$t_query = 'SELECT COUNT(h.id) as count, b.id, b.summary, b.view_state\n\t\t\t\tFROM {bug} b, {bug_history} h\n\t\t\t\tWHERE h.bug_id = b.id\n\t\t\t\tAND b.status < ' . db_param() . '\n\t\t\t\tAND ' . $t_specific_where . '\n\t\t\t\tGROUP BY h.bug_id, b.id, b.summary, b.last_updated, b.view_state\n\t\t\t\tORDER BY count DESC, b.last_updated DESC';\n\t$t_result = db_query( $t_query, array( $t_resolved ) );\n\n\t$t_count = 0;\n\t$t_private_bug_threshold = config_get( 'private_bug_threshold' );\n\t$t_summarydata = array();\n\t$t_summarybugs = array();\n\twhile( $t_row = db_fetch_array( $t_result ) ) {\n\t\t# Skip private bugs unless user has proper permissions\n\t\tif( ( VS_PRIVATE == $t_row['view_state'] ) && ( false == access_has_bug_level( $t_private_bug_threshold, $t_row['id'] ) ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif( $t_count++ == 10 ) {\n\t\t\tbreak;\n\t\t}\n\n\t\t$t_summarydata[] = array(\n\t\t\t'id' => $t_row['id'],\n\t\t\t'summary' => $t_row['summary'],\n\t\t\t'count' => $t_row['count'],\n\t\t);\n\t\t$t_summarybugs[] = $t_row['id'];\n\t}\n\n\tbug_cache_array_rows( $t_summarybugs );\n\n\tforeach( $t_summarydata as $t_row ) {\n\t\t$t_bugid = string_get_bug_view_link( $t_row['id'], false );\n\t\t$t_summary = string_display_line( $t_row['summary'] );\n\t\t$t_notescount = $t_row['count'];\n\n\t\techo '<tr>' . \"\\n\";\n\t\techo '<td class=\"small\">' . $t_bugid . ' - ' . $t_summary . '</td><td class=\"align-right\">' . $t_notescount . '</td>' . \"\\n\";\n\t\techo '</tr>' . \"\\n\";\n\t}\n}", "title": "" }, { "docid": "2a51491222a9c54934081627371206fd", "score": "0.49739227", "text": "public function getTotalDisplayRecords();", "title": "" }, { "docid": "d5617d23cf50f7ac761dc6726b8e5009", "score": "0.4971166", "text": "public function index()\n {\n // dd(Result::where('lottery_id', 9)->latest('published_at')->take(3)->get());\n return view('results.index')->withResults(Result::latest('published_at')->paginate(20));\n }", "title": "" }, { "docid": "6f0ad8267b316712dc83100daaca244c", "score": "0.49589464", "text": "public function masterit_top_authors( ) {\n\t\tglobal $wpdb, $current_user;\n\t\t\n\t\t$this->authors_count = $wpdb->get_var(\"SELECT COUNT(*) FROM \".$wpdb->prefix.\"authors WHERE 1\");\n\t\tif( $this->authors_count ) {\n\t\t\t$offset=0;\n\t\t\t\n\t\t\tif( isset($_REQUEST['offset']) ) \n\t\t\t\t$offset = $_REQUEST['offset'];\n\t\t\t\n\t\t\t$order = \"post_count desc\";\n\t\t\t$sorted_field = \"post_count\";\n\t\t\tif( isset($_REQUEST['order']) ) {\n\t\t\t\tswitch($_REQUEST['order']) {\n\t\t\t\t\tcase\"comment_count\":\n\t\t\t\t\t\t$order = \"comment_count desc,post_count desc,dt_login desc\";\n\t\t\t\t\t\t$sorted_field = \"comment_count\";\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase\"post_count\":\n\t\t\t\t\t\t$order = \"post_count desc,dt_login desc,comment_count desc\";\n\t\t\t\t\t\t$sorted_field = \"post_count\";\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\t\tcase\"dt_login\":\n\t\t\t\t\t\t$order = \"dt_login desc, post_count desc,comment_count desc\";\n\t\t\t\t\t\t$sorted_field = \"dt_login\";\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\t\t\n/*\t\t\t\t\t\n * \t\t\t\t\tcase\"nic\":\n\t\t\t\t\t\t$order = \"nicename asc\";\n\t\t\t\t\tbreak;\t\t\t\t\t\n *\n */\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Get authors statistic\n\t\t\t$authors = $wpdb->get_results(\"SELECT * FROM `\".$wpdb->prefix.\"authors` WHERE 1 ORDER BY \".$order.\" LIMIT $offset,20\");\n\t\t\t$author_ids = array();\n\t\t\t$author_stat = array();\n\t\t\t$authors_list = array();\n\t\t\tforeach ((array) $authors as $author ){\n\t\t\t\t$author_ids[] = $author->user_id;\n\t\t\t\t$author_stat[$author->user_id] = (array) $author;\n\t\t\t}\n\t\t\t\n\t\t\t$users = $wpdb->get_results(\"SELECT * FROM $wpdb->users WHERE ID IN(\".join(\",\",$author_ids).\")\");\n\t\t\t$sorted = array();\n\t\t\t$i=0;\n\t\t\tforeach ((array) $users as $user ){\n\t\t\t\t$sorted[$i] = (array) $author_stat[$user->ID][$sorted_field];\n\t\t\t\t$authors_list[$i] = array(\n\t\t\t\t\t\"user_id\" => $user->ID,\n\t\t\t\t\t\"user_nicename\" => $user->user_nicename,\n\t\t\t\t\t\"display_name\" => $user->display_name,\n\t\t\t\t\t\"post_count\" => $author_stat[$user->ID]['post_count'],\n\t\t\t\t\t\"comment_count\" => $author_stat[$user->ID]['comment_count'],\n\t\t\t\t\t\"last_login\" => $author_stat[$user->ID]['dt_login']\n\t\t\t\t);\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tarray_multisort($sorted, SORT_DESC, $authors_list);\n\t\t\treturn $authors_list;\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t}", "title": "" }, { "docid": "89f5c7bb9ee9153e5c1a6ce49c01e657", "score": "0.49512312", "text": "abstract public function getRecentPosts($number = 15);", "title": "" }, { "docid": "a4844b3e25de2879154b8a701580cbd4", "score": "0.49496558", "text": "public function findNumberofVisits($sortFields=null){\n $sql = $this->getNumberofVisits();\n // add sort order if required\n if (! is_null($sortFields)) {\n $sql .= ' ORDER BY ' . $sortFields;\n }\n $statement = DatabaseHelper::runQuery($this->connection, $sql, null);\n return $statement->fetch();\n}", "title": "" }, { "docid": "10f83814df891173f34e756c61624df6", "score": "0.49434817", "text": "public function index()\n\t{\n\n\t\t//AMBIL DARI EXPLORE\n\t\t$link = \"https://hack.kurio.co.id/v1/explore\"; \n\t\t$array_topic = $this->curl($link);\n\t\t$i = 0;\n\n\t\t//PARSING DARI JSON YANG UDAH DIDECODE\n\t\tforeach($array_topic as $data)\n\t\t{\n\t\t\tforeach($data as $values)\n\t\t\t{\n\t\t\t\tforeach($values as $value)\n\t\t\t\t{\n\t\t\t\t\t$arrTopicName[$i] = $value['name'];\n\t\t\t\t\t$arrTopicId[$i] = $value['id'];\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$i=0;\n\t\t$link = \"https://hack.kurio.co.id/v1/feed/top_stories\"; \n\t\t$array_top = $this->curl($link);\n\n\t\t//PARSING DARI JSON YANG UDAH DIDECODE\n\t\t//var_dump($array_top);\n\t\tforeach($array_top[\"data\"] as $value)\n\t\t{\n\t\t\t$arrTopId[$i] = $value[\"id\"];\n\t\t\t$arrTopTitle[$i] = $value[\"title\"];\n\t\t\t$arrTopExcerpt[$i] = $value[\"excerpt\"];\n\t\t\t$arrTopImg[$i] = $value[\"thumbnail\"][\"url\"];\n\n\t\t\t$persentage = $this->getPersentage($arrTopId[$i]);\n\t\t\tif($persentage>50) $arrTopPersentage[$i] =\"<font color='green'>\".$persentage.\"%</font>\";\n\t\t\telse $arrTopPersentage[$i] =\"<font color='red'>\".$persentage.\"%</font>\";\n\n\t\t\t$i++;\n\t\t}\n\t\tfor($j=0;$j<$i;$j++){\n\t\t\t\tfor($k=1;$k<$i;$k++)\n\t\t\t\t{\n\t\t\t\t\t$arrTopCompare[$j]=\"<font color='green'>Dicurigai tidak memiliki kesamaan gambar dengan artikel lain</font>\";\n\t\t\t\t\tif($j!=$k)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cla = new $this->Compare_Model;\n\t\t\t\t\t\t$number = $cla->compare($arrTopImg[$j],$arrTopImg[$k]);\n\t\t\t\t\t\tif($number>20){$arrTopCompare[$j]=\"<font color='red'>Dicurigai memiliki kesamaan gambar dengan artikel lain</font>\";\n\t\t\t\t\t\tbreak;}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\tif(empty($this->session->flashdata('feedId'))){\n\t\t\t$this->getDetails(\"127\");\n\t\t}\n\t\t$query = $this->Kurio_Model->selectMaxPoints();\n\t\t$result = $query->result();\n\t\t$ctr = 0 ;\n\t\tforeach($result as $line)\n\t\t{\n\t\t\t$arrVerifiedUser[$ctr++] = $line->username;\n\t\t\t$arrVerifiedVote[$ctr++] = $line->vote;\n\t\t}\n\n\n\n\t\t$data['VerifiedUser'] = $arrVerifiedUser;\n\t\t$data['TopicName'] = $arrTopicName;\n\t\t$data['TopicId'] = $arrTopicId;\n\t\t\n\t\t$data['topTopicId']=$arrTopId;\n\t\t$data['topTopicTitle']=$arrTopTitle;\n\t\t$data['topTopicExcerpt']=$arrTopExcerpt;\n\t\t$data['topTopicImg']=$arrTopImg;\n\t\t$data['topPersentage']=$arrTopPersentage;\n\t\t$data['topTopicCompare']=$arrTopCompare;\n\n\t\t$data['style'] = $this->load->view('Include/style',NULL,TRUE);\n\t\t$data['script'] = $this->load->view('Include/script',NULL,TRUE);\n\t\t$data['navbar'] = $this->load->view('Template/navbar',NULL,TRUE);\n\t\t$data['footer'] = $this->load->view('Template/footer',NULL,TRUE);\n\t\t$data['header'] = $this->load->view('Template/header',NULL,TRUE);\n\t\t\n\t\t$this->load->view('Page/home',$data);\n\t}", "title": "" }, { "docid": "d54907e5fa97bc39e01149533c09f715", "score": "0.4937493", "text": "public function render() {\n $count_query = $this->view->build_info['count_query'];\n $count_query = $count_query->countQuery();\n $this->view->total_rows = $count_query->execute()->fetchField();\n\n // Group the rows according to the grouping instructions, if specified.\n $sets = $this->renderGrouping(\n $this->view->result,\n $this->options['grouping'],\n TRUE\n );\n $render = $this->renderGroupingSets($sets);\n $render[0]['#statistic'] = t('Found @count responder(s) matching given criteria.', ['@count' => $this->view->total_rows]);\n return $render;\n }", "title": "" }, { "docid": "515b697eb76e2d2b2fee4edee6e6a563", "score": "0.49339873", "text": "public function displayRecords() {\n print \"<table width='50%'>\";\n print \"<th>Name</th></th><th>GPA</th><th>Percentile</th>\";\n $base = Base::Instance();\n $data = $base->getAll();\n foreach($data as $items) {\n foreach($items as $item) {\n print \"<tr>\";\n print \"<td width='20%' align='center'>\".$item->name.\"</td><td width='10%' align='center'>\".$item->gpa.\"</td><td align='center' width='10%'>\".$item->percentile.\"</td>\";\n print \"</tr>\";\n }\n }\n print \"</table>\";\n }", "title": "" }, { "docid": "fa0670572efeba779c807b906b4ea81a", "score": "0.49323407", "text": "function getTopTags() {\n\t$link = InfoNucleo::getConexionDB( 'ucomparte' );\n\t$sql = \"\nselect TAG_ID as name, count( * ) as c\nfrom TAGS\nwhere TAG_ESTADO = 1\ngroup by TAG_ID\norder by c desc\nlimit 0,10\n\";\n\n\t$res = $link->query( $sql );\n\tif( DB::isError( $res ) ) {\n\t\t$servicio = $_SESSION['servicio'] ? $_SESSION['servicio'] : ' ';\n\t\tLOGGER::sql_error( $servicio, $sql );\n\t\texit( 'Error en la BD' );\n\t}\n\n\t$retorno = Array();\n\twhile( $row = $res->fetchRow( DB_FETCHMODE_ASSOC ) ) {\n\t\t$retorno[] = $row;\n\t}\n\t\n\treturn $retorno;\t\n}", "title": "" }, { "docid": "66cdcb94a739826fa450a92e0cc34587", "score": "0.49322253", "text": "function overview()\n\t\t{\n\t\t\t$userTotal = call_user_func('countTotal', 'users');\n\t\t\t$listingTotal = call_user_func('countTotal', 'listing');\n\t\t\t$landlordTotal = call_user_func('countTotal', 'landlord');\n\t\t\t$lastModifiedUser = call_user_func('getLastModifiedUser');\n\t\t\t$lastAddedUser = call_user_func('getLastAddedUser');\n\t\t\t$lastLandlord = call_user_func('getLastAddedLandlord');\n\n\t\t\t$moduleName = \"System Overview\";\n\n\t\t\t\techo '\n\t\t\t\t<!-- The overview of the system -->\n\n\t\t\t\t<div id=\"content\">\n\n\n\t\t\t\t\t<header class =\"modules\"> <i class=\"fa fa-calculator fa-fw\"></i> Statistics </header>\n\t\t\t\t\t\t\t<section class=\"card\">\n\t\t\t\t\t\t\t\t<p class=\"card-title\">Total Users in Oasis</p>\n\t\t\t\t\t\t\t\t<p class=\"summary\">\n\t\t\t\t\t\t\t\t\t<span>'. $userTotal .'</span>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</section>\n\n\t\t\t\t\t\t\t<section class=\"card\">\n\t\t\t\t\t\t\t\t<p class=\"card-title\">Total Listings in Oasis</p>\n\t\t\t\t\t\t\t\t<p class=\"summary\">\n\t\t\t\t\t\t\t\t\t<span>'. $listingTotal .'</span>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</section>\n\n\t\t\t\t\t\t\t<section class=\"card\">\n\t\t\t\t\t\t\t\t<p class=\"card-title\">Total Landlords in Oasis</p>\n\t\t\t\t\t\t\t\t<p class=\"summary\">\n\t\t\t\t\t\t\t\t\t<span>'. $landlordTotal .'</span>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</section>\n\n\t\t\t\t\t\t\t<header class =\"modules\"><i class=\"fa fa-tasks fa-fw\"></i> Last updated </header>\n\t\t\t\t\t\t\t<section class=\"card\">\n\t\t\t\t\t\t\t\t<p class=\"card-title\">Last modified user</p>\n\t\t\t\t\t\t\t\t<p class=\"summary\">\n\t\t\t\t\t\t\t\t\t<span>'. $lastModifiedUser .'</span>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</section>\n\n\t\t\t\t\t\t\t<section class=\"card\">\n\t\t\t\t\t\t\t\t<p class=\"card-title\">Newest user created</p>\n\t\t\t\t\t\t\t\t<p class=\"summary\">\n\t\t\t\t\t\t\t\t\t\t<span> '. $lastAddedUser .'</span>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</section>\n\n\t\t\t\t\t\t\t<section class=\"card\">\n\t\t\t\t\t\t\t\t<p class=\"card-title\">Newest landlord created</p>\n\t\t\t\t\t\t\t\t<p class=\"summary\">\n\t\t\t\t\t\t\t\t\t\t<span>'. $lastLandlord .'</span>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</section>\n\n\n\t\t\t\t</div>\n\n\t\t\t\t';\n\n\n\t\t}", "title": "" }, { "docid": "a367589ef859fcae51f9806eb94f4d42", "score": "0.49275172", "text": "function summary_print_by_reporter() {\n\t$t_reporter_summary_limit = config_get( 'reporter_summary_limit' );\n\n\t$t_project_id = helper_get_current_project();\n\n\t$t_specific_where = helper_project_specific_where( $t_project_id );\n\tif( ' 1<>1' == $t_specific_where ) {\n\t\treturn;\n\t}\n\n\t$t_query = 'SELECT reporter_id, COUNT(*) as num\n\t\t\t\tFROM {bug}\n\t\t\t\tWHERE ' . $t_specific_where . '\n\t\t\t\tGROUP BY reporter_id\n\t\t\t\tORDER BY num DESC';\n\t$t_result = db_query( $t_query, array(), $t_reporter_summary_limit );\n\n\t$t_reporters = array();\n\twhile( $t_row = db_fetch_array( $t_result ) ) {\n\t\t$t_reporters[] = $t_row['reporter_id'];\n\t}\n\n\tuser_cache_array_rows( $t_reporters );\n\n\tforeach( $t_reporters as $t_reporter ) {\n\t\t$v_reporter_id = $t_reporter;\n\t\tdb_param_push();\n\t\t$t_query = 'SELECT COUNT(id) as bugcount, status FROM {bug}\n\t\t\t\t\tWHERE reporter_id=' . db_param() . '\n\t\t\t\t\tAND ' . $t_specific_where . '\n\t\t\t\t\tGROUP BY status\n\t\t\t\t\tORDER BY status';\n\t\t$t_result2 = db_query( $t_query, array( $v_reporter_id ) );\n\n\t\t$t_bugs_open = 0;\n\t\t$t_bugs_resolved = 0;\n\t\t$t_bugs_closed = 0;\n\t\t$t_bugs_total = 0;\n\n\t\t$t_resolved_val = config_get( 'bug_resolved_status_threshold' );\n\t\t$t_closed_val = config_get( 'bug_closed_status_threshold' );\n\n\t\twhile( $t_row2 = db_fetch_array( $t_result2 ) ) {\n\t\t\t$t_bugs_total += $t_row2['bugcount'];\n\t\t\tif( $t_closed_val <= $t_row2['status'] ) {\n\t\t\t\t$t_bugs_closed += $t_row2['bugcount'];\n\t\t\t} else if( $t_resolved_val <= $t_row2['status'] ) {\n\t\t\t\t$t_bugs_resolved += $t_row2['bugcount'];\n\t\t\t} else {\n\t\t\t\t$t_bugs_open += $t_row2['bugcount'];\n\t\t\t}\n\t\t}\n\n\t\tif( 0 < $t_bugs_total ) {\n\t\t\t$t_user = string_display_line( user_get_name( $v_reporter_id ) );\n\n\t\t\t$t_bug_link = '<a class=\"subtle\" href=\"' . config_get( 'bug_count_hyperlink_prefix' ) . '&amp;' . FILTER_PROPERTY_REPORTER_ID . '=' . $v_reporter_id;\n\t\t\tif( 0 < $t_bugs_open ) {\n\t\t\t\t$t_bugs_open = $t_bug_link . '&amp;' . FILTER_PROPERTY_HIDE_STATUS . '=' . $t_resolved_val . '\">' . $t_bugs_open . '</a>';\n\t\t\t}\n\t\t\tif( 0 < $t_bugs_resolved ) {\n\t\t\t\t$t_bugs_resolved = $t_bug_link . '&amp;' . FILTER_PROPERTY_STATUS . '=' . $t_resolved_val . '&amp;' . FILTER_PROPERTY_HIDE_STATUS . '=' . $t_closed_val . '\">' . $t_bugs_resolved . '</a>';\n\t\t\t}\n\t\t\tif( 0 < $t_bugs_closed ) {\n\t\t\t\t$t_bugs_closed = $t_bug_link . '&amp;' . FILTER_PROPERTY_STATUS . '=' . $t_closed_val . '&amp;' . FILTER_PROPERTY_HIDE_STATUS . '=' . META_FILTER_NONE . '\">' . $t_bugs_closed . '</a>';\n\t\t\t}\n\t\t\tif( 0 < $t_bugs_total ) {\n\t\t\t\t$t_bugs_total = $t_bug_link . '&amp;' . FILTER_PROPERTY_HIDE_STATUS . '=' . META_FILTER_NONE . '\">' . $t_bugs_total . '</a>';\n\t\t\t}\n\n\t\t\tsummary_helper_print_row( $t_user, $t_bugs_open, $t_bugs_resolved, $t_bugs_closed, $t_bugs_total );\n\t\t}\n\t}\n}", "title": "" } ]
20a78dd81221bf46123de6bbf4a508a6
Saves the form data, which will either be an update to already existing membersonly event configurations or converting a normal event to membersonly event,
[ { "docid": "528f337ac2aecdb348e67720e20ed44f", "score": "0.75142336", "text": "private function saveFormData($params) {\n $membersOnlyEvent = MembersOnlyEvent::create($params);\n if (!empty($membersOnlyEvent->id)) {\n $allowedMembershipTypesIDs = array();\n if (!empty($params['allowed_membership_types'])) {\n $allowedMembershipTypesIDs = explode(',', $params['allowed_membership_types']);\n }\n\n EventMembershipType::updateAllowedMembershipTypes($membersOnlyEvent->id, $allowedMembershipTypesIDs);\n }\n }", "title": "" } ]
[ { "docid": "a2f09da506126b9fedcee15e149d25d4", "score": "0.6150845", "text": "public function save() {\n\n // Because stuff from Vue / Front end JS comes as string, we must filter the boolean strings back to proper booleans before saving to the database\n $this -> filter_front_boolean_fields();\n\n foreach ( $this -> fillable as $key => $property) {\n if ( isset( $this -> $property ) ) {\n\n $custom_field_name = static::$post_type . '_' . $property;\n\n update_post_meta( $this -> id, $custom_field_name, $this -> $property );\n\n }\n }\n\n\n // Do the same for the non-mass updatable\n foreach ( $this -> manual as $key => $property) {\n if ( isset( $this -> $property ) ) {\n\n $custom_field_name = static::$post_type . '_' . $property;\n\n update_post_meta( $this -> id, $custom_field_name, $this -> $property );\n\n }\n }\n\n }", "title": "" }, { "docid": "7831088ae6f59084e4b694fb5413fa69", "score": "0.59682524", "text": "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'event_type_id' => $this->event_type_id,\n 'user_id1' => $this->user_id1,\n 'user_id2' => $this->user_id2,\n 'data_1' => $this->data_1,\n 'data_2' => $this->data_2\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "title": "" }, { "docid": "ebb768f9357ebbf562a42c71fcd4cef1", "score": "0.5925725", "text": "public function saveEvent()\n {\n }", "title": "" }, { "docid": "beb649058350d040f2d1042023337608", "score": "0.59139085", "text": "function event_details_save($post_id) {\r\n\tif( isset( $_POST['_fd_event_venue'] ) ) {\r\n\t\t$fd_event_venue = $_POST['_fd_event_venue'];\r\n\t\tupdate_post_meta( $post_id, '_fd_event_venue', $fd_event_venue );\r\n\t}\r\n\t\r\n\tif( isset( $_POST['_fd_event_cord'] ) ) {\r\n\t\techo $_POST['_fd_event_cord'];\r\n\t\t$fd_event_coordinates = $_POST['_fd_event_cord'];\r\n\t\tupdate_post_meta( $post_id, '_fd_event_cord', $fd_event_coordinates );\r\n\t}\r\n\t\r\n\tif( isset( $_POST['_fd_event_date'] ) ) {\r\n\t\techo $_POST['_fd_event_date'];\r\n\t\t$fd_event_date = $_POST['_fd_event_date'];\r\n\t\tupdate_post_meta( $post_id, '_fd_event_date', $fd_event_date );\r\n\t}\r\n\t\r\n\tif( isset( $_POST['_fd_event_end_date'] ) ) {\r\n\t\techo $_POST['_fd_event_end_date'];\r\n\t\t$fd_event_end_date = $_POST['_fd_event_end_date'];\r\n\t\tupdate_post_meta( $post_id, '_fd_event_end_date', $fd_event_end_date );\r\n\t}\r\n\t\r\n\tif( isset( $_POST['_fd_event_agenda'] ) ) {\r\n\t\techo $_POST['_fd_event_agenda'];\r\n\t\t$fd_event_agenda = $_POST['_fd_event_agenda'];\r\n\t\tupdate_post_meta( $post_id, '_fd_event_agenda', $fd_event_agenda );\r\n\t}\r\n}", "title": "" }, { "docid": "4f9cae3a5f5c94b75136258defa96f4f", "score": "0.58557916", "text": "function UpdateEvents()\r\n {\r\n $formvars = array();\r\n\r\n $this->EnsureEventUploadtable();\r\n\r\n $this->CollectEventUploadRegistrationSubmission($formvars);\r\n\r\n if (!$this->InsertEventUploadInfoIntoDB($formvars)) {\r\n $this->HandleError(\"Unable to upload file info into database\");\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "d25a6baa0dec6baad896913a94909b86", "score": "0.5793441", "text": "public function save()\n {\n $this->beforeSave();\n\n // Arrays for holding save data\n $post = array();\n $meta = array();\n $post['post_status'] = $this->post_status;\n\n // Get the default class variables and set it's keys to forbiddenKeys\n $defaultData = get_class_vars(get_class($this));\n $forbiddenKeys = array_keys($defaultData);\n\n $data = array_filter(get_object_vars($this), function ($item) use ($forbiddenKeys) {\n return !in_array($item, $forbiddenKeys);\n }, ARRAY_FILTER_USE_KEY);\n\n // If data key is allowed post field add to $post else add to $meta\n foreach ($data as $key => $value) {\n if (in_array($key, $this->allowedPostFields)) {\n $post[$key] = $value;\n continue;\n }\n\n $meta[$key] = $value;\n }\n\n // Save empty meta to array\n $empty_meta_values = array_filter($meta, array($this, 'getEmptyValues'));\n\n // Do not include null values in meta\n $meta = array_filter($meta, array($this, 'removeEmpty'));\n\n $post['post_type'] = $this->post_type;\n $post['meta_input'] = $meta;\n\n // Check if duplicate by matching \"_event_manager_id\" meta value\n if (isset($meta['_event_manager_id'])) {\n $duplicate = self::get(\n 1,\n array(\n 'relation' => 'AND',\n array(\n 'key' => '_event_manager_id',\n 'value' => $meta['_event_manager_id'],\n 'compare' => '='\n )\n ),\n $this->post_type\n );\n }\n\n // Update if duplicate\n if (isset($duplicate->ID)) {\n /*\n Check if event needs to be updated\n Hours has intentianally been removed from compare,\n as it is may cause timezone issues. \n Known flaws: \n - Unneccsesary update can be executed at new day\n - Update may not go trough if post is saved \n exactly the same minute of any hour. \n But will work most of the time.\n */\n\n $localTime = date(\"Y-m-d \\H:i:s\", strtotime(get_post_meta($duplicate->ID, 'last_update', true)));\n $remoteTime = date(\"Y-m-d \\H:i:s\", strtotime($meta['last_update']));\n\n if ($localTime != $remoteTime) {\n $post['ID'] = $duplicate->ID;\n $this->ID = wp_update_post($post);\n $isDuplicate = true;\n } else {\n return false;\n }\n } else {\n // Create if not duplicate, and occasions exists\n if (isset($post['meta_input']['occasions_complete']) && !empty($post['meta_input']['occasions_complete'])) {\n $this->ID = wp_insert_post($post, true);\n } else {\n return false;\n }\n }\n\n // Remove empty meta values from db\n $this->removeEmptyMeta($empty_meta_values, $this->ID);\n\n return $this->afterSave();\n }", "title": "" }, { "docid": "f6e7fc11f3be1b550b27855c36678846", "score": "0.570351", "text": "protected function event_UPDATE_FORM(\\stdClass $data){}", "title": "" }, { "docid": "cbf20cfd1b182b9b6ef129eac6723ac3", "score": "0.5701357", "text": "public function save_form_elements($data) {\n global $DB;\n\n $ephorus_assignment = $DB->get_field('plagiarism_eph_assignment', 'id', array('assignment'=>$data->instance));\n if (isset($data->ephorus_use)) {\n $record = new stdClass();\n $record->assignment = $data->instance;\n $record->processtype = $data->processtype;\n if ($ephorus_assignment) {\n $record->id = $ephorus_assignment;\n $DB->update_record('plagiarism_eph_assignment', $record);\n } else {\n $DB->insert_record('plagiarism_eph_assignment', $record);\n }\n } else {\n if ($ephorus_assignment) {\n $DB->delete_records('plagiarism_eph_assignment', array('id' => $ephorus_assignment));\n }\n }\n }", "title": "" }, { "docid": "eb7ba6a4bcf1f78e6c7a1bd5d567cebd", "score": "0.5629731", "text": "function save() {\n if ( !empty($_POST['bp_simple_post_form_subimitted'] ) ) {\n //yeh form was submitted\n //get form id\n $form_id = $_POST['bp_simple_post_form_id'];\n $form = $this->get_form_by_id( $form_id );\n\n if ( !$form )\n return; //we don't need to do anything\n \n//so if it is a registerd form, let the form handle it\n\n $form->save(); //save the post and redirect properly\n }\n }", "title": "" }, { "docid": "f67857796bfffc7dff519bf4bcc4e2d1", "score": "0.5577304", "text": "function save() {\n if( isset($this->_data['id']) ){\n // update\n return $this->_send_and_receive($this->member_url(), 'PUT', $this->_data);\n }\n // create\n return $this->_send_and_receive($this->collection_url(), 'POST', $this->_data);\n }", "title": "" }, { "docid": "3c8318285032f9dd3d520ac71790294e", "score": "0.55174196", "text": "function eventos_save($post_id)\n{\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return;\n }\n\n // Si no está el nonce declarado antes o no podemos verificarlo no seguimos.\n // if ( ! isset( $_POST['bf_metabox_nonce'] ) || ! wp_verify_nonce( $_POST['bf_metabox_nonce'], 'l_metabox_nonce' ) ) {\n // return;\n // }\n\n // Si el usuario actual no puede editar entradas no debería estar aquí.\n if (!current_user_can('edit_post')) {\n return;\n }\n\n // AHORA es cuando podemos guardar la información.\n\n // Nos aseguramos de que hay información que guardar.\n if (isset($_POST['eventos'])) {\n update_post_meta($post_id, 'eventos', $_POST['eventos']);\n // update_post_meta( $post_id, 'duracion_reto', wp_kses( $_POST['eventos'], $allowed ) );\n }\n}", "title": "" }, { "docid": "02d24ad8cf4b6f37e8d9ef94951ea97f", "score": "0.5512319", "text": "public function onFormProcessed(Event $event)\n {\n $form = $event['form'];\n $action = $event['action'];\n $params = $event['params'];\n\n switch ($action) {\n case 'milestones':\n $post = !empty($_POST) ? $_POST : [];\n\n //$this->grav['debugger']->addMessage('hi!!');\n //$this->grav['debugger']->addMessage($post['data']);\n //$this->grav['debugger']->addMessage($post['data']['name']);\n //dump($post);\n\n $name = filter_var(urldecode($post['data']['name']), FILTER_SANITIZE_STRING);\n $milestones = filter_var(urldecode($post['data']['milestones']), FILTER_SANITIZE_STRING);\n\n $filename = DATA_DIR . 'milestones/';\n //$this->grav['debugger']->addMessage($filename);\n $filename .= $name . '.yaml';\n $file = File::instance($filename);\n\n if (file_exists($filename)) {\n $data = Yaml::parse($file->content());\n\n $data['milestones'][] = [\n 'date' => date('D, d M Y H:i:s', time()),\n 'text' => $milestones,\n ];\n } else { \n $data = array(\n 'name' => $name,\n 'milestones' => array([\n 'date' => date('D, d M Y H:i:s', time()),\n 'text' => $milestones,\n ])\n );\n }\n // stores in /user/data/milestones/$name.yaml\n $file->save(Yaml::dump($data));\n\n break;\n }\n\n }", "title": "" }, { "docid": "6ec0d04c2560672a021dc7165314234f", "score": "0.54735994", "text": "function dynamic_save_people_data($post_id)\n{\n\n// echo '<pre>'.print_r( $_POST , 1).'</pre>';\n\n // verify if this is an auto save routine.\n // If it is our form has not been submitted, so we dont want to do anything\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)\n return;\n\n // verify this came from the our screen and with proper authorization,\n // because save_post can be triggered at other times\n if (!isset($_POST['dynamic_people_noncename']))\n return;\n\n if (!wp_verify_nonce($_POST['dynamic_people_noncename'], plugin_basename(__FILE__)))\n return;\n\n // OK, we're authenticated: we need to find and save the data\n\n $place = $_POST['event'];\n\n update_post_meta($post_id, 'event', $place);\n}", "title": "" }, { "docid": "1e959e2e7c4750ef7b1bf0f9742b927f", "score": "0.5468059", "text": "function save_dsr_email_metabox_values($post_id, $post) {\n\n\t// verify this came from the our screen and with proper authorization,\n if ( !wp_verify_nonce( $_POST['eventmeta_noncename'], plugin_basename(__FILE__) )) {\n return $post->ID;\n\t}\n\n\t// Is the user allowed to edit the event?\n\tif ( !current_user_can( 'edit_post', $post->ID ))\n\t\treturn $post->ID;\n\n\t//authenticated, putting all the meta values into an array for easy navigation\n\n\t$events_meta['_EnableRegistration'] = $_POST['_EnableRegistration'];\n $events_meta['_BookingEmailInPersonInstructions'] = $_POST['_BookingEmailInPersonInstructions'];\n\t$events_meta['_BookingEmailZoomInstructions'] = $_POST['_BookingEmailZoomInstructions'];\n\t$events_meta['_ReminderEmailZoomURL'] = $_POST['_ReminderEmailZoomURL'];\n\n\t// Add values of $events_meta as custom fields\n\tforeach ($events_meta as $key => $value) { // Cycle through the $events_meta array!\n\t\tif( $post->post_type == 'revision' ) return; // Don't store custom data twice\n\t\t$value = implode(',', (array)$value); // If $value is an array, make it a CSV (unlikely)\n\t\tif(get_post_meta($post->ID, $key, FALSE)) { // If the custom field already has a value\n\t\t\tupdate_post_meta($post->ID, $key, $value);\n\t\t} else { // If the custom field doesn't have a value\n\t\t\tadd_post_meta($post->ID, $key, $value);\n\t\t}\n\t\tif(!$value) delete_post_meta($post->ID, $key); // Delete if blank\n\t}\n\n}", "title": "" }, { "docid": "1ab118161d44bba8b7a2c95bb116c0b2", "score": "0.54636073", "text": "private function handleFormSettings(&$data){\n\t\t\t\n\t\t\t// Get options that are saved in the database\n\t\t\t$options = $this->getOptions( self::NAME );\n\t\t\t\n\t\t\t// Merge array if needed\n\t\t\tif(is_array($options)){\n\t\t\t\t$options = array_merge( $options, $_POST);\t\n\t\t\t}else{\n\t\t\t\t$options = $_POST;\t\n\t\t\t}\n\t\t\t\n\t\t\t// Add fix for checkboxes\n\t\t\tif(!isset($_POST['track_outbound'])) $options['track_outbound'] = \"false\";\n\t\t\tif(!isset($_POST['track_mailto'])) $options['track_mailto'] = \"false\";\n\t\t\tif(!isset($_POST['track_download'])) $options['track_download'] = \"false\";\n\t\t\t\n\t\t\t// Save new settings\n\t\t\t$this->saveOptions( self::NAME, $options);\n\t\t\t\n\t\t\t// Set success\n\t\t\t$data['settings_success'] = true;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "124bb51132dea478a9837b5063aa23eb", "score": "0.545423", "text": "public function VikCalSavePost()\n {\n global $post;\n update_post_meta( $post->ID, \"eventDate\", $_POST[\"VikCalDate\"]);\n }", "title": "" }, { "docid": "19a36c60146f1b09559fb0fac26237c9", "score": "0.54277027", "text": "public function save(Event $event);", "title": "" }, { "docid": "36c2827007d00b68629c8ca54be4dd38", "score": "0.5419507", "text": "protected function saveData()\n {\n // feature request #200\n if (isset($this->formData['gtr_organizations']) && is_array($this->formData['gtr_organizations'])) {\n $this->formData['gtr_organizations'] = '|' . implode('|', $this->formData['gtr_organizations']) . '|';\n }\n if ($this->trackEngine) {\n $this->formData['gtr_survey_rounds'] = $this->trackEngine->calculateRoundCount();\n } else {\n $this->formData['gtr_survey_rounds'] = 0;\n }\n\n parent::saveData();\n\n // Check for creation\n if ($this->createData) {\n if (isset($this->formData['gtr_id_track'])) {\n $this->trackId = $this->formData['gtr_id_track'];\n }\n } elseif ($this->trackEngine &&\n isset($this->formData[$this->_oldClassName], $this->formData['gtr_track_class']) &&\n $this->formData[$this->_oldClassName] != $this->formData['gtr_track_class']) {\n\n // Track conversion\n $this->trackEngine->convertTo($this->formData['gtr_track_class']);\n }\n }", "title": "" }, { "docid": "d83baff642493fb9c3333f57a40b29df", "score": "0.5403895", "text": "protected function event_NEW_FORM(\\stdClass $data){}", "title": "" }, { "docid": "023937c541ab0f05f848a22c6e0bb869", "score": "0.5385462", "text": "function _edit(){\n\t$collectionOne = isset($_POST['event']) ? $_POST['event'] : array(); \n\t$collectionTwo = $GLOBALS['eventToEdit'];\n\tif($GLOBALS['success'] == true){\n\t\tprint '<div class=\"alert alert-success\"><h4>Saved Successfully!</h4></div>';\t\n\t} else {\n\t\t$submitTo = !empty($GLOBALS['id']) ? 'events.php?id='.$GLOBALS['id'] : 'events.php';\n\t\tprint '<form method=\"POST\" action=\"'.$submitTo.'\">'.\n\t\t\t\t\t'<label>Title</label>'.\n\t\t\t\t\t'<input type=\"text\" class=\"form-control\" name=\"event[title]\" value=\"'.get_existing_field('title').'\" />'.\n\t\t\t\t\t'<label>Details</label>'.\n\t\t\t\t\t'<textarea class=\"form-control\" name=\"event[details]\">'.get_existing_field('details').'</textarea>'.\t\n\t\t\t\t\t'<label>Status</label>'.\n\t\t\t\t\tgenerate_select($GLOBALS['statuses'],'status', $collectionOne, $collectionTwo).\t\n\t\t\t\t\t'<label>Start Date</label>'.\n\t\t\t\t\t'<input id=\"start_date\" class=\"form-control\" type=\"text\" name=\"event[start_date]\" value=\"'.get_existing_field('start_date').'\" />'.\n\t\t\t\t\t'<label>End Date</label>'.\n\t\t\t\t\t'<input id=\"end_date\" class=\"form-control\" type=\"text\" name=\"event[end_date]\" value=\"'.get_existing_field('end_date').'\" />'.\n\t\t\t\t\t'<label>Event Category</label>';\n\t\tforeach($GLOBALS['eventCategories'] as $category){\n\t\t\tprint generate_checkbox($category['_id'],$category['name']);\n\t\t}\t\n\t\tprint\t'<button type=\"submit\" class=\"btn btn-primary\">Submit</button>'.\n\t\t\t'</form>';\n\t}\n}", "title": "" }, { "docid": "dc9d8ef9c5d17bc728df33051420475f", "score": "0.53766304", "text": "function CollectEventUploadRegistrationSubmission(&$formvars)\r\n {\r\n $formvars['upload_team'] = $this->Sanitize($_POST['upload_team']);\r\n $formvars['events'] = $this->Sanitize($_POST['events']);\r\n }", "title": "" }, { "docid": "654ac1e02e8dec09ca2ef7f66c703657", "score": "0.5368844", "text": "function publish_admin_edit_field_save()\n\t{\n\t\tglobal $DB;\n\n\t\t// is this a FF fieldtype?\n\t\tif (preg_match('/^ftype_id_(\\d+)$/', $_POST['field_type'], $matches) !== FALSE)\n\t\t{\n\t\t\tif (isset($matches[1]))\n\t\t\t{\n\t\t\t\t$ftype_id = $matches[1];\n\t\t\t\t$settings = (isset($_POST['ftype']) AND isset($_POST['ftype'][$_POST['field_type']]))\n\t\t\t\t ? $_POST['ftype'][$_POST['field_type']]\n\t\t\t\t : array();\n\n\t\t\t\t// initialize the fieldtype\n\t\t\t\t$query = $DB->query('SELECT * FROM exp_ff_fieldtypes WHERE fieldtype_id = \"'.$ftype_id.'\"');\n\t\t\t\tif ($query->row)\n\t\t\t\t{\t\n\t\t\t\t\t// let the fieldtype modify the settings\n\t\t\t\t\tif (($ftype = $this->_init_ftype($query->row)) !== FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (method_exists($ftype, 'save_field_settings'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$settings = $ftype->save_field_settings($settings);\n\t\t\t\t\t\t\tif ( ! is_array($settings)) $settings = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// save settings as a post var\n\t\t\t\t$_POST['ff_settings'] = $this->_serialize($settings);\n\t\t\t}\n\t\t}\n\n\t\t// unset extra FF post vars\n\t\tforeach($_POST as $key => $value)\n\t\t{\n\t\t\tif (substr($key, 0, 5) == 'ftype')\n\t\t\t{\n\t\t\t\tunset($_POST[$key]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "48320ddf429264c5c74ad473a3ec561c", "score": "0.53669053", "text": "protected function store()\n {\n \n //If needed, create a unique form ID.\n if(!isset($this->form_id))\n {\n \n do{\n $this->form_id = mk('Security')->random_string(20);\n }\n \n while(\n mk('Data')->session->mail_forms->{$this->form_id}->is_set()\n );\n \n }\n \n //Store data.\n mk('Data')->session->mail_forms->{$this->form_id}->merge(array(\n 'subject' => $this->subject,\n 'recipient' => $this->recipient,\n 'fields' => $this->fields,\n 'sender' => $this->sender\n ));\n \n }", "title": "" }, { "docid": "1384fada6a9df5338d37dd7f9675956f", "score": "0.53480375", "text": "public function save($persistenceIdentifier, array $formDefinition);", "title": "" }, { "docid": "1dcceb4417831d169c972d9e9d0209df", "score": "0.53437066", "text": "public function SaveData()\r\n { \r\n $yearOfBirth = isset($_POST[\"year_of_birth\"]) ? $_POST[\"year_of_birth\"] : null;\r\n $managerId = isset($_POST[\"managers\"]) ? $_POST[\"managers\"] : null;\r\n $childrenNum = isset($_POST[\"children_num\"]) ? $_POST[\"children_num\"] : null; \r\n $foreground = isset($_POST[\"foreground\"]) ? $_POST[\"foreground\"] : null; \r\n $background = isset($_POST[\"background\"]) ? $_POST[\"background\"] : null; \r\n \r\n $currentOperator = CUser::getCurrentUser();\r\n $currentOperator->setAdditionalData($yearOfBirth, $managerId, $childrenNum, $background, $foreground, date(\"Y-m-d H:i:s\"));\r\n $userId = $currentOperator->AddUserToDb();\r\n $currentOperator->__set('id', $userId); \r\n if(isset($_POST[\"used_days\"]) && (int)$_POST[\"used_days\"] !== 0)\r\n {\r\n $from = date('Y') . \"-01-01\";\r\n $to = date('Y-m-d', strtotime($from . \" + \".$_POST[\"used_days\"].\" days\")); \r\n $currentOperator->AddHoliday($from, $to, \"Holidays at previous workplace.\", EHolidayStatus::Previous);\r\n }\r\n $currentOperator->setHolidayList();\r\n \r\n header(\"Location: ../Calendar/CalendarDisplay\");\r\n }", "title": "" }, { "docid": "6ab3e365e933c61d22f7bc469ff0c327", "score": "0.53242606", "text": "public function set_to_POST()\n {\n $this->set_member_id($_POST['member_id']);\n $this->set_nickname($_POST['nickname']);\n $this->set_name_last($_POST['name_last']);\n $this->set_name_first($_POST['name_first']);\n $this->set_status($_POST['status']);\n $this->set_email($_POST['email']);\n $this->set_phone($_POST['phone']);\n $this->set_stamp($_POST['stamp']);\n }", "title": "" }, { "docid": "9c0b0b4370e2386d4eabddb87fb14167", "score": "0.5311996", "text": "protected function storeFormData($form)\n {\n $this->flashMessenger->addMessage(json_encode($form->getData()), static::FLASH_MESSAGE_NAMESPACE_INPUT);\n }", "title": "" }, { "docid": "c89b3763344ecb7d20534809d68a1ff7", "score": "0.53056526", "text": "function addAction($data, $form) {\n if ($CurrentMember = Member::currentUser()) {\n // Find a site member (in any group) based on the MemberID field\n $id = Convert::raw2sql($data['MemberID']);\n $member = DataObject::get_by_id(\"Member\", $id);\n\n if ($data['SpeakerID'] && is_numeric($data['SpeakerID'])) {\n $speaker = PresentationSpeaker::get()->byID(intval($data['SpeakerID']));\n } elseif ($member) {\n $speaker = PresentationSpeaker::get()->filter('MemberID', $member->ID)->first();\n }\n\n if (!$speaker) {\n $speaker = new PresentationSpeaker();\n }\n\n //Find or create the 'speaker' group\n if(!$userGroup = DataObject::get_one('Group', \"Code = 'speakers'\"))\n {\n $userGroup = new Group();\n $userGroup->Code = \"speakers\";\n $userGroup->Title = \"Speakers\";\n $userGroup->Write();\n $member->Groups()->add($userGroup);\n }\n //Add member to the group\n $member->Groups()->add($userGroup);\n\n if(($data['Country'] != '') && ($data['Country'] != $member->Country)) {\n $member->Country = convert::raw2sql($data['Country']);\n }\n\n if ($data['ReplaceName'] == 1) {\n $member->FirstName = $data['FirstName'];\n }\n if ($data['ReplaceSurname'] == 1) {\n $member->Surname = $data['LastName'];\n }\n if ($data['ReplaceBio'] == 1) {\n $member->Bio = $data['Bio'];\n }\n\n $member->write();\n\n\t\t\t$form->saveInto($speaker);\n $speaker->MemberID = $member->ID;\n $speaker->AdminID = Member::currentUser()->ID;\n // Attach Photo\n if($member->PhotoID && $speaker->PhotoID == 0) {\n $speaker->PhotoID = $member->PhotoID;\n }\n\n $speaker->AskedAboutBureau = TRUE;\n\n $speaker->write();\n\n\n\t $this->controller->redirect($this->controller()->Link().'speaker?saved=1');\n\n }\n else {\n return Security::PermissionFailure($this->controller, 'You must be <a href=\"/join\">registered</a> and logged in to edit your profile:');\n }\n }", "title": "" }, { "docid": "a4b31d783f70a79888f54b53895cf34b", "score": "0.53030163", "text": "protected function saveForm() {\n\t\t\t// New or edit record\n\t\t\t$newsUID\t\t\t\t\t\t= $this->piVars['uid']?intval($this->piVars['uid']):0;\n\n\t\t\t// Count categories & redirect settings\n\t\t\t// TODO: Recursive search for shortcut page definitions, really?\n\t\t\tif (is_array($this->piVars['category'])) {\n\t\t\t\t$arrCat\t\t\t\t\t\t= t3lib_div::trimExplode(',', $this->piVars['category'][0]);\n\t\t\t\t$redirectPID\t\t\t\t= isset($arrCat[1])?$arrCat[1]:$this->redirectPID; // Redirect to the 1st category shortcut page, if set\n\t\t\t} else {\n\t\t\t\t$redirectPID\t\t\t\t= $this->redirectPID;\n\t\t\t}\n\n\t\t\t// News settings\n\t\t\t$arrNews\t\t\t\t\t\t= array();\n\t\t\t$arrNews['pid']\t\t\t\t\t= ($this->categoryShortcutStorage == 1 && isset($arrCat[1]))?$arrCat[1]:$this->storagePID; // Save news on category shortcut page, if set & multiSelection is off\n\t\t\t$arrNews['tstamp']\t\t\t\t= time();\n\t\t\t$arrNews['crdate']\t\t\t\t= time();\n\t\t\t$arrNews['datetime']\t\t\t= time();\n\t\t\t$arrNews['hidden']\t\t\t\t= $this->queuePublish==1?1:0; // queuePublish?\n\t\n\t\t\t// Unset not needed piVars & quote inputs\n\t\t\tunset($this->piVars['captcha_response']);\n\t\t\tunset($this->piVars['edit']);\n\t\t\tunset($this->piVars['submit']);\n\t\t\t\n\t\t\tforeach($this->piVars as $field => $input) {\n\t\t\t\t// Field short preparation\n\t\t\t\tif ($field == 'short' || $field == 'bodytext') {\n\t\t\t\t\t$arrNews[$field] = str_replace('\\r\\n', chr(10), trim($input));\n\n\t\t\t\t// Datetime fields preparation\n\t\t\t\t} else if ($field == 'datetime' || $field == 'archivedate' || $field == 'starttime' || $field == 'endtime') {\n\t\t\t\t\tpreg_match($this->conf['dateConfig.']['constrain.']['regex'], $this->piVars[$field], $matches);\n\t\t\t\t\tif (count($matches) > 0) {\n\t\t\t\t\t\t$arrNews[$field] = mktime($matches[$this->conf['dateConfig.']['mktime.']['hour']], $matches[$this->conf['dateConfig.']['mktime.']['min']], 0, $matches[$this->conf['dateConfig.']['mktime.']['month']], $matches[$this->conf['dateConfig.']['mktime.']['day']], $matches[$this->conf['dateConfig.']['mktime.']['year']]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$arrNews[$field] = time();\n\t\t\t\t\t}\n\n\t\t\t\t// All other fields\n\t\t\t\t} else {\n\t\t\t\t\t$arrNews[$field] = is_array($input) ? count($input) : trim($input);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// FeGroup\n\t\t\tif (!empty($this->piVars['fe_group'])) {\n\t\t\t\t$arrNews['fe_group'] = implode(',', $this->piVars['fe_group']);\n\t\t\t}\n\n\t\t\t// Archivedate or auto-hide / auto-archive?\n\t\t\tif ($this->autoEndtime > 0) {\n\t\t\t\t$newEndTime = time() + (86400 * $this->autoEndtime); // This time + days from FF\n\t\t\t\tif ($this->autoArchive == 1) $arrNews['archivedate'] = $newEndTime;\n\t\t\t\t\telse $arrNews['endtime'] = $newEndTime;\n\t\t\t}\n\t\t\t\n\t\t\t// loginUser?\n\t\t\tif ($GLOBALS['TSFE']->loginUser) {\n\t\t\t\t$arrNews['tx_elementefenews_feuser']\t= $GLOBALS['TSFE']->fe_user->user['uid'];\n\t\t\t\t$arrNews['tx_elementefenews_fegroup']\t= $this->feeditGroup;\n\t\t\t\t$arrNews['author']\t\t\t\t\t\t= $GLOBALS['TSFE']->fe_user->user['name'];\n\t\t\t\t$arrNews['author_email']\t\t\t\t= $GLOBALS['TSFE']->fe_user->user['email'];\n\t\t\t}\n\n\t\t\t// RTE transformation (rtehtmlarea or tinymce_rte)\n\t\t\tif (!empty($this->piVars['bodytext']) && $this->enableRTE == 1) {\n\t\t\t\tif (!$this->RTEObj && t3lib_extMgm::isLoaded('rtehtmlarea')) $this->RTEObj = t3lib_div::makeInstance('tx_rtehtmlarea_pi2');\n\t\t\t\t\telse if(!$this->RTEObj && t3lib_extMgm::isLoaded('tinymce_rte')) $this->RTEObj = t3lib_div::makeInstance('tx_tinymce_rte_pi1');\n\t\t\t\t\n\t\t\t\tif ($this->RTEObj->isAvailable()) {\n\t\t\t\t\t$pageTSConfig\t\t\t= $GLOBALS['TSFE']->getPagesTSconfig();\n\t\t\t\t\t$RTEsetup\t\t\t\t= $pageTSConfig['RTE.'];\n\t\t\t\t\t$this->thisConfig\t\t= $RTEsetup['default.'];\n\t\t\t\t\t$this->thisConfig\t\t= $this->thisConfig['FE.'];\n\t\t\t\t\t$this->thePidValue\t\t= $GLOBALS['TSFE']->id;\n\t\t\t\t\t// Other transform mode than default?\n\t\t\t\t\tif (isset($RTEsetup['config.']['tt_news.']['bodytext.']['proc.']['overruleMode'])) {\n\t\t\t\t\t\t$this->specConf = array(\n\t\t\t\t\t\t\t'rte_transform' => array(\n\t\t\t\t\t\t\t\t'parameters' => array('mode' => $RTEsetup['config.']['tt_news.']['bodytext.']['proc.']['overruleMode'])\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$arrNews['bodytext']\t= $this->RTEObj->transformContent(\n\t\t\t\t\t\t'db',\n\t\t\t\t\t\t$this->piVars['bodytext'],\n\t\t\t\t\t\t'tt_news',\n\t\t\t\t\t\t'bodytext',\n\t\t\t\t\t\t$arrNews,\n\t\t\t\t\t\t$this->specConf,\n\t\t\t\t\t\t$this->thisConfig,\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t$this->thePidValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tunset($arrNews['_TRANSFORM_bodytext']); // Unset unused field\n\t\t\t}\n\n\t\t\t// Image handling, part one\n\t\t\t// @TODO: Support multi uploads and rewrite this part for v1.2\n\t\t\tif (!empty($_FILES[$this->prefixId]['name']['image'])) {\n\t\t\t\tif ($this->damUse == 1) {\n\t\t\t\t\t$damUidImg\t\t\t\t\t\t\t= $this->handleDAM($this->arrUploads['image']['path']);\n\t\t\t\t\tif ($this->conf['debug'] == 1) t3lib_div::devLog('saveForm - handleDAM', 'elemente_fenews', 0, array('damUidImg' => $damUidImg));\n\t\t\t\t\t$arrNews['tx_damnews_dam_images']\t= 1;\n\t\t\t\t} else {\n\t\t\t\t\t$arrNews['image']\t\t\t\t\t= $this->arrUploads['image']['hash'];\n\t\t\t\t}\n\t\t\t\t// @TODO: Fields have to go into DAM too\n\t\t\t\t$arrNews['imagealttext']\t\t\t\t= !$arrNews['imagealttext']\t\t? $this->arrUploads['image']['name'] : $arrNews['imagealttext'];\n\t\t\t\t$arrNews['imagetitletext']\t\t\t\t= !$arrNews['imagetitletext']\t? $this->arrUploads['image']['name'] : $arrNews['imagetitletext'];\n\t\t\t\t$this->piVars['image']\t\t\t\t\t= $this->arrUploads['image']['name']; // Put into piVars for mail content\n\t\t\t}\n\t\t\t\n\t\t\t// Image handling, part two\n\t\t\tif ($this->piVars['del_current_image'] == 1) {\n\t\t\t\tif ($this->damUse == 1) {\n\t\t\t\t\t$this->handleRelationDAM('del', $newsUID, array(), 'images');\n\t\t\t\t\t$arrNews['tx_damnews_dam_images']\t= 0;\n\t\t\t\t} else {\n\t\t\t\t\t$arrNews['image']\t\t\t\t\t= '';\n\t\t\t\t}\n\t\t\t\t$arrNews['imagealttext']\t\t\t\t= '';\n\t\t\t\t$arrNews['imagetitletext']\t\t\t\t= '';\n\t\t\t\t$arrNews['imagecaption']\t\t\t\t= '';\n\t\t\t\tunset($arrNews['del_current_image']);\n\t\t\t}\n\n\t\t\t// File handling\n\t\t\t// @TODO: Support multi uploads and rewrite this part for v1.2\n\t\t\tif (!empty($_FILES[$this->prefixId]['name']['news_files'])) {\n\t\t\t\tif ($this->damUse == 1) {\n\t\t\t\t\t$damUidFile\t\t\t\t= $this->handleDAM($this->arrUploads['news_files']['path']);\n\t\t\t\t\t$arrNews['tx_damnews_dam_media'] = 1;\n\t\t\t\t} else {\n\t\t\t\t\t$arrNews['news_files']\t= $this->arrUploads['news_files']['hash'];\n\t\t\t\t}\n\t\t\t\t$this->piVars['news_files']\t= $this->arrUploads['news_files']['name']; // Put into piVars for mail content\n\t\t\t}\n\t\t\t\n\t\t\t// File handling, part two\n\t\t\tif ($this->piVars['del_current_news_files'] == 1) {\n\t\t\t\tif ($this->damUse == 1) {\n\t\t\t\t\t$this->handleRelationDAM('del', $newsUID, array(), 'media');\n\t\t\t\t\t$arrNews['tx_damnews_dam_media']\t= 0;\n\t\t\t\t} else {\n\t\t\t\t\t$arrNews['news_files']\t\t\t\t= '';\n\t\t\t\t}\n\t\t\t\tunset($arrNews['del_current_news_files']);\n\t\t\t}\t\t\t\n\n\t\t\t// Link reformating\n\t\t\tif (!empty($this->piVars['links'])) {\n\t\t\t\t$arrLinks\t\t\t\t\t= t3lib_div::trimExplode(chr(10), $arrNews['links']);\n\t\t\t\t$arrLinksLen\t\t\t\t= count($arrLinks);\n\t\t\t\t$arrNews['links']\t\t\t= '';\n\t\t\t\tfor($i=0; $i<$arrLinksLen; $i++) {\n\t\t\t\t\t$nl = $i == $arrLinksLen-1 ? '' : chr(10); // no new line after the last entry\n\t\t\t\t\tif ($this->isURL($arrLinks[$i]) == 1) $arrNews['links'] .= $arrLinks[$i].$nl;\n\t\t\t\t\t\telse if ($this->isURL($arrLinks[$i]) == 2) $arrNews['links'] .= 'http://'.$arrLinks[$i].$nl;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// New record\n\t\t\tif ($newsUID == 0) {\n\t\t\t\t// Insert news\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_INSERTquery('tt_news', $arrNews);\n\t\t\t\t$newsUID = $GLOBALS['TYPO3_DB']->sql_insert_id();\n\t\t\t\tif ($this->conf['debug'] == 1) t3lib_div::devLog('saveForm - new: record', 'elemente_fenews', 0, array('sql' => $GLOBALS['TYPO3_DB']->INSERTquery('tt_news', $arrNews)));\n\n\t\t\t\t// Default category\n\t\t\t\tif (!empty($this->categoryDefault)) {\n\t\t\t\t\t$arrCatDef = t3lib_div::trimExplode(',', $this->categoryDefault);\n\t\t\t\t\t$this->handleRelationNews('new', $newsUID, 'tt_news_cat_mm', $arrCatDef, 'defaultCat');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Selected category\n\t\t\t\tif (is_array($this->piVars['category'])) {\n\t\t\t\t\t$this->handleRelationNews('new', $newsUID, 'tt_news_cat_mm', $this->piVars['category'], 'category');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Related news\n\t\t\t\tif (is_array($this->piVars['related'])) {\n\t\t\t\t\t$this->handleRelationNews('new', $newsUID, 'tt_news_related_mm', $this->piVars['related'], 'related');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Image DAM relation\n\t\t\t\tif (!empty($_FILES[$this->prefixId]['name']['image']) && $this->damUse == 1) {\n\t\t\t\t\t$this->handleRelationDAM('new', $newsUID, array($damUidImg), 'images');\n\t\t\t\t}\n\n\t\t\t\t// File DAM relation\n\t\t\t\tif (!empty($_FILES[$this->prefixId]['name']['news_files']) && $this->damUse == 1) {\n\t\t\t\t\t$this->handleRelationDAM('new', $newsUID, array($damUidFile), 'media');\n\t\t\t\t}\n\n\t\t\t// Edit record\n\t\t\t} else {\n\t\t\t\t// Update news\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tt_news', 'uid='.$newsUID, $arrNews);\n\t\t\t\tif ($this->conf['debug'] == 1) t3lib_div::devLog('saveForm - upd: record', 'elemente_fenews', 0, array('sql' => $GLOBALS['TYPO3_DB']->UPDATEquery('tt_news', 'uid='.$newsUID, $arrNews)));\n\n\t\t\t\t// Update selected category\n\t\t\t\tif (is_array($this->piVars['category'])) {\n\t\t\t\t\t$whereCatDef = !empty($this->categoryDefault)?' AND uid_foreign NOT IN ('.$this->categoryDefault.')':'';\n\t\t\t\t\t$this->handleRelationNews('edit', $newsUID, 'tt_news_cat_mm', $this->piVars['category'], 'category', $whereCatDef);\n\t\t\t\t}\n\n\t\t\t\t// Update related news\n\t\t\t\tif (is_array($this->piVars['related'])) {\n\t\t\t\t\t$this->handleRelationNews('edit', $newsUID, 'tt_news_related_mm', $this->piVars['related'], 'related');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Image DAM relation\n\t\t\t\tif (!empty($_FILES[$this->prefixId]['name']['image']) && $this->damUse == 1) {\n\t\t\t\t\t$this->handleRelationDAM('new', $newsUID, array($damUidImg), 'images');\n\t\t\t\t}\n\n\t\t\t\t// File DAM relation\n\t\t\t\tif (!empty($_FILES[$this->prefixId]['name']['news_files']) && $this->damUse == 1) {\n\t\t\t\t\t$this->handleRelationDAM('new', $newsUID, array($damUidFile), 'media');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Mail: Alert publisher?\n\t\t\tif ($this->queuePublish == 1) {\n\t\t\t\t$arrBeUser\t= $this->getBeUser();\n\t\t\t\t$arrMail\t= $this->setMailContent('queue', $arrBeUser['name']);\n\t\t\t\t$htmlPart\t= $this->mailHTML==1?$arrMail['html']:'';\n\t\t\t\t$this->sendMail($arrBeUser['email'], $this->pi_getLL('l_mail_subject'), $arrMail['plain'], $htmlPart, $this->mailFrom, $this->mailFromName);\n\t\t\t}\n\n\t\t\t// Mail: Feedback to submitter?\n\t\t\tif ($this->mailFeedback == 1) {\n\t\t\t\t$arrMail\t= $this->setMailContent('feed', $arrNews['author']);\n\t\t\t\t$htmlPart\t= $this->mailHTML==1?$arrMail['html']:'';\n\t\t\t\t$this->sendMail($arrNews['author_email'], $this->pi_getLL('l_mail_subject'), $arrMail['plain'], $htmlPart, $this->mailFrom, $this->mailFromName);\n\t\t\t}\n\n\t\t\t// Clear page cache: FF clearCachePID or $redirectPID\n\t\t\t$clearCachePID = $this->clearCachePID ? $this->clearCachePID: $redirectPID;\n\t\t\t$clearCachePID = $this->cObj->getTreeList($clearCachePID, $this->clearCacheRecursive).$clearCachePID;\n\t\t\t$GLOBALS['TSFE']->clearPageCacheContent_pidList($clearCachePID);\n\n\t\t\t// Redirect to page: FF redirectPID or shortcut page of category, see $redirectPID\n\t\t\theader('Location: '.t3lib_div::locationHeaderUrl($this->pi_getPageLink($redirectPID)));\n\t\t\tdie();\n\t\t}", "title": "" }, { "docid": "4ac06286e461a7cedfaa574ef00161b5", "score": "0.5302329", "text": "function event_add_entry_to_db($entry, $form) {\n\n // Make sure to only hijack the event form -> set in settings\n if (strcmp($entry['form_id'], get_option('helsingborg_event_form_id')) === 0) {\n // Event\n $name = $entry[1];\n $description = $entry[15];\n $approved = 0;\n $organizer = $entry[11];\n $location = $entry[7];\n $external_id = null;\n\n // Event time\n $type_of_date = $entry[4];\n $single_date = $entry[5];\n $time = $entry[6];\n $start_date = $entry[8];\n $end_date = $entry[9];\n\n // Link\n $link = $entry[17];\n\n // Selected days\n for($e = 1; $e <= 7; $e++) {\n if (strlen($entry[\"10.$e\"])>0) {\n $days_array[] = $e;\n }\n }\n\n // Create event\n $event = array(\n 'Name' => $name,\n 'Description' => $description,\n 'Link' => $link,\n 'Approved' => $approved,\n 'OrganizerID' => $organizer,\n 'Location' => $location,\n 'ExternalEventID' => $external_id\n );\n\n // Administration units\n $administrations = explode(',', $entry[3]);\n foreach($administrations as $unit) {\n $administration_units[] = HelsingborgEventModel::get_administration_id_from_name($unit)->AdministrationUnitID;\n }\n\n // Event types\n $event_types = explode(',', $entry[2]);\n\n // Create time/times\n $event_times = array();\n if ($single_date) {\n // Single occurence\n $event_time = array(\n 'Date' => $single_date,\n 'Time' => $time,\n 'Price' => 0\n );\n array_push($event_times, $event_time);\n } else {\n // Must be start and end then\n $dates_array = create_date_range_array($start_date, $end_date);\n $filtered_days = filter_date_array_by_days($dates_array, $days_array);\n\n foreach($filtered_days as $date) {\n $event_time = array(\n 'Date' => $date,\n 'Time' => $time,\n 'Price' => 0\n );\n\n array_push($event_times, $event_time);\n }\n }\n\n // Image\n if ($entry[16]) $image = handle_gf_image($entry[16], $entry[13]);\n\n // Now create the Event in DB\n HelsingborgEventModel::create_event($event, $event_types, $administration_units, $image, $event_times);\n\n // Now remove the entry from GF !\n delete_form_entry($entry);\n }\n}", "title": "" }, { "docid": "9011346609b37cffb2a8b609346ab19c", "score": "0.5284242", "text": "public function store()\n\t{\t\n\t\t$input=Input::all();\n\t\tif($input['role']==='other')\n\t\t{\n\t\t\t$input['role']=$input['other'];\n\t\t}\n\t\t\n\t\tif(isset($input['uid']))\n\t\t{\n\t\t\t$uids=$input['uid'];\n\t\t\tforeach ($uids as $uid) {\n\t\t\t\t$input['uid']=$uid;\n\t\t\t\t$nea=new EventAttendance;\n\t\t\t\t$nea->fill($input);\n\t\t\t\tif(!$nea->isValid())\n\t\t\t\t{\n\t\t\t\t\treturn Redirect::back()->withInput()->withErrors($this->eventAttendance->errors);\n\t\t\t\t}\n\t\t\t\t$nea->save();\n\t\t\t}\n\t\t}\n\t\tif($input['email']==='') {\n\t\t\t$user=User::where(\"email\",$input['email'])->first();\n\t\t\tif (isset($user))\n\t\t\t{\n\t\t\t\t$input['uid']=$user->id;\n\t\t\t}else{\n\t\t\t\t$newuserdata=['email'=>$input['email'], 'first'=>$input['first'], 'last'=>$input['last']];\n\t\t\t\t$newuser=new User;\n\t\t\t\tif($newuser->fill($newuserdata)->isValid('temporary'))\n\t\t\t\t{\n\t\t\t\t\t$newuser->fill($newuserdata)->save();\n\t\t\t\t\t$user=User::where(\"email\",$input['email'])->first();\n\t\t\t\t\t$input['uid']=$user->id;\n\t\t\t\t\tif(!$this->eventAttendance->fill($input)->isValid())\n\t\t\t\t\t{\n\t\t\t\t\t\treturn Redirect::back()->withInput()->withErrors($this->eventAttendance->errors);\n\t\t\t\t\t}\n\t\t\t\t\t$this->eventAttendance->fill($input)->save();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn Redirect::route('eventAttendances.manage',$input['eid']);\n\t}", "title": "" }, { "docid": "3239cf9ab355850e4b365fcbdea709c0", "score": "0.52813876", "text": "public static function wpcf7_save_data() {\n\n $options = self::get_options();\n\n $submission = WPCF7_Submission::get_instance();\n if (!$submission) {\n return;\n }\n\n $form_fields = $submission->get_posted_data();\n $form_id = $form_fields['_wpcf7'];\n\n // Dateien speichern\n\n $trick_17 = print_r($submission, TRUE);\n $trick_18 = strstr($trick_17, '[uploaded_files:WPCF7_Submission:private] => Array');\n $trick_19 = strstr($trick_18, ' )', true) . ' )';\n $trick_20 = strstr($trick_19, '(');\n $uploaded_files = explode('[', $trick_20);\n unset($uploaded_files[0]);\n\n foreach ($uploaded_files as $key => $array_string) {\n $uploaded_files[$key] = explode('] => ', $array_string);\n $new_key = explode('] => ', $array_string)['0'];\n $new_value = explode('] => ', $array_string)['1'];\n $new_value = str_replace(')', '', $new_value);\n $new_value = trim($new_value);\n $uploaded_files[$new_key] = $new_value;\n unset($uploaded_files[$key]);\n }\n\n $rand = intval(mt_rand(1, 9) . mt_rand(0, 9) . mt_rand(0, 9) . mt_rand(0, 9) . mt_rand(0, 9) . mt_rand(0, 9));\n ;\n\n $uploaddir = $_SERVER['DOCUMENT_ROOT'] . '/wp-content/uploads/fs7/' . $rand . '/';\n\n if (!file_exists($uploaddir)) {\n mkdir($uploaddir, 0755, true);\n }\n if (!file_exists($uploaddir . '.htaccess')) {\n $f = fopen($uploaddir . \".htaccess\", \"a+\") or die(\"Error: Can't open file\");\n $content_string = \"RewriteEngine On\\n\"\n . \"Order allow,deny\\n\"\n . \"Allow from all\\n\"\n . \"RewriteBase /\\n\"\n . \"RewriteCond %{REQUEST_FILENAME} ^.*(pdf|m4a|jpg|gif|jpeg|doc|docx|png)$\\n\"\n . \"RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC]\\n\"\n . \"RewriteRule . - [R=403,L]\\n\";\n fwrite($f, $content_string);\n fclose($f);\n }\n\n foreach ($uploaded_files as $key => $file) {\n\n // breakdown parts of uploaded file, to get basename\n $path = pathinfo($file);\n\n // directory of the new file\n $newfile = $uploaddir . $path['basename'];\n\n // check if a file with the same name exists in the directory\n $actual_name = $path['filename'];\n $original_name = $actual_name;\n $extension = $path['extension'];\n $i = 1;\n while (file_exists($newfile)) {\n $actual_name = (string) $original_name . '_' . $i;\n $newfile = $uploaddir . $actual_name . \".\" . $extension;\n $i++;\n }\n\n // make a copy of file to new directory\n copy($file, $newfile);\n\n // Name und Pfad als Option speichern\n add_option(self::option_name . '_' . $form_id . '_' . $rand . '_' . 'file-' . $key, $newfile, '', 'yes');\n }\n\n\n // Felder speichern (außer Datei, s.o.)\n\n $form_fields['date'] = current_time('Y-m-d H:i');\n $form_fields = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), \" \", $form_fields);\n //$form_fields = str_replace(\"\\\"\", \"'\", $form_fields);\n\n foreach ($form_fields as $k => $v) {\n if (is_array($v)) {\n $form_fields[$k] = implode(' | ', $v);\n }\n if (substr($k, 0) != '_wpcf7' && !array_key_exists($k, $uploaded_files)) {\n\n if(is_array($v)) {\n $input = implode(' | ', $v);\n add_option(self::option_name . '_' . $form_id . '_' . $rand . '_' . $k, $input, '', 'yes');\n } else {\n add_option(self::option_name . '_' . $form_id . '_' . $rand . '_' . $k, $v, '', 'yes');\n }\n }\n }\n\n\n // If you want to skip mailing the data, you can do it...\n //$wpcf7_data->skip_mail = true;\n\n $all_options = wp_load_alloptions();\n $my_options = array();\n foreach ($all_options as $name => $value) {\n if (stristr($name, 'fs7')) {\n $my_options[$name] = $value;\n }\n }\n }", "title": "" }, { "docid": "fa12b54f486ba298bd7ba31578141dba", "score": "0.52663547", "text": "function bp_em_record_activity_event_save( $result, $EM_Event ){\n\tif( $result && $EM_Event->event_status == 1 && $EM_Event->get_previous_status() != 1 ){\n\t\t$user = get_userdata($EM_Event->event_owner);\n\t\t$member_link = bp_core_get_user_domain($user->ID);\n\t\tif( empty($EM_Event->group_id) ){\n\t\t\tbp_em_record_activity( array(\n\t\t\t\t'user_id' => $user->ID,\n\t\t\t\t'action' => sprintf(__('%s added the event %s','events-manager'), \"<a href='\".$member_link.\"'>\".$user->display_name.\"</a>\", $EM_Event->output('#_EVENTLINK') ),\n\t\t\t\t'primary_link' => $EM_Event->output('#_EVENTURL'),\n\t\t\t\t'type' => 'new_event',\n\t\t\t\t'item_id' => $EM_Event->event_id,\n\t\t\t\t'hide_sitewide' => $EM_Event->event_private\n\t\t\t));\n\t\t}else{\n\t\t\t//tis a group event\n\t\t\t$group = new BP_Groups_Group($EM_Event->group_id);\n\t\t\tbp_em_record_activity( array(\n\t\t\t\t'user_id' => $user->ID,\n\t\t\t\t'action' => sprintf(__('%s added the event %s to %s.','events-manager'), \"<a href='\".$member_link.\"'>\".$user->display_name.\"</a>\", $EM_Event->output('#_EVENTLINK'), '<a href=\"'.bp_get_group_permalink($group).'\">'.bp_get_group_name($group).'</a>' ),\n\t\t\t\t'component' => 'groups',\n\t\t\t\t'type' => 'new_event',\n\t\t\t\t'item_id' => $EM_Event->group_id,\n\t\t\t\t'hide_sitewide' => $EM_Event->event_private\n\t\t\t));\n\t\t}\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "cbb537a18a3a5d118778e514344bb2fd", "score": "0.52645934", "text": "function saveProfileData() {\n include_once(dirname(__FILE__).'/base_surfers.php');\n $surferAdmin = new surfer_admin($this->msgs);\n // Save existing data for admin mail\n $surfer = &$this->surferObj->surfer;\n $this->oldData = array(\n 'surfer_surname' =>\n !empty($surfer['surfergroup_surname']) ? $surfer['surfergroup_surname'] : '',\n 'surfer_givenname' =>\n !empty($surfer['surfergroup_givenname']) ? $surfer['surfergroup_givenname'] : '',\n 'surfer_gender' =>\n !empty($surfer['surfergroup_gender']) ? $surfer['surfergroup_gender'] : ''\n );\n if (isset($this->data['dynamic_class']) && is_array($this->data['dynamic_class']) &&\n !empty($this->data['dynamic_class'])) {\n // Get the field names\n $dynFieldNames = $this->baseSurfers->getDataFieldNames($this->data['dynamic_class']);\n // Get data from these fields\n $dynData = $surferAdmin->getDynamicData($this->surferObj->surferId, $dynFieldNames);\n if (!empty($dynData)) {\n $this->oldData = array_merge($this->oldData, $dynData);\n }\n }\n $data = array(\n 'surfer_surname' =>\n !empty($this->params['surfer_surname']) ? $this->params['surfer_surname'] : '',\n 'surfer_givenname' =>\n !empty($this->params['surfer_givenname']) ? $this->params['surfer_givenname'] : '',\n 'surfer_gender' =>\n !empty($this->params['surfer_gender']) ? $this->params['surfer_gender'] : ''\n );\n if ($this->data['change_email'] && isset($this->params['surfer_new_email']) &&\n trim($this->params['surfer_new_email']) != '') {\n srand((double)microtime() * 1000000);\n $rand = uniqid(rand());\n $emailConfirmString = $rand;\n // Keep this XML stuff in mind (and code) for later ...\n // $changedata = sprintf ('<changedata><field name=\"%s\">%s</field></changedata>',\n // 'surfer_new_email', $this->params['surfer_new_email']);\n $t = time();\n $changerequest_data = array(\n 'surferchangerequest_surferid' =>\n !empty($this->surferObj->surfer['surfer_id']) ?\n $this->surferObj->surfer['surfer_id'] : '',\n 'surferchangerequest_type' => 'email',\n 'surferchangerequest_data' => !empty( $this->params['surfer_new_email']) ?\n $this->params['surfer_new_email'] : '',\n 'surferchangerequest_token' => md5($emailConfirmString),\n 'surferchangerequest_time' => $t,\n 'surferchangerequest_expiry' => $t + $this->data['Mail_Expiry'] * 3600\n );\n // Upadate this data in table\n $surferAdmin->databaseInsertRecord(\n $this->tableChangeRequests, 'surferchangerequest_id', $changerequest_data\n );\n // send mail\n $this->sendConfirmMail($emailConfirmString);\n }\n if (isset($this->params['surfer_password_1']) &&\n trim($this->params['surfer_password_1']) != '') {\n $data['surfer_password'] = $this->surferObj->getPasswordHash(\n $this->params['surfer_password_1']\n );\n }\n $surferAdmin->editSurfer['surfer_id'] = $this->surferObj->surferId;\n if ($surferAdmin->saveSurfer($data)) {\n $result = TRUE;\n } else {\n return FALSE;\n }\n // Save necessary parameters for admin mail\n $this->newData = array(\n 'surfer_surname' =>\n !empty($this->params['surfer_surname']) ? $this->params['surfer_surname'] : '',\n 'surfer_givenname' =>\n !empty($this->params['surfer_givenname']) ? $this->params['surfer_givenname'] : '',\n 'surfer_gender' =>\n !empty($this->params['surfer_gender']) ? $this->params['surfer_gender'] : ''\n );\n // Now save the dynamic data, if necessary\n if (isset($this->data['dynamic_class']) && is_array($this->data['dynamic_class']) &&\n !empty($this->data['dynamic_class'])) {\n // Get the field names\n $dynFieldNames = $this->baseSurfers->getDataFieldNames($this->data['dynamic_class']);\n // Get those fields that are actually set\n $dynFields = array();\n foreach ($dynFieldNames as $fieldName) {\n if (isset($this->params['dynamic_'.$fieldName])) {\n $dynFields[$fieldName] = $this->params['dynamic_'.$fieldName];\n }\n }\n if (!empty($dynFields)) {\n $this->newData = array_merge($this->newData, $dynFields);\n $result = $this->baseSurfers->setDynamicData($this->surferObj->surferId, $dynFields);\n }\n }\n return $result;\n }", "title": "" }, { "docid": "233f19b991b878b6ce7eb3fbb2c1c12f", "score": "0.5262098", "text": "public function saveMeta()\n {\n global $post;\n\n $rawPost = $_POST;\n if ($post && $post->post_type === $this->name) {\n\n foreach ($this->fieldList as $field) {\n if (strpos($field, '[]') !== false) {\n $this->fieldList[] = str_replace('[]', '', $field);\n }\n }\n\n update_post_meta($post->ID, \"metaList\", json_encode($this->fieldList));\n\n foreach ($this->fieldList as $metaField) {\n $fieldName = $this->metaToFieldName($metaField);\n\n if (isset($_POST[$fieldName])) {\n $val = $_POST[$fieldName];\n if (isset($this->saveFilters[$fieldName])) {\n $val = $this->saveFilters[$fieldName]($val);\n }\n\n update_post_meta($post->ID, $metaField, $val);\n }\n # catch manually named fields\n elseif (isset($_POST[$metaField])) {\n $val = $_POST[$metaField];\n if (isset($this->saveFilters[$metaField])) {\n $val = $this->saveFilters[$metaField]($val);\n }\n\n update_post_meta($post->ID, $metaField, $val);\n } else {\n # to catch checkboxes\n update_post_meta($post->ID, $metaField, 'false');\n }\n }\n }\n }", "title": "" }, { "docid": "4b49133c47209ea80db0529e80fdb73f", "score": "0.52581", "text": "public function save(array $options = []){ \n // Update the user record itself\n $result = parent::save($options);\n \n // Synchronize model's group relations with database\n $this->syncCachedGroups();\n \n // Save any new events for this user\n foreach ($this->new_events as $event){\n $this->events()->save($event);\n }\n \n return $result;\n }", "title": "" }, { "docid": "7ad1a1c9becf9655f01272148348a7f4", "score": "0.5256868", "text": "function event_type_form_submit(&$form, &$form_state) {\r\n $event_type = entity_ui_form_submit_build_entity($form, $form_state);\r\n // Save and go back.\r\n event_type_save($event_type);\r\n\r\n // Redirect user back to list of event types.\r\n $form_state['redirect'] = 'admin/events';\r\n}", "title": "" }, { "docid": "51fb10b8090f5c8b4e69e5db235d781a", "score": "0.52559364", "text": "function save($data){\n global $objDatabase, $_LANGID, $_CONFIG, $objInit;\n \n parent::getSettings();\n\n if(empty($data['startDate']) || empty($data['endDate']) || empty($data['category']) || ($data['seriesStatus'] == 1 && $data['seriesType'] == 2 && empty($data['seriesWeeklyDays']))) {\n return false;\n }\n \n foreach ($_POST['showIn'] as $key => $langId) {\n if(empty($_POST['title'][$langId]) && empty($_POST['title'][$_LANGID])) {\n return false;\n }\n }\n \n list($startDate, $strStartTime) = explode(' ', $data['startDate']);\n list($startHour, $startMin) = explode(':', $strStartTime);\n \n list($endDate, $strEndTime) = explode(' ', $data['endDate']);\n list($endHour, $endMin) = explode(':', $strEndTime);\n \n if ($data['all_day']) {\n list($startHour, $startMin) = array(0, 0);\n list($endHour, $endMin) = array(23, 59);;\n }\n \n //event data\n $id = isset($data['copy']) && !empty($data['copy']) ? 0 : (isset($data['id']) ? intval($data['id']) : 0);\n $type = isset($data['type']) ? intval($data['type']) : 0;\n $startDate = date(\"Y-m-d H:i:s\", parent::getDateTimestamp($startDate, intval($startHour), intval($startMin)));\n $endDate = date(\"Y-m-d H:i:s\", parent::getDateTimestamp($endDate, intval($endHour), intval($endMin)));\n $google = isset($data['map'][$_LANGID]) ? intval($data['map'][$_LANGID]) : 0;\n $allDay = isset($data['all_day']) ? 1 : 0;\n $convertBBCode = ($objInit->mode == 'frontend' && empty($id));\n \n $useCustomDateDisplay = isset($data['showDateSettings']) ? 1 : 0;\n $showStartDateList = isset($data['showStartDateList']) ? $data['showStartDateList'] : 0;\n $showEndDateList = isset($data['showEndDateList']) ? $data['showEndDateList'] : 0;\n \n if($objInit->mode == 'backend') { \n // reset time values if \"no time\" is selected\n if($data['showTimeTypeList'] == 0 ) {\n $showStartTimeList = 0;\n $showEndTimeList = 0;\n } else {\n $showStartTimeList = isset($data['showStartTimeList']) ? $data['showStartTimeList'] : '';\n $showEndTimeList = isset($data['showEndTimeList']) ? $data['showEndTimeList'] : '';\n }\n \n $showTimeTypeList = isset($data['showTimeTypeList']) ? $data['showTimeTypeList'] : ''; \n $showStartDateDetail = isset($data['showStartDateDetail']) ? $data['showStartDateDetail'] : '';\n $showEndDateDetail = isset($data['showEndDateDetail']) ? $data['showEndDateDetail'] : '';\n\n // reset time values if \"no time\" is selected\n if( $data['showTimeTypeDetail'] == 0){\n $showStartTimeDetail = 0;\n $showEndTimeDetail = 0;\n } else {\n $showStartTimeDetail = isset($data['showStartTimeDetail']) ? $data['showStartTimeDetail'] : '';\n $showEndTimeDetail = isset($data['showEndTimeDetail']) ? $data['showEndTimeDetail'] : '';\n }\n $showTimeTypeDetail = isset($data['showTimeTypeDetail']) ? $data['showTimeTypeDetail'] : '';\n } else {\n $showStartDateList = ($this->arrSettings['showStartDateList'] == 1) ? 1 : 0;\n $showEndDateList = ($this->arrSettings['showEndDateList'] == 1) ? 1 : 0; \n $showStartTimeList = ($this->arrSettings['showStartTimeList'] == 1) ? 1 : 0;\n $showEndTimeList = ($this->arrSettings['showEndTimeList'] == 1) ? 1 : 0;\n \n // reset time values if \"no time\" is selected\n if($showStartTimeList == 1 || $showEndTimeList == 1) {\n $showTimeTypeList = 1;\n } else {\n $showStartTimeList = 0;\n $showEndTimeList = 0;\n $showTimeTypeList = 0;\n }\n \n $showStartDateDetail = ($this->arrSettings['showStartDateDetail'] == 1) ? 1 : 0;\n $showEndDateDetail = ($this->arrSettings['showEndDateDetail'] == 1) ? 1 : 0;\n $showStartTimeDetail = ($this->arrSettings['showStartTimeDetail'] == 1) ? 1 : 0;\n $showEndTimeDetail = ($this->arrSettings['showEndTimeDetail'] == 1) ? 1 : 0;\n \n // reset time values if \"no time\" is selected\n if($showStartTimeDetail == 1 || $showEndTimeDetail == 1) {\n $showTimeTypeDetail = 1;\n } else {\n $showStartTimeDetail = 0;\n $showEndTimeDetail = 0;\n $showTimeTypeDetail = 0;\n }\n }\n \n $access = isset($data['access']) ? intval($data['access']) : 0;\n $priority = isset($data['priority']) ? intval($data['priority']) : 0;\n $placeMediadir = isset($data['placeMediadir']) ? intval($data['placeMediadir']) : 0;\n $hostMediadir = isset($data['hostMediadir']) ? intval($data['hostMediadir']) : 0;\n $price = isset($data['price']) ? contrexx_addslashes(contrexx_strip_tags($data['price'])) : 0;\n $link = isset($data['link']) ? contrexx_addslashes(contrexx_strip_tags($data['link'])) : '';\n $pic = isset($data['picture']) ? contrexx_addslashes(contrexx_strip_tags($data['picture'])) : '';\n $attach = isset($data['attachment']) ? contrexx_addslashes(contrexx_strip_tags($data['attachment'])) : ''; \n $catId = isset($data['category']) ? intval($data['category']) : ''; \n $showIn = isset($data['showIn']) ? contrexx_addslashes(contrexx_strip_tags(join(\",\",$data['showIn']))) : '';\n $invited_groups = isset($data['selectedGroups']) ? join(',', $data['selectedGroups']) : ''; \n $invited_mails = isset($data['invitedMails']) ? contrexx_addslashes(contrexx_strip_tags($data['invitedMails'])) : ''; \n $send_invitation = isset($data['sendInvitation']) ? intval($data['sendInvitation']) : 0; \n $invitationTemplate = isset($data['invitationEmailTemplate']) ? contrexx_input2db($data['invitationEmailTemplate']) : 0; \n $registration = isset($data['registration']) ? intval($data['registration']) : 0; \n $registration_form = isset($data['registrationForm']) ? intval($data['registrationForm']) : 0; \n $registration_num = isset($data['numSubscriber']) ? intval($data['numSubscriber']) : 0; \n $registration_notification = isset($data['notificationTo']) ? contrexx_addslashes(contrexx_strip_tags($data['notificationTo'])) : '';\n $email_template = isset($data['emailTemplate']) ? contrexx_input2db($data['emailTemplate']) : 0;\n $ticket_sales = isset($data['ticketSales']) ? intval($data['ticketSales']) : 0;\n $num_seating = isset($data['numSeating']) ? json_encode(explode(',', $data['numSeating'])) : '';\n $related_hosts = isset($data['selectedHosts']) ? $data['selectedHosts'] : ''; \n $locationType = isset($data['eventLocationType']) ? (int) $data['eventLocationType'] : $this->arrSettings['placeData'];\n $hostType = isset($data['eventHostType']) ? (int) $data['eventHostType'] : $this->arrSettings['placeDataHost'];\n $place = isset($data['place']) ? contrexx_input2db(contrexx_strip_tags($data['place'])) : '';\n $street = isset($data['street']) ? contrexx_input2db(contrexx_strip_tags($data['street'])) : '';\n $zip = isset($data['zip']) ? contrexx_input2db(contrexx_strip_tags($data['zip'])) : '';\n $city = isset($data['city']) ? contrexx_input2db(contrexx_strip_tags($data['city'])) : '';\n $country = isset($data['country']) ? contrexx_input2db(contrexx_strip_tags($data['country'])) : '';\n $placeLink = isset($data['placeLink']) ? contrexx_input2db($data['placeLink']) : '';\n $placeMap = isset($data['placeMap']) ? contrexx_input2db($data['placeMap']) : '';\n $update_invitation_sent = ($send_invitation == 1);\n \n if (!empty($placeLink)) {\n if (!preg_match('%^(?:ftp|http|https):\\/\\/%', $placeLink)) {\n $placeLink = \"http://\".$placeLink;\n }\n }\n \n if($objInit->mode == 'frontend') {\n $unique_id = intval($_REQUEST[self::MAP_FIELD_KEY]);\n\n if (!empty($unique_id)) {\n $picture = $this->_handleUpload('mapUpload', $unique_id);\n\n if (!empty($picture)) {\n $placeMap = $picture;\n }\n }\n }\n\n $orgName = isset($data['organizerName']) ? contrexx_input2db($data['organizerName']) : '';\n $orgStreet = isset($data['organizerStreet']) ? contrexx_input2db($data['organizerStreet']) : '';\n $orgZip = isset($data['organizerZip']) ? contrexx_input2db($data['organizerZip']) : '';\n $orgCity = isset($data['organizerCity']) ? contrexx_input2db($data['organizerCity']) : '';\n $orgCountry= isset($data['organizerCountry']) ? contrexx_input2db($data['organizerCountry']) : '';\n $orgLink = isset($data['organizerLink']) ? contrexx_input2db($data['organizerLink']) : '';\n $orgEmail = isset($data['organizerEmail']) ? contrexx_input2db($data['organizerEmail']) : '';\n if (!empty($orgLink)) {\n if (!preg_match('%^(?:ftp|http|https):\\/\\/%', $orgLink)) {\n $orgLink = \"http://\".$orgLink;\n }\n }\n \n // create thumb if not exists\n if (!file_exists(\\Env::get('cx')->getWebsitePath().\"$placeMap.thumb\")) { \n $objImage = new \\ImageManager();\n $objImage->_createThumb(dirname(\\Env::get('cx')->getWebsitePath().\"$placeMap\").\"/\", '', basename($placeMap), 180);\n }\n\n //frontend picture upload & thumbnail creation\n if($objInit->mode == 'frontend') {\n $unique_id = intval($_REQUEST[self::PICTURE_FIELD_KEY]);\n $attachmentUniqueId = intval($_REQUEST[self::ATTACHMENT_FIELD_KEY]);\n \n if (!empty($unique_id)) {\n $picture = $this->_handleUpload('pictureUpload', $unique_id);\n\n if (!empty($picture)) {\n //delete thumb\n if (file_exists(\"{$this->uploadImgPath}$pic.thumb\")) {\n \\Cx\\Lib\\FileSystem\\FileSystem::delete_file($this->uploadImgPath.\"/.$pic.thumb\");\n }\n\n //delete image\n if (file_exists(\"{$this->uploadImgPath}$pic\")) {\n \\Cx\\Lib\\FileSystem\\FileSystem::delete_file($this->uploadImgPath.\"/.$pic\");\n }\n\n $pic = $picture;\n }\n }\n \n if (!empty($attachmentUniqueId)) {\n $attachment = $this->_handleUpload('attachmentUpload', $attachmentUniqueId);\n if ($attachment) {\n //delete file\n if (file_exists(\"{$this->uploadImgPath}$attach\")) {\n \\Cx\\Lib\\FileSystem\\FileSystem::delete_file($this->uploadImgPath.\"/.$attach\");\n }\n $attach = $attachment;\n }\n }\n \n } else {\n // create thumb if not exists\n if (!file_exists(\\Env::get('cx')->getWebsitePath().\"$pic.thumb\")) {\n $objImage = new \\ImageManager();\n $objImage->_createThumb(dirname(\\Env::get('cx')->getWebsitePath().\"$pic\").\"/\", '', basename($pic), 180);\n }\n }\n \n $seriesStatus = isset($data['seriesStatus']) ? intval($data['seriesStatus']) : 0; \n \n \n //series pattern\n $seriesStatus = isset($data['seriesStatus']) ? intval($data['seriesStatus']) : 0;\n $seriesType = isset($data['seriesType']) ? intval($data['seriesType']) : 0;\n \n $seriesPatternCount = 0;\n $seriesPatternWeekday = 0;\n $seriesPatternDay = 0;\n $seriesPatternWeek = 0;\n $seriesPatternMonth = 0;\n $seriesPatternType = 0;\n $seriesPatternDouranceType = 0;\n $seriesPatternEnd = 0;\n $seriesExeptions = '';\n $seriesPatternEndDate = 0;\n \n if($seriesStatus == 1) {\n if(!empty($data['seriesExeptions'])) {\n $exeptions = array();\n \n foreach($data['seriesExeptions'] as $key => $exeptionDate) {\n $exeptions[] = date(\"Y-m-d\", parent::getDateTimestamp($exeptionDate, 23, 59)); \n } \n \n sort($exeptions);\n \n $seriesExeptions = join(\",\", $exeptions);\n }\n \n switch($seriesType) {\n case 1;\n if ($seriesStatus == 1) {\n $seriesPatternType = isset($data['seriesDaily']) ? intval($data['seriesDaily']) : 0;\n if($seriesPatternType == 1) {\n $seriesPatternWeekday = 0;\n $seriesPatternDay = isset($data['seriesDailyDays']) ? intval($data['seriesDailyDays']) : 0;\n } else {\n $seriesPatternWeekday = \"1111100\";\n $seriesPatternDay = 0;\n }\n\n $seriesPatternWeek = 0;\n $seriesPatternMonth = 0;\n $seriesPatternCount = 0;\n }\n break;\n case 2;\n if ($seriesStatus == 1) {\n $seriesPatternWeek = isset($data['seriesWeeklyWeeks']) ? intval($data['seriesWeeklyWeeks']) : 0;\n\n for($i=1; $i <= 7; $i++) {\n if (isset($data['seriesWeeklyDays'][$i])) {\n $weekdayPattern .= \"1\";\n } else {\n $weekdayPattern .= \"0\";\n }\n }\n\n $seriesPatternWeekday = $weekdayPattern;\n\n $seriesPatternCount = 0;\n $seriesPatternDay = 0;\n $seriesPatternMonth = 0;\n $seriesPatternType = 0;\n }\n break;\n case 3;\n if ($seriesStatus == 1) {\n $seriesPatternType = isset($data['seriesMonthly']) ? intval($data['seriesMonthly']) : 0;\n if($seriesPatternType == 1) {\n $seriesPatternMonth = isset($data['seriesMonthlyMonth_1']) ? intval($data['seriesMonthlyMonth_1']) : 0;\n $seriesPatternDay = isset($data['seriesMonthlyDay']) ? intval($data['seriesMonthlyDay']) : 0;\n $seriesPatternWeekday = 0;\n } else {\n $seriesPatternCount = isset($data['seriesMonthlyDayCount']) ? intval($data['seriesMonthlyDayCount']) : 0;\n $seriesPatternMonth = isset($data['seriesMonthlyMonth_2']) ? intval($data['seriesMonthlyMonth_2']) : 0;\n \n if ($seriesPatternMonth < 1) {\n // the increment must be at least once a month, otherwise we will end up in a endless loop in the presence\n $seriesPatternMonth = 1;\n }\n $seriesPatternWeekday = isset($data['seriesMonthlyWeekday']) ? $data['seriesMonthlyWeekday'] : '';\n $seriesPatternDay = 0;\n }\n\n $seriesPatternWeek = 0;\n }\n break;\n }\n \n $seriesPatternDouranceType = isset($data['seriesDouranceType']) ? intval($data['seriesDouranceType']) : 0; \n switch($seriesPatternDouranceType) {\n case 1:\n $seriesPatternEnd = 0;\n break;\n case 2:\n $seriesPatternEnd = isset($data['seriesDouranceEvents']) ? intval($data['seriesDouranceEvents']) : 0;\n break;\n case 3:\n $seriesPatternEndDate = date(\"Y-m-d H:i:s\", parent::getDateTimestamp($data['seriesDouranceDate'], 23, 59)); \n break;\n }\n }\n \n $formData = array(\n 'type' => $type,\n 'startdate' => $startDate,\n 'enddate' => $endDate,\n 'use_custom_date_display' => $useCustomDateDisplay,\n 'showStartDateList' => $showStartDateList,\n 'showEndDateList' => $showEndDateList,\n 'showStartTimeList' => $showStartTimeList,\n 'showEndTimeList' => $showEndTimeList,\n 'showTimeTypeList' => $showTimeTypeList,\n 'showStartDateDetail' => $showStartDateDetail,\n 'showEndDateDetail' => $showEndDateDetail,\n 'showStartTimeDetail' => $showStartTimeDetail,\n 'showEndTimeDetail' => $showEndTimeDetail,\n 'showTimeTypeDetail' => $showTimeTypeDetail,\n 'google' => $google,\n 'access' => $access,\n 'priority' => $priority,\n 'price' => $price,\n 'link' => $link,\n 'pic' => $pic,\n 'catid' => $catId,\n 'attach' => $attach,\n 'place_mediadir_id' => $placeMediadir,\n 'host_mediadir_id' => $hostMediadir, \n 'show_in' => $showIn,\n 'invited_groups' => $invited_groups, \n 'invited_mails' => $invited_mails,\n 'invitation_email_template' => json_encode($invitationTemplate),\n 'registration' => $registration, \n 'registration_form' => $registration_form, \n 'registration_num' => $registration_num, \n 'registration_notification' => $registration_notification,\n 'email_template' => json_encode($email_template),\n 'ticket_sales' => $ticket_sales,\n 'num_seating' => $num_seating, \n 'series_status' => $seriesStatus,\n 'series_type' => $seriesType,\n 'series_pattern_count' => $seriesPatternCount,\n 'series_pattern_weekday' => $seriesPatternWeekday,\n 'series_pattern_day' => $seriesPatternDay,\n 'series_pattern_week' => $seriesPatternWeek,\n 'series_pattern_month' => $seriesPatternMonth,\n 'series_pattern_type' => $seriesPatternType,\n 'series_pattern_dourance_type' => $seriesPatternDouranceType,\n 'series_pattern_end' => $seriesPatternEnd,\n 'series_pattern_end_date' => $seriesPatternEndDate,\n 'series_pattern_exceptions' => $seriesExeptions,\n 'all_day' => $allDay,\n 'location_type' => $locationType,\n 'host_type' => $hostType,\n 'place' => $place,\n 'place_id' => 0,\n 'place_street' => $street,\n 'place_zip' => $zip,\n 'place_city' => $city,\n 'place_country' => $country,\n 'place_link' => $placeLink,\n 'place_map' => $placeMap,\n 'org_name' => $orgName,\n 'org_street' => $orgStreet,\n 'org_zip' => $orgZip,\n 'org_city' => $orgCity,\n 'org_country' => $orgCountry,\n 'org_link' => $orgLink,\n 'org_email' => $orgEmail,\n 'invitation_sent' => $update_invitation_sent ? 1 : 0,\n );\n \n if ($id != 0) { \n $query = \\SQL::update(\"module_{$this->moduleTablePrefix}_event\", $formData) .\" WHERE id = '$id'\";\n \n $objResult = $objDatabase->Execute($query);\n \n if ($objResult !== false) {\n $this->id = $id;\n $query = \"DELETE FROM \".DBPREFIX.\"module_\".$this->moduleTablePrefix.\"_event_field\n WHERE event_id = '\".$id.\"'\"; \n \n $objResult = $objDatabase->Execute($query); \n \n $query = \"DELETE FROM \".DBPREFIX.\"module_\".$this->moduleTablePrefix.\"_rel_event_host\n WHERE event_id = '\".$id.\"'\"; \n \n $objResult = $objDatabase->Execute($query); \n } else {\n return false;\n }\n } else {\n $objFWUser = \\FWUser::getFWUserObject();\n $objUser = $objFWUser->objUser;\n\n if ($objInit->mode == 'frontend') {\n $status = 1;\n $confirmed = $this->arrSettings['confirmFrontendEvents'] == 1 ? 0 : 1;\n $author = $objUser->login() ? intval($objUser->getId()) : 0;\n } else {\n $status = 0;\n $confirmed = 1;\n $author = intval($objUser->getId());\n }\n\n $formData['status'] = $status;\n $formData['confirmed'] = $confirmed;\n $formData['author'] = $author;\n \n $query = \\SQL::insert(\"module_{$this->moduleTablePrefix}_event\", $formData);\n \n $objResult = $objDatabase->Execute($query); \n \n if ($objResult !== false) { \n $id = intval($objDatabase->Insert_ID());\n $this->id = $id;\n } else {\n return false; \n }\n }\n \n if($id != 0) {\n foreach ($data['showIn'] as $key => $langId) {\n $title = contrexx_addslashes(contrexx_strip_tags($data['title'][$langId]));\n $description = contrexx_addslashes($data['description'][$langId]);\n if ($convertBBCode) {\n $description = \\Cx\\Core\\Wysiwyg\\Wysiwyg::prepareBBCodeForDb($data['description'][$langId], true);\n }\n $redirect = contrexx_addslashes($data['calendar-redirect'][$langId]);\n\n if($type == 0) {\n $redirect = '';\n } else {\n $description = '';\n }\n\n $query = \"INSERT INTO \".DBPREFIX.\"module_\".$this->moduleTablePrefix.\"_event_field\n (`event_id`,`lang_id`,`title`, `description`,`redirect`)\n VALUES\n ('\".intval($id).\"','\".intval($langId).\"','\".$title.\"','\".$description.\"','\".$redirect.\"')\";\n\n $objResult = $objDatabase->Execute($query); \n\n if ($objResult === false) {\n return false;\n }\n }\n \n if(!empty($related_hosts)) {\n foreach ($related_hosts as $key => $hostId) {\n $query = \"INSERT INTO \".DBPREFIX.\"module_\".$this->moduleTablePrefix.\"_rel_event_host\n (`host_id`,`event_id`) \n VALUES ('\".intval($hostId).\"','\".intval($id).\"')\";\n \n $objResult = $objDatabase->Execute($query); \n }\n }\n } \n \n if($send_invitation == 1) { \n $objMailManager = new \\Cx\\Modules\\Calendar\\Controller\\CalendarMailManager(); \n foreach ($invitationTemplate as $templateId) {\n $objMailManager->sendMail(intval($id), \\Cx\\Modules\\Calendar\\Controller\\CalendarMailManager::MAIL_INVITATION, null, $templateId);\n }\n }\n \n return true;\n }", "title": "" }, { "docid": "ec80f7ccffd1d34011e71cbc2ed83b1e", "score": "0.52512896", "text": "public function save(){\n // update model instance fields with the form data\n foreach ($this->fields as $field):\n if(array_key_exists($field->name, get_object_vars($this->model_object))):\n $this->model_object->{$field->name} = $field->value;\n endif;\n endforeach;\n return $this->model_object->save();\n }", "title": "" }, { "docid": "5972a230c24d3e0e15af6ac273594ae0", "score": "0.5248473", "text": "public function save($data, $form, $request) {\n\n\t\tif($this->currentRecord && !$this->currentRecord->canEdit()) {\n\t\t\treturn Security::permissionFailure($this);\n\t\t}\t\n\n\t\t$form->saveInto($this->currentRecord);\t\t\n\t\t$this->currentRecord->write();\n\n\t\tif(Director::is_ajax()) {\n\t\t\treturn new SS_HTTPResponse(\n\t\t\t\tConvert::array2json(array(\n\t\t\t\t\t'html' => $this->EditForm()->forAjaxTemplate(),\n\t\t\t\t\t'message' => _t('ModelAdmin.SAVED','Saved')\n\t\t\t\t)),\t\t\t\t\n\t\t\t\t200\n\t\t\t);\n\t\t} else {\n\t\t\tDirector::redirectBack();\n\t\t}\n\t}", "title": "" }, { "docid": "f203e0a82f41b034be126020f243e6f6", "score": "0.52430624", "text": "function d4os_io_db_os_event_save($event) {\n// TODO : check if success before saving the node itself\n // convert array to object\n $event = is_array($event) ? (object)$event : $event;\n // get inworld fields\n $grid_fields = d4os_ui_events_get_grid_fields();\n unset($grid_fields['eventid']);\n\n if (is_object($event) && $event->eventid != NULL) {\n $grid_query = '';\n $grid_v = array();\n foreach ($event as $key => $value) {\n if (in_array($key, $grid_fields)) {\n switch ($key) {\n case 'owneruuid':\n case 'creatoruuid':\n case 'simname':\n case 'globalPos':\n case 'mature':\n $grid_query .= \"$key = '%s', \";\n $grid_v[] = $value;\n break;\n case 'category':\n case 'dateUTC':\n case 'duration':\n case 'covercharge':\n case 'coveramount':\n case 'eventflags':\n $grid_query .= \"$key = %d, \";\n $grid_v[] = $value;\n break;\n case 'name':\n case 'description':\n $grid_query .= \"$key = '%s', \";\n $grid_v[] = $value;\n break;\n }\n }\n }\n\n // remove the last \", \"\n $grid_query = substr($grid_query, 0, -2);\n // make the query\n d4os_io_db_set_active('os_search');\n $success = db_query(\"UPDATE {events} SET $grid_query WHERE `eventid` = '%d'\", array_merge($grid_v, array($event->eventid)));\n d4os_io_db_set_active('default');\n if (!$success) {\n // The query failed - better to abort the save than risk further data loss.\n drupal_set_message(t('Error saving the event to the grid database'), 'error');\n return FALSE;\n }\n }\n else {\n $fields = array();\n $values = array();\n $s = array();\n // create the new event\n foreach ($event as $key => $value) {\n if (in_array($key, $grid_fields)) {\n switch ($key) {\n case 'owneruuid':\n case 'creatoruuid':\n case 'simname':\n case 'globalPos':\n case 'mature':\n $fields[] = $key;\n $values[] = $value;\n $s[] = \"'%s'\";\n break;\n case 'category':\n case 'dateUTC':\n case 'duration':\n case 'covercharge':\n case 'coveramount':\n case 'eventflags':\n $fields[] = $key;\n $values[] = $value;\n $s[] = \"%d\";\n break;\n case 'name':\n case 'description':\n $fields[] = $key;\n $values[] = $value;\n $s[] = \"'%s'\";\n break;\n }\n }\n }\n\n $query = 'INSERT INTO {events} ('. implode(', ', $fields) .') VALUES ('. implode(', ', $s) .')';\n d4os_io_db_set_active('os_search');\n $success = db_query($query, $values);\n $eventid = db_last_insert_id('events', 'eventid');\n d4os_io_db_set_active('default');\n if (!$success) {\n // The query failed - better to abort the save than risk further data loss.\n drupal_set_message(t('Error saving the event to the grid database'), 'error');\n return FALSE;\n }\n // save the node item\n $values = array(\n $event->nid,\n $event->vid,\n $eventid\n );\n $success = db_query('INSERT INTO {d4os_ui_events} (nid, vid, eventid) VALUES (%d, %d, %d)', $values);\n if (!$success) {\n // The query failed - better to abort the save than risk further data loss.\n drupal_set_message(t('Error saving the event to the website database'), 'error');\n return FALSE;\n }\n }\n\n // Refresh event object.\n $event = d4os_io_db_os_event_load($event);\n\n return $event;\n}", "title": "" }, { "docid": "22d33e4c59e41e6a934556ba89b537a6", "score": "0.5241323", "text": "protected function onSaving(){\n \n }", "title": "" }, { "docid": "d77e5b8a91f8e67d1351c5c12d48b6a4", "score": "0.5237228", "text": "public function inst_save() {\n\t\t$this->recursivelyApply($this->changedData, $_SESSION);\n\t}", "title": "" }, { "docid": "da671ee2204b77ca5232b2a21196be7c", "score": "0.5235427", "text": "public function save()\n {\n $this->validateSaveRequest();\n\n $options = json_decode(stripslashes($_POST['options']), true);\n\n if ( ! is_array($options)) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Bad request', 'quform')\n ));\n }\n\n $options = $this->sanitizeOptions($options);\n\n if (array_key_exists('permissions', $options)) {\n if (is_array($options['permissions'])) {\n $this->permissions->update($options['permissions']);\n }\n\n unset($options['permissions']);\n }\n\n $this->options->set($options);\n\n $this->scriptLoader->generateFiles();\n\n wp_send_json(array(\n 'type' => 'success'\n ));\n }", "title": "" }, { "docid": "118b1c13c8fe7d5302769e61a3ca4cd2", "score": "0.52195525", "text": "public function saveForm($data)\n {\n $db = Database::connection();\n\n $db->Replace(\n 'atGmapAddress',\n [\n 'avID' => $this->getAttributeValueID(),\n 'data' => json_encode($data),\n 'latitude' => $data['latitude'],\n 'longitude' => $data['longitude'],\n 'address' => $data['address']\n ],\n 'avID',\n true\n );\n }", "title": "" }, { "docid": "7525113975f361dd0237333824048a63", "score": "0.521581", "text": "public function save_form_data(\\stdClass $data) {\n element_helper::suggest_position($data, $this);\n $this->save($data);\n }", "title": "" }, { "docid": "80aa006dc7ab416b4909e20428235b71", "score": "0.52130365", "text": "public function save_settings($data)\n\t{\n\t\t$settings = array('forms' => array());\n\n\t\tif (isset($_POST['forms']) == FALSE) return $settings;\n\n\t\t$P = $_POST['forms'];\n\t\t$S = array();\n\n\t\t// Fields\n\t\t$S['fields'] = (isset($P['fields']) == TRUE) ? $P['fields'] : array();\n\t\t$S['field_settings'] = (isset($P['field_settings']) == TRUE) ? $P['field_settings'] : array();\n\n\t\t// -----------------------------------------\n\t\t// Loop over all field\n\t\t// -----------------------------------------\n\t\tforeach ($S['fields'] as $cffields)\n\t\t{\n\t\t\tforeach ($cffields as $field_name)\n\t\t\t{\n\t\t\t\tif (isset($this->EE->formsfields[$field_name]) != TRUE)\n\t\t\t\t{\n\t\t\t\t\tunset($S['fields'][$field_name]);\n\t\t\t\t}\n\n\t\t\t\t$field_settings = (isset($S['field_settings'][$field_name]) == FALSE) ? array() : $S['field_settings'][$field_name];\n\t\t\t\t$field_settings = $this->EE->formsfields[$field_name]->save_settings($field_settings);\n\t\t\t\t$S['field_settings'][$field_name] = $field_settings;\n\t\t\t}\n\t\t}\n\n\t\t$settings['forms'] = $S;\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "286ecde6634665d0fee07cab760350b0", "score": "0.5210645", "text": "function save_settings() {\n if(!current_user_can('administrator') && ((int)get_post_meta($_POST['pizzeria'], 'owner', true) !== get_current_user_id())) {\n return false;\n }\n\n update_post_meta($_POST['pizzeria'], 'constructor_settings', $_POST);\n wp_safe_redirect($_SERVER['HTTP_REFERER']);\n }", "title": "" }, { "docid": "dae98360da4a83e15e234afa2012b376", "score": "0.5208345", "text": "public function save()\n\t{\n\t\tswitch($this->scenario)\n\t\t{\n\t\t\tcase 'email':\n\t\t\t\tYii::app()->user->data->email = $this->new_email;\n\t\t\t\tbreak;\n\t\t\tcase 'password':\n\t\t\t\tYii::app()->user->data->new_password = $this->new_password;\n\t\t\t\tbreak;\n\t\t\tcase 'server_password':\n\t\t\t\tYii::app()->user->data->server_password = $this->new_server_password;\n\t\t\t\tbreak;\n\t\t\tcase 'settings':\n\t\t\t\tforeach($this->attributes as $name => $value)\n\t\t\t\t{\n\t\t\t\t\tif(Yii::app()->user->data->hasAttribute($name))\n\t\t\t\t\t\tYii::app()->user->data->$name = $value;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tYii::app()->user->data->save();\n\t\treturn true;\n\t}", "title": "" }, { "docid": "38990da13ed5274831d18945a4a900f4", "score": "0.5204269", "text": "function submitFoundationForm($data, $form)\n {\n if (isset($data['SecurityID'])) {\n unset($data['SecurityID']);\n }\n //Session::start();\n //Session::set('FoundationForm'.$this->ID, $data);\n\n\n // At this point, RequiredFields->validate() will have been called already,\n\n $submission = new PromoEntrant();\n $data_toSave = $form->getData();\n\n $form->saveInto($submission);\n $record_number = $submission->write();\n\n\n $adminEmailBody = \"<style type=\\\"text/css\\\">table, h1, p{font-family:arial, helevetica, sans-serif}</style>\"\n .\"<h1>Pulse Energy iPad Promotion Submission \".$record_number.\"</h1>\"\n .\"<table cellpadding=\\\"5\\\" border=\\\"1\\\">\"\n .\"<tr><td><b>Item</b></td><td><b>Value</b></td></tr>\"\n .\"<tr><td>Name</td><td>\".$data_toSave['Name'].\"</td></tr>\"\n .\"<tr><td>Phone Day</td><td>\".$data_toSave['Phone'].\"</td></tr>\"\n .\"<tr><td>Email Address</td><td>\".$data_toSave['Email'].\"</td></tr>\"\n .\"<tr><td>Promo User</td><td>\".$data_toSave['User'].\"</td></tr>\"\n .\"<tr><td>Already Customer</td><td>\".$data_toSave['AlreadyCustomer'].\"</td></tr>\"\n .\"<tr><td>Campaign</td><td>\".$this->Campaign.\"</td></tr>\"\n .\"</table>\";\n\n\n $adminEmail = new Email('website@pulseenergy.co.nz', 'abandon.pulse@pulse.local',\n 'Pulse Energy iPad Promo Form '.$record_number, $adminEmailBody);\n $adminEmail->setCc('julian.warren@pulseenergy.co.nz');\n //$adminEmail->attachFile($filePath, $fileName);\n $adminEmail->send();\n\n// $customerEmailBody = \"<style type=\\\"text/css\\\">table, h1, h2{font-family:arial, helevetica, sans-serif}</style>\"\n// . \"<h1>Confirmation of Pulse Energy Direct Debit Form</h1><h2>For Consumer Number \" . $data_toSave['ConsumerNumber'] . \"</h2>\"\n// . \"<p>This is to confirm your submission of the online Pulse Energy Direct Debit form with the following data. We have also enclosed a PDF version should you wish to print this for your records.</p>\"\n// . \"<table cellpadding=\\\"5\\\" border=\\\"1\\\">\"\n// . \"<tr><td><b>Item</b></td><td><b>Value</b></td></tr>\"\n// . \"<tr><td>Name</td><td>\" . $data_toSave['Name'] . \"</td></tr>\"\n// . \"<tr><td>Consumer Number</td><td>\" . $data_toSave['ConsumerNumber'] . \"</td></tr>\"\n// . \"<tr><td>Residential Address</td><td>\" . $data_toSave['Street'] . \"</td></tr>\"\n// . \"<tr><td>Residential Address</td><td>\" . $data_toSave['Suburb'] . \"</td></tr>\"\n// . \"<tr><td>Residential Address</td><td>\" . $data_toSave['City'] . \"\" . $data_toSave['Postcode'] . \"</td></tr>\"\n// . \"<tr><td>Phone Day</td><td>\" . $data_toSave['PhoneDay'] . \"</td></tr>\"\n// . \"<tr><td>Phone Night</td><td>\" . $data_toSave['PhoneNight'] . \"</td></tr>\"\n// . \"<tr><td>Email Address</td><td>\" . $data_toSave['Email'] . \"</td></tr>\"\n// . \"<tr><td>Name of Bank Account</td><td>\" . $data_toSave['NameOfAccount'] . \"</td></tr>\"\n// . \"<tr><td>Bank Code</td><td>\" . $data_toSave['BankCodeNum'] . \"</td></tr>\"\n// . \"<tr><td>Bank Branch</td><td>\" . $data_toSave['BankBranchNum'] . \"</td></tr>\"\n// . \"<tr><td>Bank Account</td><td>\" . $data_toSave['BankAccountNum'] . \"</td></tr>\"\n// . \"<tr><td>Bank Account Suffix</td><td>\" . $data_toSave['BankAccountSuffix'] . \"</td></tr>\"\n// . \"<tr><td>Bank Brand Name</td><td>\" . $data_toSave['BankName'] . \"</td></tr>\"\n// . \"<tr><td>Bank Branch Name</td><td>\" . $data_toSave['BankBranchName'] . \"</td></tr>\"\n// . \"<tr><td>Bank Address</td><td>\" . $data_toSave['BankAddress'] . \"</td></tr>\"\n// . \"<tr><td>Date</td><td>\" . $data_toSave['ApplicationDate'] . \"</td></tr>\"\n// . \"</table>\";\n\n// $customerEmailBody = \"<style type=\\\"text/css\\\">table, h1, h2, p{font-family:arial, helevetica, sans-serif}</style>\"\n// .\"<p>Thank you for submitting your request for Consumption Information.</p>\"\n// .\"<p>We will now proceed to verify your identity according to the Privacy Act. This may take up to 20 business days\"\n// .\"<p>There will then be a period of up to 5 business days after we have validated your identity to provide the data in accordance with the Electricity Industry Participation Code 2010\"\n// .\"<p>Kind regards,</p>\"\n// .\"<p>&nbsp;</p>\"\n// .\"<p>Pulse Energy Customer Service</p>\";\n\n// if (!empty($data_toSave['Email'])) {\n// $customerEmail = new Email('customer.service@pulseenergy.co.nz', $data_toSave['Email'],\n// 'Consumption Information Request');\n// $customerEmail->setCc('data.requests@pulseenergy.co.nz');\n// $customerEmail->setTemplate('ConsumptionInfoConfEmail');\n// $customerEmailArray = array(\n// 'CustomerName' => $data_toSave['Name'],\n// 'Body' => $customerEmailBody\n//\n// );\n// $customerEmail->populateTemplate($customerEmailArray);\n// $customerEmail->send();\n// //file_put_contents(ASSETS_PATH . '/myXmlFile.html', $fullOut);\n// }\n\n// var_dump(Session::get_all());\n return $this->redirect($this->Link().'Submitted');\n }", "title": "" }, { "docid": "78ab708c31fe4f21d863ba1e1f4fdacb", "score": "0.5198414", "text": "function processAnswersCreation($form) {\n\t\t\t$this->save ();\n\t\t}", "title": "" }, { "docid": "7baedac3f2ed64a4cd4dfd65ae489de7", "score": "0.5191671", "text": "public function saving(ScheduleEvent $schedule_event)\n {\n if (is_null($schedule_event['original_date'])) {\n $schedule_event['original_date'] = $schedule_event['date'];\n }\n\n return true;\n }", "title": "" }, { "docid": "4b3ac3cb08e23d22fb230d97ced43b59", "score": "0.5190296", "text": "public function sticky_form_data() {\n\t\t$submitted_data = array();\n\n\t\t$linked_posts = Tribe__Events__Linked_Posts::instance();\n\t\t$container = $linked_posts->get_post_type_container( $this->post_type );\n\n\t\tif ( empty( $_POST[ $container ] ) || ! is_array( $_POST[ $container ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $_POST[ $container ] as $field => $set_of_values ) {\n\t\t\tif ( ! is_array( $set_of_values ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ( $set_of_values as $index => $value ) {\n\t\t\t\tif ( ! isset( $submitted_data[ $index ] ) ) {\n\t\t\t\t\t$submitted_data[ $index ] = array();\n\t\t\t\t}\n\n\t\t\t\t$submitted_data[ $index ][ $field ] = esc_attr( $value );\n\t\t\t}\n\t\t}\n\n\t\twp_localize_script( 'tribe-events-admin', 'tribe_sticky_' . $this->post_type . '_fields', $submitted_data );\n\t}", "title": "" }, { "docid": "9dd787075b27bb2bf4c488ed33d319fe", "score": "0.5184607", "text": "function saveFields() {\n\n if (\n get_current_screen()->id !== 'tools_page_wordpress-jekyll-settings'\n || ! current_user_can( 'manage_options')\n || ! isset( $_POST['jekyll_settings_saved'] )\n || wp_verify_nonce('jekyll_settings_saved', 'jekyll_settings_saved' ) > 1\n ){\n return;\n }\n\n // loop through the settings and save, update, or delete things\n foreach($this->settings as $setting => $attrs){\n // if the jekll cpts option is not set then we delete it from the options table\n if( ! isset( $_POST[$setting] ))\n delete_option('wordpress-'.$setting);\n\n // just set the fields tot a variable for easier typing\n $fields = $_POST[$setting];\n\n // sanitize and validate the CPTs\n $fields = self::sanitizeFields($fields);\n $fields = self::validateFields($fields, $attrs['choices']);\n\n // so long as the values are valid, save the options\n if($fields !== false)\n update_option('wordpress-'.$setting, $fields, false);\n }\n\n\n }", "title": "" }, { "docid": "670aa76bd71cecce1f85672b9c1d90bb", "score": "0.51822656", "text": "private static function doSaveFormsItems() {\n\t\t$save = array();\n\t\t$save['system_language_id'] = (int) wgLang::getLanguageId();\n\t\t$save['system_websites_id'] = (int) wgSystem::getCurrentWebsite();\n\t\t$save['mailfield'] = wgPost::getValue('mailfield');\n\t\t$save['forms_messages_group_id'] = (int) wgPost::getValue('forms_messages_group_id');\n\t\t$save['adminmail'] = wgPost::getValue('adminmail');\n\t\t$save['template'] = wgPost::getValue('template');\n\t\t$save['usehtml'] = (int) wgPost::getValue('usehtml');\n\t\t$save['usetxt'] = (int) wgPost::getValue('usetxt');\n\t\t$save['mailhtml'] = wgPost::getValue('mailhtml');\n\t\t$save['mailtxt'] = wgPost::getValue('mailtxt');\n\t\t$save['okmessage'] = wgPost::getValue('okmessage');\n\t\t$save['errormessage'] = wgPost::getValue('errormessage');\n\t\t$save['warningmessage'] = wgPost::getValue('warningmessage');\n\t\t$save['redirect'] = wgPost::getValue('redirect');\n\t\t$save['name'] = wgPost::getValue('name');\n\t\t$save['identifier'] = valid::safeText(wgPost::getValue('identifier'));\n\t\t$save['changed'] = 'NOW()';\n\t\tif ((bool) wgPost::getValue('edit')) {\n\t\t\t$save['where'] = (int) wgPost::getValue('edit');\n\t\t\t$id = (int) $save['where'];\n\t\t\tself::saveRecipients($id);\n\t\t\tself::saveFields($id);\n\t\t\tself::$_par['edit'] = $id;\n\t\t\t$ok = (bool) FormsItemsModel::doUpdate($save);\n\t\t}\n\t\telse {\n\t\t\t$save['added'] = 'NOW()';\n\t\t\t$id = (int) FormsItemsModel::doInsert($save);\n\t\t\tself::saveRecipients($id);\n\t\t\tself::saveFields($id);\n\t\t\tself::$_par['edit'] = $id;\n\t\t\t$ok = (bool) $id;\n\t\t}\n\t\treturn $ok;\n\t}", "title": "" }, { "docid": "e93cf6e8f4e6adc0c4bcb9a6fc58e0a9", "score": "0.51801", "text": "function save( $values ){\n\t\t// storing it in the session or if we are saving the data to the database\n\t\t\n\t\t\n\t\tif (!$this->_new){\n\t\t\t// Make sure that the correct form is being submitted. \n\t\t\tif ( !isset( $values['__keys__'] ) ){\n\t\t\t\ttrigger_error(\n\t\t\t\t\tdf_translate(\n\t\t\t\t\t\t'scripts.Dataface.QuickForm.save.ERROR_SAVING_RECORD',\n\t\t\t\t\t\t\"Error saving record in QuickForm::save().\\n<br>\"\n\t\t\t\t\t\t)\n\t\t\t\t\t.Dataface_Error::printStackTrace(), E_USER_ERROR);\n\t\t\t}\n\t\t\tif ( array_keys($values['__keys__']) != array_keys($this->_table->keys()) ){\n\t\t\t\ttrigger_error(\n\t\t\t\t\tdf_translate(\n\t\t\t\t\t\t'scripts.Dataface.QuickForm.save.ERROR_SAVING_RECORD',\n\t\t\t\t\t\t\"Error saving record in QuickForm::save().\\n<br>\"\n\t\t\t\t\t\t)\n\t\t\t\t\t.Dataface_Error::printStackTrace(), E_USER_ERROR);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->_new ){\n\n\t\t\t$this->_record->clearValues();\n\t\t}\n\t\t\n\t\t$res = $this->push();\n\t\t\n\t\tif ( !$this->_new ){\n\t\t\tif ( $this->_record->snapshotExists() ){\n\t\t\t\t\n\t\t\t\t$tempRecord = new Dataface_Record($this->_record->_table->tablename, $this->_record->getSnapshot());\n\t\t\t} else {\n\t\t\t\t$tempRecord =& $this->_record;\n\t\t\t}\n\t\t\tif ( $values['__keys__'] != $tempRecord->strvals(array_keys($this->_record->_table->keys())) ){\n\t\t\t\ttrigger_error(\n\t\t\t\t\tdf_translate(\n\t\t\t\t\t\t'scripts.Dataface.QuickForm.save.ERROR_SAVING_RECORD',\n\t\t\t\t\t\t\"Error saving record in QuickForm::save().\\n<br>\"\n\t\t\t\t\t\t)\n\t\t\t\t\t.Dataface_Error::printStackTrace(), E_USER_ERROR);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif (PEAR::isError($res) ){\n\t\t\t\n\t\t\t\n\t\t\t$res->addUserInfo(\n\t\t\t\tdf_translate(\n\t\t\t\t\t'scripts.Dataface.QuickForm.save.ERROR_PUSHING_DATA',\n\t\t\t\t\t\"Error pushing data from form onto table in QuickForm::save() on line \".__LINE__.\" of file \".__FILE__,\n\t\t\t\t\tarray('line'=>__LINE__,'file'=>__FILE__)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\ttrigger_error($res->toString(), E_USER_ERROR);\n\t\t\t\n\t\t\treturn $res;\n\t\t}\n\n\t\t\n\t\t// Let's take an inventory of which fields were changed.. because\n\t\t// we are going to make their values available in the htmlValues()\n\t\t// method which is used by the ajax form to gather updates.\n\t\tforeach ( $this->_fields as $changedfield ){\n\t\t\tif ( $this->_record->valueChanged($changedfield['name']) ){\n\t\t\t\t$this->_changed_fields[] = $changedfield['name'];\n\t\t\t}\n\t\t}\n\t\n\t\t$io = new Dataface_IO($this->tablename, $this->db);\n\t\t$io->lang = $this->_lang;\n\t\tif ( $this->_new ) $keys = null;\n\t\telse $keys = $values['__keys__'];\n\n\t\t$res = $io->write($this->_record,$keys,null,true /*Adding security!!!*/);\n\t\tif ( PEAR::isError($res) ){\n\t\t\tif ( Dataface_Error::isDuplicateEntry($res) ){\n\t\t\t\t/*\n\t\t\t\t * If this is a duplicate entry (or just a notice - not fatal), we will propogate the exception up to let the application\n\t\t\t\t * decide what to do with it.\n\t\t\t\t */\n\t\t\t\treturn $res;\n\t\t\t} \n\t\t\tif ( Dataface_Error::isNotice($res) ){\n\t\t\t\treturn $res;\n\t\t\t} \n\t\t\n\t\t\t$res->addUserInfo(\n\t\t\t\tdf_translate(\n\t\t\t\t\t'scripts.Dataface.QuickForm.save.ERROR_SAVING_RECORD',\n\t\t\t\t\t\"Error saving form in QuickForm::save() on line \".__LINE__.\" of file \".__FILE__,\n\t\t\t\t\tarray('line'=>__LINE__,'file'=>__FILE__)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\ttrigger_error($res->toString(), E_USER_ERROR);\n\t\t\treturn $res;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif ( isset( $io->insertIds[$this->tablename]) and $this->_table->getAutoIncrementField() ){\n\t\t\t$this->_record->setValue($this->_table->getAutoIncrementField(), $io->insertIds[$this->tablename]);\n\t\t\t$this->_record->setSnapshot();\n\n\t\t} \n\t\t\n\t\treturn true;\n\t\t\n\t\t\n\n\t}", "title": "" }, { "docid": "647fe40972c7fd5c2305c7d94bff6557", "score": "0.5174417", "text": "function paf_save() {\n\n\tglobal $paf_page_options;\n\n\t// Abort saving if the nonce is not valid\n\tif ( ! wp_verify_nonce( K::get_var( 'paf_nonce', $_POST ), 'paf_save' ) ) {\n\n\t\treturn;\n\t}\n\n\t// Force select and radio to have a value to prevent skipping empty\n\tforeach ( $paf_page_options as $option_id => $option_def ) {\n\t\t$option_type = K::get_var( 'type', $option_def, 'text' );\n\t\tswitch ( $option_type ) {\n\t\t\tcase 'radio':\n\t\t\t\t$_POST['paf'][ $option_id ] = K::get_var( $option_id, $_POST['paf'], '' );\n\t\t\tcase 'checkbox':\n\t\t\tcase 'select':\n\t\t\t\t$_POST['paf'][ $option_id ] = K::get_var( $option_id, $_POST['paf'], array() );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Combine old and saved options\n\t$paf = get_option( 'paf ', array() );\n\t$paf = array_merge( $paf, $_POST[ 'paf' ] );\n\n\t// Save\n\tdelete_option( 'paf' );\n\tadd_option( 'paf', $paf, '', TRUE );\n\n\t// Bind showing the success message\n\tadd_action( 'admin_notices', 'paf_notice' );\n}", "title": "" }, { "docid": "4a6a8213628fc1ad06364719dadfe41d", "score": "0.51743495", "text": "public function store()\n {\n $value = $this->request->get('value', '');\n\n $valueArray = $value ? json_decode($value, true) : [];\n\n $key = sanitize_text_field($this->request->get('meta_key'));\n\n if ($key == 'formSettings') {\n Validator::validate(\n 'confirmations', ArrayHelper::get(\n $valueArray, 'confirmation', []\n )\n );\n } else {\n Validator::validate($key, $valueArray);\n }\n\n $data = [\n 'meta_key' => $key,\n 'value' => $value,\n 'form_id' => $this->formId\n ];\n\n // If the request has an valid id field it's safe to assume\n // that the user wants to update an existing settings.\n // So, we'll proceed to do so by finding it first.\n $id = intval($this->request->get('id'));\n\n if ($id) {\n $settings = $this->settingsQuery->find($id);\n }\n\n if (isset($settings)) {\n $this->settingsQuery->where('id', $settings->id)->update($data);\n $insertId = $settings->id;\n } else {\n $insertId = $this->settingsQuery->insert($data);\n }\n\n wp_send_json_success([\n 'message' => __('Settings has been saved.', 'fluentform'),\n 'settings' => json_decode($value, true),\n 'id' => $insertId\n ], 200);\n }", "title": "" }, { "docid": "27d49dace7f1c17e1bc721279e1c33ce", "score": "0.517426", "text": "function mc_form_fields( $data, $mode, $event_id ) {\n\tglobal $wpdb, $user_ID;\n\t$has_data = ( empty( $data ) ) ? false : true;\n\tif ( $data ) {\n\t\t// Don't execute occurrence test if displaying pre-process error messages.\n\t\tif ( ! is_object( $data ) ) {\n\t\t\t$test = mc_test_occurrence_overlap( $data );\n\t\t}\n\t}\n\t$instance = ( isset( $_GET['date'] ) ) ? (int) $_GET['date'] : false;\n\tif ( $instance ) {\n\t\t$ins = mc_get_instance_data( $instance );\n\t\t$event_id = $ins->occur_event_id;\n\t\t$data = mc_get_first_event( $event_id );\n\t}\n\t?>\n\t<div class=\"postbox-container jcd-wide\">\n\t\t<div class=\"metabox-holder\">\n\t\t<?php\n\t\tif ( 'add' == $mode || 'copy' == $mode ) {\n\t\t\t$query_args = array();\n\t\t} else {\n\t\t\t$query_args = array(\n\t\t\t\t'mode' => $mode,\n\t\t\t\t'event_id' => $event_id,\n\t\t\t);\n\t\t\tif ( $instance ) {\n\t\t\t\t$query_args['date'] = $instance;\n\t\t\t}\n\t\t}\n\t\techo apply_filters( 'mc_before_event_form', '', $event_id );\n\t\t$action = add_query_arg( $query_args, admin_url( 'admin.php?page=my-calendar' ) );\n\t\t$group_id = ( ! empty( $data->event_group_id ) && 'copy' != $mode ) ? $data->event_group_id : mc_group_id();\n\t\t$event_author = ( 'edit' != $mode ) ? $user_ID : $data->event_author;\n\t\t?>\n<form id=\"my-calendar\" method=\"post\" action=\"<?php echo $action; ?>\">\n<div>\n\t<input type=\"hidden\" name=\"_wpnonce\" value=\"<?php echo wp_create_nonce( 'my-calendar-nonce' ); ?>\" />\n\t<?php\n\tif ( isset( $_GET['ref'] ) ) {\n\t\techo '<input type=\"hidden\" name=\"ref\" value=\"' . esc_url( $_GET['ref'] ) . '\" />';\n\t}\n\t?>\n\t<input type=\"hidden\" name=\"event_group_id\" value=\"<?php echo $group_id; ?>\" />\n\t<input type=\"hidden\" name=\"event_action\" value=\"<?php echo esc_attr( $mode ); ?>\" />\n\t<?php\n\tif ( ! empty( $_GET['date'] ) ) {\n\t\techo '<input type=\"hidden\" name=\"event_instance\" value=\"' . (int) $_GET['date'] . '\"/>';\n\t}\n\t?>\n\t<input type=\"hidden\" name=\"event_id\" value=\"<?php echo (int) $event_id; ?>\"/>\n\t<?php\n\tif ( 'edit' == $mode ) {\n\t\tif ( $has_data && ( ! property_exists( $data, 'event_post' ) || ! $data->event_post ) ) {\n\t\t\t$array_data = (array) $data;\n\t\t\t$post_id = mc_event_post( 'add', $array_data, $event_id );\n\t\t} else {\n\t\t\t$post_id = ( $has_data ) ? $data->event_post : false;\n\t\t}\n\t\techo '<input type=\"hidden\" name=\"event_post\" value=\"' . $post_id . '\" />';\n\t} else {\n\t\t$post_id = false;\n\t}\n\t?>\n\t<input type=\"hidden\" name=\"event_nonce_name\" value=\"<?php echo wp_create_nonce( 'event_nonce' ); ?>\" />\n</div>\n\n<div class=\"ui-sortable meta-box-sortables\">\n\t<div class=\"postbox\">\n\t\t<?php\n\t\t\t$text = ( 'edit' == $mode ) ? __( 'Edit Event', 'my-calendar' ) : __( 'Add Event', 'my-calendar' );\n\t\t?>\n\t\t<h2><?php esc_html( $text ); ?></h2>\n\t\t<div class=\"inside\">\n\t\t<div class='mc-controls'>\n\t\t\t<?php\n\t\t\tif ( $post_id ) {\n\t\t\t\t$deleted = get_post_meta( $post_id, '_mc_deleted_instances', true );\n\t\t\t\t$custom = get_post_meta( $post_id, '_mc_custom_instances', true );\n\t\t\t\tif ( $deleted || $custom ) {\n\t\t\t\t\tmc_show_notice( __( 'Some repetitions of this recurring event have been deleted or modified. Update the date or recurring pattern for the event to reset its repeat events.', 'my-calendar' ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\techo mc_controls( $mode, $has_data, $data );\n\t\t\t?>\n\t\t</div>\n\t\t\t<?php\n\t\t\tif ( ! empty( $_GET['date'] ) && 'S' != $data->event_recur ) {\n\t\t\t\t$event = mc_get_event( $instance );\n\t\t\t\t$date = date_i18n( mc_date_format(), mc_strtotime( $event->occur_begin ) );\n\t\t\t\t// Translators: Date of a specific event occurrence.\n\t\t\t\t$message = sprintf( __( 'You are editing the <strong>%s</strong> instance of this event. Other instances of this event will not be changed.', 'my-calendar' ), $date );\n\t\t\t\tmc_show_notice( $message );\n\t\t\t} elseif ( isset( $_GET['date'] ) && empty( $_GET['date'] ) ) {\n\t\t\t\tmc_show_notice( __( 'The ID for this event instance was not provided. <strong>You are editing this entire recurring event series.</strong>', 'my-calendar' ) );\n\t\t\t}\n\t\t\t?>\n\t\t\t<fieldset>\n\t\t\t\t<legend class=\"screen-reader-text\"><?php _e( 'Event Details', 'my-calendar' ); ?></legend>\n\t\t\t\t<p>\n\t\t\t\t\t<label for=\"e_title\"><?php _e( 'Event Title', 'my-calendar' ); ?></label><br/>\n\t\t\t\t\t<input type=\"text\" id=\"e_title\" name=\"event_title\" size=\"50\" maxlength=\"255\" value=\"<?php echo ( $has_data ) ? apply_filters( 'mc_manage_event_title', stripslashes( esc_attr( $data->event_title ) ), $data ) : ''; ?>\" />\n\t\t\t\t</p>\n\t\t\t\t<?php\n\t\t\t\tif ( is_object( $data ) && 1 == $data->event_flagged ) {\n\t\t\t\t\tif ( '0' == $data->event_flagged ) {\n\t\t\t\t\t\t$flagged = ' checked=\"checked\"';\n\t\t\t\t\t} elseif ( '1' == $data->event_flagged ) {\n\t\t\t\t\t\t$flagged = '';\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"error\">\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<input type=\"checkbox\" value=\"0\" id=\"e_flagged\" name=\"event_flagged\"<?php echo $flagged; ?> />\n\t\t\t\t\t\t\t<label for=\"e_flagged\"><?php _e( 'This event is not spam', 'my-calendar' ); ?></label>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\tapply_filters( 'mc_insert_custom_fields', '', $has_data, $data );\n\n\t\t\t\tif ( function_exists( 'wpt_post_to_twitter' ) && current_user_can( 'wpt_can_tweet' ) ) {\n\t\t\t\t\tif ( ! ( 'edit' == $mode && 1 == $data->event_approved ) ) {\n\t\t\t\t\t\t$mc_allowed = absint( ( get_option( 'wpt_tweet_length' ) ) ? get_option( 'wpt_tweet_length' ) : 140 );\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p class='mc-twitter'>\n\t\t\t\t\t\t\t<label for='mc_twitter'><?php _e( 'Post to Twitter (via WP to Twitter)', 'my-calendar' ); ?></label><br/>\n\t\t\t\t\t\t\t<textarea cols='70' rows='2' id='mc_twitter' name='mc_twitter' data-allowed=\"<?php echo $mc_allowed; ?>\"><?php echo apply_filters( 'mc_twitter_text', '', $data ); ?></textarea>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmc_show_block( 'event_desc', $has_data, $data );\n\t\t\t\tmc_show_block( 'event_category', $has_data, $data );\n\t\t\t\t?>\n\t\t\t</fieldset>\n\t\t</div>\n\t</div>\n</div>\n\n<div class=\"ui-sortable meta-box-sortables\">\n\t<div class=\"postbox\">\n\t\t<h2><?php _e( 'Date and Time', 'my-calendar' ); ?></h2>\n\n\t\t<div class=\"inside\">\n\t\t\t<?php\n\t\t\tif ( is_object( $data ) ) { // Information for rewriting recurring data.\n\t\t\t\t?>\n\t\t\t\t<input type=\"hidden\" name=\"prev_event_begin\" value=\"<?php echo esc_attr( $data->event_begin ); ?>\"/>\n\t\t\t\t<input type=\"hidden\" name=\"prev_event_time\" value=\"<?php echo esc_attr( $data->event_time ); ?>\"/>\n\t\t\t\t<input type=\"hidden\" name=\"prev_event_end\" value=\"<?php echo esc_attr( $data->event_end ); ?>\"/>\n\t\t\t\t<input type=\"hidden\" name=\"prev_event_endtime\" value=\"<?php echo esc_attr( $data->event_endtime ); ?>\"/>\n\t\t\t\t<?php\n\t\t\t}\n\t\t\t?>\n\t\t\t<fieldset>\n\t\t\t\t<legend class=\"screen-reader-text\"><?php _e( 'Event Date and Time', 'my-calendar' ); ?></legend>\n\t\t\t\t<div id=\"e_schedule\">\n\t\t\t\t\t<div id=\"event1\" class=\"clonedInput\" aria-live=\"assertive\">\n\t\t\t\t\t\t<?php echo apply_filters( 'mc_datetime_inputs', '', $has_data, $data, 'admin' ); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t\tif ( 'edit' != $mode ) {\n\t\t\t\t\t\t$span_checked = '';\n\t\t\t\t\t\tif ( $has_data && '1' == $data->event_span ) {\n\t\t\t\t\t\t\t$span_checked = ' checked=\"checked\"';\n\t\t\t\t\t\t} elseif ( $has_data && '0' == $data->event_span ) {\n\t\t\t\t\t\t\t$span_checked = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t<p id=\"event_span\">\n\t\t\t\t\t\t<input type=\"checkbox\" value=\"1\" id=\"e_span\" name=\"event_span\"<?php echo $span_checked; ?> />\n\t\t\t\t\t\t<label for=\"e_span\"><?php _e( 'This is a multi-day event.', 'my-calendar' ); ?></label>\n\t\t\t\t\t</p>\n\t\t\t\t\t<p class=\"note\">\n\t\t\t\t\t\t<em><?php _e( 'Enter start and end dates/times for each occurrence of the event.', 'my-calendar' ); ?></em>\n\t\t\t\t\t</p>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<input type=\"button\" id=\"add_field\" value=\"<?php _e( 'Add another occurrence', 'my-calendar' ); ?>\" class=\"button\" />\n\t\t\t\t\t\t<input type=\"button\" id=\"del_field\" value=\"<?php _e( 'Remove last occurrence', 'my-calendar' ); ?>\" class=\"button\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t} else {\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<div id='mc-accordion'>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tif ( 'S' != $data->event_recur ) {\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<h4><span class='dashicons' aria-hidden='true'> </span><button type=\"button\" class=\"button-link\"><?php _e( 'Scheduled dates for this event', 'my-calendar' ); ?></button></h4>\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<?php _e( 'Editing a single date of an event changes only that date. Editing the root event changes all events in the series.', 'my-calendar' ); ?>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<div class='mc_response' aria-live='assertive'></div>\n\t\t\t\t\t\t\t\t\t<ul class=\"columns instance-list\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\tif ( isset( $_GET['date'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t$date = (int) $_GET['date'];\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t$date = false;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo mc_admin_instances( $data->event_id, $date );\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t<p><button type='button' class='add-occurrence' aria-expanded=\"false\"><span class='dashicons' aria-hidden='true'> </span><?php _e( 'Add another date', 'my-calendar' ); ?></button></p>\n\t\t\t\t\t\t\t\t\t<div class='mc_add_new'>\n\t\t\t\t\t\t\t\t\t<?php echo mc_recur_datetime_input(); ?>\n\t\t\t\t\t\t\t\t\t<button type='button' class='save-occurrence'><?php _e( 'Add Date', 'my-calendar' ); ?></button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( 0 != $data->event_group_id ) {\n\t\t\t\t\t\t\t\t$edit_group_url = admin_url( 'admin.php?page=my-calendar-groups&mode=edit&event_id=' . $data->event_id . '&group_id=' . $data->event_group_id );\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<h4><span class='dashicons' aria-hidden='true'> </span><button type=\"button\" class=\"button-link\"><?php _e( 'Related Events:', 'my-calendar' ); ?></button> (<a href='<?php echo $edit_group_url; ?>'><?php _e( 'Edit group', 'my-calendar' ); ?></a>)\n\t\t\t\t\t\t\t\t</h4>\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<ul class=\"columns\">\n\t\t\t\t\t\t\t\t\t\t<?php mc_related_events( $data->event_group_id ); ?>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</div>\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</div>\n\t\t\t</fieldset>\n\t\t</div>\n\t</div>\n</div>\n\t<?php mc_show_block( 'event_recurs', $has_data, $data ); ?>\n<div class=\"ui-sortable meta-box-sortables\">\n\t<div class=\"postbox\">\n\t\t<h2><?php _e( 'Event Details', 'my-calendar' ); ?></h2>\n\t\t<div class=\"inside\">\n\t<?php\n\t\tmc_show_block( 'event_short', $has_data, $data );\n\t\tmc_show_block( 'event_image', $has_data, $data );\n\t\tmc_show_block( 'event_host', $has_data, $data );\n\t\tmc_show_block( 'event_author', $has_data, $data, true, $event_author );\n\t\tmc_show_block( 'event_link', $has_data, $data );\n\t?>\n\t\t</div>\n\t</div>\n</div>\n\t<?php\n\t$custom_fields = apply_filters( 'mc_event_details', '', $has_data, $data, 'admin' );\n\tif ( '' != $custom_fields ) {\n\t\t?>\n<div class=\"ui-sortable meta-box-sortables\">\n\t<div class=\"postbox\">\n\t\t<h2><?php _e( 'Event Custom Fields', 'my-calendar' ); ?></h2>\n\t\t<div class=\"inside\">\n\t\t\t<?php echo apply_filters( 'mc_event_details', '', $has_data, $data, 'admin' ); ?>\n\t\t</div>\n\t</div>\n</div>\n\t\t<?php\n\t}\n\tmc_show_block( 'event_access', $has_data, $data );\n\tmc_show_block( 'event_open', $has_data, $data );\n\tif ( mc_show_edit_block( 'event_location' ) || mc_show_edit_block( 'event_location_dropdown' ) ) {\n\t\t?>\n\n<div class=\"ui-sortable meta-box-sortables\">\n\t<div class=\"postbox\">\n\t\t<h2><?php _e( 'Event Location', 'my-calendar' ); ?></h2>\n\n\t\t<div class=\"inside location_form\">\n\t\t\t<fieldset>\n\t\t\t\t<legend class='screen-reader-text'><?php _e( 'Event Location', 'my-calendar' ); ?></legend>\n\t\t<?php\n\t}\n\tif ( mc_show_edit_block( 'event_location_dropdown' ) ) {\n\t\t$current_location = '';\n\t\t$locs = mc_get_locations( 'select-locations' );\n\t\tif ( ! empty( $locs ) ) {\n\t\t\t?>\n\t\t\t<p>\n\t\t\t<label for=\"l_preset\"><?php _e( 'Choose location:', 'my-calendar' ); ?></label> <select\n\t\t\t\tname=\"location_preset\" id=\"l_preset\" aria-describedby='mc-current-location'>\n\t\t\t\t<option value=\"none\">--</option>\n\t\t\t\t<?php\n\t\t\t\tforeach ( $locs as $loc ) {\n\t\t\t\t\tif ( is_object( $loc ) ) {\n\t\t\t\t\t\t$loc_name = strip_tags( stripslashes( $loc->location_label ), mc_strip_tags() );\n\t\t\t\t\t\t$selected = '';\n\t\t\t\t\t\tif ( is_object( $data ) ) {\n\t\t\t\t\t\t\tif ( property_exists( $data, 'event_location' ) ) {\n\t\t\t\t\t\t\t\t$event_location = $data->event_location;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$event_location = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( $loc->location_id == $event_location ) {\n\t\t\t\t\t\t\t\t// Translators: label for current location.\n\t\t\t\t\t\t\t\t$current_location = \"<span id='mc-current-location'>\" . sprintf( __( 'Current location: %s', 'my-calendar' ), $loc_name ) . '</span>';\n\t\t\t\t\t\t\t\t$current_location .= \"<input type='hidden' name='preset_location' value='$event_location' />\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"<option value='\" . $loc->location_id . \"'$selected />\" . $loc_name . '</option>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</select>\n\t\t\t<?php echo $current_location; ?>\n\t\t\t</p>\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t<input type=\"hidden\" name=\"location_preset\" value=\"none\" />\n\t\t<p>\n\t\t\t<a href=\"<?php echo admin_url( 'admin.php?page=my-calendar-locations' ); ?>\"><?php _e( 'Add recurring locations for later use.', 'my-calendar' ); ?></a>\n\t\t</p>\n\t\t\t<?php\n\t\t}\n\t} else {\n\t\t?>\n\t\t<input type=\"hidden\" name=\"location_preset\" value=\"none\" />\n\t\t<?php\n\t}\n\tmc_show_block( 'event_location', $has_data, $data );\n\tif ( mc_show_edit_block( 'event_location' ) || mc_show_edit_block( 'event_location_dropdown' ) ) {\n\t\t?>\n\t\t\t</fieldset>\n\t\t</div>\n\t</div>\n</div>\n\t\t<?php\n\t}\n\tif ( mc_show_edit_block( 'event_specials' ) ) {\n\t\t$hol_checked = ( 'true' == get_option( 'mc_skip_holidays' ) ) ? ' checked=\"checked\"' : '';\n\t\t$fifth_checked = ( 'true' === get_option( 'mc_no_fifth_week' ) ) ? ' checked=\"checked\"' : '';\n\t\tif ( $has_data ) {\n\t\t\t$hol_checked = ( '1' == $data->event_holiday ) ? ' checked=\"checked\"' : '';\n\t\t\t$fifth_checked = ( '1' == $data->event_fifth_week ) ? ' checked=\"checked\"' : '';\n\t\t}\n\t\t?>\n\t\t<div class=\"ui-sortable meta-box-sortables\">\n\t\t<div class=\"postbox\">\n\t\t\t<h2><?php _e( 'Special scheduling options', 'my-calendar' ); ?></h2>\n\n\t\t\t<div class=\"inside\">\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend class=\"screen-reader-text\"><?php _e( 'Special Options', 'my-calendar' ); ?></legend>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<label for=\"e_holiday\"><?php _e( 'Cancel this event if it occurs on a date with an event in the Holidays category', 'my-calendar' ); ?></label>\n\t\t\t\t\t\t<input type=\"checkbox\" value=\"true\" id=\"e_holiday\" name=\"event_holiday\"<?php echo $hol_checked; ?> />\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<label for=\"e_fifth_week\"><?php _e( 'If this event recurs, and falls on the 5th week of the month in a month with only four weeks, move it back one week.', 'my-calendar' ); ?></label>\n\t\t\t\t\t\t<input type=\"checkbox\" value=\"true\" id=\"e_fifth_week\" name=\"event_fifth_week\"<?php echo $fifth_checked; ?> />\n\t\t\t\t\t</p>\n\t\t\t\t</fieldset>\n\t\t\t</div>\n\t\t</div>\n\t\t</div>\n\t\t<?php\n\t} else {\n\t\tif ( $has_data ) {\n\t\t\t$event_holiday = ( '1' == $data->event_holiday ) ? 'true' : 'false';\n\t\t\t$event_fifth = ( '1' == $data->event_fifth_week ) ? 'true' : 'false';\n\t\t} else {\n\t\t\t$event_holiday = get_option( 'mc_skip_holidays' );\n\t\t\t$event_fifth = get_option( 'mc_no_fifth_week' );\n\t\t}\n\t\t?>\n\t\t<div>\n\t\t<input type=\"hidden\" name=\"event_holiday\" value=\"<?php echo esc_attr( $event_holiday ); ?>\" />\n\t\t<input type=\"hidden\" name=\"event_fifth_week\" value=\"<?php echo esc_attr( $event_fifth ); ?>\" />\n\t\t</div>\n\t\t<?php\n\t}\n\t?>\n\t<div class=\"ui-sortable meta-box-sortables\">\n\t<div class=\"postbox\">\n\t\t<div class=\"inside\">\n\t\t\t<div class='mc-controls footer'>\n\t\t\t\t<?php echo mc_controls( $mode, $has_data, $data, 'footer' ); ?>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t</div>\n</form>\n</div>\n\t</div>\n\t<?php\n}", "title": "" }, { "docid": "a84ee969eda04aef551865d93ea9c016", "score": "0.51561135", "text": "function event_station_form_submit($form, &$form_state) {\n $EventStation = entity_ui_form_submit_build_entity($form, $form_state);\n $EventStation->save();\n drupal_set_message(t('@name event station has been saved.', array('@name' => $EventStation->name)));\n $form_state['redirect'] = 'admin/eventstation';// where is should this be placed? is the right value/path? tjs 2014March14\n}", "title": "" }, { "docid": "ee295381f12c3ca8cae098b8e8099673", "score": "0.5153366", "text": "private function saveFeedbackFormCmd()\n\t{\n\t\t$form = $this->buildForm();\n\t\t\n\t\t$form->setValuesByPost();\n\t\t\n\t\tif( $form->checkInput() )\n\t\t{\n\t\t\t$this->feedbackOBJ->saveGenericFormProperties($form);\n\t\t\t$this->feedbackOBJ->saveSpecificFormProperties($form);\n\t\t\t\n\t\t\t$this->questionOBJ->cleanupMediaObjectUsage();\n\t\t\t\n\t\t\tif( $this->isSyncAfterSaveRequired() )\n\t\t\t{\n\t\t\t\tilUtil::sendSuccess($this->lng->txt('saved_successfully'), true);\n\t\t\t\t$this->ctrl->redirect($this, self::CMD_SHOW_SYNC);\n\t\t\t}\n\n\t\t\tilUtil::sendSuccess($this->lng->txt('saved_successfully'), true);\n\t\t\t$this->ctrl->redirect($this, self::CMD_SHOW);\n\t\t}\n\t\t\n\t\tilUtil::sendFailure($this->lng->txt('form_input_not_valid'));\n\t\t$this->tpl->setContent( $this->ctrl->getHTML($form) );\n\t}", "title": "" }, { "docid": "f23ae1651140458e82f6dab92d823743", "score": "0.5152009", "text": "public static function set_data()\n {\n if (!self::$valid)\n {\n self::$id = substr(md5(self::$processed['fields_id']), 0, 10);\n\n $set = set_transient(piklist::$prefix . 'validation_' . self::$id, self::$processed['fields_data']);\n\n self::$form_submission = self::$processed['fields_data'];\n }\n }", "title": "" }, { "docid": "b6b280d3c3db0397d02e2230d8a444dc", "score": "0.5151489", "text": "public function saveMembers(){\n $arr = $this->getConfig()->getAll();\n foreach($this->groups as $name => $group){\n $arr['groups'][$name]['members'] = $group->getMembers();\n }\n $this->getConfig()->setAll($arr);\n $this->getConfig()->save();\n }", "title": "" }, { "docid": "5e750f6f40dc05bd979b3250729641d6", "score": "0.5151044", "text": "public function store(Request $request)\n {\n\n\n $event = new Event();\n $event->title = $request->input('title');\n $event->start_date = $request->input('start_date');\n $event->start_date_event = $request->input('start_date_event');\n $event->end_date = $request->input('end_date');\n $event->description = $request->input('description');\n $event->short_description = $request->input('short_description');\n $event->time = $request->input('time');\n $event->price = $request->input('price');\n $event->currency = $request->input('currency');\n $event->featured = ($request->input('featured') == 'on') ? true : false;\n $event->location_id = $request->input('location');\n $event->date_in_text = $request->input('date_in_text');\n $event->user_created = Auth::id();\n\n $ministries = $request->input('ministries');\n $campuses = $request->input('campus');\n $buttons =$request->input('button');\n\n $file = $request->file('image');\n $nombre = $this->clean(uniqid().\"_\".$file->getClientOriginalName());\n \\Storage::disk('events')->put($nombre, \\File::get($file));\n $event->image = $nombre;\n\n $event->save();\n\n if($request->has('button')){\n foreach ($buttons as $button){\n $b = new Button();\n $b->text = $button['text'];\n $b->link = $button['link'];\n $b->target = $button['target'];\n $b->event_id = $event->id;\n $b->save();\n }\n }\n\n\n if(isset($ministries))\n {\n foreach ($ministries as $minitry)\n {\n $event->ministries()->attach($minitry);\n }\n }\n\n\n if(isset($campuses))\n {\n foreach ($campuses as $campus)\n {\n $event->campuses()->attach($campus);\n }\n }\n\n return redirect()->route('event.show', $event->id)->with('success','Event added successfully');\n}", "title": "" }, { "docid": "a1292b917c5b668493711f01c6e375da", "score": "0.5150499", "text": "public function Save()\n {\n $required = array(\n \"email\" => \"E-mail\",\n \"token\" => \"Token\"\n );\n $this->validateData($required);\n parent::Save();\n }", "title": "" }, { "docid": "c465b2f709578d4b19308984f0c89d0a", "score": "0.51458937", "text": "public function setEventValues($form, $event, $user)\n {\n $event->setName($form['name']->getData());\n $event->setDescription($form['description']->getData());\n $event->setStartDate($form['startDate']->getData());\n $event->setEndDate($form['endDate']->getData());\n $event->setMap($form['map']->getData());\n $event->setCity($form['city']->getData());\n $event->setCreatedBy($user);\n\n $this->entityManager->persist($event);\n }", "title": "" }, { "docid": "f08d5f41283618b635bf30cc2add7e9c", "score": "0.51442474", "text": "public function save_settings() {\n\t\tif ( ! isset( $_POST['data'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing\n\t\t\treturn;\n\t\t}\n\n\t\t$data = json_decode( stripslashes( $_POST['data'] ), true ); // phpcs:ignore\n\t\tif ( $data ) {\n\t\t\tupdate_option( $this->props['option'], $data );\n\t\t}\n\t\twp_send_json( $data );\n\t}", "title": "" }, { "docid": "5c330d47a8150d0fa63337ecda44d136", "score": "0.5142802", "text": "function Save()\n\t{\n\t\tif ((int)$this->fieldid <= 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$required = (strtolower($this->Settings['FieldRequired']) == 'on') ? 1 : 0;\n\n\t\t$settings = array();\n\t\t$options = $this->Options;\n\t\tforeach ($options as $name => $val) {\n\t\t\t$settings[$name] = $this->Settings[$name];\n\t\t}\n\n\t\t$settings = serialize($settings);\n\n\t\t$query = \"UPDATE \" . SENDSTUDIO_TABLEPREFIX . \"customfields SET name='\" . $this->Db->Quote($this->Settings['FieldName']) . \"', defaultvalue='\" . $this->Db->Quote($this->Settings['DefaultValue']) . \"', required='\" . $this->Db->Quote($required) . \"', fieldsettings='\" . $this->Db->Quote($settings) . \"', isglobal='\" . $this->Db->Quote($this->isglobal) . \"' WHERE fieldid='\" . (int)$this->fieldid . \"'\";\n\n\t\t$result = $this->Db->Query($query);\n\t\tif ($result) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d5d77605578c17c7d953029781d5f755", "score": "0.5133616", "text": "public function Save()\n {\n $required = array(\n \"post\" => \"Publicação\",\n \"ip\" => \"IP\"\n );\n $this->validateData($required);\n parent::Save();\n }", "title": "" }, { "docid": "69dd2bb043e0a9eab54cd0312f58fdc6", "score": "0.5127817", "text": "public function saveData()\n {\n foreach($this->fields as $field) {\n $field->preInsert();\n $field->preChange();\n }\n\n $this->preInsert();\n $this->preChange();\n\n $ci =& get_instance();\n $ci->load->database();\n\n $data = $this->getFieldsData();\n\n $ci->db->insert($this->table, $data);\n $id = $ci->db->insert_id();\n\n foreach($this->fields as $field) {\n $field->postInsert($id);\n $field->postChange($id);\n }\n\n $this->postInsert($id);\n $this->postChange($id);\n }", "title": "" }, { "docid": "ba6a67b52e7518fb5709b4f11cefa244", "score": "0.5108775", "text": "function nutv_staff_save_postdata( $post_id ) {\n // verify if this is an auto save routine. \n // If it is our form has not been submitted, so we dont want to do anything\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n return;\n\n // verify this came from the our screen and with proper authorization,\n // because save_post can be triggered at other times\n\n if ( !wp_verify_nonce( $_POST['nutv_staff_nonce'], plugin_basename( __FILE__ ) ) )\n return;\n\n \n // Check permissions\n if ( 'nutv_staff' != $_POST['post_type'] ) \n return;\n \n \n if ( !current_user_can( 'edit_post', $post_id ) )\n return;\n \n nutv_staff_save_type( $post_id );\n nutv_staff_save_title( $post_id );\n nutv_staff_save_author( $post_id );\n nutv_staff_save_link( $post_id );\n \n\n}", "title": "" }, { "docid": "c4d51a4340adac6e713656061f27822f", "score": "0.5107218", "text": "public function save() {\n\t\t\n\t\treturn isset($this->members_id) ? $this->update() : $this->create();\n\t\t\n\t}", "title": "" }, { "docid": "640576f118519475d471dcec67536b60", "score": "0.5105111", "text": "protected function onSave(){\n \n }", "title": "" }, { "docid": "c455eadf78554c0343b5c8f1da052af3", "score": "0.5094938", "text": "public function onProfileSave(MembersProfileEvent $event)\n {\n $config = $this->getConfig();\n $event->addMetaEntryNames(array_keys($config['meta_fields']['profile']));\n }", "title": "" }, { "docid": "2b9a176f9358720ecf452572e7c5afa7", "score": "0.5086993", "text": "public function contact_form_save_data_function(){\r\n\t\tglobal $wpdb;\r\n\r\n\t\tif( isset($_POST['data']) ){\r\n\r\n\t\t\t$data = $_POST['data'];\r\n\r\n\t\t\t$table_name = $wpdb->prefix . 'cfs';\r\n\r\n\t\t\t$wpdb->insert(\r\n\t\t\t\t$table_name,\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'data' => $data\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'%s'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\techo __('success' , 'cfs_textdomain');\r\n\t\t\tdie();\r\n\t\t}else{\r\n\t\t\techo __('error' , 'cfs_textdomain');\r\n\t\t\tdie();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "58f1b49913035763c1ed517d3f03428a", "score": "0.5085864", "text": "private function save(){\n\t\tif($this->value[1] == 'account')\n\t\t{\n\t\t\tUser::Singleton()->update_from_post();\n\t\t\tCommon::redirect('account');\n\t\t}\n\n\t\tif(post::variable('new_type', 'is_set'))\n\t\t{\n\t\t\t$this->security_page_edit();\n\n\t\t\tif(post::variable('new_type') === 'newPage')\n\t\t\t{\n\t\t\t\t$this->security_page_approve();\n\t\t\t\t$this->create_new_page($this->value[1]);\n\t\t\t}\r\n\t\t\telse if(post::variable('new_type') === 'newProduct')\r\n\t\t\t{\r\n\t\t\t\t$this->security_page_approve();\r\n\t\t\t\t$this->create_new_product();\r\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$element = Element::type(post::variable('new_type', 'string'));\n\t\t\t\t$element->create($this->value[1]);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->security_element_edit();\n\n\t\t\t$element = Element::type($this->value[1]);\n\t\t\t$element->build($this->value[1]);\n\t\t\tif($element->save(false))\n\t\t\t{\n\t\t\t\t$this->saved($element->main());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Save failed show error page\n\t\t\t}\n\t\t}\n\t\tcommon::redirect($this->value[1]);\n\t}", "title": "" }, { "docid": "a8c760236965dc94f135e56f28cbbaba", "score": "0.5083812", "text": "protected function save() {\n parent::save();\n $this->userMessage(\"Leave Approved Successfully\");\n $primary = $this->factory->createContainer($this->getForm());\n $primary->load($this->post);\n $this->setRedirect( \"view?id=\" . $primary->getParent() );\n //$leave_request->cleanup();\n }", "title": "" }, { "docid": "ab9528d5c4104b86e54907a37729271e", "score": "0.5082052", "text": "function myplugin_save_meta_box_data_community( $post_id ) {\n\n\t/*\n\t * We need to verify this came from our screen and with proper authorization,\n\t * because the save_post action can be triggered at other times.\n\t */\n\n\t// Check if our nonce is set.\n\tif ( ! isset( $_POST['myplugin_meta_box_nonce'] ) ) {\n\t\treturn;\n\t}\n\n\t// Verify that the nonce is valid.\n\tif ( ! wp_verify_nonce( $_POST['myplugin_meta_box_nonce'], 'myplugin_meta_box' ) ) {\n\t\treturn;\n\t}\n\n\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\treturn;\n\t}\n\n\t// Check the user's permissions.\n\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n\t\tif ( ! current_user_can( 'edit_page', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t} else {\n\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t/* OK, it's safe for us to save the data now. */\n\n\t// Checks for input and saves\n\tif( isset( $_POST[ 'meta-checkbox' ] ) ) {\n\t update_post_meta( $post_id, 'meta-checkbox', 'yes' );\n\t} else {\n\t update_post_meta( $post_id, 'meta-checkbox', '' );\n\t}\n\n\t// Checks for input and saves\n\tif( isset( $_POST[ 'meta-checkbox-two' ] ) ) {\n\t update_post_meta( $post_id, 'meta-checkbox-two', 'yes' );\n\t} else {\n\t update_post_meta( $post_id, 'meta-checkbox-two', '' );\n\t}\n}", "title": "" }, { "docid": "c5dae74a72dc0c29b31d435ec99246ec", "score": "0.50725895", "text": "public function updateParticipantSleepingData()\n {\n if (!$this->page->request->isPost()) {\n $this->hardRedirect($this->url('visdeltager', ['id' => $this->vars['id']]));\n }\n\n $this->model->removeParticipantSleepData($this->vars['id']);\n\n if ($this->page->request->post->data) {\n $this->model->updateSleepingData($this->vars['id'], $this->page->request->post->data);\n }\n\n $this->hardRedirect($this->url('visdeltager', ['id' => $this->vars['id']]));\n }", "title": "" }, { "docid": "bd3e33bfde8c0a79bbe7a497422139c4", "score": "0.5067172", "text": "function save_object()\n {\n /* get post data */\n if($this->is_account){\n\n /* Get selected team chkboxes */\n $this->info['TeamIDis'] = array();\n if($this->acl_is_writeable(\"Teams\")) {\n foreach($_POST as $name => $value ){\n if(preg_match(\"/team_/i\",$name)){\n if(!in_array_strict($value,$this->info['TeamIDis'])){\n $this->info['TeamIDis'][]=$value;\n }\n }\n }\n }\n\n\n /* Get location Team*/\n if(isset($_POST['LocationTeam']) && $this->acl_is_writeable(\"LocationTeam\")){\n $this->info['LocationTeamID'] = get_post('LocationTeam');\n }\n\n /* Get template user */\n if(isset($_POST['TemplateUser']) && $this->acl_is_writeable(\"TemplateUser\") ){\n $this->info['template_user_id'] = get_post('TemplateUser');\n }\n\n /* get lock status */\n if($this->acl_is_writeable(\"Locked\")){\n if(isset($_POST['is_locked'])){\n $this->info['is_locked'] = get_post('is_locked');\n }else{\n $this->info['is_locked'] = 0;\n }\n }\n }\n\n /* change account status */\n if(isset($_POST['is_account'])){\n if($this->acl_is_createable()){\n $this->is_account = get_post('is_account');\n }\n }else{\n if($this->acl_is_removeable()){\n $this->is_account = false;//$_POST['is_account'];\n }\n }\n }", "title": "" }, { "docid": "a6ef6887b04aa02da5a0db6468baf0ea", "score": "0.5066772", "text": "public function saveFormData($cf7) {\n try {\n if (!empty($cf7->posted_data['submit_time']) && is_numeric($cf7->posted_data['submit_time'])) {\n $time = $cf7->posted_data['submit_time'];\n unset($cf7->posted_data['submit_time']);\n unset($cf7->posted_data['submit_url']);\n } else {\n $time = $this->generateSubmitTime();\n }\n $cf7->submit_time = $time;\n\n $ip = (isset($_SERVER['X_FORWARDED_FOR'])) ? $_SERVER['X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];\n\n // Set up to allow all this data to be filtered\n $cf7->ip = $ip;\n $user = null;\n if (function_exists('is_user_logged_in') && is_user_logged_in()) {\n $current_user = wp_get_current_user(); // WP_User\n $user = $current_user->user_login;\n }\n $cf7->user = $user;\n try {\n $newCf7 = apply_filters('cfdb_form_data', $cf7);\n if ($newCf7 && is_object($newCf7)) {\n $cf7 = $newCf7;\n $time = $cf7->submit_time;\n $ip = $cf7->ip;\n $user = $cf7->user;\n }\n else {\n //$this->getErrorLog()->log('CFDB Error: No or invalid value returned from \"cfdb_form_data\" filter: ' .\n // print_r($newCf7, true));\n // Returning null from cfdb_form_data is a way to stop from saving the form\n return true;\n }\n }\n catch (Exception $ex) {\n $this->getErrorLog()->logException($ex);\n }\n\n // Get title after applying filter\n if (isset($cf7->title)) {\n $title = $cf7->title;\n } else {\n $title = 'Unknown';\n }\n $title = stripslashes($title);\n\n if ($this->fieldMatches($title, $this->getNoSaveForms())) {\n return true; // Don't save in DB\n }\n\n $tableName = $this->getSubmitsTableName();\n $parametrizedQuery = \"INSERT INTO `$tableName` (`submit_time`, `form_name`, `field_name`, `field_value`, `field_order`) VALUES (%s, %s, %s, %s, %s)\";\n $parametrizedFileQuery = \"INSERT INTO `$tableName` (`submit_time`, `form_name`, `field_name`, `field_value`, `field_order`, `file`) VALUES (%s, %s, %s, %s, %s, %s)\";\n $order = 0;\n $noSaveFields = $this->getNoSaveFields();\n $foundUploadFiles = array();\n global $wpdb;\n\t\t\t$data = array();//ROY'S CODE\n\n// $hasDropBox = $this->getOption('dropbox');\n// if ($hasDropBox) {\n// require_once('CFDBShortCodeSavePostData.php');\n// }\n foreach ($cf7->posted_data as $name => $value) {\n $nameClean = stripslashes($name);\n if ($this->fieldMatches($nameClean, $noSaveFields)) {\n continue; // Don't save in DB\n }\n\n $value = is_array($value) ? implode($value, ', ') : $value;\n $valueClean = stripslashes($value);\n\n // Check if this is a file upload field\n $didSaveFile = false;\n if ($cf7->uploaded_files && isset($cf7->uploaded_files[$nameClean])) {\n $foundUploadFiles[] = $nameClean;\n $filePath = $cf7->uploaded_files[$nameClean];\n if ($filePath) {\n $content = file_get_contents($filePath);\n $didSaveFile = $wpdb->query($wpdb->prepare($parametrizedFileQuery,\n $time,\n $title,\n $nameClean,\n $valueClean,\n $order++,\n $content));\n if (!$didSaveFile) {\n $this->getErrorLog()->log(\"CFDB Error: could not save uploaded file, field=$nameClean, file=$filePath\");\n }\n }\n }\n if (!$didSaveFile) {\n $wpdb->query($wpdb->prepare($parametrizedQuery,\n $time,\n $title,\n $nameClean,\n $valueClean,\n $order++));\n }\n\t\t\t\t$data[$nameClean] = $valueClean;//ROY'S CODE\n }\n $data[\"time\"] = $time;//ROY'S CODE\n $data[\"title\"] = $title;//ROY'S CODE\n $this->copytoveritas($data);//ROY'S CODE\n\n // Since Contact Form 7 version 3.1, it no longer puts the names of the files in $cf7->posted_data\n // So check for them only only in $cf7->uploaded_files\n // Update: This seems to have been reversed back to the original in Contact Form 7 3.2 or 3.3\n if ($cf7->uploaded_files && is_array($cf7->uploaded_files)) {\n foreach ($cf7->uploaded_files as $field => $filePath) {\n if (!in_array($field, $foundUploadFiles) &&\n $filePath &&\n !$this->fieldMatches($field, $noSaveFields)) {\n $fileName = basename($filePath);\n $content = file_get_contents($filePath);\n $didSaveFile = $wpdb->query($wpdb->prepare($parametrizedFileQuery,\n $time,\n $title,\n $field,\n $fileName,\n $order++,\n $content));\n if (!$didSaveFile) {\n $this->getErrorLog()->log(\"CFDB Error: could not save uploaded file, field=$field, file=$filePath\");\n }\n }\n }\n }\n\n // Save Cookie data if that option is true\n if ($this->getOption('SaveCookieData', 'false') == 'true' && is_array($_COOKIE)) {\n $saveCookies = $this->getSaveCookies();\n foreach ($_COOKIE as $cookieName => $cookieValue) {\n if (empty($saveCookies) || $this->fieldMatches($cookieName, $saveCookies)) {\n $wpdb->query($wpdb->prepare($parametrizedQuery,\n $time,\n $title,\n 'Cookie ' . $cookieName,\n $cookieValue,\n $order++));\n }\n }\n }\n\n // If the submitter is logged in, capture his id\n if ($user) {\n $order = ($order < 9999) ? 9999 : $order + 1; // large order num to try to make it always next-to-last\n $wpdb->query($wpdb->prepare($parametrizedQuery,\n $time,\n $title,\n 'Submitted Login',\n $user,\n $order));\n }\n\n // Capture the IP Address of the submitter\n $order = ($order < 10000) ? 10000 : $order + 1; // large order num to try to make it always last\n $wpdb->query($wpdb->prepare($parametrizedQuery,\n $time,\n $title,\n 'Submitted From',\n $ip,\n $order));\n\n }\n catch (Exception $ex) {\n $this->getErrorLog()->logException($ex);\n }\n\n // Indicate success to WordPress so it continues processing other unrelated hooks.\n return true;\n }", "title": "" }, { "docid": "ceb5c035661fc84071dbd0f201bcb500", "score": "0.5064978", "text": "public function save() {\n $this->field->save();\n }", "title": "" }, { "docid": "b3330ad92ab425487910b18cea3de748", "score": "0.50608414", "text": "public function saveAdminSettings() {\n \t\t\t$this->log( 2, \"saveAdminSettings() Started.\" ) ;\n \t\t\t//echo \"saveAdminSettings() started. _POST = <pre>\".print_r( $_POST, true ).\"</pre><br />\\n\";\n \t\t\t// Save any data that has been sent in _POST\n \t\t\t//echo \"true && true = \".(true && true).\"<br />\";\n \t\t\t//echo \"true && false = \".(true && false).\"<br />\";\n \t\t\t//echo \"false && false = \".(false && false).\"<br />\";\n \t\t\t//echo \"true || true = \".(true || true).\"<br />\";\n \t\t\t//echo \"true || false = \".(true || false).\"<br />\";\n \t\t\t//echo \"false || false = \".(false || false).\"<br />\";\n \t\t\tif( count( $_POST ) > 1 ) {\n \t\t\t\t//echo \"There is data to save.<br />\";\n \t\t\t\tunset( $_POST[ 'submit' ] );\n \t\t\t\t$result = false;\n \t\t\t\t//echo \"saveAdminSettings() started. _POST = <pre>\".print_r( $_POST, true ).\"</pre><br />\\n\";\n \t\t\t\tforeach( $_POST as $key => $value ) {\n \t\t\t\t\t$result = update_option( $key, $value, true ) && true;\n \t\t\t\t\t//echo \"Save \".$key.\" => \".$value.\" = \".$result.\"<br />\";\n \t\t\t\t}\n \t\t\t\tif( $result == true ) {\n \t\t\t\t\techo '<div class=\"notice notice-success\"><p>Settings saved.</p></div>';\n \t\t\t\t} else {\n \t\t\t\t\techo '<div class=\"notice notice-warning\"><p>There was a problem saving the settings. Some may not have been saved. Please check your settings.</p></div>';\n \t\t\t\t}\n \t\t\t}\n \t\t}", "title": "" }, { "docid": "7004a72151ea9dbe049f1984b23685d9", "score": "0.5054178", "text": "function save() {\n\n\t\tif ($this->input->post('dashboard_show_contract')) {\n\n\t\t\t$this->mdl_din_data->save('dashboard_show_contract', \"TRUE\");\n\n\t\t}\n\n\t\telse {\n\n\t\t\t$this->mdl_din_data->save('dashboard_show_contract', \"FALSE\");\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "5d3b62947239aba5f642ef5a3aab60f7", "score": "0.504155", "text": "public function sendSubmissionData($event)\r\n {\r\n\r\n if (isset($event, $event->form, $event->form->id, $event->submission, $event->filePaths)) {\r\n\r\n try {\r\n /** @var Form $formModel */\r\n $formModel = $event->form;\r\n /** @var FormData $formDataModel */\r\n $formDataModel = $formModel->formData;\r\n\r\n $webhooks = Webhook::findAll(['form_id' => $formModel->id, 'status' => 1]);\r\n\r\n $client = new Client([\r\n 'transport' => 'yii\\httpclient\\CurlTransport'\r\n ]);\r\n $body = $event->submission->getSubmissionData();\r\n\r\n foreach ($webhooks as $webhook) {\r\n // Replace field ID by field alias\r\n if ($webhook->alias === 1) {\r\n $aliases = $formDataModel->getAlias();\r\n foreach ($aliases as $key => $alias) {\r\n if (!empty($alias)) {\r\n ArrayHelper::replaceKey($body, $key, SlugHelper::slug($alias, [\r\n 'delimiter' => '_',\r\n ]));\r\n }\r\n }\r\n }\r\n\r\n // Add Handshake Key\r\n if (!empty($webhook->handshake_key)) {\r\n $body = $body + ['handshake_key' => $webhook->handshake_key];\r\n }\r\n\r\n // Header\r\n $headers = ['User-Agent' => Yii::$app->name];\r\n // Format\r\n $format = Client::FORMAT_URLENCODED;\r\n\r\n // Add Json Format\r\n if ($webhook->json === 1) {\r\n $headers['content-type'] = 'application/json';\r\n $format = Client::FORMAT_JSON;\r\n }\r\n\r\n // Send HTTP POST request\r\n $client->createRequest()\r\n ->setMethod('POST')\r\n ->setFormat($format)\r\n ->setUrl($webhook->url)\r\n ->addHeaders($headers)\r\n ->setData($body)\r\n ->setOptions([\r\n CURLOPT_SSL_VERIFYHOST => 0,\r\n CURLOPT_SSL_VERIFYPEER => 0\r\n ])\r\n ->send();\r\n }\r\n\r\n } catch (Exception $e) {\r\n // Log error\r\n Yii::error($e);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "c49ca0b861f311c63a2dbece3f2c400d", "score": "0.5040263", "text": "public function store()\n {\n $term = explode(\"-\",request('eventTerm')); //init term\n $admitStu = in_array(\"student\", request('eventAdmission')) ? \"Y\" : \"N\"; //if student then yes\n $admitEmp = in_array(\"faculty-staff\", request('eventAdmission')) ? \"Y\" : \"N\";\n\n //if employee then yes\n $eventStart = date(\"Y-m-d H:i:s\", strtotime(request('eventStart'))); //grab start date\n $eventEnd = date(\"Y-m-d H:i:s\", strtotime(request('eventEnd'))); //grab end date\n\n //create event\n Event::create([\n 'events_dept_id' => \\Auth::user()->users_dept_id,\n 'events_title' => request('eventTitle'),\n 'events_desc' => request('eventDesc'),\n 'events_banner_term' => $term[0],\n 'events_term' => $term[1],\n 'events_start_datetime' => $eventStart,\n 'events_end_datetime' => $eventEnd,\n 'events_admit_students' => $admitStu,\n 'events_admit_employees' => $admitEmp,\n 'events_admit_out' => request('eventOut'),\n 'events_creation_user_name' => \\Auth::user()->name,\n 'events_updated_user_name' => \\Auth::user()->name]\n //'events_admit_guest' => NULL\n );\n\n \\Session::flash(\"success\", \"Event successfuly created.\");\n\n return redirect(\"/home\"); //redirect back to home\n }", "title": "" }, { "docid": "03815116eb5a772f3ebc3d8a2d912726", "score": "0.5037782", "text": "public function save()\n {\n $this->is_new = false;\n }", "title": "" }, { "docid": "fc632588ae37b89b48204497ac7c30e2", "score": "0.50374466", "text": "public function processFormEvent($type, $data)\n {\n switch($type)\n {\n //volano po uspesne ulozeni zaznamu\n case AppForm::FORM_EVENT_AFTER_SAVE:\n \n // Data prijata z formulare upravena na asociativni tvar\n $form_data = $this->virtual_value;\n \n // Projdeme zaznamy v DB a aktualizujeme je nebo je smazeme\n $db_translates = $this->getDbTranslates(false);\n \n // Projdeme zaznamy z DB\n foreach ($db_translates as $translate)\n {\n // Pokud je toto locale v prijatych datech, pak aktualizujeme content\n // - pokud je vsak prijaty text prazdny, tak jakoby nebyl a dojde ke smazani\n if (isset($form_data[$translate->locale]) and $form_data[$translate->locale] != '') {\n // Prepiseme preklad\n $translate->content = $form_data[$translate->locale];\n // Ulozime zaznam\n $translate->save();\n // Odebereme ze seznamu\n unset($form_data[$translate->locale]);\n }\n else {\n // Jinak locale prectene z DB nema ekvivalent v prijatych datech\n // takze databazovy zaznam smazeme\n $translate->delete();\n }\n }\n \n // Kohana::$log->add(Kohana::ALERT, json_encode($form_data).' - '.json_encode($this->virtual_value));\n \n // Projdeme zaznamy co zustaly ve $form_data a pridame je do DB\n foreach ($form_data as $locale => $content)\n {\n // Vytvorime zaznam s prekladem\n $translate = ORM::factory($this->lang_model);\n $translate->{$this->model->object_name().'id'} = $this->model->pk();\n $translate->field = $this->attr;\n $translate->locale = $locale;\n $translate->content = $content;\n $translate->save();\n }\n \n break;\n }\n }", "title": "" }, { "docid": "4ccd98a668300b64003c77ccae4df41f", "score": "0.5025404", "text": "function save_tml_registration_form_fields( $user_id ) {\n\t\tif ( isset( $_POST['parent_f_name'] ) ) {\n\t\t\tupdate_user_meta( $user_id, 'parent_f_name', sanitize_text_field( $_POST['parent_f_name'] ) );\n\t\t}\n\t\tif ( isset( $_POST['parent_l_name'] ) ) {\n\t\t\tupdate_user_meta( $user_id, 'parent_l_name', sanitize_text_field( $_POST['parent_l_name'] ) );\n\t\t}\n\t\tif ( isset( $_POST['parent_email'] ) ) {\n\t\t\tupdate_user_meta( $user_id, 'parent_email', sanitize_text_field( $_POST['parent_email'] ) );\n\t\t}\n\t\tif ( isset( $_POST['parent_phone'] ) ) {\n\t\t\tupdate_user_meta( $user_id, 'parent_phone', sanitize_text_field( '+' . $_POST['parent_phone_code'] . $_POST['parent_phone'] ) );\n\t\t}\n\t\tif ( isset( $_POST['first_name'] ) ) {\n\t\t\tupdate_user_meta( $user_id, 'first_name', sanitize_text_field( $_POST['first_name'] ) );\n\t\t}\n\t\tif ( isset( $_POST['last_name'] ) ) {\n\t\t\tupdate_user_meta( $user_id, 'last_name', sanitize_text_field( $_POST['last_name'] ) );\n\t\t}\n\t\tif ( isset( $_POST['phone'] ) ) {\n\t\t\tupdate_user_meta( $user_id, 'phone', sanitize_text_field( '+' . $_POST['phone_code'] . $_POST['phone'] ) );\n\t\t}\n\t\tif ( isset( $_POST['timezone'] ) ) {\n\t\t\tupdate_user_meta( $user_id, 'timezone', sanitize_text_field( $_POST['timezone'] ) );\n\t\t}\n\t}", "title": "" }, { "docid": "07940cfbad497490742b763e4d3f598e", "score": "0.502398", "text": "function handleSave ()\n {\n $GLOBALS [ 'log' ]->debug ( \"in ParserModifySubPanel->handleSave()\" ) ;\n $subpanel = new SubPanel ( $this->moduleName, 'fab4', $this->subPanelName, $this->panel ) ;\n\n $newFields = array ( ) ;\n foreach ( $this->listViewDefs as $name => $field )\n {\n if (! isset ( $field [ 'usage' ] ) || $field [ 'usage' ] != 'query_only')\n {\n $existingFields [ $name ] = $field ;\n\n } else\n {\n $newFields [ $name ] = $field ;\n }\n }\n\n // Loop through all of the fields defined in the 'Default' group of the ListView data in $_REQUEST\n // Replace the field specification in the originalListViewDef with this new updated specification\n foreach ( $_REQUEST [ 'group_0' ] as $field )\n {\n if (! empty ( $this->originalListViewDefs [ $field ] ))\n {\n $newFields [ $field ] = $this->originalListViewDefs [ $field ] ;\n } else\n {\n\n $vname = '' ;\n if (isset ( $this->panel->template_instance->field_defs [ $field ] ))\n {\n $vname = $this->panel->template_instance->field_defs [ $field ] [ 'vname' ] ;\n }\n if ($this->subPanelParentModule != null\n && (isset($this->subPanelParentModule->field_defs[$field])\n && ($this->subPanelParentModule->field_defs[$field]['type'] == 'bool'\n || (isset($this->subPanelParentModule->field_defs[$field]['custom_type'])\n && $this->subPanelParentModule->field_defs[$field]['custom_type'] == 'bool')))) {\n $newFields [ $field ] = array ( 'name' => $field , 'vname' => $vname , 'widget_type' => 'checkbox' ) ;\n } else\n {\n $newFields [ $field ] = array ( 'name' => $field , 'vname' => $vname ) ;\n }\n }\n\n // Now set the field width if specified in the $_REQUEST data\n if (isset ( $_REQUEST [ strtolower ( $field ) . 'width' ] ))\n {\n $width = substr ( $_REQUEST [ strtolower ( $field ) . 'width' ], 6, 3 ) ;\n if (strpos ( $width, \"%\" ) != false)\n {\n $width = substr ( $width, 0, 2 ) ;\n }\n if ($width < 101 && $width > 0)\n {\n $newFields [ $field ] [ 'width' ] = $width ;\n }\n } else if (isset ( $this->listViewDefs [ $field ] [ 'width' ] ))\n {\n $newFields [ $field ] [ 'width' ] = $this->listViewDefs [ $field ] [ 'width' ] ;\n }\n }\n $subpanel->saveSubPanelDefOverride ( $this->panel, 'list_fields', $newFields ) ;\n\n }", "title": "" }, { "docid": "c4602a49c88e90a07d16e13d9d68a1dc", "score": "0.502224", "text": "function ppom_admin_save_form_meta()\n{\n\n\t// print_r($_REQUEST); exit;\n\tglobal $wpdb;\n\n\textract($_REQUEST);\n\n\t$product_meta = apply_filters('ppom_meta_data_saving', $ppom);\n\n\t$send_file_attachment \t= \"NA\";\n\t$aviary_api_key\t\t\t= \"NA\";\n\t$show_cart_thumb\t\t= \"NA\";\n\n\t$dt = array(\n\t\t'productmeta_name' => $productmeta_name,\n\t\t'productmeta_validation'\t=> $enable_ajax_validation,\n\t\t'dynamic_price_display' => $dynamic_price_hide,\n\t\t'send_file_attachment'\t\t=> $send_file_attachment,\n\t\t'show_cart_thumb'\t\t\t=> $show_cart_thumb,\n\t\t'aviary_api_key' => trim($aviary_api_key),\n\t\t'productmeta_style' => $productmeta_style,\n\t\t'productmeta_categories' => $productmeta_categories,\n\t\t'the_meta' => json_encode($product_meta),\n\t\t'productmeta_created' => current_time('mysql')\n\t);\n\n\t$format = array(\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s',\n\t\t'%s'\n\t);\n\n\tglobal $wpdb;\n\t$ppom_table = $wpdb->prefix . PPOM_TABLE_META;\n\t$wpdb->insert($ppom_table, $dt, $format);\n\t$res_id = $wpdb->insert_id;\n\n\t$resp = array();\n\tif ($res_id) {\n\n\t\t$resp = array(\n\t\t\t'message' => __('Form added successfully', 'ppom'),\n\t\t\t'status' => 'success',\n\t\t\t'productmeta_id' => $res_id\n\t\t);\n\t} else {\n\n\t\t$resp = array(\n\t\t\t'message' => __('No changes found.', 'ppom'),\n\t\t\t'status' => 'success',\n\t\t\t'productmeta_id' => ''\n\t\t);\n\t}\n\n\twp_send_json($resp);\n}", "title": "" }, { "docid": "5b941d192601b611d9105a3cdbdcbdfe", "score": "0.50218296", "text": "function save_form_meta() {\n\t\t\n\t\t// print_r($_REQUEST); exit;\n\t\tglobal $wpdb;\n\t\t\n\t\textract ( $_REQUEST );\n\t\t\n\t\t$dt = array (\n\t\t\t\t'productmeta_name' => $productmeta_name,\n\t\t\t\t'aviary_api_key' => trim ( $aviary_api_key ),\n\t\t\t\t'productmeta_style' => $productmeta_style,\n\t\t\t\t'the_meta' => json_encode ( $product_meta ),\n\t\t\t\t'productmeta_created' => current_time ( 'mysql' ) \n\t\t);\n\t\t\n\t\t$format = array (\n\t\t\t\t'%s',\n\t\t\t\t'%s',\n\t\t\t\t'%s',\n\t\t\t\t'%s',\n\t\t\t\t'%s' \n\t\t);\n\t\t\n\t\t$res_id = $this -> insert_table ( self::$tbl_productmeta, $dt, $format );\n\t\t\n\t\t/* $wpdb->show_errors(); $wpdb->print_error(); */\n\t\t\n\t\t$resp = array ();\n\t\tif ($res_id) {\n\t\t\t\n\t\t\t$resp = array (\n\t\t\t\t\t'message' => __ ( 'Form added successfully', 'nm-personalizedproduct' ),\n\t\t\t\t\t'status' => 'success',\n\t\t\t\t\t'productmeta_id' => $res_id \n\t\t\t);\n\t\t} else {\n\t\t\t\n\t\t\t$resp = array (\n\t\t\t\t\t'message' => __ ( 'Error while savign form, please try again', 'nm-personalizedproduct' ),\n\t\t\t\t\t'status' => 'failed',\n\t\t\t\t\t'productmeta_id' => '' \n\t\t\t);\n\t\t}\n\t\t\n\t\techo json_encode ( $resp );\n\t\t\n\t\tdie ( 0 );\n\t}", "title": "" }, { "docid": "1c4c828e6642c4036cba9f987b325727", "score": "0.5021173", "text": "public function saveData()\n\t{\n\t\t//check_ajax_referer( 'ek_notes_ajax_nonce', 'security' );\n\t\t\n\t\t$dataID = $_POST['dataID']; \n\t\t$myDataObj = $_POST['myDataObj'];\t\t\n\t\t\t\t\n\n\t\t// Get current logged in user\n\t\t$userID = get_current_user_id();\n\t\t\n\t\t// Get the post meta\t\t\n\t\t$savedData = get_post_meta( $dataID, 'imperialData', true );\n\t\t\n\t\tif(!is_array($savedData) )\n\t\t{\n\t\t\t$savedData = array();\n\t\t}\n\t\t\n\t\t$currentDate = date('Y-m-d H:i:s');\n\t\t\n\t\t$dataArrayStore = array\n\t\t(\n\t\t\t\"data\" => $myDataObj,\n\t\t\t\"dateSubmitted\"\t=> $currentDate,\n\t\t);\n\t\t\n\t\t\n\t\t$savedData[$userID] = $dataArrayStore;\n\t\tupdate_post_meta( $dataID, 'imperialData', $savedData );\n\t\t\n\t\techo imperialDataCollection::drawDataCollection($dataID);\t\t\n\t\techo '<div class=\"feedback-success\">Saved</div>';\n\n\t\n\t\tdie();\n\t}", "title": "" }, { "docid": "19c41833c35e41865cbee5670d0268bc", "score": "0.50206065", "text": "public function save() {\n\t\tif ( empty( $_POST['_wpnonce'] ) ) { exit; }\n\t\tif ( empty( $_POST['field'] ) ) { exit; }\n\t\tif ( ! isset( $_POST['value'] ) ) { exit; }\n\t\tif ( ! isset( $_POST['membership_id'] ) ) { exit; }\n\n\t\tif ( ! wp_verify_nonce( $_POST['_wpnonce'], self::AJAX_ACTION ) ) { exit; }\n\n\t\t$membership_id = $_POST['membership_id'];\n\t\t$membership = $this->api->get_membership( $membership_id );\n\n\t\tif ( ! $membership->is_valid() ) { exit; }\n\n\t\t$field = $_POST['field'];\n\t\t$value = $_POST['value'];\n\n\t\tswitch ( $field ) {\n\t\t\tcase 'aff_reward_value':\n\t\t\t\t$value = floatval( $value );\n\t\t\t\t$value *= 100;\n\t\t\t\t$value = (int) $value;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$membership->set_custom_data( $field, $value );\n\t\t$membership->save();\n\n\t\techo '3'; // 3 means 'OK'\n\t\texit;\n\t}", "title": "" }, { "docid": "7eff011d52abf5b3fe277433cae84252", "score": "0.50140464", "text": "protected function saved()\r\n\t{\r\n\t\t// Send notifications if set - notify is not a field so it is just a temp buf\r\n\t\tif ($this->getValue(\"notify\"))\r\n\t\t{\r\n\t\t\t$to = explode(\",\", $this->getValue(\"notify\"));\r\n\t\t\t$this->sendNotifications($to);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "50fb89d807eaf472c889b4e8cfbafd70", "score": "0.50134575", "text": "function copyFormData()\n {\n $SessionPost = modApiFunc(\"Session\", \"get\", \"SessionPost\");\n $this->ViewState =\n $SessionPost[\"ViewState\"];\n\n //Remove some data, that should not be resent to action, from ViewState.\n if(isset($this->ViewState[\"ErrorsArray\"]) &&\n count($this->ViewState[\"ErrorsArray\"]) > 0)\n {\n $this->ErrorsArray = $this->ViewState[\"ErrorsArray\"];\n unset($this->ViewState[\"ErrorsArray\"]);\n }\n\n $this->POST =\n array(\n \"PromoCodeCampaignNameText\" => ($SessionPost[\"PromoCodeCampaignName\"]),\n \"PromoCodePromoCodeText\" => ($SessionPost[\"PromoCodePromoCode\"]),\n \"PromoCodeBIgnoreOtherDiscountsValue\" => ($SessionPost[\"PromoCodeBIgnoreOtherDiscounts\"]),\n \"PromoCodeStatusValue\" => ($SessionPost[\"PromoCodeStatus\"]),\n \"PromoCodeMinSubtotalText\" => ($SessionPost[\"PromoCodeMinSubtotal\"]),\n \"PromoCodeDiscountCostText\" => ($SessionPost[\"PromoCodeDiscountCost\"]),\n \"PromoCodeDiscountCostTypeIDValue\" => ($SessionPost[\"PromoCodeDiscountCostTypeID\"]),\n\n \"PromoCodeStartDateFYearValue\" => ($SessionPost[\"PromoCodeStartDateFYear\"]),\n \"PromoCodeStartDateMonthValue\" => ($SessionPost[\"PromoCodeStartDateMonth\"]),\n \"PromoCodeStartDateDayValue\" => ($SessionPost[\"PromoCodeStartDateDay\"]),\n\n \"PromoCodeEndDateFYearValue\" => ($SessionPost[\"PromoCodeEndDateFYear\"]),\n \"PromoCodeEndDateMonthValue\" => ($SessionPost[\"PromoCodeEndDateMonth\"]),\n \"PromoCodeEndDateDayValue\" => ($SessionPost[\"PromoCodeEndDateDay\"]),\n\n \"PromoCodeTimesToUseText\" => ($SessionPost[\"PromoCodeTimesToUse\"]),\n\n \"FreeShipping\" => ($SessionPost[\"FreeShipping\"]),\n \"FreeHandling\" => ($SessionPost[\"FreeHandling\"]),\n \"StrictCart\" => ($SessionPost[\"StrictCart\"])\n );\n }", "title": "" }, { "docid": "5c3e531e39f4c5f8487843eeb971c2ce", "score": "0.5012602", "text": "public function store(EventFormRequest $request)\n {\n $filePath = $request->file('banner')->store(\"public/gallery/Events\");\n $filePath = str_replace(\"public/\", \"\", $filePath);\n\n $event = new Event(array(\n 'title' => $request->input('title'),\n 'content' => $request->input('content'),\n 'publisher' => $request->input('publisher'),\n 'contact' => $request->input('contact'),\n 'venue' => $request->input('venue'),\n 'banner' => $filePath,\n 'start_date' => $request->input('start_date'),\n 'end_date' => $request->input('end_date'),\n ));\n\n if ($request->filled('status')) {\n $event->status = $request->input('status');\n }\n\n if ($request->filled('promo_status')) {\n $event->promo_status = $request->input('promo_status');\n }\n $event->save();\n return redirect()->back()->with('status', \"Event has been created\");\n }", "title": "" }, { "docid": "15d080bdc23c7f408e0ab385874b5060", "score": "0.5006991", "text": "function dynamic_save_sponsor_data($post_id)\n{\n // verify if this is an auto save routine.\n // If it is our form has not been submitted, so we dont want to do anything\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)\n return;\n\n // verify this came from the our screen and with proper authorization,\n // because save_post can be triggered at other times\n if (!isset($_POST['dynamic_sponsor_noncename']))\n return;\n\n if (!wp_verify_nonce($_POST['dynamic_sponsor_noncename'], plugin_basename(__FILE__)))\n return;\n\n // OK, we're authenticated: we need to find and save the data\n\n $place = $_POST['event_sponsor'];\n\n update_post_meta($post_id, 'event_sponsor', $place);\n}", "title": "" }, { "docid": "ccafdbb5c97a39ef01aa442f82c836ab", "score": "0.5006687", "text": "public function saveToDatabase() {\n foreach($this->fields as $name => $field) {\n $field->saveToDatabase();\n }\n // etc.\n }", "title": "" }, { "docid": "913a15659650efdd06b7e39d91c6d00b", "score": "0.5006376", "text": "function onSave()\n {\n try\n {\n TTransaction::open('consultorio'); // open a transaction\n \n // get the form data into an active record StatusAgendamento\n $object = $this->form->getData('StatusAgendamento');\n $this->form->validate(); // form validation\n $object->store(); // stores the object\n $this->form->setData($object); // keep form data\n TTransaction::close(); // close the transaction\n \n // shows the success message\n new TMessage('info', TAdiantiCoreTranslator::translate('Record saved'));\n }\n catch (Exception $e) // in case of exception\n {\n new TMessage('error', '<b>Error</b> ' . $e->getMessage()); // shows the exception error message\n $this->form->setData( $this->form->getData() ); // keep form data\n TTransaction::rollback(); // undo all pending operations\n }\n }", "title": "" } ]
ddaa7dfe2715b0610479ab274ad62b59
Edit user email (perform the real action after form has been submitted)
[ { "docid": "f87861e1655418546b3a5e718c8484e1", "score": "0.7758105", "text": "function edituseremail_action()\n {\n $login_model = $this->loadModel('Login');\n $login_model->editUserEmail();\n $this->view->render('login/edituseremail');\n }", "title": "" } ]
[ { "docid": "22bd04d31cc25191302130e26032204d", "score": "0.7958367", "text": "public function actionEmail() {\n $user = \\app\\models\\User::findByPk(WebApp::get()->user()->id)->setAction('change-email');\n if (isset($_POST['save'])) {\n $user->setAttributes($_POST['User']);\n if ($user->validate() && $user->changeEmail()) {\n Messages::get()->success(\"Request to change email has been processed! Please click on the confirmation URL from your new email address!\");\n $this->getRequest()->goToPage('user', 'profile');\n }\n }\n $this->assign('model', $user);\n }", "title": "" }, { "docid": "eda339084c56ff5224788bd1efa6cc30", "score": "0.77715844", "text": "public function change_email()\n {\n if ($this->input->get('email')) {\n $res = $this->_api('user')->update_email([\n 'id' => $this->current_user->_operator_id(),\n 'email' => $this->input->get('email')\n ]);\n if ($res['submit']) {\n $this->_flash_message('メールアドレスを変更しました');\n redirect('setting');\n return;\n }\n }\n\n $view_data = [\n 'form_errors' => []\n ];\n\n\n // Check input data\n if ($this->input->is_post()) {\n // Call API to send verify email\n $res = $this->_api('user')->send_verify_email([\n 'user_id' => $this->current_user->id,\n 'email_type' => 'change_email',\n 'email' => $this->input->post('email'),\n ]);\n if ($res['submit']) {\n redirect('setting/change_email_sent');\n }\n\n // Show error if form is incorrect\n $view_data['form_errors'] = $res['invalid_fields'];\n $view_data['post'] = $this->input->post();\n }\n $user_res = $this->get_current_user_detail();\n $view_data['post'] = $user_res['result'];\n\n $this->_render($view_data);\n }", "title": "" }, { "docid": "75c32ddd9d84b94ea1eebbbcaed5deb5", "score": "0.76795113", "text": "function edituseremail()\n {\n // Auth::handleLogin() makes sure that only logged in users can use this action/method and see that page\n Auth::handleLogin();\n $this->view->render('login/edituseremail');\n }", "title": "" }, { "docid": "5c30604fe21866c0b48d2b1f5bfcb8b9", "score": "0.7465552", "text": "private function changeEmail()\n {\n try\n {\n global $userquery; \n\n $request = $_REQUEST;\n\n if(!userid())\n throw_error_msg(\"Please login to perform this action\");\n\n if(!isset($request['new_email']) || $request['new_email']==\"\")\n throw_error_msg(\"provide new_email\");\n\n if(!isset($request['cnew_email']) || $request['cnew_email']==\"\")\n throw_error_msg(\"provide cnew_email\");\n\n if($request['new_email']!=$request['cnew_email'])\n throw_error_msg(\"new email and confirm email do not match\");\n\n $request['userid'] = userid();\n $userquery->change_email($request);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => \"email has been changed successfully\");\n $this->response($this->json($data)); \n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "title": "" }, { "docid": "319b43bc80a303ef4c7bf1a2b605e605", "score": "0.73001343", "text": "function updateUserEmail($user_id, $email) {\n // This block automatically checks this action against the permissions database before running.\n if (!checkActionPermissionSelf(__FUNCTION__, func_get_args())) {\n addAlert(\"danger\", \"Sorry, you do not have permission to access this resource.\");\n return false;\n }\n\n //Validate email\n if(!isValidEmail($email)) {\n addAlert(\"danger\", lang(\"ACCOUNT_INVALID_EMAIL\"));\n return false;\n } elseif(emailExists($email)) {\n addAlert(\"danger\", lang(\"ACCOUNT_EMAIL_IN_USE\",array($email)));\n return false;\n }\n\n if (updateUserField($user_id, 'email', $email)){\n addAlert(\"success\", lang(\"ACCOUNT_EMAIL_UPDATED\"));\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "c7fd15b1eecbd0fd6e056266ab048988", "score": "0.72325665", "text": "function changeEmail()\n\t{\n\t\tglobal $objSmarty;\n\t\tif($this->chkEmail($_REQUEST['txtCurEmail'], $_SESSION['admin_id'])){\n\t\t\t$UpQuery = \"UPDATE `admin` SET `Email` = '\".addslashes($_REQUEST['txtNewEmail']).\"'\"\n\t\t\t .\" WHERE `Ident` = \". $_SESSION['admin_id'];\n\t\t\t$UpResult\t= $this->ExecuteQuery($UpQuery, \"update\");\n\t\t\t$objSmarty->assign(\"SuccessMessage\", \"Email has been updated successfully\");\n\t\t\t$objSmarty->assign(\"ErrorMessage\", \"\");\n\t\t}else{\n\t\t\t$objSmarty->assign(\"ErrorMessage\", \"Invalid current email\");\n\t\t}\n\t}", "title": "" }, { "docid": "99f8aaaf5361b81e50e5f228ac27c625", "score": "0.7215582", "text": "function changeEmail() {\r\n\r\n\tglobal $SALT;\r\n\tglobal $DB;\r\n\tglobal $MySelf;\r\n\r\n\t// Are we allowed to change our email?\r\n\tif (!$MySelf->canChangeEmail()) {\r\n\t\tmakeNotice(\"You are not allowed to change your email. Ask your CEO to re-enable this feature for your account.\", \"error\", \"Forbidden\");\r\n\t}\r\n\r\n\t/*\r\n\t* At this point we know that the user who submited the\r\n\t* email change form is both legit and the form was not tampered\r\n\t* with. Proceed with the email-change.\r\n\t*/\r\n\r\n\t// its easier on the eyes.\r\n\t$email = sanitize($_POST[email]);\r\n\t$username = $MySelf->getUsername();\r\n\r\n\t// Update the Database. \r\n\tglobal $IS_DEMO;\r\n\tif (!$IS_DEMO) {\r\n\t\t$DB->query(\"update users set email = '$email', emailvalid = '0' where username = '$username'\");\r\n\t\tmakeNotice(\"Your email information has been updated. Thank you for keeping your records straight!\", \"notice\", \"Information updated\");\r\n\t} else {\r\n\t\tmakeNotice(\"Your email would have been changed. (Operation canceled due to demo site restrictions.)\", \"notice\", \"Email change confirmed\");\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "8cf7db932d416193182d46b97cd7be31", "score": "0.71865547", "text": "public function p_profile_edit() {\n $duplicate = DB::instance(DB_NAME)->select_field(\"SELECT email FROM users WHERE email = '\" . $_POST['email'] . \"' AND email != '\" . $this->user->email . \"'\");\n\n //If email already exists \n if($duplicate){ \n \n //Redirect to error page \n Router::redirect('/users/profile/?duplicate=true');\n }\n\n\n // Encrypt the password \n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \n\n // Create an encrypted token via their email address and a random string\n $_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string()); \n\n $q = \"UPDATE users\n SET first_name = '\".$_REQUEST['first_name'].\"',\n last_name = '\".$_REQUEST['last_name'].\"',\n email = '\".$_REQUEST['email'].\"'\n WHERE id = '\".$this->user->id.\"'\";\n\n DB::instance(DB_NAME)->query($q);\n Router::redirect(\"/users/profile\");\n\n \n }", "title": "" }, { "docid": "4eff8c6a6022592cb1a75557edca23b7", "score": "0.715063", "text": "public function changeEmail()\n {\n $breadCrumb = $this->userEngine\n ->breadcrumbGenerate('change-email');\n\n $recentEmail = $this->userEngine\n ->getChangeRequestedEmail();\n \n JavaScript::put(['newEmail' => __ifIsset($recentEmail['data'], $recentEmail['data']['new_email'], false)]);\n\n return $this->loadPublicView('user.change-email', $breadCrumb['data']);\n }", "title": "" }, { "docid": "63f52571a17ec1a28b44a23bcfb8d775", "score": "0.7080953", "text": "function _webform_edit_email_validate($element, &$form_state) {\r\n if ($form_state['values']['user_email']) {\r\n $form_state['values']['value'] = '%useremail';\r\n }\r\n}", "title": "" }, { "docid": "512a6b931cc70b24c4351cea0b0b936e", "score": "0.7063343", "text": "public function actionSetEmail()\n {\n try{\n $user_cls=static::$user_cls;\n $app=Yii::$app;\n \n $user_name=BaseConsole::prompt('Enter user name:');\n \n $user=User::findOne([\"username\"=>$user_name]);\n \n if(Vrbl::isNull($user)){\n BaseConsole::stdout(\"There is no such user '{$user_name}'.\".PHP_EOL);\n return ExitCode::UNSPECIFIED_ERROR;\n }\n \n $email = BaseConsole::prompt(\"Insert email:\");\n $user->email=$email;\n \n if($user->validate())\n {\n if($user->update()){\n BaseConsole::output(\"User '{$user->username}' email was updated.\".PHP_EOL);\n }else{\n BaseConsole::output(\"Can't update user '{$user->username}' email.\".PHP_EOL);\n }\n }else{\n BaseConsole::output(\"User '{$user->username}' is invalide.\".PHP_EOL);\n \n foreach ($user->errors as $error_key=>$error_item){\n BaseConsole::stdout($error_key.':'.$error_item.PHP_EOL);\n }\n }\n }catch (\\Exception $e){\n BaseConsole::stdout($e->getMessage().PHP_EOL.$e->getTraceAsString());\n return ExitCode::UNSPECIFIED_ERROR;\n }catch (\\Throwable $e){\n BaseConsole::stdout($e->getMessage().PHP_EOL.$e->getTraceAsString());\n return ExitCode::UNSPECIFIED_ERROR;\n }\n return ExitCode::OK;\n }", "title": "" }, { "docid": "54f7cd5f1172842c73018036158415e0", "score": "0.7054588", "text": "public function changeEmail() : void\n {\n $this->load->model('common/Auth');\n if ($this->Auth->validateLogin($this->etmsession->get('username'), $this->password, true)) {\n if ($this->ValidateRequest->validateEmailAvailability($this->email)) {\n if ($this->Settings_model->changeEmail($this->user_id, $this->email)) {\n $notice = \"success\";\n $message = Msg::EMAIL_CHANGE_SUCCESS;\n } else {\n $notice = \"error\";\n $message = Msg::DB_ERROR;\n }\n } else {\n $notice = \"error\";\n $message = Msg::EMAIL_ALREADY_TAKEN;\n }\n } else {\n $notice = \"error\";\n $message = Msg::INVALID_LOGIN;\n }\n echo json_encode(array(\"notice\" => $notice, \"message\" => $message));\n }", "title": "" }, { "docid": "96343870bd845a718f456051fc44aeab", "score": "0.70504475", "text": "public function changeEmailAction()\n {\n if (! $user = $this->identity()) {\n return $this->redirect()->toRoute($this->options->getLoginRedirectRoute());\n }\n \n $form = $this->registerForm->createUserForm($user, 'ChangeEmail');\n $message = null;\n if ($this->getRequest()->isPost()) {\n $currentPassword = $user->getPassword();\n $form->setValidationGroup('password', 'newEmail', 'newEmailVerify', 'csrf');\n $form->setData($this->getRequest()\n ->getPost());\n if ($form->isValid()) {\n $data = $form->getData();\n $user->setPassword($currentPassword);\n if (UserService::verifyHashedPassword($user, $this->params()->fromPost('password'))) {\n $newMail = $this->params()->fromPost('newEmail');\n $email = $user->setEmail($newMail);\n $entityManager = $this->entityManager;\n $entityManager->persist($user);\n $entityManager->flush();\n \n $viewModel = new ViewModel(array(\n 'email' => $newMail,\n 'navMenu' => $this->options->getNavMenu()\n ));\n $viewModel->setTemplate('csn-user/registration/change-email-success');\n return $viewModel;\n } else {\n $message = $this->getTranslatorHelper()->translate('Your current password is not correct.');\n }\n }\n }\n \n return new ViewModel(array(\n 'form' => $form,\n 'navMenu' => $this->options->getNavMenu(),\n 'message' => $message\n ));\n }", "title": "" }, { "docid": "bbb38c3716b64acb6fce404dfa8c4433", "score": "0.69476855", "text": "public function modifyEmail($test,$user)\n\t{\n\t\t$result = $this->testUserForm($test);\n\t\t$isValid = $result[0];\n\t\t$errormessage =$result[1];\n\n\t\tif($isValid){\n\n\t\t\t//Submited data are correct.\n\t\t\t//update data in database\n\n\t\t\t$this->userManager->update([\n\t\t\t\t\t\"email\" => $test['userEmailModify'],\n\t\t\t\t],$user['id']);\n\t\t\t//maj session \n\t\t\t$this->authentificationManager->refreshUser();\n\t\t\t//redirect user\n\t\t\t$messageInfo = '<div class=\"alert alert-info\">Modification de votre adresse Email validée !</div>';\n\t\t\t$_SESSION['messageInfo'] = $messageInfo;\n\t\t\t$this->redirectToRoute('user_profile',[\"messageInfo\" => $messageInfo]);\n\t\t}else{\n\n\t\t\t$errormessage['modifyEmail'] = '<div class=\"alert alert-info\">Problème de soumission !</div>';\n\t\t\t$this->show('user/modify', [\"errormessage\" => $errormessage]);\n\t\t}\n\n\t}", "title": "" }, { "docid": "9ba7cffcfdc5fb6e405d24da28fefdb0", "score": "0.6921031", "text": "public function testDoChangeUserEmailSpecial() {\n\t\t$data = array (\n\t\t\t\t'TUser' => array (\n\t\t\t\t\t\t'USER_ID' => 'allexceedVN2',\n\t\t\t\t\t\t'USER_PASSWORD' => 'passOk',\n\t\t\t\t\t\t'MAIL_ADDRESS' => '12#,.?',\n\t\t\t\t\t\t'LANGUAGE' => '0',\n\t\t\t\t\t\t'AUTH_ROLE' => '0',\n\t\t\t\t\t\t'AUTH_DEMAND_FORECAST_EDIT' => '1'\n\t\t\t\t)\n\t\t);\n\t\t$result = $this->testAction ( '/EditUser/doChangeUser', array (\n\t\t\t\t'data' => $data,\n\t\t\t\t'method' => 'post'\n\t\t) );\n\t\tdebug ( $result );\n\t}", "title": "" }, { "docid": "f0a0521764f4deb3c85be5cae63fa383", "score": "0.6879994", "text": "public function editEmail($mail)\n\t\t{\n\t\t\tglobal $email;\n\t\t\tglobal $user_id;\n\t\t\n\t\t\t$mail = addslashes($mail);\n\n\t\t\tif(strlen($mail) <= 120)\n\t\t\t{\n\t\t\t$qry = 'UPDATE admin_table SET email = \"' . $mail;\n\t\t\t$result = mysql_query($qry, $GLOBALS['connection']);\n\t\t\t}\n\t\t\n\t\t\t$email = $mail;\n\t\t}", "title": "" }, { "docid": "1aee38bb0aadce91ddac018cbdea64b9", "score": "0.68606526", "text": "public function change_email() {\n if($_SESSION['user']->set_email($this->email)) {\n return true;\n } else {\n // An error occured updating the email address, return false\n return false;\n }\n }", "title": "" }, { "docid": "f760125641d00c30df534bf48700dcfc", "score": "0.68277174", "text": "public function post_edit() {\n //try to edit the user\n if (AuxUser::editUser()) {\n //if the edit process worked, redirect to the profile page\n echo '<script>alert(\"User data edited\");</script>';\n Response::redirect('/profile');\n } else {\n //if not, print the error message\n echo '<script>alert(\"No data was updated, Please confirm that you change at least one field\");</script>';\n Response::redirect('/user/edit', 'refresh');\n }\n }", "title": "" }, { "docid": "1fedcd1705471b0de548bd02fb6699c7", "score": "0.67712086", "text": "public function _edit_user_submit()\n\t{\n\t\t$this->post_data = Event::$data;\t\t\n\t}", "title": "" }, { "docid": "97d649373cfc72cf7aca7d41212abc5e", "score": "0.673435", "text": "public function saveEmail()\n {\n $this->validate([\n 'email' => [\n 'sometimes',\n 'required',\n 'email',\n Rule::unique(shopper_table('users'), 'email')->ignore($this->customer_id),\n ],\n ]);\n\n $this->updateValue(\n 'email',\n $this->email,\n 'Customer Email address updated successfully.'\n );\n\n $this->emailUpdate = false;\n $this->emit('profileUpdate');\n }", "title": "" }, { "docid": "7466f0df5a6054aad5cf7d3779b0ba42", "score": "0.67228734", "text": "public function modify()\n\t{\n\t\t\n\t\t$errormessage = [];\n\t\t$user = $this->getUser();\n\t\t\n\n\n\t\tif(!empty($_POST)) {\n\n\t\t\tif(isset($_POST['userEmailModify'])){\n\t\t\t\t$test['userEmailModify'] = $_POST['userEmailModify'];\n\t\t\t\t$test['userPasswordConfirme'] = $_POST['userPasswordConfirme'];\n\t\t\t\t$test['userEmail'] = $user['email']; //we need to pass user email to check if couple email/password exist\n\n\t\t\t\t$this->modifyEmail($test,$user);\n\n\t\t\t}\n\t\t\tif(isset($_POST['userFirstName'])){\n\t\t\t\t$test['first_name'] = $_POST['userFirstName'];\n\t\t\t\t$test['last_name'] = $_POST['userLastName'];\n\n\t\t\t\t$this->modifyUserInfo($test,$user);\n\n\t\t\t}\n\n\t\t\tif(isset($_POST['userNewPassword'])){\t\t\t\n\n\t\t\t\t$test['userPasswordModify'] = $_POST['userPasswordModify'];\n\t\t\t\t$test['userNewPassword'] = $_POST['userNewPassword'];\n\t\t\t\t$test['userEmail'] = $user['email']; //we need to pass user email to check if couple email/password exist\n\n\t\t\t\t$this->modifyPassword($test,$user);\n\t\t\t}\n\n\n\t\t}\n\t\t//Display user/modify with userData\n\t\t$this->show('user/modify', [\n\t\t\t\t'errormessage' => $errormessage, \n\t\t\t\t'userData' => $user\n\t\t\t\t]);\n\t}", "title": "" }, { "docid": "0f4a14b313de4fc15c2d564d0b516bee", "score": "0.66605705", "text": "public function editaccount()\n {\n $this->autoRender = false; /* NO VIEW */\n\n if ($this->request->is('post')) { /* IF REQUEST IS POST */\n\n $id = $this->request->session()->read('Auth.User.id'); /* USER ID */\n\n /* POSTS DATA */\n $username = $this->request->data['username'];\n $mail = $this->request->data['mail'];\n\n /* IF USERNAME OK */\n if(isset($username) && strlen($username)>2){\n\n /* EDIT USERNAME */\n $usersTable = TableRegistry::get('Users');\n $user = $usersTable->get($id);\n $user->username = $username;\n $usersTable->save($user);\n $this->request->session()->write([\n 'Auth.User.username' => $username\n ]);\n $this->Flash->success('Username updated.');\n\n /* IF MAIL OK */\n if(isset($mail) && filter_var($mail, FILTER_VALIDATE_EMAIL)){\n\n /* EDIT USERNAME */\n $user = $usersTable->get($id);\n $user->mail = $mail;\n $usersTable->save($user);\n $this->request->session()->write([\n 'Auth.User.mail' => $mail\n ]);\n $this->Flash->success('Mail updated.');\n return $this->redirect(\n ['controller' => 'Settings', 'action' => 'index']\n );\n }else{\n $this->Flash->error('Mail incorrect, try again.');\n return $this->redirect(\n ['controller' => 'Settings', 'action' => 'index']\n );\n }\n }else{\n $this->Flash->error('Username or mail incorrect, try again.');\n return $this->redirect(\n ['controller' => 'Settings', 'action' => 'index']\n );\n }\n }\n }", "title": "" }, { "docid": "1b6c14630ddfe97d0610ce05b2ff6fc6", "score": "0.6655948", "text": "public function editProfile() {\n\t\t$message = \"\";\n\t\tif($this->wire(\"input\")->post->submit) {\n\t\t\t$user = $this->wire(\"user\");\n\t\t\t$email = $this->wire(\"input\")->post->email;\n\t\t\t$pass = $this->wire(\"input\")->post->password;\n\t\t\t$_pass = $this->wire(\"input\")->post->_password;\n\t\t\t$u = $this->wire(\"pages\")->get(\"template=user, name={$user->name}\");\n\n\t\t\tif($this->wire(\"input\")->post->hidden_profile_image) {\n\t\t\t\t$this->uploadBase64Image($u, $base64String);\n\t\t\t} else {\n\t\t\t\t$this->uploadWUImage($u, 'profile_image');\n\t\t\t}\n\n\t\t\tif(isset($email) && $email != $this->wire(\"sanitizer\")->email($email)) {\n\t\t\t\t$error = \"Email is not valid.\";\n\t\t\t\treturn $error;\n\t\t\t}\n\n\t\t\tif(isset($pass) && $pass != $_pass) {\n\t\t\t\t$error = \"Passwords don't match.\";\n\t\t\t\treturn $error;\n\t\t\t}\n\n\t\t\t$u->of(false);\n\t\t\tif(isset($email)) {\n\t\t\t\t$u->email = $this->wire(\"sanitizer\")->email($email);\n\t\t\t}\n\t\t\tif(isset($pass)){\n\t\t\t\t$u->pass = $pass;\n\t\t\t}\n\t\t\t$u->save();\n\t\t\t$message = \"Changes Saved\";\n\t\t}\n\t\treturn $message;\n\t}", "title": "" }, { "docid": "d245a274419ee0d9c4720a933eac373d", "score": "0.6655427", "text": "function osc_change_user_email_url() {\n if ( osc_rewrite_enabled() ) {\n return osc_base_url() . osc_get_preference('rewrite_user_change_email');\n } else {\n return osc_base_url(true) . '?page=user&action=change_email';\n }\n }", "title": "" }, { "docid": "7767f9e8cf1eaac7f666314e9a619220", "score": "0.6633286", "text": "public function updateEmail_post(){\n\t\textract($_POST);\n\t\t$result = $this->settings_model->updateEmail($admin_email);\n\t\treturn $this->response($result);\t\t\t\n\t}", "title": "" }, { "docid": "b53bc62bd9314ef53b759f5249a9b353", "score": "0.66329384", "text": "public function editAccountChangeEmailButton()\n {\n $this->init();\n\n if (true === $this->useOauth) {\n global $rundizoauth_options;\n\n $Loader = new \\RundizOauth\\App\\Libraries\\Loader();\n $Loader->loadTemplate('okv-oauth/partials/editAccountChangeEmailButton_v', ['rundizoauth_options' => $rundizoauth_options]);\n unset($Loader);\n }\n }", "title": "" }, { "docid": "ef443392a177d20e7d027a883eaa2dba", "score": "0.662764", "text": "function editInfo($user) {\n\n if (isset ($_POST ['submit'])) {\n $newUsername = trim(strip_tags($_POST['username']));\n $newFirstName = trim(strip_tags($_POST['firstname']));\n $newLastName = trim(strip_tags($_POST['lastname']));\n $newEmail = trim(strip_tags($_POST['email']));\n\n if(!empty($_POST['username']) AND !empty($_POST['email']) AND !empty($_POST['firstname'] AND !empty($_POST['lastname']))) {\n\n if(strlen($newUsername) <= 100 && strlen($newFirstName) <= 100 && strlen($newLastName) <= 100) {\n\n if (filter_var($newEmail, FILTER_VALIDATE_EMAIL)){\n\n $bdd = dbConnect();\n $reqmail = $bdd->prepare(\"SELECT * FROM user WHERE email = ?\");\n $reqmail->execute(array($newEmail));\n\n if ($reqmail->rowCount() > 0){\n $result = $reqmail->fetch(PDO::FETCH_ASSOC);\n if ($result['username'] == $user) // We can replace its old mail with the same one\n $mailexist = 0;\n else\n $mailexist = 1;\n }\n\n $requsername = $bdd->prepare(\"SELECT * FROM user WHERE username = ?\");\n $requsername->execute(array($newUsername));\n\n if ($requsername->rowCount() > 0){\n $result = $requsername->fetch(PDO::FETCH_ASSOC);\n if ($result['username'] == $user) // We can replace its old username with the same one\n $usernameexist = 0;\n else\n $usernameexist = 1;\n }\n\n if($mailexist == 0) {\n if($usernameexist == 0) {\n try {\n $stmt = $bdd->prepare(\"UPDATE user SET username=:newUsername, first_name=:newFirstName, last_name=:newLastName, email=:newEmail WHERE username=:username\");\n $stmt->execute(array(\n 'newUsername' => $newUsername,\n 'newFirstName' => $newFirstName,\n 'newLastName' => $newLastName,\n 'newEmail' => $newEmail,\n 'username' => $user\n ));\n $_SESSION['username'] = $newUsername;\n }\n catch(PDOException $e) {\n echo $sql . \"<br>\" . $e->getMessage();\n }\n return 0;\n\n } else\n return -3; // Username already used\n } else\n return -2; // Mail already used\n }\n }\n }\n }\n\n return -1;\n\n }", "title": "" }, { "docid": "2b480bd27cd41aad6bd391273398d164", "score": "0.6614143", "text": "public function edit(Email $email)\n {\n //\n }", "title": "" }, { "docid": "2393cba9e38c6f2118faaa0c5eb7e7a4", "score": "0.6608655", "text": "function user_updateEmail($newEmail, $user=0){\n //this process will be used to update a users email address...\n global $db,$dashboard_message;\n\n //process request to update users email\n if ($user === 0){\n $user = $_SESSION[\"personID\"];\n }\n\n $query = \"UPDATE users\n SET emailAddress = ?\n WHERE userID = ?\";\n\n $stmnt = $db -> prepare($query);\n $stmnt -> bind_param(\"si\", $newEmail, $user);\n //execute and error messages/success messages\n if(!$stmnt -> execute()){\n $dashboard_message = \"<p class='alert alert-danger'>Your email has not updated.</p>\";\n }else{\n $dashboard_message = \"<p class ='alert alert-success'>Your email address has been updated.</p>\";\n }\n //we dont want this being run when an admin changes emailAddress's\n if($user === $_SESSION[\"personID\"]){\n //requery db and get the new emailAddress and put that into the email session global.\n $query = \"SELECT emailAddress FROM users WHERE userID = ?\";\n $stmnt = $db -> prepare($query);\n $stmnt -> bind_param(\"i\", $_SESSION[\"personID\"]);\n $stmnt -> execute();\n $result = $stmnt -> get_result();\n $data = $result -> fetch_assoc();\n $_SESSION[\"Email\"] = $data[\"emailAddress\"];\n }\n}", "title": "" }, { "docid": "4e93d5f04034a5d2fc8fc5d415e07379", "score": "0.65886146", "text": "function webform_confirm_email_confirmation_email_edit($node, $email = array()) {\n\n $form_state = array(\n 'build_info' => array(\n 'args' => array(\n $node,\n $email,\n ),\n ),\n 'submit_handlers' => array(\n 'webform_email_edit_form_submit',\n '_webform_confirm_email_edit_confirmation_email_submit',\n ),\n );\n $form = drupal_build_form(\n 'webform_email_edit_form',\n $form_state\n );\n\n $form['#theme'] = array('webform_email_edit_form');\n\n return $form;\n}", "title": "" }, { "docid": "ff791582c7b8897ef75637b4d441d7c5", "score": "0.65860337", "text": "public static function fp_rac_edit_mail_update_data() {\n\n check_ajax_referer('update-guest-email', 'rac_security');\n if (isset($_POST['id']) && $_POST['email']) {\n $row_id = $_POST['id'];\n $email_value = $_POST['email'];\n $cart_details = maybe_unserialize(get_post_meta($row_id, 'rac_cart_details', true));\n $cart_details[\"visitor_mail\"] = $email_value;\n $details = maybe_serialize($cart_details);\n update_post_meta($row_id, 'rac_cart_details', $details);\n }\n exit();\n }", "title": "" }, { "docid": "5f51e83ae67048a6329822e74fa03811", "score": "0.6569489", "text": "function edit(){\n\t \tif(!$this->secure->isAdmin()) {\n\t\t\t$this->secure->noAdminRedirect();\n\t\t\treturn;\n\t\t}\n\t\t//Begin function\n\t\t$data['user'] \t\t\t\t\t\t= null;\n\t\t$data['error']['email'] \t\t= '';\n\t\t$data['error']['password'] \t\t= '';\n\t\t\n\t\tif($this->uri->segment(3)) {\n\t\t\t$this->load->model('users');\n\t\t\t$data['user'] = $this->users->getUserByUsername($this->uri->segment(3));\n\n\t\t\tif(isset($_POST['edit_submit']) && $data['user'] != null) {\n\t\t\t\t$this->load->model('validate');\n\t\t\t\t$data['user']['email'] = $_POST['email'];\n\n\t\t\t\t//validate email\n\t\t\t\tif(!$this->validate->email($_POST['email'], $data['user']['username']))\n\t\t\t\t\t$data['error']['email'] = $this->validate->getErrors();\n\n\t\t\t\t//validate password\n\t\t\t\tif(strlen($_POST['password']) > 0 && !$this->validate->password($_POST['password']))\n\t\t\t\t\t$data['error']['password'] = $this->validate->getErrors();\n\n\t\t\t\t//block user\n\t\t\t\tif(isset($_POST['block']))\n\t\t\t\t\t$data['user']['blocked'] = 1;\n\t\t\t\telse \n\t\t\t\t\t$data['user']['blocked'] = 0;\n\n\t\t\t\t//update user\n\t\t\t\tif($data['error']['email'] == '' && $data['error']['password'] == ''){\n\t\t\t\t\t\n\t\t\t\t\tif(strlen($_POST['password']) > 0 )\n\t\t\t\t\t\t$data['user']['password'] = $this->secure->hashPassword($_POST['password']);\n\n\t\t\t\t\t$this->users->updateUser($data['user']['username'],$data['user']['email'],$data['user']['password']);\n\t\t\t\t\t\n\t\t\t\t\tif($data['user']['blocked'] == 1)\n\t\t\t\t\t\t$this->users->blockUser($data['user']['username']);\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->users->unBlockUser($data['user']['username']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($data['user'] != null) {\n\t\t\tglobal $title; $title = \"Edit user \".$data['user']['username'];\n\t\t\t$this->load->view('adminUsersEdit', $data);\n\t\t} else {\n\t\t\t$data['errorTitle'] = \"User does not exist\";\n\t\t\t$data['errorMessage'] = \"The user \\\"\".$this->uri->segment(3).\"\\\" does noet exist!\";\n\t\t\t$this->load->view('adminError', $data);\n\t\t}\n\n }", "title": "" }, { "docid": "2bc0d73df6f0f60a2a5ff331b480d75f", "score": "0.6556879", "text": "function updateEmail($userinfo, &$existinguser, &$status)\r\n {\r\n $db = JFusionFactory::getDatabase($this->getJname());\r\n $query = 'UPDATE #__user SET user_email ='.$db->quote($userinfo->email) .' WHERE user_id =' . $existinguser->userid;\r\n $db->setQuery($query);\r\n if (!$db->query()) {\r\n $status['error'][] = JText::_('EMAIL_UPDATE_ERROR') . $db->stderr();\r\n } else {\r\n\t $status['debug'][] = JText::_('EMAIL_UPDATE'). ': ' . $existinguser->email . ' -> ' . $userinfo->email;\r\n }\r\n }", "title": "" }, { "docid": "0305db8ea2a9ff0231db4ea872705555", "score": "0.65460086", "text": "public static function changeEmail($email, $user_id){\n\t\tif(filter_var($email, FILTER_VALIDATE_EMAIL) === false){\n\t\t return '<p class=\"text-danger light-input-bg\"><b>Niepoprawny adres email</b></p>';\n\t\t}\t\t\n\t\tif(static::findByEmail($email) == false){\n\t\t\t\n\t\t\t$sql = 'UPDATE users \n\t\t\t\tSET email = :email \n\t\t\t\tWHERE id = :user_id';\n\t\t\t$db = static::getDB();\n\t\t\t$stmt = $db->prepare($sql);\n\t\t\t$stmt->bindValue(':email', $email, PDO::PARAM_STR);\n\t\t\t$stmt->bindValue(':user_id', $user_id, PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t\treturn '<p class=\"text-success light-input-bg\"><b>Zmieniono adres email</b></p>';\n\t\t} else {\n\t\t\treturn '<p class=\"text-danger light-input-bg\"><b>Wystąpił bład przy wprowadzaniu do bazy</b></p>';\n\t\t}\n\t}", "title": "" }, { "docid": "49ea7b21bcc0f27337f316a5bc56c5f7", "score": "0.6524078", "text": "public function viewUpdateEmail()\n {\n return view('frontend.profile.update-email');\n }", "title": "" }, { "docid": "c900845ba1acb6390a034e1103e93f1c", "score": "0.65224326", "text": "public function editAction()\n {\n\t\t// get the job id\n\t\t$user_id = isset($this->_params['id']) ? $this->_params['id'] : null;\n\n\t\t// set view params\n\t\t$this->view->title = \"Edit User\";\n\t\t$this->view->edit = true;\n\n\t\t// offload all of the work\n\t\t$this->_update($user_id);\n }", "title": "" }, { "docid": "496a241770d4daf9dbcc9d68fa86ca53", "score": "0.65015584", "text": "public function UpdateEmail()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$from = trim($_POST['fromemail']);\n\t\t\t$to = trim($_POST['toemail']);\n\n\t\t\t$update = array (\n\t\t\t\t'orders' => array (\n\t\t\t\t\t'ordbillemail',\n\t\t\t\t\t'ordshipemail',\n\t\t\t\t),\n\t\t\t\t'customers' => array (\n\t\t\t\t\t'custconemail',\n\t\t\t\t),\n\t\t\t\t'subscribers' => array (\n\t\t\t\t\t'subemail',\n\t\t\t\t),\n\t\t\t);\n\t\t\t$recordsUpdated = 0;\n\n\t\t\tforeach ($update as $table => $fields) {\n\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t$updateData = array (\n\t\t\t\t\t\t$field => $to\n\t\t\t\t\t);\n\t\t\t\t\t$restriction = $field .\"='\".$GLOBALS['ISC_CLASS_DB']->Quote($from).\"'\";\n\t\t\t\t\t$GLOBALS['ISC_CLASS_DB']->UpdateQuery($table, $updateData, $restriction);\n\t\t\t\t\t$recordsUpdated += $GLOBALS['ISC_CLASS_DB']->NumAffected();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($recordsUpdated > 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedPlural'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} elseif ($recordsUpdated == 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedSingular'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} else {\n\t\t\t\t$message = GetLang('EmailCheckNoneUpdated');\n\t\t\t\t$status = MSG_ERROR;\n\t\t\t}\n\n\t\t\tFlashMessage($message, $status, 'index.php?ToDo=runAddon&addon=addon_emailchange');\n\t\t}", "title": "" }, { "docid": "172e427189c8f6c50c4e15793c57b89f", "score": "0.6493333", "text": "public function updateEmail()\n {\n $this->schol->updateEmail( $this->input->post('emp'), $this->input->post('email'));\n return redirect('/affirs/Scholarship/show/'. $this->input->post('schol'));\n\n }", "title": "" }, { "docid": "654d75e38eaa45ea09fff8a0e5152646", "score": "0.64700466", "text": "function edit_info($user_id, $username, $job_title, $phone, $address) {\n $id = $user_id['id'];\n edit($id, $username, $job_title, $phone, $address);\n set_flash_message('success', 'Пользователь с E-mail ' . $user_id['email'] . ' был успешно изменен!');\n redirect_to('edit.php?id=' . $id);\n}", "title": "" }, { "docid": "78e12e996c673ca0fc7727bff7ac11f5", "score": "0.64642584", "text": "function editEmailHandler1() {\n global $inputs;\n\n updateDb('mail', [\n 'title' => $inputs['title'],\n 'sender_id' => $inputs['sender_id'],\n 'sender' => $inputs['sender_name'],\n 'receiver_id' => $inputs['receiver_id'],\n 'receiver' => $inputs['receiver_name'],\n 'content' => $inputs['content'], \n ], [\n 'id' => $inputs['id']\n ]);\n\n formatOutput(true, 'update success');\n}", "title": "" }, { "docid": "2da1947c30b09e737fc210fc9b733a7e", "score": "0.6458246", "text": "public function actionEdit()\r\n {\r\n // Get the user ID from the session\r\n $userId = User::checkLogged();\r\n\r\n // We receive information about the user from the database\r\n $user = User::getUserById($userId);\r\n\r\n // Fill the variables for form fields\r\n $name = $user['name'];\r\n $address = $user['address'];\r\n $email = $user['email'];\r\n $mobnumber = $user['mobnumber'];\r\n $login = $user['login'];\r\n $password = $user['password'];\r\n\r\n \r\n $result = false;\r\n\r\n // Form processing\r\n if (isset($_POST['submit'])) {\r\n // Get the data from the edit form\r\n $name = $_POST['name'];\r\n $address = $_POST['address'];\r\n $email = $_POST['email'];\r\n $mobnumber = $_POST['mobnumber'];\r\n $login = $_POST['login'];\r\n $password = $_POST['password'];\r\n\r\n \r\n $errors = false;\r\n\r\n // Validate the values\r\n if (!User::checkName($name)) {\r\n $errors[] = 'The name can not be shorter than 4 characters';\r\n }\r\n if (!User::checkAddress($address)) {\r\n $errors[] = 'The Address can not be shorter than 4 characters';\r\n }\r\n if (!User::checkEmail($email)) {\r\n $errors[] = 'Invalid Email';\r\n }\r\n if (!User::checkMobNum($mobnumber)) {\r\n $errors[] = 'Mobile Number must look like (+994 51 123 45 67)';\r\n }\r\n if (!User::checkLogin($login)) {\r\n $errors[] = 'Login must not be shorter than 4 characters';\r\n }\r\n if (!User::checkPassword($password)) {\r\n $errors[] = 'Password must not be shorter than 6 characters';\r\n }\r\n\r\n if ($errors == false) {\r\n // Еif there are no errors, saves the profile changes\r\n $result = User::edit($userId, $name, $address, $email, $mobnumber, $login, $password);\r\n }\r\n }\r\n\r\n \r\n require_once(ROOT . '/views/cabinet/edit.php');\r\n return true;\r\n }", "title": "" }, { "docid": "12d95dee9170743dcd0014896f327906", "score": "0.6452691", "text": "function editInfo($user)\n{\n if (isset($_POST ['submit'])) {\n $newUsername = trim(strip_tags($_POST['username']));\n $newFirstName = trim(strip_tags($_POST['firstname']));\n $newLastName = trim(strip_tags($_POST['lastname']));\n $newEmail = trim(strip_tags($_POST['email']));\n\n if (!empty($_POST['username']) && !empty($_POST['email']) && !empty($_POST['firstname'] && !empty($_POST['lastname']))) {\n if (strlen($newUsername) <= 100 && strlen($newFirstName) <= 100 && strlen($newLastName) <= 100) {\n if (filter_var($newEmail, FILTER_VALIDATE_EMAIL)) {\n $bdd = dbConnect();\n $reqmail = $bdd->prepare(\n \"SELECT * \n FROM user \n WHERE email = ?\"\n );\n $reqmail->execute(array($newEmail));\n\n if ($reqmail->rowCount() > 0) {\n $result = $reqmail->fetch(PDO::FETCH_ASSOC);\n if ($result['username'] == $user) { // We can replace its old mail with the same one\n $mailexist = 0;\n } else {\n $mailexist = 1;\n }\n }\n\n $requsername = $bdd->prepare(\n \"SELECT * \n FROM user \n WHERE username = ?\"\n );\n $requsername->execute(array($newUsername));\n\n if ($requsername->rowCount() > 0) {\n $result = $requsername->fetch(PDO::FETCH_ASSOC);\n if ($result['username'] == $user) { // We can replace its old username with the same one\n $usernameexist = 0;\n } else {\n $usernameexist = 1;\n }\n }\n\n if ($mailexist == 0) {\n if ($usernameexist == 0) {\n try {\n $stmt = $bdd->prepare(\n \"UPDATE user \n SET username=:newUsername, first_name=:newFirstName, last_name=:newLastName, email=:newEmail \n WHERE username=:username\"\n );\n $stmt->execute(array(\n 'newUsername' => $newUsername,\n 'newFirstName' => $newFirstName,\n 'newLastName' => $newLastName,\n 'newEmail' => $newEmail,\n 'username' => $user\n ));\n $_SESSION['username'] = $newUsername;\n } catch (PDOException $e) {\n echo $e . \"<br>\" . $e->getMessage();\n }\n return 0;\n } else {\n return -3; // Username already used\n }\n } else {\n return -2; // Mail already used\n }\n }\n }\n }\n }\n\n return -1;\n}", "title": "" }, { "docid": "005501e2fa6913222bef12a0a3a20229", "score": "0.64414763", "text": "function reset_email()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Reset email\n\t\tif ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->_show_message($this->lang->line('auth_message_new_email_activated').' '.anchor('/auth/login/', 'Login'));\n\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->_show_message($this->lang->line('auth_message_new_email_failed'));\n\t\t}\n\t}", "title": "" }, { "docid": "d537bf4a247d5d790e24d5c5367451e3", "score": "0.6432573", "text": "protected function setUserEmail($value) {\r\n\r\n if(is_string($value) && strlen($value) <= 45) {\r\n\r\n $this->_userEmail = $value;\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "88a8753aa0456b7c2ee799588c4d1616", "score": "0.64266413", "text": "public function editProfile()\n {\n\n $this->name = $this->user->name;\n $this->photo = $this->user->image;\n $this->email = $this->user->email;\n\n $this->dispatchBrowserEvent(\n 'openModalProfile'\n );\n\n }", "title": "" }, { "docid": "48481d482f3743c869e0a9a35ec5dce1", "score": "0.64237416", "text": "function webform_confirm_email_confirmation_request_email_edit($node, $email = array()) {\n $form_id = 'webform_email_edit_form';\n\n $form_state = array(\n 'build_info' => array(\n 'args' => array(\n $node,\n $email,\n ),\n ),\n 'submit_handlers' => array(\n 'webform_email_edit_form_submit',\n '_webform_confirm_email_edit_confirmation_request_email_submit',\n ),\n );\n $form_state += form_state_defaults();\n if (!isset($form_state['input'])) {\n $form_state['input'] = $form_state['method'] == 'get' ? $_GET : $_POST;\n }\n\n $form = drupal_retrieve_form($form_id, $form_state);\n\n // ********* add the redirect URL form field ************\n $redirect_url = NULL;\n if (!empty($email['eid'])) {\n $redirect_url = db_query(\n 'SELECT redirect_url '.\n ' FROM {webform_confirm_email} ' .\n ' WHERE nid = :nid ' .\n ' AND eid = :eid ' ,\n array(\n ':nid' => $node->nid,\n ':eid' => $email['eid'],\n )\n )->fetchField();\n }\n\n $form['redirect_url_option'] = array(\n '#type' => 'radios',\n '#title' => t('Set the redirect URL'),\n '#description' => t('Choose between default and custom redirect URL'),\n '#default_value' => $redirect_url ? 'custom' : 'default',\n );\n\n $form['redirect_url_option']['#options']['default'] = t('Default redirect URL from the webform: %value', array('%value' => $node->webform['redirect_url']));\n\n $form['redirect_url_option']['#options']['custom'] = t('Custom redirect URL');\n $form['redirect_url_custom'] = array(\n '#type' => 'textfield',\n '#size' => 40,\n '#default_value' => $redirect_url ? $redirect_url : NULL,\n );\n drupal_prepare_form($form_id, $form, $form_state);\n drupal_process_form($form_id, $form, $form_state);\n\n $form['redirect_url_custom']['#attributes']['class'][] = 'webform-set-active';\n $form['redirect_url_custom']['#theme_wrappers'] = array();\n\n $form['redirect_url_option']['custom']['#theme_wrappers'] = array('webform_inline_radio');\n $form['redirect_url_option']['custom']['#title'] = t('!title: !field', array('!title' => $form['redirect_url_option']['custom']['#title'], '!field' => drupal_render($form['redirect_url_custom'])));\n\n return $form;\n}", "title": "" }, { "docid": "b2a14fee2b60cb5a4b7c70bfb4cac645", "score": "0.6417319", "text": "function setEmail($value);", "title": "" }, { "docid": "14d66ea73cec4ebb1ba3b154fee3f8c7", "score": "0.64168715", "text": "public function updateEmail($email)\r\n\t{\r\n\t\tglobal $mysqli,$db_table_prefix;\r\n\t\t$this->email = $email;\r\n\t\t$stmt = $mysqli->prepare(\"UPDATE \".$db_table_prefix.\"users\r\n\t\t\tSET \r\n\t\t\temail = ?\r\n\t\t\tWHERE\r\n\t\t\tid = ?\");\r\n\t\t$stmt->bind_param(\"si\", $email, $this->user_id);\r\n\t\t$stmt->execute();\r\n\t\t$stmt->close();\t\r\n\t}", "title": "" }, { "docid": "52515a7a3f09d858a3ab5949afe98f98", "score": "0.64094955", "text": "public function actionEdit(){\n\t$identity = Identity::model()->findByAttributes(array('user_id'=>Yii::app()->user->id));\n\t\n\t$newPassword = new ChangePasswordForm;\n\t\n\tif($this->request->isPostRequest){\n\t \n\t if($identity->identity !== $_POST['Identity']['identity']){\n\t\t$newEmail = $_POST['Identity']['identity'];\n\t\t$storedIdentity = clone $identity;\n\t\t$identity->identity = $newEmail;\n\t }\n\t\n\t $newPassword->attributes = $_POST['ChangePasswordForm'];\n\t \n\t $isFormValid = $newPassword->validate();\n\t \n\t if($isFormValid && $newEmail){\n\t\t$isFormValid = $identity->validate();\n\t }\n\t \n\t if($isFormValid && isset($newEmail)){\n\t\t$identity->status = Identity::STATUS_NEED_CONFIRMATION;\n\t\t$identity->isNewRecord = true;\n\t\t$identity->id = null;\n\t\t$identity->save();\n\t\t\n\t\t$confirmation = $identity->startConfirmation(IdentityConfirmation::TYPE_EMAIL_REPLACE_CONFIRMATION);\n\n\t\t$activationUrl = $this->createAbsoluteUrl($this->module->confirmationUrl, array('key'=>$confirmation->key));\n\t\n\t\t$email = new YiiMailer('changeEmail', $data = array(\n\t\t 'activationUrl' => $activationUrl,\n\t\t 'description' => $description = 'Email change confirmation'\n\t\t));\n\t\t$email->setSubject($description);\n\t\t$email->setTo($identity->identity);\n\t\t$email->setFrom(Yii::app()->params['noreplyAddress'], Yii::app()->name, FALSE);\n\n\t\tYii::log('Sendign email change confirmation to ' . $identity->identity . ' with data: ' . var_export($data, true));\n\t\t\n\t\t// @TODO: catch mailing exceptions here, to give user right messages\n\t\tif($email->send())\n\t\t Yii::log('Ok');\n\t\telse{\n\t\t Yii::log('Failed');\n\t\t throw new CException('Failed to send the email');\n\t\t}\n\t\t\n\t\tYii::app()->user->setFlash('info', 'Your new email will be applied after confirmation. Please, check this email address ' . $newEmail . '. You should get confirmation mail there.');\n\t }\n\t \n\t if($isFormValid){\n\t\t$user = $identity->userAccount;\n\t\t\n\t\tif($newPassword->password && !$user->passwordEquals($newPassword->password)){\n\t\t $user->setPassword($newPassword->password);\n\t\t $user->save();\n\t\t \n\t\t Yii::app()->user->setFlash('success', 'Password has been changed successfully');\n\t\t}\n\t }\n\t \n\t if($isFormValid){\n\t\t$this->redirect($this->module->afterIdentityEditedUrl);\n\t }\n\t}\n\t\n\t$this->render('edit', array('identity'=>$identity, 'newPassword'=>$newPassword));\n }", "title": "" }, { "docid": "a6c29f89c31621719a49913d70cf7497", "score": "0.64051664", "text": "function edit($id)\n { \n if (!$this->session->userdata('admin_logged')){ redirect('admin/login');} \n // check if the email exists before trying to edit it\n $data['email'] = $this->Email_model->get_email($id);\n \n if(isset($data['email']['id']))\n {\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n\t\t\t\t\t'email_acc' => $this->input->post('email_acc'),\n\t\t\t\t\t'created_date' => $this->input->post('created_date'),\n );\n\n $this->Email_model->update_email($id,$params); \n redirect('email/index');\n }\n else\n {\n $data['_view'] = 'email/edit';\n $this->load->view('layouts/main',$data);\n }\n }\n else\n show_error('The email you are trying to edit does not exist.');\n }", "title": "" }, { "docid": "983f36af9155f79bcea0b18bb94788cf", "score": "0.6392777", "text": "function editUserForm($uid){\n}", "title": "" }, { "docid": "66f0502df651e6f879bd1fda0a2ea4ef", "score": "0.6389091", "text": "public function editUser()\n {\n // getting all informations of current user\n $currentUser = $this->userModel->getCurrentUser();\n\n // TODO : Mettre à jour l'utilisateur\n\n require APP . 'view/_templates/header.php';\n require APP . 'view/user/edit.php';\n require APP . 'view/_templates/footer.php';\n\n // TODO : gérer les éventuelles erreurs\n\n\n }", "title": "" }, { "docid": "2bd2426e80c82098a9d65d4c0b560fc5", "score": "0.6386319", "text": "function edit()\n\t{\n\t\t// Find the logged-in client details\n\t\t$userId = $this->Auth->user('id');\n\t\t$user = $this->User->findById($userId);\n\n\t\t// Save the POSTed data\n\t\tif (!empty($this->data)) {\n\t\t\t$this->data['User']['id'] = $userId;\n\t\t\tif ($this->User->save($this->data)) {\n\t\t\t\t$this->Session->setFlash(__('Profile has been updated', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Profile could not be saved. Please, try again.', true));\n\t\t\t}\n\t\t} else {\n\t\t\t// Set the form data (display prefilled data) \n\t\t\t$this->data = $user;\n\t\t}\n\n\t\t// Set the view variable\n\t\t$this->set(compact('user'));\n\t}", "title": "" }, { "docid": "72999b1436a90cf75b4ee0fd059da652", "score": "0.6381209", "text": "protected function _edit_submit($user)\n {\n\n $type = $this->input->post('_type');\n if (!$type) return;\n\n $data = $this->_edit_get_inputs($type,$user);\n $can_confirm = false;\n $email = $user->email;\n /* if ($data['name'] != $user->name ) {\n $can_confirm = true;\n }\n\n\n if ($user->can_edit_email && $email != $this->input->post('email_edit')) {\n $can_confirm = true;\n $email = $this->input->post('email_edit');\n $data['email'] = $email;\n $data['edit_email'] = '1';\n $data['password'] = mod('user')->encode_password($this->input->post('password_old'), $email);\n }\n\n if ($user->can_edit_username && $user->username != $this->input->post('username_edit')) {\n $can_confirm = true;\n $username = $this->input->post('username_edit');\n $data['username'] = $username;\n $data['edit_username'] = '1';\n }\n if ($user->can_edit_phone && $user->phone != $this->input->post('phone_edit')) {\n $can_confirm = true;\n $phone = $this->input->post('phone_edit');\n $data['phone'] = $phone;\n $data['edit_phone'] = '1';\n }\n\n //neu dang ky tai khoan bang sms va chua cap nhat email lan nao\n if ($password = $this->input->post('password')) {\n $can_confirm = true;\n $data['password'] = mod('user')->encode_password($password, $email);\n }*/\n // thong tin khac\n /* if($data['birthday']){\n\n $birthday =explode('-',$data['birthday']);\n $data['birthday_year'] =$birthday[2];\n }*/\n\n $user_security_type = setting_get('config-user_security_user_edit');\n if (in_array($user_security_type, config('types', 'mod/user_security')) && $can_confirm) {\n t('session')->set_userdata('user_edit', $data);\n\n mod('user_security')->send('user_edit');\n\n return $this->_url('edit_confirm');\n } else {\n // Cap nhat vao data\n if($type != 'password')\n model('user')->update($user->id, $data);\n else{\n $data_passs['password'] = mod('user')->encode_password($data['password'], $email);\n model('user')->update($user->id, $data_passs);\n\n }\n\n set_message(lang('notice_update_success'));\n\n return $this->_url();\n }\n\n }", "title": "" }, { "docid": "3ecb027ab4e28ec611d6a6b03c24b017", "score": "0.6367396", "text": "function procEditAccount(){\n global $session, $form;\n\t $_SESSION['current_dialog'] = '#accountDialog';\n /* Account edit attempt */\n $retval = $session->editAccount($_POST['email'], $_POST['name'], $_POST['school'], $_POST['postcode'], $_POST['send_email_newsletter']);\n /* Account edit successful */\n if($retval){\n $_SESSION['useredit'] = true;\n //echo \"success\";\n header(\"Location: account.php\");\n }\n /* Error found with form */\n else{\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n if ($_SESSION['error_array']['email']) $location=\"account.php?error=\".base64_encode($_SESSION['error_array']['email']);\n header(\"Location: \".$location);\n }\n }", "title": "" }, { "docid": "e82f47c313033d733a24f5a1d6055a7d", "score": "0.636247", "text": "public function processUpdateEmailAction(Request $request)\r\n {\r\n if ($request->getMethod() != 'POST')\r\n return $this->redirect($this->generateUrl('fsb_accounts_updateemail'), 301);\r\n\r\n # Get New Email Address\r\n $email = $request->request->get('email');\r\n\r\n # Various determine as much as possible if is an email address\r\n if (trim($email)=='' or $email == '' or $email ==null or $email == false or !strstr($email, '@') or !filter_var($email, FILTER_VALIDATE_EMAIL))\r\n {\r\n $msg = '<h3>Email Address not valid.</h3>\r\n <p>\"'.$email.'\"</p>\r\n <p>If you think this is a mistake please contact our Helpdesk.</p>';\r\n return $this->flashRedirect('fsb_accounts_updateemail', $msg, 'danger');\r\n }\r\n\r\n\t\t# Update on API's \r\n\t\t$request->attributes->set('endpoint', 'update-email');\r\n\t\t$request->attributes->set('_route_params', array('endpoint' => 'update-email'));\t\t$path = $request->attributes->all();\r\n \t$response = $this->forward('App\\Controller\\InstantStoreAPIController::indexAction', $path, array('email' => trim($email)));\r\n\t\t$result = json_decode($response->getContent());\r\n \t\tif($result->status == \"error\"){\r\n\t\t\t$msg = \"<p>\".$result->data.\"</p>\"; \r\n\t\t\treturn $this->flashRedirect('fsb_accounts_updateemail', $msg, 'danger');\r\n\t\t}else if($result->status == \"success\"){\r\n\t\t\t# Update Users Account\r\n\t\t\t$account = $this->getUser();\r\n\t\t\t$old_email = $account->getEmail();\r\n\t\t\t$account->setEmail(trim($email));\r\n\r\n\t\t\t# Update Email on Mailchimp\r\n\t\t\t$list = new MailingList();\r\n\t\t\t$res = $list->emailupdate( $old_email, $email );\r\n\t\t\t\r\n\t\t\t# Commit to Database\r\n\t\t\t$em = $this->getDoctrine()->getManager();\r\n\t\t\t$em->persist($account);\r\n\t\t\t$em->flush();\r\n\r\n\t\t\treturn $this->flashRedirect('fsb_accounts_updateemail', 'Email updated successfully.', 'success');\r\n\t\t}else{\r\n\t\t\treturn $this->flashRedirect('fsb_accounts_updateemail', 'Something went wrong. Please try again later.', 'danger');\r\n\t\t}\r\n }", "title": "" }, { "docid": "1d2377fb6cf047a500f156158098c527", "score": "0.63618064", "text": "public function changeEmail(string $user, string $email): Response {\n return $this->post(Context::Admin, \"/CMD_API_MODIFY_USER\", [\n \"action\" => \"single\",\n \"email\" => \"Save\",\n \"user\" => $user,\n \"evalue\" => $email,\n ]);\n }", "title": "" }, { "docid": "0507490f4e477603160a0bc552c7226b", "score": "0.636077", "text": "public function actionEdit() {\n\n\t\t$userId = User::checkLogged();\n\t\t$user = User::getUserById($userId);\n\t\t$first_name = $user['first_name'];\n\t\t$last_name = $user['last_name'];\n\t\t$result = false;\n\n\t\tif (isset($_POST['submit'])) {\n\t\t\t$first_name = $_POST['first_name'];\n\t\t\t$last_name = $_POST['last_name'];\n\n\t\t\t$errors = array();\n\n\t\t\tif ($error = Validator::checkName($first_name)) $errors['first_name'] = $error;\n\t\t\tif ($error = Validator::checkName($last_name)) $errors['last_name'] = $error;\n\n\t\t\tif (empty($errors)) {\n\t\t\t\t$result = User::edit($userId, $first_name, $last_name);\n\t\t\t}\n\t\t}\n\t\t$pageTitle = \"Edit Details\";\n\t\trequire_once(ROOT . '/views/account/edit.php');\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "13336e82e850df58ab5a777096ff6360", "score": "0.6340566", "text": "public function change_email_settings($request)\n {\n $this->set('client_info', 'email', $_SESSION['settings_post']['new_mail']);\n $data = json_decode($_SESSION['user']->data, true);\n $data['client_info']['email'] = $_SESSION['settings_post']['new_mail'];\n $_SESSION['user']->data = json_encode($data);\n echo throw_alert($this->lang->fromFile('alert', 'success'), 'Email byl úspěšně změněn, budete <b><strong>odhlášen</b></strong>!', 'success');\n @session_destroy();\n return redirect_to('/', 5);\n }", "title": "" }, { "docid": "b823a17ee13e4fdb2e9fbf868e2754b5", "score": "0.63405305", "text": "public function editUserInfo()\n {\n $this->checkPermissions();\n\n $id = $_POST['id'];\n if ($this->userOps->editUserData($id)) {\n $this->flash->success('User info updated.');\n } else {\n $this->flash->error('Failed to update user info.');\n }\n\n header('Location: /');\n exit;\n }", "title": "" }, { "docid": "1f1357561c7675591bbe694a1dc23391", "score": "0.633603", "text": "function update_email_user($id, $email) {\r\n\t$bdd = get_bdd();\r\n\t$reponse = $bdd->prepare('UPDATE user SET emailUser = :email\r\n\t\tWHERE idUser = :id');\r\n\t$erreur = $reponse->execute(array(\r\n\t\t'id' => $id,\r\n\t\t'email' => $email\r\n\t));\r\n\r\n\treturn $erreur;\r\n}", "title": "" }, { "docid": "0ea774fcd4f820d8230321c197063222", "score": "0.63308376", "text": "function user_edit($user_info)\n {\n }", "title": "" }, { "docid": "fff8cc702c10b972528c51255702b190", "score": "0.6324808", "text": "public function actionEdit() {\n $user = \\app\\models\\User::findByPk(WebApp::get()->user()->id)->setAction('user-edit');\n if (isset($_POST['save'])) {\n $user->setAttributes($_POST['User']);\n if ($user->save()) {\n WebApp::get()->user()->name = $user->name;\n Messages::get()->success(\"Profile saved!\");\n $this->getRequest()->goToPage('user', 'profile');\n }\n }\n $this->assign('model', $user);\n }", "title": "" }, { "docid": "6d60a5b6847598690012843640ad6111", "score": "0.6320569", "text": "function edit()\r\n{\r\n global $db, $errors, $id, $username, $email, $status, $user_type;\r\n\r\n // receive all input values from the form.\r\n $id = mysqli_real_escape_string($db, $_POST['id']);\r\n $username = mysqli_real_escape_string($db, $_POST['username']);\r\n $status = mysqli_real_escape_string($db, $_POST['status']);\r\n $email = mysqli_real_escape_string($db, $_POST['email']);\r\n $user_type = mysqli_real_escape_string($db, $_POST['user_type']);\r\n\r\n // form validation: ensure that the form is correctly filled\r\n if (empty($username)) {\r\n array_push($errors, \"Username is required\");\r\n }\r\n if (empty($email)) {\r\n array_push($errors, \"Email is required\");\r\n }\r\n\r\n\r\n // register user if there are no errors in the form\r\n if (count($errors) == 0) {\r\n\r\n $insert = mysqli_query($db, \"UPDATE users SET username='$username',\r\n email='$email', user_type='$user_type', status='$status' WHERE id='$id'\")\r\n or die(mysqli_error($db));\r\n\r\n if ($insert) {\r\n $_SESSION['success'] = \"User $username was edited successfully!\";\r\n header(\"location: all_users.php\");\r\n } else {\r\n echo 'Edit failed';\r\n }\r\n }\r\n}", "title": "" }, { "docid": "4cc4d1838fa8d1d244232901a94c1ffe", "score": "0.63115335", "text": "function updateUser(&$user)\n\t{\n\t\tif ( !$user->isAnon() ) \n\t\t{\n\t\t\t// force email address to <username>@umich.edu\n\t\t\t$email = strtolower($user->getName()).\"@umich.edu\";\n\t\t\tif ( $email != $user->getEmail() )\n\t\t\t{\n\t\t\t\t$user->setEmail($email);\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "a29243e1d134b9b8ded4d56bb8e71ab8", "score": "0.6311476", "text": "public function setTestUserEmail()\n {\n if (Zend_Registry::get('testConfig')->email) {\n // set email of test user contact\n $testUserContact = Addressbook_Controller_Contact::getInstance()->getContactByUserId(Tinebase_Core::getUser()->getId());\n $testUserContact->email = Zend_Registry::get('testConfig')->email;\n Addressbook_Controller_Contact::getInstance()->update($testUserContact, FALSE);\n }\n }", "title": "" }, { "docid": "09ad62aef0048e352f8def011fc7e358", "score": "0.63061905", "text": "public function updateAccountAction()\n {\n try {\n $account = new UserModel();\n $account->load($_SESSION['UserID']);\n\n $account->setPhoneNumber($_POST['phone-number']);\n $account->setEmail($_POST['email']);\n\n $account->save();\n } catch (\\Exception $e) {\n error_log($e->getMessage());\n $this->redirect('errorPage');\n }\n }", "title": "" }, { "docid": "53afbbdd565ba95420ed0cc5d1043a60", "score": "0.630259", "text": "private function emailAtLogin() {}", "title": "" }, { "docid": "9faea682128288566c2bc0bce019cc03", "score": "0.6299905", "text": "function email_change($msg = \"\")\r\n\t{\r\n\t\tglobal $ibforums, $std;\r\n\r\n\t\t$txt = $ibforums->lang['ce_current'] . $this->member['email'];\r\n\r\n\t\tif ($ibforums->vars['reg_auth_type'])\r\n\t\t{\r\n\t\t\t$txt .= $ibforums->lang['ce_auth'];\r\n\t\t}\r\n\r\n\t\tif ($ibforums->vars['bot_antispam'])\r\n\t\t{\r\n\t\t\t//-----------------------------------------------\r\n\t\t\t// Set up security code\r\n\t\t\t//-----------------------------------------------\r\n\r\n\t\t\t// Get a time roughly 6 hours ago...\r\n\r\n\t\t\t$r_date = time() - (60 * 60 * 6);\r\n\r\n\t\t\t// Remove old reg requests from the DB\r\n\r\n\t\t\t$ibforums->db->exec(\r\n\t\t\t \"DELETE FROM ibf_reg_antispam\r\n\t\t\t WHERE ctime < '$r_date'\"\r\n );\r\n\r\n\t\t\t// Set a new ID for this reg request...\r\n\r\n\t\t\t$regid = md5(uniqid(microtime()));\r\n\r\n\t\t\t// Set a new 6 character numerical string\r\n\r\n\t\t\tmt_srand((double)microtime() * 1000000);\r\n\r\n\t\t\t$reg_code = mt_rand(100000, 999999);\r\n\r\n\t\t\t// Insert into the DB\r\n\r\n\t\t\t$data = [\r\n\t\t\t\t'regid' => $regid,\r\n\t\t\t\t'regcode' => $reg_code,\r\n\t\t\t\t'ip_address' => $ibforums->input['IP_ADDRESS'],\r\n\t\t\t\t'ctime' => time(),\r\n\t\t\t];\r\n\r\n\t\t\t$ibforums->db->insertRow(\"ibf_reg_antispam\", $data);\r\n\t\t}\r\n\r\n\t\t$this->output .= View::make(\"ucp.email_change\", ['txt' => $txt, 'msg' => $ibforums->lang[$msg]]);\r\n\r\n\t\tif ($ibforums->vars['bot_antispam'])\r\n\t\t{\r\n\r\n\t\t\tif ($ibforums->vars['bot_antispam'] == 'gd')\r\n\t\t\t{\r\n\t\t\t\t$this->output = str_replace(\"<!--ANTIBOT-->\",\r\n\t\t\t\t\tView::make(\"ucp.email_change_gd\", ['regid' => $regid]), $this->output);\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\t$this->output = str_replace(\"<!--ANTIBOT-->\",\r\n\t\t\t\t\tView::make(\"ucp.email_change_img\", ['regid' => $regid]), $this->output);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&amp;CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\r\n\t}", "title": "" }, { "docid": "8e7e18c34950f8b9e4dade5b33ee0b28", "score": "0.6299106", "text": "function updateEmail($id, $email) {\n\t$db = DB::getInstance();\n\t$fields=array('email'=>$email);\n\t$db->update('users',$id,$fields);\n\n\treturn true;\n}", "title": "" }, { "docid": "609b0973754c645e17d8ca5030415fa5", "score": "0.6292632", "text": "function _webform_edit_email($currfield) {\r\n $edit_fields['value'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Default value'),\r\n '#default_value' => $currfield['value'],\r\n '#description' => t('The default value of the field.') . theme('webform_token_help'),\r\n '#size' => 60,\r\n '#maxlength' => 127,\r\n '#weight' => 0,\r\n '#attributes' => ($currfield['value'] == '%useremail' && count(form_get_errors()) == 0) ? array('disabled' => TRUE) : array(),\r\n '#id' => 'email-value',\r\n );\r\n $edit_fields['user_email'] = array(\r\n '#type' => 'checkbox',\r\n '#title' => t('User email as default'),\r\n '#default_value' => $currfield['value'] == '%useremail' ? 1 : 0,\r\n '#description' => t('Set the default value of this field to the user email, if he/she is logged in.'),\r\n '#attributes' => array('onclick' => 'getElementById(\"email-value\").value = (this.checked ? \"%useremail\" : \"\"); getElementById(\"email-value\").disabled = this.checked;'),\r\n '#weight' => 0,\r\n '#element_validate' => array('_webform_edit_email_validate'),\r\n );\r\n $edit_fields['extra']['width'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Width'),\r\n '#default_value' => $currfield['extra']['width'],\r\n '#description' => t('Width of the textfield.') .' '. t('Leaving blank will use the default size.'),\r\n '#size' => 5,\r\n '#maxlength' => 10,\r\n );\r\n $edit_fields['extra']['email'] = array(\r\n '#type' => 'checkbox',\r\n '#title' => t('E-mail a submission copy'),\r\n '#return_value' => 1,\r\n '#default_value' => $currfield['extra']['email'],\r\n '#description' => t('Check this option if this component contains an e-mail address that should get a copy of the submission. Emails are sent individually so other emails will not be shown to the recipient.'),\r\n );\r\n $edit_fields['extra']['disabled'] = array(\r\n '#type' => 'checkbox',\r\n '#title' => t('Disabled'),\r\n '#return_value' => 1,\r\n '#description' => t('Make this field non-editable. Useful for setting an unchangeable default value.'),\r\n '#weight' => 3,\r\n '#default_value' => $currfield['extra']['disabled'],\r\n );\r\n return $edit_fields;\r\n}", "title": "" }, { "docid": "20a8a18b65e881bcf6b22e08a6def792", "score": "0.62789935", "text": "function editUser2($id, $fname, $lname, $email){\n $pdo = Database::getInstance()->getConnection();\n\n //TODO: Run the proper SQL query to update tbl_user with proper values\n $update_user_query = 'UPDATE tbl_user SET user_fname = :fname, user_lname = :lname, user_email =:email WHERE user_id = :id';\n $update_user_set = $pdo->prepare($update_user_query);\n $update_user_result = $update_user_set->execute(\n array(\n ':fname'=>$fname,\n ':lname'=>$lname,\n ':email'=>$email,\n ':id'=>$id\n )\n );\n\n $_SESSION['user_fname'] = $fname;\n\n\n\n // echo $update_user_set->debugDumpParams();\n // exit;\n\n //TODO: if everything goes well, redirect user to index.php\n // Otherwise, return some error message...\n if($update_user_result){\n redirect_to('./dashboard');\n }else{\n return 'Guess you got canned...';\n }\n}", "title": "" }, { "docid": "e1462ba44f0ae36daca66db0aa218118", "score": "0.6274282", "text": "abstract public function processEditUser($user, $data);", "title": "" }, { "docid": "c91fa5b51e2976b2b435d590cf6da581", "score": "0.6268441", "text": "function editUser($id, $fname, $username, $password, $email){\n $pdo = Database::getInstance()->getConnection();\n\n //TODO: Run the proper SQL query to update tbl_user with the proper values\n $update_user_query = 'UPDATE tbl_user SET user_fname = :fname, user_name = :username, user_pass = :password, user_email = :email WHERE user_id = :id';\n\n $update_user_set = $pdo->prepare($update_user_query);\n $update_user_result = $update_user_set->execute(\n array(\n ':id'=>$id,\n ':fname'=>$fname,\n ':username'=>$username,\n ':password'=>$password,\n ':email'=>$email,\n )\n );\n\n //These lines can be used for debugging:\n //echo $update_user_set->debugDumpParams();\n //exit;\n\n //TODO: if everything goes well, redirect user to index.php\n // otherwise, return some error message\n if($update_user_result){\n redirect_to('index.php');\n }else{\n return 'The user did not update';\n }\n}", "title": "" }, { "docid": "19986023ba74aeda3092706a2d84cf08", "score": "0.6259721", "text": "protected function _edit($user)\n {\n $this->_action_ajax($user->id);\n\n // Cap nhat thong tin\n if ($this->input->get('act') == 'update_image') {\n $this->_edit_update_image($user->id);\n return;\n }\n\n $form = array();\n\n //neu dang ky tai khoan bang sms va chua cap nhat email lan nao\n $user->can_edit_email = false;\n if ($user->register_sms == 1 && $user->edit_email == 0) {\n $user->can_edit_email = true;\n }\n\n /*$user->can_edit_phone = false;\n if ($user->register_sms != 1 && $user->edit_phone == 0) {\n $user->can_edit_phone = true;\n }*/\n $user->can_edit_phone = true;\n\n\n $user->can_edit_username = false;\n if (($user->register_sms == 1 || $user->register_api == 1) && $user->edit_username == 0) {\n $user->can_edit_username = true;\n }\n\n\n\n\n $form['validation']['params'] = $this->_edit_params($user);\n\n $form['submit'] = function ($params) use ($user) {\n\n return $this->_edit_submit($user);\n };\n\n $form['form'] = function () use ($user) {\n redirect($this->_url());\n page_info('title', lang('title_user_edit'));\n $this->_edit_view($user);\n $this->_display();\n\n };\n\n $this->_form($form);\n }", "title": "" }, { "docid": "408bad2d8b3c6df92b79a53d47c9097c", "score": "0.62581104", "text": "public function editUpdateAction() {\n\t\tif (! isset ( $_GET [\"id\"] )) {\n\t\t\t$_SESSION ['flashMessage'] = \"The id was not defined\";\n\t\t\t$this->redirect ( get_url ( \"users_list\" ) );\n\t\t}\n\t\tif ($_SERVER ['REQUEST_METHOD'] == \"POST\") {\n\t\t\t$id = $_GET ['id'];\n\t\t\t\n\t\t\t$name = $_POST [\"name\"];\n\t\t\t$email = $_POST [\"email\"];\n\t\t\t$role = $_POST [\"role\"];\n\t\t\t$password = $_POST [\"password\"];\n\t\t\t\n\t\t\t$em = $this->getEntityManager ();\n\t\t\t\n\t\t\t$user = $em->getRepository ( \"Main\\\\Entity\\\\User\" )->find ( $id );\n\t\t\tif (! $user) {\n\t\t\t\t$_SESSION ['flashMessage'] = \"The user does not exist\";\n\t\t\t\t$this->redirect ( get_url ( \"users_list\" ) );\n\t\t\t}\n\t\t\t\n\t\t\t$user->setName ( $name )->setEmail ( $email )->setRole ( $role );\n\t\t\tif ($password != \"\")\n\t\t\t\t$user->setPassword ( md5 ( $password ) );\n\t\t\t\n\t\t\t$em->persist ( $user );\n\t\t\t$em->flush ();\n\t\t\t\n\t\t\t$_SESSION ['flashMessage'] = \"The user was edited successfully\";\n\t\t}\n\t\t$this->redirect ( get_url ( \"users_list\" ) );\n\t}", "title": "" }, { "docid": "e1c1f9b691df48a1c98ac2b5d768ba7f", "score": "0.6257786", "text": "public function actionEdit()\n {\n $userId = User::checkLogged();\n if ($userId == true) {\n $user = User::getUserById($userId);\n } else {\n header (\"Location: /login\");\n }\n\n // Variables for the form\n $firstName = $user['first_name'];\n $lastName = $user['last_name'];\n $email = $user['email'];\n $password = md5($user['password']);\n $birth = $user['birth'];\n $company = $user['company'];\n $address = $user['address'];\n $city = $user['city'];\n $state = $user['state'];\n $postcode = $user['postcode'];\n $country = $user['country'];\n $phone = $user['phone'];\n \n $result = false;\n \n if (isset($_POST['submit'])) {\n $firstName = $_POST['firstName'];\n $lastName = $_POST['lastName'];\n $email = $_POST['email'];\n $password = md5($_POST['password']);\n $birth = $_POST['birth'];\n $company = $_POST['company'];\n $address = $_POST['address'];\n $city = $_POST['city'];\n $state = $_POST['state'];\n $postcode = $_POST['postcode'];\n $country = $_POST['country'];\n $info = $_POST['info'];\n $phone = $_POST['phone'];\n \n // Flag of errors\n $errors = false;\n\n // Validation the fields\n if (!User::checkFirstName($firstName)) {\n $errors[] = 'First name must be at least 2 characters';\n }\n if (!User::checkLastName($lastName)) {\n $errors[] = 'Last name must be at least 2 characters';\n }\n if (!User::checkEmail($email)) {\n $errors[] = 'Email is wrong';\n }\n if (!User::checkPassword($password)) {\n $errors[] = 'Password must be at least 6 characters';\n }\n if (!User::checkPhone($phone)) {\n $errors[] = 'Phone must be at least 10 characters';\n }\n \n if ($errors == false) {\n // If there are no errors\n // Registrate a new user\n $result = User::update($userId, $firstName, $lastName, $email,\n $password, $birth, $company, $address, $city, \n $state, $postcode, $country, $info, $phone);\n } \n }\n \n require_once(ROOT . '/views/cabinet/edit.php');\n return true;\n }", "title": "" }, { "docid": "3e45e3fa59808fea6c3af4ecd1758b38", "score": "0.624477", "text": "function reset_email()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Reset email\n\t\tif ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->session->set_flashdata('message',$this->lang->line('auth_message_new_email_activated'));\n\t\t\t\t\tredirect('login');\n\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->session->set_flashdata('message',$this->lang->line('auth_message_new_email_failed'));\n\t\t\t\t\tredirect('login');\n\t\t}\n\t}", "title": "" }, { "docid": "0476bb37947c8b5424f8d479c82d8d1c", "score": "0.62343836", "text": "public function edit()\n\t{\n\t\t// Initialize variables.\n\t\t$app\t= &JFactory::getApplication();\n\t\t$cid\t= JRequest::getVar('cid', array(), '', 'array');\n\n\t\t// Get the id of the user to edit.\n\t\t$userId = (int) (count($cid) ? $cid[0] : JRequest::getInt('user_id'));\n\n\t\t// Set the id for the user to edit in the session.\n\t\t$app->setUserState('com_users.edit.user.id', $userId);\n\t\t$app->setUserState('com_users.edit.user.data', null);\n\n\t\t// Redirect to the edit screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_users&view=user&layout=edit', false));\n\t}", "title": "" }, { "docid": "6212e8746c33819325125b978a571611", "score": "0.62024665", "text": "function changeUserDetail($userEmail, $firstname, $lastname, $phone){\n\n\t\tglobal $conn;\n\n\t\t$query = \"UPDATE User \n\t\tSET firstname='$firstname', lastname='$lastname', phone='$phone' \n\t\tWHERE email='\" . $userEmail . \"'\";\n\n\t\t$result = $conn->query($query);\n\n\t\tif($result != TRUE){\n\t\t\techo \"Error updating \" . $userEmail . \" details\";\n\t\t}\n\n\t}", "title": "" }, { "docid": "84333c4abb1606a4bc4318eeb89ad148", "score": "0.6192305", "text": "public function updateEmail($email, $idUser)\r\n\t{\r\n\t\t/*$sql = new Sql ( $this->dbAdapter );\r\n\t\t$consult = $this->dbAdapter->query ( \"UPDATE users SET email='$email' WHERE id='$idUser'\", Adapter::QUERY_MODE_EXECUTE );\r\n\t\t\r\n\t\t //print_r($consult); exit;\r\n\r\n\t\treturn $consult;*/\r\n\t\t$dataEmail = array(\"email\" => $email);\r\n\r\n\t\t$sql = new Sql( $this->adapter );\r\n\t\t$update = $sql->update();\r\n\t\t$update->table( 'users' );\r\n\t\t$update->set( $dataEmail );\r\n\t\t$update->where( array( 'id' => $idUser ) );\r\n\r\n\t\t$statement = $sql->prepareStatementForSqlObject( $update );\r\n\t\t$results = $statement->execute();\r\n\t\t//echo \"<pre>\"; print_r($results); exit;\r\n\t\treturn true;\r\n\r\n\t}", "title": "" }, { "docid": "aa55f73e1891e3ec560ae940431238bc", "score": "0.617239", "text": "public function edit(MassageMail $massageMail)\n {\n //\n }", "title": "" }, { "docid": "dcba904659d28f94bec2af59ba4519cf", "score": "0.617201", "text": "final public function email_change_email($email_change_email, $user, $userdata)\n {\n $email_change_email['subject'] = '<Wp id=\"EmailChange\">' . $email_change_email['subject'] . '</Wp>';\n\n return $email_change_email;\n }", "title": "" }, { "docid": "646fc36921f74d204d687e867c66b1c4", "score": "0.61706924", "text": "public function setUser_email_status($user_email_status){\n $this->user_email_status = $user_email_status;\n }", "title": "" }, { "docid": "c05bdd462fb9d4a4ffb393a77709e8d3", "score": "0.6160901", "text": "function update_member($ipn_post, $entry, $feed, $cancel)\n{\n if ($cancel) {\n return;\n }\n\n $user = get_user_by('login', $entry[1]);\n\n // check for valid user login, update member status if valid\n if (!empty($user)) {\n if ($entry['form_id'] == '7') { // Renewal form\n $user_data = get_userdata($user->ID);\n $user_name = $user_data->data->display_name;\n $user_email = $user_data->data->user_email;\n update_member_status($ipn_post, $user);\n construct_activation_email($user_name, $user_email);\n } else {\n update_member_status($ipn_post, $user);\n }\n }\n\n return;\n}", "title": "" }, { "docid": "2cc0c3a486e38ff2bfea055781b75650", "score": "0.6157035", "text": "public function actionEdit(){\r\n $user = User::model()->findByPk(Yii::app()->user->id);\r\n if(isset($_POST['User'])){\r\n $user->attributes = $_POST['User'];\r\n if($user->save()){\r\n //Yii::app()->user->setFlash('Successfully Updated the profile');\r\n //$this->redirect(Yii::app()->createUrl('user/profile'));\r\n }\r\n }\r\n $this->render('edit',array(\r\n 'model' => $user,\r\n ));\r\n }", "title": "" }, { "docid": "f8b4d1efb959b2f3a8c03532e08a72ff", "score": "0.6156504", "text": "public function edit() {\n $token = $this->require_authentication();\n $user = $token->getUser();\n require \"app/views/user/user_edit.phtml\";\n }", "title": "" }, { "docid": "ce93b83e2f86abc59b2f277e4e92369b", "score": "0.6148732", "text": "public function update_email(\n\t\tTestCase &$testCase,\n\t\tstring $email,\n\t\tstring $result = 'true',\n\t\tint $code = 200\n\t) {\n\t\t$response = $testCase->json('POST', '/api/User::UpdateEmail', [\n\t\t\t'email' => $email,\n\t\t]);\n\t\t$response->assertStatus($code);\n\t\tif ($code == 200) {\n\t\t\t$response->assertSee($result, false);\n\t\t}\n\t}", "title": "" }, { "docid": "d6f3017e5039331cde8bf20d69485c6f", "score": "0.6143996", "text": "private function editAccount()\n {\n try\n {\n global $userquery; \n\n $request = $_REQUEST;\n\n if(!userid())\n throw_error_msg(\"Please login to perform this action\");\n\n //country\n if(!isset($request['country']) || $request['country']==\"\")\n throw_error_msg(\"provide country\");\n\n //sex\n if(!isset($request['sex']) || $request['sex']==\"\")\n throw_error_msg(\"provide sex\");\n\n if(!in_array($request['sex'], array('male','female')))\n throw_error_msg(\"sex must be male/female\");\n\n //dob\n if(!isset($request['dob']) || $request['dob']==\"\")\n throw_error_msg(\"provide dob\");\n\n if(!isset($request['dob']) || $request['dob']==\"\")\n throw_error_msg(\"provide dob\");\n\n $is_valid_date = DateTime::createFromFormat('Y-m-d', $request['dob']);\n\n if(!$is_valid_date)\n throw_error_msg(\"dob must be in Y-m-d like 1990-11-18 format\");\n\n if(!isset($request['category']) || $request['category']==\"\")\n throw_error_msg(\"provide category\");\n\n $request['userid'] = userid();\n $userquery->update_user($request);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $user_info = format_users($request['userid']);\n \n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => $user_info);\n $this->response($this->json($data)); \n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "title": "" }, { "docid": "ac29cdbbc1508296c77fefeb58db94dc", "score": "0.6139732", "text": "public function executeUpdate()\n {\n \tif ($this->getRequest()->getMethod() != sfRequest::POST)\n \t {\n \t \t$this->forward404();\n\t }\n\t$this->subscriber = $this->getUser()->getSubscriber();\n\t$this->forward404Unless($this->subscriber);\n\t\n\t//Update the users password\n\t\n\tif ($this->getRequestParameter('pass1')) \n\t{\n\t\t$this->subscriber->setUserPswd($this->getRequestParameter('pass1'));\n\t}\n\t\n\t//Update the users email\n\t\n\tif ($this->getRequestParameter('user_email'))\n\t{\n\t\t$this->subscriber->SetUserEmail($this->getRequestParameter('user_email'));\n\t}\n\t\n\tif ($this->getRequestParameter('user_about'))\n\t{\n\t\t$this->subscriber->setUserAbout($this->getRequestParameter('user_about'));\n\t}\n \t$this->subscriber->save();\n \t$this->redirect('@user_profile?login='.$this->subscriber->getUserLogin());\n\n }", "title": "" }, { "docid": "14a30876e7efde684191640b0d38bd55", "score": "0.6128197", "text": "public function modificautenteAction(){\n \n $this->_logger->info('Attivato ' . __METHOD__ . ' ');\n \n \n if (!$this->getRequest()->isPost()) {\n \n $this->_helper->redirector('modificautentepage');\n \n }\n \n $form = $this->_modificaUtenteForm;\n \n $this->_logger->debug(print_r($form->getValues(), true));\n \n if (!$form->isValid($_POST)){\n \n\n $form->setDescription('Attenzione: alcuni dati inseriti sono errati.');\n $this->_logger->debug(print_r($form->getErrors(), true));\n return $this->render('modificautentepage');\n \n \n }\n\n $values = $form->getValues();\n $id = $this->_getParam('id');\n //try-catch per la gestione dell'eccezione sull'unicità dell'username\n try{\n $this->_AdminModel->updateUser($values,$id);\n $this->_helper->redirector('modificaeliminautente');\n }\n catch(Exception $e){\n \n $form->setDescription('Username già presente!');\n $this->render('modificautentepage');\n }\n \n }", "title": "" }, { "docid": "3ebbb2a87764a4a506ed61ace2ed5f31", "score": "0.61275536", "text": "function update_option_new_admin_email($old_value, $value)\n {\n }", "title": "" }, { "docid": "f0b3120e7171641519295ad68b51ad88", "score": "0.61150277", "text": "function editAccount(){\n if($_SERVER['REQUEST_METHOD']!='POST' ||\n\t$_SERVER['CONTENT_TYPE']!='application/json'){\n http_response_code(400);\n return;\n }\n\n //Check for mandatory parameter and at least 1 optional parameter\n $params = json_decode(file_get_contents('php://input'), true);\n if(!isset($params['cur_email']) || (!isset($params['new_email']) &&\n\t!isset($params['new_username']) && !isset($params['new_password']) &&\n\t!isset($params['admin']))){\n http_response_code(400);\n return 0;\n }\n\n //Build query string\n $settings = array();\n if(isset($params['new_email']))\n array_push($settings, \"email='\".$params['new_email'].\"'\");\n if(isset($params['new_username']))\n array_push($settings, \"username='\".$params['new_username'].\"'\");\n if(isset($params['new_password']))\n array_push($settings, \"password='\".$params['new_password'].\"'\");\n if(isset($params['admin']))\n array_push($settings, \"admin='\".$params['admin'].\"'\");\n $query = \"UPDATE Accounts SET\";\n $num_settings = count($settings); //Guaranteed at least 1\n $query.=\" \".$settings[0];\n for($i=1; $i<$num_settings; $i++) $query.=\", \".$settings[$i];\n $query.=\" WHERE email=:email\";\n\n //Execute query\n $dbh = connectToDatabase();\n $stmt = oci_parse($dbh, $query);\n oci_bind_by_name($stmt, \":email\", $params['cur_email']);\n oci_execute($stmt);\n oci_free_statement($stmt);\n closeConnection($dbh);\n }", "title": "" }, { "docid": "1349dca45dd5446b9f4f9d68e5ad4615", "score": "0.61134696", "text": "public function editContact(){\n\t\t\n\t\t//echo $this->input->post('query_id');\n\t\t//echo $this->input->post('url');\n\t\t\n\t\t//die;\n\t\t$this->load->model('admin/Users_model', 'user');\n\t\t$isUserEdited = $this->user->editContactDetails();\n\t\tif ( $isUserEdited ){\n\t\t\t$this->session->set_flashdata('msg', 'User updated successfully.');\n\t\t}else{\n\t\t\t$this->session->set_flashdata('msg', 'Oops! user can not be updated.');\n\t\t}\n\n\t\tredirect(base_url().'admin/'.$this->input->post('url').'/'.$this->input->post('query_id'));\n\n\n\t}", "title": "" }, { "docid": "508044b7d8d163cc8df7d05f0bbf8a72", "score": "0.6100146", "text": "function SaveEmail()\n\t\t{\n\t\t\tglobal $_CONF;\n\t\t\t $oEmails->email_id=$_POST['id'];\n\t\t\tif(isset($_POST['Save']))\n\t\t\t{\n\t\t\t\t$oEmails->subject=$_POST['subject'];\n\t\t\t\t$oEmails->restore_content=$_POST['content'];\n\t\t\t\t$rs=$this->oModel->UpdateEmail($oEmails);\n\t\t\t\tif($rs)\t{\n\t\t\t\t\theader(\"location:\".$_CONF['AdminURL'].\"index.php?stage=member&mode=ListEmails&msg=1\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif(isset($_POST['Restore']))\n\t\t\t{\n\t\t\t\t$OEmails=$this->oModel->GetEmail($oEmails->email_id);\n\t\t\t\t$rs=$this->oModel->UpdateEmail($OEmails[0]);\n\t\t\t\tif($rs) {\n\t\t\t\t\theader(\"location:\".$_CONF['AdminURL'].\"index.php?stage=member&mode=ShowEmailDetail&id=\".$oEmails->email_id);\n\t\t\t\t}\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\theader(\"location:\".$_CONF['AdminURL'].\"index.php?stage=member&mode=ListEmails\");\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a35a20e071a33f6672d40405bd5fc8a6", "score": "0.6096973", "text": "private function editar() {\n //Verifica se o usuário postou o formulário\n if ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n //Solicita o cadastramento do texto\n $resultado = $this->Delegator('ConcreteEmailformulario', 'EditaEmailFormulario', $this->getPost());\n } else {\n //Valida o id do Conteudo\n if ($this->getParam('cod_id') !== false && is_numeric($this->getParam('cod_id'))) {\n //seleciona tudo\n $dados_emailformulario = $this->Delegator(\"ConcreteEmailformulario\", \"SelectEmailFormularioId\", $this->getParam());\n\n //Coloca os dados da vaga na View\n $this->View()->assign('dados_emailformulario', $dados_emailformulario);\n }\n //Exibe a view\n $this->View()->display('editar.php');\n }\n }", "title": "" }, { "docid": "e34e6a326118e89e475b38c73ffe3286", "score": "0.6096019", "text": "function _webform_confirm_email_edit_confirmation_email_submit($form, &$form_state) {\n\n if ( isset($form_state['values']['eid']) == TRUE\n && isset($form['#node']->nid) == TRUE) {\n\n $obj['eid'] = $form_state['values']['eid'];\n $obj['nid'] = $form['#node']->nid;\n $obj['email_type'] = WEBFORM_CONFIRM_EMAIL_CONFIRMATION;\n\n if (empty($form['eid']['#value']) == TRUE) {\n //-> new email\n $obj['eid'] = $form_state['values']['eid'];\n drupal_write_record(\n 'webform_confirm_email',\n $obj\n );\n }\n else {\n $obj['eid'] = $form['eid']['#value'];\n drupal_write_record(\n 'webform_confirm_email',\n $obj,\n array('nid', 'eid')\n );\n }\n }\n}", "title": "" }, { "docid": "49ceee9480ff964ae1762bd4c90128e9", "score": "0.60939795", "text": "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n\n $loggedUser = $this\n ->getEntityManager()\n ->getRepository('Core\\Entity\\User')\n ->find( $this->getIdentity()->getId() );\n\n $editedUser = $this\n ->getEntityManager()\n ->getRepository('Core\\Entity\\User')\n ->find( $id );\n\n $form = $this->createForm('\\Panel\\Form\\User\\User', array(\n 'loggedUserRole' => $loggedUser->getRole(),\n 'editedUserRole' => $editedUser->getRole(),\n ));\n\n if($id)\n {\n $form = $form->bindObjectById($id);\n }\n\n $request = $this->getRequest();\n if ($request->isPost())\n {\n $data = array(\n 'name' => $request->getPost()->name,\n 'email' => $request->getPost()->email,\n 'phone' => $request->getPost()->phone,\n 'birthDate' => $request->getPost()->birthDate,\n 'height' => $request->getPost()->height,\n 'tmrModifier' => $request->getPost()->tmrModifier,\n 'goalWeight' => $request->getPost()->goalWeight,\n 'personality' => $request->getPost()->personality,\n 'activityLevel' => $request->getPost()->activityLevel,\n 'isFemale' => $request->getPost()->isFemale,\n 'status' => $request->getPost()->status,\n 'role' => $request->getPost()->role,\n );\n\n if($request->getPost()->password!='')\n {\n $data['password'] = $request->getPost()->password;\n }\n\n $form->setData($data);\n\n if ($form->isValid())\n {\n $entityManager = $this->getEntityManager();\n\n $user = $form->getObject();\n\n if($request->getPost()->password!='')\n {\n $user->setPassword($request->getPost()->password);\n }\n\n $userFromEmail = $entityManager\n ->getRepository('Core\\Entity\\User')\n ->findOneBy(array('email' => $user->getEmail()));\n\n if($userFromEmail==null || $userFromEmail->getId()==$user->getId())\n {\n $entityManager->persist($user);\n $entityManager->flush();\n\n $this->flashMessenger()->addSuccessMessage(\n $this->getServiceLocator()->get('translator')\n ->translate(\"User has been modified.\")\n );\n\n if( $id)\n {\n return $this->redirect()->toRoute(\n 'panel/user/:id', array('id' => $id)\n );\n }\n else\n {\n return $this->redirect()->toRoute('panel/user');\n }\n }\n else\n {\n $form->setData($request->getPost());\n\n $this->flashMessenger()->addErrorMessage(\n $this->getServiceLocator()->get('translator')\n ->translate(\"User hasn't been modified. E-mail already exists.\")\n );\n }\n }\n }\n\n $view = new ViewModel();\n $view->setVariable('user', $form->getObject());\n $view->setVariable('form', $form);\n\n return $view;\n }", "title": "" }, { "docid": "0b8a60a658968852436822fec244f040", "score": "0.6090415", "text": "public function _check_email_edit($value)\n {\n $user = user_get_account_info();\n\n if (model('user')->has_user($value) && $value != $user->email) {\n $this->form_validation->set_message(__FUNCTION__, lang('notice_already_used'));\n return FALSE;\n }\n\n return TRUE;\n }", "title": "" }, { "docid": "2aa83c0cffc7071e99a4201543250e8e", "score": "0.60886616", "text": "function email() {\r\n\t\t$this->form_validation->set_rules('on_comment', 'comment', \t'required');\r\n\t\t$this->form_validation->set_rules('on_reply', \t'reply', \t'required');\r\n\t\t$this->form_validation->set_rules('on_news', \t'news', \t'required');\r\n\t\t\r\n\t\t// Set error delimiters\r\n\t\t$this->form_validation->set_error_delimiters('<div class=\"error\">', '</div>');\r\n\t\t\r\n\t\t$email_settings = $this->user->settings('email', $this->session->userdata($this->config->item('session_key').'_usr'));\r\n\t\t\r\n\t\t// Get user info\r\n\t\t$user = $this->user->info_from_column('id', $this->user_id);\r\n\t\t\r\n\t\t// Put the username in the session for the menu.\r\n\t\t$data = array(\r\n\t\t\t'settings'\t=> $email_settings,\r\n\t\t\t'user_info'\t=> $user\r\n\t\t);\r\n\t\t\r\n\t\t// Run validation rules.\r\n\t\tif($this->form_validation->run() == false){\r\n\t\t\t$this->load->view('settings/email', $data);\r\n\t\t} else {\r\n\t\t\t// Passed validation, save settings\r\n\t\t\t\r\n\t\t\t// Save changes to database\r\n\t\t\t$this->user->save_email_settings();\r\n\t\t\t\r\n\t\t\t// Acknowledge that the settings have been saved.\r\n\t\t\t$this->messages->add('Email Preferences have been saved.');\r\n\t\t\t\r\n\t\t\t// Redirect user to same page.\r\n\t\t\tredirect('settings/email');\r\n\t\t}\r\n\t}", "title": "" } ]
7408330af282c7f623fcd743f77dd164
This will handle insctruction received by the channel
[ { "docid": "9f581a974cd73e54b040953a34294308", "score": "0.0", "text": "public function handleInstruction($instruction, $topicId=null, $data=null){\n switch($instruction){\n case \"register\": \n //Get user's seat\n $user = $this->em->getRepository(User::class)->find($data);\n if(!$user){\n //Error\n }else{\n $seat = $user->getSeat();\n\n $player = [\"player\" => [\n \"id\" => $user->getId(),\n \"name\" => $user->getUsername(),\n \"position\" => $seat->getPosition(),\n \"resource\" => $this->resourceId\n ]\n ];\n\n $this->session->set(\"player\", $player);\n }\n\n $return = [];\n $return[\"data\"] = [\"player\" => $this->session->get(\"player\")];\n $return[\"comm\"] = [\"date\"=>date(\"H:i:s\"), \"type\"=>\"api_instruction\", \"instruction\"=>$instruction];\n\n return json_encode($return);\n \n break;\n case \"subscribe\":\n $return = [];\n $return[\"data\"] = [\"resourceId\" => $this->resourceId];\n $return[\"comm\"] = [\"date\"=>date(\"H:i:s\"), \"type\"=>\"api_instruction\", \"instruction\"=>$instruction];\n\n return json_encode($return);\n break;\n case \"setMovement\":\n $return = [];\n $return[\"data\"] = $data;\n $return[\"comm\"] = [\"date\"=>date(\"H:i:s\"), \"type\"=>\"api_instruction\", \"instruction\"=>$instruction];\n\n return json_encode($return);\n break;\n case \"nextPlayer\":\n $return = [];\n $return[\"comm\"] = [\"date\"=>date(\"H:i:s\"), \"type\"=>\"api_instruction\", \"instruction\"=>$instruction];\n\n return json_encode($return);\n break;\n case \"loadUserList\": \n $topics = explode(\"/\", $topicId);\n $roomId = $topics[sizeof($topics)-1];\n\n $roomRepo = $this->em->getRepository(Room::class); \n $this->room = $roomRepo->find($roomId); \n\n $roomRepo->refresh($this->room);\n\n $seats = $this->room->getSeats();\n\n $userList = [];\n $userList[\"users\"] = [];\n $userList[\"comm\"] = [\"date\"=>date(\"H:i:s\"), \"type\"=>\"api_instruction\", \"instruction\"=>$instruction];\n\n foreach ($seats as $seat) {\n $seatRepo = $this->em->getRepository(Seat::class);\n $seatRepo->refresh($seat);\n $userS = $seat->getUserId();\n if(!empty($userS)){\n $user = [\"id\"=>$userS->getId(), \"name\"=>$userS->getUsername(), \"position\"=>$seat->getPosition()];\n $userList[\"users\"][] = $user;\n } \n }\n\n return json_encode($userList);\n break;\n }\n }", "title": "" } ]
[ { "docid": "7d1677a1b93909833838599a7aa436ef", "score": "0.62443733", "text": "public function handle($channel)\n {\n }", "title": "" }, { "docid": "9861b20a40c69299f7a45b59214d6d3a", "score": "0.610024", "text": "public function handleRequest(ChannelRequest $channelRequest);", "title": "" }, { "docid": "430a18d932190291c65f6c9271279db2", "score": "0.5759278", "text": "public function handle()\n {\n ChannelsInfo::dispatch();\n }", "title": "" }, { "docid": "62fe1e8bf6ec5fdd425ca7680d51c104", "score": "0.5652691", "text": "public function channelAction(){\n\n }", "title": "" }, { "docid": "3cff5cdf46fb97a4700a834b5bef9665", "score": "0.56332374", "text": "protected abstract function captureIncomingData();", "title": "" }, { "docid": "a83e55221578896708f21cfaf7d19b1f", "score": "0.55975187", "text": "public function handle()\n {\n //\n// broadcast(new OrderPaidNoticeEvent(1));\n// publish('test', 'event1', 'test message');\n// app(BroadcastManager::class)->event(new OrderPaidNoticeEvent(1));\n// app('redis')->publish('usr','test:value');\n// $result = app('redis')->publish('usr', 'test message');\n// Log::info('channel result ', [$result, app('redis')->keys('*')]);\n broadcasting(new TestEvent());\n $this->info('channel result '.json_encode([app('redis')->keys('*')]));\n }", "title": "" }, { "docid": "288eaaf3dc8349be2aab12cd358e16e9", "score": "0.557353", "text": "public function process(ChannelRequest $channelRequest);", "title": "" }, { "docid": "2e4a2da729aba85af0f103f1cb838bc3", "score": "0.55255973", "text": "public function receive();", "title": "" }, { "docid": "2e4a2da729aba85af0f103f1cb838bc3", "score": "0.55255973", "text": "public function receive();", "title": "" }, { "docid": "922c1b284ccce463fa7765c07a04abe7", "score": "0.5501822", "text": "public function respond()\n\t{\n\t\tif (!PhandaStr::startsIn('client-', $this->payload->event)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$channel = $this->channelManager->find($this->connection->getApplication()->getAppId(), $this->payload->channel);\n\t\t$channel->broadcastToOthers($this->connection, $this->payload);\n\t}", "title": "" }, { "docid": "29aca762b9bca2aadd16ae85865be420", "score": "0.5489716", "text": "public function onReceiveMessage($message) {}", "title": "" }, { "docid": "c409d413f0f05208a5b59c5e7dbc45f3", "score": "0.5379663", "text": "public function handleReceive($payload)\n {\n [$channel, $stage] = IrcParser::parseIrcCommand($payload);\n\n if ($stage === 'PING') {\n $this->send('PONG :tmi.twitch.tv');\n } elseif ($stage === 'NOTICE') {\n if (str_contains($payload, 'Login authentication failed')) {\n Loop::stop();\n\n (new Output())->warn('Login authorisation has failed. You need to re-authorise the channel with revent.');\n }\n } elseif ($channel !== $stage) {\n $channel = ltrim($channel, '#');\n\n try {\n $channel = ChannelsHandler::channel($channel);\n\n if ($channel) {\n $channel->setStage($stage);\n $channel->handle($payload);\n }\n } catch (Exception $exception) {\n (new Output())->error(\"Error: \" . $exception->getMessage());\n (new Output())->error($exception->getTraceAsString());\n }\n }\n }", "title": "" }, { "docid": "cc7e17e417016df7f667d7d218ae2cd9", "score": "0.5360219", "text": "abstract public function handleNotification($input);", "title": "" }, { "docid": "317aeb831af452ea0b0186170d090e9a", "score": "0.5315122", "text": "public function onDataReceived($data)\n\t{\n\t\tif ($data->type === Irc\\Event\\Request::TYPE_JOIN && $data->nick === $this->session->nick) {\n\t\t\t$this->session->channelJoined($data->channel);\n\t\t\t$this->logger->logMessage(Irc\\ILogger::INFO, 'Joined channel %s', $data->channel);\n\n\t\t} elseif ($data->type === Irc\\Event\\Request::TYPE_JOIN) {\n\t\t\t$this->session->onUserJoinedChannel($data->nick, $data->channel);\n\n\t\t} elseif ($data->type === Irc\\Event\\Request::TYPE_KICK && $data->user === $this->session->nick) {\n\t\t\t$this->session->channelKicked($data->channel);\n\t\t\t$this->logger->logMessage(Irc\\ILogger::WARNING, 'Kicked from channel %s by %s (reason: %s)', $data->channel, $data->getNick(), $data->comment);\n\t\t}\n\t}", "title": "" }, { "docid": "c7818524706bf0cfabe5034ce4353732", "score": "0.52172565", "text": "public function __construct ($channelSecret, $access_token) {\n\t\t\n $this->httpClient = new CurlHTTPClient($access_token);\n $this->channelSecret = $channelSecret;\n $this->endpointBase = LINEBot::DEFAULT_ENDPOINT_BASE;\n\t\t\n $this->content = file_get_contents('php://input');\n $events = json_decode($this->content, true); \n // $events = json_decode(preg_replace('/[\\x00-\\x1F\\x80-\\xFF]/', '', $this->content), true); \n \n\t\t\n if (!empty($events['events'])) {\n\t\t\t\n $this->isEvents = true;\n $this->events = $events['events'];\n\t\t\t\n foreach ($events['events'] as $event) {\n\t\t\t\t\n $this->replyToken = $event['replyToken'];\n $this->source = (object) $event['source'];\n $this->message = (object) $event['message'];\n $this->timestamp = $event['timestamp'];\n\t\t\t\t\n if ($event['type'] == 'message' && $event['message']['type'] == 'text' && $event['message']['text'] == \"Location\") {\n \n $this->isLocation = true;\n\n } else if($event['type'] == 'message' && $event['message']['type'] == 'text' && $event['message']['text'] == \"Map\"){\n $this->isMap = true;\n\n } else if($event['type'] == 'message' && $event['message']['type'] == 'text') {\n $this->isText = true;\n $this->text = ($event['message']['text']);\n //$this->text = \"ว่าไงครับ\";\n }\n\n if ($event['type'] == 'message' && $event['message']['type'] == 'image') {\n $this->isImage = true;\n }\n\t\t\t\t\n if ($event['type'] == 'message' && $event['message']['type'] == 'sticker') {\n $this->isSticker = true;\n $this->stickerId = $event['message']['stickerId'];\n $this->packageId = $event['message']['packageId'];\n\n //$ans = $this->replySticker($event['replyToken'],$event['message']['packageId'],$event['message']['stickerId']);\n\n }\n\n // if ($event['type'] == 'follow') {\n // $this->isfollow = true;\n // $this->text = 'Hi Follow';\n // }\n\n // if ($event['type'] == 'unfollow') {\n // $this->unfollow = true;\n // $this->text = 'Unfollow';\n // }\n\n // if ($event['type'] == 'join') {\n // $this->join = true;\n // $this->text = 'join';\n // }\n\n // if ($event['type'] == 'leave') {\n // $this->leave = true;\n // $this->text = 'leave';\n // }\n\n\t\t\t\t\n }\n\n }\n\t\t\n parent::__construct($this->httpClient, [ 'channelSecret' => $channelSecret ]);\n\t\t\n }", "title": "" }, { "docid": "0240c8a9ffca9bf722905d487f1ade71", "score": "0.5199207", "text": "public function handle()\n {\n $channel = $this->getConnection()->channel();\n $channel->queue_declare('rpc_queue', false, false, false, false);\n echo \" [x] Awaiting RPC requests\\n\";\n $channel->basic_consume('rpc_queue', '', false, true, false, false, [$this, 'callback']);\n\n while (count($channel->callbacks)) {\n $channel->wait();\n }\n\n $channel->close();\n $this->getConnection()->close();\n }", "title": "" }, { "docid": "406e5b319cdf69e4ce762dc2ed30525a", "score": "0.5169533", "text": "public function receive()\n {\n $message = Message::fromRawPostData();\n\n // Get from SNS notifiate.\n if (! $message) {\n $this->log('Error: Failed checkNotificateFromSns().');\n exit;\n }\n\n // Check from SNS notificate.\n if (! $this->checkNotificateFromSns($message)) {\n $this->log('Error: Failed checkNotificateFromSns().');\n exit;\n }\n\n // Check SNS TopicArn. (TopicArn is unique in AWS)\n if ($message['Type'] == self::TYPE_SUBSCRIPTION) {\n $topic = $message['TopicArn'];\n $this->isSubscription = $email = true;\n } elseif ($message['Type'] == self::TYPE_NOTIFICATION) {\n $topic = $message['TopicArn'];\n $detail = json_decode($message['Message'], true);\n $email = $detail['mail']['source'];\n $this->isSubscription = false;\n } else {\n $this->log('Error: Failed approved message type.');\n exit;\n }\n if (! $this->checkSnsTopic($topic, $email)) {\n $this->log('Error: Failed checkSnsTopic().');\n exit;\n }\n\n if ($this->isSubscription) {\n // enable end point\n $this->SubscriptionEndPoint($message);\n } else {\n // Insert bounce log\n $this->insertLog($detail['bounce']['bouncedRecipients'][0]['emailAddress'], $message['Message']);\n }\n }", "title": "" }, { "docid": "55225470f390033516fb0b3a29048357", "score": "0.5148069", "text": "public function handle(CompositeConnectionInterface $connection, $payload);", "title": "" }, { "docid": "037d01f89e4b2d6c99a4158b658b715f", "score": "0.5143311", "text": "public function handleIncomingMessage(array $message)\n\t{\n\t\t$mixpanel = $this->getClient();\n\t\t$mixpanel->track($this->config['event'], array(\n\t\t\t'distinct_id' => $message['creator']['value'],\n\t\t\t'ticket' => $message['ticket_id'],\n\t\t\t'name' => $message['creator']['first_name']. ' ' . $message['creator']['last_name'],\n\t\t\t'email' => $message['creator']['value'],\n\t\t));\n\t}", "title": "" }, { "docid": "0ceca532a4fa8d5003e2e41e14872d86", "score": "0.5127561", "text": "function initMessageHandling() {\n\t\tif($this->getView() != 'chat') {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if we have been uninvited from a private or restricted channel:\n\t\tif(!$this->validateChannel($this->getChannel())) {\n\t\t\t// Switch to the default channel:\n\t\t\t$this->switchChannel($this->getChannelNameFromChannelID($this->getConfig('defaultChannelID')));\n\t\t\treturn;\n\t\t}\n\t\t\t\t\t\n\t\tif($this->getRequestVar('text') !== null) {\n\t\t\t$this->insertMessage($this->getRequestVar('text'));\n\t\t}\n\t}", "title": "" }, { "docid": "7a1fdcc6386c1b2e9d9e955420d7ff83", "score": "0.51114583", "text": "public function handleAccept($socket);", "title": "" }, { "docid": "4c34f61fcdd7e2f8ec5fa2cdf8ae4fa7", "score": "0.5091162", "text": "protected function handleMessage( $e ) {\n\n if( $this->rawMode )\n return;\n\n $message = $e->message;\n $raw = $e->raw;\n\n static $namesReply = null,\n $listReply = null;\n switch( $message->command ) {\n case self::CMD_PING: \n //Reply to pings\n $this->send( self::CMD_PONG, $message->getArg( 0, $this->server ) );\n break;\n case self::CMD_JOIN:\n //Emit channel join events\n $nick = $message->nick ? $message->nick : $this->nick;\n $channel = $message->getArg( 0 );\n\n $this->emit( \"join, join:$channel, join:$nick, join:$channel:$nick\", array( \n 'nick' => $nick, \n 'channel' => $channel \n ) );\n break;\n case self::CMD_PART:\n //Emit channel part events\n $nick = $message->nick ? $message->nick : $this->nick;\n $channel = $this->addAllChannel( $message->getArg( 0 ) );\n\n $this->emit( \"part, part:$channel, part:$nick, part:$channel:$nick\", array( \n 'nick' => $nick, \n 'channel' => $channel \n ) );\n break;\n case self::CMD_KICK:\n //Emit kick events\n $channel = $message->getArg( 0 );\n $nick = $message->getArg( 1 );\n\n $this->emit( \"kick, kick:$channel, kick:$nick, kick:$channel:$nick\", array( \n 'nick' => $nick, \n 'channel' => $channel \n ) );\n break;\n case self::CMD_NOTICE:\n //Emit notice message events\n $from = $message->nick;\n $to = $message->getArg( 0 );\n $text = $message->getArg( 1, '' );\n\n $this->emit( \"notice, notice:$to, notice:$to:$from\", array( \n 'from' => $from, \n 'to' => $to, \n 'text' => $text \n ) );\n break;\n case self::CMD_PRIVMSG:\n //Handle private messages (Normal chat messages)\n $from = $message->nick;\n $to = $message->getArg( 0 );\n $text = $message->getArg( 1, '' );\n\n if( $this->isChannel( $to ) ) {\n\n $this->emit( \"chat, chat:$to, chat:$to:$from\", array( \n 'from' => $from, \n 'channel' => $to,\n 'text' => $text\n ) );\n break;\n }\n\n $this->emit( \"pm, pm:$to, pm:$to:$from\", array( \n 'from' => $from, \n 'to' => $to, \n 'text' => $text \n ) );\n break;\n case self::RPL_NAMREPLY:\n\n $namesReply = (object)array(\n 'nick' => $message->getArg( 0 ),\n 'channelType' => $message->getArg( 1 ),\n 'channel' => $message->getArg( 2 ),\n 'names' => array_map( 'trim', explode( ' ', $message->getArg( 3 ) ) )\n );\n case self::RPL_ENDOFNAMES:\n\n if( empty( $namesReply ) )\n break;\n\n $channel = $namesReply->channel;\n\n $this->emit( \"names, names:$channel\", array( \n 'names' => $namesReply, \n 'channel' => $channel \n ) );\n $namesReply = null;\n break;\n case self::RPL_LISTSTART:\n\n $listReply = array();\n break;\n case self::RPL_LIST:\n\n $channel = $message->getArg( 1 );\n $listReply[ $channel ] = (object)array(\n 'channel' => $channel,\n 'userCount' => $message->getArg( 2 ),\n 'topic' => $message->getArg( 3 )\n );\n break;\n case self::RPL_LISTEND:\n\n $this->emit( 'list', array( 'list' => $listReply ) );\n $listReply = null;\n break;\n case self::RPL_WELCOME:\n //correct internal nickname, if given a new one by the server\n $this->nick = $message->getArg( 0, $this->nick );\n\n $this->emit( 'welcome' );\n break;\n case self::RPL_ISUPPORT:\n\n $args = $message->args;\n unset( $args[0], $args[ count( $args ) - 1 ] );\n\n foreach( $args as $arg ) {\n\n $explode = explode( '=', $arg );\n $key = $explode[0];\n $val = $explode[1] ?? null;\n\n //handle some keys specifically\n switch( strtolower( $key ) ) {\n case 'prefix':\n\n list( $modes, $prefixes ) = explode( ')', ltrim( $val, '(' ) );\n $modes = str_split( $modes );\n $prefixes = str_split( $prefixes );\n $val = array();\n foreach( $modes as $k => $v )\n $val[ $prefixes[ $k ] ] = $v;\n\n break;\n case 'chantypes':\n case 'statusmsg':\n case 'elist':\n\n $val = str_split( $val );\n break;\n case 'chanmodes':\n case 'language':\n\n $val = explode( ',', $val );\n break;\n }\n\n $this->options[ $key ] = $val;\n }\n\n $this->emit( 'options', array( 'options' => $this->options ) );\n break;\n }\n }", "title": "" }, { "docid": "6caa9e0b253e3b2c57dcee4dc60f236b", "score": "0.50801253", "text": "protected function processReceivedData() \r\n {\r\n parent::processReceivedData();\r\n // to do: call processReceivedData() for all members\r\n }", "title": "" }, { "docid": "391bfdb871ad1a1e82c69710ac45fc56", "score": "0.50346917", "text": "public function handle()\n {\n ini_set('default_socket_timeout', -1);\n $pattern = '__keyevent@0__:expired';\n Redis::psubscribe([$pattern], function($message, $name) {\n \\Log::error('=======');\n \\Log::error($message);\n \\Log::error($name);\n });\n }", "title": "" }, { "docid": "cf4954d44a6806df6e52c8ff629b6e6d", "score": "0.50308114", "text": "public static function notifyAcceptGSA()\n {\n }", "title": "" }, { "docid": "5428a24007beb6bb24e81cf8de52e89b", "score": "0.5028124", "text": "public function on_read() {\n if ($this->closed) return;\n if ($this->state === self::STATE_STANDBY) {\n $this->state = self::STATE_FIRSTLINE;\n }\n if ($this->state === self::STATE_FIRSTLINE) {\n if (!$this->http_read_first_line()) {\n return;\n }\n $this->state = self::STATE_HEADERS;\n }\n\n if ($this->state === self::STATE_HEADERS) {\n if (!$this->http_read_headers()) {\n return;\n }\n if (!$this->http_process_headers()) {\n $this->close();\n return;\n }\n $this->state = self::STATE_CONTENT;\n }\n if ($this->state === self::STATE_CONTENT) {\n $this->state = self::STATE_PREHANDSHAKE;\n }\n }", "title": "" }, { "docid": "0ab67f0c8c0d7f528cccc53d4308417e", "score": "0.500746", "text": "public function handle()\n {\n self::$senderIo = new SocketIO(3120);\n // 当有客户端连接时打印一行文字\n self::$senderIo->on('connection', function ($socket) {\n // 当客户端发来登录事件时触发,$uid目前由页面传值决定,当然也可以根据业务需要由服务端来决定\n $socket->on('login', function ($uid) use ($socket) {\n // 已经登录过了\n if (isset($socket->uid)) return;\n echo $uid;\n // 更新对应uid的在线数据\n $uid = (string)$uid;\n\n // 这个uid有self::$uidConnectionCounter[$uid]个socket连接\n self::$uidConnectionCounter[$uid] = isset(self::$uidConnectionCounter[$uid]) ? self::$uidConnectionCounter[$uid] + 1 : 1;\n\n // 将这个连接加入到uid分组,方便针对uid推送数据\n $socket->join($uid);\n $socket->uid = $uid;\n // 更新这个socket对应页面的在线数据\n self::emitOnlineCount();\n });\n\n $socket->on('message', function ($msg) use ($socket) {\n $msg_arr = explode('_', $msg);\n self::$senderIo->to($msg_arr[1])->emit('back_msg', $msg_arr[0]);\n });\n\n // 当客户端断开连接是触发(一般是关闭网页或者跳转刷新导致)\n $socket->on('disconnect', function () use ($socket) {\n if (!isset($socket->uid)) {\n return;\n }\n\n // 将uid的在线socket数减一\n if (--self::$uidConnectionCounter[$socket->uid] <= 0) {\n unset(self::$uidConnectionCounter[$socket->uid]);\n }\n });\n });\n\n // 当self::$senderIo启动后监听一个http端口,通过这个端口可以给任意uid或者所有uid推送数据\n self::$senderIo->on('workerStart', function () {\n // 监听一个http端口\n $innerHttpWorker = new Worker('http://0.0.0.0:2121');\n // 当http客户端发来数据时触发\n $innerHttpWorker->onMessage = function ($httpConnection, $data) {\n\n $type = $_REQUEST['type'] ?? '';\n $content = htmlspecialchars($_REQUEST['content'] ?? '');\n $to = (string)($_REQUEST['to'] ?? '');\n\n // 推送数据的url格式 type=publish&to=uid&content=xxxx\n switch ($type) {\n case 'publish':\n // 有指定uid则向uid所在socket组发送数据\n if ($to) {\n self::$senderIo->to($to)->emit('new_msg', $content);\n } else {\n // 否则向所有uid推送数据\n self::$senderIo->emit('new_msg', $content);\n }\n // http接口返回,如果用户离线socket返回fail\n if ($to && !isset(self::$uidConnectionCounter[$to])) {\n return $httpConnection->send('offline');\n } else {\n return $httpConnection->send('ok');\n }\n }\n return $httpConnection->send('fail');\n };\n // 执行监听\n $innerHttpWorker->listen();\n\n // 一个定时器,定时向所有uid推送当前uid在线数及在线页面数\n Timer::add(1, [self::class, 'emitOnlineCount']);\n });\n Worker::runAll();\n }", "title": "" }, { "docid": "83637c03d62b76d1b4be5fc2f5920795", "score": "0.50030965", "text": "public function onMessage($msgData) {\r\n\r\n }", "title": "" }, { "docid": "83637c03d62b76d1b4be5fc2f5920795", "score": "0.50030965", "text": "public function onMessage($msgData) {\r\n\r\n }", "title": "" }, { "docid": "5b570bb080faccf890f6ce737d290124", "score": "0.49976566", "text": "private function channel()\n {\n return null;\n }", "title": "" }, { "docid": "1f505f63893b55923bc1060d49d8bf3d", "score": "0.49930903", "text": "public function handleWebhook()\n\t{\n\t\t$this->webhook_received = false;\n\t\t$input = file_get_contents('php://input');\n\t\t$payload = json_decode($input, true);\n\t\tif($payload && isset($payload['message_type'])) {\n\t\t\t$this->webhook_received = true;\n\t\t\t$this->message_type = $payload['message_type'];\n\t\t\t$this->first_interaction = $payload['first_interaction'];\n\t\t\t$this->message = $payload['message'];\n\t\t\t$this->user = new OMBotUser($this->app_id, $this->api_key);\n\t\t\t$this->user->setUserData($payload['user']);\n\t\t\ttry {\n\t\t\t\tswitch($this->message_type) {\n\t\t\t\t\tcase 'first_message':\n\t\t\t\t\t\t//TODO: If firstmessage not implemented, fallback to text/callback/files\n\t\t\t\t\t\t$this->onFirstMessage($this->user, $this->message['text']);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t$this->onTextReceived($this->user, $this->message['text']);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'callback':\n\t\t\t\t\t\t$this->onCallbackReceived($this->user, $this->message['callback']);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'files':\n\t\t\t\t\t\t$this->onFilesReceived($this->user, $this->message['files'], $this->message['text']);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception $e) {\n\t\t\t\t//Only if user is admin!\n\t\t\t\t$this->user->sendText('Exception: ' . $e);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e7df0400751787df712438c53ab51da7", "score": "0.49782762", "text": "public function parse_incoming($data){\n\n\t}", "title": "" }, { "docid": "8a370788c1bdc246cb731b5177cea8d1", "score": "0.49746433", "text": "protected function _handleWhile()\n {\n while ($this->Socket->connected === true) {\n $this->_handleResponse($this->Socket->read());\n }\n }", "title": "" }, { "docid": "3dedc69cbac518f1267a897eabb9a133", "score": "0.49727842", "text": "public function acceptDirectMessage( $messageId ){\n\t}", "title": "" }, { "docid": "0058acbb0dd3c06b60ff04f98f72c482", "score": "0.4966354", "text": "function Respond()\n {\n $log=\"<|~\".$_GET[\"sender\"].\"|~\".$this->message.\"\\n\";\n foreach ($this->store as $message)\n {\n $log.=$message;\n }\n file_put_contents(\"connectors/loopback/loopback.log\",$log,FILE_APPEND);\n unset($this->store);\n }", "title": "" }, { "docid": "00a2537f5cc36af78c23087b372c7344", "score": "0.49358422", "text": "public static function shouldReceive()\n {\n }", "title": "" }, { "docid": "8517aceeca22d825650b92af7321c152", "score": "0.4927994", "text": "function onReceive($server, $client_id, $from_id, $data)\n {\n }", "title": "" }, { "docid": "ae84b9574b3d7f1803213319b1bb3cee", "score": "0.49176237", "text": "function callback($redis,$channel,$contect){\n\n\t\techo $channel;\n\t\techo \":\";\n\t\techo $contect;\n\t\techo \"<br/>\";\n\t\texit();\n\t}", "title": "" }, { "docid": "a3c86aca86433de0020561bfcc1b6245", "score": "0.491091", "text": "function processStream($rawData) { \r\n\t\t//echo \"Raw line: $rawData <br> output: <hr>\";\r\n\t\tif (preg_match('/^:(([^!]+)![^\\s]+)\\s([^\\s]+)\\s(?::)?([^\\s]+)(?:\\s:?([^\\s]+))?(?:\\s:?(.*))?/i', $rawData, $m)) {\r\n\t\t\t$fulladdress = $m[1]; $nick = $target = $m[2];\t$event = $m[3];\r\n\t\t\t$chan = $newnick = $m[4]; $cmd = $knick = $m[5]; $text = trim($m[5] . \" \" . $m[6]);\r\n\t\t\t$param = $reason = $m[6];\r\n\t\t\t$p = Array('fulladdress' => $fulladdress,'event' => $event, 'rawmsg' => $rawData,\"nick\" => $nick);\r\n\t\t\tswitch (strtolower($event)) { \r\n\t\t\t\tcase 'privmsg':\r\n\t\t\t\t\tif ((substr($text,0,1) == chr(1)) && (substr($text,-1,1) == chr(1))) { \r\n\t\t\t\t\t\tif ($m[5] == \"\\x01ACTION\") { \r\n\t\t\t\t\t\t\t$p = array_merge($p,Array('chan' => $chan, 'text' => $text));\r\n\t\t\t\t\t\t\t$this->actionEvent($p);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if ($m[5] == \"\\x01DCC\") {}\r\n\t\t\t\t\t\telse { /* ctcp */ }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$p = array_merge($p,Array('chan' => $chan, 'text' => $text));\r\n\t\t\t\t\tif ($chan == $this->_connectionSettings['id']['me']) { \r\n\t\t\t\t\t\tunset($p['chan']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->textEvent($p);\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'join':\r\n\t\t\t\t\t$p['chan'] = $chan;\r\n\t\t\t\t\t$this->joinEvent($p);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "81f1239ed6b8118c70b817502dcc5126", "score": "0.49056366", "text": "public function onReceive(string $str)\n {\n }", "title": "" }, { "docid": "6574cec29e0dc48df2f3d68b7a11b151", "score": "0.48999107", "text": "function interact($sock) {\n\n}", "title": "" }, { "docid": "28871b01f619d38618f15f7216573cbb", "score": "0.48976088", "text": "protected function handleRequest() {}", "title": "" }, { "docid": "0efafe325cc4c2fc64ddf17c70879f61", "score": "0.48934317", "text": "function callback()\n\t{\n\t\tif($_SERVER['REQUEST_METHOD'] == \"GET\")\n {\n\t\t\t\t$challenge = $_SERVER['QUERY_STRING'];\n\t\t\t\t$get_array = explode(\"&\", $challenge);\n\t\t\t\tfor($i=0;$i<count($get_array);$i++)\n\t\t\t\t{\n\t\t\t\t\t$check = $get_array[$i];\n\t\t\t\t\tif(strstr($check,\"hub.challenge\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t$hub_array=explode(\"=\", $check);\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$hub = $hub_array[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t if($hub)\n\t\t\t\t{\n\t\t\t\t\techo $hub;\n\t\t\t\t}\n\n\t\t}\n\t\tif($_SERVER['REQUEST_METHOD'] == \"POST\")\n\t\t{\n\t\t\t\n\t\t\t$data = json_decode(file_get_contents('php://input'));\t\t\n\t\n\t\t\tforeach($data as $obj)\n\t\t\t{\n\t\t\t\t$object_id = $obj->object_id;\n\t\t\t\t$time = $obj->time;\n\t\t\t\t\n\t\t\t\t$payload = array(\n\t\t\t\t\t'time' => $time,\n\t\t\t\t\t'object_id' => $object_id\n\t\t\t\t);\n\t\t\t\t//now send $payload somewhere else for processing...\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "80549ab9f91bb9a0361126a941c93725", "score": "0.4888359", "text": "function _voip_asterisk_event_handler($ecode, $data, $server, $port) {\n $rc = TRUE;\n\ndsm(\"entering: _voip_asterisk_event_handler($ecode, $data, $server, $port)\");\n $call_id = $data['ActionID'];\ndsm(\"call_id: $call_id\");\n\n $ecode = strtolower($ecode);\n switch($ecode) {\n default:\n break;\n case 'originateresponse':\n $reason = $data['Reason'];\n switch($reason){\n default:\n $call_status = 'invalid';\n voip_error(\"Invalid AMI event: $ecode\");\n $rc = FALSE;\n break;\n case 0: // no such extension or number\n $call_status = 'invalid number';\n break;\n case 1: // no answer\n $call_status = 'no answer';\n break;\n case 4: // answered\n $call_status = 'answered';\n break;\n case 8: // busy\n $call_status = 'busy';\n break;\n }\n // update the status of the call\ndsm(\"future call_status: $call_status\");\n $nid = voipcall_get_nid_from_call_id($call_id);\ndsm(\"nid: $nid\");\n $details = array('nid' => $nid, 'call_status' => $call_status);\n $n = voipcall_save($details);\ndsm(\"node saved with $call_status:\");\ndsm($n);\n break;\n }\n return $rc;\n}", "title": "" }, { "docid": "3d90f9819084a7de60cede812587dc19", "score": "0.48688152", "text": "public function chat_message () {\r\n //for client 2 example only\r\n $this->socket->event->addEvent('chat message', function ($socket,$data,$sender) {\r\n $socket->event->broadcastMessage('chat message', $data,true);\r\n });\r\n }", "title": "" }, { "docid": "a75c158dce8eb987f3fed4d7ac7364e8", "score": "0.48631734", "text": "public function initializeChannelClient();", "title": "" }, { "docid": "b02124f75396fe7dab1754ad8a6be03e", "score": "0.4861714", "text": "public function handle()\n {\n sleep(4);\n echo $this->msg.\"\\t\".date(\"Y-m-d H:i:s\").\"\\n\";\n Redis::set($this->msg,date(\"Y-m-d H:i:s\"));\n Log::info($this->msg.\"\\t\".date(\"Y-m-d H:i:s\").\"\\n\");\n }", "title": "" }, { "docid": "83db0a8fff6321a71a0f3f4223dadb5c", "score": "0.48548606", "text": "function chat_on() {\n \n }", "title": "" }, { "docid": "bc05f0078b364727a7b4aea56dd368e4", "score": "0.48525283", "text": "abstract public function respondToNotification();", "title": "" }, { "docid": "ee649ee402c9875ee62ad4099ae6f024", "score": "0.4851666", "text": "public function getChannel();", "title": "" }, { "docid": "ecfd58f06307fd32f5ffbe220541b1fd", "score": "0.48468706", "text": "public function handle();", "title": "" }, { "docid": "ecfd58f06307fd32f5ffbe220541b1fd", "score": "0.48468706", "text": "public function handle();", "title": "" }, { "docid": "ecfd58f06307fd32f5ffbe220541b1fd", "score": "0.48468706", "text": "public function handle();", "title": "" }, { "docid": "56ebb765e97d0c7e5cfddb0f40b7a0fb", "score": "0.48307317", "text": "function mailgun_sample_incoming_message_handler($event, $type, $message) {\n\t/* First we check to see if the message is for this plugin.\n\t * Plugin developers will assign some unique value to their\n\t * message after the + symbol in the recipient.\n\t *\n\t * This could be a unique token that is generated when a\n\t * notification is sent that allows a user to reply to the\n\t * email e.g. site1+a2bdy4dokf5dbs42ndasotirqn@em.mysite.com\n\n\t * Or for emails coming in that are not from a reply this could\n\t * be a unique string e.g. site1+my_plugin@em.mysite.com\n\t */\n\n\t// Get the unique token or string from the recipient\n\t$token = $message->getRecipientToken();\n\n\t// Direct imbound messages for this plugin use mgsample\n\t// as the token.\n\tif (preg_match(\"/mgsample/\", $token)) {\n\n\t\t// This is a direct inbound message maybe to start a new blog post\n\t\terror_log('Received a direct inbound message: ' . $message->getMessageId());\n\t} else {\n\n\t\t$options = array(\n\t\t\t'type' => 'object',\n\t\t\t'subtyle' => 'mailgun_sample',\n\t\t\t'limit' => 1,\n\t\t\t'annotation_name_value_pairs' => array(\n\t\t\t\t'name' => 'msg_token',\n\t\t\t\t'value' => $token,\n\t\t\t\t'operator' => '='\n\t\t\t)\n\t\t);\n\n\t\t$entities = elgg_get_entities_from_annotations($options);\n\n\t\tif (!empty($entities)) {\n\n\t\t\t// Process the reply to this entity\n\t\t\t// Halt event propagation\n\t\t\treturn false;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "f4324ba69c1c7bc86d84a4e18161d23b", "score": "0.4828847", "text": "public function isReadyToSend()\n {\n \t\n }", "title": "" }, { "docid": "6554f7495a42530c14c8a5ade49c8888", "score": "0.48267367", "text": "public function handle()\n {\n while (true){\n $user_id = Redis::RPOP(App::LOGIN_POOL);\n if($user_id){\n $user_data = Redis::get(App::USER_LOGIN_KEY.'_'.$user_id);\n $user_data = json_decode($user_data ,true);\n\n if($user_data['messages']===null) {\n Player::makeUserCacheData($user_id);\n echo $user_id.\" done \\n\";\n }\n }else{\n echo 'no'.\"\\n\";\n sleep(App::LOGIN_SYNC_MAKE_USER_CACHE_TIME);\n }\n }\n }", "title": "" }, { "docid": "9a489b17bbda30e7b1c16f891ea5d156", "score": "0.48187068", "text": "public function receive($key);", "title": "" }, { "docid": "b87842c80b52f3c07035682519ababd7", "score": "0.48184896", "text": "public function buffer(){\n if( !empty($this->handlerParamsConfig) ){\n Monolog::instance()->push($this);\n } \n }", "title": "" }, { "docid": "c622c2a1e69d2323e1b3025032fd410c", "score": "0.4804923", "text": "public function consume(): void;", "title": "" }, { "docid": "617305060ef7e626d1e353f17240e701", "score": "0.48024276", "text": "function onConnected()\n\t{\n\t}", "title": "" }, { "docid": "6ddd9bff7a5676f1b2c87ed59c8c4152", "score": "0.47801062", "text": "function handle_data() {\n\t}", "title": "" }, { "docid": "6f6281293cfe0be8bac894a6f425b959", "score": "0.47774777", "text": "public function handle()\n {\n $this->sendAll();\n\n }", "title": "" }, { "docid": "fa901f95a92f8b51c752edf6f5659d5f", "score": "0.47773933", "text": "public function notification_handle(inotification $notification )\n {\n }", "title": "" }, { "docid": "bb05e95533c1b8878321033f179a11b3", "score": "0.47771505", "text": "function sms_command_hook_setsmsincomingaction($sms_datetime,$sms_sender,$command_keyword,$command_param='',$sms_receiver='',$raw_message='')\n{\n\t$ok = false;\n\t$db_query = \"SELECT uid,command_id FROM \"._DB_PREF_.\"_featureCommand WHERE command_keyword='$command_keyword'\";\n\t$db_result = dba_query($db_query);\n\tif ($db_row = dba_fetch_array($db_result))\n\t{\n\t\t$c_uid = $db_row['uid'];\n\t\tif (sms_command_handle($c_uid,$sms_datetime,$sms_sender,$sms_receiver,$command_keyword,$command_param,$raw_message))\n\t\t{\n\t\t\t$ok = true;\n\t\t}\n\t}\n\t$ret['uid'] = $c_uid;\n\t$ret['status'] = $ok;\n\treturn $ret;\n}", "title": "" }, { "docid": "60c40a246eb4b94849086ea880c9d9d4", "score": "0.47737497", "text": "public function handle()\n {\n\n $imevents =ImEvents::all()->get();\n\n foreach($imevents as $imevent) {\n\n foreach($imevent->invitees as $invitee) {\n // Send the email to user\n \\Mail::queue('laravelevents.emails.eventremainder', ['event' => $imevent], function ($mail) use ($user) {\n $mail->to($invitee->user->email)\n ->from($imevent->user->email, $imevent->user->name)\n ->subject(\"Remainder:\".$imevent->subject);\n });\n }\n\n }\n\n $this->info('Remainder messages sent successfully!');\n }", "title": "" }, { "docid": "7e12883acd59845ebd7bd17dbf77c17b", "score": "0.4766946", "text": "public function handle()\n {\n //\n\n $config = [\n 'host' => '129.28.153.237',\n 'port' => '5672',\n 'user' => 'admin',\n 'password' => 'admin',\n 'vhost' => '/'\n ];\n\n\n $connect = new AMQPStreamConnection($config['host'], $config['port'], $config['user'], $config['password'], $config['vhost']);\n\n $exchange = 'ce';\n\n $queue = 'ce';\n\n $channel = $connect->channel();\n\n $message = $channel->basic_get($queue);\n\n $msg = $message->body;\n\n $channel->basic_ack($message->delivery_info['delivery_tag']);\n\n $channel->close();\n\n $connect->close();\n\n print_r($msg);\n\n }", "title": "" }, { "docid": "28929747bb151699a65f1a999e45e7d0", "score": "0.47589603", "text": "public function subscribe(){\n\t\t\n\t}", "title": "" }, { "docid": "ad8151cedcb2d724558faeed7aa859a5", "score": "0.47577667", "text": "public function handle()\n {\n (new RabbitMQ())->consume(function ($msg) {\n $parameters = json_decode($msg->body, 1);\n $codeText = $parameters['code'];\n $phone = $parameters['phone'];\n\n $validationResult = (new MessageValidator($codeText, $phone))\n ->validate();\n\n if (!$validationResult->isWinner()) {\n $msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);\n return;\n }\n\n $code = Code::query()->whereCode($codeText)->firstOrFail();\n\n if (!$code->enable) {\n $msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);\n return;\n }\n\n $code->winners()->create([\n 'phone' => $phone,\n 'code' => $codeText,\n 'won_at' => $parameters['timestamp'],\n ]);\n\n if ($validationResult->isLastWinner()) {\n $code->update([\n 'enable' => false,\n ]);\n // remove extra phones from db\n $toBeDeletedPhones = $code->removeExtraWinners();\n // remove extra phones from cache\n $toBeDeletedPhones->each(fn($phone) => Redis::hdel('winners', $phone));\n }\n\n $msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);\n });\n }", "title": "" }, { "docid": "8973a2c3e0f55c2c4bcf07f9154ef136", "score": "0.47565886", "text": "public function on_client_server_connect(Event &$event) {\n $this->request->setAttribute('result_on_client_server_connect', 'successful call');\n $this->request->setAttribute('result', 'successful call');\n \n echo \"here is connection\\r\\n\";\n \n }", "title": "" }, { "docid": "0a10663d93773f010436270b5ce3390a", "score": "0.47538072", "text": "public function logic() {\n if($this->state == 'authed') {\n if($this->pingtime < time() - 30) {\n $this->pingtime = time();\n $this->raw('PING LAG' . time());\n }\n if($this->nickCheck < time() - 30 && $this->curNick != $this->nick) {\n $this->raw('NICK ' . $this->nick);\n $this->nickCheck = time();\n }\n }\n \n if($this->state == 'disconnected') {\n $this->sendq = Array();\n return;\n }\n $this->processSendq();\n }", "title": "" }, { "docid": "ac431625d4a12d7442f0816e0d73757d", "score": "0.4753015", "text": "function setIsinActive($obj, $socket_id, $channel_id,$data)\n{\n//global $delay,$mkt_stat;\n $s=\"error\";\n\n $this->secInfo=$this->data_io->markets[$this->data_io->cfg->market]->setActiveSec($data);\n $this->isin = $this->secInfo->getIsinSec();\n $this->phases_info = $this->data_io->markets[$this->data_io->cfg->market]->getSecPhase($this->isin);\n \n print (\"ActiveSec:\".$this->isin.\"\\n\");\n $this->retransmitChannels($this->isin);\n \n $this->data_io->packHiLo($this->tableIT, true); // true: Send Orders/Trades totals also!\t\t\n $this->sendMsgToMeteor(_ch_hilo);\n\t \n $obj->write($socket_id, $channel_id, \"ok\");\t\n }", "title": "" }, { "docid": "da74fb216add68dcf1fc9ce938dddb37", "score": "0.47410068", "text": "public function receiveAction()\n {\n\n }", "title": "" }, { "docid": "fdc307e2ad006aef5a41978c5b389439", "score": "0.47342134", "text": "protected function handle_in($user, $messageObj)\r\n {\r\n socket_getpeername($user->get_socket(), $clientIP);\r\n printf(\"%s - GameServer->action()\\n\", $clientIP);\r\n\r\n //DEBUG\r\n //print_r($messageObj);\r\n\r\n switch ($messageObj->handler) {\r\n case 'rooms_handler':\r\n $this->roomsHandler->action($messageObj, $user);\r\n break;\r\n\r\n case 'users_handler':\r\n $this->usersHandler->action($messageObj, $user);\r\n break;\r\n\r\n default:\r\n print(\"\\! Unknown Handler !\\n\");\r\n print_r($messageObj);\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "fee44b182f1582ed7c2c2644c3105ccd", "score": "0.47288257", "text": "protected function doSenderIsRead()\n {\n $this->setIsReadByParticipant($this->getSender(), true);\n }", "title": "" }, { "docid": "330aec10c9c4c3ca39006cf1cff3de14", "score": "0.47241437", "text": "public function MinionPlugin_Token_Handler($sender) {\n $state = &$sender->EventArguments['State'];\n\n if (!$state['Method'] && in_array($state['CompareToken'], array('play', 'playing'))) {\n $sender->consume($state, 'Method', 'play');\n\n $sender->consume($state, 'Gather', array(\n 'Node' => 'Phrase',\n 'Delta' => ''\n ));\n }\n }", "title": "" }, { "docid": "51b40a305954d236b0a019307b566410", "score": "0.47236243", "text": "public function checkIn()\n {\n $this->listener->checkIn();\n }", "title": "" }, { "docid": "879fd78f72905727deb246f253fd20b6", "score": "0.4723493", "text": "public function onMessage(Frame $frame)\n {\n return;\n }", "title": "" }, { "docid": "9f6906b1dcc4e33922a18c7463126841", "score": "0.47223315", "text": "public function receiveEvent()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n //extract post data\n if (!empty($postStr)){\n /* libxml_disable_entity_loader is to prevent XML eXternal Entity Injection,\n the best way is to check the validity of xml by yourself */\n libxml_disable_entity_loader(true);\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $contentStr=\"\";\n \n require_once 'SqlTools.php';\n \n $sqlTools = new SqlTools();\n \n switch($postObj->Event){\n //关注事件\n case \"subscribe\":\n $contentStr = \"亲!您好!感谢您专注佬香翁,佬香翁红薯研发和生产健康的红薯美味,为您的生活送去更多健康和快乐。\";\n if (isset($postObj->EventKey)){\n $id = substr($postObj->EventKey,strripos($postObj->EventKey,\"_\")+1);\n //查找是否之前关注过 \n $sql = \"select grantid from lxw_followers where `openid`='\".$postObj->FromUserName.\"' limit 0,1\";\n \n $res = $sqlTools->execute_dql($sql); \n \n if($row=mysql_fetch_row($res)){\n //$contentStr = \"欢迎再次关注!\";\n //关注过的人再次关注只增加净关注量\n $sql1 = \"update lxw_grantrecord set pureachieve=`pureachieve`+1 where id=$row[0]\"; \n \n $res = $sqlTools->execute_dml($sql1);\n \n }else{\n //新人关注\n $sql1 = \"update lxw_grantrecord set `achievement`=`achievement`+1,`pureachieve`=`pureachieve`+1 where id=$id\";\n //把新人填到已关注过的人里\n $sql2 = \"insert into lxw_followers values('\".$postObj->FromUserName.\"','\".$id.\"')\";\n \n $res = $sqlTools->execute_dml($sql1); \n $res = $sqlTools->execute_dml($sql2); \n \n //$contentStr = \"感谢关注\";\n }\n mysql_free_result($res);\n }\n break;\n case \"SCAN\":\n $contentStr = \"亲!您好!感谢您专注佬香翁,佬香翁红薯研发和生产健康的红薯美味,为您的生活送去更多健康和快乐。\";\n //要实现统计分析,则需要扫描事件写入数据库,这里可以记录 EventKey及用户OpenID,扫描时间\n break;\n //取消关注事件\n case \"unsubscribe\":\n $openid = $postObj->FromUserName;\n $sql = \"select grantid from lxw_followers where openid='\".$postObj->FromUserName.\"' limit 0,1\";\n \n $res = $sqlTools->execute_dql($sql);\n if($row=mysql_fetch_row($res)){\n //$sql1 = \"delete from lxw_followers where openid='\".$postObj->FromUserName.\"'\";\n //取消关注其对应的推广人员的净关注量-1\n $sql2 = \"update lxw_grantrecord set `pureachieve`=`pureachieve`-1 where id=\".$row[0];\n \n $res = $sqlTools->execute_dql($sql2);\n }\n break;\n case \"click\":\n switch($postObj->EventKey){\n\n\n\n //线下活动\n case \"privilege_offline_activity\":\n\n break;\n\n\n //健康之旅\n case \"privilege_health_tour\":\n break;\n\n //佬香翁烤红薯\n case \"potatos_roast_sweetpotato\":\n break; \n\n //休闲薯美味\n case \"potatos_relaxation_delicious\":\n break; \n\n //健康薯饮\n case \"potatos_health_drink\":\n break; \n \n //精品礼盒\n case \"potatos_the_packing\":\n break; \n \n //佬香翁\n case \"diary_lxw\":\n break; \n \n //红薯之家\n case \"diary_family\":\n break;\n default:\n break;\n }\n break;\n default:\n break; \n \n }\n\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);\n $time = time();\n $textTpl = \"<xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName>\n <CreateTime>%s</CreateTime>\n <MsgType><![CDATA[%s]]></MsgType>\n <Content><![CDATA[%s]]></Content>\n <FuncFlag>0</FuncFlag>\n </xml>\"; \n if(!empty( $contentStr ))\n {\n $msgType = \"text\";\n //$contentStr = \"亲!您好!感谢您专注佬香翁,佬香翁红薯研发和生产健康的红薯美味,为您的生活送去更多健康和快乐。\";\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n }else{\n echo \"Input something...\";\n }\n\n }else {\n echo \"\";\n exit;\n }\n }", "title": "" }, { "docid": "c1a5b71c3a909fab07f3b2658f249991", "score": "0.47120243", "text": "public function handle()\n {\n //$this->getFromActivity(); \n $this->parse();\n }", "title": "" }, { "docid": "ced88d3e92350035a65ce135e394eb42", "score": "0.47102493", "text": "public function actionAccepted()\n\t{\n $this->iostatus = 2;\n $this->_iov();\n\t}", "title": "" }, { "docid": "af3ebd146a6ffeeb68e12ef045a6a44c", "score": "0.47094026", "text": "abstract function receive($message);", "title": "" }, { "docid": "25069a5974b707daebe58cb713d691c1", "score": "0.47087786", "text": "public function handle()\n {\n //\n }", "title": "" }, { "docid": "25069a5974b707daebe58cb713d691c1", "score": "0.47087786", "text": "public function handle()\n {\n //\n }", "title": "" }, { "docid": "8525b289c0ea41d2a419388d3e5534ab", "score": "0.47074383", "text": "public function getInputChannel()\n {\n return $this->input_channel;\n }", "title": "" }, { "docid": "f45a0ba825934df07859a86b7220207c", "score": "0.47043234", "text": "function listen() {\n if ($this->config['kernel_tick']) {\n $this->config['kernel_tick'] = (11 * 1000);\n\t}\n\t\n socket_set_blocking($this->connection, false);\n while (!feof($this->connection)) {\n usleep($this->config['kernel_tick']);\n $this->buffer['raw'] = trim(fgets($this->connection, 4096));\n\n // If all is quiet, proceed once per second. (letting modules do timed events)\n if (strlen($this->buffer['raw']) <= 0) {\n if ($t == time())\n continue;\n }\n \n $t = time();\n\n // respond to PINGs\n if (substr($this->buffer['raw'], 0, 6) == 'PING :') {\n $this->send('PONG :' . substr($this->buffer['raw'], 6));\n continue;\n }\n\n // make sense of the buffer\n $this->parseBuffer();\n\n if ($this->buffer['0'] != '') {\n if (!isset($this->buffer['channel']))\n $this->buffer['channel'] = \"\";\n $c = str_replace(\":\", \"\", $this->buffer['channel']);\n if (strcmp($this->buffer['channel'], $c) == 0 \n && strpos($this->buffer['channel'], ':') !== true \n && isset($this->buffer['text'])) {\n $this->output(date(\"[d/m @ H:i:s]\") . \" [\" . $c . \"] \" \n . $this->buffer['text']);\n } elseif (isset($this->buffer['text'])) {\n $this->output(date(\"[d/m @ H:i:s]\") . \" (\" \n . $this->buffer['channel'] . \") <\" \n . $this->buffer['username'] . \"> \" \n . $this->buffer['text']);\n }\n }\n // now process any commands issued to the bot\n $this->process();\n }\n }", "title": "" }, { "docid": "b7ea37dd851a2b8aca5d453c6f2cf1cd", "score": "0.4703742", "text": "public function handle()\n {\n //\n $token=config('services.chatapi.token');\n $url=config('services.chatapi.api_url');\n\n\n $this->info(\"token \".$token);\n $this->info(\"url \".$url);\n $n=NotifChangeDataCtrl::notifWa();\n \n\n\n dd($n);\n\n\n }", "title": "" }, { "docid": "1b8abcbd6317f51f51de7e84064fd3ed", "score": "0.47028974", "text": "public function onMessage($connection, $isBinary, $data)\n {\n $connection->push('Hello: '.$data);\n }", "title": "" }, { "docid": "24c9479319bcffba2b42cb66eb5fb81b", "score": "0.46991232", "text": "abstract protected function handle();", "title": "" }, { "docid": "36234ea797ab039408fa35f6884dc091", "score": "0.46863016", "text": "public function process(){\n\t\t//require __DIR__ . '/vendor/autoload.php';\n\n\t\t $options = array(\n\t\t 'cluster' => 'ap1',\n\t\t 'useTLS' => true\n\t\t );\n\t\t $pusher = new Pusher\\Pusher(\n\t\t 'b432d8d3f3a21996a419',\n\t\t 'c2e2decba1c7d0ca3cb4',\n\t\t '490512',\n\t\t $options\n\t\t );\n\n\t\t $data['message'] = 'hello world';\n\t\t $pusher->trigger('panic_button', 'my-event', $data);\n\t}", "title": "" }, { "docid": "f60621ff92d6860ba6f61381c345ae4d", "score": "0.4681686", "text": "abstract public function onConnect($connection);", "title": "" }, { "docid": "66bdfbc2a155c23d79983d9f57cb6c24", "score": "0.4678995", "text": "public function handle()\n {\n\n TwitterStreamingApi::publicStream()\n ->whenHears(config('twitter.search_terms'), function ($status) {\n // Skip retweets\n $isRetweet = ($status['retweeted_status'] ?? false) || mb_stripos($status['text'], 'RT ') === 0;\n if ($isRetweet && !Str::contains($status['text'], '#harveysos')) {\n return; // Skip retweets that does not contain the #harveysos hashtag\n }\n\n try {\n $message = new Message();\n $message->twitter_id = $status['id_str'];\n $message->message_created = Carbon::parse($status['created_at']);\n $message->message_text = $status['text'];\n $message->user_id = $status['user']['id_str'];\n $message->user_handle = $status['user']['screen_name'];\n $message->user_name = $status['user']['name'] ?? '';\n $message->user_location = $status['user']['location'] ?? '';\n $message->save();\n } catch (PDOException $e) {\n $this->info('Exception: ' . $e->getMessage());\n // Probably duplicate key\n }\n\n $this->info('1 new message: ' . $status['user']['screen_name'] . '/status/' . $status['id_str']);\n })\n ->startListening();\n }", "title": "" }, { "docid": "337100ecb9fe6ff623b0ac1535efd005", "score": "0.46763015", "text": "private function notification(){\n\t\n\t}", "title": "" }, { "docid": "3cf35063355f53e6cb1beef9aaf44b84", "score": "0.4673302", "text": "public function handleConnection(ConnectionInterface $connection)\n {\n $headerBuffer = '';\n $that = $this;\n\n $listener = function ($data) use ($connection, &$headerBuffer, $that, &$listener) {\n $headerBuffer .= $data;\n if (strpos($headerBuffer, \"\\r\\n\\r\\n\") !== false) {\n $connection->removeListener('data', $listener);\n // header is completed\n $fullHeader = (string)substr($headerBuffer, 0, strpos($headerBuffer, \"\\r\\n\\r\\n\") + 4);\n\n try {\n $request = RingCentral\\Psr7\\parse_request($fullHeader);\n } catch (\\Exception $ex) {\n $that->sendResponse(new Response(400), $connection);\n return;\n }\n\n if ($request->hasHeader('Content-Length')) {\n $contentLength = $request->getHeaderLine('Content-Length');\n\n $int = (int) $contentLength;\n if ((string)$int !== (string)$contentLength) {\n // Send 400 status code if the value of 'Content-Length'\n // is not an integer or is duplicated\n $that->sendResponse(new Response(400), $connection);\n return;\n }\n }\n\n $request = new ServerRequest(\n $request->getMethod(),\n $request->getUri(),\n $request->getHeaders(),\n $request->getBody(),\n $request->getProtocolVersion()\n );\n\n $that->handleBody($request, $connection);\n\n // remove header from $data, only body is left\n $data = (string)substr($data, strlen($fullHeader));\n if ($data !== '') {\n $connection->emit('data', array($data));\n }\n }\n };\n\n $connection->on('data', $listener);\n }", "title": "" }, { "docid": "9402517bb477570f39fc7ae63dd80af6", "score": "0.46718907", "text": "public function handle()\n {\n // Get the notification channels required for the given reminder.\n // Add a subject to the mail channel, if it exists.\n // Then pass them to the send function.\n $this->send(\n $this->addSubjectToChannelSettings(\n $this->getChannels()\n )\n );\n $this->postSend();\n }", "title": "" }, { "docid": "f1dac95c8ffea24a5e57a222e5bb1018", "score": "0.46698555", "text": "abstract public function scribe($message, $context, $level);", "title": "" }, { "docid": "75323fbd58760eb6252a404cff3cea85", "score": "0.466243", "text": "function open_account_signal_subsciber(){\n\t}", "title": "" }, { "docid": "ecb5840992ce975da3a3a67540c9a82a", "score": "0.46607965", "text": "protected function handle_out()\r\n {\r\n $events = EventManager::events();\r\n\r\n $reversed = new Stack();\r\n\r\n while ($events->length() != 0) {\r\n $reversed->push($events->pop());\r\n }\r\n\r\n while ($reversed->length() != 0) {\r\n $this->execute($reversed->pop());\r\n }\r\n }", "title": "" }, { "docid": "ee2d26ba62dccebcfeed59ef3fc7d0ee", "score": "0.46579573", "text": "public function receive()\n {\n if (false === is_object($this->handler)) {\n return false;\n }\n\n return $this->handler->startSaving($this->chunkStorage, $this->config);\n }", "title": "" }, { "docid": "1dc13852b3f7857734229db22c1b430f", "score": "0.4655958", "text": "function consumeMessage($msg) {\n\t\tif ($this->dataItem->channel_type == 'point') {\n\t\t\tCgn_Mxq_Queue::delete($msg);\n\t\t}\n\t}", "title": "" }, { "docid": "c76586731f2d22e45641de574bc255b4", "score": "0.46502975", "text": "public function consume(): self;", "title": "" }, { "docid": "ea0009817d5b2a49f9ec0d3b407df73c", "score": "0.46488544", "text": "function handleGet()\n {\n $mode = $this->arg('hub_mode');\n $topic = $this->arg('hub_topic');\n $challenge = $this->arg('hub_challenge');\n $lease_seconds = $this->arg('hub_lease_seconds');\n $verify_token = $this->arg('hub_verify_token');\n common_log(LOG_INFO, __METHOD__ . \": sub verification mode: $mode topic: $topic challenge: $challenge lease_seconds: $lease_seconds verify_token: $verify_token\");\n\n if ($mode != 'subscribe' && $mode != 'unsubscribe') {\n // TRANS: Client exception. %s is an invalid value for hub.mode.\n throw new ClientException(sprintf(_m('Bad hub.mode \"$s\".',$mode)), 404);\n }\n\n $feedsub = FeedSub::staticGet('uri', $topic);\n if (!$feedsub) {\n // TRANS: Client exception. %s is an invalid feed name.\n throw new ClientException(sprintf(_m('Bad hub.topic feed \"%s\".'),$topic), 404);\n }\n\n if ($feedsub->verify_token !== $verify_token) {\n // TRANS: Client exception. %1$s the invalid token, %2$s is the topic for which the invalid token was given.\n throw new ClientException(sprintf(_m('Bad hub.verify_token %1$s for %2$s.'),$token,$topic), 404);\n }\n\n if ($mode == 'subscribe') {\n // We may get re-sub requests legitimately.\n if ($feedsub->sub_state != 'subscribe' && $feedsub->sub_state != 'active') {\n // TRANS: Client exception. %s is an invalid topic.\n throw new ClientException(sprintf(_m('Unexpected subscribe request for %s.'),$topic), 404);\n }\n } else {\n if ($feedsub->sub_state != 'unsubscribe') {\n // TRANS: Client exception. %s is an invalid topic.\n throw new ClientException(sprintf(_m('Unexpected unsubscribe request for %s.'),$topic), 404);\n }\n }\n\n if ($mode == 'subscribe') {\n if ($feedsub->sub_state == 'active') {\n common_log(LOG_INFO, __METHOD__ . ': sub update confirmed');\n } else {\n common_log(LOG_INFO, __METHOD__ . ': sub confirmed');\n }\n $feedsub->confirmSubscribe($lease_seconds);\n } else {\n common_log(LOG_INFO, __METHOD__ . \": unsub confirmed; deleting sub record for $topic\");\n $feedsub->confirmUnsubscribe();\n }\n print $challenge;\n }", "title": "" } ]
45f57480bfe39e61a7547133cb9c19a4
FUNCIONES CALCULO DE SIMILITUD Coeficiente de correlacion de Pearson / r=1 correlacion perfect 0<r<1 correlacion positiva r=0 no existe relacion 1<r<0 correlacion negativa r=1 correlacion negativa perfecta
[ { "docid": "e4b82c04f883c6eb018cfc2db86c6bf2", "score": "0.54176015", "text": "public function PCC($v1, $v2){\n \t\n $mediaValoracionItem1=$this->calculaMedia($v1);\n $mediaValoracionItem2=$this->calculaMedia($v2);\n \n //Calculo numerador\n $sumatoriaNumerador=0;\n $sumatoriaDenominador1=0;\n\t $sumatoriaDenominador2=0;\n \n \n //$con=0; \n foreach($v1 as $idUsu => $valor){ \t\n //compruebo que los dos usuarios con el mismo id han hecho una valoracion del item \n if(isset($v2[$idUsu])){ \t\t\n $sumatoriaNumerador+=($valor-$mediaValoracionItem1)*($v2[$idUsu]-$mediaValoracionItem2);\n $sumatoriaDenominador1+=($v1[$idUsu]-$mediaValoracionItem1)*($v1[$idUsu]-$mediaValoracionItem1);\n $sumatoriaDenominador2+=($v2[$idUsu]-$mediaValoracionItem2)*($v2[$idUsu]-$mediaValoracionItem2); \t\t\n } \n }\n $sumatoriaDenominador=sqrt($sumatoriaDenominador1*$sumatoriaDenominador2);\n if($sumatoriaNumerador==0){\n return 0.5;\n }\n $resultado=$sumatoriaNumerador/$sumatoriaDenominador;\n //hay que hacer esta cuenta para transformala a medida de similitud\n return ($resultado+1)/2; \n }", "title": "" } ]
[ { "docid": "764d892950c97b867ba56847973d9b57", "score": "0.6124513", "text": "public function calculate_constants()\n {\n if($this->n==0) {\n echo \"<b>\" . \"Number of trials cannot be zero\" . \"</b>\";\n return;\n }\n else{\n\n for($j=0; $j<count($this->initial); $j++)\n {\n if($this->initial[$j]>=0 && $this->initial[$j]<3)\n {\n if($this->final[$j]>=0 && $this->final[$j]<3)\n {\n $var = 'arr'.$this->initial[$j];\n $this->{$var}[$this->final[$j]] += 1;\n\n }\n }\n }\n\n\n for($k=0; $k<3; $k++)\n {\n $var='p0'.$k;\n $this->{$var}=$this->arr0[$k]/array_sum($this->arr0);\n\n }\n\n for($k=0; $k<3; $k++)\n {\n $var1='p1'.$k;\n $this->{$var1}=$this->arr1[$k]/(($this->arr1[0])+($this->arr1[1])+($this->arr1[2]));\n }\n for($k=0; $k<3; $k++)\n {\n $var2='p2'.$k;\n $this->{$var2}=$this->arr2[$k]/(($this->arr2[0])+($this->arr2[1])+($this->arr2[2]));\n }\n }\n $this->cal_done=1;\n }", "title": "" }, { "docid": "9590ffc2b8abde7b24da3994a04829ff", "score": "0.6036838", "text": "public function r(): float\n {\n return $this->correlationCoefficient();\n }", "title": "" }, { "docid": "0a55e5647eef6e6a4cbae5e5b4d528c1", "score": "0.5717786", "text": "function stats_stat_correlation($arr1, $arr2)\n{ \n $correlation = 0;\n \n $k = SumProductMeanDeviation($arr1, $arr2);\n $ssmd1 = SumSquareMeanDeviation($arr1);\n $ssmd2 = SumSquareMeanDeviation($arr2);\n \n $product = $ssmd1 * $ssmd2;\n \n $res = sqrt($product);\n \n $correlation = $k / $res;\n \n return $correlation;\n}", "title": "" }, { "docid": "570ee345c379cabf7a66fd889ae62cc3", "score": "0.5563677", "text": "private function computeSolarTerms() {\n if ($this->gregorianYear<1901 || $this->gregorianYear>2100) return 1;\n $this->sectionalTerm = $this->sectionalTerm($this->gregorianYear, \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$this->gregorianMonth);\n $this->principleTerm = $this->principleTerm($this->gregorianYear, \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$this->gregorianMonth);\n return 0;\n }", "title": "" }, { "docid": "0986758625ffe1ff710d82b06f6a8f3d", "score": "0.54892975", "text": "public static function calculateBASE($row){\n //hodnoty ulozene v poli\n\n $array_CIA = array (\"H\" => 0.56,\n \"L\" => 0.22,\n \"N\" => 0);\n\n $array_AV = array(\n \"N\" => 0.85,\n \"A\" =>0.62,\n \"L\" => 0.55,\n \"P\" => 0.20);\n $array_AC = array( \"L\" => 0.77,\n \"H\" =>0.44);\n\n $array_PR = array( \"N\" => 0.85,\n \"L\" => 0.62,\n \"H\" => 0.27);\n\n $array_UI = array( \"N\"=>0.85,\n \"R\"=>0.62);\n\n\n if ($row->S == 'U'){\n\n //pocitani se scope unchanged\n $ISC= 1-((1-$array_CIA[$row->C]) * (1-$array_CIA[$row->I])* (1-$array_CIA[$row->A]));\n\n $Exploitability = 8.22 * $array_AV[$row->AV] * $array_AC[$row->AC] * $array_PR[$row->PR] * $array_UI[$row->UI];\n\n $result = (6.42*$ISC)+$Exploitability;\n\n return self::RoundUp($result);\n\n\n } else {\n //pocitani s changed scope (jine cisla!!)\n $ISC= 1-((1-$array_CIA[$row->C]) * (1-$array_CIA[$row->I])* (1-$array_CIA[$row->A]));\n $Exploitability = 8.22 * $array_AV[$row->AV] * $array_AC[$row->AC] * $array_PR[$row->PR] * $array_UI[$row->UI];\n\n $ImpactSub = 7.52 * ($ISC - 0.029) -3.25 * pow($ISC-0.02, 15);\n\n $result = 1.08 *($ImpactSub + $Exploitability);\n return self::RoundUp($result);\n\n\n\n\n }\n\n }", "title": "" }, { "docid": "4974eaf0f465ad550ffee07db9284b5e", "score": "0.54829526", "text": "function TEMPO_REQUERIDO_RESISTENCIA_FOGO($TRRF, $A_V, $H_I, $A_H, $B_I, $D_A, $GAMMA_S2, $A_PAVTO, $C_A, $Q_I)\n{\n // IMPRESSÃO NO CONSOLE PARA TESTE\n echo \"------------------------------------------------\\n\";\n echo \"CORETECTOOLS - CONCRETO INCÊNDIO \\n\";\n echo \"VERIFICAÇÃO DE VIGAS EM SITUAÇÃO DE INCÊNDIO \\n\";\n echo \"------------------------------------------------\\n\\n\";\n echo \"-----------------------------------------------\\n\";\n echo \"PARÂMETROS DE ENTRADA:\\n\";\n echo \"-----------------------------------------------\\n\";\n echo \"TRRF = $TRRF min\\n\";\n echo \"Área de ventilação vertical = $A_V m²\\n\";\n echo \"Altura do compartimento = $H_I m\\n\";\n echo \"Altura do piso habitável mais elevado = $A_H m\\n\";\n if ($B_I == 0):\n echo \"Brigada de incêndio = Não\\n\";\n else:\n echo \"Brigada de incêndio = Sim\\n\";\n endif;\n if ($D_A == 0):\n echo \"Detecção automática = Não\\n\";\n else:\n echo \"Detecção automática = Sim\\n\";\n endif;\n echo \"Risco de ativação do incêndio = $GAMMA_S2\\n\";\n echo \"-----------------------------------------------\\n\\n\";\n # O QUE É ISSO\n if ($A_V/$A_PAVTO > 0.3):\n $FACTOR_AVAF = 0.3;\n elseif ($A_V/$A_PAVTO >= 0.025 && $A_V/$A_PAVTO <= 0.3):\n $FACTOR_AVAF = $A_V/$A_PAVTO;\n elseif ($A_V/$A_PAVTO < 0.025):\n $FACTOR_AVAF = 0.025;\n endif;\n # O QUE É ISSO\n $FACTOR_W = pow (6/$H_I , 0.3) * (0.62 + 90 * pow (0.4 - $FACTOR_AVAF , 4));\n if ($FACTOR_W >= 0.5):\n $W = $FACTOR_W;\n else:\n $W = 0.5;\n endif;\n # O QUE É ISSO\n if ($C_A == 0):\n $GAMMA_N1 = 1;\n else:\n $GAMMA_N1 = 0.6;\n endif; \n # O QUE É ISSO\n if ($B_I == 0):\n $GAMMA_N2 = 1;\n else:\n $GAMMA_N2 = 0.9;\n endif;\n # O QUE É ISSO\n if ($D_A == 0):\n $GAMMA_N3 = 1;\n else:\n $GAMMA_N3 = 0.9;\n endif;\n # O QUE É ISSO\n $GAMMA_N = $GAMMA_N1 * $GAMMA_N2 * $GAMMA_N3;\n # O QUE É ISSO\n $FACTOR_GAMMA_S1 = 1 + ($A_PAVTO * ($A_H + 3)/pow (10,5));\n # O QUE É ISSO\n if ($FACTOR_GAMMA_S1 < 1):\n $GAMMA_S1 = 1;\n elseif ($FACTOR_GAMMA_S1 >= 1 && $FACTOR_GAMMA_S1 <= 3):\n $GAMMA_S1 = $FACTOR_GAMMA_S1;\n elseif ($FACTOR_GAMMA_S1 > 3):\n $GAMMA_S1 = 3;\n endif;\n # O QUE É ISSO\n $GAMMA_S = $GAMMA_S1 * $GAMMA_S2;\n\n $T_E = 0.07 * $Q_I * $W * $GAMMA_N * $GAMMA_S;\n\n \n if ($T_E < ($TRRF - 30)):\n $TRRF_FINAL = $TRRF - 30;\n elseif ($T_E > $TRRF):\n $TRRF_FINAL = $TRRF;\n elseif ($T_E >= ($TRRF - 30) && $T_E <= $TRRF):\n $TRRF_FINAL = $T_E;\n endif;\n\n if ($TRRF_FINAL < 15):\n $TRRF_FINAL = 15;\n endif;\n\n \n echo \"-----------------------------------------------\\n\";\n echo \"PROCESSAMENTO:\\n\";\n echo \"Fator W que considera a influência da ventilação e da altura do compartimento = $FACTOR_W \\n\";\n echo \"Fator GAMMA N1 relativo a existência de chuveiros automáticos = $GAMMA_N1 \\n\";\n echo \"Fator GAMMA N2 relativo a existência de brigadas contra incêndio = $GAMMA_N2 \\n\";\n echo \"Fator GAMMA N3 relativo a existência de detecção automática = $GAMMA_N3 \\n\";\n echo \"Fator GAMMA N (GAMMA N1 x GAMMA N2 x GAMMA N3) = $GAMMA_N \\n\";\n echo \"Fator GAMMA S1 que considera a área do piso do compartimento e a altura do piso habitável mais elevado = $GAMMA_S1 \\n\";\n echo \"Fator GAMMA S2 relativo ao risco de ativação do incêndio = $GAMMA_S2 \\n\";\n echo \"Fator GAMMA S (GAMMA S1 x GAMMA S2) = $GAMMA_S \\n\";\n echo \"TE = $T_E min\\n\";\n echo \"TRRF = $TRRF min\\n\"; \n echo \"TRRF adotado = $TRRF_FINAL min\\n\";\n echo \"-----------------------------------------------\\n\\n\";\n\n return $TRRF_FINAL;\n}", "title": "" }, { "docid": "e18ddedfe4c7bf995eb24eb0a58bb889", "score": "0.53763884", "text": "function cor($x, $y) {\n $cov = $this->cov($x, $y);\n $sdX = $this->sd($x);\n $sdY = $this->sd($y);\n\n $cor = $cov / ($sdX * $sdY);\n\n return $cor;\n }", "title": "" }, { "docid": "104ac955493703114c4dda8079ec99c2", "score": "0.53750974", "text": "function calc_match($user,$set,$extra=2,$cc=\"1\") {\n $results = array();\n foreach ($set as $s) {\n if ($s->constituency == $cc) {\n $sum = 0;\n $count = 0;\n if (isset($user['votes']) and count($user['votes']) > 0) {\n foreach($user['votes'] as $key => $uv) {\n //weight\n if (isset($user['weight'][$key])) $w = $extra;\n else $w = 1;\n //existing divisions only:\n if ((property_exists($s,'votes')) and (property_exists($s->votes,$key))) {\n $sum = $sum + $w*$s->votes->$key*sign($uv);\n $count = $count + $w;\n }\n }\n }\n if ($count == 0) $count = 1; // to allow match = 0/1 = 0;\n //read what data should go to result\n $res = array();\n foreach ($s as $key=>$item) {\n $res[$key] = $s->$key;\n }\n //common results for any calc\n $res['result'] = (1+$sum/$count)/2;\n $res['result_percent'] = round((100+100*$sum/$count)/2);\n $res['id'] = $s->id;\n $res['random'] = rand(0,1000000);\n $results[] = $res;\n }\n\n }\n //sort by result\n foreach ($results as $key => $row) {\n $result[$key] = $row['result'];\n $random[$key] = $row['random'];\n }\n array_multisort($result, SORT_DESC, $random, SORT_ASC, $results);\n\n return $results;\n}", "title": "" }, { "docid": "8798bee7f5f2f6d1e932a59b9eef6aad", "score": "0.53747964", "text": "private function calculaSimilitud($v1, $v2){ \n if($this->PCC==1)\n return $this->PCC($v1,$v2);\n else\n return $this->SC($v1,$v2); \n }", "title": "" }, { "docid": "8ff9feaab6579cd487d133b8ede907f2", "score": "0.53636473", "text": "public function calculate()\n {\n foreach ($this->scores as $user => $user_score)\n {\n // 5. sum of 4. per user (P.A. total score)\n $pa_totals += $this->row_sum($user);\n }\n // 6. 5. / n users (P.A. factor score)\n $pa_factor_score = $pa_totals / $this->row_count;\n // 7. P.A. factor score / n indicators (P.A. factor)\n return round($pa_factor_score / $this->col_count, 2);\n }", "title": "" }, { "docid": "10cd13ab23250f2f2f028447b0bf50c5", "score": "0.536301", "text": "function co_calculator_cb($CRP, $PLA) {\n\t//Plazo en meses\n\t$PLM = $PLA * 12;\n\t//Cotización Inicial en UVR (UVR)\n\t$UVR = variable_get('co_simulator_variable_uvr'); //UVR del Banco de la Republica (www.banrep.gov.co)\n\t//Crédito en UVR (CRU)\n\t$CRU = $CRP / $UVR;\n\t//Tasa efectiva anual\n\t$TEA = variable_get('co_simulator_variable_cb_tea'); //Parametrizable por el administrador\n\t//Tasa mensual vencida - ((1+[TEA])^(1/12))-1s\n\t$TMV = (pow((1+($TEA/100)),(1/12))-1);\n\t//Inflación Esperada Anual (IEA) - Parametrizable por administrador\n\t$IEA = variable_get('co_simulator_variable_cb_iea');\n\t//Inflación Mensual Vencido (IEV)\n\t$IEV = (pow((1+($IEA) / 100), (1/12))-1)*100;//((1+D12)^(1/12))-1\n\t//Cerrar Crédito si falta # UVR\n\t$CCSFU = variable_get('co_simulator_variable_cb_ccsfp');//Parametrizable por administrador\n\t$proyeccion = array();\n\t$proyeccion_format = array();\n\t$proyeccion[] = array(\n\t\t'cuota_uvr' => 0,\n\t\t'amortizacion_uvr' => 0,\n\t\t'interes_uvr' => 0,\n\t\t'saldo_uvr' => ($CRP/$UVR),\n\t\t'cuota_pesos' => 0,\n\t\t'saldo_pesos' => $CRP,\n\t\t'cotizacion_uvr' => $UVR,\n\t);\n\t$proyeccion_format = co_calculator_cm_format($proyeccion, $proyeccion_format, 0);\n\t$saldo_pesos = $CRP;\n\t//Condición para cerrar credito\n\twhile ($saldo_pesos >= $CCSFU) {\n\t\t$key = count($proyeccion)-1;\n\t\t//Declaración de variables\n\t\t$cuota_uvr = 0;\n\t\t$amortizacion_uvr = 0;\n\t\t$interes_uvr = 0;\n\t\t$saldo_uvr = 0;\n\t\t$cuota_pesos = 0;\n\t\t$saldo_pesos = 0;\n\t\t$cotizacion_uvr = 0;\n\t\t//Interes UVR\n\t\tif ($proyeccion[$key]['saldo_uvr'] > $CCSFU) {\n\t\t\tif ($key == 0)\n\t\t\t\t$interes_uvr = $CRU * $TMV;//IF(G22>$D$15,D9*$D$11,0)\n\t\t\telse\n\t\t\t\t$interes_uvr = $proyeccion[$key]['saldo_uvr'] * $TMV;//=IF(G23>$D$15,G23*$D$11,0)\n\t\t\t//Valor cuota UVR - IF(G22>$D$15,($D$9*$D$11)/(1-(1+$D$11)^-$D$7),0)\n\t\t\t$cuota_uvr = ($CRU * $TMV) / (1-pow((1+$TMV), -$PLM));\n\t\t\t//Amortización //=IF(G22>$D$15,D23-$F$23,0)\n\t\t\t$amortizacion_uvr = $cuota_uvr - $interes_uvr;\n\t\t\t//Saldo en UVR // =IF(G22>$D$15,D9-E23,0)\n\t\t\tif ($key == 0)\n\t\t\t\t$saldo_uvr = $CRU - $amortizacion_uvr;\n\t\t\telse\n\t\t\t\t$saldo_uvr = $proyeccion[$key]['saldo_uvr'] - $amortizacion_uvr;\n\t\t\t//Cotización UVR //IF(G22>$D$15,$J$22*(1+$D$13)^C23,0)\n\t\t\t$cotizacion_uvr = $proyeccion[0]['cotizacion_uvr']*pow((1+($IEV/100)),($key+1));\n\t\t}\n\t\t//Cuotas en pesos //cuota_pesos\n\t\t$cuota_pesos = $cuota_uvr * $cotizacion_uvr;\n\t\t//Saldo en pesos\n\t\t$saldo_pesos = $saldo_uvr * $cotizacion_uvr;\n\t\t$proyeccion[] = array(\n\t\t\t'cuota_uvr' => $cuota_uvr,\n\t\t\t'amortizacion_uvr' => $amortizacion_uvr,\n\t\t\t'interes_uvr' => $interes_uvr,\n\t\t\t'saldo_uvr' => $saldo_uvr,\n\t\t\t'cuota_pesos' => $cuota_pesos,\n\t\t\t'saldo_pesos' => $saldo_pesos,\n\t\t\t'cotizacion_uvr' => $cotizacion_uvr,\n\t\t);\n\t\t$proyeccion_format = co_calculator_cm_format($proyeccion, $proyeccion_format, $key+1);\n\t}\n\t$IMLM = (ceil((($proyeccion[1]['cuota_pesos']/0.3)/1000))*1000); //Información para el usuario);\n\t//Conditions\n\t$row_conditions = array();\n\t$row_conditions[] = array(t('Crédito en pesos (CRP)'), '$ '.number_format(round($CRP, 0), 0, '.', ','),);\n\t$row_conditions[] = array(t('Plazo en años (PLA)'), $PLA,);\n\t$row_conditions[] = array(t('Plazo en meses (PLM)'), $PLM,);\n\t$row_conditions[] = array(t('Cotización Inicial en UVR (UVR)'), '$ '.round($UVR, 4),);\n\t$row_conditions[] = array(t('Crédito en UVR (CRU)'), number_format($CRU, 0, '.', ','),);\n\t$row_conditions[] = array(t('Tasa Efectiva Anual (TEA)'), $TEA .'%',);\n\t$row_conditions[] = array(t('Tasa Mensual Vencido (TMV)'), round($TMV, 6),);\n\t$row_conditions[] = array(t('Inflación Esperada Anual (IEA)'), $IEA.'%',);\n\t$row_conditions[] = array(t('Inflación Mensual Vencido (IEV)'), round($IEV, 2).'%',);\n\t$row_conditions[] = array(t('Ingresos Minímos Libres Mes'), '$ '.number_format($IMLM, 0, '.', ','),);\n\t$row_conditions[] = array(t('Cerrar Crédito si falta # UVR'), $CCSFU,);\n\treturn array('data' => $proyeccion_format, 'data_conditions' => $row_conditions, 'IMLM' => $IMLM);\n}", "title": "" }, { "docid": "e0f1828aede99a7e06a987a2ce7b9399", "score": "0.52596337", "text": "public function yaPoseeSolicitudSimiliarPendiente()\r\n\t\t{\r\n\t\t\t$modelFind = null;\r\n\t\t\t$modelFind = CorreccionCedulaRif::find()->where('id_contribuyente =:id_contribuyente', [':id_contribuyente' => $this->_id_contribuyente])\r\n\t\t\t\t\t\t\t\t\t\t\t\t ->andWhere(['IN', 'estatus', [0]])\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t->count();\r\n\t\t\treturn ( $modelFind > 0 ) ? true : false;\r\n\t\t}", "title": "" }, { "docid": "374b45a6877b08900e0f39a85e287b0a", "score": "0.5255223", "text": "function calculateR0($info)\n{\n\n $initial_cases = (float) $info[\"casesStart\"];\n $final_cases = (float) $info[\"casesEnd\"];\n $r0 = $final_cases / $initial_cases;\n $r0 = log($r0);\n $r0 = $r0 / 7;\n $r0 = (1 + $r0 / 0.25) * ($r0 + 1);\n\n return $r0;\n}", "title": "" }, { "docid": "0ca2be7bf2ff1fee5843c22fe264cdb5", "score": "0.5211567", "text": "public function getPorcentajeCompletadoCAIE2($idUser,$idEncuestado){\n $this->BD_Conectar();\n $SQL_CONSULTA_PORCENTAJE=\"SELECT ROUND( count( * ) *100 / (\n SELECT count( * )\n FROM `CAIE2_preguntas` )) AS porcCompletado\n FROM `CAIE2_respuestas`\n WHERE id_user = '{$idUser}'\n AND id_encuestado = '{$idEncuestado}'\n LIMIT 0 , 30\";\n $porcCompletado = mysql_query($SQL_CONSULTA_PORCENTAJE);\n $porcCompletado = mysql_fetch_array($porcCompletado);\n return $porcCompletado[0];\n}", "title": "" }, { "docid": "aa8a609e6352654cef26bb5cf56499bc", "score": "0.5196554", "text": "private function Determinar_Cumple_Condicion_Cpras_Tron_Industial(){\n\n $Registro = $this->MdlTerceros->Compra_Productos_Tron_Mes_Actual();\n\n $Cumple_Condic_Cpras_Tron_Industial = FALSE;\n $compra_minima_productos_tron = Session::Get('minimo_compras_productos_tron');\n $compra_minima_productos_industriales = Session::Get('minimo_compras_productos_ta');\n $compras_este_mes_tron = Session::Get('compras_productos_tron');\n $compras_este_mes_industiales = Session::Get('compras_productos_fabricados_ta');\n $usuario_viene_del_registro = Session::Get('usuario_viene_del_registro');\n $kit_comprado = Session::Get('kit_comprado') ;\n\n $compras_este_mes_tron = $Registro[0]['compras_productos_tron'];\n $compras_este_mes_industiales = $Registro[0]['compras_productos_fabricados_ta'];\n $compras_totales_tron = 0;\n\n $compras_totales_tron = $this->compras_tron + $compras_este_mes_tron ;\n $compras_totales_industrial = $this->compras_industrial + $compras_este_mes_industiales ;\n $compras_totales_tron = $compras_totales_tron + $compras_totales_industrial;\n $aplica_pago_adicional_payu_latam = FALSE;\n $cumple_compras_tron = FALSE;\n\n\n\n if ( $_SESSION['logueado'] == TRUE ) {\n if ( ($compras_totales_tron >= $compra_minima_productos_tron) ||\n ($compras_totales_industrial >= $compra_minima_productos_industriales ) ||\n ($usuario_viene_del_registro == TRUE && $kit_comprado == FALSE)){\n\n $Cumple_Condic_Cpras_Tron_Industial = TRUE;\n }else{\n $Cumple_Condic_Cpras_Tron_Industial = FALSE;\n}\n}\n\nif ( $_SESSION['logueado'] == FALSE ) {\n if ( ($compras_totales_tron >= $compra_minima_productos_tron) || ($compras_totales_industrial >= $compra_minima_productos_industriales ) ) {\n $Cumple_Condic_Cpras_Tron_Industial = TRUE;\n }else{\n $Cumple_Condic_Cpras_Tron_Industial = FALSE;\n}\n}\nif ( $this->compras_tron >= $compra_minima_productos_tron ){\n $aplica_pago_adicional_payu_latam = TRUE ;\n $cumple_compras_tron = TRUE ;\n}\n\nSession::Set('cumple_condicion_cpras_tron_industial' , $Cumple_Condic_Cpras_Tron_Industial );\nSession::Set('aplica_pago_adicional_payu_latam' , $aplica_pago_adicional_payu_latam );\nSession::Set('cumple_compras_tron' , $cumple_compras_tron );\n\n\nreturn $Cumple_Condic_Cpras_Tron_Industial;\n\n }", "title": "" }, { "docid": "12b7e20d1f5f15e0b63975474244148a", "score": "0.51581335", "text": "public function getConsistencyRatio()\n\t{\n\t\t$al1 = 2.7699;\n\t\t$al2 = 4.3513;\n\t\t$lambda = $this->getLambda();\n\t\t$n = $this->nbCandidates;\n\t\t$consistencyRatio = ($lambda - $n)/($al1 * $n - $al2 - $n );\n\t\t$this->consistencyRatio = $consistencyRatio;\n\t\treturn $this->consistencyRatio;\n\t}", "title": "" }, { "docid": "9bc30d1d183072eb8deddafc011a6b24", "score": "0.5157741", "text": "public static function chanceOfCorrelation($value, $this_deviation, $this_mean, $common_deviation, $common_mean){\n return (double) (2 / pow(2 * pi() * pow($this_deviation, 2), 0.5) * pow(M_E, (-pow($value-$this_mean, 2) / (2 * pow($this_deviation, 2)))) / ((1 / pow(2 * pi() * pow($common_deviation, 2), 0.5) * pow(M_E, (-pow($value-$common_mean, 2) / (2 * pow($common_deviation, 2))))) + (1 / pow(2 * pi() * pow($this_deviation, 2), 0.5) * pow(M_E, (-pow($value-$this_mean, 2) / (2 * pow($this_deviation, 2)))))))-1;\n }", "title": "" }, { "docid": "047f24fe4f6615e92bfc37c3f2a81ef5", "score": "0.5148276", "text": "public function fitnessCalc($individu){\r\n\t\t$find = new Individu();\r\n\t\t//$nilai_waktu = $individu->findDuplicates($individu->slot_waktu,\"waktu\");\r\n\t\t$nilai_pc = $individu->findDuplicates($individu->kode_inventori,\"pc\");\r\n\t\t\r\n\t\t$data_pc = $individu->nilai_gen;\r\n\r\n\t\t//Inisialisasi populasi awal\r\n\t\t$index_gen = 0;\r\n\t\tforeach ($data_pc as $key => $value) {\r\n\t\t$index2 = $index_gen++;\r\n\r\n\t\t$nilai_pc = $individu->getNilaiPc($key);\r\n\t\t//$nilai_waktu = $individu->getNilaiWaktu($key);\r\n\t\t//$nilai_bobot = $nilai_pc+$nilai_waktu;\r\n\r\n\t\t$nilai_bobot = $nilai_pc;\r\n\t\t$nilai_gen = $value;\r\n\r\n\t\t$fitness = 1/1+($nilai_bobot*$nilai_gen);//Rumus fitness : F(x) = 1/1+(nilai_gen+bobot)\r\nvar_dump($nilai_bobot);\r\n\t\t$fitness = $individu->setFitness($key,$nilai_gen);\r\n\r\n\t\techo $index2.\". Nilai Fitness Individu \".$key. ' = ' . $individu->getFitness($key).' dengan nilai gen '.$individu->nilai_gen[$key].' dan slot waktu '.$individu->slot_waktu[$key];\r\n\t\techo \"</br>\";\r\n\r\n\t\t\t}//end of foreach ($data_pc as $key)\r\n\t\t\t//var_dump($individu->fitness);\r\n}", "title": "" }, { "docid": "4e52786fa56587e931452a5217eabc6f", "score": "0.5117635", "text": "public function actionCalculateallsimilarity()\n {\n $this->claculateSimilarity();\n }", "title": "" }, { "docid": "cf261f8a683ecafe1333cc63caf68c7b", "score": "0.5114044", "text": "public function asistenciaGlobal($codperiodo=null,$codfac=null){ \n $totales=self::nCitasTotales($codperiodo,$codfac);\n if($totales>0)\n return self::nAsistencias($codperiodo,$codfac)/$totales;\n return 0;\n}", "title": "" }, { "docid": "cc352c34b9cc8d29d63195cf4b208fd8", "score": "0.5111667", "text": "function formula1($q,$k){\r\n global $pi,$w,$e;\r\n $a = ($e*$q*($k*$k - $k*$q + $pi*($q - $pi)) + $w*($k*$k*(2*$q - $pi) + $k*($pi*$pi - 2*$q*$q) + $pi*$q*($q - $pi)))/($pi*$k*$q*($k*$k - $k*($q + $pi) + $pi*$q)*($q - $pi));\r\n $b = ($e*$q*($k*$k*$k - $k*$q*$q + $pi*($q + $pi)*($q - $pi)) + $w*($k*$k*$k*(2*$q - $pi) + $k*($pi*$pi*$pi - 2*$q*$q*$q) + $pi*$q*($q + $pi)*($q - $pi)))/($pi*$k*$q*($pi - $q)*($k*$k - $k*($q + $pi) + $pi*$q));\r\n $c = ($e*$q*$q*($k*$k*$k - $k*$k*$q + $pi*$pi*($q - $pi)) + $w*($k*$k*$k*(2*$q*$q - $pi*$pi) + $k*$k*($pi*$pi*$pi - 2*$q*$q*$q) + $pi*$pi*$q*$q*($q - $pi)))/($pi*$k*$q*($k*$k - $k*($q + $pi) + $pi*$q)*($q - $pi));\r\n return Array($a,$b,$c);\r\n}", "title": "" }, { "docid": "86209fc6614b44594bb983b7aae57df6", "score": "0.5075969", "text": "function circle ()\n\t\t{\n\t\t\t$drop = $_POST['r_p_drp'];\n\t\t\t$value = $_POST['value_txt'];\n\t\t\t$unit = $_POST['unit_txt'];\n\n\t\t\tif (isset($_POST['btn_ans_one']))\n\t\t\t{\n\t\t\t\tif ($drop == \"radius\")\n\t\t\t\t{\n\t\t\t\t\t \n\t\t\t\t\t$pie = pi() ; \n\t\t\t\t\t$square = $value * $value; \n\t\t\t\t\t$process_area = $pie * $square ; \n\t\t\t\t\t$answer_area = $process_area ;\n\t\t\t\t\t$process_circumference = 2 * $pie * $value ; \n\t\t\t\t\t\n\n\t\t\t\t\theader (\"Location:math_application_bootstrap/../../circle?ans_a=$answer_area&&ans_s=$process_circumference&&unit=$unit\") ; \n\n\t\t\t\t}\n\t\t\t\telse if ($drop == \"parameter\")\n\t\t\t\t{\n\t\t\t\t\t$pie = pi(); \n\t\t\t\t\t$square = $value * $value; \n\t\t\t\t\t$process = .25 * $pie * $square ;\n\t\t\t\t\t$answer_area = $process ; \n\t\t\t\t\t$process_circumference = $pie * $value ; \n\t\t\t\t\theader (\"Location:math_application_bootstrap/../../circle?ans_a=$answer_area&&ans_s=$process_circumference&&unit=$unit\") ; \n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\theader (\"Location:math_application_bootstrap/../../circle?error=data error\") ; \n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($_POST['btn_ans_two']))\n\t\t\t{\n\t\t\t\t$check = $_POST['inverse_check'];\n\t\t\t\t$drop = $_POST['r_p_rvr_drp'];\n\t\t\t\t$value = $_POST['value_two_txt'];\n\t\t\t\t$unit = $_POST['unit_two_txt'];\n\t\t\t\tif ($drop == \"radius\")\n\t\t\t\t{\n\t\t\t\t\t$pie = pi() ; \n\t\t\t\t\t$process = 1/ 2* $pie ; \n\t\t\t\t\t$result = $value / $process ; \n\t\t\t\t\t$answer = $result ; \n\t\t\t\t\theader (\"Location:math_application_bootstrap/../../circle?ans_r=$answer&&unit=$unit\") ; \n\t\t\t\t}\n\t\t\t\telse if ($drop == \"parameter\")\n\t\t\t\t{\n\t\t\t\t\t$pie = pi() ; \n\t\t\t\t\t$result = $pie / $value ; \n\t\t\t\t\t$answer = $result ; \n\t\t\t\t\theader (\"Location:math_application_bootstrap/../../circle?ans_p=$answer&&unit=$unit\") ; \n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\theader (\"Location:math_application_bootstrap/../../circle?error=data error\") ; \n\t\t\t\t}\n\n\t\t\t}\n\t\t\n\t\t}", "title": "" }, { "docid": "fc77fb899ce4e067d7edb00ceb18d47d", "score": "0.50651604", "text": "public function getPorcentajeCompletadoCAIE($idUser,$idEncuestado){\n $this->BD_Conectar();\n $SQL_CONSULTA_PORCENTAJE=\"SELECT ROUND( count( * ) *100 / (\n SELECT count( * )\n FROM `CAIE_preguntas` )) AS porcCompletado\n FROM `CAIE_respuestas`\n WHERE id_user = '{$idUser}'\n AND id_encuestado = '{$idEncuestado}'\n LIMIT 0 , 30\";\n $porcCompletado = mysql_query($SQL_CONSULTA_PORCENTAJE);\n $porcCompletado = mysql_fetch_array($porcCompletado);\n return $porcCompletado[0];\n}", "title": "" }, { "docid": "bfb17a56d5b953405003ae3bf01a8706", "score": "0.50582933", "text": "function stat_covp ($data1, $data2) {\n// covariance = sum((data1-mean1) * (data2-mean2)) / samplesize -1\n$data1_sum = 0;\n$data2_sum = 0;\n\n$len1=count($data1);\n$len2=count($data2);\n$mean1=stat_mean($data1);\n$mean2=stat_mean($data2);\n$count = 0;\n\nfor ($x = 0; $x<$len1; $x++) {\n\t$sum_array[$x] = ($data1[$x]-$mean1) * ($data2[$x]-$mean2);\n}\n\nreturn (array_sum($sum_array)/($len1));\n}", "title": "" }, { "docid": "170b0c047a7df3f166f742c39f3f5b74", "score": "0.50467885", "text": "public function isPerfect()\n {\n $result = 0;\n $divisors = $this->divisors();\n\n foreach ($divisors as $divisor) {\n $result += $divisor;\n }\n\n return $result == $this->num;\n }", "title": "" }, { "docid": "c269f37857e63645042551d5b6e577a0", "score": "0.5043184", "text": "public function Verificacion_Condiciones_Establecidas_Compras() {\n //DATOS RELACIONADOS CON EL VALOR MÍNIMO DEL PEDIDO Y CONDICION PARA REALIZAR EL PAGO.\n if ( Session::Get('cumple_condicion_cpras_tron_industial') == TRUE){\n Session::Set('valor_real_pedido', $this->Vr_Total_Pedido_Amigos );\n }else{\n Session::Set('valor_real_pedido', $this->Vr_Total_Pedido_Ocasional );\n }\n\n\n // VERIFICACIÓN DE SI CUMPLE CON EL VALOR MÍNIMO DE PEDIDO PARA PAGO EN PAYU LATAM\n if ( Session::Get('pago_minimo_payulatam') > Session::Get('valor_real_pedido' ) && Session::Get('valor_real_pedido' ) > 0 ){\n Session::Set('cumple_valor_minimo_pedido', FALSE);\n }else{\n Session::Set('cumple_valor_minimo_pedido', TRUE);\n }\n\n\n\n // VERIFICACIÓN DE SI CUMPLE O NO CON LAS COMPRAS MÍNIMAS DE PRODUCTOS TRON\n //Session::Get('minimo_compras_productos_tron')\n Session::Set('Cumple_Minimo_Compras_Productos_Tron', TRUE);\n if ( $this->Tengo_Productos_Tron == TRUE ){\n if ( ( $this->compras_tron + $this->compras_industrial ) < Session::Get('minimo_compras_productos_tron') ){\n Session::Set('Cumple_Minimo_Compras_Productos_Tron', FALSE);\n }else{\n Session::Set('Cumple_Minimo_Compras_Productos_Tron', TRUE);\n }\n }\n\n\n }", "title": "" }, { "docid": "b1eab819df01c6da4116cc272c132607", "score": "0.50169563", "text": "public function _getScores($que_id, $c_anss, $o_anss, $test1_id,$test2_id) {\n\n set_time_limit(0);\n $res = [];\n $i = 0; //key of res array, \n\n if(in_array($que_id,[5,6,7,13,15])){ //if que is of multiple ans type\n // echo 'ok1 <br>'; \n // if(in_array($que_id,[6])){ //if que is of multiple ans type\n // echo '<pre>before'; print_r($c_anss);\n // echo '<pre>'; print_r($o_anss);\n // echo '<pre>res'; print_r($res);// die;\n // }\n\n //step 1: check for perfect answer match \n foreach ($c_anss as $key => $c_ans) {\n // echo 'comp in2 = '.$test1_id.' - ' .$test2_id.'<br>';\n\n $scores = 0;\n $max_scores = 0; //max allowe scores\n $ans_id = $c_ans['ans_id'];\n\n foreach ($o_anss as $key1 => $o_ans) {\n \n $keys = $this->searchForId($ans_id, $o_anss);\n if($keys !== null){\n if($que_id == 5) {\n $scores += 20*2;\n $max_scores += 80;\n } else if($que_id == 13) {\n $scores += 20;\n $max_scores += 60;\n } else if($que_id == 15) {\n $scores += 20;\n $max_scores += 60;\n } else {\n $scores += 20;\n $max_scores += 40;\n }\n\n //remove perfect match entries from original table\n $c_anss = $this->unset_n_reset($c_anss, $key);\n $o_anss = $this->unset_n_reset($o_anss, $keys);\n\n $res[$test1_id][$test2_id][$que_id][$i]['c_ans_id'] = $ans_id;\n $res[$test1_id][$test2_id][$que_id][$i]['o_ans_id'] = $ans_id;\n $res[$test1_id][$test2_id][$que_id][$i]['score'] = $scores;\n $res[$test1_id][$test2_id][$que_id][$i]['max_scores'] = $max_scores;\n\n //for db save only\n $res[$test1_id][$test2_id][$que_id][$i]['test_que_1'] = $c_ans['test_que_id']; \n $res[$test1_id][$test2_id][$que_id][$i]['test_que_2'] = $o_ans['test_que_id'];\n $i++;\n }\n }\n // echo '<pre>res'; print_r($res); die;\n }\n }\n \n foreach ($c_anss as $key => $c_ans) {\n // echo 'ok2 <br>'; \n\n $ans_id = $c_ans['ans_id'];\n $test_que_id = $c_ans['test_que_id'];\n\n foreach ($o_anss as $key1 => $other_ans) {\n $scores = 0;\n $max_allowed_scores = 0;\n $other_ans_id = $other_ans['ans_id'];\n\n if($que_id == 3) {\n // Answer 1 and 3 equal 10\n // Answer 2 and 4 equal 10\n // All others equal 5\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 9) && ($other_ans_id == 11) ) {\n $scores +=10;\n } else if( ($ans_id == 11) && ($other_ans_id == 9) ) {\n $scores +=10;\n } else if( ($ans_id == 10) && ($other_ans_id == 12) ) {\n $scores +=10;\n } else if( ($ans_id == 12) && ($other_ans_id == 10) ) {\n $scores +=10;\n } else {\n $scores +=5;\n }\n $max_allowed_scores +=20;\n } else if($que_id == 4) {\n // Answer 1 and 3 equal 10\n // Answer 3 and 4 equal 10\n // Answer 2 and 4 equal 10\n // Answer 1 and 2 equal 0\n // Answer 2 and 3 equal 0\n // All others equal 5\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 13) && ($other_ans_id == 15) ) {\n $scores +=10;\n } else if( ($ans_id == 15) && ($other_ans_id == 13) ) {\n $scores +=10;\n } else if( ($ans_id == 15) && ($other_ans_id == 16) ) {\n $scores +=10;\n } else if( ($ans_id == 16) && ($other_ans_id == 15) ) {\n $scores +=10;\n } else if( ($ans_id == 13) && ($other_ans_id == 14) ) {\n $scores +=0;\n } else if( ($ans_id == 14) && ($other_ans_id == 13) ) {\n $scores +=0;\n } else if( ($ans_id == 14) && ($other_ans_id == 15) ) {\n $scores +=0;\n } else if( ($ans_id == 15) && ($other_ans_id == 14) ) {\n $scores +=0;\n } else {\n $scores +=5;\n }\n $max_allowed_scores +=20;\n } else if($que_id == 5) {\n\n // Answer 1 and 5 equal 10\n // Answer 2 and 4 equal 10\n // Answer 2 and 1,3,5 equal 0\n // All others equal 5\n\n if( ($ans_id == 17) && ($other_ans_id == 21) ) {\n $scores +=10*2;\n } else if( ($ans_id == 21) && ($other_ans_id == 17) ) {\n $scores +=10*2;\n } else if( ($ans_id == 18) && ($other_ans_id == 20) ) { \n $scores +=10*2;\n } else if( ($ans_id == 20) && ($other_ans_id == 18) ) {\n $scores +=10*2;\n } else if( ($ans_id == 18) && ($other_ans_id == 17) ) {\n $scores +=0;\n } else if( ($ans_id == 17) && ($other_ans_id == 18) ) {\n $scores +=0;\n } else if( ($ans_id == 18) && ($other_ans_id == 19) ) {\n $scores +=0;\n } else if( ($ans_id == 19) && ($other_ans_id == 18) ) {\n $scores +=0;\n } else if( ($ans_id == 18) && ($other_ans_id == 21) ) {\n $scores +=0;\n } else if( ($ans_id == 21) && ($other_ans_id == 18) ) {\n $scores +=0;\n } else {\n $scores +=0;\n } \n $max_allowed_scores += 80;\n } else if($que_id == 6) {\n // Answer 1 and 4 equal 10\n // Answer 2 and 3 equal 10\n // Answer 3 and 7 equal 5\n // Answer 5 and 6 equal 10\n // Answer 7 and 1,2,4,5,6 equal 0\n // All others equal 5 P\n\n if( ($ans_id == 22) && ($other_ans_id == 25) ) {\n $scores +=10;\n } else if( ($ans_id == 25) && ($other_ans_id == 22) ) {\n $scores +=10;\n } else if( ($ans_id == 23) && ($other_ans_id == 24) ) {\n $scores +=10;\n } else if( ($ans_id == 24) && ($other_ans_id == 23) ) {\n $scores +=10;\n } else if( ($ans_id == 24) && ($other_ans_id == 28) ) {\n $scores +=5;\n } else if( ($ans_id == 28) && ($other_ans_id == 24) ) {\n $scores +=5;\n } else if( ($ans_id == 26) && ($other_ans_id == 27) ) {\n $scores +=10;\n } else if( ($ans_id == 27) && ($other_ans_id == 26) ) {\n $scores +=10;\n } else if( ($ans_id == 28) && ($other_ans_id == 22) ) {\n $scores +=0;\n } else if( ($ans_id == 22) && ($other_ans_id == 28) ) {\n $scores +=0;\n } else if( ($ans_id == 28) && ($other_ans_id == 23) ) {\n $scores +=0;\n } else if( ($ans_id == 23) && ($other_ans_id == 28) ) {\n $scores +=0;\n } else if( ($ans_id == 28) && ($other_ans_id == 25) ) {\n $scores +=0;\n } else if( ($ans_id == 25) && ($other_ans_id == 28) ) {\n $scores +=0;\n } else if( ($ans_id == 28) && ($other_ans_id == 26) ) {\n $scores +=0;\n } else if( ($ans_id == 26) && ($other_ans_id == 28) ) {\n $scores +=0;\n } else if( ($ans_id == 28) && ($other_ans_id == 27) ) {\n $scores +=0;\n } else if( ($ans_id == 27) && ($other_ans_id == 28) ) {\n $scores +=0;\n } else {\n $scores +=5;\n }\n $max_allowed_scores += 40;\n } else if($que_id == 7) {\n // Answer 1 and 5 equal 10\n // Answer 2 and 3 equal 10\n // Answer 4 and 7 equal 10\n // Answer 2 and 3 equal 10\n // Answer 6 and 8 equal 10\n // Answer 1 and 7 equal 0\n // All others equal 5 Punkte\n // if(in_array($ans_id, $o_anss)) {\n // $scores += 20;\n // unset($c_anss[$key]);\n \n // if (($indexSpam = array_search($c_ans, $o_anss)) !== false) {\n // unset($o_anss[$indexSpam]);\n // }\n // } else {\n // // if()\n // $scores +=5;\n // }\n\n if( ($ans_id == 30) && ($other_ans_id == 34) ) {\n $scores +=10;\n } else if( ($ans_id == 34) && ($other_ans_id == 30) ) {\n $scores +=10;\n } else if( ($ans_id == 31) && ($other_ans_id == 32) ) {\n $scores +=10;\n } else if( ($ans_id == 32) && ($other_ans_id == 31) ) {\n $scores +=10;\n } else if( ($ans_id == 33) && ($other_ans_id == 36) ) {\n $scores +=10;\n } else if( ($ans_id == 36) && ($other_ans_id == 33) ) {\n $scores +=10;\n } else if( ($ans_id == 35) && ($other_ans_id == 37) ) {\n $scores +=10;\n } else if( ($ans_id == 37) && ($other_ans_id == 35) ) {\n $scores +=10;\n } else if( ($ans_id == 30) && ($other_ans_id == 36) ) {\n $scores +=0;\n } else if( ($ans_id == 36) && ($other_ans_id == 30) ) {\n $scores +=0;\n } else {\n $scores +=5;\n }\n\n // if($ans_id == $other_ans_id) {\n // $scores +=20;\n // } else {\n // $scores +=0;\n // } \n $max_allowed_scores += 40;\n } /*else if($que_id == 8) {\n \n if( ($ans_id == 38) && ($other_ans_id == 39) ) {\n $scores +=10;\n } else if( ($ans_id == 39) && ($other_ans_id == 38) ) {\n $scores +=10;\n } else if( ($ans_id == 39) && ($other_ans_id == 41) ) {\n $scores +=10;\n } else if( ($ans_id == 41) && ($other_ans_id == 39) ) {\n $scores +=10;\n } else if( ($ans_id == 40) && ($other_ans_id == 41) ) {\n $scores +=10;\n } else if( ($ans_id == 41) && ($other_ans_id == 40) ) {\n $scores +=10;\n } else if( ($ans_id == 40) && ($other_ans_id == 42) ) {\n $scores +=10;\n } else if( ($ans_id == 42) && ($other_ans_id == 40) ) {\n $scores +=10;\n } else {\n $scores +=5;\n }\n $max_allowed_scores += 30;\n }*/ /*else if($que_id == 9) {\n // Same answers 20\n // all others equal 5 Punkte\n // if($ans_id == $other_ans_id) {\n // $scores +=20*.15;\n // } else {\n // // if()\n $scores +=5*.15;\n // }\n $max_allowed_scores += 9;\n }*/ /*else if($que_id == 10) {\n // Answer 2 and 3 equal 10\n // All others equal 5 Punkte\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 53) && ($other_ans_id == 54) ) {\n $scores +=10;\n } else if( ($ans_id == 54) && ($other_ans_id == 53) ) {\n $scores +=10;\n } else {\n $scores +=5;\n }\n $max_allowed_scores += 20;\n }*/ /*else if($que_id == 11) {\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 55) && ($other_ans_id == 56) ) {\n $scores +=5;\n } else if( ($ans_id == 56) && ($other_ans_id == 55) ) {\n $scores +=5;\n }else if( ($ans_id == 57) && ($other_ans_id == 55) ) {\n $scores +=0;\n } else if( ($ans_id == 55) && ($other_ans_id == 57) ) {\n $scores +=0;\n }else if( ($ans_id == 57) && ($other_ans_id == 56) ) {\n $scores +=0;\n } else if( ($ans_id == 56) && ($other_ans_id == 57) ) {\n $scores +=0;\n } else {\n $scores +=5;\n }\n $max_allowed_scores += 20;\n }*/ /*else if($que_id == 12) {\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 58) && ($other_ans_id == 59) ) {\n $scores +=10;\n } else if( ($ans_id == 59) && ($other_ans_id == 58) ) {\n $scores +=10;\n }\n //Query start Answer 1,2 and 6,7 equal 0 \n else if( ($ans_id == 58) && ($other_ans_id == 63) ) {\n $scores +=0;\n } else if( ($ans_id == 63) && ($other_ans_id == 58) ) {\n $scores +=0;\n }else if( ($ans_id == 58) && ($other_ans_id == 64) ) {\n $scores +=0;\n } else if( ($ans_id == 64) && ($other_ans_id == 58) ) {\n $scores +=0;\n } else if( ($ans_id == 59) && ($other_ans_id == 63) ) {\n $scores +=0;\n } else if( ($ans_id == 63) && ($other_ans_id == 59) ) {\n $scores +=0;\n }else if( ($ans_id == 59) && ($other_ans_id == 64) ) {\n $scores +=0;\n } else if( ($ans_id == 64) && ($other_ans_id == 59) ) {\n $scores +=0;\n } \n //Query end Answer 1,2 and 6,7 equal 0 \n else {\n $scores +=5;\n }\n $max_allowed_scores += 20;\n }*/ else if($que_id == 13) {\n // Answer 1 and 2 equal 0\n // // Answer 2 and 8 equal 10\n // // Answer 5 and 6,7 equal 10\n // // Answer 4 and 7 equal 0\n // // All others equal 5\n\n if( ($ans_id == 66) && ($other_ans_id == 65) ) {\n $scores +=0;\n }else if( ($ans_id == 66) && ($other_ans_id == 72) ) {\n $scores +=10;\n }else if( ($ans_id == 72) && ($other_ans_id == 66) ) {\n $scores +=10;\n }else if( ($ans_id == 69) && ($other_ans_id == 70) ) {\n $scores +=10;\n }else if( ($ans_id == 70) && ($other_ans_id == 69) ) {\n $scores +=10;\n }else if( ($ans_id == 69) && ($other_ans_id == 71) ) {\n $scores +=10;\n } else if( ($ans_id == 71) && ($other_ans_id == 69) ) {\n $scores +=10;\n } else if( ($ans_id == 68) && ($other_ans_id == 71) ) {\n $scores +=0;\n } else if( ($ans_id == 71) && ($other_ans_id == 68) ) {\n $scores +=0;\n } else {\n $scores +=5;\n }\n\n // if($ans_id == $other_ans_id) {\n // $scores +=20;\n // } else {\n // // if()\n // $scores +=5;\n // }\n $max_allowed_scores += 60;\n } /*else if($que_id == 14) {\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 74) && ($other_ans_id == 75) ) {\n $scores +=5;\n } else if( ($ans_id == 75) && ($other_ans_id == 74) ) {\n $scores +=5;\n }\n //Query end\n else if( ($ans_id == 74) && ($other_ans_id == 77) ) {\n $scores +=5;\n }else if( ($ans_id == 77) && ($other_ans_id == 74) ) {\n $scores +=5;\n }else if( ($ans_id == 76) && ($other_ans_id == 77) ) {\n $scores +=0;\n }else if( ($ans_id == 77) && ($other_ans_id == 76) ) {\n $scores +=0;\n }else if( ($ans_id == 78) && ($other_ans_id == 74) ) {\n $scores +=0;\n } else if( ($ans_id == 74) && ($other_ans_id == 78) ) {\n $scores +=0;\n } else if( ($ans_id == 78) && ($other_ans_id == 75) ) {\n $scores +=0;\n } else if( ($ans_id == 75) && ($other_ans_id == 78) ) {\n $scores +=0;\n }else if( ($ans_id == 78) && ($other_ans_id == 76) ) {\n $scores +=0;\n } else if( ($ans_id == 76) && ($other_ans_id == 78) ) {\n $scores +=0;\n }else if( ($ans_id == 78) && ($other_ans_id == 77) ) {\n $scores +=0;\n } else if( ($ans_id == 77) && ($other_ans_id == 78) ) {\n $scores +=0;\n } else {\n $scores +=5;\n }\n $max_allowed_scores += 20;\n }*/ else if($que_id == 15) {\n // Answer 1 and 4 equal 10\n // Answer 2 and 5 equal 10\n // Answer 6 and 7 equal 10\n // All others equal 5\n // if(in_array($ans_id, $o_anss)) {\n // $scores += 20;\n // unset($c_anss[$key]);\n \n // if (($indexSpam = array_search($c_ans, $o_anss)) !== false) {\n // unset($o_anss[$indexSpam]);\n // }\n // } else {\n // // if()\n // $scores +=5;\n // }\n\n if( ($ans_id == 79) && ($other_ans_id == 82) ) {\n $scores +=10;\n } else if( ($ans_id == 82) && ($other_ans_id == 79) ) {\n $scores +=10;\n }else if( ($ans_id == 80) && ($other_ans_id == 83) ) {\n $scores +=10;\n }else if( ($ans_id == 83) && ($other_ans_id == 80) ) {\n $scores +=10;\n }else if( ($ans_id == 84) && ($other_ans_id == 85) ) {\n $scores +=10;\n }else if( ($ans_id == 85) && ($other_ans_id == 84) ) {\n $scores +=10;\n }else {\n $scores +=5;\n }\n\n // if($ans_id == $other_ans_id) {\n // $scores +=20;\n // } else {\n // // if()\n // $scores +=5;\n // }\n $max_allowed_scores += 60;\n\n } else if($que_id == 16) {\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 86) && ($other_ans_id == 89) ) {\n $scores +=0;\n } else if( ($ans_id == 89) && ($other_ans_id == 86) ) {\n $scores +=0;\n }else if( ($ans_id == 86) && ($other_ans_id == 87) ) {\n $scores +=10;\n }else if( ($ans_id == 87) && ($other_ans_id == 86) ) {\n $scores +=10;\n }else if( ($ans_id == 88) && ($other_ans_id == 89) ) {\n $scores +=10;\n }else if( ($ans_id == 89) && ($other_ans_id == 88) ) {\n $scores +=10;\n }\n //Query start Answer 1 and 4 equal 0 \n // Answer 1 and 2 equal 10 \n // Answer 3 and 4 equal 10 \n //no option for 5\n else {\n $scores +=0;\n } \n //Query end\n\n $max_allowed_scores += 20;\n } /*else if($que_id == 17) {\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 90) && ($other_ans_id == 92) ) {\n $scores +=10;\n } else if( ($ans_id == 92) && ($other_ans_id == 90) ) {\n $scores +=10;\n }else if( ($ans_id == 90) && ($other_ans_id == 91) ) {\n $scores +=0;\n }else if( ($ans_id == 91) && ($other_ans_id == 90) ) {\n $scores +=0;\n }else if( ($ans_id == 91) && ($other_ans_id == 92) ) {\n $scores +=10;\n }else if( ($ans_id == 92) && ($other_ans_id == 91) ) {\n $scores +=10;\n }\n //Query start Answer 1 and 3 equal 10\n // Answer 1 and 2 equal 0 \n // Answer 2 and 3 equal 10 \n //no option for defualt 5\n else {\n $scores +=0;\n } \n //Query end\n $max_allowed_scores += 20;\n }*/ /*else if($que_id == 18) {\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 93) && ($other_ans_id == 95) ) {\n $scores +=10;\n } else if( ($ans_id == 95) && ($other_ans_id == 93) ) {\n $scores +=10;\n }else if( ($ans_id == 93) && ($other_ans_id == 94) ) {\n $scores +=0;\n }else if( ($ans_id == 94) && ($other_ans_id == 93) ) {\n $scores +=0;\n }else if( ($ans_id == 94) && ($other_ans_id == 95) ) {\n $scores +=10;\n }else if( ($ans_id == 95) && ($other_ans_id == 94) ) {\n $scores +=10;\n }\n //Query start Answer 1 and 3 equal 10\n // Answer 1 and 2 equal 0 \n // Answer 2 and 3 equal 10 \n else {\n $scores +=0;\n } \n $max_allowed_scores += 20;\n //Query end\n }*/ else {\n $scores += 0;\n $max_allowed_scores += 00;\n }\n\n // echo \"<pre>\"; print_r($res); die;\n \n $res[$test1_id][$test2_id][$que_id][$i]['c_ans_id'] = $ans_id;\n $res[$test1_id][$test2_id][$que_id][$i]['o_ans_id'] = $other_ans_id;\n $res[$test1_id][$test2_id][$que_id][$i]['score'] = $scores;\n $res[$test1_id][$test2_id][$que_id][$i]['max_scores'] = $max_allowed_scores;\n\n //for db save only\n $res[$test1_id][$test2_id][$que_id][$i]['test_que_1'] = $c_ans['test_que_id']; \n $res[$test1_id][$test2_id][$que_id][$i]['test_que_2'] = $other_ans['test_que_id'];\n $i++;\n\n // if(in_array($que_id,[5])){ //if que is of multiple ans type\n // echo '<pre>after1111'; print_r($c_anss);\n // echo '<pre>'; print_r($o_anss);\n // echo \"<pre>res\"; print_r($res); die;\n // }\n // echo \"<pre>Res2 \"; print_r($res); //die;\n\n }\n }\n // echo \"<pre>ScoreRes \"; print_r($res); //die;\n return $res;\n }", "title": "" }, { "docid": "7c15991baef0144b3f5b05a7e8242eeb", "score": "0.5012556", "text": "function shareACircle() { $q3 = \" SELECT COUNT(*) AS commonCircles\n FROM\n (\n SELECT *\n FROM circle_participants\n WHERE userID = 1\n AND userStatus >= 1\n ) t1\n INNER JOIN\n (\n SELECT *\n FROM circle_participants\n WHERE userID = 5\n AND userStatus >= 1\n ) t2\n ON t1.circleID = t2.circleID \";\n\n $commonCircles = mysqli_fetch_array(mysqli_query($GLOBALS['conn'], $q3, 0))['commonCircles'];\n\n if($commonCircles >= 1){ return True; }\n else { return False; }\n }", "title": "" }, { "docid": "5274f3a6fe278fdda27bc681d27c51fe", "score": "0.50073856", "text": "private function calcComplexityPercentage()\n {\n return $this->getComplexityPoints() / $this->getTotalAvailableComplexityPoints();\n }", "title": "" }, { "docid": "bd3454e2a5e7ea9b074362d1b87df1b3", "score": "0.50035906", "text": "function concepto_0607($conceptos) {\n //==================================================== \n $all_ingreso = get_SNP_Ingresos($conceptos);\n //====================================================\n $CALC = (floatval($all_ingreso)) * (T_ONP / 100);\n return $CALC;\n}", "title": "" }, { "docid": "01be8eafbc59edf9e96b0d399f5d31a3", "score": "0.5003091", "text": "function majorSimilarity($m1,$m2){\n //Obviously, if the majors are the same it should return 1.\n /*if($m1 == $m2){\n return 1;\n }*/\n\n\n\n //Essentially 0 to 1... out of the classes a major takes, what percentage\n //does another major's classes make a part of percentage-wise.\n\n //Remember that if Arts majors never choose a class, they will never change the rating\n //and it will stick to those who actually are in that class.\n if(isset($this->RelationsList[$m1][$m2])){\n $number = $this->RelationsList[$m1][$m2];///(0.00001+1-$this->RelationsList[$m1][$m1]);\n //echo \"<br><h4>num :\";\n //echo $number.\" )</h4>\";\n if($number == 0){\n return .01;\n }\n return $number;\n \n \n\n }else{\n return .01;//if the thing never got set in the database.\n }\n }", "title": "" }, { "docid": "f4bc291a6b78779a111a4e86952d8412", "score": "0.5000213", "text": "public static function recalculateVDOTcorrector() {\r\n\t\t$Statement = DB::getInstance()->prepare('\r\n\t\t\tSELECT MAX(`factor`) as `factor`\r\n\t\t\tFROM (\r\n\t\t\t\tSELECT `vdot_by_time`/`vdot` AS `factor` \r\n\t\t\t\tFROM `'.PREFIX.'training` \r\n\t\t\t\tWHERE `typeid` = :typeid\r\n\t\t\t\tAND `pulse_avg` > 0\r\n\t\t\t\tORDER BY `vdot_by_time` DESC \r\n\t\t\t\tLIMIT 3\r\n\t\t\t) AS T\r\n\t\t\tLIMIT 1\r\n\t\t');\r\n\t\t$Statement->execute(array(':typeid' => Configuration::General()->competitionType()));\r\n\t\t$Result = $Statement->fetch();\r\n\r\n\t\t$VDOT_CORRECTOR = (isset($Result['factor'])) ? $Result['factor'] : 1;\r\n\r\n\t\tConfiguration::Data()->updateVdotCorrector($VDOT_CORRECTOR);\r\n\t\tself::$CONST_CORRECTOR = $VDOT_CORRECTOR;\r\n\r\n\t\treturn $VDOT_CORRECTOR;\r\n\t}", "title": "" }, { "docid": "9cdaae9d59db1ebdff9db2bf2c421792", "score": "0.49975553", "text": "public function correl(array $real0, array $real1, int $timePeriod = 30): array;", "title": "" }, { "docid": "aa360db6d07d1129560986e55ab84a9c", "score": "0.49806738", "text": "public function calculateComssion() {\n $content = file_get_contents(\"php://input\");\n\n // convart object to array\n $receive = json_decode($content, true);\n\n // take table name from the array\n $where = $receive['cond'];\n $table = $receive['table'];\n \n\n // get commission\n $doctorCom = $this->action->read($table, $where);\n\n //get total paid\n $totalPaid = 0.00;\n $paid = $this->action->read('commission_payment', $where);\n if($paid != NULL){\n foreach ($paid as $value) {\n $totalPaid += $value->paid;\n }\n }\n\n\n \n $commission = $totalCommission = 0; \n\n foreach ($doctorCom as $key => $row) { \n $bill = 0; \n $ID = explode(\":\", $row->ref);\n\n $doctorInfo = $this->action->read(\"doctors\", array(\"id\" => $row->person_id));\n $regInfo = $this->action->read(\"registrations\", array(\"id\" => $ID[1]));\n $patientInfo = $this->action->read(\"patients\", array(\"pid\" => $regInfo[0]->pid));\n $billInfo = $this->action->read(\"bills\", array(\"pid\" => $regInfo[0]->pid));\n\n if ($doctorInfo != null && $billInfo != null && $patientInfo != null) {\n\n foreach ($billInfo as $key => $row) {\n $bill += $row->grand_total;\n }\n\n $commission = round((($bill * $doctorInfo[0]->commission ) / 100),2);\n $totalCommission += $commission; \n \n\n }\n } \n\n $data = array(\n \"total_comission\" => $totalCommission,\n \"type\" => \"referred\",\n \"total_paid\" => $totalPaid \n ); \n \n\n echo json_encode($data);\n }", "title": "" }, { "docid": "923644be14e6cbd22ad4c26b68ccca8c", "score": "0.4980556", "text": "function calculaPendiente($x,$y){\r\n \r\n if(is_array($x) && is_array($y)){\r\n for ($i=2;$i<count($x);$i++){\r\n if (($x[$i-1]-$x[$i-2])/($x[$i]-$x[$i-1])!= ($y[$i-1]-$y[$i-2])/($y[$i]-$y[$i-1])){\r\n return false; // Los puntos no forman una recta;\r\n }\r\n }\r\n \r\n return true; // Los puntos forman una recta;\r\n \r\n }\r\n}", "title": "" }, { "docid": "063b19e7c3080fb47f6fa69b1a8bbd1c", "score": "0.4977991", "text": "function koonus(){\n global $r;\n global $h;\n global $pii;\n $koonuseV = $pii * ($r ** 2) * ($h / 3);\n return $koonuseV;\n}", "title": "" }, { "docid": "aad59c051672cffecdc704440550ee2e", "score": "0.49754325", "text": "public function getSvrProbability(): float {}", "title": "" }, { "docid": "0ef7befcfac4136163a58d9d58102114", "score": "0.49714836", "text": "function findSharp($intOrig, $intFinal)\n{\n $intFinal *= 750.0 / $intOrig;\n $intA = 52;\n $intB = -0.27810650887573124;\n $intC = .00047337278106508946;\n $intRes = $intA + $intB * $intFinal + $intC * $intFinal * $intFinal;\n return max(round($intRes), 0);\n}", "title": "" }, { "docid": "e4b0d05a08c1e8c89bcbec52ce7278d0", "score": "0.4953746", "text": "function calculateResults() {\n $correct = 0;\n\n // Loop through the array to check user answers\n for($i = 0; $i < count($this->questionArray); ++$i) {\n if($this->userAnswerArray[$i] == $this->answerArray[$i]) {\n ++$correct;\n }\n }\n\n // Calculate the percentage\n $returnValue = ( $correct / count($this->questionArray) * 100);\n // Format the value\n $returnValue = number_format($returnValue, 1);\n return $returnValue.' %';\n }", "title": "" }, { "docid": "9828aec067c7583cbaa8e04cbf5a3417", "score": "0.49377415", "text": "function final_cal($prob_4paidest)\n {\n\t\t$x = 348*($prob_4paidest-0.002)/0.198;\n\t\t$qotient = intval($x/12);\n\t\t$near_mul = $qotient*12;\n\t\t$remainder = $x - $near_mul;\n\t\tif($remainder<6)\n\t\t\t$y=$near_mul;\n\t\telse\n\t\t\t$y=$near_mul+12;\n\t\t$score = 252+$y;\n\t\treturn $score;\n\t}", "title": "" }, { "docid": "ca673ce04e030a7a92135c33c549bd3d", "score": "0.4934487", "text": "function multiarray_chisq_independence($arr,$mode='chisq') {\n $keys1 = array_keys($arr);\n $keys2 = array(); \n foreach($arr as $key=>$subarr) {\n $keys2 = array_merge($keys2,array_keys($subarr));\n }\n $keys2 = array_unique($keys2);\n sort($keys1); sort($keys2);\n\n foreach($keys1 as $key1) {\n foreach($keys2 as $key2) {\n if (!isset($arr[$key1][$key2])) $arr[$key1][$key2] = 0;\n }\n }\n \n foreach($keys1 as $key1) {\n $arr_by_keys1[$key1] = array_sum($arr[$key1]);\n foreach($keys2 as $key2) {\n @$arr_by_keys2[$key2] += $arr[$key1][$key2];\n }\n }\n\n foreach($keys1 as $key1) {\n if($arr_by_keys1[$key1]==0) $dropkeys1[] = $key1;\n } \n foreach($keys2 as $key2) {\n if($arr_by_keys2[$key2]==0) $dropkeys2[] = $key2;\n } \n $total = array_sum($arr_by_keys1);\n if (array_sum($arr_by_keys1) != array_sum($arr_by_keys2)) die('Error!');\n @$dof = (count($keys1) - count($dropkeys1) - 1)*(count($keys2) - count($dropkeys2) - 1);\n \n foreach($keys1 as $key1) {\n foreach($keys2 as $key2) {\n $expected[$key1][$key2] = $arr_by_keys1[$key1] * $arr_by_keys2[$key2] / $total;\n \n if($mode == 'chisq') {\n $ndiff[$key1][$key2] = ($arr[$key1][$key2] - $expected[$key1][$key2])/sqrt($expected[$key1][$key2]);\n }\n if($mode == 'gtest') {\n $gstat[$key1][$key2] = ($arr[$key1][$key2] == 0) ? 0 :\n2*$arr[$key1][$key2] * log($arr[$key1][$key2]/$expected[$key1][$key2]);\n }\n }\n }\n \n if ($mode == 'chisq') return array($dof,$ndiff);\n if ($mode == 'gtest') return array($dof,$gstat);\n}", "title": "" }, { "docid": "8813f0306afbe3bc7616d8f838b3042a", "score": "0.49300385", "text": "function getCr(){\n\t\t\t$total = 0;\n\t\t\tforeach ($this->array_cr as $value) {\n\t\t\t\t$total = $total + $value;\n\t\t\t}\n\t\t\treturn $total;\n\t\t}", "title": "" }, { "docid": "97bc4b114082ee630431f5c66b944773", "score": "0.4927193", "text": "abstract protected function calcular($x, $y);", "title": "" }, { "docid": "abc9bb18288e1eeddab973df0d723b20", "score": "0.4925904", "text": "public function SC($v1, $v2){\n \n $sumatoriaNumerador=0;\n $sumatoriaDenominador=0;\n $sumatoriaDenominador1=0;\n\t $sumatoriaDenominador2=0;\n \n //recorro solo un vector y compruebo que el usuario haya valorado tambien en el otro\n foreach($v1 as $idUsu => $valor){\n \t//compruebo que los dos usuarios con el mismo id han hecho una valoracion del item \n \tif(isset($v2[$idUsu])){\n \t\t$sumatoriaNumerador+=$v1[$idUsu]*$v2[$idUsu];\n \t\t$sumatoriaDenominador1+=$v1[$idUsu]*$v1[$idUsu];\n\t \t$sumatoriaDenominador2+=$v2[$idUsu]*$v2[$idUsu];\n \t\t//$indicesComunes[$con]=$idUsu;\n \t} \n\t\t\t}\n\t\t\t//si el numerador es 0 -> no hay valoraciones hechas por los mismos usuarios por lo que return 0;\n\t\t\tif($sumatoriaNumerador==0){\n\t\t\t\treturn 0;\t\n\t\t\t}\t \n $sumatoriaDenominador1=sqrt($sumatoriaDenominador1);\n $sumatoriaDenominador2=sqrt($sumatoriaDenominador2);\n return $sumatoriaNumerador/($sumatoriaDenominador1*$sumatoriaDenominador2);\t \t \n }", "title": "" }, { "docid": "046e0d43ad0c242b120b83a2f29dbd3a", "score": "0.49232098", "text": "function findSmallestCommonDenominator($upto){\n $testNum = 1; //this will be our guess at the correct answe\n while(true){\n $commonDivisible = true;\n for($i = 2; $i < $upto; $i++){\n if($testNum % $i != 0){\n $commonDivisible = false;\n }\n }\n if($commonDivisible == true){\n return($testNum);\n }\n $testNum += $upto;\n }\n}", "title": "" }, { "docid": "061ade62eb38481f3eaa9c0f03aa94fd", "score": "0.49215218", "text": "function GC_Calc( $lat, $lon, $lat1, $lon1 )\n{\n global $debugmode;\n\n// do all this once...\n $rlat = deg2rad( $lat );\n $rlon = deg2rad( $lon );\n $rlat1 = deg2rad( $lat1 );\n $rlon1 = deg2rad( $lon1 );\n\n// calculate the angular distance\n $drad = acos( ( sin($rlat)*sin($rlat1) ) + ( cos($rlat)*cos($rlat1)*cos($rlon-$rlon1) ) );\n\n if ( is_nan( $drad ) ) $drad = 0;\n\n// drad is distance in radians at this point, so convert to nautical miles before returning\n// Note that we're taking advantage of the fact that 1 nm = ~1 minute of arc (1/60 degree)\n $dist = rad2deg( $drad ) * 60.0;\n\n//if ( $debugmode == \"ENABLED\" )\n// print \"\\n lat=$lat lon=$lon lat1=$lat1 lon1=$lon1 dist=$dist <br>\";\n\n return ( $dist );\n}", "title": "" }, { "docid": "17cc15fa0760dc789076d91de11baa33", "score": "0.49209368", "text": "function calcul_cout_poly($inDataPropriete,$inFormType,$inDataKdb,$inDataHono,$inDataCout,$inDataCoutMedecin) {\r\n// inDataCoutMedecin = paiement au medecin\r\n// Si consultation inDataHono = Cout Plein mutuelle\r\n// inDataHono - inDataCOUT (ce que la mutuelle rembourse)\r\n// \r\n\r\n\tif ($inDataPropriete == 'consultation') {\r\n\t\t\r\n\t\tif ($inDataCout == $inDataHono) {\r\n\t\t\t$result = $inDataHono - $inDataCoutMedecin;\r\n\t\t} else{\r\n\t\t\t$result = $inDataHono - ($inDataCoutMedecin + $inDataCout);\r\n\t\t}\r\n\r\n\t}\r\n\t\r\n\tif ($inDataPropriete == 'acte') {\r\n\t\t\r\n\t\tif($inFormType == 'sm') {\r\n\t\t\t$result = $inDataKdb - $inDataCoutMedecin;\r\n\t\t} else {\r\n\t\t\t$result = $inDataKdb - ($inDataCoutMedecin + $inDataCout);\r\n\t\t}\r\n\t}\r\n\r\n\treturn round($result,2);\r\n\r\n}", "title": "" }, { "docid": "f20a2ccda8d32228c0be0ed091b459f6", "score": "0.49090758", "text": "public function calculoPerdidaPorMC(){\n global $_SQL;\n $query = sprintf(\"SELECT SUM(liters_milk) as suma FROM %s WHERE schema_id = '%s' and mc = 0\", DairyControl::$_table_name, $this->id);\n $res_sum = $_SQL->get_row($query);\n if ($_SQL->last_error != null) {\n $this->fatal_error($_SQL->last_error);\n return NULL; \n }\n return floatval($res_sum->suma); \n }", "title": "" }, { "docid": "df29c66cdbaaa98e2cc07d3c0c13604c", "score": "0.49041286", "text": "function phancum($a, $b) {\n $xcum1 = $a[0]; //0.108\t\n $ycum1 = $a[1]; //1.4\n $xcum2 = $a[3]; //0.066\n $ycum2 = $a[4]; //11.9\n\n $tong1 = 1; //vì mỗi cụm luôn có tâm cụm\n $tong2 = 1;\n\n $cum1 = array(0.3, 0.7);\n $cum2 = array(0.2, 0.5);\n\n for ($i = 0; $i < 38; $i++) {\n $x = $b[$i][0];\n $y = $b[$i][1];\n $k = khoangcach($x, $xcum1, $y, $ycum1);\n $l = khoangcach($x, $xcum2, $y, $ycum2);\n if ($k > $l) {\n $ptu1 = array($x, $y);\n $cum1 = array_merge($cum1, $ptu1);\n $tong1 += 1;\n } else {\n $ptu2 = array($x, $y);\n $cum2 = array_merge($cum2, $ptu2);\n $tong2 += 1;\n }\n }\n for ($i = 2; $i < ($tong1 * 2); $i++) {//tu 217 den 226 la tinh lai tam cum 1\n if ($i % 2 == 1) {\n $xcum1 += $cum1[$i];\n } else {\n $ycum1 += $cum1[$i];\n }\n }\n\n $xTB1 = $xcum1 / $tong1;\n $yTB1 = $ycum1 / $tong1;\n\n for ($i = 2; $i < ($tong2 * 2); $i++) {//tu 228 den 237 la tinh lai tam cum 2\n if ($i % 2 == 1) {\n $xcum2 += $cum2[$i];\n } else {\n $ycum2 += $cum2[$i];\n }\n }\n\n $xTB2 = $xcum2 / $tong2;\n $yTB2 = $ycum2 / $tong2;\n\n return array($xTB1, $yTB1, $cum1, $xTB2, $yTB2, $cum2);\n }", "title": "" }, { "docid": "323352106798ceb19e2cfb2ac76955ce", "score": "0.49013746", "text": "function countResult() {\n\t\t// n6 n7 n8 n9 n10\n\t\t// n11 n12 n13 n14 n15\n\t\t\n\t\tglobal $b_game, $nLines, $symbolSet, $payLines, $pyramidBonus, $kingBonus;\n\t\t\n\t\t\n\t\t$pyramidBonus = false;\n\t\t$kingBonus = false;\n\t\t\n\t\tif (!isset($nLines)) {\n\t\t\t$nLines = 20;\n\t\t}\n\t\t\n\t\t$JACKPOT = 11;\n\t\t$KING_BONUS = 12;\n\t\t$PYRAMID_BONUS = 13;\n\t\t$FREE_SPIN = 14;\n\t\t\n\t\t\n\t\t$symHistogram = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n\t\tfor ($i = 0; $i < 15; $i++) {\n\t\t\t$curSymbol = $symbolSet[$i];\t\t\t\t\n\t\t\t$symHistogram[$curSymbol] = $symHistogram[$curSymbol] + 1;\n\t\t}\t\t\t\n\t\tif ($symHistogram [$JACKPOT] == count($symHistogram)) {\n\t\t\t//jackpot logic here\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ($symHistogram[$KING_BONUS] > 2) {\n\t\t\t//king bonus logic here\n\t\t\t$kingBonus = true;\n\t\t}\t\t\t\n\t\t\n\t\tif ($symHistogram[$PYRAMID_BONUS] > 2) {\n\t\t\t//pyramid bonus logic here\t\n\t\t\t$pyramidBonus = true;\n\t\t}\n\t\n\t\t$freeSpinsNum = getFreeSpinsNum($symHistogram[$FREE_SPIN]);\n\t\t\n\t\t\n\t\t\n\t\t$wins = array();\n\t\t$winObj = new WinObject();\n\t\t$paylineWins = array();\n\t\t$wildReels = array(false, false, false, false, false);\n\n\n\n\t\t//if we have jackpot symbol on 2,3, or 4 reel it will act as wild on that reel\n\t\tif ($symHistogram [$JACKPOT] > 0) {\n\t\t\t//where they are?\n\t\t\tfor ($i = 0; $i < 15; $i++) {\n\t\t\t\t$reel = $i % 5;\n\t\t\t\tif ($symbolSet[$i] == $JACKPOT && ($reel > 0 && $reel < 4)) {\n\t\t\t\t\t$wildReels[$reel] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tfor ($i = 0; $i < $nLines; $i++) {\n\t\t\t$lineHistogram = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n\t\t\tfor ($ii = 0; $ii < 5; $ii++) {\n\t\t\t\t$curFrame = $payLines[$i][$ii];\t\t\t\t\n\t\t\t\t$curSymbol = $symbolSet[$curFrame];\n\t\t\t\t$lineHistogram[$curSymbol] = $lineHistogram[$curSymbol] + 1;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//check scatter\n\t\t\t$scatters = $lineHistogram[$SCATTER] + $lineHistogram[$JACKPOT];\n\t\t\t\n\t\t\tif ($scatters > 2) {\t\t\t\n\t\t\t\t$winObj = new WinObject();\n\t\t\t\t$winObj->type = $SCATTER;\n\t\t\t\t$winObj->payline = $i;\n\t\t\t\t$winObj->scatter = true;\n\t\t\t\t$winObj->rowCount = $scatters;\n\t\t\t\t$wins[] = $winObj;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$symNum = $payLines[$i][0];\n\n\t\t\tif ($symbolSet[$symNum] >= $JACKPOT || $symbolSet[$symNum] == $SCATTER) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$winObj = new WinObject();\n\t\t\t$winObj->payline = $i;\n\t\t\t$winObj->startRow = 0;\n\t\t\t$winObj->type = $symbolSet[$symNum];\n\n\t\t\tfor ($j = 1; $j < 5; $j++) {\n\t\t\t\t$currentSym = $payLines[$i][$j];\n\t\t\t\tif ($symbolSet[$currentSym] != $winObj->type && !$wildReels[$j]) {\t\t\t\t\n\t\t\t\t\t$win = getWinByPayTable($winObj->type, $j);\n\t\t\t\t\tif ($win > 0) {\n\t\t\t\t\t\t$winObj->rowCount = $j;\n\t\t\t\t\t\t$wins[] = $winObj;\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$totalWin = 0;\n\t\t\n\t\tfor ($i = 0; $i < count($wins); $i++) {\n\t\t\t$paylineNum = $wins[$i]->payline + 1;\n\t\t\t//echo \"__ \".$payTable[$symbol][$row].\" \".$symbol.\" \".$row.\" <br>\";\n\t\t\t//echo \"__ win \".getWinByPayTable($wins[$i]->symbol, $wins[$i]->rowCount).\" payline \".$paylineNum.\" rowCount \".$wins[$i]->rowCount.\" symbol \".$wins[$i]->symbol.\" <br>\";\n\t\t\t$totalWin = $totalWin + getWinByPayTable($wins[$i]->type, $wins[$i]->rowCount);\n\t\t}\n\t\t\n\t\treturn $totalWin;\n\t}", "title": "" }, { "docid": "77ee8ff0e7001b6250f46965b55b1ff4", "score": "0.49010262", "text": "function get_gpa($result) {\n $upper_sum = 0;\n $downer_sum = 0;\n foreach ($result as $row) {\n $upper_sum += $row['course_ects'] * $row['course_grade'];\n $downer_sum += $row['course_ects'];\n }\n\treturn ($downer_sum == 0) ? 0 : ($upper_sum / $downer_sum);\n}", "title": "" }, { "docid": "8eee5022a5aa42dc7c1ebb0ab41ef656", "score": "0.48985285", "text": "public function getIdealniTuk() {\n\n list($dolniTuk, $horniTuk, $obezniTuk) = $this->HraniceTuk;\n return ($dolniTuk + $horniTuk) / 2;\n }", "title": "" }, { "docid": "769fa1aa7ca35e4a15939b8b6c8523b4", "score": "0.48984462", "text": "public function dohvProsecnuOcenu($idSmestaj){\n $recenzije = $this->where('idsmestaj',$idSmestaj)->findAll();\n $sum = 0;\n $cnt=0;\n foreach($recenzije as $recenzija){\n $cnt++;\n $sum+=($recenzija->komfor+$recenzija->kvalitet+$recenzija->ljubaznost+$recenzija->cistoca+$recenzija->lokacija)/5;\n }\n if($sum==0 || $cnt==0) return 0;\n return $sum/$cnt;\n }", "title": "" }, { "docid": "99f419bf53999ab6ec69769ddcbcc37b", "score": "0.48960602", "text": "private function _calculateNonConjunctionResult(\\Core\\Search\\Lucene\\InterfaceLucene $reader) {\n\t\t$requiredVectors = array ();\n\t\t$requiredVectorsSizes = array ();\n\t\t$requiredVectorsIds = array (); // is used to prevent arrays comparison\n\t\t\n\t\t$optional = array ();\n\t\t$prohibited = array ();\n\t\t\n\t\tforeach ( $this->_terms as $termId => $term ) {\n\t\t\t$termDocs = array_flip ( $reader->termDocs ( $term ) );\n\t\t\t\n\t\t\tif ($this->_signs [$termId] === true) {\n\t\t\t\t// required\n\t\t\t\t$requiredVectors [] = $termDocs;\n\t\t\t\t$requiredVectorsSizes [] = count ( $termDocs );\n\t\t\t\t$requiredVectorsIds [] = $termId;\n\t\t\t} elseif ($this->_signs [$termId] === false) {\n\t\t\t\t// prohibited\n\t\t\t\t// array union\n\t\t\t\t$prohibited += $termDocs;\n\t\t\t} else {\n\t\t\t\t// neither required, nor prohibited\n\t\t\t\t// array union\n\t\t\t\t$optional += $termDocs;\n\t\t\t}\n\t\t\t\n\t\t\t$this->_termsFreqs [$termId] = $reader->termFreqs ( $term );\n\t\t}\n\t\t\n\t\t// sort resvectors in order of subquery cardinality increasing\n\t\tarray_multisort ( $requiredVectorsSizes, SORT_ASC, SORT_NUMERIC, $requiredVectorsIds, SORT_ASC, SORT_NUMERIC, $requiredVectors );\n\t\t\n\t\t$required = null;\n\t\tforeach ( $requiredVectors as $nextResVector ) {\n\t\t\tif ($required === null) {\n\t\t\t\t$required = $nextResVector;\n\t\t\t} else {\n\t\t\t\t// $required = array_intersect_key($required, $nextResVector);\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * This code is used as workaround for array_intersect_key()\n\t\t\t\t * slowness problem.\n\t\t\t\t */\n\t\t\t\t$updatedVector = array ();\n\t\t\t\tforeach ( $required as $id => $value ) {\n\t\t\t\t\tif (isset ( $nextResVector [$id] )) {\n\t\t\t\t\t\t$updatedVector [$id] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$required = $updatedVector;\n\t\t\t}\n\t\t\t\n\t\t\tif (count ( $required ) == 0) {\n\t\t\t\t// Empty result set, we don't need to check other terms\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($required !== null) {\n\t\t\t$this->_resVector = $required;\n\t\t} else {\n\t\t\t$this->_resVector = $optional;\n\t\t}\n\t\t\n\t\tif (count ( $prohibited ) != 0) {\n\t\t\t// $this->_resVector = array_diff_key($this->_resVector,\n\t\t\t// $prohibited);\n\t\t\t\n\t\t\t/**\n\t\t\t * This code is used as workaround for array_diff_key() slowness\n\t\t\t * problem.\n\t\t\t */\n\t\t\tif (count ( $this->_resVector ) < count ( $prohibited )) {\n\t\t\t\t$updatedVector = $this->_resVector;\n\t\t\t\tforeach ( $this->_resVector as $id => $value ) {\n\t\t\t\t\tif (isset ( $prohibited [$id] )) {\n\t\t\t\t\t\tunset ( $updatedVector [$id] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->_resVector = $updatedVector;\n\t\t\t} else {\n\t\t\t\t$updatedVector = $this->_resVector;\n\t\t\t\tforeach ( $prohibited as $id => $value ) {\n\t\t\t\t\tunset ( $updatedVector [$id] );\n\t\t\t\t}\n\t\t\t\t$this->_resVector = $updatedVector;\n\t\t\t}\n\t\t}\n\t\t\n\t\tksort ( $this->_resVector, SORT_NUMERIC );\n\t}", "title": "" }, { "docid": "0ca3722e350e0b105e8b38d437da8b31", "score": "0.48832017", "text": "function distance($Aa, $Ba, $Ca, $Da){\n// The math for this was taken from http://mathforum.org/library/drmath/view/51711.html\n$input = array($Aa, $Ba, $Ca, $Da);\nforeach($input as $name){\nif (ereg(\"[[:alpha:]]\",$name)){\necho \"You cannot enter letters into this function<br>\\n\";\ndie;\n}\nif(ereg(\"\\.\",$name)){\n$dot = \".\";\n$pos = strpos($name, $dot);\n//echo $pos.\" <br>\\n\";\nif($pos > 3){\necho \"The input cannot exceed more than 3 digits left of the decimal<br>\\n\";\ndie;\n}\n}\nif($name > 365){\necho \"The input cannot exceed 365 degrees <BR>\\n\";\ndie;\n\n}\n}\n\n\n\n$A = $Aa/57.29577951;\n$B = $Ba/57.29577951;\n$C = $Ca/57.29577951;\n$D = $Da/57.29577951; \n//convert all to radians: degree/57.29577951\n\nif ($A == $C && $B == $D ){\n$dist = 0; \n}\nelse if ( (sin($A)* sin($C)+ cos($A)* cos($C)* cos($B-$D)) > 1){ \n$dist = 3963.1* acos(1);// solved a prob I ran into. I haven't fully analyzed it yet \n\n}\n\nelse{\n\n$dist = 3963.1* acos(sin($A)*sin($C)+ cos($A)* cos($C)* cos($B-$D));\n}\nreturn ($dist);\n}", "title": "" }, { "docid": "4e09e1bc2bf369d13f61456336431963", "score": "0.48789427", "text": "private function _calculateConjunctionResult(\\Core\\Search\\Lucene\\InterfaceLucene $reader) {\n\t\t$this->_resVector = null;\n\t\t\n\t\tif (count ( $this->_terms ) == 0) {\n\t\t\t$this->_resVector = array ();\n\t\t}\n\t\t\n\t\t$resVectors = array ();\n\t\t$resVectorsSizes = array ();\n\t\t$resVectorsIds = array (); // is used to prevent arrays comparison\n\t\tforeach ( $this->_terms as $termId => $term ) {\n\t\t\t$resVectors [] = array_flip ( $reader->termDocs ( $term ) );\n\t\t\t$resVectorsSizes [] = count ( end ( $resVectors ) );\n\t\t\t$resVectorsIds [] = $termId;\n\t\t\t\n\t\t\t$this->_termsFreqs [$termId] = $reader->termFreqs ( $term );\n\t\t}\n\t\t// sort resvectors in order of subquery cardinality increasing\n\t\tarray_multisort ( $resVectorsSizes, SORT_ASC, SORT_NUMERIC, $resVectorsIds, SORT_ASC, SORT_NUMERIC, $resVectors );\n\t\t\n\t\tforeach ( $resVectors as $nextResVector ) {\n\t\t\tif ($this->_resVector === null) {\n\t\t\t\t$this->_resVector = $nextResVector;\n\t\t\t} else {\n\t\t\t\t// $this->_resVector = array_intersect_key($this->_resVector,\n\t\t\t\t// $nextResVector);\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * This code is used as workaround for array_intersect_key()\n\t\t\t\t * slowness problem.\n\t\t\t\t */\n\t\t\t\t$updatedVector = array ();\n\t\t\t\tforeach ( $this->_resVector as $id => $value ) {\n\t\t\t\t\tif (isset ( $nextResVector [$id] )) {\n\t\t\t\t\t\t$updatedVector [$id] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->_resVector = $updatedVector;\n\t\t\t}\n\t\t\t\n\t\t\tif (count ( $this->_resVector ) == 0) {\n\t\t\t\t// Empty result set, we don't need to check other terms\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// ksort($this->_resVector, SORT_NUMERIC);\n\t\t// Docs are returned ordered. Used algorithm doesn't change elements\n\t// order.\n\t}", "title": "" }, { "docid": "28cf67a3f1619cacd2e7bd1b54991156", "score": "0.48605257", "text": "public function equatorialRadius();", "title": "" }, { "docid": "4a02d3bc0db89e942be32fa4979852f8", "score": "0.4857547", "text": "public function computation($data){\n\n // From PIS\n $basic_pay_status = $data['basic_pay']['status'];\n $basic_pay = $data['basic_pay']['amount'];\n $semi_month = $basic_pay / 2;\n\n // Compensations\n $compensations['taxable'] = $data['compensations']['taxable'];\n $compensations['non_taxable'] = $data['compensations']['non_taxable'];\n $compensations['total'] = $data['compensations']['total'];\n $compensations['data'] = $data['compensations']['data'];\n\n if($data['payroll_details']['working_days'] == 5){\n\n $working_days = 21.75;\n } else if($data['payroll_details']['working_days'] == 6){\n\n $working_days = 26.083;\n }\n\n // DEDUCTIONS\n $absences = $data['timekeeping']['absences'];\n $absent_deduction = compute_absence($basic_pay, $working_days, $absences);\n\n $lates = $data['timekeeping']['lates'];\n $late_deduction = compute_late($basic_pay, $working_days, $lates);\n\n $under_times = $data['timekeeping']['ut'];\n $under_time_deduction = compute_under_time($basic_pay, $working_days, $under_times);\n\n $leaves = $data['timekeeping']['leaves'];\n\n $alu = $absent_deduction + $late_deduction + $under_time_deduction;\n\n // $deduction = $data['deductions']['total']; // ?\n\n // Overtime\n $ots = $data['timekeeping']['ot'];\n $sum_overtime = 0;\n foreach($ots as $index => $ot){\n $overtime = $ot['value'];\n $ot_type = $ot['type'];\n $overtime_comp = compute_overtime($basic_pay, $working_days, $overtime, $ot_type);\n $sum_overtime += $overtime_comp;\n }\n\n // Gross Income Computation\n $gross_income = compute_gross_income($semi_month, $compensations['total'], $sum_overtime);\n\n // GOVERNMENT DEDUCTION COMPUTATION\n $sss_deduction = find_sss_deduction($gross_income);\n $pagibig_deduction = 100;\n $philhealth_deduction = compute_phic($semi_month);\n $total_government_deductions = compute_government_deductions($sss_deduction, $pagibig_deduction, $philhealth_deduction);\n\n // WITHHOLDING TAX\n if($basic_pay_status == 1){\n\n $taxable_income = $semi_month + $compensations['taxable'] + $sum_overtime - $total_government_deductions - $alu;\n } else if($basic_pay_status == 0) {\n\n // $taxable_income = $compensations['taxable'] + $sum_overtime - $total_government_deductions ;\n }\n\n // COMPUTE THE WITHHOLDING TAX\n $withholding_tax = find_withholding_tax($taxable_income, 'semi-monthly');\n\n\n // TOTAL DEDUCTIONS\n $deductions['other_deductions'] = $data['deductions']['other_deductions'];\n $deductions['government_loans'] = $data['deductions']['government_loans'];\n $deductions['total'] = $data['deductions']['total'];\n $deductions['data'] = $data['deductions']['data'];\n $total_deductions = $alu + $withholding_tax + $deductions['total'] + $total_government_deductions;\n\n // COMPUTE THE NET PAY (SAHUUUUUUUUUUUUUUUUD)\n $net_pay = $compensations['total'] + $semi_month + $sum_overtime - $total_deductions;\n\n // Payroll Details\n $payroll_details = [\n 'wage_type' => $data['payroll_details']['wage_type'],\n 'tax_computation' => $data['payroll_details']['tax_computation'],\n 'working_days' => $data['payroll_details']['working_days'],\n 'tax_code' => $data['payroll_details']['tax_code'],\n 'sss_no' => $data['payroll_details']['sss_no'],\n 'tin_no' => $data['payroll_details']['tin_no'],\n 'hdmf' => $data['payroll_details']['hdmf'],\n 'bank_info' => $data['payroll_details']['bank_info'],\n ];\n\n $other_info = [\n 'date_hired' => $data['payroll_details']['wage_type'],\n ];\n\n // Basic Informations\n $result['emp_code'] = $data['emp_code'];\n $result['first_name'] = $data['first_name'];\n $result['last_name'] = $data['last_name'];\n $result['email'] = $data['email'];\n\n $result['basic_pay_type'] = $basic_pay_status;\n $result['basic_pay'] = $basic_pay;\n\n // Compensations\n $result['taxable_compensation'] = $compensations['taxable'];\n $result['nontaxable_compensation'] = $compensations['non_taxable'];\n $result['total_compensation'] = $compensations['total'];\n $result['compensation_data'] = $compensations['data'];\n\n // Deductions\n $result['other_deductions'] = $deductions['other_deductions'];\n $result['government_loans'] = $deductions['government_loans'];\n $result['total_deductions'] = $deductions['total'];\n $result['deduction_data'] = $deductions['data'];\n\n // Government Deductions\n $result['sss_deduction'] = $sss_deduction;\n $result['pagibig_deduction'] = $pagibig_deduction;\n $result['philhealth_deduction'] = $philhealth_deduction;\n $result['total_government_deduction'] = $total_government_deductions;\n\n // Timekeeping\n $result['lates'] = $late_deduction;\n $result['undertime'] = $under_time_deduction;\n $result['absences'] = $absent_deduction;\n $result['overtime'] = $sum_overtime;\n $result['overtime_data'] = $ots;\n $result['leaves'] = $leaves;\n\n $result['taxable_income'] = $taxable_income;\n $result['withholding_tax'] = $withholding_tax;\n\n $result['gross_income'] = $gross_income;\n $result['net_pay'] = $net_pay;\n\n $result['payroll_details'] = $payroll_details;\n $result['other_info'] = $other_info;\n\n $result['run_date'] = Carbon::now()->toDateString();\n // return Payroll_Process::all();\n\n Payroll_Process::create($result);\n return $result;\n }", "title": "" }, { "docid": "5f6994152502c02c1462cbb94ff86ec2", "score": "0.4850328", "text": "public function Totalizar_Carrito_Aplicacion_Puntos_Comisiones_Cupon() {\n // Aplición de descuentos por concepto de puntos y comisiones pendientes por pagar\n // Si el pedido se realiza para un amigo, no se aplican descuentos de comisiones y puntos\n Session::Set('Vr_Usado_Cupon_Descuento', 0);\n Session::Set('Puntos_Utilizados', 0 );\n Session::Set('Comisiones_Utilizadas', 0 );\n\n $Vr_Usado_Cupon_Descuento = 0;\n $Puntos_Utilizados = 0;\n $Comisiones_Utilizadas = 0;\n //Debug::Mostrar( 'Comisiones_punto ' . $this->Vr_Total_Pedido_Ocasional );\n\n $Pedido_Para_Amigo = Session::Get('Generando_Pedido_Amigo');\n $Aplicacion_Puntos_Comisiones = Session::Get('Aplicacion_Puntos_Comisiones');\n $VrRealPedido = 0;\n $NoDescontar = 0;\n\n // (isset($Pedido_Para_Amigo) == TRUE && $Pedido_Para_Amigo = FALSE ) ||\n\n if ( ( isset($Aplicacion_Puntos_Comisiones ) && $Aplicacion_Puntos_Comisiones == TRUE ) ){\n $Vr_Usado_Cupon_Descuento = 0;\n $Puntos_Utilizados = 0;\n $Comisiones_Utilizadas = 0;\n $this->Terceros->Consultar_Saldos_Comisiones_Puntos_x_Idtercero();\n //Session::Set('Vr_Usado_Cupon_Descuento', $Vr_Usado_Cupon_Descuento );\n $this->Saldo_Puntos_Cantidad = Session::Get('saldo_puntos_cantidad');\n $this->Saldo_Comisiones = Session::Get('saldo_comisiones');\n $this->Vr_Cupon_Descuento = Session::Get('vr_cupon_descuento');\n\n\n if ( $this->Saldo_Puntos_Cantidad > 0 ) {\n if ( $this->Vr_Total_Pedido_Real > 0 ){\n if ( $this->Saldo_Puntos_Cantidad >= $this->Vr_Total_Pedido_Real ){\n $Puntos_Utilizados = $this->Vr_Total_Pedido_Real;\n $this->Vr_Total_Pedido_Real = 0;\n $this->Vr_Total_Pedido_Ocasional = 0;\n $this->Vr_Total_Pedido_Amigos = 0;\n }else{\n //Para que si se descuentan puntos pueda pagar el pedido\n $VrRealPedido = $this->Vr_Total_Pedido_Real - $this->Saldo_Puntos_Cantidad;\n if ( $VrRealPedido < 20000 ){\n $NoDescontar = 20000 - $VrRealPedido;\n $this->Saldo_Puntos_Cantidad = $this->Saldo_Puntos_Cantidad - $NoDescontar;\n }\n\n $this->Vr_Total_Pedido_Real = $this->Vr_Total_Pedido_Real - $this->Saldo_Puntos_Cantidad;\n $this->Vr_Total_Pedido_Ocasional = $this->Vr_Total_Pedido_Ocasional - $this->Saldo_Puntos_Cantidad;\n $this->Vr_Total_Pedido_Amigos = $this->Vr_Total_Pedido_Amigos - $this->Saldo_Puntos_Cantidad;\n $Puntos_Utilizados = $this->Saldo_Puntos_Cantidad ;\n }\n }\n }\n\n if ( $this->Saldo_Comisiones > 0) {\n if ( $this->Vr_Total_Pedido_Real > 0 ){\n if ( $this->Saldo_Comisiones >= $this->Vr_Total_Pedido_Real ){\n $Comisiones_Utilizadas = $this->Vr_Total_Pedido_Real;\n $this->Vr_Total_Pedido_Real = 0;\n $this->Vr_Total_Pedido_Ocasional = 0;\n $this->Vr_Total_Pedido_Amigos = 0;\n }else{\n\n //Para que si se descuentan comisiones pueda pagar el pedido\n $VrRealPedido = $this->Vr_Total_Pedido_Real - $this->Saldo_Comisiones;\n if ( $VrRealPedido < 20000 ){\n $NoDescontar = 20000 - $VrRealPedido;\n $this->Saldo_Comisiones = $this->Saldo_Comisiones - $NoDescontar;\n }\n\n\n $this->Vr_Total_Pedido_Real = $this->Vr_Total_Pedido_Real - $this->Saldo_Comisiones;\n $this->Vr_Total_Pedido_Ocasional = $this->Vr_Total_Pedido_Ocasional - $this->Saldo_Comisiones;\n $this->Vr_Total_Pedido_Amigos = $this->Vr_Total_Pedido_Amigos - $this->Saldo_Comisiones;\n $Comisiones_Utilizadas = $this->Saldo_Comisiones;\n }\n }\n }\n }\n\n Session::Set('Vr_Usado_Cupon_Descuento', $Vr_Usado_Cupon_Descuento );\n Session::Set('Puntos_Utilizados', $Puntos_Utilizados );\n Session::Set('Comisiones_Utilizadas', $Comisiones_Utilizadas );\n\n}", "title": "" }, { "docid": "b1b7473d3cbe4ab15e9f9fcc7c928128", "score": "0.4848782", "text": "public function PoSystemFive(){\n $system = SystemTwo::latest()->first();//get the last db record as object $system\n $λ = $system->arrive_rate;\n $µ = $system->service_rate;\n $c = $system->servers;\n $k = $system->capacity;\n\n $r = $λ/$µ;\n $p = $r/$c;\n\n $Po = 0;\n\n if($p == 1){\n $po = 0;//this equal to 1/Po\n $ft = 0;//first term of equation\n $st = 0;//second term of equation\n //for loop to find summation of first term\n for($i = 0;$i < $c ;$i++){\n $ft += pow($r,$i) / $this->fact($i);\n }\n\n //second term of equation\n $st = ( pow($r,$c) / $this->fact($c) ) * ($k-$c+1);\n\n //result if equation\n $po = $ft + $st;\n //value of Po\n $Po = 1/$po;\n\n }elseif($p != 1){\n $po = 0; //this equal to 1/Po\n $ft = 0; //first term of equation\n $st = 0; //second term of equation\n //for loop to find summation of first term\n for($i = 0;$i < $c ;$i++){\n $ft += pow($r,$i) / $this->fact($i);\n }\n //second term of equation\n $st = ( pow($r,$c) / $this->fact($c) ) * ((1-pow($p,$k-$c+1))/(1-$p));\n\n //result if equation\n $po = $ft + $st;\n //value of Po\n $Po = 1/$po;\n\n }\n $system->Po = $Po;\n $system->save();\n\n return redirect()->route('calculateLqSFive');\n\n }", "title": "" }, { "docid": "60682187887ec28e014236f20552700d", "score": "0.48296", "text": "private function score($partie){\r\n\r\n $zone4 = 0 ;\r\n $zone5 = 0 ;\r\n $zone6 = 0 ;\r\n $zone7 = 0 ;\r\n $zone8 = 0 ;\r\n $zone4j2 = 0 ;\r\n $zone5j2 = 0 ;\r\n $zone6j2 = 0 ;\r\n $zone7j2 = 0 ;\r\n $zone8j2 = 0 ;\r\n $bonuszone4 = 1 ;\r\n $bonuszone5 = 1 ;\r\n $bonuszone6 = 1 ;\r\n $bonuszone7 = 1 ;\r\n $bonuszone8 = 1 ;\r\n $bonuszone4j2 = 1 ;\r\n $bonuszone5j2 = 1 ;\r\n $bonuszone6j2 = 1 ;\r\n $bonuszone7j2 = 1 ;\r\n $bonuszone8j2 = 1 ;\r\n $scorezone4 = 0 ;\r\n $scorezone5 = 0 ;\r\n $scorezone6 = 0 ;\r\n $scorezone7 = 0 ;\r\n $scorezone8 = 0 ;\r\n $scorezone4j2 = 0 ;\r\n $scorezone5j2 = 0 ;\r\n $scorezone6j2 = 0 ;\r\n $scorezone7j2 = 0 ;\r\n $scorezone8j2 = 0 ;\r\n\r\n\r\n $repository = $this\r\n ->getDoctrine()\r\n ->getManager()\r\n ->getRepository('AppBundle:Cartes_jeu_circus');\r\n\r\n\r\n\r\n $cartes = $repository->findBy(array('idpartie' => $partie));\r\n\r\n $repository = $this\r\n ->getDoctrine()\r\n ->getManager()\r\n ->getRepository('AppBundle:Modele_carte_circus');\r\n\r\n $modeles = $repository->findAll();\r\n\r\n $user = $this->getUser();\r\n\r\n $id_user = $user->getId();\r\n\r\n for ($i = 0; $i < count($modeles); $i++) {\r\n\r\n $idmodeles = $modeles[$i]->getId();\r\n\r\n for ($a = 0; $a < count($cartes); $a++) {\r\n\r\n $idcartes = $cartes[$a]->getIdcarte();\r\n\r\n if ($idmodeles == $idcartes) {\r\n\r\n $idj = $cartes[$a]->getIdjoueur();\r\n\r\n\r\n // SCORE JOUEUR CONNECTER\r\n if ( $idj == $id_user ){\r\n $sit = $cartes[$a]->getSituationcarte();\r\n if ( $sit == 4 ){\r\n if ( $zone4 == 0 ){\r\n $scorezone4 = -20 ;\r\n $zone4 = 1 ;\r\n }\r\n $valeur = $modeles[$i]->getValeur_carte();\r\n //SI CARTE EST UN BONUS\r\n if ( $valeur == 0 ){\r\n $bonuszone4 = $bonuszone4 + 1 ;\r\n }\r\n $scorezone4 = $scorezone4 + $valeur;\r\n }\r\n if ( $sit == 5 ){\r\n if ( $zone5 == 0 ){\r\n $scorezone5 = -20 ;\r\n $zone5 = 1 ;\r\n }\r\n $valeur = $modeles[$i]->getValeur_carte();\r\n //SI CARTE EST UN BONUS\r\n if ( $valeur == 0 ){\r\n $bonuszone5 = $bonuszone5 + 1 ;\r\n }\r\n $scorezone5 = $scorezone5 + $valeur;\r\n }\r\n if ( $sit == 6 ){\r\n if ( $zone6 == 0 ){\r\n $scorezone6 = -20 ;\r\n $zone6 = 1 ;\r\n }\r\n $valeur = $modeles[$i]->getValeur_carte();\r\n //SI CARTE EST UN BONUS\r\n if ( $valeur == 0 ){\r\n $bonuszone6 = $bonuszone6 + 1 ;\r\n }\r\n $scorezone6 = $scorezone6 + $valeur;\r\n }\r\n if ( $sit == 7 ){\r\n if ( $zone7 == 0 ){\r\n $scorezone7 = -20 ;\r\n $zone7 = 1 ;\r\n }\r\n $valeur = $modeles[$i]->getValeur_carte();\r\n //SI CARTE EST UN BONUS\r\n if ( $valeur == 0 ){\r\n $bonuszone7 = $bonuszone7 + 1 ;\r\n }\r\n $scorezone7 = $scorezone7 + $valeur;\r\n }\r\n if ( $sit == 8 ){\r\n if ( $zone8 == 0 ){\r\n $scorezone8 = -20 ;\r\n $zone8 = 1 ;\r\n }\r\n $valeur = $modeles[$i]->getValeur_carte();\r\n //SI CARTE EST UN BONUS\r\n if ( $valeur == 0 ){\r\n $bonuszone8 = $bonuszone8 + 1 ;\r\n }\r\n $scorezone8 = $scorezone8 + $valeur;\r\n }\r\n }\r\n\r\n // SCORE AUTRE JOUEUR\r\n else {\r\n $sit = $cartes[$a]->getSituationcarte();\r\n if ( $sit == 4 ){\r\n if ( $zone4j2 == 0 ){\r\n $scorezone4j2 = -20 ;\r\n $zone4j2 = 1 ;\r\n }\r\n $valeur = $modeles[$i]->getValeur_carte();\r\n //SI CARTE EST UN BONUS\r\n if ( $valeur == 0 ){\r\n $bonuszone4j2 = $bonuszone4j2 + 1 ;\r\n }\r\n $scorezone4j2 = $scorezone4j2 + $valeur;\r\n }\r\n if ( $sit == 5 ){\r\n if ( $zone5j2 == 0 ){\r\n $scorezone5j2 = -20 ;\r\n $zone5j2 = 1 ;\r\n }\r\n $valeur = $modeles[$i]->getValeur_carte();\r\n //SI CARTE EST UN BONUS\r\n if ( $valeur == 0 ){\r\n $bonuszone5j2 = $bonuszone5j2 + 1 ;\r\n }\r\n $scorezone5j2 = $scorezone5j2 + $valeur;\r\n }\r\n if ( $sit == 6 ){\r\n if ( $zone6j2 == 0 ){\r\n $scorezone6j2 = -20 ;\r\n $zone6j2 = 1 ;\r\n }\r\n $valeur = $modeles[$i]->getValeur_carte();\r\n //SI CARTE EST UN BONUS\r\n if ( $valeur == 0 ){\r\n $bonuszone6j2 = $bonuszone6j2 + 1 ;\r\n }\r\n $scorezone6j2 = $scorezone6j2 + $valeur;\r\n }\r\n if ( $sit == 7 ){\r\n if ( $zone7j2 == 0 ){\r\n $scorezone7j2 = -20 ;\r\n $zone7j2 = 1 ;\r\n }\r\n $valeur = $modeles[$i]->getValeur_carte();\r\n //SI CARTE EST UN BONUS\r\n if ( $valeur == 0 ){\r\n $bonuszone7j2 = $bonuszone7j2 + 1 ;\r\n }\r\n $scorezone7j2 = $scorezone7j2 + $valeur;\r\n }\r\n if ( $sit == 8 ){\r\n if ( $zone8j2 == 0 ){\r\n $scorezone8j2 = -20 ;\r\n $zone8j2 = 1 ;\r\n }\r\n $valeur = $modeles[$i]->getValeur_carte();\r\n //SI CARTE EST UN BONUS\r\n if ( $valeur == 0 ){\r\n $bonuszone8j2 = $bonuszone8j2 + 1 ;\r\n }\r\n $scorezone8j2 = $scorezone8j2 + $valeur;\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n //CALCUL DES SCORES\r\n\r\n $scoretotalj1 = ($scorezone4 * $bonuszone4) + ($scorezone5 * $bonuszone5 ) + ($scorezone6 * $bonuszone6 ) + ($scorezone7 * $bonuszone7) + ($scorezone8 * $bonuszone8);\r\n\r\n $scoretotalj2 = ($scorezone4j2 * $bonuszone4j2) + ($scorezone5j2 * $bonuszone5j2 ) + ($scorezone6j2 * $bonuszone6j2 ) + ($scorezone7j2 * $bonuszone7j2) + ($scorezone8j2 * $bonuszone8j2);\r\n\r\n $score = array();\r\n\r\n $score[1] = $scoretotalj1 ;\r\n $score[2] = $scoretotalj2 ;\r\n return $score ;\r\n }", "title": "" }, { "docid": "627c070a7a3240fca7d696c4366d55f2", "score": "0.48283625", "text": "public function calculateResult(){\n $this->handleMath('*');\n $this->handleMath('/');\n $this->handleMath('%');\n $this->handleMath('+');\n $this->handleMath('-');\n print \"calculated value:\".$this->str_calc.\"\\n\";\n }", "title": "" }, { "docid": "9817a2d59c35074c483c171bac2d15ad", "score": "0.48188636", "text": "function getProbabilidadResultado($apoyosi, $apoyono, $apoyodep, $votosi, $votono, $votodep, $nmuestra, $pabstencion){\r\n $r = $porcentaje_apoyo;\r\n \r\n \r\n \r\n}", "title": "" }, { "docid": "56c291c170251e5dda24fffa03925b2b", "score": "0.48184183", "text": "function goPerfect($y, $x)\n{\n echo '<span style=\"display: inline-block; margin-left: 3%;width: auto; vertical-align: top\"><h1>Labyrinthe parfait :</h1><br>';\n\n $start = microtime(true);\n $tab = labParf($x, $y);\n $time_elapsed_secs = microtime(true) - $start;\n\n echo '<h2>Generé en ' . $time_elapsed_secs . ' secondes</h2><br>';\n\n $result = checkWay($tab, 0, 0, $y - 1, $x - 1);\n\n while ($result != 'end') {\n $tab = labParf($x, $y);\n $result = checkWay($tab, 0, 0, $y - 1, $x - 1);\n }\n printLab($tab, $y, $x);\n echo '<br><h1>Resultat(s) :</h1><br><span>(Les différents resultats qui sont affichés sont différents (les plus courts))</span><br>';\n\n $start = microtime(true);\n $tab = resolveLabPerf($tab, 0, 0, $y - 1, $x - 1);\n $time_elapsed_secs = microtime(true) - $start;\n\n echo '<h2>Résolu en ' . $time_elapsed_secs . ' secondes</h2></span>';\n}", "title": "" }, { "docid": "7014ee9cdd1939d229c20db8f70027b0", "score": "0.48131362", "text": "public function calcularRareza(){\n $this->rareza=rand(1,10);\n return $this->rareza;\n }", "title": "" }, { "docid": "e9376e8f734f203aaa0b6016fd22f758", "score": "0.48102492", "text": "function recalc_coords($cr, $mr, $p){\n\t// don't look at it. really! it will melt your brain and make your eyes bleed!\n\treturn [round($cr[0][0]+($cr[1][0]-$cr[0][0])*($p[0]-$mr[0][0])/($mr[1][0]-$mr[0][0])), round($cr[0][1]+($cr[1][1]-$cr[0][1])*(1-($p[1]-$mr[0][1])/($mr[1][1]-$mr[0][1])))];\n}", "title": "" }, { "docid": "b04bd80e842cc42c03bc2ff8e05ff9d7", "score": "0.47989377", "text": "public function testgetPorcientos(){\n //Casos de uso -- BF > LF, BF < LF , BF = LF, BF = 0 and LF = 0, BF = 0 and LF <> 0, BF <> 0 and LF = 0\n $defending_force_strength = 0;\n $attacking_force_strenght = 0;\n $defender_chance_of_victory =0;\n $attacker_chance_of_victory = 0;\n $staleChance = 0;\n $resultado_batalla_attacker =Battle::VICTORY;\n $porciento_tropas_eliminar_atacante = 0;\n $porciento_tropas_eliminar_defensor =0;\n\n $attacker_building_damage_strength = 3000;\n $danos_a_edificios = 0; \n\n //Caso 0: attacking_force= 0 AND defending_force = 0 \n //resultados todos 0 \n $this->battle->getPorcientos(0,0, $attacker_chance_of_victory, $defender_chance_of_victory, $staleChance);\n $this->assertEquals(0, $defender_chance_of_victory, \"Caso 0, defender\"); \n $this->assertEquals(0, $attacker_chance_of_victory, \"Caso 0, attacker\"); \n $this->assertEquals(0, $staleChance, \"Caso 0, staleChance\");\n\n //Caso 1: attacking_force= 0 AND defending_force > 0 \n //resultados defender = 100, attacker = 0, staleChance = 0\n $this->battle->getPorcientos(0,1000, $attacker_chance_of_victory, $defender_chance_of_victory, $staleChance);\n\n \n $this->assertEquals(100, $defender_chance_of_victory, \"Caso 1, defender\"); \n $this->assertEquals(0, $attacker_chance_of_victory, \"Caso 1, attacker\"); \n $this->assertEquals(0, $staleChance, \"Caso 1, staleChance\");\n\n //Caso 2: attacking_force > 0 AND defending_force = 0 \n //resultados defender = 0, attacker = 100, staleChance = 0\n $this->battle->getPorcientos(1000,0, $attacker_chance_of_victory, $defender_chance_of_victory, $staleChance);\n\n \n $this->assertEquals(0, $defender_chance_of_victory, \"Caso 2, defender\"); \n $this->assertEquals(100, $attacker_chance_of_victory, \"Caso 2, attacker\"); \n $this->assertEquals(0, $staleChance, \"Caso 2, staleChance\");\n\n //Caso 3: attacking_force > 0 AND defending_force > 0 \n //resultados defender > 0, attacker > 0, staleChance > 0\n $this->battle->getPorcientos(1000,1000, $attacker_chance_of_victory, $defender_chance_of_victory, $staleChance);\n\n// var_dump($defender_chance_of_victory.\" \". $attacker_chance_of_victory.\" \". $staleChance);\n $this->assertEquals(33.33, $defender_chance_of_victory, \"Caso 3, defender\"); \n $this->assertEquals(33.33, $attacker_chance_of_victory, \"Caso 3, attacker\"); \n $this->assertEquals(33.34, $staleChance, \"Caso 3, staleChance\");\n $this->assertEquals(100, round($defender_chance_of_victory + $attacker_chance_of_victory + $staleChance), \"Caso 3, suma\");\n\n\n //Caso 4: attacking_force > 0 AND defending_force > 0 \n //resultados defender > 0, attacker > 0, staleChance > 0\n $this->battle->getPorcientos(5000,1000, $attacker_chance_of_victory, $defender_chance_of_victory, $staleChance );\n\n //var_dump($defender_chance_of_victory.\" \". $attacker_chance_of_victory.\" \". $staleChance);\n $this->assertEquals(14.29, $defender_chance_of_victory, \"Caso 4, defender\"); \n $this->assertEquals(71.43, $attacker_chance_of_victory, \"Caso 4, attacker\"); \n $this->assertEquals(14.29, $staleChance, \"Caso 4, staleChance\");\n $this->assertEquals(100, round($defender_chance_of_victory + $attacker_chance_of_victory + $staleChance), \"Caso 4, suma\");\n\n //Caso 4: attacking_force > 0 AND defending_force > 0 \n //resultados defender > 0, attacker > 0, staleChance > 0\n $this->battle->getPorcientos(5000,4901, $attacker_chance_of_victory, $defender_chance_of_victory, $staleChance );\n\n //var_dump($defender_chance_of_victory.\" \". $attacker_chance_of_victory.\" \". $staleChance);\n $this->assertEquals(33.33, $defender_chance_of_victory, \"Caso 5, defender\"); \n $this->assertEquals(33.33, $attacker_chance_of_victory, \"Caso 5, attacker\"); \n $this->assertEquals(33.34, $staleChance, \"Caso 5, staleChance\");\n $this->assertEquals(100, round($defender_chance_of_victory + $attacker_chance_of_victory + $staleChance), \"Caso 4, suma\");\n\n\n }", "title": "" }, { "docid": "199ddcd414452ca9ca11f6fe13a08927", "score": "0.47914883", "text": "function get_rcva($id, $sexe, $age, $diab, $tab, $tension, $choltot, $hdl, $ventricule, $surcharge_ventricule){\n\n if(($tab!=\"oui\")&&($tab!=\"non\")){\n die(\"Calcul du RCV impossible : toutes les données nécessaires ne sont pas renseignées dossier $id (tabac)\");\n }\n if($tension==''){\n die(\"Calcul du RCV impossible : toutes les données nécessaires ne sont pas renseignées dossier $id (tension)\");\n }\n if($choltot==''){\n die(\"Calcul du RCV impossible : toutes les données nécessaires ne sont pas renseignées dossier $id (chol tot)\");\n }\n if($hdl==''){\n die(\"Calcul du RCV impossible : toutes les données nécessaires ne sont pas renseignées dossier $id (hdl)\");\n }\n if(($ventricule!=\"oui\")&&($ventricule!=\"non\")&&($surcharge_ventricule!=\"oui\")&&($surcharge_ventricule!=\"non\")){\n die(\"Calcul du RCV impossible : toutes les données nécessaires ne sont pas renseignées dossier $id (ventricul)\");\n }\n\n $e1 = -0.9119;\n $e2 = -0.2767;\n $e3 = -0.7181;\n $e4 = -0.5865;\n $l = 11.1122;\n $m0 = 4.4181 ;\n $s0 = -0.3155 ;\n $s1 = -0.2784;\n $c1 = -1.4792 ;\n $c2 = -0.1759 ;\n $d1 = -5.8549;\n $d2 = 1.8515 ;\n $d3 = -0.3758 ;\n $horizon=10;\n\n $pas=$tension;\n $tabac=0;\n $hvg=0;\n $chol=$choltot;\n $HDL=$hdl;\n\n if($tab==\"oui\"){\n $tabac=1;\n }\n if(($ventricule!=\"oui\")&&($ventricule!=\"non\")&&($surcharge_ventricule==\"oui\")){\n $hvg=1;\n }\n if($ventricule==\"oui\"){\n $hvg=1;\n }\n\n $a = $l + $e1*log($pas) + $e2*$tabac + $e3*log($chol/$HDL) + $e4*$hvg;\n\n if($sexe==\"M\"){\n $m = $a + $c1*log($age) + $c2*$diab*1; //;=> on considère que le patient n'est pas diabétique\n }\n if($sexe=='F'){\n $m = $a + $d1 + $d2*(log($age/74)*log($age/74)) + $d3*$diab; //on considère que la patient n'est pas diabétique\n }\n\n\n $m_calc = $m0 + $m;\n $s = exp($s0 + $s1*$m);\n\n $u = (log($horizon) - $m_calc ) / $s ;\n\n $pt = 1- exp(-exp($u));\n\n $rcva=$pt*100;\n//\t$rcva=round($pt*100, 2);\n//\t$rcva=$rcva.\"%\";\n\n return $rcva;\n\n}", "title": "" }, { "docid": "bb5068189cb607bb2e2da2ebb1bdc4fd", "score": "0.47816288", "text": "abstract function calcularJuros();", "title": "" }, { "docid": "6f38aa8b2f5d44098cd67733b6540736", "score": "0.4777257", "text": "function silinder(){\n global $r;\n global $h;\n global $pii;\n $silindriV = $pii * ($r ** 2) * $h;\n return $silindriV;\n}", "title": "" }, { "docid": "2933fe71686d9e7ae408346d7c10e101", "score": "0.47633687", "text": "public function _nonConjunctionScore($docId, $reader) {\n\t\tif ($this->_coord === null) {\n\t\t\t$this->_coord = array ();\n\t\t\t\n\t\t\t$maxCoord = 0;\n\t\t\tforeach ( $this->_signs as $sign ) {\n\t\t\t\tif ($sign !== false /* not prohibited */) {\n\t\t\t\t\t$maxCoord ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor($count = 0; $count <= $maxCoord; $count ++) {\n\t\t\t\t$this->_coord [$count] = $reader->getSimilarity ()->coord ( $count, $maxCoord );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$score = 0.0;\n\t\t$matchedTerms = 0;\n\t\tforeach ( $this->_terms as $termId => $term ) {\n\t\t\t// Check if term is\n\t\t\tif ($this->_signs [$termId] !== false && \t\t\t// not prohibited\n\t\t\tisset ( $this->_termsFreqs [$termId] [$docId] )) \t\t\t// matched\n\t\t\t{\n\t\t\t\t$matchedTerms ++;\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * We don't need to check that term freq is not 0\n\t\t\t\t * Score calculation is performed only for matched docs\n\t\t\t\t */\n\t\t\t\t$score += $reader->getSimilarity ()->tf ( $this->_termsFreqs [$termId] [$docId] ) * $this->_weights [$termId]->getValue () * $reader->norm ( $docId, $term->field );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $score * $this->_coord [$matchedTerms] * $this->getBoost ();\n\t}", "title": "" }, { "docid": "9669663df48d619212c13d9488915878", "score": "0.47618324", "text": "public function getPossibility()\n {\n $flipped = array_flip($this->possibility);\n ksort($flipped);\n $randVal = rand(1, 100);\n $sumAcc = 0;\n $ret = $this->values[0];\n \n foreach ($flipped as $probability => $key) {\n if ($randVal <= $probability + $sumAcc) {\n $ret = $this->values[$key];\n } else {\n $sumAcc += $probability;\n }\n }\n\n return $ret;\n }", "title": "" }, { "docid": "c9ba1005a1a4987646d689a9124d893d", "score": "0.47581947", "text": "function buscarSumarConceptoVacacion2(array $rpc, $concepto, array $rpcv) {\n\n // 01\n for ($i = 0; $i < count($rpc); $i++) {\n if ($rpc[$i]['cod_detalle_concepto'] == $concepto) {\n $r_rpc = $rpc[$i];\n break;\n }\n }//end for\n // sumar 1\n $r_rpc_monto_pagado = ($r_rpc['monto_pagado'] > 0) ? $r_rpc['monto_pagado'] : 0;\n $r_rpc_monto_devengado = ($r_rpc['monto_devengado'] > 0) ? $r_rpc['monto_devengado'] : 0;\n\n // 02\n for ($i = 0; $i < count($rpcv); $i++) {\n if ($rpcv[$i]['cod_detalle_concepto'] == $concepto) {\n $r_rpcv = $rpcv[$i];\n break;\n }\n }//end for \n\n $r_rpcv_monto_pagado = ($r_rpcv['monto_pagado'] > 0) ? $r_rpcv['monto_pagado'] : 0;\n $r_rpcv_monto_devengado = ($r_rpcv['monto_devengado'] > 0) ? $r_rpcv['monto_devengado'] : 0;\n\n // 03\n $monto_pagado = $r_rpc_monto_pagado + $r_rpcv_monto_pagado;\n $monto_devengado = $r_rpc_monto_devengado + $r_rpcv_monto_devengado;\n\n return ($monto_pagado + $monto_devengado);\n}", "title": "" }, { "docid": "5ad1837e7216ed69911a56ef09b1c605", "score": "0.47578093", "text": "public function calculate()\n {\n $arrayScores=$this->testScores;\n if(is_array($arrayScores))\n {\n $total=0;\n foreach($arrayScores as $score)\n {\n $total=$total+$score; \n }\n $media=$total/count($arrayScores);\n switch ($media) {\n case $media >=90 && $media <=100:\n $nota=\"O\";\n break;\n case $media >=80 && $media <90:\n $nota=\"E\";\n break;\n case $media >=70 && $media <80:\n $nota=\"A\";\n break;\n case $media >=55 && $media <70:\n $nota=\"P\";\n break;\n case $media >=40 && $media <55:\n $nota=\"D\";\n break;\n case $media <40:\n $nota=\"T\";\n break;\n }\n return $nota;\n }\n }", "title": "" }, { "docid": "3a630dc49300569d203b38d5ca1c07d3", "score": "0.47537637", "text": "function formula2($q,$k){\r\n global $pi,$w,$e;\r\n //var_dump($pi,$w,$e);\r\n $a = -($e*($k - $q - $pi) + 2*$w*($k - $q))/($e*$w*($e + $w)*($e + 2*$w));\r\n $b = ($e*($k - 2*$q - $pi) + 3*$w*($k - $q))/($e*$w*($e + $w));\r\n $c = ($e*$e*$e *$q - $e*$e *$w*($k - 5*$q - $pi) - $e*$w*$w *(4*$k - 8*$q - $pi) - 4*$w*$w*$w *($k - $q))/($e*$w*($e + $w)*($e + 2*$w));\r\n return Array($a,$b,$c);\r\n}", "title": "" }, { "docid": "3ad6ef6fe2fe6fc8df3dbd5ffd9e8441", "score": "0.4750326", "text": "private function calcRgr3sp($ex){\n $ex = str_replace(\"[rga3smp]\", \"\", $ex);\n $ppc = \"\";// Diratamente proporcional ou invesamente propocional\n if(substr_count($ex, \"|dp\\\"\")==1){\n $ppc = \"dp\";\n $ex = str_replace(\"dp\\\"\", \"\", $ex);\n }elseif(substr_count($ex, \"|ip\\\"\")==1){\n $ppc = \"ip\";\n $ex = str_replace(\"ip\\\"\", \"\", $ex);\n }\n $gdz1 = substr($ex,stripos($ex,\"\\\"\"),stripos($ex,\":\")+1);// Grandeza 1\n $ex = str_replace($gdz1, \"\", $ex);\n $gdz1 = str_replace(\"\\\"\", \"\", $gdz1);\n $gdz1 = str_replace(\":\", \"\", $gdz1);\n $col1 = substr($ex, 0, stripos($ex, \";\"));// Primeira coluna (grandeza1)\n $ex = str_replace($col1.\";\",\"\",$ex);\n $col1 = explode(\",\", $col1);\n $gdz2 = substr($ex, 0, stripos($ex, \":\"));// Grandeza 2\n $ex = str_replace($gdz2.\":\", \"\", $ex);\n $col2 = substr($ex, 0, stripos($ex,\"|\"));// SEgunda coluna (grandeza 2)\n $ex = str_replace($col2, \"\", $ex);\n $col2 = explode(\",\",$col2);\n $ex = str_replace(\"|\", \"\", $ex);\n\n\n $ax = \"\";\n if($ppc==\"ip\"){\n $ax = $col2[0];\n $col2[0] = $col2[1];\n $col2[1] = $ax;\n }\n $ax = \"\";\n $parte1 = \"\";// Primeira parte da equação lado esquerdo\n $parte2 = \"\";// Segunda parte da equação lado direito\n if($col1[0]==\"x\"||$col2[1]==\"x\"){\n if($col1[0]==\"x\"){\n $parte1 = $col2[1].$col1[0];\n }else{\n $parte1 = $col1[0].$col2[1];\n }\n }else{\n $parte1 = $col1[0].\"*\".$col2[1];\n }\n if($col1[1]==\"x\"||$col2[0]==\"x\"){\n if($col1[1]==\"x\"){\n $parte2 = $col2[0].$col1[1];\n }else{\n $parte2 = $col1[1].$col2[0];\n }\n }else{\n $parte2 = $col1[1].\"*\".$col2[0];\n }\n $x = $this->calcEquacao1($parte1.\"=\".$parte2);\n if(substr_count($x ,\"&div;\")){\n $x = $this->expressaoCalc(str_replace(\"&div;\", \"/\", $x));\n }\n if(substr_count($x, \"<table\")>0){\n $x = $this->reverseShowFracao($x);\n $x = $x[0]/$x[1];\n }\n $this->setResult($x);\n }", "title": "" }, { "docid": "3f381a78dbab697c226420a6e023ad90", "score": "0.474704", "text": "function pmol_of_ssRNA($pmol_ssRNA_sequence,$pmol_ssRNA_no_of_mueg){\r\n\t\t$no_base_pair=strlen($pmol_ssRNA_sequence);\r\n\t\t$number_of_mueg=$pmol_ssRNA_no_of_mueg;\r\n\t\tif(!$no_base_pair || !$number_of_mueg){\r\n\t\treturn 0;\r\n\t\t}else{\r\n\t\treturn (($number_of_mueg*2941)/($no_base_pair));\r\n\t\t}\r\n}", "title": "" }, { "docid": "5008ba7e92fe976567b6a76c353254d8", "score": "0.47413474", "text": "public function senate_possibleCensors() {\n $result=array();\n $alreadyRejected=array();\n foreach ($this->proposals as $proposal) {\n if ( ($proposal->type=='Censor') && ($proposal->outcome==FALSE) ) {\n array_push($alreadyRejected , $proposal->parameters[0]) ;\n }\n }\n foreach($this->party as $party) {\n foreach($party->senators->cards as $senator) {\n if ($senator->priorConsul && $senator->inRome() && $senator->office != 'Dictator' && $senator->office != 'Rome Consul' && $senator->office != 'Field Consul' && !in_array($senator->senatorID , $alreadyRejected) ) {\n array_push($result , $senator);\n }\n }\n }\n // If there is no possible candidate, the Censor can exceptionnaly be a Senator without prior consul marker\n if (count($result)==0) {\n foreach($this->party as $party) {\n foreach($party->senators->cards as $senator) {\n if ($senator->inRome() && $senator->office != 'Dictator' && $senator->office != 'Rome Consul' && $senator->office != 'Field Consul' && !in_array($senator->senatorID , $alreadyRejected)) {\n array_push($result , $senator);\n } \n }\n }\n }\n return $result ;\n }", "title": "" }, { "docid": "b181b776be187ad733ef77db1c51acb4", "score": "0.4712561", "text": "public static function correctionFactor() {\r\n\t\tif (Configuration::Vdot()->useManualFactor()) {\r\n\t\t\treturn Configuration::Vdot()->manualFactor();\r\n\t\t}\r\n\r\n\t\tif (self::$CONST_CORRECTOR === false) {\r\n\t\t\t$factor = Configuration::Data()->vdotCorrector();\r\n\r\n\t\t\tif ($factor != 1 && $factor != 0)\r\n\t\t\t\tself::$CONST_CORRECTOR = $factor;\r\n\t\t\telse\r\n\t\t\t\tself::recalculateVDOTcorrector();\r\n\t\t}\r\n\r\n\t\treturn self::$CONST_CORRECTOR;\r\n\t}", "title": "" }, { "docid": "e370783d32bf60cf7a7c2f45888460bc", "score": "0.47005662", "text": "public function calculateAll() {\n $this->db->query(COMMISSION_CALCULATOR_SQL_DELETE_LEG_VALUES, array($this->period_id));\n $this->db->query(COMMISSION_LEVEL_SQL_DELETE_RANKS, array($this->period_id, 1));\n $businessCenters = $this->db->query(CALCULATE_COMMISSION_VALUES_SQL_FIND_BUSINESS_CENTERS_WITH_CV_BY_PERIOD, array($this->period_id));\n while(false != ($bc = $businessCenters->fetch())) {\n $this->rollup_rank($bc['business_center_id']);\n }\n echo \"Calculating Recognition Rank values.\\n\";\n $this->db->query(\"CALL commission_calculate_generation_volume_ranks(?);\",array($this->period_id));\n }", "title": "" }, { "docid": "706b1dfb7a7d5930bfb5b0c9a36cdde6", "score": "0.4699624", "text": "function getErrorDeMuestra2($total, $muestra) {\r\n if ($muestra >= $total) {\r\n $result = 0;\r\n } else {\r\n\r\n $z = Constantes::z;\r\n\r\n $t1 = ($total - $muestra) / ($muestra * ($total - 1));\r\n $result = ($z / 2) * sqrt($t1);\r\n }\r\n return $result;\r\n}", "title": "" }, { "docid": "e05d25b82fa032ad1c1bc9a41647ee83", "score": "0.46932468", "text": "function centrocampo($casa, $trasferta){\r\n $Casa = $casa['pti'];\r\n $Fuori = $trasferta['pti']+5*($casa['gioc']-$trasferta['gioc']);\r\n $delta = abs($Casa -$Fuori);\r\n if($delta<2){\r\n $mod['casa']=0;\r\n $mod['fuori']=0;\r\n return $mod; }\r\n $pti=(int)($delta/2);\r\n if($pti>4)\r\n $pti=4;\r\n $mod['casa']=abs($Casa-$Fuori)/($Casa-$Fuori)*$pti;\r\n $mod['fuori']=-abs($Casa-$Fuori)/($Casa-$Fuori)*$pti;\r\n return $mod;\r\n}", "title": "" }, { "docid": "6258d32fe0631090cd55f8da5cee45b5", "score": "0.46919572", "text": "function find_potions($elist, $opt, $ilist=NULL, $j0=0, $curr_effs=NULL) {\n# it's necessary to avoid looking for useless recipes\n global $allings, $alleffs;\n global $my_eff_to_get, $extraeffs, $extraeffs_lim, $possible_ings;\n global $alchemy;\n global $allpotions, $reduce_level;\n global $poteffs, $keyeffs, $eff_score_con, $eff_score_pro;\n global $finde;\n global $find_poison, $allow_neg, $exact_match;\n global $freqmax, $baseid;\n\n $nfound = 0;\n if (count($allpotions)>MAXPOTION*1.5) {\n $reduce_level = 3;\n return $nfound;\n }\n\n if (!is_array($elist)) {\n $elist = array($elist);\n }\n if (is_null($ilist))\n $ilist = array();\n if (is_null($curr_effs)) {\n $curr_effs = array();\n foreach ($ilist as $i)\n $allings[$i]->add_effs($curr_effs);\n }\n\n while (count($elist) &&\n\t isset($curr_effs[$elist[0]]) &&\n\t $curr_effs[$elist[0]]>=2) {\n array_shift($elist);\n $j0 = 0;\n }\n\n if (!count($elist))\n return 0;\n\n $e = $elist[0];\n $ni = count($ilist);\n if (!isset($possible_ings[$e])) {\n $possible_ings[$e] = $alleffs[$e]->set_possible_ings(0);\n if (count($possible_ings[$e])<2)\n return 0;\n }\n\n $freqbase = 100;\n foreach ($ilist as $i)\n $freqbase -= pow(5-$allings[$i]->get_freq(),2);\n\n# determine whether or not check do master-level (one-ingredient) potions\n# - only done first time through (opt==0)\n# - only done on first ingredient (ni==0)\n# - only done if master-level (alchemy>=100)\n# - only done if only one effect is being looked for (count($elist)==1)\n $do_master = ($opt==0 && $ni==0 && $alchemy>=100 && count($elist)==1);\n\n for ($j=$j0; $j<count($possible_ings[$e]); $j++) {\n $i = $possible_ings[$e][$j];\n\n $ilist[$ni] = $i;\n $cet = $curr_effs;\n $allings[$i]->add_effs($cet);\n if ($do_master)\n $master_e = $allings[$i]->master_eff();\n\n# decide \n# (a) is this recipe complete?\n# (b) if it is complete, is it worth adding it?\n# (c) is it worth adding extra ingredients?\n $save = 1;\n $cont = 1;\n if ($ni>=3)\n $cont = 0;\n\n if ($ni<1) {\n if ($do_master && $master_e==$elist[0]) {\n# master-level potion matches requested effect\n\t$save = 1;\n }\n else {\n $save = 0;\n }\n }\n else {\n foreach ($elist as $et) {\n# This is all that's needed to figure out if the recipe is complete\n# The harder question is whether it's worth adding it\n if (!isset($cet[$et]) || $cet[$et]<2)\n $save = 0;\n }\n }\n if ($save || $cont) { \n $sc_con = 0;\n $sc_pro = 0;\n $keyid = $possid = $effid = \"\";\n $done = array();\n# set up ID to list effects in order\n# a) requested effects\n# b) related effects\n# c) unrelated effects, same sign\n# d) unrelated effects, opposite sign\n\n# am I really using scores at this point??\n# the scores are getting shifted in this rewrite, but it should be\n# a uniform set of shifts\n foreach ($my_eff_to_get as $et) {\n if ((!isset($cet[$et]) || $cet[$et]<2) && (!$do_master || $master_e != $et))\n continue;\n $done[$et] = 1;\n $effid .= \".$et\";\n\t$sc_pro += 100;\n }\n# possid represents what might be possible if I build on this recipe\n# BUT it shouldn't add in effects with no pairs... unless opt>0, in\n# which case previous pairs list is no longer valid\n $ex_effids = array();\n if (!$opt)\n $exlist = $extraeffs_lim;\n else\n $exlist = $extraeffs;\n foreach ($exlist as $et => $v) {\n if (!isset($cet[$et]) || isset($done[$et]))\n continue;\n if ($cet[$et]<2) {\n if ($alleffs[$et]->is_ing($i))\n $possid .= \".$et\";\n continue;\n }\n if ($exact_match) {\n $cont = $save = 0;\n break;\n }\n $done[$et] = 1;\n $effid .= \".$et\";\n $possid .= \".$et\";\n $ex_effids[] = $et;\n $sc_pro += 10*$extraeffs[$et];\n }\n# get rid of leading dot before copying value\n if ($effid!=\"\")\n $effid = substr($effid, 1);\n# save \"key\" values (i.e., based only upon requested effects and\n# related effects)\n $sc_key = $sc_pro;\n $keyid = $effid;\n $echk = array_keys($cet);\n sort($echk);\n foreach ($echk as $et) {\n if (!isset($cet[$et]) || $cet[$et]<2 || isset($done[$et]))\n continue;\n if ($exact_match) {\n $cont = $save = 0;\n break;\n }\n if ($alleffs[$et]->is_poison()!=$find_poison)\n continue;\n $done[$et] = 1;\n $effid .= \".$et\";\n $sc_pro ++;\n }\n $antiused = array();\n foreach ($echk as $et) {\n if (!isset($cet[$et]) || $cet[$et]<2 || isset($done[$et]))\n continue;\n if ($exact_match) {\n $cont = $save = 0;\n break;\n }\n#OK, now all we're left with are the side-effects\n# Are they acceptable side-effects?\n $effid .= \".$et\";\n\n\t$ok = 0;\n\tif ($find_poison) {\n# if I'm trying to make a poison it cannot include any good effects\n $save = 0;\n $cont = 0;\n }\n elseif (isset($cet[$alleffs[$et]->get_anti()]) &&\n $cet[$alleffs[$et]->get_anti()]>=2 &&\n !isset($antiused[$alleffs[$et]->get_anti()])) {\n# if this is a negative sideffect, with a counteracting postive\n# effect that has been included in the potion, the potion is actually OK\n $ok = 1;\n $antiused[$alleffs[$et]->get_anti()] = 1;\n }\n elseif (!$allow_neg &&\n ($opt>1 || $alleffs[$et]->get_poison()!=2 || count($ilist)==4)) {\n# I'm making a potion and allow_neg is 0\n# note that some sideeffects are being allowed through at $opt=0, $opt=1\n# (later check whether they can be counteracted... but only if more\n# ingredients can be added)\n $save = 0;\n }\n elseif ($opt==1) {\n# if I'm specifically looking to counter negatives right now, don't save\n# anything that adds more negatives\n $save = 0;\n }\n\tif (!$ok) {\n\t $sc_con += 10*max(1,$alleffs[$et]->get_poison());\n }\n else {\n# Still give a small negative even if the effect has been counteracted\n# (Since it is worse than a potion with no negative at all)\n\t $sc_con ++;\n }\n }\n }\n if ($save && !$do_master)\n $cont = 0;\n\n if (count($allpotions)>MAXPOTION)\n $reduce_level = 2;\n\n if ($cont && $reduce_level) {\n $possid = $baseid . $possid;\n if (isset($freqmax[$possid])) {\n# This is the maximum possible frequency if I continue with this\n# recipe\n $freqtot = $freqbase - pow(5-$allings[$i]->get_freq(),2);\n# Only at minimal reduce level: skip if unlikely to be an improvement\n if ($reduce_level==1 &&\n $freqmax[$possid]>=$freqtot+FREQDIFF/2)\n $cont = 0;\n# More aggressive reductions needed: skip if it's not going to be an\n# improvement over existing recipes\n if ($reduce_level==2 &&\n ($freqmax[$possid]>$freqtot || $sc_con>=10))\n $cont = 0;\n }\n }\n\n if ($save) {\n if ($opt==3)\n\treturn ++$nfound;\n\n# calculate statistics specific to this set of ingredients\n $ingid = join($ilist, '.');\n# freqtot is set up to have a maximum value of 100 (if all ingredients have a value of 5)\n# it then goes down for each ingredient below 5, with very large\n# deductions for particularly small freqs\n# minimum value of 0, if all 4 ingredients are quest-specific\n $freqtot = $freqbase - pow(5-$allings[$i]->get_freq(),2);\n if ($reduce_level==1 &&\n isset($freqmax[$keyid]) &&\n $freqmax[$keyid]>=$freqtot+FREQDIFF)\n $save = 0;\n if ($reduce_level==2 &&\n isset($freqmax[$keyid]) &&\n ($freqmax[$keyid]>$freqtot || $sc_con>=10))\n $save = 0;\n }\n# OK, I'm actually going to save this recipe\n if ($save && $opt<=2) {\n $nfound++;\n $freqmax[$keyid] = isset($freqmax[$keyid]) ? max($freqmax[$keyid], $freqtot) : $freqtot;\n $freqmax[$baseid] = isset($freqmax[$baseid]) ? max($freqmax[$baseid], $freqtot) : $freqtot;\n if (count($ex_effids)>1) {\n foreach ($ex_effids as $et) {\n $tid = $baseid . '.' . $et;\n $freqmax[$tid] = isset($freqmax[$tid]) ? max($freqmax[$tid], $freqtot) : $freqtot;\n }\n }\n\n $allpotions[$ingid] = new Potion($ingid, $ilist, $freqtot, $effid, $keyid,\n\t $sc_pro, $sc_con, $sc_key);\n }\n\n if ($cont) {\n $nfound += find_potions($elist, $opt, $ilist, $j+1, $cet);\n if ($opt==3)\n\treturn $nfound;\n if ($reduce_level>=3)\n return $nfound;\n }\n }\n return $nfound;\n}", "title": "" }, { "docid": "6b8068736a213e782efa71a15681707e", "score": "0.468791", "text": "function calculatePercentages()\n\t\t{//_9_5_1_5e60209_1150803583140_149323_232\n\t\t\t$q = new DBQuery ( \"SELECT antwoordid, COUNT(*) as c FROM ns_stemmen WHERE pollid=\".$this->pollID.\" GROUP BY antwoordid\" );\n\n\t\t\t$sum = 0;\n\n\t\t\twhile($row = $q->Fetch()) {\n\t\t\t\t$this->candidates[$row['antwoordid']]['votecount'] = $row['c'];\n\t\t\t\t$sum += $row['c'];\n\t\t\t}\n\n\t\t\tif($sum == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tforeach($this->candidates as $key => $val ) {\n\t\t\t\t\t$percentage = round(((($val['votecount'])/$sum)*1000)/10,1);\n\t\t\t\t\t$this->candidates[$key]['percentage'] = $percentage + 0.0;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "c475110950d51f736f36d5f2345cbe9e", "score": "0.46852717", "text": "function CalcularContrapestacion($db, $idconvenio,$tipopracticante, $codigocarrera)\n{\n $sqlcontraprestacion = \"SELECT C.ValorContraprestacion, C.IdTipoPagoContraprestacion, \ttpc.NombrePagoContraprestacion from Contraprestaciones C INNER JOIN conveniocarrera cc ON cc.IdContraprestacion = C.IdContraprestacion AND cc.codigoestado ='100' INNER JOIN TipoPagoContraprestaciones tpc on tpc.IdTipoPagoContraprestacion = C.IdTipoPagoContraprestacion WHERE C.ConvenioId = '\".$idconvenio.\"' and C.codigoestado = '100' and C.IdTipoPracticante ='\".$tipopracticante.\"' and cc.codigocarrera = '\".$codigocarrera.\"'\"; \n $valorcontrapestacion = $db->GetRow($sqlcontraprestacion);\n return $valorcontrapestacion; \n}", "title": "" }, { "docid": "62b3f01275811788e82efed79d01e462", "score": "0.46764046", "text": "public function getConsommation()\n {\n $quantite = $this->getQuantite();\n $distanceParcourue = $this->getDistanceParcourue();\n\n $consommation = $distanceParcourue > 0 ? $quantite * 100 / $distanceParcourue : 0;\n\n return $consommation;\n }", "title": "" }, { "docid": "f8c57cd630c80bfd500579f744fb3510", "score": "0.4673688", "text": "function comision($Xlogin,$igv,$mes0,$ano0,$mes1,$ano1){\n\t\t\n\t\t$mes=\"a.hora between '$ano0-$mes0-05' and '$ano1-$mes1-05'\";\n\t\t$idcq=qry(\"select idcliente from clientes where codigo1='$Xlogin'\");\n\t\t$ids=array();\n\t\twhile($idc1=mysql_fetch_row($idcq))\n\t\t{\n\t\t\t$ids[]=$idc1[0];\n\t\t}\n\t\t$idc=implode(\",\",$ids);\n\t\t\n\t\t$puntos=puntos($Xlogin);\n\t\t$puntos=$puntos[0];\n\t\t$re=qry(\"select descuento1,descuento2,descuento3,idnivel from niveles where $puntos between limite1 and limite2 and tipo='VENTALIBRE'\");\t\n\t\t$r2=mysql_fetch_row($re);\n\t\t$re=qry(\"select descuento1,descuento2,descuento3,idnivel from comision where $puntos between limite1 and limite2 and tipo='VENTALIBRE'\");\t\n\t\t$r3=mysql_fetch_row($re);\n\t\tif($r3[0]>0)\n\t\t{\n\t\t\t$qry1=\"select sum(if((b.promo=0 and c.categoria=1), b.total,0))/($igv)*($r3[0]/100),sum(if((c.categoria=2 and b.promo=0),b.total,0))/($igv)*($r3[1]/100),sum(if((b.promo=0 and c.categoria=4),b.total,0))/($igv)*($r3[2]/100),COUNT(distinct a.idop) from operacionesp a, pedido_detalle b,productos c,puntos d where d.idop=a.idop and d.tipo=1 and idcliente in ($idc) and $mes and a.idop=b.idop and c.idprod=b.idprod and b.idprod not in (254,1598) and b.promo not in (505,506) and a.canal='CATALOGO' and a.estado=107\";\n\t\t\t//echo $qry1.\"<br />\";\n\t\t\t$res1 = qry($qry1) or die(\"2--\".mysql_error());\n\t\t\t$prespro_past=mysql_fetch_row($res1);\n\t\t\t\n\t\t\t//////con promo\n\t\t\t$qry1=\"select sum(b.precio*b.cantidad*((100-c.descuento$r2[3])/(100*$igv))*(0/100)) from operacionesp a, stockmovesp b,promo_puntos c,puntos d where d.idop=a.idop and d.tipo=1 and idcliente in ($idc) and $mes and a.idop=b.idop and c.idprod=b.promo and b.idprod not in (254,1598) and b.promo not in (505,506) and a.canal='CATALOGO' and b.nota2='' and a.estado=107\";\n\t\t\t$res1 = qry($qry1) or die(\"2--\".mysql_error());\n\t\t\t$precpro_past=mysql_fetch_row($res1);\t\t\t\t\n\t\t\t///////////\t\t\n\t\t\t\n\t\t\treturn $descact_past=$prespro_past[0]+$prespro_past[1]+$prespro_past[2]+$precpro_past[0];\n\t\t}\n\t}", "title": "" }, { "docid": "d1103a223ad9ec04925e58e511fe8f54", "score": "0.46687233", "text": "public static function comments_Overall($commnets=[]){\n $media=0;\n $nr_coments = 0;\n \n $array_commnts = @nr_comments($commnets);\n \n foreach ($array_commnts as $k_s=>$v_s){\n $media= $media + ($k_s *$v_s );\n $nr_coments= $nr_coments + $v_s;\n }\n return @round($media / $nr_coments , 1) ;\n}", "title": "" }, { "docid": "2b3d3019b7aed5c74c308daab4ecb46a", "score": "0.4658436", "text": "function calculate_interest($p,$r,$days) {\n $time=$days/365;\n $si = $p*$r*12*$time/100;\n return round(round($si*1000)/1000);\n}", "title": "" }, { "docid": "f7fd6597f59d337b573abe11d60b42c3", "score": "0.46545973", "text": "public static function get_cupons_near($distance, $qr_string, $idcup) {\n $cuponns = array();\n $dbh = Conectar::con();\n $fa = date('Y-m-d');\n //consulta de los cupones que se encuentran cerca asi como las distancia aproximada al sitio, la distancia puede variar dependiendo\n //Del comportamiento del dispositivo.\n $cs = \"SELECT c.id_cupon as coupon_id, c.id_imagen_vista_previa as preview_img_id, c.titulo as title, c.descripcion_corta as short_description,\nc.descripcion_larga as long_description, c.id_imagen_extra as extra_img_id,date_format(c.vigencia_inicio, '%d/%m/%Y') as life_from, \ndate_format(c.vigencia_fin, '%d/%m/%Y') as life_to, c.terminos_y_condiciones as terms_and_conditions,'$qr_string' as qr_string,'$distance' as distance,s.nombre \nas place_name from sitio s inner join empresa e on e.id_empresa = s.id_empresa inner join revision_objeto r \non e.id_empresa = r.id_empresa inner join cupon c on r.id_revision_objeto = c.id_revision_objeto \nwhere r.status = 'A' and c.vigencia_inicio <= '$fa' and c.vigencia_fin >= '$fa' and c.id_cupon = '$idcup' group by c.id_cupon;\";\n $result = mysqli_query($dbh, $cs) or die(mysqli_error());\n foreach ($result as $res) {\n $cuponns = $res;\n }\n//Si no existe ningun registro que coincida con la consulta se enviar un arreglo vacio\n return $cuponns;\n }", "title": "" }, { "docid": "c42a3fe8549b3f6fd87e0c982d917cec", "score": "0.4653194", "text": "public function getGrafSvalovinaKrokNormal() {\n return ($this->SvalovinaPriSoucasneVazeExtrem - $this->SvalovinaPriSoucasneVazeNad) / 3;\n }", "title": "" }, { "docid": "074c3fce75d47d428b6914eb60dff4ef", "score": "0.4651745", "text": "function distancia_entre_puntos($lat_a,$lon_a,$lat_b,$lon_b){\n \t$lat_a = $lat_a * pi() / 180;\n \t$lat_b = $lat_b * pi() / 180;\n \t$lon_a = $lon_a * pi() / 180;\n \t$lon_b = $lon_b * pi() / 180;\n \t/**/\n \t$angle = cos($lat_a) * cos($lat_b);\n \t$xx = sin(($lon_a - $lon_b)/2);\n \t$xx = $xx*$xx;\n \t/**/\n \t$angle = $angle * $xx;\n \t$aa = sin(($lat_a - $lat_b)/2);\n \t$aa = $aa*$aa;\n \t$angle = sqrt($angle + $aa);\n //$salida = arco_seno($angle);\n $salida = asin($angle);\n /*gps_earth_radius = 6371*/\n \t$salida = $salida * 2;\n \t$salida = $salida * 6371;\n\t\t\n\t\t$salida = round($salida*100)/100;\n \treturn $salida;\n }", "title": "" }, { "docid": "857aa1847b218b5eedea138db51b67ce", "score": "0.4651628", "text": "function actualizarPrecioCantidad($id_articulo, $id_orden_compra, $id_categoria_programatica, $cantidad, $precio, $fuente_financiamiento, $tipo_presupuesto,$id_clasificador_presupuestario, $idordinal, $id_articulo_compra, $idtrabajador){\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$sql_actualizar = mysql_query(\"update conceptos_simular_nomina set\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t\ttotal = total + '\".$precio.\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprecio_unitario = precio_unitario + '\".$precio.\"'\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t\twhere idconceptos_simular_nomina = '\".$id_articulo_compra.\"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand idcertificacion_simular_nomina = '\".$id_orden_compra.\"'\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$sql_articulos_servicios = mysql_query(\"select * from articulos_servicios where idarticulos_servicios = '\".$id_articulo.\"'\")or die(mysql_error());\n\t\t\t\t$bus_articulos_servicios = mysql_fetch_array($sql_articulos_servicios);\n\t\t\t\t\n\t\t\t\t//$idordinal = $bus_articulos_servicios[\"idordinal\"];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$sql_conceptos_simular_nomina = mysql_query(\"select * from conceptos_simular_nomina where idconceptos_simular_nomina = '\".$id_articulo_compra.\"'\");\n\t\t\t\t$bus_conceptos_simular_nomina = mysql_fetch_array($sql_conceptos_simular_nomina);\n\t\t\t\t\n\t\t\t\t$id_categoria_programatica = $id_categoria_programatica;\n\t\t\t\t//$id_clasificador_presupuestario = $bus_articulos_servicios[\"idclasificador_presupuestario\"];\n\t\t\t//echo $id_clasificador_presupuestario;\n\t\t\t\n\t\t\t$total_articulo_individual = $cantidad * $precio;\n//\t\t\techo \"TOTAL ARTICULO INDIVIDUAL: \".$total_articulo_individual;\n\t\t\t\n\t\t\t//echo \"TIPO CONCEPTO: \".$bus_articulos_servicios[\"tipo_concepto\"].\"<br />\";\n\t\t\tif($bus_articulos_servicios[\"tipo_concepto\"] == 1){\n\t\t\t\t\n\t\t\t\t$monto_total = $total_articulo_individual;\n\t\t\t\t$exento = 0; \n\t\t\t}else{\n\t\t\t\t$monto_total = 0;\n\t\t\t\t$exento = $total_articulo_individual;\n\t\t\t}\n\t\t\t\n\t\t\t// busco el precio y la cantidad anteriores para restarsela a los totales\n\t\t\t$sql_orden_compra_viejo = mysql_query(\"select * from certificacion_simular_nomina where idcertificacion_simular_nomina = '\".$id_orden_compra.\"'\");\n\t\t\t$bus_orden_compra_viejo = mysql_fetch_array($sql_orden_compra_viejo);\n\t\t\n\t\t\t$exento_viejo = $bus_orden_compra_viejo[\"exento\"];\n\t\t\t$sub_total_viejo = $bus_orden_compra_viejo[\"sub_total\"];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// actualizo la tabla de articulos de la orden de compra con la nueva cantidad y el nuevo precio\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\n\t\t\n\t\t\t\n\t\t\t// ACTUALIZO LOS TOTALES EN LA TABLA ORDEN_COMPRA_SERVICIO\n\t\t\t$total_anterior = $sub_total_viejo - $exento_viejo;\n\t\t\t$total_nuevo = $monto_total - $exento;\n\t\t\t$sql_actualiza_totales = mysql_query(\"update certificacion_simular_nomina set \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsub_total = sub_total + '\".$monto_total.\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\texento = exento + '\".$exento.\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotal = total + '\".$total_nuevo.\"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twhere idcertificacion_simular_nomina=\".$id_orden_compra.\" \")or die(\"4: \".mysql_error());\n\t\t\t\n\t\t\t\n\t\t\t// CONSULTA DEL TOTAL DISPONIBLE EN EL PRESUPUESTO PARA SABER SI EL PRODUCTO PUEE SER PROCESADO O RECHAZADO POR FALTA DE DISPONIBILIDAD PRESUPUESTARIA\n\t\t\t\n\t\t\t\n\t\t\t$sql = mysql_query(\"select * from conceptos_simular_nomina where \n\t\t\t\t\t\t\t\t\t\t\t\t\tidconceptos_simular_nomina = '\".$id_articulo_compra.\"'\")or die(\"5: \".mysql_error());\n\t\t\t$bus = mysql_fetch_array($sql);\n\t\t\t\n\t\t\tif($bus[\"estado\"] == \"aprobado\" || $bus[\"estado\"] == \"sin disponibilidad\"){ // en cualquiera de stos estados el articulo tiene partida en el maestro\n\t\t\t\t\t$sql_compra_servicio = mysql_query(\"select * from certificacion_simular_nomina where \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tidcertificacion_simular_nomina = '\".$id_orden_compra.\"'\")or die(\"6: \".mysql_error());\n\t\t\t\t\t$bus_compra_servicio = mysql_fetch_array($sql_compra_servicio);\n\t\t\t\t\t//echo \"ID: \".$bus_compra_servicio[\"idcategoria_programatica\"].\" \";\n\n\t\t\t\t\t$partida_impuestos = 0;\n\n\n\t\n\t\t\t\t$sql_imputable = mysql_query(\"select total from conceptos_simular_nomina where idconceptos_simular_nomina = '\".$id_articulo_compra.\"'\")or die(\"12: \".mysql_error());\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$bus_imputable = mysql_fetch_array($sql_imputable);\n\t\t\t\t$total_imputable = $bus_imputable[\"total\"];\n\t\t\t\t//echo \"TOTAL: \".$total_imputable. \"ID \";\n\t\t\t\t//echo $bus_imputable[\"totales\"];\n\t\t\t\t//echo $bus_imputable[\"exentos\"];\n\n\n\tif($bus_articulos_servicios[\"tipo_concepto\"] == 1){\n\n\t\n\t\t\t\t$sql_maestro = mysql_query(\"select * from maestro_presupuesto where anio = \".$_SESSION[\"anio_fiscal\"].\" \n\t\t\t\t\t\t\t\t\t\t\t\tand idcategoria_programatica = '\".$id_categoria_programatica.\"' \n\t\t\t\t\t\t\t\t\t\t\t\tand idclasificador_presupuestario = '\".$id_clasificador_presupuestario.\"'\n\t\t\t\t\t\t\t\t\t\t\t\tand idfuente_financiamiento = '\".$fuente_financiamiento.\"'\n\t\t\t\t\t\t\t\t\t\t\t\tand idtipo_presupuesto = '\".$tipo_presupuesto.\"'\n\t\t\t\t\t\t\t\t\t\t\t\tand idordinal = '\".$idordinal.\"'\")or die(\"8: \".mysql_error());\n\n\t\t\t\t\n\t\t\t\t$bus_maestro = mysql_fetch_array($sql_maestro);\n\t\t\t\t\n\t\t\t\t//$disponible = $bus_maestro[\"monto_actual\"]-$bus_maestro[\"total_compromisos\"];\n\t\t\t\t$disponible = consultarDisponibilidad($bus_maestro[\"idRegistro\"]);\n\t\t\t\tif($total_imputable > $disponible){\n\t\t\t\t\t$sql_partida = mysql_query(\"update partidas_simular_nomina set estado = 'sobregiro', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmonto = monto + '\".$total_articulo_individual.\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmonto_original = monto_original + '\".$total_articulo_individual.\"' \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhere \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tidcertificacion_simular_nomina = '\".$id_orden_compra.\"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand idmaestro_presupuesto = '\".$bus_maestro[\"idRegistro\"].\"'\")or die(\"15: \".mysql_error());\n\t\t\t\t\t$estado = \"sin disponibilidad\";\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t$sql_partida = mysql_query(\"update partidas_simular_nomina set estado = 'disponible', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmonto = monto + '\".$total_articulo_individual.\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmonto_original = monto_original + '\".$total_articulo_individual.\"' \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhere \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tidcertificacion_simular_nomina = \".$id_orden_compra.\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand idmaestro_presupuesto = '\".$bus_maestro[\"idRegistro\"].\"'\")or die(\"16: \".mysql_error());\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t$estado = \"aprobado\";\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//echo \"ALLA\";\n\t\t\t\t$estado = \"aprobado\";\n\t\t\t}\n\t\t}else{\n\t\t\t$estado = \"aprobado\";\n\t\t}\n\t\t\t// CONSULTA DEL TOTAL DISPONIBLE EN EL PRESUPUESTO PARA SABER SI EL PRODUCTO PUEE SER PROCESADO O RECHAZADO POR FALTA DE DISPONIBILIDAD PRESUPUESTARIA\t\t\n\t\t\t\n\t\t\t$sql2 = mysql_query(\"update conceptos_simular_nomina set estado = '\".$estado.\"' \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhere idconceptos_simular_nomina = '\".$id_articulo_compra.\"'\")or die(\"17: \".mysql_error());\n\t\t\t\n\t\tif($sql2){\n\t\t\t\tregistra_transaccion(\"Actualizar Precio Cantidad de Orden de Compra (\".$id_articulo_compra.\")\",$login,$fh,$pc,'certificacion_simular_nominas');\n\n\t\t\t\t//echo \"exito\";\n\t\t}else{\n\t\t\t\tregistra_transaccion(\"Actualizar Precio Cantidd de Orden de Compra ERROR (\".$id_articulo_compra.\")\",$login,$fh,$pc,'certificacion_simular_nominas');\n\n\t\t\t\t//echo $sql2.\" MYSQL ERROR: \".mysql_error();\n\t\t}\n\t\n}", "title": "" }, { "docid": "7fa7b3f788a11bf9505ce725a0e25246", "score": "0.46460032", "text": "function calcularRetencao();", "title": "" }, { "docid": "3128f1734ea641c45f1637961b964494", "score": "0.4644812", "text": "function casalDivorcio($im, $x1, $y1, $cor)\n{\n // quadrado branco 1\n $xa = $x1 - 15;\n $ya = $y1 + 10;\n $xb = $x1 + 15;\n $yb = $y1 + 40;\n imagerectangle($im, $xa, $ya, $xb, $yb, $cor);\n // circulo branco 1\n $cx = $x1 + 85;\n $cy = $y1 + 25;\n imageellipse($im, $cx, $cy, 30, 30, $cor);\n // linha Horizontal branco 2\n $x3 = $x1 + 15;\n $y3 = $y1 + 25;\n $x4 = $x3 + 55;\n $y4 = $y3;\n imageline($im, $x3, $y3, $x4, $y4, $cor);\n imageline($im, $x3 + 20, $y3 + 5, $x4 - 20, $y4 - 5, $cor);\n}", "title": "" }, { "docid": "7de1343a3b9a7dfc61098dc9951098d2", "score": "0.46422502", "text": "function Montant()\n{\n global $sum;\n // variables\n $MontantRembourse_II = 23 * 70 / 100;\n $MontantRembourse_I30 = 23 * 30 / 100;\n $MontantRembourse_A = 25 * 70 / 100;\n $MontantRembourse_30 = 25 * 30 / 100;\n $MontantRembourse_D = 30 * 70 / 100;\n $MontantRembourse_C = 39.00 * 70 / 100;\n $MontantRembourse_C30 = 39.00 * 30 / 100;\n $MontantRembourse_B = 41.70 * 70 / 100;\n $MontantRembourse_B30 = 41.70 * 30 / 100;\n $MontantRembourse_III = 46.70 * 70 / 100;\n $MontantRembourse = 46.00 * 70 / 100;\n $MontantRembourse_E = 47.73 * 70 / 100;\n $MontantRembourse_E30 = 47.73 * 30 / 100;\n $MontantRembourse_IV = 51 * 70 / 100;\n $MontantRembourse_1 = 57.50 * 70 / 100;\n\n // Coditions for choosing doctors\n switch ($_POST['Medecin-A']) {\n case 'Généraliste secteur 1':\n case 'Généraliste secteur 2':\n case 'Spécialiste secteur 1':\n case 'Spécialiste secteur 2':\n $sum = $MontantRembourse_A;\n break;\n case 'Psychiatre secteur 1':\n $sum = $MontantRembourse_B;\n break;\n case 'Psychiatre secteur 2':\n $sum = $MontantRembourse_C;\n break;\n default:\n break;\n }\n\n // Coditions for choosing doctors\n switch ($_POST['Medecin-B']) {\n case 'Généraliste secteur 1':\n case 'Spécialiste secteur 1':\n $sum = $MontantRembourse_D;\n break;\n case 'Généraliste secteur 2':\n case 'Spécialiste secteur 2':\n $sum = $MontantRembourse_II;\n break;\n case 'Psychiatre secteur 1':\n $sum = $MontantRembourse_III;\n break;\n case 'Psychiatre secteur 2':\n $sum = $MontantRembourse_C;\n break;\n case 'Cardioloque secteur 1':\n $sum = $MontantRembourse_IV;\n break;\n case 'Cardioloque secteur 2':\n $sum = $MontantRembourse_E;\n break;\n default:\n break;\n }\n\n // Coditions for choosing doctors\n switch ($_POST['Medecin-C']) {\n case 'Spécialiste secteur 1':\n case 'Spécialiste secteur 2':\n $sum = $MontantRembourse;\n break;\n case 'Psychiatre secteur 1':\n case 'Psychiatre secteur 2':\n $sum = $MontantRembourse_1;\n break;\n default:\n break;\n }\n\n // Coditions for choosing doctors\n switch ($_POST['Medecin-II']) {\n case 'Généraliste secteur 1':\n case 'Spécialiste secteur 1':\n $sum = $MontantRembourse_30;\n break;\n case 'Généraliste secteur 2':\n case 'Spécialiste secteur 2':\n $sum = $MontantRembourse_I30;\n break;\n case 'Psychiatre secteur 1':\n $sum = $$MontantRembourse_B30;\n break;\n case 'Psychiatre secteur 2':\n $sum = $MontantRembourse_C30;\n break;\n case 'Cardioloque secteur 2':\n case 'Cardioloque secteur 2':\n $sum = $MontantRembourse_E30;\n break;\n\n default:\n break;\n }\n\n condition();\n echo $sum;\n // var_dump($_POST);\n}", "title": "" }, { "docid": "bed859ec3879ea3f8b46fae3ba8c80ef", "score": "0.46421704", "text": "function totale_conto_camera($conto_id, $today) {\n\n \n\n \n \n// conto \n $diff_data = $this->rs_diff_data($today, $conto_id);\n\n \n// extra\n $tot_extra = $this->rs_tot_extra($conto_id);\n \n if($tot_extra){\n $rs_tot_extra = $tot_extra[0]->tot_extra ; \n }\n \n else {\n $rs_tot_extra = 0;\n \n }\n//acconti\n $acconti_a = $this->rs_acconti($conto_id) ;\n \n if ($acconti_a) {\n $acconti = $acconti_a[0]->tot_p_acconti ;\n }\n\n else {\n $acconti = 0 ;\n }\n\n $numero_notti = (float) $diff_data[0]->numero_notti;\n\n /* Arrivi nella notte se il check in e prima delle 6.59 si calcola una altra notte */\n if ($diff_data[0]->ora_check_in < 7) {\n $ora_gg_in = 1;\n } else {\n $ora_gg_in = 0;\n };\n\n /* fine $diff_data['ora_check_in'] */\n\n /* Partenze nel pomeriggio se il check out e dopo le 13.59 si calcola una altra notte */\n if ($diff_data[0]->ora_check_out > 13) {\n $ora_gg_out = 1;\n } else {\n $ora_gg_out = 0;\n };\n /* fine */\n\n /* Day Use numero di notti è = 0 se il check in e tra delle 7.00 e il check out prima 14.00 si calcola una altra notte */\n if (($diff_data[0]->numero_notti < 1) && ($diff_data[0]->ora_check_in >= 7) && ($diff_data[0]->ora_check_out <= 13)) {\n $ora_gg_cl = 1;\n } else {\n $ora_gg_cl = 0;\n };\n /* fine */\n\n\n $notti_preno = (float) $diff_data[0]->notti_previste; // notti previste \n $prezzo_camara = (float) $diff_data[0]->prezzo; // prezzo Camera \n $notti_solare = (float) $diff_data[0]->numero_notti; // notti solare \n $notti_conto = (float) $numero_notti + (float) $ora_gg_in + (float) $ora_gg_out + (float) $ora_gg_cl ; // notti da pagare\n $conto_camera = (float) $diff_data[0]->prezzo * (float) $notti_conto; // importo del pernotto attuale \n $conto_camera_preno = (float) $diff_data[0]->prezzo * (float) $notti_preno; // importo del pernotto previsto\n $totale_extra = (float) $rs_tot_extra; // impoto degli extra\n $totale_acconti = (float) $acconti; // totale Acconti \n $saldo = (float) $conto_camera + (float) $totale_extra - (float) $totale_acconti; // saldo attuale\n $saldo_preno = (float) $conto_camera_preno + (float) $totale_extra -(float) $totale_acconti; // saldo da reno\n $tot_conto_preno = (float) $conto_camera_preno + (float) $totale_extra;\n\n /* ----------------------- Fine Calcola il Totale Notti----------------------------------- */\n\n\n\n // tax\n $tot_tax_pagato = $this->rs_tax($conto_id );\n\n $dati = array(\n \"notti_preno\" => round($notti_preno, 3),\n \"notti_solare\" => round($notti_solare, 3),\n \"notti_conto\" => round($notti_conto, 3),\n \"conto_camera\" => round($conto_camera, 3),\n \"conto_camera_preno\" => round($conto_camera_preno, 3),\n \"totale_extra\" => round($totale_extra, 3),\n \"totale_acconti\" => round($totale_acconti, 3),\n \"saldo\" => round($saldo, 3),\n \"saldo_preno\" => round($saldo_preno, 3),\n \"tot_conto_preno\" => round($tot_conto_preno, 3),\n \"tot_tax_pagato\" => round($tot_tax_pagato, 3),\n );\n\n return $dati;\n }", "title": "" }, { "docid": "4b1b7d2754d6dec469de5466c9efa281", "score": "0.46416909", "text": "public function summKomun () {\n $all_flatcost=( $this->floorsnum*1*$this->porchnum*$this->flats['fl4'])+\n ( $this->floorsnum*1*$this->porchnum*$this->flats['fl3'])+\n (( $this->floorsnum*2*$this->porchnum-3)*$this->flats['fl2'])+\n (3*$this->flats['fl1']);\n return $all_flatcost;\n\n}", "title": "" }, { "docid": "7b7716cd900e3f8c6661ffdc86e442e7", "score": "0.46393278", "text": "function fitness($coursesExpected, $coursesSuggested){\n \n $totalFitness = 0.0;\n\n //adds 1/the rank of the course in the list.\n foreach($coursesExpected as $course){\n $totalFitness += 1/(array_search($course,$coursesSuggested));\n }\n\n return $totalFitness;\n }", "title": "" }, { "docid": "dd6b21b8d04eedf7d706c4738145a7bb", "score": "0.46363172", "text": "public function getGrafSvalovinaKrokNad() {\n\n $extremniSvalovina = $this->SvalovinaPriSoucasneVazeExtrem + 3 * $this->GrafSvalovinaKrokNormal;\n\n return ($extremniSvalovina - $this->SvalovinaPriSoucasneVazeExtrem) / 3;\n }", "title": "" } ]
6e990bf3c57d173b83f3cc2ee3bc5016
Test that string is invalid even if it starts with a numeric value
[ { "docid": "4c88da7a0e507355bf4327a5360842da", "score": "0.7513232", "text": "public function testValidateStringContainingNumericFalse()\n {\n $actual = $this->_rule->validate('100 Meters');\n $this->assertFalse($actual);\n }", "title": "" } ]
[ { "docid": "77e3606e4c47165963bfa51603c4baff", "score": "0.7401536", "text": "function hasOnlyAlphaNumerics($string)\n{\n\t$regex=\"/^[A-Za-z0-9\\s]+$/\";\n\tif(preg_match($regex, $string))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "0990d091c48bc7c17c559b190df05073", "score": "0.7205589", "text": "function sanitize_number($str)\n{\n return preg_match('/[^0-9]/', '', $str);\n}", "title": "" }, { "docid": "b3122ab9491ae80f0e8f330085f48c5a", "score": "0.703386", "text": "function alpha_dash_space_number($str){\n\t\tif (! preg_match(\"/^([-A-Za-z0-9_ ])+$/i\", $str)) {\n\t\t\t$this->form_validation->set_message('alpha_dash_space_number', 'The %s field may only contain alpha-numeric characters, spaces, underscores, and dashes.');\n\t\t\treturn FALSE;\n\t\t} else {\n\t\t\treturn TRUE;\n\t\t}\n\t}", "title": "" }, { "docid": "16a2ee3b5a525776251062a7e93a4bff", "score": "0.6993178", "text": "function validateString($string)\r\n {\r\n $newString = preg_replace('/[^\\da-z,. -]/i', '',$string);\r\n return strcmp($string,$newString)==0;\r\n }", "title": "" }, { "docid": "65a5d8cfec7a1840816155f3b6ed9c92", "score": "0.69834065", "text": "function verifyNumeric ($testString) {\n\treturn (is_numeric ($testString));\n}", "title": "" }, { "docid": "10485a6d94122169914d48c67fd7212e", "score": "0.6956391", "text": "function valid_name($name){\r\n\r\n #Test each character and make sure it is not a number\r\n for($i = 0; $i < strlen($name); $i++){\r\n if( is_numeric( $name[$i] ) ){\r\n return False;\r\n }\r\n }\r\n return True;\r\n }", "title": "" }, { "docid": "b651b1932b0f0fcd9f526c009c4afadc", "score": "0.6893326", "text": "function hasOnlyNumbers($string)\n{\n\t$regex=\"/^[0-9]+$/\";\n\tif(preg_match($regex, $string))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "357a1b49002d2c2a6ebd04989a1bef28", "score": "0.68566644", "text": "function verifyAlphaNum ($testString) {\n\t// Check for letters, numbers and dash, period, space and single quote only. \n\treturn (preg_match (\"/^([[:alnum:]]|-|\\.| |')+$/\", $testString));\n}", "title": "" }, { "docid": "c04e6aa1ca5829ce82d5952b589bc888", "score": "0.68449605", "text": "function is_num_ex($val)\n{\n $val = mb_strtoupper($val);\n return strpos($val,'E') !== false || (strpos($val,'0') === 0) ? false : is_numeric($val);\n}", "title": "" }, { "docid": "a074a32be2b388e53443063f1ba89869", "score": "0.6656041", "text": "function justTextAndNumbers($string){\r\n\t$invalid = ereg(\"[^[:alnum:]?!:; æøåÆØÅ\\\"\\'\\\\\\(\\)/äöÄÖ%.,_-]\", $string)\t;\r\n\treturn !$invalid;\r\n}", "title": "" }, { "docid": "f30ebd30abc15ba4e5bdfa54cd1fe853", "score": "0.66523194", "text": "public function testValueInvalidchars() {\n $this->assertEquals('VALIDATION.STRING_CONTAINS_INVALID_CHARACTERS', $this->getValidator()->validate('DE7953290000001042200.')[0]['__CODE'] );\n }", "title": "" }, { "docid": "2ced869d118876d0f9864c9b1a8b309e", "score": "0.6639338", "text": "function is_digit($arg){if (preg_match(\"/^\\d+$/\",$arg)){return true;}else{return false;}}", "title": "" }, { "docid": "e25978d0bb78d364715df40c6a4728fa", "score": "0.65989614", "text": "public static function alpha_num_str() {\n OrginaValidator::extend('alpha_num_str', function($attribute, $value) {\n return !is_numeric($value);\n });\n }", "title": "" }, { "docid": "b431d2f5d5d376d4ee43cc69d37b28f6", "score": "0.6598505", "text": "function validString($string)\n{\n str_replace(array(\" \",\"-\"), \"\", $string);\n return ctype_alpha($string);\n}", "title": "" }, { "docid": "d869f8c02c0493712697e924780f3365", "score": "0.65604824", "text": "function invalidAddress($address){\n $address = str_replace(' ','',$address);\n if (preg_match(\"/^[a-zA-Z0-9]{2,}$/\",$address)) {\n $result = false;\n }else{\n $result = true;\n }\n\n return $result;\n}", "title": "" }, { "docid": "d974afc0129bcad39bd3cafcb49aa173", "score": "0.65484667", "text": "function isNotNum($var,$msg){\r\n\tglobal $errors;\r\n\tif(empty($var))\t\treturn FALSE;\r\n\tif(!ctype_digit($var)){\r\n\t\t$var=\"\";\r\n\t\t$errors[]=$msg.\" אינו מספר\";\r\n\t\treturn TRUE;\r\n\t}\r\n\treturn FALSE;\r\n}", "title": "" }, { "docid": "b5ef88eab80a443966c130ed69e26b5b", "score": "0.65166295", "text": "public function testIsAlphaNum():void{\n\t\t$this::assertTrue($this->qrcode->isAlphaNum('ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:'));\n\n\t\t$this::assertFalse($this->qrcode->isAlphaNum('abc'));\n\t}", "title": "" }, { "docid": "e8713dfa7171e6d21e2c54d5c94feb25", "score": "0.63994145", "text": "function is_natural($str)\n{\n\treturn (bool) preg_match('/^[0-9]+$/', $str);\n}", "title": "" }, { "docid": "e61dffc91c64f0a00891288dbca96cfe", "score": "0.6383972", "text": "private function _is04($input){\n\t\tif (preg_match('/^[0-4]$/', $input)) {return false;}\n\t\n\treturn \"The given input is not an alphanumeric string.\";\n\t}", "title": "" }, { "docid": "9467cb309fbeeab14e2cbb4abaaaaa3b", "score": "0.635154", "text": "public function is_num($value){\r\n if(!is_numeric($value) && $value != ''){\r\n $this->add_message('You are only allowed to have numeric characters.');\r\n return FALSE;\r\n }\r\n return TRUE;\r\n }", "title": "" }, { "docid": "604a325a18480454eeb10e071392a5a8", "score": "0.6335011", "text": "public function validate()\n\t{\n\t\t$result = (bool) (preg_match('/^\\d*\\.?\\d*$/', $this->clean));\n\t\t\n\t\tif ($result === FALSE)\n\t\t{\n\t\t\t$this->errors[] = \"{$this->field_name} is not a number.\";\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "dd1592c323b377f6c7d2ce79ac747675", "score": "0.63153815", "text": "protected function _validateAlphaNumeric($field, $value) {\n\n\t\t\treturn StringMethods::match($value, \"#^([a-zA-Z0-9]+)$#\");\n\t\t}", "title": "" }, { "docid": "05defb596411f860cd217d4c94c63a40", "score": "0.6313117", "text": "protected function isAlnum($value, $key)\n {\n \t if(empty($value) || trim($value) == \"\") {\n \t\tthrow new InvalidArgumentException(\"Expected $key number to be set\");\n \t }\n \t\n \t if(!is_string($value) && !is_int($value) && !is_float($value)) {\n \t \t throw new InvalidArgumentException(\"$value is not valid $key value. Must be alphanum\"); \n \t }\n \t else {\n \t \t return $value;\n \t }\n }", "title": "" }, { "docid": "5151e454de4f7ee32c4cddee2765b72c", "score": "0.6310682", "text": "function checkNumbers($field)\n {\n $field = str_replace(\" \", \"\", $field);\n if (preg_match('/^\\d+$/', $field)) {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "f3374a78b88c459f5827efff698b6286", "score": "0.63065845", "text": "public function letterandnumber($string){\n\t\tif( preg_match('/^[\\w.]*$/', $string) ){\n\t\t\treturn \"true\";\r\n\t\t}else{\n\t\t\treturn \"false\";\r\n\t\t}\n\t}", "title": "" }, { "docid": "5cf2f2191175d3b6e3f71a5e84c97ba8", "score": "0.63032466", "text": "protected function validateValidNameNumber($attribute, $value)\r\n\t\t{\r\n\t\t\treturn preg_match('/^[\\pL\\s\\.\\'\\pN]+$/u', $value);\r\n\t\t}", "title": "" }, { "docid": "bd5e3ae18deedd715643b3439817e038", "score": "0.62899435", "text": "function validate_field_is_numeric(string $field_value, array &$field): bool\n{\n if (!(is_numeric($field_value))) {\n $field['error'] = 'THAT\\'S NOT A NUMBER FOOL';\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "7df62a2dc955837f4736812f9ba751b0", "score": "0.6261083", "text": "public function test_alpha_numeric($input, $expected, $utf8 = FALSE)\r\n\t{\r\n\t\t$this->assertSame(\r\n\t\t\t$expected,\r\n\t\t\tValidate::alpha_numeric($input, $utf8)\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "81f55689f1084765761f388d255bf793", "score": "0.6242862", "text": "private static function checkStringContainNumbers($string)\n {\n if ( preg_match('~[0-9]~', $string) === 0 ) {\n throw new NumbersNotFoundException(\"The string value must contain at least one convert, [$string] is given.\");\n }\n }", "title": "" }, { "docid": "b93910b797f6400e4390097e054ee5db", "score": "0.6234774", "text": "function invalidUsername($username){\n $result= true;\n $regex = '/^[a-zA-Z0-9]*$/';\n if(!preg_match($regex,$username)){\n $result = true;\n }else{\n $result = false;\n }\n return $result;\n}", "title": "" }, { "docid": "d7a4b773b9a48b6a4e58badb27ff97d4", "score": "0.6231679", "text": "public function testIsNumber():void{\n\t\t$this::assertTrue($this->qrcode->isNumber('0123456789'));\n\n\t\t$this::assertFalse($this->qrcode->isNumber('ABC123'));\n\t}", "title": "" }, { "docid": "b3e3bd742e3dbacf0342030a3f0e424f", "score": "0.622179", "text": "function invalidUsername($username) {\n if (!preg_match(\"/^[a-zA-Z0-9]*$/\", $username)) {\n $result = true;\n }\n else {\n $result = false;\n }\n return $result;\n}", "title": "" }, { "docid": "a7f268a0459f34c52383cdf29c7eeaf7", "score": "0.62203", "text": "public static function isValidNumber($num) {\r\n if((!preg_match(\"/^[0-9]+$/\", $num))){\r\n return false; \r\n }\r\n return TRUE;\r\n }", "title": "" }, { "docid": "ecf0ee8470aff62e42cd8cb52736e7af", "score": "0.62115884", "text": "public function isNumeric();", "title": "" }, { "docid": "9afcbfb6625b1584504f63ccc19139d5", "score": "0.6211482", "text": "function validString($animalStr)\r\n{\r\n global $f3;\r\n return ctype_alpha ($animalStr) AND ($animalStr !=\"\");\r\n}", "title": "" }, { "docid": "329430894eeb3fa3cf1ba58b63a5f285", "score": "0.62088156", "text": "function isAlphanumeric($str){\n if (preg_match(\"/^\\\\w*$/\",$str) == 0){\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "0df15ea06bbf18ca09727ecd1dfde80d", "score": "0.62079406", "text": "function validateName($string){\r\n $letters = preg_replace('/[^\\da-z]/i', '',$string);\r\n return strlen($letters)!= 0 && validateString($string);\r\n }", "title": "" }, { "docid": "2133f422987870e9301799351d04413c", "score": "0.6206698", "text": "public function chkint($string);", "title": "" }, { "docid": "d7a16ccbe484ece4e6addc7f817f2865", "score": "0.6203514", "text": "function is_car_numeric ($c){\n if ($c >= '0' && $c <= '9'){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "726f36661e0aa717eb5991f25d293e5d", "score": "0.62032074", "text": "function check_name($string, $min_size, $max_size, $allow_number = false) {\n if($string){\n if (!(strlen($string) < $min_size && strlen ($string) > $max_size))\n $flag = false;\n if ($allow_number == false){\n //regular expression, get letter only\n $re = '/^[A-Za-z]+$/';\n if(!preg_match($re, $string))\n return false;\n } else {\n //regular expression, get alphanumeric char\n $re = '/^[A-Za-z0-9]+$/';\n if (!preg_match($re, $string)) {\n return false;\n }\n }\n }\n else {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "7159830b6fc39346f0aeaab02b022497", "score": "0.61998534", "text": "public function is_alphanum($value){\r\n if(!ctype_alnum($value) && $value != ''){\r\n $this->add_message('You are only allowed to have alphabetic and numeric characters.');\r\n return FALSE;\r\n }\r\n return TRUE;\r\n }", "title": "" }, { "docid": "2a259612142d63f3bb810ea4f8de0a5c", "score": "0.6194202", "text": "function numbers_only($str) {\n\t$clean = preg_replace('/[^0-9]/', '', $str);\n\treturn $clean;\n}", "title": "" }, { "docid": "604dfad8640bd8ff4839ac18bce0a9e5", "score": "0.6190518", "text": "function isdigit() {\n return ctype_digit($this->_str);\n }", "title": "" }, { "docid": "69ca897bea60994dd045fe7448f90b0a", "score": "0.6178359", "text": "function is_alphanumeric(string $string) : bool\n{\n return Str::isAlphaNumeric($string);\n}", "title": "" }, { "docid": "dbc7b47969462e0922eb5368837abe04", "score": "0.61635804", "text": "function validar_cel($cel){\n\treturn is_numeric($cel);\n}", "title": "" }, { "docid": "c29cb51c9856cf71aab395a4f49797bf", "score": "0.61604595", "text": "function is_valid_chars($var){\n return preg_match('/^[\\w_\\-]+$/', $var ) > 0;\n}", "title": "" }, { "docid": "c29cb51c9856cf71aab395a4f49797bf", "score": "0.61604595", "text": "function is_valid_chars($var){\n return preg_match('/^[\\w_\\-]+$/', $var ) > 0;\n}", "title": "" }, { "docid": "1b67e69ed8e65d1effa2541d90d1cbcb", "score": "0.6158286", "text": "private function _isNumericBetter($str)\n {\n return (!empty($str) && is_numeric($str));\n }", "title": "" }, { "docid": "274e67b438a18350f3f94e4d60841e4d", "score": "0.6149164", "text": "function is_alphanum($string)\n{\n return ctype_alnum ($string);\n}", "title": "" }, { "docid": "9c9d5b355dd2489d339a6e1fba1531fd", "score": "0.61462355", "text": "function checkSSN($field)\n {\n $field = str_replace(\" \", \"\", $field);\n if (preg_match('/^[0-9]{9}$/', $field)) {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "e85f0717615bf98920d87fe6f221e6f7", "score": "0.6144942", "text": "function isInt($_data){\n return preg_match(\"/^[0-9]+$/\", $_data);\n}", "title": "" }, { "docid": "5263d3fa5d4b0ba8bcd8af292ffa7e0e", "score": "0.61134434", "text": "public function testNonDigitCharInIntegerThrowsException()\n {\n Decoder::decode(\"iae\");\n }", "title": "" }, { "docid": "5b405ae65d56db325e7aae8457a5e7f8", "score": "0.6102415", "text": "function invalidsocietyname($societyname){\n $result;\n if(!preg_match(\"/^[a-zA-Z0-9 ]+$/\", $societyname)){\n $result = true; \n }\n else{\n $result = false;\n }\n return $result;\n }", "title": "" }, { "docid": "ef33600385a96ced6fef71cef868d610", "score": "0.61021733", "text": "static function IsNumber($string) {\r\n if (is_numeric($string))\r\n return true;\r\n return false;\r\n }", "title": "" }, { "docid": "231c5fac3c5fd1b622d8bfe566a0023a", "score": "0.60877234", "text": "function usernameIsValid($username) {\n $l = strlen($username);\n if ($l < 4 or $l > 32) { return false; }\n if (!ctype_alnum($username)) { return false; }\n return true;\n}", "title": "" }, { "docid": "e0bec3a4a75e0fc94009cc0c62778864", "score": "0.6078876", "text": "function phonenumber($str)\n {\n return ( preg_match(\"/^[0-9+\\-x() ]*$/\", $str)) ? TRUE : FALSE;\n }", "title": "" }, { "docid": "3a424cc49dac5aa495f26534c00403c1", "score": "0.6077069", "text": "function validPhone($phone)\n{\n $strippedNumber = str_replace(\"-\", \"\", $phone);\n $numberLen = strlen($strippedNumber);\n return is_numeric($numberLen) && $numberLen == 10;\n}", "title": "" }, { "docid": "e29b2978e1e0256081e1917734509762", "score": "0.6072147", "text": "protected function validate()\n {\n $value = $this->getValue();\n if (! is_scalar($value)) {\n return false;\n }\n return ctype_alnum((string) $value);\n }", "title": "" }, { "docid": "d01e20c21ff75570e02fded9e5dba7fb", "score": "0.6071699", "text": "function _isNumeric()\n {\n return false;\n }", "title": "" }, { "docid": "1e5129b57279691c18b4e1b77fcd095d", "score": "0.6056723", "text": "public function testStringRule()\n {\n $this->validator->validate(['myInput' => 'string'], ['myInput' => 'my string']); // giving a string value\n $this->assertTrue($this->validator->passes());\n\n $this->validator->validate(['myInput' => 'string'], ['myInput' => 123]); // giving a number value\n $this->assertTrue($this->validator->fails());\n }", "title": "" }, { "docid": "d32ada466ffaac1b673e5faf6c65da3b", "score": "0.6042791", "text": "function IsZipcodeValid ($strZipcode) \n{\n $length = strlen ($strZipcode);\n\n $numeric = is_numeric($strZipcode);\n\n // -------------------------------------------------------------------------- \n // Make sure we have the following (a non zero length string that is exactly \n // five characters long, and consists of all numeric characters. \n // --------------------------------------------------------------------------\n $rc = ($length === false || $length < 5 || $numeric === false); \n return !($rc);\n}", "title": "" }, { "docid": "6071f8ed784e5e2d5113ad2c80473084", "score": "0.6040898", "text": "function validate_houseNumber($number){\r\n\t$msg=\"==>מספר בית\";\r\n\tif(isHTML($number, $msg)){return FALSE;};\r\n\tif(isRestrictedChars($number, $msg)){return FALSE;};\r\n\tif(isNotNum($number, $msg)){return FALSE;};\r\n\treturn TRUE;\r\n}", "title": "" }, { "docid": "1458894ef63f1d68d2260b4d18f29fb1", "score": "0.60396576", "text": "function NeedQuotesNumeric($type)\n{\n if($type == 203 || $type == 8 || $type == 129 || $type == 130 || \n\t\t$type == 7 || $type == 133 || $type == 134 || $type == 135 ||\n\t\t$type == 201 || $type == 205 || $type == 200 || $type == 202 || $type==72 || $type==13)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "title": "" }, { "docid": "1340c5ed0e83e3826ac0696df66897f4", "score": "0.60246086", "text": "function invalidCity($city){\n $city = str_replace(' ','',$city);\n if (preg_match(\"/^[a-zA-Z]{2,}$/\",$city)) {\n $result = false;\n }else{\n $result = true;\n }\n\n return $result;\n}", "title": "" }, { "docid": "b2ad80b37d419cd1bd3e4da19b023553", "score": "0.602088", "text": "function alpha_extra($str)\n {\n $this->CI->form_validation->set_message('alpha_extra', 'The %s field may only contain alpha-numeric characters, spaces, periods, underscores, and dashes.');\n return ( ! preg_match(\"/^([\\.\\s-a-z0-9_-])+$/i\", $str)) ? FALSE : TRUE;\n\n }", "title": "" }, { "docid": "1dac0c71d577a16af0946e994070b4c0", "score": "0.60167575", "text": "public function isLengthStringValid($string, $x)\n\t{\n\t\tif (is_string($string) && is_numeric($x))\n\t\t{\n\t\t\t$len = strlen($string);\n\t\t\tif($len <= $x) return true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "49fb6b2b17e1819f1ef57502e0979fff", "score": "0.60161257", "text": "function testNotRegexp()\n {\n $def=array(\"TYPE\"=>\"String\",\"REGEXP\"=>'/^[^a]*$/');\n $t=new \\lib\\model\\types\\StringType($def);\n $this->setExpectedException('\\lib\\model\\types\\StringTypeException',\n '',\n \\lib\\model\\types\\StringTypeException::ERR_INVALID_CHARACTERS);\n $t->validate(\"aaaaa\");\n }", "title": "" }, { "docid": "ab586afd8df286f45e8520d828e82bfb", "score": "0.60094535", "text": "function check_string($string) {\r\n $bad_array = array('!','@','#','$','%','^','&','*','(',')','=','+','<','>','\"');\r\n if(in_array($string,$bad_array)) {\r\n return 0;\r\n }else{\r\n return 1;\r\n }\r\n}", "title": "" }, { "docid": "4f4d02436556a067706a11cae53a6ad4", "score": "0.6003543", "text": "function isPriceValid(string $price): bool\n {\n return is_numeric($price) && (float)$price > 0;\n }", "title": "" }, { "docid": "a9dbc40fc80dbfc91106c74719f8d815", "score": "0.6002566", "text": "public function hasInvalidFirstCharacter(string $string)\n {\n $firstChar = substr($string, 0, 1);\n $valid = array('{', '[');\n return in_array($firstChar, $valid) == false;\n }", "title": "" }, { "docid": "5286cd7468e978944b40ca6f8880e3f5", "score": "0.5992824", "text": "function IsPhoneNumberValid ($strPhoneNum) \n{\n $rc = false;\n\n if (ereg(\"^[0-9]{3}-[0-9]{3}-[0-9]{4}$\", $strPhoneNum)) \n {\n // -------------------------------------------------------------------------- \n // Phone number is valid.\n // -------------------------------------------------------------------------- \n $rc = true;\n }\n\n return $rc;\n}", "title": "" }, { "docid": "dddc9380d9403704b96c537149b7b968", "score": "0.598796", "text": "function validaterc($str) {\n $toreplace = array('/', ' ');\n $str = str_replace($toreplace, '', $str);\n\n return ((strlen($str) > 7) && (strlen($str) < 11));\n }", "title": "" }, { "docid": "60858284d0f828fe5e4f55015a3c4597", "score": "0.5986621", "text": "public function numeric($str)\n {\n return is_numeric($str);\n }", "title": "" }, { "docid": "d2aa00883b75807afd3a386e4d21a8a9", "score": "0.59856474", "text": "private function is_natural($str)\n {\n return preg_match( '/^[0-9]+$/', $str);\n }", "title": "" }, { "docid": "877ff5fa56282e2516eb836973a391b8", "score": "0.598351", "text": "function validate_number($value, $min_value, $max_value) {\n if(strlen($value) <= 0) {\n return BAD_LENGTH;\n } // end if\n\n // check characters\n if(preg_match(\"/^[0-9]+\\z/\", $value) == 0) {\n return BAD_CHARS;\n } // end if\n\n // check value\n if($value < $min_value || $value > $max_value) {\n return BAD_VALUE;\n } // end if\n\n // everything OK\n return OK;\n}", "title": "" }, { "docid": "c42274ae3bf5d6b05cf200aa8ce02660", "score": "0.5968692", "text": "public function test_sanitizetimestringremovesinvalidportionfromstart() {\n $result = rlip_sanitize_time_string('1x2d3h4m');\n $this->assertEquals($result, '2d3h4m');\n }", "title": "" }, { "docid": "5f06b7d9240de91cb1f4e709dfc7c46f", "score": "0.59620386", "text": "protected function alphaNumeric($value)\n {\n $valid = true;\n if ($value != '')\n return ctype_alnum(str_replace(' ', '', $value));\n\n return $valid;\n }", "title": "" }, { "docid": "66e261eb48ff4547613721c5eb49bec9", "score": "0.59586895", "text": "function is_post_number($str)\n{\n\tif (is_natural($str))\n\t{\n\t\treturn TRUE;\n\t}\n\n\treturn (bool) preg_match('/^[0-9]+(,|_)[0-9]+$/', $str);\n}", "title": "" }, { "docid": "1dcdf85e9050ca999a59d37e2af8c7df", "score": "0.5957016", "text": "private function _validate_alalnum($input){\n\t# alphanumerical string that starts whith a letter charakter \n\t\tif (preg_match('/^[a-zA-Z][0-9a-zA-Z]+$/u', $input))\n\t\t\t{return false;}\n\t\n\treturn \"The given input is not an alphanumeric string.\";\n\t}", "title": "" }, { "docid": "389116893afd3ab7f7c60521349142d7", "score": "0.5951753", "text": "function isNotYear(&$var, $msg){\r\n\tglobal $errors;\r\n\tif(empty($var))\treturn FALSE;\r\n\tif(isHTML($var,\"\")){$var=\"\"; return TRUE;}\r\n\t$RegularExpression=\"/^(([1-2])([0,9])([0-9])([0-9]))+$/i\";\r\n\r\n\tif(!preg_match($RegularExpression, $var)){\r\n\t\t$var=\"\"; \r\n\t\t$errors[]=$msg . \": אנא הכנס שנת לידה חוקית\";\r\n\t\treturn TRUE;\r\n\t}\r\n\treturn FALSE;\r\n}", "title": "" }, { "docid": "94b4505b508d3decaaeac399338f28a5", "score": "0.59510255", "text": "public function isAlphaNumeric($value): bool\n {\n return (bool) preg_match('/^[a-z\\d]+$/i', $value);\n }", "title": "" }, { "docid": "98735de8ff22967d27a7843e0659f0d2", "score": "0.5950097", "text": "public function isValid($value) {\n \tif(!is_string($value) && !is_int($value) && !is_float($value)) {\n \t\t$this->error(self::INVALID);\n \t\treturn false;\n \t}\n \t\n \t$this->setValue($value);\n \t\n \tif($value == '') {\n \t\tif($this->options['allowNull'] == true) {\n \t\t\treturn true;\n \t\t} else {\n \t\t\t$this->error(self::STRING_EMPTY);\n \t\t\treturn false;\n \t\t}\n \t}\n \t\n \tif(self::$filter == null) {\n \t\tself::$filter = new AlnumFilter();\n \t}\n \t\n \tself::$filter->setAllowWhiteSpace($this->options['allowWhiteSpace']);\n \tif($value != self::$filter->filter($value)) {\n \t\t$this->error(self::NOT_ALNUM);\n \t\treturn false;\n \t}\n \t\n \treturn true;\n }", "title": "" }, { "docid": "d845542eb00a82408339c34add29a14a", "score": "0.5946541", "text": "private static function checkString(\n\t\t$string,\n\t\t$minlen,\n\t\t$maxlen,\n\t\t$trimWhiteSpaces = false,\n\t\t$onlyLetters = false,\n\t\t$startsWithLetter = false\n\t)\n\t{\n\t\tif (is_string($string)) {\n\t\t\t//убираем белые символы, если включена опция\n\t\t\tif ($trimWhiteSpaces === true) {\n\t\t\t\t$string = trim($string);\n\t\t\t}\n\t\t\t//проверяем входные числа\n\t\t\tif (!is_int($minlen) || !is_int($maxlen)) {\n\t\t\t\tthrow new \\UnexpectedValueException('Length of string must be integer');\n\t\t\t}\n\t\t\t//проверяем длину строки\n\t\t\tif ((mb_strlen($string) >= $minlen\n\t\t\t\t&&\n\t\t\t\tmb_strlen($string) <= $maxlen)\n\t\t\t) {\n\t\t\t\t$result = $string;\n\t\t\t} else $result = false;\n\n\t\t\t//дополнительные условия\n\t\t\tif ($onlyLetters === true) {\n\t\t\t\tif (!preg_match('/^\\w+$/iu', $string) > 0) {\n\t\t\t\t\t$result = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($startsWithLetter === true && !self::startsWithLetter($string)) {\n\t\t\t\t$result = false;\n\t\t\t}\n\t\t} else $result = false;\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "270c5133ec8c484ff3d1e0744d996f3a", "score": "0.5946128", "text": "function is_alphanumeric($name){\n return preg_match(\"/^[a-zA-ZÀ-ú\\d' ]+$/\", $name);\n }", "title": "" }, { "docid": "e6317a8f09551ee502c643c0d0bf2647", "score": "0.59387916", "text": "function checkAlphaNum($field, $name)\n\t\t\t{\n\t\t\t\tif (ctype_alnum($field))\n\t\t\t\t{\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn $name.\" field should consist of all letters or digits.\".\"<br>\";\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "7d393e5ebdf708cbef4433aeaf36ccf3", "score": "0.5934056", "text": "function isValid($address) {\n if (strlen($address) >= 27 && strlen($address) <= 34 && ((substr($address, 0, 1) == \"1\" || substr($address, 0, 1) == \"3\"))\n && preg_match(\"#^[A-Za-z0-9]+$#\", $address)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "1799e2009724a2fcad7d66609bb6d033", "score": "0.59289956", "text": "function noNumPwd($pwd) {\r\n\t$result;\r\n\tif (!preg_match('/[0-9]+/', $pwd)){\t//password needs to contain at least one number\r\n\t\t$result = true;\r\n\t}\r\n\telse {\r\n\t\t$result = false;\r\n\t}\r\n}", "title": "" }, { "docid": "d86b6bfdac20f6d873b4ac3b42badce3", "score": "0.5925799", "text": "public function isValid($value)\n {\n if (!is_string($value) && !is_int($value) && !is_float($value)) {\n $this->_error(self::INVALID);\n return false;\n }\n\n $this->_setValue((string) $value);\n\n if ('' === $this->_value) {\n $this->_error(self::STRING_EMPTY);\n return false;\n }\n\n if (null === self::$_filter) {\n require_once 'Zend/Filter/Digits.php';\n self::$_filter = new Zend_Filter_Digits();\n }\n\n if ($this->_value !== self::$_filter->filter($this->_value)) {\n $this->_error(self::NOT_DIGITS);\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "bb9c4e5195b9ff8aefec3b72d9902149", "score": "0.5925349", "text": "function sanitize_lr($str, $opt = '', $numbers = false){\n\n\treturn $numbers ? preg_replace('/[^0-9'.$opt.']+/', '', $str) : preg_replace('/[^a-zA-Z0-9'.$opt.']+/', '', $str);\n}", "title": "" }, { "docid": "f68bae248176d0aab6f67d8027d679bb", "score": "0.59235364", "text": "public function isValid($str)\n {\n\t\t$return = true;\n\t\t\n\t\tif (strlen($str) < self::$minLength) {\n\t\t\t$this->setError(self::ERROR_LENGTH_MIN);\n\t\t\t$return = false;\n\t\t}\n\n\t\tif (strlen($str) > self::$maxLength) {\n\t\t\t$this->setError(self::ERROR_LENGTH_MAX);\n\t\t\t$return = false;\n\t\t}\n\n\t\tif (is_array(self::$disallow)) {\n\t\t\tforeach (self::$disallow as $v) {\n\t\t\t\tif (stripos($v, $str)) {\n\t\t\t\t\t$this->setError(self::ERROR_DISALLOWED);\n\t\t\t\t\t$return = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!ctype_alnum) {\n\t\t\t$this->setError(self::ERROR_ALNUM);\n\t\t\t$return = false;\n\t\t}\n\n\t\tif (is_array(self::$char)) {\n\t\t\tforeach (self::$char as $v) {\n\t\t\t\tif (stripos($v, $str)) {\n\t\t\t\t\t$this->setError(self::ERROR_DISALLOWED_CHAR);\n\t\t\t\t\t$return = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n }", "title": "" }, { "docid": "11abcc0e59692eaed6386b2f6665bf12", "score": "0.5921954", "text": "function invalidFirstname($firstname){\n $result= true;\n $regex = '/^[a-zA-Z]*$/';\n //checks if the given firstname does not match the regular expression \n if(!preg_match($regex,$firstname)){ \n $result = true;\n }else{\n $result = false;\n }\n return $result;\n }", "title": "" }, { "docid": "d285b8583346edd64a92636797569896", "score": "0.5917984", "text": "function validate_number(string $field_value, array &$field): bool\n{\n if (is_numeric($field_value)) {\n\n return true;\n }\n $field['error'] = 'Price must be written by numbers.';\n return false;\n}", "title": "" }, { "docid": "39c3724606547c50fcc5bbddbf72897d", "score": "0.5917736", "text": "function validPhone($phone){\r\n return (is_numeric($phone) && strlen(trim($phone))>=10);\r\n}", "title": "" }, { "docid": "e60e591c6471f4b93208b2e12a11aa1f", "score": "0.5905074", "text": "public function validate_numericname()\n\t{\n\t\t$validate = $this->model_classes->validate_numericname();\n\n\t\tif($validate === true) {\n\t\t\t$this->form_validation->set_message('validate_numericname', 'The {field} already exists');\n\t\t\treturn false;\t\t\t\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "f59ab4c614ce5cae23e2ba27ad572bfe", "score": "0.58992887", "text": "function valid_studentid($id)\n{\n\t// strip anything other than numbers\n\t$id = preg_replace(\"/([^0-9])/\", \"\", $id);\n\n\t// strlen=9 -- must be is_numeric()\n\treturn (strlen($id) == 9);\n}", "title": "" }, { "docid": "2ddb0f6e1a5fed51045e6d0e80bb7305", "score": "0.58985233", "text": "function validate_phone_number($phone) {\n\tif ($phone[0] == '+' && isnumeric($phone) && len($phone) == 11) return OK;\n\telse return BAD_FORMAT;\n}", "title": "" }, { "docid": "e2a68dcca3f3f76b57ec7005173fd616", "score": "0.5898019", "text": "function checkNum($field, $name)\n\t\t\t{\n\t\t\t\tif (is_numeric($field))\n\t\t\t\t{\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn $name.\" field should be a number.\".\"<br>\";\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "e68b6b3d6ed141ccb098c2b1a78ef696", "score": "0.5895593", "text": "function valid_number($num) {\n\tif (empty($num) || !is_numeric($num))\n\t\t\treturn false;\n\telse {\n\t\t$num = intval($num);\n\t\tif($num <= 0)\n\t\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "c999d393dc64d947da628cd9b4a57d34", "score": "0.58910763", "text": "public function testCheckUsernameRequirementsInvalid(): void\n {\n //Username format is not valid (Contains invalid characters)\n $this->assertFalse(Website\\functions\\CheckFormat::checkUsername('Il!keplane$123'));\n }", "title": "" }, { "docid": "de497f383020981245540196ce39281a", "score": "0.58894545", "text": "protected function _validateAlphaNumericDash($field, $value) {\n\n\t\t\treturn StringMethods::match($value, \"#^(^[a-zA-Z0-9-_]+)$#\");\n\t\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "6535abd3773531c61f1be7f240505bf0", "score": "0.0", "text": "public function index()\n { \n $cities = City::get();\n return view('pages/cityOrdersReport',['cities'=>$cities]);\n }", "title": "" } ]
[ { "docid": "edfccc7675941363f15cdfa73ea568e7", "score": "0.79342735", "text": "public function listAction() {\n\t\t$resourceRecords = $this->repository->findAll();\n\t\t$this->view->assign('content', array(EmberDataUtility::uncamelizeClassName($this->modelName) => $resourceRecords));\n\t}", "title": "" }, { "docid": "fa0267b7eb5f572a15c8a1270ccd60d0", "score": "0.7552338", "text": "public function index() {\n\t\t\n\t\t$this->_listing();\n\t\t$this->set('listing', true);\n\t\t\n\t}", "title": "" }, { "docid": "3119bf4433b0eb6e1e5f5d3aefff8f7c", "score": "0.74976325", "text": "public function listAction()\n {\n header('Content-Type: application/json');\n echo json_encode(self::list($this->table, $_GET, $_GET), JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "9af3930a12c4c5b442756b7bbd305ff2", "score": "0.74330676", "text": "public function index()\n {\n $resources = Resource::paginate(env('ROW_PER_PAGE', 10));\n \n return view('resource.index', compact('resources'));\n }", "title": "" }, { "docid": "89a4eb97a6ee51605109f42462c1473d", "score": "0.734927", "text": "public function list() {\n \t\treturn show();\n \t}", "title": "" }, { "docid": "7d3d5ea98fecbcdaa728156240d52501", "score": "0.73178124", "text": "public function index()\n\t{\n\t\t$resources = $this->getResourceRepository()->findAllPaginated()->toArray();\n\n return $this->apiResponse->success($resources['data'], 200, array_except($resources, 'data'));\n\t}", "title": "" }, { "docid": "f1e5379dd522597ce7ba432e2ed2c9f6", "score": "0.72631985", "text": "public function index()\n {\n $resources = QueryBuilder::for(Resource::class)\n ->allowedFilters('name')\n ->defaultSort('name')\n ->allowedSorts(['name', 'description'])\n ->paginate(15);\n\n return view('resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "db140407717335f4b2c74a2a874b1895", "score": "0.7210918", "text": "public function listAction()\n {\n return view(\n 'item.list',\n [\n 'items' => $this -> itemService -> findAll()\n ]\n );\n }", "title": "" }, { "docid": "d1b35503fce76775fd4a174b9c6da027", "score": "0.7168305", "text": "public function index()\n {\n return ListsResource::collection(RecipeList::all());\n }", "title": "" }, { "docid": "0e190fa7a00dd0393b6c0e0a91b52874", "score": "0.71333236", "text": "public function listingAction()\n\t{\n\t\t// Render\n\t\t$this->_helper->content->setNoRender ()->setEnabled ();\n\t}", "title": "" }, { "docid": "9ee2301bbe5ddd99bc48b5c1f13682d6", "score": "0.7125178", "text": "public static function list()\n {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include(__DIR__ . '/../views/books/list.php');\n }", "title": "" }, { "docid": "1a06e6a067265c84505e916acc162f51", "score": "0.71211576", "text": "public function index()\n {\n if ($this->paginate) {\n $data = $this->repository->paginate();\n $data = [\n 'data' => $this->resource::collection($data->items()),\n 'per_page' => $data->perPage(),\n 'total' => $data->total(),\n ];\n } else {\n $data = $this->resource::collection($this->repository->all());\n }\n\n return Responder::respond($data);\n }", "title": "" }, { "docid": "b7a2e5efe030ad0454c4edd967fd4922", "score": "0.7078434", "text": "public function actionList()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Listing::find(),\n 'pagination' => $this->module->config['pagination'],\n ]);\n $output = $this->render('list', ['listDataProvider' => $dataProvider]);\n return $output;\n }", "title": "" }, { "docid": "3e3e55306112133885a7b05b73618ea6", "score": "0.70725244", "text": "public function index()\n {\n $resources = QueryBuilder::for(Resource::class)\n ->allowedFilters(['name', 'is_facility', 'categories.id', 'groups.id'])\n ->defaultSort('name')\n ->allowedSorts(['name', 'description', 'is_facility'])\n ->paginate(15);\n\n session()->flash('index-referer-url', request()->fullUrl());\n\n return view('resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "b17b9fb097e089099f7de5f26809b8cb", "score": "0.7014123", "text": "public function index()\n {\n $listings = Listing::all();\n\n return ListingResource::collection($listings);\n }", "title": "" }, { "docid": "a856150f3c67d1457d548f91c75da7da", "score": "0.70038116", "text": "public function index()\n {\n // redirect($this->_url(\"all\"));\n $this->_create_list();\n $this->data['page'] = 'all';\n\n $this->_display();\n }", "title": "" }, { "docid": "8fd9118c1a1310924ffd107785f594c8", "score": "0.6988677", "text": "public function index()\n {\n return ItemListResource::collection(ItemList::where('created_by', Auth::user()->id)->orderBy('order')->get());\n }", "title": "" }, { "docid": "b3c2545a4d088004de8ba6c9a86879be", "score": "0.6960206", "text": "public function showList()\r\n\t{\r\n\t\t$this->items = $this->itemRepo->getAll();\r\n\t}", "title": "" }, { "docid": "acacf315b0baff673a36b2ca7e24d31e", "score": "0.69519275", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'asc')->get();\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "c2135d6cafa652d036ae3308bd00e68c", "score": "0.69507635", "text": "public function listAction() {\r\n\t\t// Setup DataSource\r\n\t\t$this->_setupDataSource();\r\n\t\t// Setup Grid\r\n\t\t$this->_setupGrid();\r\n\t\t// Build Grid\r\n\t\t$this->_grid->buildTable();\r\n\t\t\r\n\t\t// Setup View Script\r\n\t\t$this->_helper->viewRenderer($this->_listScript);\r\n\t\t$this->view->grid = $this->_grid;\r\n\t\t$this->view->addLink = array('action' => 'add');\r\n\t\t$this->view->moduleName = $this->_moduleName;\r\n\t}", "title": "" }, { "docid": "65fbe1cd513c1906884a8cf3b31fcaf5", "score": "0.69496506", "text": "public function list ()\n {\n $this->jsonResponse($this->model->findAll());\n }", "title": "" }, { "docid": "7982715eae8987f6e04898265db32a84", "score": "0.6934365", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->amcRepository->all();\n }\n \n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "f9880ebe5ebd32a272f9c257eefeb7d5", "score": "0.69080645", "text": "public function index()\n {\n $query = Resource::orderBy(\"name\");\n $paginate = new PaginateService($query);\n\n $this->data->resources = $paginate->data();\n $this->data->paging = $paginate->paging();\n\n if(Request::ajax())\n {\n return $this->json();\n }\n return $this->view();\n }", "title": "" }, { "docid": "1965f3d513e903b06cfd331567a24845", "score": "0.6895095", "text": "public function index()\n\t{\n\t\t$resources = $this->resource->get();\n\t\treturn \\Response::json($resources);\n\t}", "title": "" }, { "docid": "787a91f5c43faa5eaa05845dd5ea7560", "score": "0.68846714", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('admin.resources.index', ['resources' => $resources]);\n }", "title": "" }, { "docid": "4b7e3c233f60e23a7dbb5f593395b76c", "score": "0.6871577", "text": "public function actionIndex() {\r\n\t\t$this -> toPage('list');\r\n\t}", "title": "" }, { "docid": "d1036519a5edd84e78f3b5c9d42b2f9c", "score": "0.6861071", "text": "public function index() {\n\t\treturn \\Response::view('git/listing');\n\t}", "title": "" }, { "docid": "00a08afebd209b80aaef61ff37d6a46b", "score": "0.6853615", "text": "public function index()\n {\n //get records\n $records = Record::paginate(15);\n\n //return collection of records as a resource\n return RecordResource::collection($records);\n\n }", "title": "" }, { "docid": "7df5491fbb664c953c7e5dff4627f1cc", "score": "0.68314284", "text": "public function index()\n {\n $resources = QueryBuilder::for(Resource::class)\n ->allowedFilters(['name', 'is_facility', 'categories.id', 'groups.id'])\n ->defaultSort('name')\n ->allowedSorts(['name', 'description'])\n ->paginate(15);\n\n return new ResourceCollection($resources);\n }", "title": "" }, { "docid": "ac58f83d1b859c8f0c9d002437cb5caa", "score": "0.6806778", "text": "public function index()\n {\n $resources = Resource::get();\n return view('resources.index', ['resources'=>$resources]);\n }", "title": "" }, { "docid": "abaacf9f1fa05faf4fd840689138551b", "score": "0.68013006", "text": "public function index()\n {\n $user = Auth::user();\n\n $recipes = Recipe::where('user_id', $user->id)\n ->orWhere('is_public', true)\n ->paginate(15);\n\n return new CompactRecipeListResource($recipes);\n }", "title": "" }, { "docid": "81a151b5e0337d96155cd41441de4eb3", "score": "0.67928314", "text": "public function index()\n {\n\n $items = Items::paginate(12);\n return ItemsResource::collection($items);\n }", "title": "" }, { "docid": "998c769364dc4c666498430759971c31", "score": "0.67716223", "text": "public function actionIndex()\n {\n // init Active Record\n $query = new UserRecords();\n\n // set current page and offset\n $page = (int)$this->request->query->get('page', 0);\n $offset = $page * self::ITEM_PER_PAGE;\n\n // build pagination\n $pagination = new SimplePagination([\n 'url' => ['user/index'],\n 'page' => $page,\n 'step' => self::ITEM_PER_PAGE,\n 'total' => $query->count()\n ]);\n\n // build listing objects\n $records = $query->orderBy('id', 'desc')->skip($offset)->take(self::ITEM_PER_PAGE)->get();\n\n // display viewer\n return $this->view->render('index', [\n 'records' => $records,\n 'pagination' => $pagination\n ]);\n }", "title": "" }, { "docid": "e33620f9e0602f70ef6cab4f1bdb2610", "score": "0.67710763", "text": "public function index()\n\t{\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "c2cb369270f6fcd0fe01f7c05c39893d", "score": "0.6771036", "text": "public function index()\n {\n \t$staff = Staff::paginate(50);\n \treturn StaffResources::collection($staff);\n }", "title": "" }, { "docid": "6d38830f96381c6d3f6705200be0b0ce", "score": "0.6769593", "text": "public function Index() {\n\t\t$list = call_user_func(array($this->model(), 'find'));\n $this->render($this->model().'/index', compact('list'));\n\t}", "title": "" }, { "docid": "928b1775fb4733a239dae4530b7ef807", "score": "0.6768928", "text": "public function listAction()\n {\n $bookList= new Library_Model_ListBooks();\n //bekome a array of books\n $books = $bookList->listBooks($this->_getParam('page', 1));\n \n $this->view->books = $books;\n //apply the paginator to our view\n if(!$this->_request->isXmlHttpRequest()){\n //problem with getPaginator\n $this->view->paginator = $bookList->getPaginator();\n } else {\n $this->view->currentPage = $bookList->getPaginator()->getCurrentPageNumber();\n }\n }", "title": "" }, { "docid": "226f4470a6f32302edcfa713291233ee", "score": "0.67669094", "text": "public function listAction()\n {\n $this->view->persons = PersonCatalog::getInstance()->getActives();\n $this->setTitle('List the Person');\n }", "title": "" }, { "docid": "587f352425474ce109a45e636208d7d7", "score": "0.67461246", "text": "public function list()\n {\n return response()->json($this->listAction->run());\n }", "title": "" }, { "docid": "e350e7299f802c9cf32b414dc945ac34", "score": "0.6743188", "text": "public function listAction()\n {\n try {\n $connection = GeneralUtility::makeInstance(\\Mahu\\SearchAlgolia\\Connection\\Algolia\\Connection::class, $this->configManager);\n $this->client = $connection->getClient();\n $remoteIndexList = $this->getRemoteIndexList();\n $localIndexList = $this->getLocalIndexList();\n\n $this->logService = GeneralUtility::makeInstance(Log::class);\n $logContent = $this->logService->getLogContent();\n } catch (AlgoliaConnectionException $e) {\n $this->view->assignMultiple(['algoliaException' => $e->getMessage()]);\n } catch (\\RuntimeException $e) {\n $this->view->assignMultiple(['logException' => $e->getMessage()]);\n }\n\n $this->view->assignMultiple(\n [\n 'remoteIndexList' => $remoteIndexList,\n 'localIndexList' => $localIndexList,\n 'logContent' => $logContent\n ]\n );\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "1fe41c52dd75a6340ba0e7415a6acc25", "score": "0.67415196", "text": "public function index()\n {\n return TodoResource::collection(Todo::paginate(10));\n }", "title": "" }, { "docid": "f5b2a3a3d01e82cedd6efa95f22e9cec", "score": "0.67290956", "text": "public function index()\n {\n return ContactListResource::collection(Contact::all()->paginate(25));\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "106d7df8332c0494258eddc388469da7", "score": "0.6723481", "text": "public function index()\n {\n //Get employees\n $employees = employees::paginate(15);\n\n //return the collection of employees as a resource\n return employeeResource::collection($employees);\n\n\n }", "title": "" }, { "docid": "b3dfa38d778d7b973135f3c279d4eed4", "score": "0.6716988", "text": "public function index()\n\t{\n $model = $this->model;\n $resources = $model::all();\n\t\treturn Response::api(['resources' => $resources]);\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "a8928e5ccc1f4e236f4a00c06b0a7026", "score": "0.6702476", "text": "public function index()\n\t{ \n // Carga el modelo de 'ResourceTypes' para sacar el nombre del tipo de recurso\n $this->loadModel('ResourceTypes'); \n $this->set('resource_types', $this->ResourceTypes->find('all'));\n \n // Consulta Join de recursos con usuarios, saca los recursos asociados al admin\n $query = $this->Resources->find('all');\n $query->innerJoinWith('Users', function ($q)\n {\n return $q->where(['Users.id' => $this->Auth->User('id')]);\n }\n );\n \n // Pagina la tabla de recursos\n $this->set('resources', $this->paginate($query));\n\t}", "title": "" }, { "docid": "b754e829a1afcf5e226b9dd05f87f2e6", "score": "0.66960615", "text": "public function index()\n {\n $this->setResources();\n\n $modelResource = new $this->Model;\n\n $filter = Input::get('filter');\n\n $perPage = Input::get('per_page');\n\n $sort = Input::get('sort');\n\n if ($perPage) $modelResource->setPerPage($perPage);\n\n $filterBy = $modelResource->getFilterBy();\n\n $sortBy = $modelResource->getSortBy() ?: $filterBy;\n\n $sort = $sort ? explode('|', $sort) : [$sortBy, 'asc'];\n\n if (!$filter) {\n return new $this->ResourceCollection(\n $modelResource::orderBy($sort[0], $sort[1])->paginate()\n );\n }\n\n $filter = DB::table('companies')->where('razao_social', 'like', \"%$filter%\")->first()->id;\n\n return new $this->ResourceCollection(\n $modelResource::where(\"$filterBy\", \"$filter\")\n ->orderBy($sort[0], $sort[1])\n ->paginate()\n );\n }", "title": "" }, { "docid": "a10ee9720f3882f9615dc6bd39bf66bb", "score": "0.6695142", "text": "public function index()\n {\n\n return OfferResource::collection(Offer::paginate(10));\n }", "title": "" }, { "docid": "7e86107f54f4f68d3d2ea122badfb72e", "score": "0.6693794", "text": "public function list() {\n include \"ROOT_PATH\" . \"../../../resource/views/user/list.php\";\n }", "title": "" }, { "docid": "d2a02cceaa38bd17888a8559051bf99d", "score": "0.669236", "text": "public function listAction(){\n // Current PO to show.\n $currentSupplier = $this->request->getQuery('supplier', 'int');\n // Pass the general parameters to the view.\n $this->view->setVar('title', 'Supplier #' . $currentSupplier);\n $this->view->setVar('subtitle', 'dat dat dat');\n // @todo::: Define controls.\n $this->view->setVar('show_submit', TRUE);\n $this->view->setVar('submit_text', 'Submit');\n $this->view->setVar('show_cancel', TRUE);\n $this->view->setVar('cancel_text', \"Cancel\");\n $this->view->setVar('main_form_id', '');\n $this->view->setVar('exit_to', $this->url->getBaseUri() . 'po/search');\n }", "title": "" }, { "docid": "a08b224cecded9fbbd98e9690a25697b", "score": "0.66899556", "text": "public function index()\n {\n return TodoResource::collection(Todo::orderBy('id', 'desc')->paginate());\n }", "title": "" }, { "docid": "3d5e84310d037c96dff096d60146afc3", "score": "0.6676491", "text": "public function index()\n {\n $storie = Stories::paginate(15);\n\n return StoriesResource::collection($storie);\n }", "title": "" }, { "docid": "c47e31fef88d7be6059d14e6bf3e7d3b", "score": "0.66763234", "text": "public function actionIndex()\n {\n $searchModel = new SearchListing();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "a0f9ca57ab7f1a43209181dea82c6087", "score": "0.6660814", "text": "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\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 // data\n $data = $dataProvider->getData();\n\n // related data\n $relatedData = $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 $filtersData = array();\n if (isset($_GET[$this->_model])) {\n $filtersData[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersData[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersData)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $data, $relatedData, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "title": "" }, { "docid": "d80bbdb874c0bc70baa157e026fd4ce0", "score": "0.66533667", "text": "public function listAction()\n {\n $resource = $this->Request()->getParam('resource');\n $limit = $this->Request()->getParam('limit', 25);\n $offset = ($this->Request()->getParam('page', 1) - 1) * $limit;\n\n /** @var \\Shopware\\Components\\MultiEdit\\Resource\\ResourceInterface $resource */\n $resource = $this->container->get('multi_edit.' . $resource);\n $result = $resource->listBackups($offset, $limit);\n $result['success'] = true;\n\n $this->View()->assign($result);\n }", "title": "" }, { "docid": "7b3f65d2cb517845002348a3fb676f3b", "score": "0.6651287", "text": "public function listAction()\n {\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 }", "title": "" }, { "docid": "201d2cfcdf8daa4dcc0daec6874168cf", "score": "0.66492194", "text": "function listAction()\n {\n $this->_model->rec = $this->_db->getRec();\n $content = $this->_model->render(STUD_LIST_FILE);\n $this->_templete->content = $content;\n $output = $this->_templete->render(LAYOUT_FILE);\n $this->_fc->setBody($output);\n }", "title": "" }, { "docid": "eebcaa5492eb207e4f7b0028a584708b", "score": "0.6643269", "text": "public function index()\n {\n //\n return Resource::all();\n }", "title": "" }, { "docid": "7a84ee612e4a05b429aaef9c4ed361d6", "score": "0.6639994", "text": "public function ListAll()\n\t{\n\t\t\t\t\n\t\t$data['persons'] = $this->file->load();\n\n\t\t$data['token'] = $this->token->getNewToken();\n\n\t\t$template = View::make('../../templates/list',$data);\n\n\t\treturn $this->response->setContent($template->render());\n\t}", "title": "" }, { "docid": "972eaa033ae88bc016ccf77517a3335b", "score": "0.6634485", "text": "public function index() {\n\t\t\t$datas=DAO::getAll($this->model);\n\t\t\techo $this->responseFormatter->get($datas);\n\t}", "title": "" }, { "docid": "6a16c824a30ff8ee825dac92aef0bc07", "score": "0.66332036", "text": "function overview()\n {\n $data['files'] = $this->files->get_all();\n $this->view('content/files_list', $data);\n }", "title": "" }, { "docid": "cb88c28d2d3774b001750c6aab518891", "score": "0.6621152", "text": "public function list(): Response\n {\n // Récupération du Repository\n $repository = $this->getDoctrine()\n ->getRepository(Article::class);\n // Récupération de tous les articles\n $articles = $repository->findAll();\n // Renvoi des articles à la vue\n return $this->render('index.html.twig', [\n 'articles' => $articles\n ]);\n }", "title": "" }, { "docid": "b5a2dd04865acc0337c46650153e1a4d", "score": "0.66207755", "text": "public function actionList()\n {\n $sliders = Slider::find()\n ->withSlides()\n ->all();\n\n return $this->render('list', [\n 'sliders' => $sliders\n ]);\n }", "title": "" }, { "docid": "f7e69a4504c6eeedcb7bf68ebf86b14d", "score": "0.661989", "text": "public function index()\n {\n return ProviderResource::collection(Provider::paginate());\n }", "title": "" }, { "docid": "64b9fc22016f4b9a739c18a02478cdd0", "score": "0.66172355", "text": "public static function index()\r\n {\r\n $pagination = array(\r\n 'page' => 1,\r\n 'show' => 20\r\n );\r\n\r\n if (isset($_GET['page'])) {\r\n $pagination['page'] = intval($_GET['page']);\r\n }\r\n if (isset($_GET['show'])) {\r\n $pagination['show'] = intval($_GET['show']);\r\n }\r\n\r\n $params = array(\r\n 'action_list' => array(),\r\n 'app_list' => array()\r\n );\r\n $settings = array(\r\n 'action_list' => array(),\r\n 'app_list' => array(\r\n 'index' => 'id',\r\n 'flat' => true\r\n )\r\n );\r\n\r\n $params['action_list'] = array_merge($params['action_list'], $pagination);\r\n\r\n $list_action = api::query('action/list', $params['action_list'], $settings['action_list']);\r\n $list_app = api::query('app/list', $params['app_list'], $settings['app_list']);\r\n\r\n view::load('action/index', array(\r\n 'list' => $list_action,\r\n 'list_app' => $list_app\r\n ));\r\n }", "title": "" }, { "docid": "4b73ff248c275a450b6b06ae7c7d865d", "score": "0.6613253", "text": "public function index()\n {\n $question = QuestionResource::collection(Question::latest()->orderBy('created_at', 'desc')->get());\n if(!$question){\n\n return $this->errorResponse('Unable to display data', Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n return $this->successResponse('Sucessfully retrieved', $question);\n }", "title": "" }, { "docid": "15031eb36d46b41edbdfa84a0c42bb01", "score": "0.6612227", "text": "public function index() {\r\r\n $this->render('list', array(\r\r\n 'model' => SWarehousesQuery::create()->orderByName()->find()\r\r\n ));\r\r\n }", "title": "" }, { "docid": "35692a0ab217d82c0f91016d22be4979", "score": "0.6611719", "text": "public function indexAction()\n {\n\n $query = $this->getEntityManager()->getRepository($this->repository)->findAllQuery();\n\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate($query, $this->get('request')->query->get('page', 1), 10);\n\n return $this->render($this->path_template.':index.html.twig', array('pagination' => $pagination, 'route_prefix'=>$this->route_prefix));\n }", "title": "" }, { "docid": "35f42e407939ea25f4a1c4444087457d", "score": "0.66101444", "text": "public function listAction()\n {\n $repository = $this\n ->getDoctrine()\n ->getManager()\n ->getRepository('AnimalBundle:Animal');\n\n $listAnimals = $repository->findAll();\n\n return $this->render('AnimalBundle:AnimalView:list.html.twig',\n array('listAnimals' => $listAnimals));\n }", "title": "" }, { "docid": "41589d7dcb96a7716421880c470b44b4", "score": "0.66068393", "text": "public function listar() {\n\t\t// Necessita estar logado\n\t\t$this->areaRestrita();\n\t\t// Carrega e Cria objeto LivroDAO e pega o livro através do ID solicitado.\n\t\t$this->carregar->model( 'LivroDAO' );\n\t\t$livroDAO = new LivroDAO();\n\t\t$livros = $livroDAO->getAll();\n\t\t// Configura dados para views\n\t\t$dados['titulo'] = 'Listagem de Livros';\n\t\t$dados['livros'] = $livros;\n\t\t// Carrega views e passa os dados\n\t\t$this->carregar->view( 'header', $dados );\n\t\t$this->carregar->view( 'livro-listagem', $dados );\n\t\t$this->carregar->view( 'footer', $dados );\n\t}", "title": "" }, { "docid": "6c7146b6de1d2af3d9e2d73c479e7aed", "score": "0.6595321", "text": "public function showList(){\n $data = $this->parent->getModel('students')->select(\"select * from students\");\n $this->getView('welcome', $data);\n }", "title": "" }, { "docid": "49a8b829d62fb46df0f6fe939a00450a", "score": "0.6590174", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\tif($page < 1) $page = 1;\n\t\t$perpage = $this->perpage;\n\t\t$search = $this->getInput(array('status', 'name'));\n\t\t$params = array();\n\t\tif ($search['name']) $params['name'] = array('LIKE',$search['name']);\n\t\tif ($search['status']) $params['status'] = $search['status'] - 1;\n\t\t\n\t\tlist($total, $apps) = Resource_Service_Apps::getList($page, $perpage,$params);\n\t\t$this->assign('total', $total);\n\t\t$this->assign('search', $search);\n\t\t$this->assign('apps', $apps);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'?'));\n\t\t\n\t}", "title": "" }, { "docid": "f1f43cdbf27fc281ff80e5815bb8570c", "score": "0.658782", "text": "public function index()\n {\n //\n $albums = Album::paginate();\n return AlbumIndexResource::collection($albums);\n }", "title": "" }, { "docid": "5c9e2a1b72736e4dcd1233a696308ec8", "score": "0.6582557", "text": "public function index()\n {\n $records = Record::paginate(10);\n return $this->response->paginator($records,new RecordTransformer());\n }", "title": "" }, { "docid": "d97fb91a2aee3ffda67b936f3ec1530c", "score": "0.65746504", "text": "public function listAction() {\n\t\ttry{\t\t\t\n\t\t\t// Code\n\t\t\t\n\t\t}catch (Exception $e){\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "246c2fdf450c470dd098e3882419854d", "score": "0.6574552", "text": "public function index()\n {\n $accounts = Accounts::all()->sortBy('account_id');\n return AccountResource::collection($accounts);\n }", "title": "" }, { "docid": "ec0e4aa9e49eb0795b7e6a8be1b41989", "score": "0.6574522", "text": "public function index()\n {\n $articles = Article::all()->paginate();\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "218a3bcc6c3ba48283149f8614d45562", "score": "0.65740526", "text": "public function index() {\n\t\t$this->get ();\n\t}", "title": "" }, { "docid": "52d4724f47f90e2c76c949609866ae4f", "score": "0.6569384", "text": "public function index()\n {\n $activities = Activity::paginate(10);\n\n return ActivityResource::collection($activities);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "e128a7f6c946e062e77ee7d1989bf5d8", "score": "0.65632993", "text": "public function index()\n {\n $books = BookModel::readlist();\n\n View::render('books', [\n 'books' => $books,\n 'h1' => 'Gelezen boeken'\n ]);\n }", "title": "" }, { "docid": "fc610d852bef476f1af745c4c2af61e5", "score": "0.65593004", "text": "public function actionList() {\n\t\tif (Yii::$app->user->isGuest)\n\t\t\treturn $this->goHome();\n\n\t\t$this->view->title = 'Parkings';\n\n\t\ttry {\n\t\t\t$parkingService = $this->getService('Parking');\n\n\t\t\t$filter = $parkingService->getAmountOfParkings();\n\n\t\t\t$lists = $parkingService->getExtendedParkingsWithPagination();\n\n\t\t\treturn $this->render('list', array_merge($lists, $filter));\n\t\t} catch (Exception $e) {\n\t\t\tdie('You have reached an error');\n\t\t}\n\t}", "title": "" }, { "docid": "c6aa0bf17a52ccba8cef81895f7d4743", "score": "0.6558353", "text": "public function listAction()\n {\n $items = $this\n ->getDoctrine()\n ->getManager()\n ->getRepository('dabioRestBundle:Item')\n ->findAll();\n\n return new JsonResponse(\n (new EntityFormatter())->itemsArrayFormat($items)\n );\n }", "title": "" }, { "docid": "8054960a74546fc23b5d2f35f62311f9", "score": "0.655775", "text": "public function index()\n {\n\n $data = array(\n 'objects' => $this->campus_dao->findAll(),\n 'title' => 'Campus',\n 'heading' => 'List'\n );\n $this->load->view('/campus/list_campus.html.php', $data);\n }", "title": "" }, { "docid": "028d46f6e03fe91c0522d5be2a68c84a", "score": "0.65464103", "text": "public function index()\n {\n /** @var TodoListFilter $filter */\n $filter = app(TodoListFilter::class);\n /** @var Builder $filterQuery */\n $filterQuery = TodoList::filtered($filter);\n $todoLists = $filterQuery->get();\n return TodoListResource::collection($todoLists);\n }", "title": "" }, { "docid": "cd869da4373ca1c5aacd86ca9e044733", "score": "0.65443367", "text": "public function index() {\n\t\t$items = Item::orderby('id', 'desc')->get();\n\t\treturn view('back.item.itemList', compact('items'));\n\t}", "title": "" }, { "docid": "6ab14cbe951cf99431f26e856993aeb2", "score": "0.65421754", "text": "public function listAction()\n {\n $id = $this->params()->fromRoute('id');\n $result = [];\n if($id != null)\n {\n //$result = [$this->getEntryMapper()->find($id)];\n $result = [$this->entryService->findById($id)];\n }\n else \n {\n //$result = $this->getEntryMapper()->findAll();\n $result = $this->entryService->getList();\n\n }\n\n\n return new JsonModel($result);\n }", "title": "" }, { "docid": "55d08c8376aee349e27945fa819f675a", "score": "0.6540213", "text": "public function index()\n {\n $skills = $this->paginate($this->Skills);\n\n $this->set(compact('skills'));\n $this->set('_serialize', ['skills']);\n }", "title": "" }, { "docid": "bed8333589debc932ee4e761c485f848", "score": "0.6539858", "text": "public function index()\n {\n $menus = Menu::paginate(5);\n\n return MenuResource::collection($menus);\n }", "title": "" }, { "docid": "bc7e32d2dc7868c5cd4ab0e5ac368f4f", "score": "0.65352106", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:Stage:list.html.twig');\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "2624e2ced80d3c035b447f1814374386", "score": "0.65278465", "text": "public function indexAction()\n {\n $booksWithPagination = Book::getBooks();\n $books = $booksWithPagination[0];\n $pagination = $booksWithPagination[1];\n View::renderTemplate('Admin/Books/index.html.twig', [\n 'books' => $books,\n 'pagination' => $pagination,\n ]);\n }", "title": "" }, { "docid": "643a311a5374346f79ec6c6c8a6268ed", "score": "0.6525733", "text": "public function index()\n {\n $items = Item::all();\n return response([ 'items' => ItemResource::collection( $items ), 'message' => 'Retrieved successfully.'], 200);\n }", "title": "" }, { "docid": "e6ed7387b2f7ef94c4ddb847772440e7", "score": "0.652384", "text": "public function index()\n {\n $listings = Listing::with('users')->latest()->paginate(10);\n\n return view('listing.index', compact('listings'));\n }", "title": "" }, { "docid": "c233c1a42dce20a9ec5ced0ce2fbcab1", "score": "0.6521962", "text": "public function index()\n {\n // Get Companies\n $companies = Company::with('account')->orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of companies as a resource\n return CompanyResource::collection($companies);\n }", "title": "" }, { "docid": "c7fd0eccaead0fa95ba4acb733bc6a7b", "score": "0.6514799", "text": "public function index()\n\t\n\t{\t\n\t\t\n\t\t$data['lists'] = $this->mdl_visitor->get_all();\n\t\t$this->template->set('title', 'Visitor List');\n\t\t$this->template->load('template', 'contents', 'list', $data);\n\t}", "title": "" }, { "docid": "afe78dff3214bed74d61a58d722b860d", "score": "0.65146184", "text": "public function index()\n {\n $collections = Collection::all();\n return view(\"list.index\",compact(\"collections\"));\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "e5c60b1a4a8764fec274459b84785f85", "score": "0.0", "text": "public function index()\n\t{\t\n\t\t# check for query\n\t\t$query = Input::get('query');\n\t\t# default message - if query it is filled, else it is null\n\t\t$message = '';\n\t\t\n\t\tif('query') {\n\t\t\t$message = \" was successful! I found it in \";\n\t\t\t$words = Word::Where('dance_term', 'LIKE', \"%$query%\")\n\t\t\t\t->orWhere('abbreviation', 'LIKE', \"%$query%\")\n\t\t\t\t->orderBy('dance_term')\n\t\t\t\t->get();\n\t\t\tif(count($words) == 0) {\n\t\t\t\t$message = \" had no results, perhaps you can find it in the following \";\n\t\t\t\t$words = Word::whereNotNull('dance_term')\n\t\t\t\t\t->orderBy('dance_term')\n\t\t\t\t\t->get();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\n\t\t#if no query get full database\n\t\telse {\n\t\t\t\t$message = \"Take a gander at all the vocabulary words we know: all \";\n\t\t\t\t$words = Word::whereNotNull('dance_term')\n\t\t\t\t->orderBy('dance_term')\n\t\t\t\t->get();\n\t\t\t}\n\t\t\n\t\treturn View::make('word_index')\n\t\t\t\t->with('words', $words)\n\t\t\t\t->with('message', $message)\n\t\t\t\t->with('query', $query);\n\t\t\t\n\n\t}", "title": "" } ]
[ { "docid": "401f14dad055920ac5aa27d774922113", "score": "0.7704874", "text": "public function index() {\n $resource_info = $this->Resources->find('all');\n\n $this->set('resource_info', $this->paginate($resource_info));\n }", "title": "" }, { "docid": "aaad0bca56bcca6a005037e0278b1ae4", "score": "0.75253195", "text": "public function index() {\n\n\t\t$this->_listing();\n\t\t$this->set('listing', true);\n\n\t}", "title": "" }, { "docid": "5d3b04082e8a634586a1ed8f8cdb546c", "score": "0.74725807", "text": "public function listAction()\n {\n $this->render('listPage');\n }", "title": "" }, { "docid": "6d93e4dca95df8ed0c7b3b8b2657ffd6", "score": "0.7455782", "text": "public function listAction()\n {\n $this->_initAction();\n $this->renderLayout();\n }", "title": "" }, { "docid": "5683700221387a4648da639ad72101ea", "score": "0.7411398", "text": "public function listAction()\n {\n Pi::service('authentication')->requireLogin();\n\n // Get info\n $module = $this->params('module');\n\n // Get Module Config\n $config = Pi::service('registry')->config->read($module);\n\n // Get record list\n $uid = Pi::user()->getId();\n $records = Pi::api('record', 'forms')->getRecordList($uid);\n\n // Set template\n $this->view()->setTemplate('archive-list');\n $this->view()->assign('config', $config);\n $this->view()->assign('records', $records);\n }", "title": "" }, { "docid": "1600316acdacf01cc93550ae2e9a85af", "score": "0.7193138", "text": "public function indexAction()\n {\n $objects = $this->getRepository()->findAll();\n\n return $this->render($this->getResource()->getTemplate('index'), array(\n 'objects' => $objects,\n 'resource' => $this->getResource()\n ));\n }", "title": "" }, { "docid": "883e2a9c193b1ec54d21d41093f06c70", "score": "0.7133651", "text": "public function listAction() {\n\t\t\n\t\t$this->init();\n\n\t\tif(!$this->id) {\n\t\t\t$this->view->assign('intro', true);\n\t\t\treturn;\n\t\t}\n\t\t$fileFactory = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ResourceFactory');\n\n\t\t$file = $fileFactory->retrieveFileOrFolderObject($this->id);\n\t\t\n\t\tif ($file instanceof \\TYPO3\\CMS\\Core\\Resource\\Folder) {\n\t\t\t$this->redirect('listFolder');\n\t\t}\n\n\t\tif (!($file instanceof \\TYPO3\\CMS\\Core\\Resource\\File)) {\n\t\t\t$this->view->assign('intro', true);\n\t\t\treturn;\n\t\t}\n\n\t\t$processedFiles = $this->getProcessedFilesForFile($file);\n \n\t\t$this->view->assign('file', $file);\n\t\t$this->view->assign('processedFiles', $processedFiles);\n\t}", "title": "" }, { "docid": "735397dbae5dd6de4a32f9ab46c8479f", "score": "0.7097046", "text": "public function index()\n\t{\n\t\t$resources = $this->resourcesRepository->paginate(100);\n\n\t\treturn view('resources.index')\n\t\t\t->with('resources', $resources);\n\t}", "title": "" }, { "docid": "fec316528723462375530f41e571b4fe", "score": "0.704424", "text": "public function listing()\n\t{\n\t\tglobal $admin, $user; // Superglobales\n\n\t\tif($admin)\n\t\t{\n\t\t\t$pageTwig = 'users/listing.html.twig'; // Chemin de la View\n\t\t\t$template = $this->twig->load($pageTwig); // chargement de la View\n\n\t\t\t$result = $this->model->getAllUsers(); // Retourne la liste de tous les utilisateurs\n\n\t\t\techo $template->render([\"url\" => $_SERVER['REQUEST_URI'], \"result\" => $result, \"admin\" => $admin, \"user\" => $user]); // Affiche la view et passe les données en paramêtres\n\t\t}\n\t}", "title": "" }, { "docid": "027627f1e20a0806fbdf50a2ba14c78c", "score": "0.70438755", "text": "public function show()\n {\n $params = $this->getProjectFilters('listing', 'show');\n $query = $this->taskFilter->search($params['filters']['search'])->filterByProject($params['project']['id'])->getQuery();\n\n $paginator = $this->paginator\n ->setUrl('listing', 'show', array('project_id' => $params['project']['id']))\n ->setMax(30)\n ->setOrder(TaskModel::TABLE.'.id')\n ->setDirection('DESC')\n ->setQuery($query)\n ->calculate();\n\n $this->response->html($this->helper->layout->app('listing/show', $params + array(\n 'paginator' => $paginator,\n 'categories_list' => $this->category->getList($params['project']['id'], false),\n 'users_list' => $this->projectUserRole->getAssignableUsersList($params['project']['id'], false),\n 'custom_filters_list' => $this->customFilter->getAll($params['project']['id'], $this->userSession->getId()),\n )));\n }", "title": "" }, { "docid": "d293f3fdec60349ef0877e91df4a099b", "score": "0.70241606", "text": "public function index()\n {\n $resources = Resources::orderBy('id', 'desc')->get();\n return view('Backend/Resources/viewResource', compact('resources'));\n }", "title": "" }, { "docid": "dab649efb652b22919255920aff18021", "score": "0.69978404", "text": "public function index()\n\t{\n\t\t$data['listing'] = Listing::paginate(15);\n\n\t\treturn view('admin.listing', $data);\n\t}", "title": "" }, { "docid": "fb266928c00d205f35924b707dcdadf4", "score": "0.6995689", "text": "public function listAction() {\n // Check if the item exists\n $id = $this->getParam('id');\n $item = get_record_by_id('Item', $id);\n if (!$item) {\n throw new Omeka_Controller_Exception_404;\n }\n // Respond with JSON\n try {\n $jsonData = IiifItems_Util_Annotation::buildList($item);\n $this->__respondWithJson($jsonData);\n } catch (Exception $e) {\n $this->__respondWithJson(array(\n 'message' => $e->getMessage()\n ), 500);\n }\n }", "title": "" }, { "docid": "970e35836b9768276ac32a7f819d569f", "score": "0.6969622", "text": "public function index()\n {\n return \"Here is the listing page.\";\n }", "title": "" }, { "docid": "f20bd0e93af1502c691a240521847e9d", "score": "0.6946605", "text": "public function index() {\n $resources = $this->resources;\n $this->set(array('resources' => $resources, '_serialize' => 'resources'));\n }", "title": "" }, { "docid": "6803a23af3bc653e90735ffd2b2ed35f", "score": "0.6941913", "text": "public function index()\n {\n\n $resource = (new AclResource())->AclResource;\n\n return view('Admin.acl.resource.index')->withResource($resource);\n }", "title": "" }, { "docid": "924e51ba82c2eab34f48f3bbfecb5197", "score": "0.692225", "text": "public function index()\n {\n return view('resources.index', [\n 'resources' => Resource::orderBy('id', 'DESC')->get()\n ]);\n }", "title": "" }, { "docid": "f7e7cbb28c97549abd73fed7818403a4", "score": "0.6920865", "text": "public function list()\n {\n return $this->Get('list');\n }", "title": "" }, { "docid": "aa6c01f133b8fa50888c5287d810e174", "score": "0.69041467", "text": "public static function list() {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include( __DIR__ . '/../views/books/list.php');\n\n }", "title": "" }, { "docid": "f0fa2690ffaab13556ebf9f8ee023468", "score": "0.6886966", "text": "public function listing()\n {\n // solo permite mostrar listado de TODOS los productos al administrador\n // si no es admin, redireccion a la lista de productos disponibles\n if (!$this->isAdmin())\n $this->redirect(\"product\", \"available\");\n\n $products = \\models\\Product::findBy(null);\n\n // se le pasa el listado a la vista y se renderiza\n $this->view->assign(\"list\", $products);\n $this->view->render(\"product_list\");\n }", "title": "" }, { "docid": "1cacb33ba12b36b95c20025febdd4b33", "score": "0.68812966", "text": "public function index()\n {\n // atau saat membuka page lain pada pagination\n $this->list();\n }", "title": "" }, { "docid": "3a0850cc56c832a1affe3d6906e36183", "score": "0.68409985", "text": "public function listAction()\n {\n return $this->render('MesdHelpWikiBundle:Default:list.html.twig', array());\n }", "title": "" }, { "docid": "7de268658a226bfb1078da5310cd732b", "score": "0.6829061", "text": "public function index()\n {\n $showData = Input::has('showData') ? (bool) Input::get('showData') : false;\n\n if ($showData === true) {\n $this->setTransformerFilters();\n }\n\n $limit = Input::has('limit') ? Input::get('limit') : 10000;\n\n\n // handle search\n if (Input::has('q')) {\n\n $resources = $this->service->search(\n Input::get('q'),\n $limit,\n $showData\n );\n\n return $this->respondWithCollection($resources,\n $showData === true ? $this->transformer : new ListTransformer());\n } else {\n return $this->respondWithCollection($this->service->showList($limit, $showData),\n $showData === true ? $this->transformer : new ListTransformer());\n }\n }", "title": "" }, { "docid": "d46bb32faa9e8a7d477db9cdd1aa50f0", "score": "0.6800859", "text": "public function index()\n {\n // Add a record\n// $obj = Resource::create([\n// 'seq'=>1.0,\n// 'name'=>'My image',\n// 'description'=>'My special image',\n// 'type'=>'IMAGE',\n// 'url'=>'',\n// 'status'=>'ACTIVE',\n// 'image'=>'chalky.jpg',\n// 'thumb'=>'chalky.jpg',\n// 'created_at'=>'2015-10-20 21:30:13',\n// 'updated_at'=>'2015-10-20 21:30:13'\n// ]);\n// $obj->save();\n\n $resources = Resource::all();\n\n // This would return json, as if for a basic API\n// return $resources;\n\n // Here we rely on a template to format the data\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "db4daec9f8d8cd89f2cb81ded0d0e9ea", "score": "0.68007904", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->memberRepository->all();\n }\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "a8dcf059f191629c6258ae65433dac79", "score": "0.68005747", "text": "public function index()\n {\n //Grab all listings - with a descending sort by create timestamp.\n $listings = Listing::orderBy('created_at', 'desc')->get();\n\n //Return view with listings data.\n return view('listings')->with('listings', $listings);\n }", "title": "" }, { "docid": "01e703b1d51958083a171c504a5fbe86", "score": "0.67932504", "text": "public function list()\n {\n // ...\n }", "title": "" }, { "docid": "8f780116288779687a52681d9b84a0ef", "score": "0.6789059", "text": "public function listAction()\n {\n $all = $this->users->findAll();\n $table = $this->createTable($all);\n\n $this->theme->setTitle(\"Användare\");\n $this->views->add('users/index', ['content' => $table, 'title' => \"Användare\"], 'main-wide');\n }", "title": "" }, { "docid": "fd7b1f8fd083bf003bd937783f973341", "score": "0.6786347", "text": "public function index() {\n\t\t/// Displaying all items from the database\n\t\t$list = Item::findAll();\n\t\t$list[\"title\"] = \"All items\";\n\t\t$this->render(\"index\", $list);\n\t}", "title": "" }, { "docid": "2581dc8a87e69733d9a5051a2ba197df", "score": "0.6784052", "text": "public function view_list();", "title": "" }, { "docid": "74f1d55e2353d3983fa09829081123b9", "score": "0.67709553", "text": "public function index()\n {\n // Get articles\n $articles = Article::latest()->paginate(5);\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "a127bb62f2b51cad9508439ded53e39b", "score": "0.67696005", "text": "public function index()\n {\n $tests = Test::all();\n return TestForListResource::collection($tests);\n }", "title": "" }, { "docid": "1e182d51ef856ffdebfbd850cf50bee9", "score": "0.67537886", "text": "public function index()\n {\n $result = Information::where('active', true)->orderby('id', 'DESC')->paginate(20);\n return InformationResource::collection($result);\n }", "title": "" }, { "docid": "3dac8ae8178b5ab6ec8f744af3d4b5bb", "score": "0.67486656", "text": "public function index()\n {\n $inventories = Inventory::orderBy('created_at', 'desc')->paginate($this->inventoriesInPage);\n return $this->renderOutputAdmin(\"inventories.list\", [\n \"inventories\" => $inventories\n ]);\n }", "title": "" }, { "docid": "0753ada8c8a122f6b6886e1cc84a5965", "score": "0.67384964", "text": "public function index()\n {\n $this->authorize('view', $this->resource->getModel());\n\n $this->data['collections'] = $this->resource->getRowsData();\n $this->data['attributes'] = $this->resource->getAttributes();\n\n return view('vellum::catalog', $this->data);\n }", "title": "" }, { "docid": "92224d4b1facc85c25b765eda1c899d2", "score": "0.6737816", "text": "public function actionIndex()\n {\n $searchModel = new ResourcesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "66c285f8944542cf7713edaba3a0ad2c", "score": "0.6725589", "text": "public function index()\n {\n $this->data['url_data'] = site_url($this->class_path_name.'/list_data');\n $this->data['add_url'] = site_url($this->class_path_name.'/add');\n $this->data['record_perpage'] = SHOW_RECORDS_DEFAULT;\n }", "title": "" }, { "docid": "80d12db260f6dfe4b5aceed4625f5855", "score": "0.6721976", "text": "public function listAction()\n {\n $this->_datatable();\n return $this->render('BackendBundle:Foodies:list.html.twig');\n }", "title": "" }, { "docid": "b26e0dccffef1f4b909a7cc8c4dffc74", "score": "0.67117697", "text": "public function listAction()\n\t{\n\t\tif ($this->_getParam('json')) {\n\t\t\t$this->listJsonAction();\n\t\t} else {\n\t\t\t$project = $this->projectService->getProject((int) $this->_getParam('projectid'));\n\t\t\t$this->view->features = $this->featureService->getProjectFeatures($project);\n\t\t\t$this->view->project = $project;\n\t\t\tif ($this->_getParam('_ajax')) {\n\t\t\t\t$this->renderRawView('feature/list.php');\n\t\t\t} else {\n\t\t\t\t$this->renderView('feature/list.php');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1b9ec8f3eb9fe45d7e52c09e49cd1f9d", "score": "0.67012614", "text": "public function index()\n {\n $offers = Offer::paginate(10);\n return OfferResource::collection($offers);\n }", "title": "" }, { "docid": "190c6247941c857dd2767bd08ced001b", "score": "0.66836476", "text": "public function index()\n {\n $device_logs = DeviceLog::filter()->paginate();\n // $this->authorize('index', 'App\\DeviceLog'); // TODO: Policy\n\n return Resource::collection($device_logs);\n }", "title": "" }, { "docid": "9956226ca0d6a5a308e812db7aa3c8dd", "score": "0.6680364", "text": "public function index()\n {\n return view('listing.index')->withListings(Listing::all());\n }", "title": "" }, { "docid": "b4b19a0a264ba05f056ca1d352c15ab3", "score": "0.6679044", "text": "public function listAction() {\n\t\t$tags = $this->getTags();\n\t\t$this->view->assign('tags', $tags);\n\t}", "title": "" }, { "docid": "5d423b3e213eb36859bc854e0ea0821c", "score": "0.66765565", "text": "public function index()\n\t{\n\t\t$this->get();\n\t}", "title": "" }, { "docid": "962ec92f5da4e239f0963901dd679303", "score": "0.667593", "text": "public function list()\n {\n $this->checkLoginStatus('list');\n return new HtmlResponse();\n }", "title": "" }, { "docid": "f11e7dc71257fc35d626a4cc0df754c5", "score": "0.6671179", "text": "public function index()\n {\n $books = Book::paginate(10);\n\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "67da517f1e843dce244d42bf3c00c83c", "score": "0.66616595", "text": "public function index()\n {\n $resources = Resource::getResourcesByUserServiceProvider();\n\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "d1469f07edbbe4ff69af75d8f005780f", "score": "0.6661017", "text": "public function index()\n {\n $listings = Listing::get();\n return view('pages.backend.listing.index', compact('listings'));\n }", "title": "" }, { "docid": "4972cd57158bca324de2cdc88e1141c7", "score": "0.6659724", "text": "public function index()\n {\n $specifier = Specifier::paginate();\n return SpecifierResource::collection($specifier);\n }", "title": "" }, { "docid": "cbfc53f61a9472895d3345b43532b0f6", "score": "0.6659596", "text": "public function actionList()\n {\n $searchModel = new IgualasSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n // Se buscan también los servicios\n $serviciosModel = new \\app\\models\\ServiciosSearch(['activo'=>true]);\n $serviciosProvider = $serviciosModel->search(Yii::$app->request->queryParams);\n\n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n 'serviciosProvider' => $serviciosProvider,\n ]);\n }", "title": "" }, { "docid": "ec7aa7b9d406ecdd3cbfb90dfff07cc9", "score": "0.66576624", "text": "public function index()\n {\n // Getting all the articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(6);\n\n // Return article collection as a resource\n return aResource::collection($articles);\n }", "title": "" }, { "docid": "348728c06ffc3f7f47ab7a2486701300", "score": "0.66531324", "text": "public function list()\n {\n return view('items.list');\n }", "title": "" }, { "docid": "d1c36ec734b04a00b0316be8705fdc95", "score": "0.6647826", "text": "public function defaultAction()\n {\n $this->listing();\n }", "title": "" }, { "docid": "3340a40aeb9ca6134a87997b56d911be", "score": "0.6645119", "text": "public function indexAction()\n {\n $item = new Item;\n $items = $item->getAll();\n View::renderTemplate('Home/index.html', ['items_list' => $items]);\n }", "title": "" }, { "docid": "e7a070ae572c193acb7a79ecc2d34f28", "score": "0.66418844", "text": "public function index()\n {\n // Get activities\n $activities = Activity::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of activities as a resource\n return ActivityResource::collection($activities);\n }", "title": "" }, { "docid": "ae0412e2b98e2acf1da43d334bdc55fa", "score": "0.6638416", "text": "public function index()\n\t{\n\t\t$datas = $this->model->where('cat_status', 'open')->orderBy('sort_order')->paginate(15);\n\t\treturn View::make($this->resourceView.'.index')->with(compact('datas'));\n\t}", "title": "" }, { "docid": "81e310e3464b83f2e25e4bb5406f1a35", "score": "0.663706", "text": "public function index()\n {\n $products = Product::latest()->paginate(10);\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "c7124181b330eb937c62f9defe1d9274", "score": "0.66361564", "text": "public function index()\n {\n return SectionResource::collection(SectionModel::paginate(25));\n }", "title": "" }, { "docid": "5b0d18ee7af036a0126d30b01aac4670", "score": "0.6635448", "text": "public function index( )\n\t{\t\n\t\tif(!\\Sentry::getUser()->hasAccess('manage_listings')){\n\t\t\treturn redirect()->action('AdminController@properties');\n\t\t}\n\n\t\t$listings= $this->listing->get();\n\t\t$website = $this->website->get();\n\t\treturn view('admin.listings', array('listings'=>$listings, 'websites'=>$website));\n\n\t}", "title": "" }, { "docid": "2e96526efb31162a0f4ca3bb61f781c5", "score": "0.66319674", "text": "public function indexAction()\n\t{\n\t\t$this->_view->_title \t\t\t\t= ucfirst($this->_arrParam['controller']) . \" Controller :: List\";\n\n\t\t//Total Items\n\t\t$itemCount \t\t\t\t\t\t\t= $this->_model->countItems($this->_arrParam, ['task' => 'count-items-status']);\n\t\t$configPagination \t\t\t\t\t= ['totalItemsPerPage' => 5, 'pageRange' => 3];\n\t\t$this->setPagination($configPagination);\n\t\t$this->_view->pagination \t\t\t= new Pagination($itemCount[0]['count'], $this->_pagination);\n\t\t//List Items\n\t\t$this->_view->items \t\t\t\t= $this->_model->listItems($this->_arrParam);\n\t\t$this->_view->render($this->_arrParam['controller'] . '/index');\n\t}", "title": "" }, { "docid": "9fe55a7f3832e2905b2600e03b1356d2", "score": "0.6627155", "text": "public function index()\n\t{\n\t\tif (Input::get('list'))\t\treturn Response::json($this->model->getList(), 200);\n\t\telse \t\t\t\t\t\treturn Response::json($this->model->fetch(Input::all()), 200);\n\t}", "title": "" }, { "docid": "5438ea6951e01b2b0c5f44bd2895ba5d", "score": "0.6627067", "text": "public function index()\n {\n $listing = Listing::paginate(15);\n\n return view('listing.index', compact('listing'));\n }", "title": "" }, { "docid": "28c7c5fe8eff5e4f7e67018271a3970f", "score": "0.6621494", "text": "public function index()\n {\n //\n $resources = \\App\\Resource::all();\n return $resources;\n }", "title": "" }, { "docid": "7049b0be3d5ee96fe0213da94a5eabdc", "score": "0.66211265", "text": "public function list(): Response\n {\n $repository = $this->getDoctrine()->getRepository(ShowList::class);\n return $this->render('concert/concert.html.twig', [\n 'name' => \"list\",\n 'concerts' => $repository->findAll()\n ]\n );\n }", "title": "" }, { "docid": "de6e1eefbb1c8632afb33575e2d66697", "score": "0.66209346", "text": "public function index()\n {\n return BookListResource::collection(Book::all());\n // // return $author->books;\n }", "title": "" }, { "docid": "fb7ed7947ab536b91c04edc0db5a20e5", "score": "0.6608123", "text": "public function listAction()\n {\n $title = $this->t->_('List ') . $this->t->_($this->model_name);\n $this->tag->setTitle($title);\n $this->view->title = $title;\n\n $model = $this->getModel();\n\n if (is_null($model)) {\n $this->response->redirect('/admin/dashboard');\n }\n\n $query_urls = $this->request->getQuery();\n unset($query_urls['_url']);\n unset($query_urls['submit']);\n unset($query_urls['page']);\n\n // search\n $search_opt = $this->getFieldsSearch($query_urls, $model->list_view['fields']);\n $conditions = $search_opt['conditions'];\n $parameters = $search_opt['parameters'];\n // sort\n\n $list_data = $model::find(array(\n $conditions,\n 'bind' => $parameters\n ));\n\n // pagination\n $currentPage = $this->request->getQuery('page');\n $paginator_limit = 20; // @TODO\n $paginator = new PaginatorModel(array(\n \"data\" => $list_data,\n \"limit\" => $paginator_limit,\n \"page\" => $currentPage > 0 ? $currentPage : 1\n ));\n // get page\n $page = $paginator->getPaginate();\n\n $this->view->page = $page;\n $this->view->data = $page->items;\n $this->view->list_view = $model->list_view;\n $this->view->search = $query_urls;\n\n $controller = strtolower($this->controller_name);\n $action = strtolower($this->action_name);\n\n $this->view->controller = $controller;\n $this->view->action = $action;\n $this->view->action_detail = $this->action_detail;\n $this->view->action_edit = $this->action_edit;\n $this->view->action_delete = $this->action_delete;\n $this->view->menu = $model->menu;\n\n $query_urls = empty($query_urls) ? array('nosearch' => 1) : $query_urls;\n $this->view->current_url = $this->url->get(\"/admin/$controller/$action\", $query_urls);\n\n $exists = $this->view->exists($controller . '/' . $action);\n if (!$exists) {\n $this->view->pick('view_default/list');\n }\n }", "title": "" }, { "docid": "4075f3e85858e8eac990a25721c76630", "score": "0.66057074", "text": "public function index()\n {\n return $this->sendResponse( [\n \"items\"=> BookResource::collection(Book::all()->toArray())\n ],\n \"Books Retrieved successfully!\"\n );\n\n }", "title": "" }, { "docid": "f148c3920960427ce58f996986160dfa", "score": "0.6605562", "text": "public function index()\n { \n $articles = Article::latest()->paginate(10);\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "5bd87f0ad66d0212e0bec36ece123e1e", "score": "0.6600455", "text": "public function index()\n {\n $user = Student::latest()->get();\n return $this->showAll(StudentResource::collection($user));\n }", "title": "" }, { "docid": "4815297dfe29adcb934ed5d6b8357ceb", "score": "0.65940166", "text": "public function index()\n\t{\n\t\t// // Check for list permission\n\t\t// if (! $this->model->mayList())\n\t\t// {\n\t\t// \treturn $this->user();\n\t\t// }\n\n\t\treturn $this->display();\n\t}", "title": "" }, { "docid": "a84c8d0a92b2e2efb69455a9790926e0", "score": "0.65936685", "text": "public function index()\n {\n return AulaResource::collection(Aula::paginate());\n }", "title": "" }, { "docid": "8395c06faebc6da915e86b24ff1c40b8", "score": "0.6591476", "text": "public function index()\n {\n //Get all articles, paginate function could be improved\n // $articles = Article::paginate(15);\n\n $articles = Article::get();\n //Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "6847e76913911cac71a85fa2835bf369", "score": "0.6583209", "text": "public function listAction()\n {\n $this->View()->assign($this->getAvailableStatuses());\n }", "title": "" }, { "docid": "244698ad57c10b2cf9bea875ed11f4e2", "score": "0.6582496", "text": "public function index()\n {\n return view('listing.index')->with([\n 'listings' => app('listings')->take(7),\n 'tags' => Tag::all(),\n ]);\n }", "title": "" }, { "docid": "965ff224495731f89e5a39ec8d28c56c", "score": "0.6580476", "text": "public function indexAction()\n\t{\n\t\t$paginator = $this->_getPaginator();\n\t\t$this->_configurePagination($paginator);\n\t\t$records = $this->_getProcessedRecords($paginator->getCurrentItems());\n\n\t\t$this->view->assign('records',$records);\n\n\t\t$this->configureView();\n\n\t\t$this->view->render('index.phtml');\n\t}", "title": "" }, { "docid": "5ae3dc8a0646433f9c872265b7fae9bb", "score": "0.6579524", "text": "public function index()\n {\n save_resource_url();\n $items = Document::with('documentable')->get();\n\n return $this->view('resources.documents.index')->with('items', $items);\n }", "title": "" }, { "docid": "f7f0617a1c3535ff5bd60dabc6ef0b2a", "score": "0.65772367", "text": "public function index()\n {\n $resources=Resource::orderBy('created_at','desc')->get();\n return view('admin.index',compact('resources'));\n }", "title": "" }, { "docid": "93c8e2fb25d358967a7239099ffa01be", "score": "0.6576169", "text": "public function actionList()\n {\n $model = new ImageList();\n\n $path = $model->getDataRequest('path');\n $imageList = $model->loadImage($path);\n\n return $this->render('list',compact('model','imageList','path'));\n }", "title": "" }, { "docid": "caa63ad0b7f03a52984cdbcc404b742e", "score": "0.6566202", "text": "public function listingAction()\n {\n $this->_helper->content->setNoRender()->setEnabled();\n }", "title": "" }, { "docid": "9ce8b7d31b54ee923c432b4460d8fe38", "score": "0.65637076", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = $this->crud->getTitle() ?? mb_ucfirst($this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "d085389ae4d1b9ed456fd3f7f897fb44", "score": "0.65618056", "text": "public function index()\n {\n return ProjectListResource::collection(Project::paginate());\n }", "title": "" }, { "docid": "fb5cc939df880d31486688650542e9ef", "score": "0.6560243", "text": "public function index()\n {\n $per_page = !request()->filled('per_page') ? 10 : (int) request('per_page');\n $direction = request()->query('direction');\n $sortBy = request()->query('sortBy');\n\n $query = EmisiCo2Tahunan::query();\n\n $query->when(request()->filled('tahun'), function ($query) {\n return $query->where('tahun', 'ILIKE', \"%\" . request()->query('tahun') . \"%\");\n });\n\n if(request()->has('provinsi')){\n $query->when(request()->filled('provinsi'), function ($query) {\n return $query->whereHas('Provinsi',function($q){\n return $q->where('nama_provinsi', 'ILIKE', \"%\" . request()->query('provinsi') . \"%\");\n });\n });\n }\n\n $lists = $query->orderBy($sortBy, $direction)->paginate($per_page);\n\n return new ListResources($lists);\n }", "title": "" }, { "docid": "d9aec54688559be15dcc145297ec98e9", "score": "0.6559387", "text": "public function index()\n {\n return view('backend.item.list_item');\n }", "title": "" }, { "docid": "e9a03ea28e2df914c978aa5c0d3a5637", "score": "0.6554056", "text": "public function index()\n {\n $options = $this->getQueryHelperOptions();\n $items = $this->repo->allPaged($options);\n\n if ( ! $items)\n {\n return $this->respondNotFound('Unable to fetch the selected resources');\n }\n\n $response = [\n 'data' => [],\n 'meta' => [\n 'pagination' => []\n ]\n ];\n\n $resource = new Fractal\\Resource\\Collection($items->getCollection(), new $this->transformerClass);\n $resource->setPaginator(new Fractal\\Pagination\\IlluminatePaginatorAdapter($items));\n\n $response['data'] = $this->fractal->createData($resource)->toArray()['data'];\n\n $paginator = new Fractal\\Pagination\\IlluminatePaginatorAdapter($items);\n\n $response['meta']['pagination'] = [\n 'total' => $paginator->getTotal(),\n 'count' => $paginator->count(),\n 'per_page' => $paginator->getPerPage(),\n 'current_page' => $paginator->getCurrentPage(),\n 'total_pages' => $paginator->getLastPage()\n ];\n\n return $response;\n }", "title": "" }, { "docid": "64c23385ebf3abebc1a7abc1fe27b69a", "score": "0.65517366", "text": "public function index()\n {\n return EntryResource::collection(Auth::user()->entries);\n }", "title": "" }, { "docid": "9c04a592d034f52c23e6d6ecf983a3ae", "score": "0.6544668", "text": "public function index()\n {\n return EmployeeResource::collection(Employee::query()->paginate());\n }", "title": "" }, { "docid": "91ef4976872522e55ce7d21232db8ce3", "score": "0.6541719", "text": "public function getlist()\n {\n \t$specieses = Species::all();\n\n \treturn view( 'species.index-species' )->withSpecieses($specieses);\n }", "title": "" }, { "docid": "13e213cc4f2553888dd031c39274477f", "score": "0.65387595", "text": "public function index()\n {\n $objects = Thing::availableForCatalog()->paginate(40)->toJson();\n\n return view('web.pages.objects.index', compact('objects'));\n }", "title": "" }, { "docid": "7e319cde9d05f34fd876660ef419e5c1", "score": "0.6535465", "text": "public function index()\n {\n return CursoResource::collection(Curso::paginate());\n }", "title": "" }, { "docid": "80349a31fc145e69c11f76d6fe21f244", "score": "0.6525081", "text": "public function listAction($page)\n {\n $list = ApiDataSource::getList(!empty($page) ? $page : 1);\n\n if (!empty($list)) {\n try {\n echo TemplateEngine::get()->render(\n 'index.html.twig',\n array(\n \"shipList\" => !empty($list['results']) ? $list['results'] : null,\n \"currentPage\" => $page,\n \"totalPages\" => !empty($list['results']) && !empty($list['count']) ? ceil($list['count'] / Config::get()->getSection('api')['perPage']) : 0\n )\n );\n } catch (\\Exception $e) {\n Logger::get()->error($e->getMessage());\n header('HTTP/1.0 500 Internal server error');\n }\n } else {\n header('HTTP/1.0 404 Not Found');\n }\n }", "title": "" }, { "docid": "8db12a9417955f7cafd859a2f084db66", "score": "0.6524149", "text": "public function index()\n {\n $articles=$this->articleRepository->paginate(10);\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "b02a86792172e9aa0d15ce71523bf18a", "score": "0.6522924", "text": "public function listAction()\n {\n $postManager = new PostManager();\n $posts = $postManager->getAllPosts();\n $this->render('Post/list.html.twig', ['posts' => $posts]);\n }", "title": "" }, { "docid": "3facf87d49c58736d719a1d9ceb098c4", "score": "0.6515679", "text": "public function index()\n {\n $halls = Hall::all();\n return HallResource::collection($halls);\n }", "title": "" }, { "docid": "5e65da9a34ee6f80605137959439b41c", "score": "0.6511205", "text": "public function index()\n {\n //\n return EmployeeResource::collection(Employee::latest()->paginate(5));\n }", "title": "" }, { "docid": "3f890ba095bdb75af4cc34f24821df21", "score": "0.651028", "text": "public function index()\n {\n //Retrieve all the otter resource names that are available\n $allResourceNames = $this->allResourceNames;\n $prettyResourceName = $this->prettyResourceName;\n $resourceName = $this->resourceName;\n $resourceFields = json_encode(Otter::getAvailableFields($this->resource));\n\n return view('otter::pages.index', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields'));\n }", "title": "" }, { "docid": "1fa5cdf3237bc23c42125528d9db4212", "score": "0.650871", "text": "public function listAction()\n {\n $this->view->assign('posts', $this->findPosts());\n }", "title": "" }, { "docid": "c7253bf5ee3c82a3ec81a23e84bfc054", "score": "0.6507231", "text": "public function index()\n {\n return Response::custom('list', $this->service->all(), \\Illuminate\\Http\\Response::HTTP_OK);\n }", "title": "" }, { "docid": "16cbe42e288d6db09ecb33ee711d2c85", "score": "0.650502", "text": "public function index()\n {\n $items = Item::all();\n\n return response([\n 'items' => ItemResource::collection($items),\n 'message' => 'Retrieved successfully'\n ], 200);\n }", "title": "" }, { "docid": "9b9cf4a5c0a3cf48f806a2c95874afa6", "score": "0.6503013", "text": "public function index()\n {\n //\n if (\\Gate::allows('canView')) {\n $category = Category::latest()->paginate(10);\n return CategoryResource::collection($category);\n } else {\n return ['result' => 'error', 'message' => 'Unauthorized! Access Denied'];\n }\n }", "title": "" }, { "docid": "4b682e76649352c45a12edca169568ff", "score": "0.65024114", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_Book_type->get_all();\n\t\t$this->template->set('title', 'Book Type List');\n\t\t$this->template->load('template', 'contents', 'book_type/book_type_list', $data);\n\t}", "title": "" }, { "docid": "12f45a4dbd72d90586e475e387aa5ee9", "score": "0.6500511", "text": "public function list()\n {\n // récupération de tous les users grâce à la méthode statique \"findAll()\"\n $users = User::findAll();\n\n // génération d'un token aléatoire\n // pour protéger la route\n $token = $this->generateCsrfToken();\n\n // définition du tableau de données $viewVars à passer à ma vue\n $viewVars = [\n 'users' => $users,\n 'token' => $token,\n ];\n\n // j'appelle ma méthode show qui va afficher le bon template\n // à qui je passe mon tableau de données viewVars\n $this->show('user/list', $viewVars);\n }", "title": "" } ]
d385764844c2fd1af56b2ed9cfd1630d
Sets the yearHeaderTemplate option of the GanttView. The template used to render the year slots in "year" view.
[ { "docid": "38ad99e2195b17ac9e06f119dca32907", "score": "0.7486292", "text": "public function yearHeaderTemplate($value) {\n return $this->setProperty('yearHeaderTemplate', $value);\n }", "title": "" } ]
[ { "docid": "a45ed6591c7eb59407161feb390bb238", "score": "0.73068523", "text": "public function yearHeaderTemplateId($value) {\n $value = new \\Kendo\\Template($value);\n\n return $this->setProperty('yearHeaderTemplate', $value);\n }", "title": "" }, { "docid": "e15b093f4d8503f19f1ad9d9f595fcdc", "score": "0.6271026", "text": "public function setYearHeading($yearHeading)\n {\n $this->_yearHeading = $yearHeading;\n }", "title": "" }, { "docid": "5ae82ef40c2d1c0f9cd7ca44bdce5a57", "score": "0.576121", "text": "public function getYearHeading()\n {\n return strlen($this->_yearHeading) ? $this->_yearHeading : _x('Year', 'select year', 'iphorm');\n }", "title": "" }, { "docid": "627db7d2046d0f89e7ceb2b3f969e7a5", "score": "0.5578584", "text": "public function setYear($value){return $this->setDate(modifyDateString($this->getDate(),$value,'year'));}", "title": "" }, { "docid": "e8e9881493acaa46cfebdf7163f2f62c", "score": "0.5525927", "text": "public function yearTask()\n\t{\n\t\t// Get some needed info\n\t\t$year = $this->year;\n\t\t$month = $this->month;\n\t\t$day = $this->day;\n\t\t$offset = $this->offset;\n\t\t$option = $this->_option;\n\t\t$gid = $this->gid;\n\n\t\t// Set some filters\n\t\t$filters = array();\n\t\t$filters['gid'] = $gid;\n\t\t$filters['year'] = $year;\n\t\t$filters['category'] = $this->category;\n\t\t$filters['scope'] = 'event';\n\n\t\t// Retrieve records\n\t\t$ee = new Event($this->database);\n\t\t$rows = $ee->getEvents('year', $filters);\n\n\t\t// Everyone has access unless restricted to admins in the configuration\n\t\t$authorized = true;\n\t\tif (User::isGuest())\n\t\t{\n\t\t\t$authorized = false;\n\t\t}\n\t\tif ($this->config->getCfg('adminlevel'))\n\t\t{\n\t\t\t$authorized = $this->_authorize();\n\t\t}\n\n\t\t// Get a list of categories\n\t\t$categories = $this->_getCategories();\n\n\t\t// Build the page title\n\t\t$this->_buildTitle();\n\n\t\t// Build the pathway\n\t\t$this->_buildPathway();\n\n\t\t// Output HMTL\n\t\t$this->view->setLayout('year')->setName('browse');\n\t\t$this->view->option = $this->_option;\n\t\t$this->view->title = $this->_title;\n\t\t$this->view->task = $this->_task;\n\t\t$this->view->year = $year;\n\t\t$this->view->month = $month;\n\t\t$this->view->day = $day;\n\t\t$this->view->rows = $rows;\n\t\t$this->view->authorized = $authorized;\n\t\t$this->view->fields = $this->config->getCfg('fields');\n\t\t$this->view->category = $this->category;\n\t\t$this->view->categories = $categories;\n\t\t$this->view->offset = $offset;\n\n\t\tforeach ($this->getErrors() as $error)\n\t\t{\n\t\t\t$this->view->setError($error);\n\t\t}\n\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "ece6654e05f21bdde8b58709388c2149", "score": "0.5516476", "text": "protected function setStartYear($start_year = null) { $this->start_year = $start_year; }", "title": "" }, { "docid": "db1914a1ee95ab66f09a3bf8032047a0", "score": "0.55084044", "text": "public function setYear($value)\n {\n if (!array_key_exists('year', $this->fieldsModified)) {\n $this->fieldsModified['year'] = $this->data['fields']['year'];\n } elseif ($value === $this->fieldsModified['year']) {\n unset($this->fieldsModified['year']);\n }\n\n $this->data['fields']['year'] = $value;\n }", "title": "" }, { "docid": "ec2d4722d8534b2105bde0831e50d342", "score": "0.54994947", "text": "public function year($value) {\n return $this->setProperty('year', $value);\n }", "title": "" }, { "docid": "6247bf73d3d183b193afa3bfa0d5450b", "score": "0.5480749", "text": "public function monthHeaderTemplate($value) {\n return $this->setProperty('monthHeaderTemplate', $value);\n }", "title": "" }, { "docid": "b7e0a70f53dda66e8d8f9e70159c64a3", "score": "0.5464059", "text": "public function majorTimeHeaderTemplate($value) {\n return $this->setProperty('majorTimeHeaderTemplate', $value);\n }", "title": "" }, { "docid": "5fc18c91cb9353801739631f96692f0d", "score": "0.54632807", "text": "public function setYear($var)\n {\n GPBUtil::checkInt32($var);\n $this->year = $var;\n\n return $this;\n }", "title": "" }, { "docid": "6e807fa1270259ea5da72dc8d1d979af", "score": "0.545341", "text": "public function dateHeaderTemplateId($value) {\n $value = new \\Kendo\\Template($value);\n\n return $this->setProperty('dateHeaderTemplate', $value);\n }", "title": "" }, { "docid": "bf2164e4147386a0d35977ee22824195", "score": "0.5453034", "text": "public function majorTimeHeaderTemplateId($value) {\n $value = new \\Kendo\\Template($value);\n\n return $this->setProperty('majorTimeHeaderTemplate', $value);\n }", "title": "" }, { "docid": "662d8245b0125354f9b04716eefd272e", "score": "0.54496753", "text": "public function monthHeaderTemplateId($value) {\n $value = new \\Kendo\\Template($value);\n\n return $this->setProperty('monthHeaderTemplate', $value);\n }", "title": "" }, { "docid": "033f7e49ec3c416f43df1dadaea7c44b", "score": "0.5427832", "text": "public function setYear($var)\n {\n GPBUtil::checkString($var, True);\n $this->year = $var;\n\n return $this;\n }", "title": "" }, { "docid": "c10296d424242a8499feb088c4e0e111", "score": "0.54160243", "text": "public function action_year ( $channel, $year ) {\n\t\t\t$channel = $this->logs->get_channel_name($channel);\n\t\t\t\n\t\t\t$months = $this->logs->get_channel_months( $channel, $year );\n\t\t\t\n\t\t\t$this->template->title = $channel;\n\t\t\t$this->template->content = View::factory('logs/year')\n\t\t\t\t->bind('channel', $channel)\n\t\t\t\t->bind('year', $year)\n\t\t\t\t->bind('months', $months);\n\t\t\t\n\t\t}", "title": "" }, { "docid": "4257f048a3d989a015c4a7aed8b4a181", "score": "0.5414773", "text": "public function setYearStart($value){\n\t\tif($value===NULL){\n\t\t\t$this->_yearStart=date('Y')-90;\n\t\t}else{\n\t\t\t$this->_yearStart=$value;\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "2c81cf7968529afdba5a954a323f9eab", "score": "0.53870124", "text": "public function dateHeaderTemplate($value) {\n return $this->setProperty('dateHeaderTemplate', $value);\n }", "title": "" }, { "docid": "0bba3422d07b3aa7b79adb3dee2c3430", "score": "0.5384948", "text": "function show_year(){\r\r\n\t\techo '<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">';\r\r\n\t\tfor($i = 1;$i<=12;$i++){\r\r\n\t\t\t$this->a_template['is_show_title'] = 0;\r\r\n\t\t\t$this->a_template['show_year'] = 1;\r\r\n\t\t\t$this->a_look['td_width'] = 25;\r\r\n\t\t\t$this->a_look['td_height'] = 25;\r\r\n\t\t\t$this->a_look['def_align'] = 'center';\r\r\n\t\t\t$this->a_look['def_valign'] = 'midle';\r\r\n\t\t\t$this->a_selected_date['m'] = $i;\r\r\n\t\t\t$this->a_selected_date['d'] = 0;\r\r\n\t\t\tif($i == 1 || !(($i-1)%3)) echo \"<tr>\";\r\r\n\t\t\techo '<td valign=\"top\">';\r\r\n\t\t\t$this->show_h();\r\r\n\t\t\techo \"</td>\";\r\r\n\t\t\tif(!($i%3)) echo \"</tr>\";\r\r\n\t\t}\r\r\n\t\techo '</table>';\r\r\n\t}", "title": "" }, { "docid": "50acb43aeb0938053a9b1ae136269024", "score": "0.5316706", "text": "public function headerTemplate(?string $header_template): self {\n $this->headerTemplate = self::addTwigFileExtension($header_template);\n return $this;\n }", "title": "" }, { "docid": "f6b4d25dc992119de7a951881f00668c", "score": "0.5268899", "text": "public function manageyear()\n\t{\n\t\treturn view('admin/year', array('title' => 'Dashboard'));\n\t}", "title": "" }, { "docid": "c7916cc66b8bb4bab1294d945258e340", "score": "0.5213895", "text": "public function year($year = null){\n if(func_num_args() == 1){\n if($year != $this->year){\n $this->year = (int)$year;\n }\n }\n return $this->year;\n }", "title": "" }, { "docid": "d60ac63289110a2c121e1e4917166f4c", "score": "0.51803374", "text": "public function setHeadTemplate($html)\n\t{\n\t\t$this->headRowTemplate = $html;\n\t}", "title": "" }, { "docid": "df3f0d790f1479d04c2aba6ba1d2ef58", "score": "0.5180041", "text": "public function setYear($year, $locale = null);", "title": "" }, { "docid": "df69a139103d95836c6421834c079975", "score": "0.51722974", "text": "public function setStartYear($startYear)\n {\n $this->_startYear = $startYear;\n }", "title": "" }, { "docid": "5b00cf63ff0638b035b713c8a6f7cc42", "score": "0.51626104", "text": "public function setYear(?int $value): void {\n $this->getBackingStore()->set('year', $value);\n }", "title": "" }, { "docid": "2d334cfb1b4152eeaeaec886f3e79c18", "score": "0.5141222", "text": "public function setYear($year = 0) {\n if (!is_int($year)) {\n throw new \\InvalidArgumentException('Vehicle->setYear() requires an integer.');\n }\n return $this->_year = $year;\n }", "title": "" }, { "docid": "58a36e747d0e17c622649f3f9f7741e1", "score": "0.5079485", "text": "public function timeHeaderTemplateId($value) {\n $value = new \\Kendo\\Template($value);\n\n return $this->setProperty('timeHeaderTemplate', $value);\n }", "title": "" }, { "docid": "4221c5975a683b9653a01a38c85f4f32", "score": "0.5055179", "text": "public function setHeaderTemplate($template)\r\n {\r\n $this->_headerTemplate = $template;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "2fa4e9b3df3c92c927e89cc265855598", "score": "0.5004635", "text": "public function setYear(int $year)\n {\n $this->year = $year;\n return $this;\n }", "title": "" }, { "docid": "5142b7fcf7fe8ede7645f22440afb7ac", "score": "0.49750596", "text": "public function getStartYear() { return $this->start_year; }", "title": "" }, { "docid": "2b5285777262a6854b7e926be1584e49", "score": "0.49731007", "text": "function setYear($inYear) {\n\t\tif ( $inYear !== $this->_Year ) {\n\t\t\t$this->_Year = $inYear;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6d3f9c2d3931d73996f00a44450258b8", "score": "0.4957861", "text": "public function setYear($year) {\n if (strcmp(gettype($year), \"integer\") != 0) {\n throw new \\Pelagos\\Exceptions\\ArgumentException(\"Invalid type for 'year': (\" . gettype($year) . \") Must be 'integer'\");\n }\n if ($year < 1900 || $year > 2100) {\n throw new \\Pelagos\\Exceptions\\ArgumentException(\"Invalid value for 'year': (\" . $year . \") Year must fall between 1900 and 2100, inclusive\");\n }\n $this->_year = $year;\n }", "title": "" }, { "docid": "6e537ba9daa5d619db8b6d4e003a7bb1", "score": "0.49503276", "text": "public function dayHeaderTemplate($value) {\n return $this->setProperty('dayHeaderTemplate', $value);\n }", "title": "" }, { "docid": "12b36f36b97da14d7ada5b966c7c0f53", "score": "0.49489665", "text": "public function timeHeaderTemplate($value) {\n return $this->setProperty('timeHeaderTemplate', $value);\n }", "title": "" }, { "docid": "4ec080195e40b73182a3bbdcb4700d18", "score": "0.49349096", "text": "public function dayHeaderTemplateId($value) {\n $value = new \\Kendo\\Template($value);\n\n return $this->setProperty('dayHeaderTemplate', $value);\n }", "title": "" }, { "docid": "1354494a8984c124531a7d8864316dec", "score": "0.49194264", "text": "public function year_shortcode() {\n\t\treturn date('Y');\n\t}", "title": "" }, { "docid": "302e4ed91cdda98060f79752c123192b", "score": "0.49141112", "text": "public function setCurrentYear($year = null)\n {\n $this->current_year = (is_null($year) ? date('Y') : (int) $year);\n\n return $this;\n }", "title": "" }, { "docid": "2021e920cb61620e34b99d51b95e6e5d", "score": "0.49043173", "text": "private function displayYearTable() {\n\t\techo '<table class=\"r fullwidth zebra-style\">';\n\n\t\techo '<thead class=\"r\">';\n\t\t$this->displayTableHeadForTimeRange();\n\t\techo '</thead>';\n\n\t\techo '<tbody>';\n\n\t\t$DatasetLabels = new DatasetLabels();\n\n\t\t$this->displayLine(__('Activities'), 'number');\n\t\t$this->displayLine($DatasetLabels->get('s'), 's');\n\t\t$this->displayLine($DatasetLabels->get('distance'), 'distance');\n\n\t\tif ($this->year == -1 && $this->isRunning) {\n\t\t\t$this->displayLine('&oslash;'.NBSP.__('km/Week'), 'distance_week', 'small');\n\t\t\t$this->displayLine('&oslash;'.NBSP.__('km/Month'), 'distance_month', 'small');\n\t\t}\n\n\t\t$this->displayLine('&oslash;'.NBSP.__('Pace'), 'pace', 'small');\n\n\t\tif ($this->isRunning) {\n\t\t\t$this->displayLine($DatasetLabels->get('vdot'), 'vdot', 'small');\n\t\t\t$this->displayLine($DatasetLabels->get('jd_intensity'), 'jd_intensity', 'small');\n\t\t}\n\n\t\t$this->displayLine($DatasetLabels->get('trimp'), 'trimp', 'small');\n\n\t\t$this->displayLine('&oslash;'.NBSP.__('Cadence'), 'cadence', 'small');\n\t\tif ($this->isRunning) {\n\t\t\t$this->displayLine('&oslash;'.NBSP.__('Stride length'), 'stride_length', 'small');\n\t\t\t$this->displayLine('&oslash;'.NBSP.__('Ground contact time'), 'groundcontact', 'small');\n\t\t\t$this->displayLine('&oslash;'.NBSP.__('Vertical oscillation'), 'vertical_oscillation', 'small');\n\t\t}\n\n\t\t$this->displayLine($DatasetLabels->get('elevation'), 'elevation', 'small');\n\t\t$this->displayLine($DatasetLabels->get('kcal'), 'kcal', 'small');\n\t\t$this->displayLine($DatasetLabels->get('pulse_avg'), 'pulse_avg', 'small');\n\t\t$this->displayLine($DatasetLabels->get('pulse_max'), 'pulse_max', 'small');\n\t\t$this->displayLine($DatasetLabels->get('power'), 'power', 'small');\n\t\t$this->displayLine($DatasetLabels->get('temperature'), 'temperature', 'small');\n\t\t$this->displayLine($DatasetLabels->get('abc'), 'abc', 'small');\n\n\t\techo '</tbody>';\n\t\techo '</table>';\n\t}", "title": "" }, { "docid": "dfc974047c44221c61bdd518864cd83d", "score": "0.4903517", "text": "public final function setYear( ?int $year = null ) : DateTime\n {\n\n if ( null === $year )\n {\n $year = static::CurrentYear();\n }\n\n return $this->setDateParts( $year );\n\n }", "title": "" }, { "docid": "c6568916fe1dc81068344a099cc3530f", "score": "0.48919877", "text": "protected function LoadYearDropdown()\r\n\t{\r\n\t\t$this->SetupYearRange();\r\n\r\n\t\t//Clear any existing elements\r\n\t\t$this->Year->ClearElements();\r\n\r\n //Start with a blank one.\r\n\t\t$this->Year->AddElement(0, \"\");\r\n\r\n\t\t//And loop from start to end years\r\n for ($i = $this->_startYear; $i <= $this->_endYear; $i++)\r\n\t\t{\r\n\t\t\t$this->Year->AddElement($i, $i);\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "61ca66edf800af18422f5da7a3974609", "score": "0.48530477", "text": "public function cronYear()\n {\n $returnResponse = $this->getApiResponse();\n $returnResponse->setData(array('Cron Year'));\n return $returnResponse->write();\n }", "title": "" }, { "docid": "faeab2659f72105bf8aa8bc9fcd6fa41", "score": "0.4851207", "text": "public function getYear()\n {\n return $this->_dateTime->year;\n }", "title": "" }, { "docid": "2d9d404510d1f6fb9a74a116376b9151", "score": "0.48508406", "text": "public function getYearStart(){return $this->_yearStart;}", "title": "" }, { "docid": "b9fd74326f077142b42153393ce9f44a", "score": "0.48310956", "text": "public function groupHeaderTemplateId($value) {\n $value = new \\Kendo\\Template($value);\n\n return $this->setProperty('groupHeaderTemplate', $value);\n }", "title": "" }, { "docid": "579a11b42526e2ea930d38e1ab787616", "score": "0.4830593", "text": "public function headerTemplateId($value) {\n $value = new \\Kendo\\Template($value);\n\n return $this->setProperty('headerTemplate', $value);\n }", "title": "" }, { "docid": "5f7d4374827a8bea0f3936c29fc0df5a", "score": "0.48254442", "text": "public function setYear($year)\n {\n $this->year = $year;\n\n return $this;\n }", "title": "" }, { "docid": "4e788e9419ab9d0f54d7a1fe828639b1", "score": "0.48204798", "text": "function setYear($y)\n {\n if ($y < 0 || $y > 9999) {\n $this->year = 0;\n } else {\n $this->year = $y;\n }\n }", "title": "" }, { "docid": "564beffca83b37d22cd08537292ccb31", "score": "0.47944736", "text": "function debtcollective_copyright_year( $atts ) {\n\t// Setup defaults.\n\t$args = shortcode_atts(\n\t\t[\n\t\t\t'starting_year' => '',\n\t\t\t'separator' => ' - ',\n\t\t],\n\t\t$atts\n\t);\n\n\t$current_year = gmdate( 'Y' );\n\n\t// Return current year if starting year is empty.\n\tif ( ! $args['starting_year'] ) {\n\t\treturn $current_year;\n\t}\n\n\treturn esc_html( $args['starting_year'] . $args['separator'] . $current_year );\n}", "title": "" }, { "docid": "db7141a0061952bc9e95c4158f25dd5f", "score": "0.47917095", "text": "public function initialize() {\n\t\tadd_shortcode('year', array($this, 'year_shortcode'));\n\t}", "title": "" }, { "docid": "2000d4fc4bdddd004cea6d7692469afc", "score": "0.477989", "text": "public function weekHeaderTemplate($value) {\n return $this->setProperty('weekHeaderTemplate', $value);\n }", "title": "" }, { "docid": "757f727a044a868a3e528b4b9004f716", "score": "0.47710365", "text": "public function groupHeaderTemplate($value) {\n return $this->setProperty('groupHeaderTemplate', $value);\n }", "title": "" }, { "docid": "a961dd9ff6aadd647167b28a02ddc69f", "score": "0.4766044", "text": "public function getYear() {\n return $this->_year;\n }", "title": "" }, { "docid": "a961dd9ff6aadd647167b28a02ddc69f", "score": "0.4766044", "text": "public function getYear() {\n return $this->_year;\n }", "title": "" }, { "docid": "ba4ff982ca2acd380bf7c6685b1c003e", "score": "0.4765514", "text": "public function weekHeaderTemplateId($value) {\n $value = new \\Kendo\\Template($value);\n\n return $this->setProperty('weekHeaderTemplate', $value);\n }", "title": "" }, { "docid": "a02f776fbfcca683ae22c173bee6feee", "score": "0.47655103", "text": "function thisYear($format = 'int')\n {\n $ts = $this->cE->dateToStamp($this->year, 1, 1, 0, 0, 0);\n return $this->returnValue('Year', $format, $ts, $this->year);\n }", "title": "" }, { "docid": "01708848890327dbeb0848a649c40647", "score": "0.476377", "text": "private function set_yeardata(&$data){\n\t\t$today = date(\"Y-m-d\"); \n\t\t$year = substr($today, 0, 4);\n\t\t\n\t\t$year_data = $this->time_schedule_model->get_year_schedule($data->title, $year);\n\t\t\n\t\tif(empty($year_data))\n\t\t\t$data_list = '';\n\t\telse {\n\t\t\t$data_list = array();\n\t\t\t\n\t\t\tforeach($year_data as $t) {\n\t\t\t\t$data_list[$t->date] = $t;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$data->json_year_data = json_encode($data_list);\n\n\t}", "title": "" }, { "docid": "650663448cc387358fd446820f8f79f7", "score": "0.4754939", "text": "public function ad_year(){\n $r=$this->Admin_model->se_year();\n $selar=array(\n \"row\"=>$r\n );\n $this->load->view('admin_view/add-year',$selar);\n }", "title": "" }, { "docid": "d5bc2ab3b5e1b98e32595da64be386a8", "score": "0.4753248", "text": "public function setYear($year)\n\t{\n\t\t$this->year = $year;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f48306ec20c75950dd6de67b9354eee7", "score": "0.474993", "text": "function getYear() {\n\t\treturn $this->_Year;\n\t}", "title": "" }, { "docid": "e4b7e38faf5480dd01fa776944a1a29a", "score": "0.47494495", "text": "function SetHeaderType( $name )\n {\n $this->headerTmpl = $name;\n }", "title": "" }, { "docid": "53daa0eb44a38d4894a76fe7949af1c0", "score": "0.4723252", "text": "public function getYear()\n {\n return $this->year;\n }", "title": "" }, { "docid": "53daa0eb44a38d4894a76fe7949af1c0", "score": "0.4723252", "text": "public function getYear()\n {\n return $this->year;\n }", "title": "" }, { "docid": "53daa0eb44a38d4894a76fe7949af1c0", "score": "0.4723252", "text": "public function getYear()\n {\n return $this->year;\n }", "title": "" }, { "docid": "53daa0eb44a38d4894a76fe7949af1c0", "score": "0.4723252", "text": "public function getYear()\n {\n return $this->year;\n }", "title": "" }, { "docid": "53daa0eb44a38d4894a76fe7949af1c0", "score": "0.4723252", "text": "public function getYear()\n {\n return $this->year;\n }", "title": "" }, { "docid": "c55d35cc044c25c18c1bab088ec57e18", "score": "0.4719663", "text": "function yearOptionTag($tagName, $value = null, $minYear = null, $maxYear = null, $selected = null, $selectAttr = null, $optionAttr = null, $showEmpty = true) {\r\n\t\tif (empty($selected) && ($this->tagValue($tagName))) {\r\n\t\t\t$selected = date('Y', strtotime($this->tagValue($tagName)));\r\n\t\t}\r\n\r\n\t\t$yearValue = empty($selected) ? ($showEmpty ? NULL : date('Y')) : $selected;\r\n\t\t$currentYear = date('Y');\r\n\t\t$maxYear = is_null($maxYear) ? $currentYear + 11 : $maxYear + 1;\r\n\t\t$minYear = is_null($minYear) ? $currentYear - 60 : $minYear;\r\n\r\n\t\tif ($minYear > $maxYear) {\r\n\t\t\t$tmpYear = $minYear;\r\n\t\t\t$minYear = $maxYear;\r\n\t\t\t$maxYear = $tmpYear;\r\n\t\t}\r\n\r\n\t\t$minYear = $currentYear < $minYear ? $currentYear : $minYear;\r\n\t\t$maxYear = $currentYear > $maxYear ? $currentYear : $maxYear;\r\n\r\n\t\tfor($yearCounter = $minYear; $yearCounter < $maxYear; $yearCounter++) {\r\n\t\t\t$years[$yearCounter] = $yearCounter;\r\n\t\t}\r\n\r\n\t\treturn $this->selectTag($tagName . \"_year\", $years, $yearValue, $selectAttr, $optionAttr, $showEmpty);\r\n\t}", "title": "" }, { "docid": "8e2990f62bee3498c3925459612d089c", "score": "0.47179243", "text": "public function testSchoolYear() {\n $input = 'AA02 20120423 20120715 125 14 9 0 11 0 0 0 1';\n $header = new Header($input);\n $this->assertEquals(new \\DateTime('2012-04-23'),\n $header->getSchoolYearStart());\n $this->assertEquals(new \\DateTime('2012-07-15'),\n $header->getSchoolYearEnd());\n $this->assertSame(12, $header->getWeekCount()); // A\n $this->assertSame(5, $header->getDaysPerWeek()); // B\n $this->assertSame(14, $header->getHoursPerDay()); // C\n\n\n $this->assertSame(0, $header->getFirstWeekId()); // F\n $this->assertSame(1, $header->getFirstHourNo()); // G\n $this->assertSame(Header::DAY_MONDAY, $header->getFirstDayOfWeek()); // K\n }", "title": "" }, { "docid": "b49dd2f46af5858637a4cdf4e491322a", "score": "0.4699452", "text": "public function getYear() {\n return $this->year;\n }", "title": "" }, { "docid": "7d6eae2e0c423ae83b8343ea6a00b29a", "score": "0.4694434", "text": "public function headerTemplate($value) {\n return $this->setProperty('headerTemplate', $value);\n }", "title": "" }, { "docid": "3dcc54b77c069b98d82c7ff64aff5484", "score": "0.46903005", "text": "public static function CurrentYear() : int\n {\n\n return (int) \\strftime( '%Y' );\n\n }", "title": "" }, { "docid": "d6eb6701539336fe780f8e34c1fe17c7", "score": "0.46885806", "text": "public function setReplaceDateTemplate(){\n\t\t$selectionDay = date('j');\n\t\t$selectionMonth = date('n');\n\t\t$selectionYear = date('Y');\n\t\t\n\t\t//Start Dates.\n\t\tfor ($i = 1; $i < 32; $i++)\n\t\t{\n\t\t\t$selected = ($i == $selectionDay) ? ' selected=\"selected\"' : '';\n\t\t\t$s_replace_day_options .= \"<option value=\\\"$i\\\"$selected>$i</option>\";\n\t\t}\n\t\t\n\t\tfor ($i = 1; $i < 13; $i++)\n\t\t{\n\t\t\t$selected = ($i == $selectionMonth) ? ' selected=\"selected\"' : '';\n\t\t\t$s_replace_month_options .= \"<option value=\\\"$i\\\"$selected>\" . date('F', mktime(0, 0, 0, $i, 1, date('Y'))) .\"</option>\";\n\t\t}\n\t\t$s_replace_year_options = '';\n\t\t\n\t\t$now = getdate();\n\t\tfor ($i = $now['year']; $i <= ($now['year'] + 1); $i++)\n\t\t{\n\t\t\t$selected = ($i == $selectionyear) ? ' selected=\"selected\"' : '';\n\t\t\t$s_replace_year_options .= \"<option value=\\\"$i\\\"$selected>$i</option>\";\n\t\t}\n\t\tunset($now);\n\n\t\t$this->template->assign_vars(array(\n\t\t\t'S_REPLACE_DAY_OPTIONS'\t=> $s_replace_day_options,\n\t\t\t'S_REPLACE_MONTH_OPTIONS'\t=> $s_replace_month_options,\n\t\t\t'S_REPLACE_YEAR_OPTIONS'\t=> $s_replace_year_options,\n\t\t));\t\n\t}", "title": "" }, { "docid": "d0ccd08c0e70703f863490a7e71c48b4", "score": "0.46781006", "text": "public function getYear()\n {\n return (int) $this->dateTime->format('Y');\n }", "title": "" }, { "docid": "7bed989456a831479ce40e996de8a505", "score": "0.46617848", "text": "function getYear()\n {\n return $this->year;\n }", "title": "" }, { "docid": "ac569abae2f6b083912187ed04a94e5a", "score": "0.46588048", "text": "public function getYear()\n\t{\n\t\treturn $this->year;\n\t}", "title": "" }, { "docid": "d574f2e83d9c2b6bdaf7ca4fd6677ed0", "score": "0.46354994", "text": "public function SetHeaderText($text){\n $this->content_template->Set(\"header\",($text != \"\" ? \"<h3>$text</h3>\" : \"\"));\n return $this;\n }", "title": "" }, { "docid": "f980e552a5b8051856d36db277e99e62", "score": "0.46279335", "text": "public function byYear()\n\t{\n\t\t$admin_nav = $this->Menu_item->arrangeByTiers($this->Session->read('Admin.menu_id'));\t\n\t\t$page_url = '/reports/byYear';\n\t\t$admin_check = $this->Menu_item->menuActiveHeaderCheck($page_url, $admin_nav);\n\t\t$this->set('admin_nav',$admin_nav);\n\t\t$this->set('admin_pages',$page_url);\n\t\t$this->set('admin_check',$admin_check);\t\n\t\t//set variables\n\t\t$year = array();\n\t\tfor ($i=2012; $i < date('Y')+1; $i++) { \n\t\t\t$year[$i] = $i;\n\t\t}\n\t\t$this->set('year',$year);\t\n\t\t//if month and year were selected\n\t\tif ($this->request->is('post')) {\n\t\t\t//set the title for the page\n\t\t\t$this->set('title_for_layout',__($this->request->data['byYear']['Year'].' Sales Report'));\t\n\t\t\t//set variables\n\t\t\t$year = $this->request->data['byYear']['Year'];\n\t\t\t$this->set('setYear',$year);\n\t\t\t$company_id = $this->Session->read('Company.company_id');\n\t\t\t$startYear = $year.'-01-01 00:00:00';\n\t\t\t$endYear = $year.'-12-31 23:59:59';\n\t\t\t$category = $this->Category->find('all',array('conditions'=>array('Category.company_id'=>$company_id,'Category.status'=>1),'order'=>array('Category.category_list'=>'asc')));\n\t\t\t$category_count = count($category);\n\t\t\t$colorArray = array('a2abff','00ff89','edff89','f3a0ff','ffa4a0','ae84cf','ae8469','69ae9f','acacac','009d9f','9f9600');\n\t\t\t$maxAmount = $this->Invoice->query('SELECT max(`Invoice`.`after_tax`) AS maxAfterTax FROM invoices AS Invoice\n\t\t\t\t\t\t\t\t\t\t\t WHERE `Invoice`.`company_id`='.$company_id.'\n\t\t\t\t\t\t\t\t\t\t\t AND created BETWEEN \"'.$startYear.'\" AND \"'.$endYear.'\"');\n\t\t\t$maxAmount = ceil($maxAmount[0][0]['maxAfterTax']);\n\t\t\tif ($maxAmount == '') {\n\t\t\t\t$maxAmount = '100';\n\t\t\t}\n\t\t\t$dayValues = $this->Invoice->findSum_selection('selectYearByDays',$year,$company_id);\n\t\t\t$dayValues_count = count($dayValues);\n\t\t\t$weekValues = $this->Invoice->findSum_selection('selectYearByWeeks',$year,$company_id);\n\t\t\t$weekValues_count = count($weekValues);\n\t\t\t$monthValues = $this->Invoice->findSum_selection('selectYearByMonths',$year,$company_id);\n\t\t\t$monthValues_count = count($monthValues);\n\t\t\tfor ($i=0; $i < $category_count; $i++) {\n\t\t\t\t$category_name= $category[$i]['Category']['name']; \n\t\t\t\t$monthTotalsByCategory[$i] = $this->InvoiceLineitem->getCategory_values('selectYearByMonth', $year, $endYear, $company_id, $category_name);\n\t\t\t}\n\t\t\t$dates = array('start'=>$startYear,'end'=>$endYear);\n\t\t\t$tax_rate = $this->TaxInfo->find('all',array('conditions'=>array('TaxInfo.company_id'=>$company_id)));\n\t\t\t$tax_rate = $tax_rate[0]['TaxInfo']['rate'];\n\t\t\t$orders = $this->Order->find('all',array('conditions'=>array('Order.company_id'=>$company_id)));\n\t\t\t$orders_report = $this->InvoiceLineitem->ordersReport('month_year',$company_id, $dates, $category, $orders);\n\t\t\t$category_totals = $this->InvoiceLineitem->ordersReport('categoryTotals_month_year',$company_id, $dates, $category, $tax_rate);\n\t\t\t$endOfDayTotals = $this->InvoiceLineitem->ordersReport('summaryReport_month_year', $company_id, $dates, null, $tax_rate);\n\t\t\t//send to view to create report\n\t\t\t$this->set('category',$category);\n\t\t\t$this->set('category_totals',$category_totals);\n\t\t\t$this->set('orders_report',$orders_report);\n\t\t\t$this->set('endOfDay', $endOfDayTotals);\t\n\t\t\t$this->set('date',$dates);\t\n\t\t\t//day chart\n\t\n\t\t\t$this->FusionCharts->create(\n\t\t\t\t'Line2D Chart',\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'Line',\n\t\t\t\t\t'width' => 1000,\n\t\t\t\t\t'height' => 600,\n\t\t\t\t\t'id' => ''\n\t\t\t\t)\n\t\t\t);\n\t\t\tif ($dayValues_count <10) {\n\t\t\t\t$this->FusionCharts->setChartParams(\n\t\t\t\t\t'Line2D Chart',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'caption'\t\t\t\t\t=> $year.' Summary - By Days',\n\t\t\t\t\t\t'subcaption'\t\t\t\t=> 'Every business day this year up to today',\n\t\t\t\t\t\t'xAxisName'\t\t\t\t\t=> 'Day',\n\t\t\t\t\t\t'yAxisMinValue'\t\t\t\t=> '0',\n\t\t\t\t\t\t'yAxisName'\t\t\t\t\t=> 'Sales',\n\t\t\t\t\t\t'decimalPrecision'\t\t\t=> '2',\n\t\t\t\t\t\t'rotateNames'\t\t\t\t=> '1',\n\t\t\t\t\t\t'formatNumberScale'\t\t\t=> '0',\n\t\t\t\t\t\t'numberPrefix'\t\t\t\t=> '$',\n\t\t\t\t\t\t'showNames'\t\t\t\t\t=> '1',\n\t\t\t\t\t\t'showValues'\t\t\t\t=> '1',\n\t\t\t\t\t\t'showAlternateHGridColor'\t=> '1',\n\t\t\t\t\t\t'AlternateHGridColor'\t\t=> 'ff5904',\n\t\t\t\t\t\t'divLineColor'\t\t\t\t=> 'ff5904',\n\t\t\t\t\t\t'divLineAlpha'\t\t\t\t=> '20',\n\t\t\t\t\t\t'alternateHGridAlpha'\t\t=> '5'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$this->FusionCharts->setChartParams(\n\t\t\t\t\t'Line2D Chart',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'caption'\t\t\t\t\t=> $year.' Summary - By Days',\n\t\t\t\t\t\t'subcaption'\t\t\t\t=> 'Every business day this year up to today',\n\t\t\t\t\t\t'xAxisName'\t\t\t\t\t=> 'Day',\n\t\t\t\t\t\t'yAxisMinValue'\t\t\t\t=> '0',\n\t\t\t\t\t\t'yAxisName'\t\t\t\t\t=> 'Sales',\n\t\t\t\t\t\t'decimalPrecision'\t\t\t=> '2',\n\t\t\t\t\t\t'rotateNames'\t\t\t\t=> '1',\n\t\t\t\t\t\t'formatNumberScale'\t\t\t=> '0',\n\t\t\t\t\t\t'numberPrefix'\t\t\t\t=> '$',\n\t\t\t\t\t\t'showNames'\t\t\t\t\t=> '1',\n\t\t\t\t\t\t'showValues'\t\t\t\t=> '0',\n\t\t\t\t\t\t'showAlternateHGridColor'\t=> '1',\n\t\t\t\t\t\t'AlternateHGridColor'\t\t=> 'ff5904',\n\t\t\t\t\t\t'divLineColor'\t\t\t\t=> 'ff5904',\n\t\t\t\t\t\t'divLineAlpha'\t\t\t\t=> '20',\n\t\t\t\t\t\t'alternateHGridAlpha'\t\t=> '5'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\tfor ($i=1; $i < $dayValues_count+1; $i++) {\n\t\t\t\t$date = date('n/d/y',$dayValues[$i]['date']);\n\t\t\t\t$value = $dayValues[$i]['sum'];\n\t\t\t\t$this->FusionCharts->addChartData(\n\t\t\t\t\t'Line2D Chart',\n\t\t\t\t\tarray(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'value' => $value, \n\t\t\t\t\t\t\t'params' => array(\n\t\t\t\t\t\t\t\t'name' => $date,\n\t\t\t\t\t\t\t\t'hoverText'=>$date,\n\t\t\t\t\t\t\t\t'color'=> 'ff0000',\n\t\t\t\t\t\t\t\t'anchorBorderColor'\t=> 'ff0000',\n\t\t\t\t\t\t\t\t'anchorBgColor'\t\t=> 'ff0000'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\n\t\t\t\t\t)\n\t\t\t\t);\t\t\t\t\n\t\t\t}\t\n\t\t\t//week chart\n\t\t\t$this->FusionCharts->create(\n\t\t\t\t'Area2D Chart',\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'Area2D',\n\t\t\t\t\t'width' => 1000,\n\t\t\t\t\t'height' => 600,\n\t\t\t\t\t'id' => ''\n\t\t\t\t)\n\t\t\t);\n\t\n\t\t\t$this->FusionCharts->setChartParams(\n\t\t\t\t'Area2D Chart',\n\t\t\t\tarray(\n\t\t\t\t\t'caption'\t\t\t\t\t=> $year.' Summary - By Weeks',\n\t\t\t\t\t'subcaption'\t\t\t\t=> 'Every business week up to today',\n\t\t\t\t\t'xAxisName'\t\t\t\t\t=> 'Weeks',\n\t\t\t\t\t'yAxisName'\t\t\t\t\t=> 'Sales',\n\t\t\t\t\t'yAxisMaxValue'\t\t\t\t=> $maxAmount,\n\t\t\t\t\t'yAxisMinValue'\t\t\t\t=> '0',\n\t\t\t\t\t'rotateNames'\t\t\t\t=> '1',\n\t\t\t\t\t'decimalPrecision'\t\t\t=> '2',\n\t\t\t\t\t'showValues'\t\t\t\t=> '1',\n\t\t\t\t\t'showAlternateHGridColor'\t=> '1',\n\t\t\t\t\t'areaBorderColor'\t\t\t=> '005455',\n\t\t\t\t\t'AlternateHGridColor'\t\t=> '5e5e5e',\n\t\t\t\t\t'divLineColor'\t\t\t\t=> 'e5e5e5',\n\t\t\t\t\t'divLineAlpha'\t\t\t\t=> '60',\n\t\t\t\t\t'alternateHGridAlpha'\t\t=> '5',\n\t\t\t\t\t'numberPrefix'\t\t\t\t=> '$'\n\t\t\t\t)\n\t\t\t);\t\n\t\t\t\n\t\t\tfor ($i=1; $i < 53; $i++) {\n\t\t\t\t$date = date('n/d/y',$weekValues[$i]['date']).' - '.$endWeek = date('n/d/y',strtotime('next sunday 11:59:59pm',$weekValues[$i]['date']));\n\t\t\t\t$weekNumber = date('W',$weekValues[$i]['date']);\n\t\t\t\t$value = $weekValues[$i]['sum'];\n\t\t\t\t$this->FusionCharts->addChartData(\n\t\t\t\t\t'Area2D Chart',\n\t\t\t\t\tarray(\n\t\t\t\t\t\tarray('value' => $value, 'params' => array('name' =>'Week #'.$weekNumber,'color'=>'75fdff','hoverText'=>'['.$weekNumber.'], '.$date))\n\t\t\t\t\t)\n\t\t\t\t);\t\t\t\t\n\t\t\t}\n\t\n\t\t\t//month chart\t\n\t\t\t$this->FusionCharts->create(\n\t\t\t\t\t'Column3DLineDY Chart',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'MSColumn3DLineDY',\n\t\t\t\t\t\t'width' => 1000,\n\t\t\t\t\t\t'height' => 600,\n\t\t\t\t\t\t'id' => ''\n\t\t\t\t\t)\n\t\t\t\t);\n\t\n\t\t\t$this->FusionCharts->setChartParams(\n\t\t\t\t\t'Column3DLineDY Chart',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'caption'\t\t\t\t=> $year.' Sales - By Months',\n\t\t\t\t\t\t'PYAxisName'\t\t\t=> 'Revenue',\n\t\t\t\t\t\t'SYAxisName'\t\t\t=> 'Quantity',\n\t\t\t\t\t\t'numberPrefix'\t\t\t=> '$',\n\t\t\t\t\t\t'showvalues'\t\t\t=> '0',\n\t\t\t\t\t\t'rotateNames'\t\t\t=> '1',\n\t\t\t\t\t\t'numDivLines'\t\t\t=> '4',\n\t\t\t\t\t\t'formatNumberScale'\t\t=> '0',\n\t\t\t\t\t\t'decimalPrecision'\t\t=> '2',\n\t\t\t\t\t\t'anchorSides'\t\t\t=> '10',\n\t\t\t\t\t\t'anchorRadius'\t\t\t=> '3',\n\t\t\t\t\t\t'anchorBorderColor'\t\t=> '009900'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\n\t\t\t$this->FusionCharts->addCategories(\n\t\t\t\t\t'Column3DLineDY Chart',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'January '. $year,\n\t\t\t\t\t\t'February '. $year,\n\t\t\t\t\t\t'March '. $year,\n\t\t\t\t\t\t'April '. $year,\n\t\t\t\t\t\t'May '. $year,\n\t\t\t\t\t\t'June '. $year,\n\t\t\t\t\t\t'July '. $year,\n\t\t\t\t\t\t'August '. $year,\n\t\t\t\t\t\t'September '.$year,\n\t\t\t\t\t\t'October '.$year,\n\t\t\t\t\t\t'November '.$year,\n\t\t\t\t\t\t'December '.$year\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tfor ($i=0; $i < $category_count; $i++) {\n\t\t\t\t$category_name = $category[$i]['Category']['name']; \n\t\t\t\t$monthTotals = $monthTotalsByCategory[$i];\n\t\t\t\t$this->FusionCharts->addDatasets(\n\t\t\t\t\t'Column3DLineDY Chart',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t$category_name => array(\n\t\t\t\t\t\t\t'params' => array('color' => $colorArray[$i], 'showValues' => '0'),\n\t\t\t\t\t\t\t'data' => $monthTotals\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\t\t\t\n\t\t\t}\n\t\t\t$this->FusionCharts->addDatasets(\n\t\t\t\t'Column3DLineDY Chart',\n\t\t\t\tarray(\n\t\t\t\t\t'Total Quantity' => array(\n\t\t\t\t\t\t'params' => array('color' => 'ff0000', 'showValues' => '1', 'parentYAxis' => 'S'),\n\t\t\t\t\t\t'data' => $monthValues\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\t\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "99239f9230881fdb43513dc8f68a3369", "score": "0.46156543", "text": "public function createCompleteYear()\n {\n return $this->getYearStudy() . $this->getDepartment()->getName();\n }", "title": "" }, { "docid": "acd02b6997e41828a3a59d10e74970d4", "score": "0.46116003", "text": "protected function get_year(): int\n\t{\n\t\treturn $this->get_date()->year;\n\t}", "title": "" }, { "docid": "5247d68780b800784a3e43e423c5d46e", "score": "0.4599975", "text": "public function index($year = null)\n {\n //\n $data = [];\n // ログインユーザー取得\n $user = Auth::user();\n // モデル\n $model = new Organization();\n // 年数の指定がない場合\n if (empty($year) === true) {\n // 直近の年数取得\n }\n //\n $data['year'] = $year;\n // データ取得\n $organizations = $model->orderBy('id', 'ASC')->get();\n // \n return view('organization.index', compact('user', 'organizations', 'data'));\n }", "title": "" }, { "docid": "547e735fd79700efbd20e7a9b8da5788", "score": "0.45968667", "text": "protected function compileYearlyMenu()\n {\n $arrData = array();\n $time = \\Date::floorToMinute();\n $newsIds = $this->getFilteredNewsIds();\n\n // Get the dates\n $objDates = $this->Database->query(\"SELECT FROM_UNIXTIME(date, '%Y') AS year, COUNT(*) AS count FROM tl_news WHERE pid IN(\" . implode(',', array_map('intval', $this->news_archives)) . \")\" . ((!BE_USER_LOGGED_IN || TL_MODE == 'BE') ? \" AND (start='' OR start<='$time') AND (stop='' OR stop>'\" . ($time + 60) . \"') AND published='1'\" : \"\") . ((count($newsIds) > 0) ? (\" AND id IN (\" . implode(',', $newsIds) . \")\") : \"\") . \" GROUP BY year ORDER BY year DESC\");\n\n while ($objDates->next())\n {\n $arrData[$objDates->year] = $objDates->count;\n }\n\n // Sort the data\n ($this->news_order == 'ascending') ? ksort($arrData) : krsort($arrData);\n\n $arrItems = array();\n $count = 0;\n $limit = count($arrData);\n\n // Prepare the navigation\n foreach ($arrData as $intYear=>$intCount)\n {\n $intDate = $intYear;\n $quantity = sprintf((($intCount < 2) ? $GLOBALS['TL_LANG']['MSC']['entry'] : $GLOBALS['TL_LANG']['MSC']['entries']), $intCount);\n\n $arrItems[$intYear]['date'] = $intDate;\n $arrItems[$intYear]['link'] = $intYear;\n $arrItems[$intYear]['href'] = $this->strUrl . '?year=' . $intDate;\n $arrItems[$intYear]['title'] = \\StringUtil::specialchars($intYear . ' (' . $quantity . ')');\n $arrItems[$intYear]['class'] = trim(((++$count == 1) ? 'first ' : '') . (($count == $limit) ? 'last' : ''));\n $arrItems[$intYear]['isActive'] = (\\Input::get('year') == $intDate);\n $arrItems[$intYear]['quantity'] = $quantity;\n }\n\n $this->Template->yearly = true;\n $this->Template->items = $arrItems;\n $this->Template->showQuantity = ($this->news_showQuantity != '');\n }", "title": "" }, { "docid": "2d20e332ac77abc9ae169ea298adeb49", "score": "0.45941454", "text": "public function indexAction($year = null)\n {\n if (is_numeric($year)) {\n $operations = $this->operationRepository->findByYear($year);\n $this->view->assign('currentYear', $year);\n } else {\n $year = $this->operationRepository->findLastYear();\n $this->redirect('index', null, null, array('year' => $year));\n }\n\n $this->view->assign('operations', $operations);\n $this->view->assign('typeStatistic', $this->operationRepository->getTypeStatisticByYear($year));\n }", "title": "" }, { "docid": "941e2fdc6feb9cdf9244f666c4dd8436", "score": "0.45932636", "text": "private function calculate_year_statistics( &$year_array , $year ) {\n\t\tif ( array_key_exists( $year , $year_array ) ) {\n\t\t\t$year_array[$year] = ( $year_array[$year] + 1 );\n\t\t} else {\n\t\t\t$year_array[$year] = 1;\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "f23af3d0c533bfc5d57e6191e31fd8d8", "score": "0.45909554", "text": "public function getYear(): int\n {\n return $this->year;\n }", "title": "" }, { "docid": "1914ad76a7a429ef0b7a7aa408f967a3", "score": "0.45872483", "text": "function render()\n\t{\n\t\t$diff = date('N', $this->beginning) - 1;\n\t\t$beginning = strtotime('-' . $diff . ' days', $this->beginning);\n\t\t$content[] = '<table class=\"YearOverview\">';\n\t\t$content[] = '<tr>\n\t\t\t<th></th>\n\t\t\t<th colspan=\"5\">Jan</th>\n\t\t\t<th colspan=\"4\">Feb</th>\n\t\t\t<th colspan=\"5\">Mar</th>\n\t\t\t<th colspan=\"4\">Apr</th>\n\t\t\t<th colspan=\"5\">May</th>\n\t\t\t<th colspan=\"4\">Jun</th>\n\t\t\t<th colspan=\"5\">Jul</th>\n\t\t\t<th colspan=\"5\">Aug</th>\n\t\t\t<th colspan=\"4\">Sep</th>\n\t\t\t<th colspan=\"5\">Oct</th>\n\t\t\t<th colspan=\"4\">Nov</th>\n\t\t\t<th colspan=\"5\">Dec</th>\n\t\t</tr>';\n\t\tfor ($dow = 1; $dow <= 7; $dow++) {\n\t\t\t$date = strtotime('+' . ($dow - 1) . ' days', $beginning); // first week Jan\n\t\t\t$content[] = '<tr>';\n\t\t\t$content[] = '<td>' . $this->dowName[$dow] . '</td>';\n\t\t\tfor ($w = 1; $w <= 53; $w++) {\n\t\t\t\t$iso = date('Y-m-d', $date);\n\t\t\t\tif (str_startsWith($iso, (string)$this->year)) {\n\t\t\t\t\tif (isset($this->days[$iso])) {\n\t\t\t\t\t\t$intensity = $this->days[$iso];\n\t\t\t\t\t\t$color = new Color($this->maxIntensity);\n\t\t\t\t\t\t$sColor = $color->alter_color(0, $intensity - 100, 100 - $intensity);\n\t\t\t\t\t\t$style = 'background-color: ' . $sColor;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$style = '';\n\t\t\t\t\t}\n\t\t\t\t\t$inTD = date('d', $date) == 1 ? '01' : '';\n\t\t\t\t\t$inTD = date('d', $date) == 31 ? '31' : $inTD;\n\t\t\t\t\t$inTD = $dow == 1 ? date('d', $date) : $inTD;\n\t\t\t\t} else {\n\t\t\t\t\t$style = '';\n\t\t\t\t\t$inTD = '';\n\t\t\t\t}\n\t\t\t\t$content[] = '<td style=\"' . $style . '\">' . $inTD . '</td>';\n\t\t\t\t$date = strtotime('+7 days', $date);\n\t\t\t}\n\t\t\t$content[] = '</tr>';\n\t\t}\n\t\t$content[] = '</table>';\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "f6a993d01a9c72f7ece4d24c3332bd3b", "score": "0.45868927", "text": "public function setExpirationYear($year)\n {\n Argument::i()->test(1, 'int');\n\n $this->paymentData['trnExpYear'] = $year;\n\n return $this;\n }", "title": "" }, { "docid": "6649f8a1a54e38e8a7953b113fcd32aa", "score": "0.45866853", "text": "function Header() { \n if (is_null($this->_tplIdx)) { \n\t\t\t$this->setSourceFile($this->path_blank);\n $this->_tplIdx = $this->importPage(1); \n } \n $this->useTemplate($this->_tplIdx); \n \n }", "title": "" }, { "docid": "efc4894030eb62065cfb6718928bc114", "score": "0.45678654", "text": "public function getCalendarYear()\n {\n return $this->iCalYear;\n }", "title": "" }, { "docid": "827d73f0509d55347be0dfae25988f27", "score": "0.45643803", "text": "public function selectYear(){\n\t\t\t//year\n\t\t\t//echo '<select name=\"year\">';\n\t\t\tfor($i = date('Y'); $i >= date('Y', strtotime('-90 years')); $i--){\n\t\t\techo \"<option value=\\\"$i\\\">$i</option>\";\n\t\t\t} \n\t\t}", "title": "" }, { "docid": "d9aa44ace0947c799c9b7385f33fb428", "score": "0.4556125", "text": "public function create()\n {\n return view('Year.create',['title'=>'Year Create']);\n }", "title": "" }, { "docid": "eead18d9e9e2e5a96dc66552dcc28bef", "score": "0.45554915", "text": "public function setMinAllowedYear($minYear) {\n\t\t$this->__minimumAllowedYear = $minYear;\n\t}", "title": "" }, { "docid": "43ede5996e488755764b98def4fe5b7f", "score": "0.4555468", "text": "public function __construct($strYear)\n {\n $this->strYear = $strYear;\n $this->strYearSign = $strYear;\n }", "title": "" }, { "docid": "9ac12419a4c0268242253271b616e312", "score": "0.4553737", "text": "private function retrieve_currentyear()\n {\n }", "title": "" }, { "docid": "32636b5edabf435aa1f4df168b3bd7a4", "score": "0.4549762", "text": "public function getYear()\n {\n return $this->data['fields']['year'];\n }", "title": "" }, { "docid": "bd991321d766377a21e1797eb1cfbe0b", "score": "0.45492002", "text": "public function get_yeardata($year=2016){\n\t\t$title = $this->session->userdata('tour_type');\n\t\t$year_data = $this->time_schedule_model->get_year_schedule($title, $year);\n\t\t\n\t\tif(empty($year_data))\n\t\t\t$data_list = '';\n\t\telse {\n\t\t\t$data_list = array();\n\t\t\t\n\t\t\tforeach($year_data as $data) {\n\t\t\t\t$data_list[$data->date] = $data;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$json_year_data = json_encode($data_list);\n\t\t\n\t\treturn $json_year_data;\n\t}", "title": "" }, { "docid": "1aad5bd3d35aa9f977bbdaf7d43816b3", "score": "0.4546675", "text": "function year()\n\t{\n\t\t\treturn $this->_dp['year'];\n\t}", "title": "" }, { "docid": "a5d86eb3d67d6160c6cbf510ce54fdaa", "score": "0.45452595", "text": "function auto_copyright($startYear = null) {\n\t$thisYear = date('Y'); // get this year as 4-digit value\n if (!is_numeric($startYear)) {\n\t\t$year = $thisYear; // use this year as default\n\t} else {\n\t\t$year = intval($startYear);\n\t}\n\tif ($year == $thisYear || $year > $thisYear) { // $year cannot be greater than this year - if it is then echo only current year\n\t\techo \"&copy; $thisYear\"; // display single year\n\t} else {\n\t\techo \"&copy; $year&ndash;$thisYear\"; // display range of years\n\t} \n }", "title": "" }, { "docid": "837f51bb0d61c40b7bd49670bedb3d99", "score": "0.45417863", "text": "public function year()\n\t{\n\t\treturn date('Y', time());\n\t}", "title": "" }, { "docid": "64644606412b025d525027798fb985bc", "score": "0.45295468", "text": "function auto_copyright($startYear = null) {\n\t$thisYear = date('Y'); // get this year as 4-digit value\n if (!is_numeric($startYear)) {\n\t\t$year = $thisYear; // use this year as default\n\t} else {\n\t\t$year = intval($startYear);\n\t}\n\tif ($year == $thisYear || $year > $thisYear) { // $year cannot be greater than this year - if it is then echo only current year\n\t\techo \"&copy;$thisYear\"; // display single year\n\t} else {\n\t\techo \"&copy; $year&ndash;$thisYear\"; // display range of years\n\t} \n }", "title": "" }, { "docid": "44cc8abdef691cd90b9f74b6a5896bdf", "score": "0.4525382", "text": "function oceanwp_custom_header_template() {\n\t\t$template = get_theme_mod( 'ocean_header_template' );\n\n\t\t// Apply filters and return\n\t\treturn apply_filters( 'ocean_custom_header_template', $template );\n\n\t}", "title": "" } ]
8df4510c81b3bed03576d861a47a34ad
Cleans up the job.
[ { "docid": "e8081980abd010984cfe9bb45b64fec4", "score": "0.5902417", "text": "public function cleanJob(TripalRemoteJob $job) {\n $resource = $job->getResource();\n $resource->cleanJob($job);\n if ($job->getSendEmail() == TRUE) {\n $this->sendCompleteEmail($job);\n }\n }", "title": "" } ]
[ { "docid": "4a51a3c30195366f376b77a29a68257d", "score": "0.72569025", "text": "public function clean() {\n\t\t$this->out('Deleting old jobs, that have finished before ' . date('Y-m-d H:i:s', time() - Configure::read('queue.cleanuptimeout')));\n\t\t$this->QueuedTask->cleanOldJobs();\n\t}", "title": "" }, { "docid": "06b2dcd47261f131ba6c939b43de4165", "score": "0.7148414", "text": "public function cleanup();", "title": "" }, { "docid": "06b2dcd47261f131ba6c939b43de4165", "score": "0.7148414", "text": "public function cleanup();", "title": "" }, { "docid": "0348cf5b4454033e26072c95af3e9e9f", "score": "0.71336263", "text": "public function clear()\n {\n $queue = new Job_queue();\n $queue->removeOld($this->lifeTime);\n }", "title": "" }, { "docid": "61a236b49290c9cf53fc29b5463ca699", "score": "0.70255166", "text": "public static function cleanup() {}", "title": "" }, { "docid": "0f17d3e46c5fdffe276e729b5dff4331", "score": "0.6982091", "text": "public function __destruct()\n {\n $this->waitForJobs($this->allPids);\n }", "title": "" }, { "docid": "974542422ef9b957a4954fd0db80155d", "score": "0.69362885", "text": "public function cleanup()\n {\n // nothing to do\n }", "title": "" }, { "docid": "1e2a23d54b18e6ad3acabeeddb6df053", "score": "0.6870641", "text": "protected function cleanup()\n\t{\n\t\trecursive_rm($this->get_tmp_dir());\n\t}", "title": "" }, { "docid": "4ab9c4a8a519e6ed6185f5b471d8b85d", "score": "0.6829245", "text": "abstract public function cleanup();", "title": "" }, { "docid": "4b9e9fe16e0f19daa0362c1b5d4e89dc", "score": "0.6785669", "text": "public function cleanup()\n\t{\n\t\t$this->update($this->_clean($this->get()));\n\t}", "title": "" }, { "docid": "5dd86bd1af79801c413d86df71ff9b22", "score": "0.6748111", "text": "protected function cleanup()\n {\n $this->query = [];\n $this->body = '';\n $this->headers = [];\n }", "title": "" }, { "docid": "54ce364e671d590db2515f4505e162f0", "score": "0.67374593", "text": "public function cleanup()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "54ce364e671d590db2515f4505e162f0", "score": "0.67374593", "text": "public function cleanup()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "567adb048bac5884a8268628cee1f591", "score": "0.6652119", "text": "protected function tearDown() {\n //delete temp file\n if (file_exists($this->temp_file)) {\n unlink($this->temp_file);\n }\n\n $this->_cleanUpJobs();\n }", "title": "" }, { "docid": "5db2ee189f2128ecb59455671ffa0228", "score": "0.66390014", "text": "public function clean()\n {\n $this->result = null;\n $this->sourceSize = null;\n }", "title": "" }, { "docid": "99170f7f0e9643305a09bef85081bdee", "score": "0.66335624", "text": "protected function _cleanUp(): void\n {\n imagedestroy($this->_image);\n }", "title": "" }, { "docid": "b49e0b3c8b363e21d6661c3cf6b76abe", "score": "0.6594328", "text": "public function cleanup()\n {\n parent::cleanup();\n // Determine if the completed process is part of a reinstatement cycle\n $this->payingMember->removeReinstateStaged();\n }", "title": "" }, { "docid": "8f123b2a958950f0931dd0fbc366fcae", "score": "0.6583778", "text": "public function __destruct()\n {\n $this->cleanUp();\n }", "title": "" }, { "docid": "f0ea726359a9fd06b5cc337cc1a603f8", "score": "0.65834534", "text": "public function __destruct()\n {\n unset($this->MysqlPool);\n unset($this->builder);\n unset($this->options);\n }", "title": "" }, { "docid": "6319117b5ff9aaec47f9caadcd8f46b3", "score": "0.65708405", "text": "public static function cleanUp(): void\n {\n self::deleteAllMessages();\n }", "title": "" }, { "docid": "449402ac7aa8555f37338e7321042919", "score": "0.6559307", "text": "function cleanup()\r\n\t{\r\n\t}", "title": "" }, { "docid": "de23987ae9a957900a5eb5ab915a7eb9", "score": "0.65528274", "text": "public function __destruct() {\n\t unset($this->guzzleClient);\n if($this->tempSubDir !== null) {\n rmdir($this->tempSubDir);\n }\n }", "title": "" }, { "docid": "7a29566a31ae2d698635fb693596d83d", "score": "0.653795", "text": "public function __destruct()\n {\n $this->cleanup();\n }", "title": "" }, { "docid": "acd2d282c6f44c7354ab521dbcd5c2ab", "score": "0.653729", "text": "function destroy()\n {\n $this->clean();\n }", "title": "" }, { "docid": "24384eb3e949b522c0952eae8f8a2bb4", "score": "0.6490315", "text": "public function __destruct()\n {\n $this->clean();\n }", "title": "" }, { "docid": "89b8f7e69a4aa2a275bc644316d8e782", "score": "0.6478811", "text": "public function cleanUp()\n {\n foreach ($this->files as $file) {\n unlink($file);\n }\n\n $this->files = array();\n }", "title": "" }, { "docid": "66d09e0d4d4cf1ee450da413aa235804", "score": "0.645975", "text": "protected function clean()\n\t{\n\t\t$tries = 0;\n\n\t\twhile ( $tries++ < 5 && count($this->_pids))\n\t\t{\n\t\t\t$this->kill_all();\n\t\t\tsleep(1);\n\t\t}\n\n\t\tif ( count($this->_pids))\n\t\t{\n\t\t\tKohana::$log->add(Kohana::ERROR, 'Queue. Could not kill all children');\n\t\t}\n\n\t\t// Remove PID file\n\t\tunlink($this->_config['pid_path']);\n\n\t\techo 'MangoQueue exited' . PHP_EOL;\n\t}", "title": "" }, { "docid": "a69e2487f287bf7f0e530d2a9e5709e1", "score": "0.6449011", "text": "function cleanup() {\n\t\t$this->_get_admin()->cleanup();\n\t}", "title": "" }, { "docid": "9b0f46e702659f99d333c44fea0e5e18", "score": "0.6444501", "text": "protected function clean()\n\t{\n\t\t$tries = 0;\n\n\t\twhile ( $tries++ < 5 && count($this->_pids))\n\t\t{\n\t\t\t$this->kill_all();\n\t\t\tsleep(1);\n\t\t}\n\n\t\tif ( count($this->_pids))\n\t\t{\n\t\t\tKohana::$log->add($this->_config['log']['error'],'Queue. Could not kill all children');\n\t\t}\n\n\t\t// Remove PID file\n\t\t$this->unlink_pid();\n\n\t\techo 'MangoQueue exited' . PHP_EOL;\n\t}", "title": "" }, { "docid": "e6114d4aa574fdd421a1cdb43d6e4365", "score": "0.64353347", "text": "function __destruct()\n {\n $this->clearPending();\n }", "title": "" }, { "docid": "3798ff87834fd76d1e4ae99ce3e72022", "score": "0.6399986", "text": "function cleanup() {\n\t\t\n\t}", "title": "" }, { "docid": "22a97a2131e9102d08d37d9e875a721a", "score": "0.6376465", "text": "public function cleanAll()\n {\n $this->_process();\n }", "title": "" }, { "docid": "938e85f9e98cd551a0d245c6276f4148", "score": "0.6370474", "text": "public function __destruct() {\n\t\t$this->removeTmpFiles();\n\t}", "title": "" }, { "docid": "41d863c48f6bb42bf13d13d0379133f1", "score": "0.6368606", "text": "public function cleanUp()\n {\n\n $this->log(\"Cleaning up the Sparql loader, checking for remaining triples in the buffer.\");\n\n try {\n\n // If the buffer isn't empty, load triples into the triple store\n while (!empty($this->buffer)) {\n\n $count = count($this->buffer) <= $this->loader->buffer_size ? count($this->buffer) : $this->loader->buffer_size;\n\n $this->log(\"Found $count remaining triples in the buffer, preparing them to load into the store.\");\n\n $triples_to_send = array_slice($this->buffer, 0, $count);\n $this->addTriples($triples_to_send);\n\n $this->buffer = array_slice($this->buffer, $count);\n\n $count = count($this->buffer);\n $this->log(\"After the buffer was sliced, $count triples remained in the buffer.\");\n }\n } catch (Exception $e) {\n $this->log(\"An error occured during the load of the triples. The message was: $e->getMessage().\");\n }\n\n // Delete the older version(s) of this graph\n $this->deleteOldGraphs();\n\n // Save our new graph\n $this->graph->save();\n }", "title": "" }, { "docid": "c3ac328aa8e88acffc621adb0bf66e89", "score": "0.63566077", "text": "function cleanup ()\n {\n\n }", "title": "" }, { "docid": "7aaf015e65948eb819dec0e2d9bf9d8d", "score": "0.6349317", "text": "public function cleanUp()\n\t{\n\t}", "title": "" }, { "docid": "69526632d6d14bb3e884e248748fd801", "score": "0.63431", "text": "public function __destruct() {\n\t\t$this->clean();\n\t}", "title": "" }, { "docid": "298105728f2bd5cc8180313e399d0116", "score": "0.6332755", "text": "public function __destruct()\n {\n if ($this->project) {\n remove_project_builds($this->project->Id);\n $this->project->Delete();\n }\n }", "title": "" }, { "docid": "298105728f2bd5cc8180313e399d0116", "score": "0.6332755", "text": "public function __destruct()\n {\n if ($this->project) {\n remove_project_builds($this->project->Id);\n $this->project->Delete();\n }\n }", "title": "" }, { "docid": "298105728f2bd5cc8180313e399d0116", "score": "0.6332755", "text": "public function __destruct()\n {\n if ($this->project) {\n remove_project_builds($this->project->Id);\n $this->project->Delete();\n }\n }", "title": "" }, { "docid": "56ed644087c239ebf1f942f2d48bf83a", "score": "0.6318869", "text": "function finish()\n {\n flush();\n $this->_garbage_collection();\n }", "title": "" }, { "docid": "f7bc852675bb47d4268d2e8f76dddd86", "score": "0.63113475", "text": "public function cleanUp()\n {\n }", "title": "" }, { "docid": "f7bc852675bb47d4268d2e8f76dddd86", "score": "0.63113475", "text": "public function cleanUp()\n {\n }", "title": "" }, { "docid": "039f0c7066a347f661b1304b5a74a767", "score": "0.6307501", "text": "public function __destruct()\n {\n foreach ($this->tmpFiles as $file) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "96802fcd616fc120e9626e4c0ccc961b", "score": "0.63047266", "text": "public function cleanup()\n {\n $this->urls = array();\n $this->url_map = array();\n }", "title": "" }, { "docid": "7f3e68ba0098d37e475deeec3f6e5c27", "score": "0.6302409", "text": "public function __destruct()\n {\n $this->clear();\n }", "title": "" }, { "docid": "867e2fa429f761b9a5ddcd413215aa0e", "score": "0.62513196", "text": "function __destruct() {\n\t\tif (file_exists($this->b['_tmpfile'])) {\n\t\t\tunlink($this->b['_tmpfile']);\n\t\t}\n\n\t\t//remove file lock and release file handler\n\t\tif (isset($this->lock) && $this->lock) {\n\t\t\tflock($this->lock, LOCK_UN);\n\t\t\tfclose($this->lock);\n\t\t\tunlink($this->lock_file);\n\t\t}\n\n\t\tif (is_dir($this->b['_tmpdir'])) {\n\t\t\t$cmd = 'rm -rf ' . $this->b['_tmpdir'];\n\t\t\texec($cmd);\n\t\t}\n\n\t\t/*\n\t\t * cleanup stale backup files (older than one day)\n\t\t * these files are those that were downloaded from a remote server\n\t\t * usually, backups will be deleted after a restore\n\t\t * but the user aborted the restore/decided not to go through with it\n\t\t */\n\t\t$files = scandir($this->amp_conf['ASTSPOOLDIR'] . '/tmp/');\n\t\tforeach ($files as $file) {\n\t\t\t$f = explode('-', $file);\n\t\t\tif ($f[0] == 'backuptmp' && $f[2] < strtotime('yesterday')) {\n\t\t\t\tunlink($this->amp_conf['ASTSPOOLDIR'] . '/tmp/' . $file);\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "4b9c74648e9145b5b5495be77e850752", "score": "0.62233114", "text": "public function finalize()\n {\n $this->buffer = null;\n }", "title": "" }, { "docid": "5e602b5923932bb3c472b612b9b700df", "score": "0.62145305", "text": "public function clean() {\n $this -> resetAll();\n }", "title": "" }, { "docid": "aa58e4d8aa305d84462a3a9423f35b2c", "score": "0.6202971", "text": "public function __destruct() {\n\t\tif (0 != $this->iBatchDone)\n\t\t\tforeach ($this->aLog as &$log)\n\t\t\t\tEcl($log);\n\n\t\t$this->LockFileDelete();\n\t}", "title": "" }, { "docid": "dc535f46fe8971cf8caa77f8e8f3c18f", "score": "0.6201264", "text": "function __destruct() {\n\t\t$this->fillIfEmpty();\n\t\t$this->cacheWrite();\n\t\tflock($this->quotefp, LOCK_UN);\n\t\tfclose($this->quotefp);\n\t}", "title": "" }, { "docid": "ad23067ed5d2b13b3c66c254f210d7b7", "score": "0.619907", "text": "public function __destruct()\n {\n if(!empty($this->TempFiles))\n {\n foreach($this->TempFiles as $path)\n {\n unlink($path);\n }\n }\n }", "title": "" }, { "docid": "d5de75c093b71fc462391724372e99fc", "score": "0.61977345", "text": "public function __destruct() {\n\t\tif ($this->deleteFileOnFinish) {\n\t\t\tunlink($this->file);\n\t\t}\n\t}", "title": "" }, { "docid": "9427c7bec01107eefd36723c0c4ee46d", "score": "0.61936027", "text": "public function _cleanup()\n\t{\n\t\t// Xoa IP time out\n\t\t$where = array();\n\t\t$where['last_activity <'] = now() - config('ip_time_out', 'main');\n\t\t$this->del_rule($where);\n\t}", "title": "" }, { "docid": "e3d29d9f56f088dab0964965120dd4dd", "score": "0.6192059", "text": "protected function cleanupOnSuccess()\n\t{\n\t\t$this->fsDriver->rmdir($this->workDir);\n\t}", "title": "" }, { "docid": "05e401c61bfbb5d9ba3582fc6826be77", "score": "0.6157897", "text": "public function destroy(job $job)\n {\n //\n }", "title": "" }, { "docid": "fab205a0afccd6bc8c4e805fe7a04da7", "score": "0.61526835", "text": "protected function cleanup(): void\n {\n unset($this->getContainer()[SelectedFieldsCollectionInstance::class]);\n }", "title": "" }, { "docid": "98eb5433620dc96a68b04bf122bb1ff6", "score": "0.61451083", "text": "public function cleanup() {\n foreach ($this->locks as $id=>$lock) {\n flock($lock, LOCK_UN);\n fclose($lock);\n }\n }", "title": "" }, { "docid": "cebda371e0a8d649ba5df3c3806271a7", "score": "0.6142391", "text": "public function cleanup() {\n//\t\t$this->object->removeLock();\n//\t\t$this->clearCache();\n\t\treturn $this->success('', array('id' => $this->object->get('id')));\n\t}", "title": "" }, { "docid": "9f8d72e0fb54b8a4a226d631054bfb68", "score": "0.6140396", "text": "public function __destruct()\n {\n $documents = array_filter($this->documents);\n if (!empty($documents)) {\n\n /*\n * DBManager relies on $GLOBALS['log'] in certain cases instead of\n * making use of $this->log. Make sure we have it still available\n * in case we need to use DBManager from here.\n */\n if (empty($GLOBALS['log'])) {\n $GLOBALS['log'] = $this->container->logger->getSugarLogger();\n }\n\n $this->finishBatch();\n\n $msg = sprintf(\n \"BulkHandler::__destruct used to flush out %s document(s)\",\n count($documents)\n );\n $this->container->logger->debug($msg);\n }\n }", "title": "" }, { "docid": "6c2612759075d5830b6b538782c26bae", "score": "0.612575", "text": "public function __destruct()\n {\n foreach ($this->files as $f) {\n if (is_file($f['tmp_name'])) {\n unlink($f['tmp_name']);\n }\n }\n }", "title": "" }, { "docid": "d91ed1596fef68ee80e9e4a996323e9c", "score": "0.612512", "text": "public function __destruct() {\n $this->finishAllRequests();\n }", "title": "" }, { "docid": "1ad918c0ae9596b66255cd1b623bfa41", "score": "0.60982376", "text": "function __destruct()\n {\n $preserveRunFolder = $this->preserveRunFolder;\n\n foreach ($this->files as $file) {\n if ($file['preserve']) {\n $preserveRunFolder = true;\n }\n if (file_exists($file['file']) && is_file($file['file']) && !$file['preserve']) {\n unlink($file['file']->getPathname());\n }\n }\n\n if (!$preserveRunFolder && is_dir($this->getTmpPath())) {\n $this->rmDirRecursive($this->getTmpPath());\n }\n }", "title": "" }, { "docid": "aaa53c2aa16a115cd8fd6ff401b21bcb", "score": "0.60940737", "text": "function _cleanup()\n {\n $this->mountOptions = array();\n unset($this->device, $this->uuid, $this->label, $this->mountPoint,\n $this->fsType, $this->dumpFrequency, $this->fsckPassNo);\n }", "title": "" }, { "docid": "58f6215bfa121b85824f98211838a32f", "score": "0.60915494", "text": "protected function teardown() {\n\t\t@unlink($this->file_name);\n\t}", "title": "" }, { "docid": "7c2238777c185b397fd5e4d61ce5f323", "score": "0.60643685", "text": "public static function clean() {\r\n\r\n\t\t}", "title": "" }, { "docid": "785ac029542044ac11416b88427fca46", "score": "0.6059255", "text": "public function __destruct() {\n\t\t\tunset($this->html, $this->user, $this->boards, $this->limit, $this->response);\n\t\t}", "title": "" }, { "docid": "eabaa26ce59c5eeb546d9a4b84856598", "score": "0.6059168", "text": "public function delete()\n {\n parent::delete();\n\n $this->job->delete();\n }", "title": "" }, { "docid": "fd68c25b19bc1214b4a493e8029596b4", "score": "0.6044672", "text": "private function cleanup()\n {\n\n $query = Ticket::find()\n ->where(['backup_lock' => 1])\n ->orWhere(['restore_lock' => 1]);\n\n $tickets = $query->all();\n foreach ($tickets as $ticket) {\n if (($daemon = Daemon::findOne($ticket->running_daemon_id)) !== null) {\n if ($daemon->running != true) {\n $ticket->backup_lock = $ticket->restore_lock = 0;\n $ticket->save(false);\n $daemon->delete();\n }\n }else{\n $ticket->backup_lock = $ticket->restore_lock = 0;\n $ticket->save(false);\n }\n } \n }", "title": "" }, { "docid": "922851de78e07d4671624fc62c86ca8d", "score": "0.60443467", "text": "public function destroy(Job $job)\n {\n //\n }", "title": "" }, { "docid": "922851de78e07d4671624fc62c86ca8d", "score": "0.60443467", "text": "public function destroy(Job $job)\n {\n //\n }", "title": "" }, { "docid": "922851de78e07d4671624fc62c86ca8d", "score": "0.60443467", "text": "public function destroy(Job $job)\n {\n //\n }", "title": "" }, { "docid": "922851de78e07d4671624fc62c86ca8d", "score": "0.60443467", "text": "public function destroy(Job $job)\n {\n //\n }", "title": "" }, { "docid": "459d3a824fefd5d5c46ad2591b5a0cc2", "score": "0.60420704", "text": "function __destruct() {\r\n unset($this->conn);\r\n unset($this->conn1);\r\n unset($this->rs);\r\n unset($this->sql);\r\n unset($this->data);\r\n }", "title": "" }, { "docid": "b9c63c8e78eb1bc017d5c97f156d8b1c", "score": "0.60411125", "text": "public function delete()\n\t{\n\t\t$this->pheanstalk->delete($this->job);\n\t}", "title": "" }, { "docid": "90bce564bac61ef4d569382c4293405a", "score": "0.60321826", "text": "public function cleanup() {\n\t\tstatic $query;\n\t\tDB::prepare_query($query, \"DELETE FROM `judge_daemon` WHERE `ping_time` < ?\");\n\t\t$query->execute(array(time() - DAEMON_GONE_TIMEOUT));\n\t\t$query->closeCursor();\n\t}", "title": "" }, { "docid": "440a2287862e55f0460b5657b1e813cf", "score": "0.60265213", "text": "public function deleteall()\r\n {\r\n $this->crontab->deleteAllJobs();\r\n }", "title": "" }, { "docid": "a924460e2771f701fc8a4a926e788207", "score": "0.6013882", "text": "public function __destruct()\n {\n $this->resetProtocol();\n $this->rmdir($this->path);\n }", "title": "" }, { "docid": "7217c3051c5763184703694fa6dbbffe", "score": "0.60111284", "text": "private function data_cleanup(): void\n {\n $this->objects_data = [];\n }", "title": "" }, { "docid": "92f88a7c46a31b4a01bd5613eae85bff", "score": "0.60084224", "text": "protected function __del__() { }", "title": "" }, { "docid": "8a7433ec46c6df627e2a5f9c9e1f913d", "score": "0.60069", "text": "public function __destruct()\n {\n if ($this->path !== null) {\n try {\n FileUtils::deleteFromFilesystem($this->path);\n } catch (Exception $foo) {\n }\n $this->path = null;\n }\n }", "title": "" }, { "docid": "62535c5444102a205713c8cf74e38ed2", "score": "0.5996625", "text": "public function __destruct()\n {\n foreach (self::$tempFiles as $tempFile) {\n GeneralUtility::unlink_tempfile($tempFile);\n }\n }", "title": "" }, { "docid": "cd7d83d728b0c890144ccfc978de1a8c", "score": "0.5980864", "text": "public function destroy()\n {\n curl_close($this->curl);\n }", "title": "" }, { "docid": "6f62208766ee6743759037c9db8afde4", "score": "0.5975809", "text": "public function run()\n {\n if ($this->jobChecker->hasAlreadyBeenRun('ddg_automation_cleaner')) {\n return;\n }\n\n $tables = $this->getTablesForCleanUp();\n\n foreach ($tables as $key => $table) {\n $this->cleanTable($table);\n }\n\n $archivedFolder = $this->fileHelper->getArchiveFolder();\n $this->fileHelper->deleteDir($archivedFolder);\n }", "title": "" }, { "docid": "bafd73da7258512a50f9e265a5fca51c", "score": "0.59696895", "text": "function cleanUp(){\n\t\tif($this->_FileMoved){ return; } // no file deletion after its moving\n\t\tif($tmp_file = $this->getTmpFileName()){\n\t\t\tFiles::Unlink($tmp_file,$err,$err_str);\n\t\t}\n\t}", "title": "" }, { "docid": "244ab3d55e7cd097260ea2f64501adea", "score": "0.59680057", "text": "public function __destruct() {\r\n\t\t\r\n\t\t\tunset($this->result);\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "1725be6cc4d16d03e0af47ad34409352", "score": "0.59599036", "text": "protected function reset_queue() \n\t{\n\t\tee()->db->truncate('mustash_cloudflare');\n\t}", "title": "" }, { "docid": "8fa6ef320cdc5ae5000a650b40939921", "score": "0.59501654", "text": "public function __destroy()\n\t{\n\t\tcurl_close($this->curl);\n\t}", "title": "" }, { "docid": "8fa6ef320cdc5ae5000a650b40939921", "score": "0.59501654", "text": "public function __destroy()\n\t{\n\t\tcurl_close($this->curl);\n\t}", "title": "" }, { "docid": "f8cdabb2215d11cf961c4dca97bff48c", "score": "0.59443164", "text": "function destroy(){\n\t\t// and all the properties and activities associated with the agent...\n\t\t\n\t\tdatabase_record::destroy();\n\t}", "title": "" }, { "docid": "f5698c3f9b6a57c90785f23ab6816ad0", "score": "0.5944208", "text": "public function __destruct()\n {\n unset($this->slaveConnection);\n unset($this->masterConnection);\n }", "title": "" }, { "docid": "7c849a78d513f81142edbcb991428cc6", "score": "0.5942328", "text": "public function __destruct() {\n\t\t$this->ExecuteHTTPQueue();\n\t}", "title": "" }, { "docid": "8734389e38bb5a40d7494bd7eca55031", "score": "0.59373647", "text": "public function free()\n {\n if ($this->result instanceof \\SQLite3Result) {\n $this->result->finalize();\n $this->result = null;\n }\n }", "title": "" }, { "docid": "a794d88b3159166cee8123d9b342e8de", "score": "0.59364736", "text": "public function __destruct()\n {\n // try to catch exiting\n self::$eventprocessor->process(\n $this->config['event_reporting']['destroy_report_async'] ?? false\n );\n }", "title": "" }, { "docid": "d5a33ac9b87edb1db9d24b089fa08f57", "score": "0.5935431", "text": "private function cleanup()\n {\n if ($this->config->item('deploy:asset_clean')) {\n Asset::clear_cache($this->config->item('deploy:asset_clean_age'));\n $this->log('Asset cache cleaned');\n }\n if ($this->config->item('deploy:session_clean')) {\n $session_table = SITE_REF.'_'.str_replace('default_', '', config_item('sess_table_name'));\n if ($this->db->table_exists($session_table))\n {\n $this->db\n ->where('last_activity <', (strtotime($this->config->item('deploy:session_clean_age'))))\n ->delete($session_table);\n $this->log('Session table cleaned');\n }\n }\n }", "title": "" }, { "docid": "2aca5391e8aaffd835cb9551d09be3b3", "score": "0.59308267", "text": "public function __destruct()\n {\n unset($this->_authors);\n unset($this->_writeboard);\n unset($this->_description);\n }", "title": "" }, { "docid": "28a2da465b6c39567665b330fe9dff82", "score": "0.5923846", "text": "public function __destruct() {\n unset($this->root, $this->target);\n }", "title": "" }, { "docid": "5effb98ac68027256c539320c74328bd", "score": "0.59228", "text": "public function clean(): void;", "title": "" }, { "docid": "22a1f6a9324b004fc8f68b616ec9ce2b", "score": "0.5912304", "text": "public function __destruct()\n {\n exec(\"git checkout $this->branch\");\n if ($this->stashed) {\n exec('git stash pop');\n }\n }", "title": "" }, { "docid": "2fade622ecc3814429779e97fa98f7e3", "score": "0.5905548", "text": "protected function clean() {\n\t\t$this->cachedComponents = array();\n\t}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "521ff41165cf95dbef02d0f46ac0acb1", "score": "0.0", "text": "public function edit(UserApi $userapi)\n {\n return view('Iprofile::admin.userapis.edit', compact('userapi'));\n }", "title": "" } ]
[ { "docid": "f810559c966a6f2c87d7e75698b80a8e", "score": "0.76585895", "text": "public function edit(Resource $resource)\n {\n //\n $this->authorize('update', $resource);\n $pages = Page::all();\n return view('resource.edit', compact('resources','pages'));\n }", "title": "" }, { "docid": "c27b7f061b14b3c5c61c337e63783752", "score": "0.759154", "text": "public function edit(Resource $resource)\n {\n $tags = convert_tags_to_string($resource);\n\n return view('resource.edit', ['resource' => $resource, 'tags' => $tags]);\n }", "title": "" }, { "docid": "ca645ebeda02bf966ffbaad2c71250d4", "score": "0.74312454", "text": "public function edit($id) {\n return view('acl::resource.edit', [\n 'id' => $id,\n 'resource' => Resource::find($id)\n ]\n );\n }", "title": "" }, { "docid": "f8bd9e82b8ee3d8f3f2608a73be27803", "score": "0.7401273", "text": "public function edit($id){\n $resource = Resources::find($id);\n\n return view('members.resources.resourceEdit', compact('resource'));\n }", "title": "" }, { "docid": "bc0bd96680ee02ddbc9334c953e42dda", "score": "0.73810554", "text": "public function page_productEdit($resource)\n {\n\n $this->_pageContent['productInfo'] = $resource;\n\n $this->_myPage = \"page_productForm.tpl\";\n\n // call show page\n $this->htmlStream();\n }", "title": "" }, { "docid": "16f9d8e3ea1972347bf2f38afa73ab77", "score": "0.7339075", "text": "public function edit($id)\n {\n $resource = $this->prepResource('update', $id);\n $this->showBreadcrumb($resource, [$resource->routeExist('show') ? $resource->routeShow($id) : $resource->routeEdit($id) => $resource->getCaption(), null => 'Edit']);\n\n return $this->view(compact('resource'));\n }", "title": "" }, { "docid": "462e1860fc17aa64cba32eedec85d271", "score": "0.7111798", "text": "function edit($resource_id=NULL)\n\t{\n\t\t# Although the Edit item only appears in the menu for contributors and admins, \n\t\t# user could reach it from URL editing\n\t\t// echo $this -> uri -> segment(2);\n\t\tif (! ( ($this->ion_auth->is_admin() || $this->ion_auth->in_group('contributor') ) ) ) \n\t\t{\n \t\t# redirect them to the home page \n\t\t\t# TO DO: redirect to a page with a message saying that they're not a contributor\n\t\t\tredirect('home', 'refresh');\n \t}\n\t\t\n\t\t// define some vars to pass to the nav and page views\n\t\t$data['title'] = \"Global Health: edit resource\";\n\t\t$data['heading'] = \"Edit resource\"; \t\t\n\t\t// for <meta> tags and DC\n\t\t$data['description'] = \"\";\n\t\t$data['keywords'] = \"\";\n\t\t$data['active_topnav'] = \"\"; \n\t\t$data['active_leftnav'] = \"Edit resource\"; // active menu item\n\t\t$data['active_submenu'] = \"Edit\"; \n\t\t$data['message'] = \"\";\n\t\t$data['error'] = \"\";\n\t\t\n\t\t# If a resource has been chosen in the editchooseview view, the ID will\n\t\t# be passed in POST, so get it then re-call this controller, invoking \n\t\t# the resource method with the ID\n\t\tif (isset($_POST['resource_id']))\n\t\t{\n\t\t\t$resource_id = $_POST['resource_id'];\n\t\t\tredirect(\"resource/edit/$resource_id\", 'refresh');\n\t\t}\n\t\t# ...else if there's a resource_id in the URL, display the edit form\n\t\t# for that resource. If the segment doesn't exist FALSE is returned.\n\t\telseif (is_null($resource_id))\n\t\t{\n\t\t\tredirect(\"resource/choose/\", 'refresh');\n\t\t}\n\t\t# If nowt in POST, just display the choose resource to edit view\n\t\telse\n\t\t{\n\n\t\t}\n\t\t\n\t\t# Call model function to get resource record\n\t\t$q = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t$resource_title = $q -> row() -> title;\n\t\t$data['resource__id'] = $resource_id; \n\t\t# Get the user ID to save as record editor\n\t\t$user_id = $this->ion_auth->user()->row()-> id;\t\t\n\t\t# Populate form elements.\n\t\t# Get full resource record first \n\t\t$data['resource_detail_query'] = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t\n\t\t# Populate form elements. \n\t\t# Call function in ResourceDB_model to get subject areas\n\t\t# False param indicates that all subjects should be returned, not just those 'in use'\n\t\t# by existing resources\n\t\t$data['subjects_query'] = $this -> ResourceDB_model -> get_subjects(false);\n\t\t# Get key areas (aka top level categories) and shove into an array\n\t\t# Query returns * in key_areas table (id, title, description)\n\t\t$data['keyarea_query'] = $this -> ResourceDB_model -> get_key_areas();\n\t\t# Get subjects attached to this resource, if any. These will be selected in the view\n\t\t$attached_subjects_query = $this -> ResourceDB_model -> get_resource_subjects($resource_id);\n\t\t$old_subjects_ary = array();\n\t\t# Create 2-D array, subject IDs as keys, subject titles as values\n\t\tforeach ($attached_subjects_query -> result() as $row)\n\t\t{\n\t\t\t$old_subjects_ary[$row -> id] = $row -> title;\n\t\t}\n\t\t# Pass currently attached subjects to the view page\n\t\t$data['attached_subjects_ary'] = $old_subjects_ary;\t\n\t\t# Note parameter in function call - this will return all types, not just those 'in use', \n\t\t# which is important for an insert form.\n\t\t$data['resource_types_query'] = $this -> ResourceDB_model -> get_resource_types(FALSE);\n\t\t\n/* \t\t# -- SUBJECTS ---\n\t\t# Get all subjects in the database, to display in the 'subjects' <div> in the view\n\t\t# False param indicates that all subjects should be returned, not just those 'in use'\n\t\t# by existing resources\n\t\t$data['subjects_query'] = $this -> ResourceDB_model -> get_subjects(false);\n\t\t# Get subjects attached to this resource, if any. These will be selected in the view\n\t\t$attached_subjects_query = $this -> ResourceDB_model -> get_resource_subjects($resource_id);\n\t\t$old_subjects_ary = array();\n\t\t# Create 2-D array, subject IDs as keys, subject titles as values\n\t\tforeach ($attached_subjects_query -> result() as $row)\n\t\t{\n\t\t\t$old_subjects_ary[$row -> id] = $row -> title;\n\t\t}\n\t\t# Pass currently attached subjects to the view page\n\t\t$data['attached_subjects_ary'] = $old_subjects_ary;\t\n\t\t\n*/\n\t\t\n\t\t# -- RESOURCE TYPES ---\n\t\t# False param returns all resource types, not just those 'in use'\n\t\t$data['resource_types_query'] = $this -> ResourceDB_model -> get_resource_types(false);\n\t\t\n\t\t# -- TAGS --\n\t\t# Get all tags attached to this resource, both to use in the view and in this script\n\t\t# Note: only tag names stored as IDs aren't used in this script or the view\n\t\t$tags_query = $this -> ResourceDB_model -> get_resource_tags($resource_id);\n\t\t$old_tags_ary = array();\n\t\tforeach ($tags_query -> result() as $row)\n\t\t{\n\t\t\t$old_tags_ary[] = $row -> name;\t\n\t\t}\n\t\t$data['tags_ary'] = $old_tags_ary; \n\t\t\n\t\t# ==== FORM VALIDATION ======\n\t\t# Note that set_value() to repopulate the form *only* works on elements with \n\t\t# validation rules, hence a rule for all elements below. See CI Forum thread at:\n\t\t# http://codeigniter.com/forums/viewthread/170221/\n\n\t\t# NB: The callback function to check the title has the existing title as a 'parameter' in \n\t\t# sqare brackets, as just checking for the title existing would always \n\t\t# return true - we need to check that the edited title exists or not. \n\t\t$this->form_validation->set_rules('title', 'Title', \"required|trim|xss_clean\");\n\t\t$this->form_validation->set_rules('url', 'URL', 'required|trim|xss_clean|prep_url');\n\t\t$this->form_validation->set_rules('description', 'Description', 'required|xss_clean');\n\t\t$this->form_validation->set_rules('tags', 'Tags', 'trim|xss_clean');\n\t\t$this->form_validation->set_rules('subjects', 'Categories', 'required');\t\t\n\t\t$this->form_validation->set_rules('creator', 'Creator', 'trim|xss_clean');\n\t\t$this->form_validation->set_rules('rights', 'Rights', 'trim|xss_clean');\t\t\n\t\t$this->form_validation->set_rules('notes', 'Notes', 'trim|xss_clean');\t\n\t\t# If the form doesn't validate, or indeed hasn't even been submitted, \n\t\t# (re)populate with user data\n\t\tif ($this->form_validation->run() == FALSE)\n\t\t{\n\t\t\t$data ['error'] = validation_errors();\t\n\t\t\t# Load page data into template - the view will be called at function end\n\t\t\t$template['content'] = $this -> load -> view('resource/edit_view', $data, TRUE);\n\t\t}\t\n\n\t\t# If form validates, update record\n\t\telse\n\t\t{\n\t\t\t# Get form values for fields in gh_resource table\n\t\t\t# What's the current date and time? Use the date helper - \n\t\t\t# now() returns current time as Unix timestamp, unix_to_human\n\t\t\t# converts it to YYYY-MM-DD HH:MM:SS which mySQL needs for the \n\t\t\t# DATETIME data type\n\t\t\t$now = \tunix_to_human(now(), TRUE, 'eu'); // Euro time with seconds\n\n\t\t\t$record_data = array (\n\t\t\t\t\t\t\t'title' => $_POST['title'], \n\t\t\t\t\t\t\t'url' => $_POST['url'], \n\t\t\t\t\t\t\t'description' => $_POST['description'], \n\t\t\t\t\t\t\t'type' => $_POST['type'], \n\t\t\t\t\t\t\t'author' => $_POST['author'], \n\t\t\t\t\t\t\t//'source' => $_POST['source'], \n\t\t\t\t\t\t\t'rights' => $_POST['rights'], \n\t\t\t\t\t\t\t'restricted' => $_POST['restricted'], \n\t\t\t\t\t\t\t'visible' => $_POST['visible'], \n\t\t\t\t\t\t\t'metadata_modified' => $now, \n\t\t\t\t\t\t\t'metadata_author' => $user_id, \n\t\t\t\t\t\t\t'notes' => $_POST['notes']\t\t\t\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t# Run update query in model\n\t\t\t$this -> Edit_model -> update_resource($record_data, $resource_id);\t\n\t\t\t# ======== JUNCTION TABLES ==========\n\t\t\t# Now get form values for fields using junction tables\t\t\t\t\n\n\t\t\t# TAGS\n\t\t\t# First, get tag(s) user's inserted. \n\t\t\tif (!empty($_POST['tags']))\n\t\t\t{\n\t\t\t\t$tags = $this -> input -> post('tags');\n\n\t\t\t\t# ...then split string by the comma delimiter...\n\t\t\t\t$tags_ary = explode(',', $tags);\n\t\t\t\t# ...then remove any duplicate tags...\t\t\t\n\t\t\t\t$tags_ary = array_unique($tags_ary);\n\t\t\t\t# ...then see if the user's removed any existing tags.\n\t\t\t\t$detached_tags_ary = $this -> compare_tags($old_tags_ary, $tags_ary);\n\t\t\t\t# Detach the tags removed from resource \n\t\t\t\t# (deleting rows in the RESOURCE_KEYWORD junction table)\n\t\t\t\tforeach($detached_tags_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t# Get id of tag to detach\n\t\t\t\t\t$q = $this -> ResourceDB_model -> get_tag_id($val);\n\t\t\t\t\t$tag_id = $q -> row() -> id;\n\t\t\t\t\t$this -> Edit_model -> detach_tag($resource_id, $tag_id);\n\t\t\t\t}\n\t\t\t\t# Go through user-entered tags and attach to the resource, \n\t\t\t\t# adding new tags to KEYWORDS if not already exist\n\t\t\t\t$this -> attach_tags($tags_ary, $resource_id);\n\t\t\t}\n\t\t\t\n\t\t\t# SUBJECTS\n\t\t\t# The input form lists subjects as a series of checkboxes with the name\n\t\t\t# subjects[] which generates an array in POST, so go through that array\n\t\t\t# and 'attach' subjects to the resource in RESOURCE_SUBJECT junction table\n\t\t\t# First, check that any subjects are checked at all, and if not just create an \n\t\t\t# empty array so as not to generate a runtime error\n\t\t\tif (isset($_POST['subjects']))\n\t\t\t{ $subjects_id_ary = $_POST['subjects']; }\n\t\t\telse\n\t\t\t{ $subjects_id_ary = array(); }\n\t\t\t# Get an array of the IDs of subjects to detach\n\t\t\t$detached_subjects_id_ary = $this -> compare_subjects($old_subjects_ary, $subjects_id_ary);\n\t\t\tforeach ($detached_subjects_id_ary as $key => $val)\n\t\t\t{\n\t\t\t\t$this -> Edit_model -> detach_subject($resource_id, $val);\t\n\t\t\t}\n\n\t\t\tforeach ($subjects_id_ary as $val)\n\t\t\t{\n\t\t\t\t# The model function checks if subject already attached\n\t\t\t\t$this -> Edit_model -> attach_subject($resource_id, $val);\t\n\t\t\t}\n\n\t\t\t\n\t\t\t# Set messages etc for the result page\n\t\t\t$data['title'] = \"Edit resource: result\";\n\t\t\t$data['heading'] = \"Edit resource: result\";\n\t\t\t$data['resource_title'] = $record_data['title'];\n\t\t\t$data['resource_id'] = $resource_id; \n\t\t\t$data['message'] = 'Record edited ok'; \t\n\t\t\t# Load results page with data array\n\t\t\t$template['content'] = $this->load->view('resource/edit_result_view', $data, TRUE);\t\t\n\t\t} // end if validates\t\n\t\t\n\t\t# Display form or update results\n\t\t$this -> load -> view ('template2_view', $template);\n\t\t# Load TinyMCE editor\n\t\t$this -> load -> view('tinymce_script_view');\t\n\t\t# Load tag plugin script\n\t\t$this -> load -> view('resource/tag_plugin_view');\n\t\t# Load confirmation script for 'are you sure?' dialogue on delete\n\t\t$script_data['text'] = \"\\\"Do you really want to delete this resource record? You cannot undo this action.\\\"\";\n\t\t$this -> load -> view('confirm_script_view', $script_data);\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "00ef184427d07695b1e8fc0c22e82b41", "score": "0.7083047", "text": "public function edit()\n {\n return view('manager::edit');\n }", "title": "" }, { "docid": "a2807549fcbbff87d6c9fa1b28ddac02", "score": "0.70471513", "text": "public function edit()\n {\n return view('hrm::edit');\n }", "title": "" }, { "docid": "436839a6b183921cefd8e08a9530aab9", "score": "0.70336676", "text": "function edit( $resource ){\n\n $customer = get( 'customers', $resource );\n\n return view( '', compact( 'customer' ));\n}", "title": "" }, { "docid": "687719d7fbd10fee5075a252fb8ed0a2", "score": "0.7031539", "text": "public function edit(Resource $resource)\n {\n $icons = Icon::all();\n $logo = Logo::first();\n return view('pages.bo.services.serviceEdit',compact('resource', 'icons', 'logo'));\n }", "title": "" }, { "docid": "c1333e15861ffed0d228237f46dc6774", "score": "0.69906336", "text": "function edit()\n\t{\n\t\t$this->get($this->id(),2);\n\t\t$this->editing(true);\n\t}", "title": "" }, { "docid": "c0d211d253e2cdb5e3aa0b701a09d8fe", "score": "0.6970446", "text": "public function page_userEdit($resource)\n {\n\n $this->_pageContent['userInfo'] = $resource;\n\n $this->_myPage = \"page_userForm.tpl\";\n\n // call show page\n $this->htmlStream();\n }", "title": "" }, { "docid": "7bfd0448802c70ea9c26b14afbc29a51", "score": "0.6967585", "text": "public function edit() {\n\t\t\tif(isset($this->id)) {\n\t\t\t\t$this->returnView($this->model->edit($this->id));\n\t\t\t} \n\t\t\telse {\n\t\t\t\terror404();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "83b72662162c1c99a4a9ec1b7b4e6edc", "score": "0.69612134", "text": "public function show_editform()\n {\n $this->item_form->display();\n }", "title": "" }, { "docid": "541b62a47416bd843be17728e23bc59c", "score": "0.6953202", "text": "public function edit($id)\n\t{\n\t\t$filter = array(\n\t\t\t'name' \t\t\t=> Input::get('name'),\n\t\t\t);\n\n\t\t$resourceById = Resource::find($id);\n\t\t$resources = Resource::where(function($query){\n\t\t\tif(Input::get('name', null))\n\t\t\t\t$query->where('name', 'LIKE', '%' . Input::get('name') . '%');\n\t\t})\n\t\t->orderBy('name', 'asc')\n\t\t->paginate();\n\t\t$index = $resources->getPerPage() * ($resources->getCurrentPage()-1) + 1;\n\t\treturn View::make('resource.edit')\n\t\t\t->with(array(\n\t\t\t\t'resources'=> $resources,\n\t\t\t\t 'resourceById' => $resourceById,\n\t\t\t\t 'index'\t\t=> $index,\n\t\t\t\t 'filter'\t\t=> $filter\n\t\t\t\t ));\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "480e68fe244baf956aaee5a92b28179a", "score": "0.69229615", "text": "public function edit($id)\n {\n /** Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /** Check if logged in user is authorized to make this request */\n $this->authorize('update', [\n $resource\n ]);\n\n /** Set the message headers */\n $message = [\n 'to' => $resource->recipients->pluck('id'),\n 'subject' => $resource->subject,\n 'body' => $resource->body,\n ];\n\n /** Displays the edit resource page */\n return view('admin.' . $this->name . '.edit')\n ->with('resource', $resource)\n ->with('name', $this->name)\n ->with('message', $message);\n }", "title": "" }, { "docid": "18527251f9ef186ce3fe75e5b272924a", "score": "0.69218755", "text": "public function edit()\n {\n return view('rms::edit');\n }", "title": "" }, { "docid": "ae53e150e2ac4fae5c0e64d490dc364b", "score": "0.69077027", "text": "public function edit($id)\n {\n $ModelName = $this->getModelName();\n $entity_name = $this->getEntityName();\n\n $record = $ModelName::findOrFail($id);\n\n return View::make('admin.' . str_plural($entity_name) . '.edit')\n ->with($entity_name, $record)\n ->with($this->getRelationshipFields());\n }", "title": "" }, { "docid": "692e66486df9d8bf243ddc6ad57df6db", "score": "0.6902988", "text": "public function edit($id)\n {\n $this->authorize('update', [$this->entity_repository, $id]);\n $entity = $this->entity_workflow->edit($id);\n return view('entity_edit', compact('entity')); //ayto DEN tha to exw sto restful_crud code generation\n }", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.68976134", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.68976134", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "5c928fff942d0cfe3b2191927392941a", "score": "0.68704987", "text": "public function editForm()\n\t{\n\t\t$layout = $this->input->get('layout', null, 'string');\n\t\t$nameModelForm = (empty($layout)) ? $this->nameKey . 'form' : $layout . 'form';\n\t\t$layout = (empty($layout)) ? 'edit' : 'edit_' . $layout; \n\t\t$view = $this->getView($this->default_view, JFactory::getDocument()->getType(), '', array(\n\t\t\t'layout' => $layout\n\t\t));\n\t\t$view->setModel($this->getModel($this->nameKey));\n\t\t$view->setModel($this->getModel($nameModelForm));\n\t\t$view->editForm();\n\t}", "title": "" }, { "docid": "0203676e2eea2cba44d07a5b31307075", "score": "0.6842875", "text": "public function edit()\n {\n return view('dev::edit');\n }", "title": "" }, { "docid": "a695b4f4340bb78a765476c7a7b02c4c", "score": "0.68351203", "text": "public function edit()\n {\n return view('clientapp::edit');\n }", "title": "" }, { "docid": "5abb2c0d314013941d44e2af19a6e1b2", "score": "0.683265", "text": "public function edit($id) {\n $form = $this->formCRUD->find_form($id);\n $this->load->view('theme/header');\n $this->load->view('formCRUD/edit',array('form'=>$form));\n $this->load->view('theme/footer');\n }", "title": "" }, { "docid": "d99e4eb994fac5d81b537cf4065d860a", "score": "0.6818386", "text": "public function editAction()\n {\n $id = (int) $this->getRequest()->getParam('id');\n Mage::register('current_questions', Mage::getModel('oggetto_faq/questions')->load($id));\n $this->loadLayout()->_setActiveMenu('oggetto_faq');\n $this->_addContent($this->getLayout()->createBlock('oggetto_faq/adminhtml_faq_edit'));\n $this->renderLayout();\n }", "title": "" }, { "docid": "b2548057b424e6a5cacb6db19ee658ae", "score": "0.68022823", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.67960227", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "3dc27b29583d035b599fe54604b6daf2", "score": "0.67940915", "text": "public function edit($id)\n\t{\n\t\t$resourcetype = Resourcetype::find($id);\n\n\t\treturn View::make('resourcetypes.edit', compact('resourcetype'));\n\t}", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "18af0570d7d5565bf33c445b2a110d76", "score": "0.678326", "text": "public function edit($id)\n\t{\n\t\treturn \"Edit a form\";\n\t}", "title": "" }, { "docid": "ec74296c4873a04773215f9df3ec56e8", "score": "0.6763203", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "63cbd5995cf95e846b6f36e8000a815a", "score": "0.6754102", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "112f460c8f2a4cf9f1c4aa73d88299c0", "score": "0.67533964", "text": "public function edit($id)\n {\n $form = Form::findOrFail($id);\n $form = form_accessor($form);\n $data = [\n 'title' => 'Edit',\n 'method' => 'put',\n 'action' => url('account/forms/' . $id),\n 'form' => $form,\n 'component_name_map' => array_merge(Form::$componentNameMap['left'], Form::$componentNameMap['right'])\n ];\n return view('content.account.forms.create-edit', $data);\n }", "title": "" }, { "docid": "d4c5c17930926329b1e22e3611608cee", "score": "0.6750425", "text": "public function edit()\n {\n $volunteerJobId = Helper::getIdFromUrl('volunteerjob');\n $volunteerJob = VolunteerJobModel::load()->get($volunteerJobId);\n\n Helper::checkIdsFromSessionAndUrl($volunteerJob->user_id);\n\n View::render('volunteerjobs/edit.view', [\n 'method' => 'POST',\n 'action' => '/volunteerjob/' . $volunteerJobId . '/update',\n 'volunteerjob' => $volunteerJob\n ]);\n }", "title": "" }, { "docid": "9a10b30017d016b9d98477af86b62da9", "score": "0.6731764", "text": "public function edit(Form $form)\n {\n return view('form.edit', compact('form'));\n }", "title": "" }, { "docid": "444f98d0090cda3d8ec6a32c569483fe", "score": "0.6730375", "text": "public function edit()\n {\n return view('item::edit');\n }", "title": "" }, { "docid": "03ac97aa9bc02aa1c7056da56a66fc93", "score": "0.67284465", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AppBundle:Record')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Record entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AppBundle:Record:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "c392a7017c2b6cc02ed9b4c0630f20ed", "score": "0.6726397", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "26bb68bb8f5ec9cc8e61b7a5e6902d51", "score": "0.672611", "text": "public function editAction()\n {\n return $this->addOrEdit('edit');\n }", "title": "" }, { "docid": "2fa25e04d9730c28170ec243a44454d6", "score": "0.67249113", "text": "public function edit($id)\n {\n $admin = $this->administador;\n $title = 'Editar administrador';\n $form_data = ['route' => ['admin.administrador.update',$this->administador->id],'method' => 'PUT'];\n return view('admin.administrador.form')->with(compact('admin','form_data','title'));\n }", "title": "" }, { "docid": "6029dd897b1c8f37a564dd8d339a6700", "score": "0.67143613", "text": "public function edit($id)\n {\n $subjects = Subject::all();\n $collections = Collection::all();\n $resource = Resource::find($id);\n return view('admin.resources.edit', compact('resource','subjects','collections'));\n }", "title": "" }, { "docid": "e5e830d61bdd5b24a06755b5955b9294", "score": "0.66952914", "text": "public function edit($id)\n {\n $pooja = Poojaas::find($id);\n return view('admin.poojas.editForm',['menu'=>'4','pooja'=>$pooja]);\n }", "title": "" }, { "docid": "664d31fb91ae9ed1c67f8f8130c44637", "score": "0.6693591", "text": "public function edit($id)\n {\n $employee = $this->employeeRepository->findOrFail($id);\n\n return view('panel.employee.form', [\n 'employee' => $employee,\n 'documents' => $this->getDocuments(),\n 'selectedDocuments' => $this->employeeRepository->listIdDocuments($id),\n 'companies' => $this->getCompanies(),\n 'selectedCompanies' => $this->employeeRepository->listIdCompanies($id),\n 'states' => $this->states,\n 'route' => 'employee.update',\n 'method' => 'PUT',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Atualizar')\n ]);\n }", "title": "" }, { "docid": "72520d735eee1df0929570294fe6727a", "score": "0.66925275", "text": "public function edit($id)\n {\n if(Gate::denies($this->resource.'-update'))\n return $this->backOrJson(request(), 'not_authorized', 'crud.not-authorized');\n\n $label = $this->label;\n $title = $this->title;\n $icon = $this->icon;\n $item = $this->model::find($id);\n\n if(!isset($item))\n return $this->backOrJson(request(), 'item_not_found', 'crud.item-not-found');\n \n if($this->onlyMine && Gate::denies('mine', $item))\n return $this->backOrJson(request(), 'not_authorized', 'crud.not-authorized');\n\n $this->addToView($this->options($item));\n \n return request()->wantsJson() \n ? $item\n : view('admin.'.$this->resource.'.form', array_merge($this->variablesToView, compact('item', 'label', 'title', 'icon')));\n }", "title": "" }, { "docid": "f6e0eeed266da7c21e16df553b4abe30", "score": "0.6692456", "text": "public function edit($id){\n $model = new $this->model;\n $model = $model->find($id);\n return View::make('form.edit', compact('model'));\n }", "title": "" }, { "docid": "bf49bc8226e13e2862c2259d16e93588", "score": "0.6680715", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('products.edit_form')->with('product', $product)->with('manufacturers', Manufacturer::all());\n }", "title": "" }, { "docid": "04940e3eb1b0bdb3eba0fb05f8254b27", "score": "0.66792357", "text": "function edit() {\r\n $this -> display();\r\n }", "title": "" }, { "docid": "ff9d0f1f39dddbbfb9b90aaa18217f06", "score": "0.6676591", "text": "public function showEdit()\n {\n $task = new TaskModel();\n $taskId = filter_input(INPUT_POST, 'id');\n $view = new View();\n $view->render('task_edit_view.php', 'default_view.php');\n $task->getTaskById($taskId);\n }", "title": "" }, { "docid": "6a173642cfc904aa993c4c5ec090a9c1", "score": "0.66722536", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FormationFrontBundle:Formation')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Formation entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FormationAdminBundle:Formation:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "e93e5a7b2d3281b57823696586572b44", "score": "0.6663701", "text": "public function edit()\n {\n return view('insurance::edit');\n }", "title": "" }, { "docid": "e12e61afec6117ea96b6103dec4dfafb", "score": "0.66596234", "text": "public function edit($id)\n {\n return view('post::forms');\n }", "title": "" }, { "docid": "3c0a48f35d98dc8d1b03a7edd73c99aa", "score": "0.665629", "text": "public function edit($id)\n {\n return view('softether::edit');\n }", "title": "" }, { "docid": "fb9fada09a2381e81983f10ccc266fe8", "score": "0.6654141", "text": "public function edit($id)\n {\n $items = $this->model->where('id','!=',$id)->get();\n $item = $this->model->find($id);\n return view('admin.' . str_plural($this->essence) . '.form', [\n 'item' => $item,\n 'essence' => $this->essence,\n 'items' => $items\n ]);\n }", "title": "" }, { "docid": "5abc6953fae7162215480b7a9fef57c1", "score": "0.66518015", "text": "public function edit()\n {\n return view('collection::edit');\n }", "title": "" }, { "docid": "5ee97cd51477ad520224ac2a1fab98d9", "score": "0.66515166", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CumtsMainBundle:Show')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Show entity.');\n }\n\n $editForm = $this->createForm(new ShowType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CumtsAdminBundle:Show:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "7696ddc01688530a06b8f6b1b1e2b7cb", "score": "0.6647159", "text": "public function edit($id)\n {\n //\n $id = $this->route->getParameter('id');\n $model = $this->hospitalesRepo->find($id);\n \n return view('hospitales.form',compact('model'));\n }", "title": "" }, { "docid": "503c64be303ecd03ee2b721a741f8efc", "score": "0.66430277", "text": "public function edit()\n\t{\n\t\t$this->auth->restrict('DM_Preparedness.Content.Create');\n\n\t\t$id = $this->uri->segment(5);\n\n\t\tif(empty($id)) {\n\t\t\t// New record\n\t\t\tTemplate::set('formView', $this->showEditor());\n\t\t} else {\n\t\t\t// Existing record\n\t\t\tTemplate::set('formView', $this->showEditor($id));\n\t\t}\n\n\t\tTemplate::set('toolbar_title', lang('dm_preparedness_edit') .' DM Preparedness');\n\t\tTemplate::render();\n\t}", "title": "" }, { "docid": "a35bc99f8c25aa274b588a4b001efbac", "score": "0.6642428", "text": "public function edit($id)\n {\n $fom = Formm::find($id);\n return View::make('form.edit',compact('fom'));\n }", "title": "" }, { "docid": "e8cae06a05d236b8611e5b194566db50", "score": "0.6634301", "text": "public function edit($id)\n {\n //\n\n\n $persons = Person::findOrFail($id);\n\n //highlight sidebar\n $this->setActiveParent();\n\n //null = current request\n $form_fields = DynamicForm::form_fields('edit', $persons, null, Person::form_fields() );\n\n return view('persons.edit', compact('form_fields', 'persons') );\n\n }", "title": "" }, { "docid": "7ebc3ae9eb2995b615edac942a9302ef", "score": "0.66311395", "text": "public function edit($id) {\n $prefectures = Prefecture::pluck('display_name','id');\n $prefectures[''] = '';\n $company = Company::where('id',$id)->first();\n $company->form_action = $this->getRoute() . '.update';\n $company->page_title = 'Company Edit Page';\n $company->prefectures = $prefectures;\n // Add page type here to indicate that the form.blade.php is in 'edit' mode\n $company->page_type = 'edit';\n return view('backend.companies.form', [\n 'company' => $company\n ]);\n }", "title": "" }, { "docid": "a58284e14c88a606668feb06103d3539", "score": "0.6629659", "text": "public function edit($id)\n\t{\n\t\t// get the Administrador\n\t\t$administradores = Administrador::find($id);\n\n\t\t\n\t\t// show the edit form and pass the Administrador\n\t\t$this->layout->content = View::make('Administrador.edit')\n->with('administradores', $administradores);\n\t}", "title": "" }, { "docid": "2fb5c281d7d88e78e7e77d412ec633cc", "score": "0.66276693", "text": "public function edit($id)\n {\n $project = Project::findOrFail($id);\n return view('admin.forms.form_project', [\"project\" => $project]);\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "2f00a5b5f71f61a4c34f37c428ae3061", "score": "0.6626582", "text": "public function edit($id)\n {\n $entity = $this->crud->getRepository()->findOrFail($id);\n\n $form = $this->crud->getEditFormClass();\n\n if ($form) {\n $form = FormBuilder::create($form, [\n 'method' => 'patch',\n 'model' => $entity,\n 'route' => [$this->crud->getRouteByMethod('update'), $id],\n ]);\n }\n\n return view($this->crud->getViewByMethod('edit'))\n ->with('entity', $entity)\n ->with('form', $form)\n ->with('crud', $this->crud);\n }", "title": "" }, { "docid": "7ea6d483a420134aa1b6a3947a002693", "score": "0.66259205", "text": "public function edit($id)\n {\n //\n return \"Se muestra formulario para editar Fabricante con id: $id\";\n }", "title": "" }, { "docid": "7b25948b2cb4ca65ae5501eab2bf6b75", "score": "0.6625509", "text": "public function edit($id)\r\n {\r\n $user = User::find($id); \r\n \r\n // show the edit form and pass the shark\r\n return View('frontend.form_users')\r\n->with('user', $user)\r\n ->with('update',true)\r\n ;\r\n }", "title": "" }, { "docid": "7d175ca825cbe048b738bd7976f8de67", "score": "0.6624655", "text": "public function edit(Form $form)\n {\n return view('admin.form.edit', compact('form'));\n }", "title": "" }, { "docid": "2e857827ad8b86ed049c66e1b290cf8f", "score": "0.6622313", "text": "public function edit($id) {\n\t\t$contact = Contact::find($id);\n\t\t$form_fields = $this->getFormFields('Contact');\n\t\t$this -> layout -> content = View::make('admin.contacts.edit', compact('contact','form_fields'));\n\t}", "title": "" }, { "docid": "2a65944b9a357cefcd45e5edab8ccbd3", "score": "0.66182107", "text": "public function edit($id)\n\t{\n\t\tif ( ! \\Util::getAccess('Objetos')) return $this->accessFail();\n\t\t\n $objeto = $this->objetoRepo->find($id);\n\n $this->notFoundUnless($objeto);\n\t\t\n\t\t$title = $this->title;\t\t\n $form_data = array('route' => array('objetos.update', $objeto->Obj_Id), 'method' => 'PATCH');\n $action = '';\n\t\tif ( \\Util::getAccess('Objetos', 'Update')) $action = 'Actualizar';\t\n\t\tif ( \\Util::getAccess('Objetos', 'Delete')) $action = 'Eliminar';\t\n\t\t$action_label = \\Lang::get('utils.Actualizar');\n\n return View::make('objetos/form', compact('objeto', 'title', 'form_data', 'action', 'action_label'));\n\t}", "title": "" }, { "docid": "76648b4106d5f9fb3fccadf6ba8ad7e1", "score": "0.66175586", "text": "public function edit()\n {\n return view('counterrace::edit');\n }", "title": "" }, { "docid": "5d979456b1516a2847c2d079fb4641a2", "score": "0.66171396", "text": "public function edit($id)\n {\n $company = $this->company_model->findOrFail($id);\n $data = [\n 'title' => \"Company Form\",\n 'company' => $company,\n 'method' => \"PUT\",\n ];\n return view('company.company_form', $data);\n }", "title": "" }, { "docid": "05d425274b6655a0bc8a6a2e30c40a2a", "score": "0.66161895", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->history->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['history' => $this->history, 'history_types' => $this->history_types]);\n\t}", "title": "" }, { "docid": "d82133b3b27967ec923f49fef0687720", "score": "0.6615583", "text": "public function edit($id)\n {\n $product = Product::findOrFail($id);\n return view('manage.update',compact('product'));\n }", "title": "" }, { "docid": "d615d8d8a4d8f4cf935c141dac481476", "score": "0.6613157", "text": "public function edit($id)\n {\n\n $this->init();\n\n $this->pre_edit($id);\n\n $model = \"App\\\\\" . $this->model;\n $data = $model::find($id);\n $action = $this->action;\n $view = $this->model;\n\n\n $form = $model::edit_form($data);\n\n $form['data']['action'] = $action . \"/\" . $id;\n $form['data']['heading'] = \"Edit \" . str_singular($this->model) . \": \" . $id;\n $form['data']['type'] = \"edit\";\n $form['data']['submit'] = \"Update\";\n\n\n return view('tm::forms.add',compact( \"form\", 'action','view'));\n }", "title": "" }, { "docid": "362c7ddf2a5fb0999d07dbd6072a97d0", "score": "0.6612507", "text": "public function edit(int $id)\n {\n if (auth()->user()->user_type_id == 0){\n return redirect('/admin/resources')->with(['error' => 'Unauthorized!']);\n }\n $subjects = $this->Subject->GetAllAndOrder('name', 'asc')->pluck('name', 'id');\n $courses = $this->Course->GetAllAndOrder('name', 'asc')->pluck('name', 'id');\n $model = $this->Resource->GetByID($id);\n if ($model == null) {\n return redirect('/admin/resources')->with(['error' => 'Resources not found!']);\n }\n return view(\"admin.cresources.edit\")->with(['active'=>'resource', 'subactive'=>'resource', 'model'=>$model, 'subjects'=>$subjects, 'courses'=>$courses]);\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.66086483", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "e85fde44c8e1c9ec2d404615e7636756", "score": "0.66006833", "text": "public function editAction()\n {\n $projectCatalog = ProjectCatalog::getInstance();\n $idProject = $this->getRequest()->getParam('idProject');\n $project = $projectCatalog->getById($idProject);\n $post = array(\n 'id_project' => $project->getIdProject(),\n 'type' => $project->getType(),\n 'status' => $project->getStatus(),\n );\n $this->view->post = $post;\n $this->setTitle('Edit Project');\n }", "title": "" }, { "docid": "2b5fb043a3c87778cf2cebbc780df3b7", "score": "0.659838", "text": "public function edit()\n\t{\n\t\tparent::edit();\n\t}", "title": "" }, { "docid": "4447b0652f435f99829824829c7ac505", "score": "0.6596689", "text": "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Theme_Service_Rom::getRom(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t}", "title": "" }, { "docid": "148f2b795f1a0e6fbe96ee1b1579717f", "score": "0.6588934", "text": "public function edit()\n {\n // return view('api::edit');\n }", "title": "" }, { "docid": "5804dcb2b9a17ff737a0b3c87eb000a8", "score": "0.6586884", "text": "public function edit($id)\n {\n if (Auth::user()->role == 'member') {\n dd('Member are not allowed to do this, how did you get here?');\n }\n else {\n $product = Product::find($id);\n return view('products.edit_form')->with('product', $product)->with('manufacturers', Manufacturer::all());\n }\n }", "title": "" }, { "docid": "b223a48c110d536d3f8537b6f881e5fe", "score": "0.6586317", "text": "public function editAction()\n {\n $this->_edit();\n $this->view->form = $this->_getFormUserProfile();\n }", "title": "" }, { "docid": "1cb6fa968962bdd3b01e45725d7d5362", "score": "0.6584201", "text": "public function edit($id)\n {\n $data['title'] = 'Why Epic Update'; \n $data['menu'] = 'why_epic';\n $data['sub_menu'] = 'why_epic_list';\n $data['why_epic'] = WhyEpic::find($id);\n return view('backend.why_epic.why_epic_edit', $data);\n }", "title": "" }, { "docid": "f5e69f73a0fbafc4fb91b2ce43c99bfa", "score": "0.6580334", "text": "public function edit($id){\n $student = Student::find($id);\n return view('admin.student.formEditStudent',compact('student'));\n }", "title": "" }, { "docid": "81d2968d7fc0142efbb22b2c81fc3c03", "score": "0.6576812", "text": "public function edit()\n {\n return view('panel::edit');\n }", "title": "" }, { "docid": "10b974335aefccd5bc654e311f5a26c9", "score": "0.65767276", "text": "public function edit($id) {\n $nerd = Product::find($id);\n\n // show the edit form and pass the nerd\n return View::make('product.edit')\n ->with('product_detail', $nerd);\n }", "title": "" }, { "docid": "9b8d2c73bfa22d48146bec75330e17c2", "score": "0.65694124", "text": "public function showResource($id) {\n $resource = Resource::find($id);\n return view('update_resource', ['resource' => $resource]);\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "e94d3986cbe8d66a1574a1189feed48a", "score": "0.6567517", "text": "public function edit($id)\n\t{\n\t\t//find farm\n\t\t$farm =\t$this->farmRepository->findById($id);\n\t\treturn View::make('farm.edit',compact('farm'));\n\t}", "title": "" }, { "docid": "21d99e41a1e26e985dcc253e30b0cdcd", "score": "0.6563645", "text": "public function actionEdit() { }", "title": "" }, { "docid": "366b0ea03383346dfc3f2d2ae42b6888", "score": "0.6563147", "text": "public function edit($id)\n {\n $company = Companies::find($id);\n\n // show the edit form and pass the shark\n return view('admin.company.edit')\n ->with('company', $company);\n }", "title": "" }, { "docid": "03ca41bdd92d6efaae461cb601c3cb8a", "score": "0.6563086", "text": "public function edit($id)\n {\n $format = Format::findOrFail($id);\n $controls = [\n [\n 'type' => 'text',\n 'name' => 'title',\n 'title' => 'Название',\n 'placeholder' => 'Введите название'\n ],\n ];\n\n return view('control-form.edit', [\n 'title' => 'Редактировать формат',\n 'controls' => $controls,\n 'route_update' => 'format.update',\n 'item' => $format,\n ]);\n }", "title": "" }, { "docid": "a415921fd3d313f235be8f9067dc927c", "score": "0.6560566", "text": "public function edit($id)\n\t{\n\t\t$job = Job::find($id);\n\t \n\t \n\t\treturn view('admin.job.edit', compact('job'));\n\t}", "title": "" }, { "docid": "6142999594166128c9323deb1a39a478", "score": "0.6557391", "text": "public function editAction()\n {\n // action body\n\t\t$contact = $this->createContact(isset($_POST['submit']) ? $_POST : array('id' => $this->_getParam('id')));\n\n\t\t$form = $this->createForm($contact);\n\n\t\t$this->view->form = $form;\n\n\t\tif(isset($_POST['submit']))\n\t\t{\n\t\t\tif($form->isValid($_POST))\n\t\t\t{\n\t\t\t\t$contact = $this->createContact($_POST);\n\n\t\t\t\t$contact->save();\n\t\t\t\t$this->_helper->getHelper('FlashMessenger')->addMessage('Contact Updated.');\n\t\t\t\t$this->_redirect('/contacts');\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "7c50e3dedd440fee2b41e80896671eb9", "score": "0.65533197", "text": "public function edit()\n {\n return view('document::edit');\n }", "title": "" }, { "docid": "4fa0e28ffbd3c3cea5f69cf7391f91f7", "score": "0.6552931", "text": "public function edit($id)\n\t{\n\t\t$employee = Employee::find($id);\n\t\treturn view('employees.edit', compact('employee'));\n\t}", "title": "" } ]
143723ca93d8cf303ffadabf9e49b12a
$db>addOrder('q','boekingen.date asc'); $db>addOrder('q',array('boekingen.date asc','posten.name desc');
[ { "docid": "bf6c3e984ac645877569b08493c06bfd", "score": "0.0", "text": "function addOrder($name, $order) {\n\t\t$this->addBlock('order', $name, $order);\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "61e95b541f7adca16b1f32f48b47cf32", "score": "0.7078169", "text": "public function order();", "title": "" }, { "docid": "d7a1dd579296cced147f680df92d5d38", "score": "0.6976286", "text": "public function order($field, $order = 'desc');", "title": "" }, { "docid": "f692e92162708127545e28292655b852", "score": "0.6813767", "text": "function fPosts($orderCol=\"id\",$orderType=\"DESC\"){\n \n $sql = \"SELECT * FROM post ORDER BY $orderCol $orderType\";\n \n return fetchAll($sql);\n}", "title": "" }, { "docid": "7594eb4ae10dc3c08c7be9988db708a1", "score": "0.6632225", "text": "function foo_modify_query_order( $query ) {\n if ( $query->is_main_query() ) {\n $query->set( 'orderby', 'title' );\n $query->set( 'order', 'ASC' );\n }\n}", "title": "" }, { "docid": "8e91bee43576e57a0d756e1d16e672d5", "score": "0.65299475", "text": "function caldol_reverse_reply_order( $query = array() ) {\n\t$query['order']='DESC';\n\treturn $query;\n}", "title": "" }, { "docid": "7e198041190f14a8aec6e90c68510313", "score": "0.6517382", "text": "function orderByClause( $orderby ) {\n\t global $wpdb;\n\t return \"dm.meta_value+0 {$this->order}, $wpdb->posts.post_title ASC\";\n\t}", "title": "" }, { "docid": "cfd3d2c7a36d153277caed0cf6271649", "score": "0.64934295", "text": "public function &getOrderBy();", "title": "" }, { "docid": "a120151db32df2d7cd03b0df5f134493", "score": "0.64778364", "text": "function ajan_esc_sql_order( $order = '' ) {\n\t$order = strtoupper( trim( $order ) );\n\treturn 'DESC' === $order ? 'DESC' : 'ASC';\n}", "title": "" }, { "docid": "965124862b638f0d734466cac3a827eb", "score": "0.64364713", "text": "function order($s)\n{\n\t$this->tryModify();\n\t$args = func_get_args();\n\tif (is_array($args[0])) $args = $args[0];\n\t\n\t$this->query['order'] = $args;\n\treturn $this;\n}", "title": "" }, { "docid": "abed35fc2cf96aec70f73d005eef576c", "score": "0.6376254", "text": "function getOrderBySQL($orderBys)\n{\n $SQL = '';\n if( count($orderBys) > 0 ){\n $SQL .= ' ORDER BY ';\n $obSQLs = array();\n foreach( $orderBys as $obField => $desc ){\n if( $desc ){\n $obSQLs[] = $obField . ' DESC';\n }else{\n $obSQLs[] = $obField;\n }\n }\n $SQL .= join(',',$obSQLs);\n }\n return $SQL;\n}", "title": "" }, { "docid": "e5d4c4f9db1dbbae2899cb5df5fb445c", "score": "0.6313459", "text": "function order_list($where, $query)\n {\n }", "title": "" }, { "docid": "cb4a77e397630b6a52ebf3c1dea4adb6", "score": "0.6308072", "text": "abstract protected function _buildOrderBy( $order );", "title": "" }, { "docid": "c53c408e5f8a74aa3046e099323eae7d", "score": "0.62702197", "text": "public function addOrder($ord) {\n $this->sql .= \" ORDER BY $ord\";\n }", "title": "" }, { "docid": "b0f0d6d5f5ec0cb90b237f1eedd3d91b", "score": "0.6251858", "text": "function Order($id, $type = 'DESC')\n\t{\n\t\tif(!$this->Ready(true) OR $this->type == 'INSERT')\n\t\t\treturn $this->Error('query.prepare', __FUNCTION__);\n\t\t\n\t\t$query = 'ORDER BY ';\n\t\t\n\t\tif(is_array($id))\n\t\t\t$query .= implode(',', $id);\n\t\telse\n\t\t\t$query .= $id;\n\t\t\n\t\t$query \t\t\t.= \" $type \";\n\t\t$this->query \t.= $query;\n\t}", "title": "" }, { "docid": "30ab4f1f5254fc55a34ac44f7ce4173d", "score": "0.62375957", "text": "function listInOrder()\n {\n global $BD3;\n global $BD1;\n global $ANO_REF;\n $res_sql=\"select $BD3.final.id,\n $BD3.final.matr,\n $BD1.empregados.nome,\n $BD3.final.cargo,\n $BD3.final.agrup\n from $BD3.final,$BD1.empregados\n where $BD1.empregados.matr=$BD3.final.matr\n AND $BD3.final.ano='$ANO_REF'\n order by $BD1.empregados.nome;\";\n return sql(\"$BD3\",$res_sql);\n }", "title": "" }, { "docid": "1f5913dcda613232c1dd1b02aafea76a", "score": "0.61861026", "text": "public function orderBy($sql);", "title": "" }, { "docid": "f507ecb175b6a7cd9dd8e9d6ebbbcc46", "score": "0.61746264", "text": "public function orderby(){\n\n $rows = $this\n ->db\n ->order_by(\"title\", \"asc\")\n ->order_by(\"id\", \"random\")\n ->get(\"personel\")\n ->result();\n\n print_r($rows);\n\n }", "title": "" }, { "docid": "049d504dcb741a25e0c6d70f7ab27ee2", "score": "0.61740756", "text": "public function orderBy() {\n $this->_orderBy = \"\";\n foreach ($this->_columns as $tableName => $table) {\n if (array_key_exists('order_bys', $table)) {\n foreach ($table['order_bys'] as $fieldName => $field) {\n $this->_orderBy[] = $field['dbAlias'];\n }\n }\n }\n $this->_orderBy = \"ORDER BY \" . implode(', ', $this->_orderBy) . \" \";\n }", "title": "" }, { "docid": "cce0ca910ca78b7955ff30fddcd63a71", "score": "0.61694884", "text": "public function getQueryOrderby() {\n return '`'.$this->name.'`';\n }", "title": "" }, { "docid": "77690ed92990ea118d763071b934e395", "score": "0.61514866", "text": "private function _order($orderData) \n\t{\n\t\t// if no order is supplied, default to DESC\n\t\tisset ( $orderData ['order'] ) || $orderData ['order'] = 'DESC';\n\t\t\n\t\t$this->_query .= \" ORDER BY \" . implode ( ',', $orderData ['fields'] ) . ' ' . $orderData ['order'];\n\t}", "title": "" }, { "docid": "046b76d4babd662bc408566bf8241180", "score": "0.6141177", "text": "public function orderBy(){\r\n $this->orderBy = \"ORDER BY \";\r\n $args = func_get_args();\r\n foreach($args as $arg){\r\n $this->orderBy.= $this->db->formatTableName($arg);\r\n if(end($args) !== $arg){\r\n $this->orderBy.=\", \";\r\n } \r\n\r\n }\r\n return $this;\r\n }", "title": "" }, { "docid": "5b6f1ed5525e5d015cc42b45a079d85c", "score": "0.6129515", "text": "public function ordered()\n\t{\n\t\t$this->db->order = \"t.date DESC\";\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1b688325d8cb7d742f1e529c1982b61e", "score": "0.6113107", "text": "public function order(string $order, bool $asc);", "title": "" }, { "docid": "26574403eb77b88916a893d18186ff5b", "score": "0.60794556", "text": "public function findAllOrders()\n {\n return $this->createQueryBuilder('o')\n ->orderBy('o.createdDate' , 'DESC');\n }", "title": "" }, { "docid": "c46a9179514e13d4edf192b9ea9f439e", "score": "0.6073829", "text": "function publisher_getOrderBy($sort)\r\n{\r\n if ($sort == \"datesub\") {\r\n return \"DESC\";\r\n } else if ($sort == \"counter\") {\r\n return \"DESC\";\r\n } else if ($sort == \"weight\") {\r\n return \"ASC\";\r\n }\r\n}", "title": "" }, { "docid": "dc034455d68138c966ae01e9518466d0", "score": "0.60730314", "text": "public function orderField(): array\n {\n return ['id' => 'desc'];\n }", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "a666a25306167a66e8f78593389d2b5f", "score": "0.60426927", "text": "public function queryAllOrderBy($orderColumn);", "title": "" }, { "docid": "21e03c4748c280abe3b2e0d0e0cf1891", "score": "0.6010748", "text": "protected function prepareOrderByStatement() {}", "title": "" }, { "docid": "5e366c53f29ca7c5657bd0a1b7a2a879", "score": "0.6000652", "text": "public function getXXXOrdering()\n\t{\n\t\treturn array('title_asc', 'title_desc');\n\t}", "title": "" }, { "docid": "836b868bedf3069a04a199b5526fba41", "score": "0.59939194", "text": "function usort_reorder($a,$b){\r\r\n $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'chat_date'; //If no sort, default to title\r\r\n $order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc'; //If no order, default to asc\r\r\n $result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order\r\r\n return ($order==='asc') ? $result : -$result; //Send final sort direction to usort\r\r\n }", "title": "" }, { "docid": "3ea7362fc86722fd4e426efba66c7338", "score": "0.59825456", "text": "public function default_order_by()\r\n {\r\n $this->db->order_by('partners.id');\r\n }", "title": "" }, { "docid": "27d757e3e70ad7dce6f713fc90f00a40", "score": "0.59549856", "text": "function getOrder();", "title": "" }, { "docid": "7a1ae2aea626d4afc31b940d492cf20f", "score": "0.5954326", "text": "protected function setOrder() {\r\n if( $this->sqlOrderBy ) {\r\n $this->sql .= ' ORDER BY ' . $this->sqlOrderBy;\r\n }\r\n }", "title": "" }, { "docid": "dd605a67e40d9769906df4f08a6bee04", "score": "0.5943289", "text": "public function orderBy($direction = \"ASC\",$column);", "title": "" }, { "docid": "c18cb70f25e593ee8dbc75eef342e2a8", "score": "0.5939742", "text": "public static function build_sql_orderby( $args, $accepted_fields, $default_order = 'ASC' ){\n\t\treturn apply_filters( 'em_bookings_build_sql_orderby', parent::build_sql_orderby($args, $accepted_fields, get_option('dbem_bookings_default_order','booking_date')), $args, $accepted_fields, $default_order );\n\t}", "title": "" }, { "docid": "493043885fc051523ce7f1e04173575b", "score": "0.5929664", "text": "function elm_admin_get_order_by_options() {\n\t$options = array(\n\t\t'asc' => __('ASC', 'elm'),\n\t\t'desc' => __('DESC', 'elm')\n\t);\n\t\n\treturn $options;\n}", "title": "" }, { "docid": "7f56cffb55df8140859699f4936df275", "score": "0.5928437", "text": "function setOrder($order);", "title": "" }, { "docid": "e50a8ff35e0be1bcaffca4d031e1d028", "score": "0.59253746", "text": "public function testOrder()\n {\n $index = new Index();\n $query = new Query($index);\n $this->assertSame($query, $query->order('price'));\n\n $elasticQuery = $query->compileQuery()->toArray();\n $expected = [['price' => ['order' => 'desc']]];\n $this->assertEquals($expected, $elasticQuery['sort']);\n\n $query->order(['created' => 'asc']);\n $elasticQuery = $query->compileQuery()->toArray();\n $expected = [\n ['price' => ['order' => 'desc']],\n ['created' => ['order' => 'asc']],\n ];\n $this->assertEquals($expected, $elasticQuery['sort']);\n\n $query->order(['modified' => 'desc', 'score' => 'asc']);\n $elasticQuery = $query->compileQuery()->toArray();\n $expected = [\n ['price' => ['order' => 'desc']],\n ['created' => ['order' => 'asc']],\n ['modified' => ['order' => 'desc']],\n ['score' => ['order' => 'asc']],\n ];\n $this->assertEquals($expected, $elasticQuery['sort']);\n\n $query->order(['clicks' => ['mode' => 'avg', 'order' => 'asc']]);\n $elasticQuery = $query->compileQuery()->toArray();\n $expected = [\n ['price' => ['order' => 'desc']],\n ['created' => ['order' => 'asc']],\n ['modified' => ['order' => 'desc']],\n ['score' => ['order' => 'asc']],\n ['clicks' => ['mode' => 'avg', 'order' => 'asc']],\n ];\n $this->assertEquals($expected, $elasticQuery['sort']);\n\n $query->order(['created' => 'asc'], true);\n $elasticQuery = $query->compileQuery()->toArray();\n $expected = [\n ['created' => ['order' => 'asc']],\n ];\n $this->assertEquals($expected, $elasticQuery['sort']);\n }", "title": "" }, { "docid": "95bb245c6ecc7213d75b8b75fdeaddb1", "score": "0.5921751", "text": "function getOrderingAndPlaygroundQuery()\n\t{\n\t\treturn 'SELECT ordering AS value,name AS text FROM #__joomleague_playground ORDER BY ordering';\n\t}", "title": "" }, { "docid": "b1e83b3108e50c14b07e9514ee647448", "score": "0.5918122", "text": "function camps_order_post_type($query) {\n if($query->is_admin) {\n\n if ($query->get('post_type') == 'camps')\n {\n $query->set('orderby', 'title');\n $query->set('order', 'ASC');\n }\n }\n return $query;\n}", "title": "" }, { "docid": "28c1f43ed5d6a5b3d2815a5a049ec004", "score": "0.58958673", "text": "public function order() {\r\n\t\t$this->_orders = array();\r\n\t\t$args = func_get_args();\r\n\t\tforeach ($args as $arg) {\r\n\t\t\tif (is_array($arg)) {\r\n\t\t\t\t$this->order($arg);\r\n\t\t\t} else if (!empty($arg)) {\r\n\t\t\t\t$this->_orders[] = $arg;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5229176f3eed1229f1fc6b079fa6b29c", "score": "0.58698225", "text": "function Trigger_SetOrderColumn(&$tNG) {\r\n $orderFieldObj = new tNG_SetOrderField($tNG);\r\n $orderFieldObj->setFieldName(\"sort\");\r\n return $orderFieldObj->Execute();\r\n}", "title": "" }, { "docid": "5229176f3eed1229f1fc6b079fa6b29c", "score": "0.58698225", "text": "function Trigger_SetOrderColumn(&$tNG) {\r\n $orderFieldObj = new tNG_SetOrderField($tNG);\r\n $orderFieldObj->setFieldName(\"sort\");\r\n return $orderFieldObj->Execute();\r\n}", "title": "" }, { "docid": "5229176f3eed1229f1fc6b079fa6b29c", "score": "0.58698225", "text": "function Trigger_SetOrderColumn(&$tNG) {\r\n $orderFieldObj = new tNG_SetOrderField($tNG);\r\n $orderFieldObj->setFieldName(\"sort\");\r\n return $orderFieldObj->Execute();\r\n}", "title": "" }, { "docid": "5e282c8aa3c0a896cecaa34f28a5954e", "score": "0.58588886", "text": "protected function orderBy(array $order){\n $query = \" ORDER BY \";\n foreach ($order as $v){\n $query .= $this->genTableVar($v) . \", \";\n }\n $query = substr($query, 0, -2);\n $this->query .= $query . \" \";\n }", "title": "" }, { "docid": "96366691bac1c1a1bb5192c4d4d4078d", "score": "0.5856971", "text": "public function setOrderBy(array $orderBy);", "title": "" }, { "docid": "c88c362fb39ac2e29c464757df1d838e", "score": "0.5849678", "text": "public function order($name, $order = 'DESC')\t{\n\t\t$this->order = array(\"ORDER BY $name $order\");\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "705402a9990b31e223e9e56d717b1a69", "score": "0.5848866", "text": "public function allUsersOrderedByPseudo()\n {\n // $query = $this->getEntityManager()->createQuery($dql);\n\n // dd($query->getSQL()); \n\n // return $query->execute();\n\n $qb = $this->createQueryBuilder('user');\n $qb->addOrderBy('user.pseudo', 'DESC');\n\n $query = $qb->getQuery(); \n\n \n\n }", "title": "" }, { "docid": "070eae1809421a74dc9f2ee7f3c25aa2", "score": "0.5847776", "text": "public function testBuildOrderByWithTwoArguments()\n {\n $query = $this->getQuery()\n ->orderBy('param1', '+')\n ->orderBy('param2', '-')\n ;\n\n $this->assertSame(\n 'ORDER BY param1 ASC, param2 DESC',\n $query->buildOrderBy()\n );\n }", "title": "" }, { "docid": "4ec5ef0c1cbb7c0aa36772578f29914e", "score": "0.5832277", "text": "function SetOrdering()\n {\n GLOBAL $_REQUEST;\n\n $sfid = 'sf' . $this->GetID();\n $srid = 'sr' . $this->GetID();\n $this->sf = $_REQUEST[$sfid];\n $this->sr = $_REQUEST[$srid];\n\n if ($this->sf != '') {\n $this->selectSQL->orders[] = $this->sf . \" \" . $this->sr;\n\n if ($this->sr == \"desc\") {\n $this->sr = \"asc\";\n $this->az = \"za\";\n } else {\n $this->sr = \"desc\"; //!< this is for the future \n $this->az = \"az\";\n } \n } else {\n $this->az = '';\n $this->sr = '';\n } \n }", "title": "" }, { "docid": "d92084925ed6aae075ecab97e5818111", "score": "0.58301294", "text": "function thememount_custom_post_order($query){\n\t/* \n\tSet post types.\n\t_builtin => true returns WordPress default post types. \n\t_builtin => false returns custom registered post types. \n\t*/\n\t$post_types = get_post_types(array('_builtin' => false), 'names');\n\t\n\t/* The current post type. */\n\t$post_type = $query->get('testimonial');\n\t\n\t/* Check post types. */\n\tif(in_array($post_type, $post_types)){\n\t\t/* Post Column: e.g. title */\n\t\tif($query->get('orderby') == ''){\n\t\t\t$query->set('orderby', 'date');\n\t\t}\n\t\t/* Post Order: ASC / DESC */\n\t\tif($query->get('order') == ''){\n\t\t\t$query->set('order', 'DESC');\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d1ff433486445b78cde0825f59b63d99", "score": "0.5814184", "text": "function all($table, $order='DESC')\n{\n return connect()->query(\"SELECT * FROM $table ORDER By id $order\");\n}", "title": "" }, { "docid": "d29709f511f9b253b66865376756005e", "score": "0.5806904", "text": "public function getSortOrder();", "title": "" }, { "docid": "d29709f511f9b253b66865376756005e", "score": "0.5806904", "text": "public function getSortOrder();", "title": "" }, { "docid": "d29709f511f9b253b66865376756005e", "score": "0.5806904", "text": "public function getSortOrder();", "title": "" }, { "docid": "8c6bd5e4ef22a74c18834a1c7bc209ec", "score": "0.578214", "text": "public function generateOrder();", "title": "" }, { "docid": "c660a75eb641ce0751a10a75cb5bedc8", "score": "0.57723653", "text": "public static function orderAsc($parameter);", "title": "" }, { "docid": "a8b11fe83d838e48a80b0e3fd734659d", "score": "0.57696706", "text": "function click_sort($order) {\n if (isset($this->real_field)) {\n // Since fields should always have themselves already added, just\n // add a sort on the field.\n $params = array('type' => 'numeric');\n $this->query->add_orderby($this->table_alias, $this->real_field, $order, $this->field_alias, $params);\n }\n }", "title": "" }, { "docid": "8a3d2e15f34cde4402671a3febd4690b", "score": "0.57325983", "text": "public function scopeOrder ($query){\n return $query->orderBy('descripcion','like','%$nombre%');\n }", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.5723539", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.5723539", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.5723539", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.5723539", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.5723539", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.5723539", "text": "public function getOrder();", "title": "" }, { "docid": "673710fbbf6cf7c9d265674fd00849f9", "score": "0.5720268", "text": "public function orderBy(array $fields, $order = null);", "title": "" }, { "docid": "b4d757d32021e6eb967cef9424a9c46b", "score": "0.5712313", "text": "function _order_by ($identifier_array, $o = TRUE) {\n\t\t$statement = '';\n\t\tif ( !isset($identifier_array) || !$identifier_array ) {\n\t\t\treturn $statement;\n\t\t}\n\t\t$statement .= $o ? ' ORDER BY ' : ' ';\n\t\t$c = count($identifier_array);\n\t\tfor ($count = 0; $count < $c; $count++) {\n\t\t\t$query_array = $identifier_array[$count]; \n\t\t\t$statement .= '`'. $query_array['column_name'] . '` ';\n\t\t\tif ($count == $c - 1) {\n\t\t\t\t$statement .= $query_array['asc_desc'] . ' ';\n\t\t\t} else {\n\t\t\t\t$statement .= $query_array['asc_desc'] . ', ';\n\t\t\t}\n\t\t}\n\t\treturn $statement;\n\t}", "title": "" }, { "docid": "6a6cf50ee8831271360b2098b6626330", "score": "0.57087094", "text": "public function findAllByOrder()\n {\n return $this->findBy(array(), array('updatedAt'=>'desc', 'createdAt'=>'desc'));\n }", "title": "" }, { "docid": "e5ace43c40ecda966d20a94b85fdc0f8", "score": "0.56990886", "text": "function setOrder($array)\n\t{\n\t\t$this->table->order = $array;\n\t}", "title": "" }, { "docid": "95ff8215427dabafeef39ee6ff70ccbb", "score": "0.56973803", "text": "public function testOrderByMultiple()\n {\n if (DB::get_conn() instanceof MySQLDatabase) {\n $query = new SQLSelect();\n $query->setSelect(['\"Name\"', '\"Meta\"']);\n $query->setFrom('\"SQLSelectTest_DO\"');\n $query->setOrderBy(['MID(\"Name\", 8, 1) DESC', '\"Name\" ASC']);\n\n $records = [];\n foreach ($query->execute() as $record) {\n $records[] = $record;\n }\n\n $this->assertCount(2, $records);\n\n $this->assertEquals('Object 2', $records[0]['Name']);\n $this->assertEquals('2', $records[0]['_SortColumn0']);\n\n $this->assertEquals('Object 1', $records[1]['Name']);\n $this->assertEquals('1', $records[1]['_SortColumn0']);\n }\n }", "title": "" }, { "docid": "ee8f1cacb500d1cb0ba299d2624bbcb4", "score": "0.56904584", "text": "function jpen_custom_post_order_sort( $query ){\n if ( $query->is_main_query() && is_home() ){\n $query->set( 'orderby', 'meta_value' );\n $query->set( 'meta_key', '_custom_post_order' );\n $query->set( 'order' , 'ASC' );\n }\n}", "title": "" }, { "docid": "f2d6d722113cdbb3a38568aa806e9c35", "score": "0.56903493", "text": "function hentAlleAktiviteter()\n{\n return Aktivitet::All()->sortByDesc(\"Dato\");\n}", "title": "" }, { "docid": "4c802f638a606f3936125a6bb5175903", "score": "0.56897056", "text": "function get_ordered_all_data($order)\n {\n $this->db->select('*')->from($this->table)->order_by($order);\n $query = $this->db->get();\n return $query->result();\n\n }", "title": "" }, { "docid": "85cdd2c3d07b0144ea84670debbe1f75", "score": "0.56855446", "text": "public function orderBy($key, $order='asc');", "title": "" }, { "docid": "ee94c065195874d05f3a4e5fa6c751b5", "score": "0.5681774", "text": "function order_by($params, $default_field, $default_order = 'ASC') {\r\n \tif (isset($params['sortby'])) {\r\n \t\t$default_field = $params['sortby'];\r\n \t}\r\n\r\n \tif (isset($params['sortdir'])) {\r\n \t\t$default_order = $params['sortdir'];\r\n \t}\r\n\r\n \treturn \"ORDER BY $default_field $default_order\";\r\n\r\n }", "title": "" }, { "docid": "0e0ad4c78de6fd14ba352095f2629b18", "score": "0.56765586", "text": "public static function setorderby($orderval) {\n\t\tif($orderval==1) {\n\t\t\treturn \"teachers.teachingexp desc\";\n\t\t} else if($orderval==2) {\n\t\t\treturn \"pricelist.maxprice desc\";\n\t\t} else if($orderval==3) {\n\t\t\treturn \"pricelist.minprice asc\";\n\t\t} else if($orderval==4) {\n\t\t\treturn \"teachers.rating desc\";\n\t\t} else {\n\t\t\treturn \"pricelist.maxprice asc\";\n\t\t}\n\n\t}", "title": "" } ]
0cf17f79f353674199dccbc56a0fcda0
Function that handles the saving of the data
[ { "docid": "7e6e582ec368f05395a596da58365242", "score": "0.0", "text": "function kmb_meta_save( $post_id, $post ) {\n\n\tif ( ! isset( $_POST['kmb_nonce'] ) || ! wp_verify_nonce( $_POST['kmb_nonce'], basename( __FILE__ ) ) ) {\n\t\treturn $post_id;\n\t}\n\n\t$post_type = get_post_type_object( $post->post_type );\n\n\tif ( ! current_user_can( $post_type->cap->edit_post, $post_id ) ) {\n\t\treturn $post_id;\n\t}\n\n\t$new_meta_value = ( isset( $_POST['kmb'] ) ? $_POST['kmb'] : '' );\n\n\t$meta_key = 'kmb';\n\n\t$meta_value = get_post_meta( $post_id, $meta_key, true );\n\n\tif ( $new_meta_value && '' == $meta_value ) {\n\t\tadd_post_meta( $post_id, $meta_key, $new_meta_value, true );\n\t} else if ( $new_meta_value && $new_meta_value != $meta_value ) {\n\t\tupdate_post_meta( $post_id, $meta_key, $new_meta_value );\n\t} else if ( '' == $new_meta_value && $meta_value ) {\n\t\tdelete_post_meta( $post_id, $meta_key, $meta_value );\n\t}\n\n}", "title": "" } ]
[ { "docid": "bc2e87251003b75cff209e40edde3ad5", "score": "0.8413502", "text": "abstract protected function saveData();", "title": "" }, { "docid": "b7019141e768c4f796d9a58af2b6faae", "score": "0.83344835", "text": "private function SaveData()\n {\n }", "title": "" }, { "docid": "219df3d0b64e68e971865dea4c2ceb53", "score": "0.77683306", "text": "function save($data){\n \n }", "title": "" }, { "docid": "0af49973779b4c76597021167b24333f", "score": "0.77335703", "text": "function save(){}", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.76874804", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.76874804", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.76874804", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.76874804", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.76874804", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.76874804", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.76874804", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.76874804", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.76874804", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.76874804", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.76874804", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.76874804", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.76874804", "text": "public function save();", "title": "" }, { "docid": "c1a25a263234a960abf587cf88447617", "score": "0.7679478", "text": "protected function saved()\r\n\t{\r\n\t}", "title": "" }, { "docid": "5be4d22dff7f79ff65a82beb314f441b", "score": "0.7666041", "text": "public function save() {\n\t\t$data = self::serialize();\n\t\tif (!file_exists($this->file)) {\n\t\t\t$fp = fopen($this->file,'w+');\n\t\t\tfclose($fp);\n\t\t}\n\t\tfile_put_contents($this->file, $data);\n\t}", "title": "" }, { "docid": "4fcda153500a61afb2205203041bbeb8", "score": "0.7626045", "text": "public function _save();", "title": "" }, { "docid": "6eea75a6b5206901f82e3916d4d3c492", "score": "0.75627625", "text": "public function doSave();", "title": "" }, { "docid": "69815e9790c7a5522b39c804e3fda1e4", "score": "0.7551345", "text": "function save();", "title": "" }, { "docid": "6bb515ec0d463078df5007e1e840e7bf", "score": "0.7535183", "text": "protected function saveData()\n {\n return 0;\n }", "title": "" }, { "docid": "90a89c1c8b3894700a8f9328e0bc7d62", "score": "0.75193375", "text": "public abstract function save();", "title": "" }, { "docid": "90a89c1c8b3894700a8f9328e0bc7d62", "score": "0.75193375", "text": "public abstract function save();", "title": "" }, { "docid": "90a89c1c8b3894700a8f9328e0bc7d62", "score": "0.75193375", "text": "public abstract function save();", "title": "" }, { "docid": "90a89c1c8b3894700a8f9328e0bc7d62", "score": "0.75193375", "text": "public abstract function save();", "title": "" }, { "docid": "6d20aa84661351e4924a89a0b9b71329", "score": "0.75090516", "text": "abstract protected function save();", "title": "" }, { "docid": "8420a0bbabb5808b6c32a6c5f44da651", "score": "0.74756885", "text": "public function save(){}", "title": "" }, { "docid": "3da2db18c71f66b7ebe372e3eda0e554", "score": "0.74672806", "text": "function save()\n\t{}", "title": "" }, { "docid": "bb7d1735251158cd5b690bbbeab8dcbe", "score": "0.741627", "text": "public function save () {\r\n }", "title": "" }, { "docid": "91f3e71f33c2c6b7775d88d9caf4132c", "score": "0.7399016", "text": "public function save ()\r\n\t{\r\n\t\t$this->saveObject();\r\n\t}", "title": "" }, { "docid": "728c60bf3b9ed0d10d53a2ea1a0c088c", "score": "0.73942286", "text": "public function save()\n {\n }", "title": "" }, { "docid": "728c60bf3b9ed0d10d53a2ea1a0c088c", "score": "0.73942286", "text": "public function save()\n {\n }", "title": "" }, { "docid": "728c60bf3b9ed0d10d53a2ea1a0c088c", "score": "0.73942286", "text": "public function save()\n {\n }", "title": "" }, { "docid": "728c60bf3b9ed0d10d53a2ea1a0c088c", "score": "0.73942286", "text": "public function save()\n {\n }", "title": "" }, { "docid": "0a75508b3e4e8138c686d5745314c892", "score": "0.73386776", "text": "public function saving()\n\t\t{\n\t\t\t$this->_saving = TRUE;\n\t\t}", "title": "" }, { "docid": "c45f4254f71e0141c6ef5baf9e0866ee", "score": "0.7325909", "text": "public function save()\n {\n $this->log(\"save start\");\n }", "title": "" }, { "docid": "a19b1df3d92b4dd9671ee35da9bd2590", "score": "0.7306321", "text": "protected function save()\n {\n }", "title": "" }, { "docid": "58a464c57698bbddee4c06dc3725e5d7", "score": "0.7260076", "text": "function save() {\n\n $this->mdl_mcb_data->save('astr_forfait_filter_inventory_type', $this->input->post('astr_forfait_filter_inventory_type'));\n $this->mdl_mcb_data->save('astr_base_hour_inventory', $this->input->post('astr_base_hour_inventory'));\n \n $this->mdl_mcb_data->save('astr_nightly_hours_start', $this->input->post('astr_nightly_hours_start'));\n $this->mdl_mcb_data->save('astr_nightly_hours_end', $this->input->post('astr_nightly_hours_end'));\n\n if ($this->input->post('astr_dashboard_show_astreintes')) {\n $this->mdl_mcb_data->save('astr_dashboard_show_astreintes', \"TRUE\");\n } else {\n $this->mdl_mcb_data->save('astr_dashboard_show_astreintes', \"FALSE\");\n }\n\t}", "title": "" }, { "docid": "1c4c87fac4216f11fbe0d01294f15f51", "score": "0.7250343", "text": "public function save()\n {\n $fh = fopen($this->file, 'w+');\n fwrite($fh, json_encode($this->values));\n fclose($fh);\n }", "title": "" }, { "docid": "4f6cf12a621e9cd0903c08859ad746b4", "score": "0.7244553", "text": "abstract public function saveTo();", "title": "" }, { "docid": "39e5418b76578e0ae4740df5ad2b20b2", "score": "0.722946", "text": "public function save() { }", "title": "" }, { "docid": "39e5418b76578e0ae4740df5ad2b20b2", "score": "0.722946", "text": "public function save() { }", "title": "" }, { "docid": "7cbb4e1024ef4ad4275c768fb4e844f1", "score": "0.72249055", "text": "public function saved()\n\t\t{\n\t\t\t$this->_changed = FALSE;\n\t\t\t$this->_saving = FALSE;\n\t\t}", "title": "" }, { "docid": "f621cf1e79d14f93a942ffb7158e81fd", "score": "0.7207615", "text": "function post_save($data)\n\t{\n\n\t}", "title": "" }, { "docid": "4da84c3e0eb976584c886065cc40b4a8", "score": "0.7193742", "text": "public function save()\n {\n $this->backend->store($this->source);\n }", "title": "" }, { "docid": "998256ef06063ea269d7ed44f921f667", "score": "0.7186305", "text": "private function saveStore(){\r\n }", "title": "" }, { "docid": "56bb52ae86387c04840ecc7729fb1940", "score": "0.71750224", "text": "public function processSave()\n\t{\n\t\t \n\t\treturn parent::processSave();\n\t\t \n\t}", "title": "" }, { "docid": "80ca42a47bdcbdc8302c1d256f6ad68d", "score": "0.71731025", "text": "public function save()\r\n {\r\n $jsonData = json_encode($this->items);\r\n file_put_contents(self::JSON_DATA_PATH, $jsonData);\r\n }", "title": "" }, { "docid": "81c01c2d359c357f35a9e177eb0f6c5a", "score": "0.71639156", "text": "public function Save ();", "title": "" }, { "docid": "917de3549e8fc1bc4e6cdfc58f2883d8", "score": "0.7157286", "text": "public function save(): void\n {\n // Assume a full working implementation\n }", "title": "" }, { "docid": "dcc14dabae93b72402bbb3bf57571735", "score": "0.71439505", "text": "protected function beforesaved()\r\n\t{\r\n\t}", "title": "" }, { "docid": "0bc3d8ca588ba4f614d58340b10bbb67", "score": "0.7141153", "text": "public function save(): void;", "title": "" }, { "docid": "ae567056913981f8bd0f28c6b33032df", "score": "0.71340454", "text": "public function save()\n {\n //iteracja po polach\n foreach (($data = ($this->data instanceof DataObject) ? $this->data->toArray() : []) as $field => $value) {\n //usuwanie pustych pól\n if ($value === null) {\n unset($data[$field]);\n }\n }\n //zapis json'a\n $this->data = '' == $data ? null : json_encode($data);\n return parent::save();\n }", "title": "" }, { "docid": "39ab0f1f7762d62d823b8bdc1483267a", "score": "0.71132845", "text": "public function save()\n {\n $this->insert(array_keys($this->rowData), $this->rowData);\n }", "title": "" }, { "docid": "7e6ba6475bbd6331b616de7d6d952748", "score": "0.70735157", "text": "protected function saved() \n {\n parent::saved();\n }", "title": "" }, { "docid": "6ae6d2052b75641dee06c1679bf15d48", "score": "0.7051531", "text": "public function save()\n {\n if ($this->changed) {\n $json = json_encode($this->information, JSON_HEX_QUOT | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_PRETTY_PRINT);\n $handler = fopen(__DIR__.DS.'table.json', 'w+');\n fwrite($handler, $json);\n fclose($handler);\n $this->changed = false;\n }\n }", "title": "" }, { "docid": "162f067b97e2580f80b31c9a1241db3a", "score": "0.70440197", "text": "public function save()\n {\n }", "title": "" }, { "docid": "162f067b97e2580f80b31c9a1241db3a", "score": "0.70440197", "text": "public function save()\n {\n }", "title": "" }, { "docid": "d1798a8e0998b81de3e709abd7f49afc", "score": "0.70370024", "text": "public function save()\n {\n $this->_record->name = $this->name;\n $this->_record->reg_exp = $this->reg_exp;\n $this->_record->reg_cond = $this->reg_cond;\n $this->_record->type = $this->type;\n $this->_record->save();\n }", "title": "" }, { "docid": "d6763acdbff9a089e07e375344365ce7", "score": "0.7029649", "text": "public function saveData()\n {\n if ($this->data == $this->oldData) {\n return ;\n }\n\n $newData = $updatedData = $deletedKeys = [];\n foreach ($this->data as $name => $value) {\n if (!array_key_exists($name, $this->oldData)) {\n $newData[$name] = [$name, serialize($value)];\n } elseif ($value != $this->oldData[$name]) {\n $updatedData[$name] = [$name, serialize($value)];\n }\n }\n foreach ($this->oldData as $name => $value) {\n if (!array_key_exists($name, $this->data)) {\n $deletedKeys[] = $name;\n }\n }\n\n if ($this->db->driverName === 'mysql') { // user replace into if mysql database\n if (($replaceData = array_merge($updatedData, $newData)) !== []) {\n $sql = $this->db->queryBuilder->batchInsert($this->configTable, ['name', 'value'], $replaceData);\n $sql = 'REPLACE INTO' . substr($sql, 11); // Replace 'INSERT INTO' to 'REPLACE INTO'\n $this->db->createCommand($sql)->execute();\n }\n } else {\n if (!empty($newData)) {\n $this->db->createCommand()\n ->batchInsert($this->configTable, ['name', 'value'], $newData)\n ->execute();\n }\n if (!empty($updatedData)) {\n foreach($updatedData as $name => $value) {\n $this->db->createCommand()\n ->update($this->configTable, ['value' => $value[1]], ['name' => $name])\n ->execute();\n }\n }\n }\n if (!empty($deletedKeys)) { // delete deleted data\n $this->db->createCommand()\n ->delete($this->configTable, ['name' => $deletedKeys])\n ->execute();\n }\n\n $this->oldData = $this->data;\n }", "title": "" }, { "docid": "f2ac03d37ff37a726eac0602d936bc28", "score": "0.7015668", "text": "public function saveState()\n\t{\n\t}", "title": "" }, { "docid": "b118927936be48f5cf40624ee60502d3", "score": "0.70044804", "text": "public function save()\n\t{\n\t\t$filemounts = $this->filemounts;\n\n\t\tif (!empty($this->arrFilemountIds))\n\t\t{\n\t\t\t$this->arrData['filemounts'] = $this->arrFilemountIds;\n\t\t}\n\n\t\tparent::save();\n\t\t$this->filemounts = $filemounts;\n\t}", "title": "" }, { "docid": "c3dda619aba4732b69436808aff61171", "score": "0.6989563", "text": "public function save( array $data = array() );", "title": "" }, { "docid": "07241cb5cded262ee5fd8f7209304bc6", "score": "0.6977864", "text": "public function save()\n {\n return array();\n }", "title": "" }, { "docid": "f59b3db48e59c87497fda70d8401265b", "score": "0.696117", "text": "function Save()\n\t{\n\t}", "title": "" }, { "docid": "ef8e4c82f2ff6f5abaa5cb2ac1bac604", "score": "0.69464904", "text": "abstract public function persistableData();", "title": "" }, { "docid": "26c9129e0654466924f33338dd0664a4", "score": "0.694645", "text": "public function save(array $data);", "title": "" }, { "docid": "26c9129e0654466924f33338dd0664a4", "score": "0.694645", "text": "public function save(array $data);", "title": "" }, { "docid": "c3c4476913809a497661cea66be18b99", "score": "0.69214064", "text": "protected function _afterSave() {}", "title": "" }, { "docid": "f21d93b18931a44732876346c2854e3d", "score": "0.6918663", "text": "abstract public function store_data();", "title": "" }, { "docid": "fec49a0b3bb6268b57c1e43560d1340f", "score": "0.6911596", "text": "public function saveData()\n {\n try {\n $data = $this->getData();\n } catch (\\Exception $e) {\n http_response_code(400);\n return null;\n }\n try {\n $model = new SurveyModel();\n $model->write(json_encode($data));\n } catch (\\Exception $e) {\n http_response_code(500);\n }\n }", "title": "" }, { "docid": "2f3e0c227678d598358d4687d8705ec1", "score": "0.6886005", "text": "function save() {\n\t\t// Grab the get variables\n\t\t$data = $_GET;\n\t\t// Remove the save option\n\t\tunset($data['save']);\n\t\t// JSON encode the data\n\t\t$data = json_encode($data);\n\t\t// Generate a random filename code\n\t\t$file = md5(mt_rand() . time());\n\t\t// Save the data to a file\n\t\tfile_put_contents(\"data/$file\", $data);\n\t\t// Redirect the user\n\t\theader(\"Location: ?load=$file\");\n\t}", "title": "" }, { "docid": "567c0dd2aadc5f990c41d8dd7c6839f4", "score": "0.6880396", "text": "public function save(): array;", "title": "" }, { "docid": "e81f670258fd31abf47c68adb9e44b91", "score": "0.68736094", "text": "public function save()\n {\n $this->io->save($this->getContent());\n }", "title": "" }, { "docid": "cfd8050bc3b24320482b348a4a8343f0", "score": "0.68532866", "text": "public function save()\n {\n $this->saveTo($this->_file);\n }", "title": "" }, { "docid": "72cd3c2905ab713991116cdf66cffa62", "score": "0.6836251", "text": "protected function save() {\r\n\t\tif (!$this->check_key())\r\n\t\t\t$this->send_error(\"\");\r\n\t\t$edit = $this->request->get(\"edit\");\r\n\t\tswitch ($edit) {\r\n\t\t\tcase 'header':\r\n\t\t\t\t$this->save_header();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$this->save_cell();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c4178632835d1dc061d6141d4442e8c5", "score": "0.683602", "text": "public function save(){\n return;\n }", "title": "" }, { "docid": "b3dba384fb7180774cd059640ca54b06", "score": "0.6835393", "text": "public function save()\n {\n if ($this->isChanged() == false) {\n return self::SAVE_NOCHANGES;\n }\n// $dbObj = base_database_connection_Mysql::get();\n// $dbObj->beginTransaction();\n $table = DB::table($this->table);\n\n $this->_setLastEditorAndEditTime();\n if ($this->_newObject) {\n $this->_setFirstEditorData();\n } else {\n $this->_setHistoricData($table, self::HISTORIC);\n }\n $this->_insertNewData($table);\n\n if ($this->useCache) {\n $cache = base_cache_BaseObject::get(get_class($this));\n $cache->setCacheEntry($this);\n }\n\n// $dbObj->endTransaction();\n return self::SAVE_SUCCESS;\n }", "title": "" }, { "docid": "0479d172c02ef0e0b49d14ebeb38759a", "score": "0.6816072", "text": "public function save()\n {\n $aData = array();\n $aData['id_order'] = \\pSQL($this->getOrderId());\n $aData['mandate_identifier'] = \\pSQL($this->getMandateIdent());\n $aData['file_content'] = base64_encode($this->getFileContent());\n $aData['date'] = date('Y-m-d H:i:s');\n return (bool)\\Db::getInstance()->insert(self::getTable(), $aData);\n }", "title": "" }, { "docid": "6002505e98605d7d3e8b52f82920b72d", "score": "0.68134964", "text": "function save()\n\t{\n\t\tglobal $sql;\n\t\t$name = sql::Escape($this->name);\n\t\t$filename = sql::Escape($this->filename);\n\t\t$system = sql::Escape($this->system);\n\t\t$common = sql::Escape($this->common);\n\t\t$sql->Query(\"UPDATE $this->tablename SET\n\t\t\t\t\tname = '$name',\n\t\t\t\t\tfilename = '$filename',\n\t\t\t\t\tsystem = '$system',\n\t\t\t\t\tcommon = '$common'\n\t\t\t\t\tWHERE id='$this->id'\");\n\t}", "title": "" }, { "docid": "64f72f8581c407d0503eb8cfd2391dcd", "score": "0.68127537", "text": "public function save()\n\t{\n\t\tif ($this->loaded === FALSE)\n\t\t{\n\n\t\t}\n\t\treturn parent::save();\n\t}", "title": "" }, { "docid": "f304731ac88e22a3fb6d315e0c1474cc", "score": "0.6807718", "text": "public function save()\n {\n $this->save_meta_value('_sim_employee_name', $this->employee_name);\n $this->save_meta_value('_sim_employee_surname', $this->employee_surname);\n $this->save_meta_value('_sim_employee_email', $this->employee_email);\n $this->save_meta_value('_sim_employee_specialization', $this->employee_specialization);\n $this->save_meta_value('_sim_employee_phone', $this->employee_phone);\n $this->save_meta_value('_sim_employee_region', $this->employee_region);\n $this->save_meta_value('_sim_employee_linkedin', $this->employee_linkedin);\n }", "title": "" }, { "docid": "5eb98ff9c1545d5d3bee546c06bd55be", "score": "0.68000436", "text": "function saveDb()\r\n\t{\r\n\t\tif( \r\n\t\t\t// day + simple day archive, means array empty, do NOT compress\r\n\t\t//\t($this->periodType === DB_ARCHIVES_PERIOD_DAY && !CURRENT_DAY_SIMPLE_ARCHIVE) \r\n\t\t//\t|| \r\n\t\t//\t($this->periodType !== DB_ARCHIVES_PERIOD_DAY && !CURRENT_PERIOD_SIMPLE_ARCHIVE)\r\n\t\t\tCOMPRESS_DB_DATA \r\n\t\t\t&& function_exists('gzcompress'))\r\n\t\t{\r\n\t\t\t$this->toRecord['compressed'] = 1;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->toRecord['compressed'] = 0;\r\n\t\t}\r\n\t\t\r\n\t\tforeach($this->toRecord as $fieldName => $a_value)\r\n\t\t{\r\n\t\t\tif(is_array($a_value))\r\n\t\t\t{\r\n\t\t\t\t$a_value = databaseEscape(compress(serialize($a_value), $this->toRecord['compressed']));\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tupdateLine(\r\n\t\t\t\tT_ARCHIVES, \r\n\t\t\t\tarray( $fieldName => $a_value, 'idarchives' => $this->idArchives), \r\n\t\t\t\t'idarchives');\r\n\t\t}\r\n\t\t\r\n\t\t$this->updateDbState();\r\n\t}", "title": "" }, { "docid": "1077d384841ad4adaabeaa3d2ea0977f", "score": "0.67790776", "text": "public function save(){\n $this->queries = Zend_Json_Decoder::decode(Zend_Json_Encoder::encode($this->queries));\n\t\t\t$_SESSION[DATA_CACHE] = serialize($this);\n\t\t}", "title": "" }, { "docid": "60de8660e74122a4abe60c88a4ef3c5b", "score": "0.67787486", "text": "public function save()\n\t{\n\t\t$this->getMapper()->save($this);\n\t}", "title": "" }, { "docid": "b66fb3026df02b0243f214c1bb6b82d8", "score": "0.67701286", "text": "public function save()\n\t{\n\t\tif ($this->type != 'file') {\n\t\t\treturn;\n\t\t}\t\t\t\n\t\t\n\t\t// Randomly clean the cache out\n\t\tif (rand(0, 99) == 50) {\n\t\t\t$clear_before = time();\n\t\t\t\n\t\t\tforeach ($this->cache as $key => $value) {\n\t\t\t\tif ($value['expire'] && $value['expire'] < $clear_before) {\n\t\t\t\t\tunset($this->cache[$key]);\t\n\t\t\t\t\t$this->state = 'dirty';\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->state == 'clean') { return; }\n\t\t\n\t\tfile_put_contents($this->data_store, serialize($this->cache));\n\t\t$this->state = 'clean';\t\n\t}", "title": "" }, { "docid": "5f901ce87cf65cb947fb04c3bf425fdd", "score": "0.67653453", "text": "public function save() {\n $row = $this->_getRow();\n $row->save();\n //reload from row to get ids\n $this->load( $row );\n }", "title": "" }, { "docid": "ac2af535a283493f4a9f9f50df0d03ec", "score": "0.676006", "text": "public function save() {\n\n if (empty($_POST)) {\n print json_encode('No data!');\n die();\n }\n $post = $_POST;\n if (!(isset($_SESSION[$post['type']]))) {\n $_SESSION[$post['type']] = array();\n }\n\n $_SESSION[$post['type']][$post['key']] = array('value' => $post['data'],\n 'data' => $post['data'],\n 'type' => $post['type'],\n 'key' => $post['key'],\n 'md5' => md5(serialize($post['data'])));\n print json_encode('success');\n die();\n }", "title": "" }, { "docid": "142c30d407cc64d1b2ea86659546bc48", "score": "0.675606", "text": "public function save()\n\t{\n\t\tif($this->storage instanceof FormStorage) {\n\t\t\t$this->storage->field_save($this->name, $this->value);\n\t\t}\n\t\tforeach ( $this->on_save as $save ) {\n\t\t\t$callback = array_shift( $save );\n\t\t\tarray_unshift($save, $this);\n\t\t\tMethod::dispatch_array($callback, $save);\n\t\t}\n\t}", "title": "" }, { "docid": "d3668811e467dfff10df9817b27d45aa", "score": "0.6747472", "text": "protected function onDataPostSave(){\n\t\t// Raised after save\n\t}", "title": "" }, { "docid": "d7a8b056c7f7b8fa392501f52311aa60", "score": "0.6746672", "text": "public function save() {\n\t\t($this->data['id'])? $this->update() : $this->insert();\n\t}", "title": "" }, { "docid": "5239109b184b21839a1becb6758c828a", "score": "0.6745685", "text": "public function save()\n {\n $this->dataProvider->reset();\n $meta = $this->dataProvider->get($this->key);\n\n if (!is_array($meta)) {\n $meta = array();\n }\n $meta[$this->area->id] = $this->settings;\n return $this->dataProvider->update($this->key, $meta);\n }", "title": "" }, { "docid": "823b6e560447355ecfe04a11ef446945", "score": "0.6738766", "text": "function save(){\n\t\treturn true;\n\t}", "title": "" }, { "docid": "239e8897ff4e966406310fc581055e58", "score": "0.67250615", "text": "public function save()\n\t{\n\t\tparent::save();\n\t}", "title": "" }, { "docid": "9ecd2e652043733844b7c28ed12211d4", "score": "0.67239624", "text": "function saveData()\n{\n global $f;\n global $isNew;\n $strmodified_byID = $_SESSION['sessionUserID'];\n $dataHrdCompany = new cHrdCompany();\n /*$data = [\n \"company_code\" => $f->getValue('dataCompanyCode'),\n \"company_name\" => $f->getValue('dataCompanyName'),\n \"attendance_file_path\" => $f->getValue('dataAttendanceFilePath'),\n \"attendance_file_type\" => $f->getValue('dataAttendanceFileType'),\n \"note\" => $f->getValue('dataNote')\n ];*/\n $data = [\n \"company_code\" => $f->getValue('dataCompanyCode'),\n \"company_name\" => $f->getValue('dataCompanyName'),\n \"npwp\" => $f->getValue('npwp'),\n \"siup\" => $f->getValue('siup'),\n \"email\" => $f->getValue('email'),\n \"phone_number\" => $f->getValue('phone_number'),\n \"fax_number\" => $f->getValue('fax_number'),\n \"logo\" => $f->getValue('logo'),\n \"work_days\" => $f->getValue('work_days'),\n \"address\" => $f->getValue('address'),\n \"note\" => $f->getValue('dataNote')\n ];\n // simpan data -----------------------\n $bolSuccess = false;\n if ($isNew) {\n // data baru\n $bolSuccess = ($dataHrdCompany->insert($data));\n } else {\n $bolSuccess = ($dataHrdCompany->update(/*pk*/\n \"id='\" . $f->getValue('dataID') . \"'\", /*data to update*/\n $data\n ));\n }\n if ($bolSuccess) {\n $f->setValue('dataID', $f->getValue('dataID'));\n }\n $f->message = $dataHrdCompany->strMessage;\n}", "title": "" }, { "docid": "1d2ccfff64d41230b818dd1f052e16eb", "score": "0.67171407", "text": "public function save(): void\n {\n }", "title": "" }, { "docid": "abc7e6e9707526144f4c72c8194cc423", "score": "0.6716515", "text": "public function save()\n {\n file_put_contents($this->pathToFile, $this->content);\n }", "title": "" }, { "docid": "04f483078579a6d1a8a80d71102328be", "score": "0.6716083", "text": "function saveDataSalaryBasic()\n{\n}", "title": "" }, { "docid": "3aee10e513994ccf334fbdac8034a15b", "score": "0.6694912", "text": "public function save() {\n $allowed_keys = explode(\",\", $this->allowed_keys);\n foreach ($allowed_keys as $key => $value) {\n //echo \"Saving $value = \".$this->$value;\n $this->updateDb($value,$this->$value);\n }\n }", "title": "" } ]
db2ad3cbfe983c4f2a75df4d5dd3a5fa
Return a 201 response with the given created item.
[ { "docid": "ac7bb2a63c48c7ab39bb31ec24a9ac73", "score": "0.6883769", "text": "public function withCreated($item = null, string $resource = null)\n {\n $this->setStatusCode(JsonResponse::HTTP_CREATED);\n\n if (is_null($item)) {\n return $this->json();\n }\n\n return $this->item($item, $resource);\n }", "title": "" } ]
[ { "docid": "afef4a96abe8871769445d92a2861937", "score": "0.7440476", "text": "public function createItem($item){\n $createItemJson = json_encode(array('items'=>array($item->newItemObject())));;\n //libZoteroDebug( $createItemJson );die;\n $aparams = array('target'=>'items');\n $reqUrl = $this->apiRequestUrl($aparams) . $this->apiQueryString($aparams);\n $response = $this->_request($reqUrl, 'POST', $createItemJson);\n return $response;\n }", "title": "" }, { "docid": "db75a4899ea90f8081593440d1eb4c42", "score": "0.7366013", "text": "public function responseCreatedSuccessfulElement($item, $callback) {\n return $this->setStatusCode(201)->respondWithItem($item, $callback);\n }", "title": "" }, { "docid": "0c9088728beecde4a2c30673c4423953", "score": "0.70500296", "text": "public function createItem();", "title": "" }, { "docid": "d1cb2ff0fcff5c4c954d0ebcf8bf34d5", "score": "0.70302147", "text": "public function store(ItemRequest $request)\n {\n $item = $this->itemRepo->create($request->all());\n\n return $this->successResponse($item, Response::HTTP_CREATED);\n }", "title": "" }, { "docid": "80675a2920bb944f8139f64da262bfb4", "score": "0.6917625", "text": "public function store(CreateItemAPIRequest $request)\n {\n $input = $request->all();\n\n $items = $this->itemRepository->create($input);\n\n return $this->sendResponse($items->toArray(), 'Item saved successfully');\n }", "title": "" }, { "docid": "e747995e3485cdde837d96c56b47b6e6", "score": "0.68087995", "text": "public function create($itemId)\n {\n\n }", "title": "" }, { "docid": "1d54f465b535e2d3b1f76eb9056f5c15", "score": "0.67949456", "text": "public function create(&$item)\n {\n }", "title": "" }, { "docid": "157c2cd225b68aec8449722a713e7791", "score": "0.6762237", "text": "public function createItem()\n {\n // TODO: Implement createItem() method.\n }", "title": "" }, { "docid": "eec151b346758a0339f41a22b8ae2bcc", "score": "0.67203873", "text": "public function create(Request $request, AuthItem $authItem)\n {\n return $authItem->setItem($request->all())\n ? $this->response(true)\n : $this->response(false, [], 'failed to created.');\n }", "title": "" }, { "docid": "5a3c46fa5f4b87e0c80ce8b5731e9c6f", "score": "0.66952467", "text": "public function create_item($request)\n {\n $new_post = [\n 'post_title' => 'API created Podcast-Post',\n 'post_type' => 'podcast',\n 'post_status' => 'draft'\n ];\n $post_id = wp_insert_post($new_post);\n if ($post_id) {\n // create an episode with the created post\n $episode = Episode::find_or_create_by_post_id($post_id);\n $url = sprintf('%s/%s/%d', $this->namespace, $this->rest_base, $episode->id);\n $message = sprintf('Episode successfully created with id %d', $episode->id);\n $data = [\n 'message' => $message,\n 'location' => $url,\n 'id' => $episode->id\n ];\n $headers = [\n 'location' => $url\n ];\n\n return new \\Podlove\\Api\\Response\\CreateResponse($data, $headers);\n }\n\n return new \\WP_REST_Response(null, 500);\n }", "title": "" }, { "docid": "04634f77905e2c6f6f0d7a89e1dde165", "score": "0.66618574", "text": "public function createItem(CreateItem $request) {\n $response = $this->getSOAPClient()->CreateItem($request);\n\n return $response->ResponseMessages->CreateItemResponseMessage;\n }", "title": "" }, { "docid": "8aec92e17d4ffebeefab6cee733407cb", "score": "0.6644522", "text": "public function store()\n\t{\n\t\t$data = Input::get();\n\n\t\t$item = $this->repo->create($data);\n\n\t\t$resource = new Item($item, $this->transformer);\n\n\t\treturn $this->response($resource, 201);\n\t}", "title": "" }, { "docid": "295fb90e3f68967a3f96937f6afe08f0", "score": "0.6535306", "text": "public function store(ItemRequest $request)\n {\n // try to store the item\n try {\n $this->service->create($request->all());\n $success = 1;\n $message = \"Data Item Berhasil Disimpan\";\n } catch (Exception $ex) {\n $success = 0;\n $message = $ex->getMessage();\n }\n\n // make response\n $response = [\n 'success' => $success,\n 'message' => $message\n ];\n\n // return response\n return response()->json($response, 200);\n }", "title": "" }, { "docid": "69cd8064c6307528f83c13ffae219d49", "score": "0.6513182", "text": "public function create(Request $request)\n {\n // Validating request\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required',\n ]);\n\n // Create item in the database\n $item = $request->user()\n ->items()\n ->create($request->all());\n\n return response([\n 'success' => true,\n 'item' => $item,\n ]);\n }", "title": "" }, { "docid": "e67054600614854974b6beea760c65cb", "score": "0.65127325", "text": "function createItem();", "title": "" }, { "docid": "b562f64aa8dc85086b7b21725039ea59", "score": "0.6503155", "text": "public function create()\n {\n \n // Se crea el item\n $item = new Item;\n $item->nombre = 'Sin nombre';\n $item->fecha = \\Carbon\\Carbon::now();\n $item->version = substr(sha1(\\Carbon\\Carbon::now()), 0, 30);\n $item->save();\n\n\n // Modificar\n // $gRequerimiento = new GestionRequerimiento;\n // $gRequerimiento->nombre = $item->nombre;\n // $gRequerimiento->descripcion = 'Creación del Item';\n // $gRequerimiento->version = $item->version;\n // $gRequerimiento->id_desarrollador = Auth::id();\n // $gRequerimiento->fecha = $item->fecha;\n // $gRequerimiento->save();\n\n return redirect(route('sistema.item.edit', $item->id));\n }", "title": "" }, { "docid": "4f879c1cc05b1fab61968f4d9a2856a5", "score": "0.6458291", "text": "public function store(CreateItem $request)\n {\n $obj=$this-> itemRepository->create($request->only( [ \"name\",\"description\",\"clickable_radius\",]));\n \n\n return redirect()->route('admin.item.index')->withFlashSuccess(__('alerts.frontend.item.saved'));\n }", "title": "" }, { "docid": "0857305d281689112d082a35818d4db4", "score": "0.6425071", "text": "public function createItem( $preparedItem ) {\n\t}", "title": "" }, { "docid": "843d6cc658f0ba324573e49417f4c0d8", "score": "0.6411102", "text": "public function action_create()\n\t{\n\t\t$item = RDFORM::factory('item');\n\t\t$item->load_from_array($_POST);\n\t\t$item->save();\n\t\t\n\t\tif ($item->saved)\n\t\t{\n\t\t\t$data['flash'] = Kohana::message('item_created');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['flash'] = Kohana::message('error_creating_item');\n\t\t\t$data['errors'] = $item->validation_errors;\n\t\t}\n\t\t\n\t\t$this->template->data = $data;\n\t}", "title": "" }, { "docid": "f73e9ed8b375d2d929bf18656fff2ce3", "score": "0.63779867", "text": "public function create($itemData = array())\n {\n $transactionId = $itemData['transactionId'];\n $params = $itemData['params'];\n\n $result = $this->_httpClient->request(\n $this->_serviceResource . \"$transactionId\",\n $params,\n Services_Paymill_Apiclient_Interface::HTTP_POST\n );\n return $result['data'];\n }", "title": "" }, { "docid": "976751978e04f14b6f68a4dcacd11832", "score": "0.63393617", "text": "public function create()\n {\n\n $data = $this->request->getJSON();\n\n $data->created_at = $this->datetimeNow->format('Y-m-d H:i:s');\n $data->updated_at = $this->datetimeNow->format('Y-m-d H:i:s');\n\n if ($this->model->insert($data)) {\n $data->id = $this->model->insertID();\n return $this->respondCreated($data, RESOURCE_CREATED);\n } else {\n return $this->fail($this->model->errors());\n }\n }", "title": "" }, { "docid": "ab3607ddfa9786c1f92f410e34399deb", "score": "0.6328382", "text": "public function addNewCreate($item){\n if(isset($item['referralCode']) == false || $item['referralCode'] == ''){\n $item['referralCode'] = self::issueReferralCodeCode();\n }\n return $item;\n }", "title": "" }, { "docid": "4fa17c8bd9a87586617aea5abd4dc98e", "score": "0.63223815", "text": "public function create()\n {\n return $this->out(200, ['method' => 'create']);\n }", "title": "" }, { "docid": "7604d960b80723d25eb1b81662f76d72", "score": "0.63069415", "text": "public function create()\n {\n return response()->json([\n \"data\" => 200\n ]);\n\n }", "title": "" }, { "docid": "a646c235980fb1133db1f5a86672a305", "score": "0.62987214", "text": "public function postAdd() {\n $api = new \\todo\\Api();\n\n // build Item object & save it\n $item = new item;\n $item->user_id = Auth::user()->id;\n $item->title = Input::get('title');\n $item->priority = Input::get('priority', 1);\n $item->due_date = Input::get('date');\n $item->completed = 0;\n\n if (!$this->_prep_item($api, $item)) {\n return $api->getResponse();\n }\n\n if ($item->save()) {\n $api->setStatusMessage('Item \"' . str_limit($item->title, 30, '...') . '\" saved.');\n }\n else {\n $api->setErrorMessage('An error occurred.');\n }\n\n return $api->getResponse();\n }", "title": "" }, { "docid": "cad7016ed76344a573be52fb3ffea0b1", "score": "0.6284442", "text": "public function create()\n {\n $id = Input::get('item_id');\n return response()->view('createBidView', ['item' => Item::find($id)]);\n }", "title": "" }, { "docid": "cef94d75880639673c3c9cbb6d3c2a7b", "score": "0.6265186", "text": "public function store(ItemRequest $request)\n {\n $item = $this->repo->create($request->all());\n\n return Redirect::route('items.show', $item->id);\n }", "title": "" }, { "docid": "b1e563e4723a8f4a7927230e82bcd0a3", "score": "0.6260394", "text": "public function on_store_item_success()\n {\n //echo \"This..............................................\";\n $category = factory(Category::class)->create();\n \n $res = $this->withHeaders($this->getAuthHeader())->json('POST', self::API_PATH, [\n 'name' => 'item1',\n 'price' => 999,\n 'image' => 'item1.png',\n 'category_id' => $category->id\n ]);\n $res->assertStatus(201);\n $res->assertJsonCount(7, 'data');\n $res->assertJsonStructure([\n 'data' => [\n 'id',\n 'category_id',\n 'name',\n 'price',\n 'image',\n 'created_at',\n 'updated_at'\n ]\n ]);\n $json = $res->json();//1 is id\n $this->assertEquals($category->id, $json['data']['category_id']);//2\n $this->assertEquals('item1', $json['data']['name']);//3\n $this->assertEquals(999, $json['data']['price']);//4\n $this->assertEquals('item1.png', $json['data']['image']);//5\n $this->assertLessThan(2, time() - strtotime($json['data']['created_at']));//6\n $this->assertLessThan(2, time() - strtotime($json['data']['updated_at']));//7\n }", "title": "" }, { "docid": "f7c8a4e11e4cd0885bdf2ac6e82d4062", "score": "0.62489516", "text": "protected function created($data)\n {\n return $this->responseModel($data, 201, 'Created successfully');\n }", "title": "" }, { "docid": "eaf9a6d57f9aa6354ebba7cf5c5bd898", "score": "0.6228005", "text": "public function created(Item $item)\n {\n $item->addToIndex();\n }", "title": "" }, { "docid": "02e0a1733df4f39cfdbe31148ec9649d", "score": "0.6187426", "text": "public function create(): Response {\n\t\t//\n\t}", "title": "" }, { "docid": "c0b9a6e7d235b01cc9e42a7c615785f5", "score": "0.61850834", "text": "public function store(TaskItemRequest $request): RedirectResponse\n {\n //create a task item in database\n $task = TaskItem::create($request->all());\n\n //redirect to show page\n return redirect()->back();\n }", "title": "" }, { "docid": "c5b2e5444c4e4b6c9037e6896bd6dddd", "score": "0.6168162", "text": "public function createAction() {\n\t\t$item = Epic_Mongo::newDoc('item');\n\t\t// Get Form for Item\n\t\t$form = $item->getEditForm();\n\t\t$form->setBuildToEquip($this->getRequest()->getParam(\"b\"));\n\t\t$form->setReturnMethod($this->getRequest()->getParam(\"return\"));\n\t\t$form->setSlot($this->getRequest()->getParam(\"slot\"));\n\t\t// $form->itemType->setValue($this->getRequest()->getParam(\"slot\"));\n\t\t$this->view->form = $form;\n\t\tif($this->getRequest()->isPost()) {\n\t\t\t$result = $form->process($this->getRequest()->getParams());\n\t\t\tif($result) {\n\t\t\t\tif(!is_array($result)) {\n\t\t\t\t\tswitch($result) {\n\t\t\t\t\t\tcase \"build\":\n\t\t\t\t\t\t\t$build = $form->getBuild();\n\t\t\t\t\t\t\t$this->_redirect(\"/b/\".$build->id);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"store\":\n\t\t\t\t\t\t\t$item = $form->getItem();\n\t\t\t\t\t\t\t$this->_redirect(\"/user/shop?selectItem=\".$item->id);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$i = Epic_Mongo::db('item')->find($result['upserted']);\n\t\t\t\t\t$this->_redirect(\"/i/\".$i->id);\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "162b4130c9bb31fb50aeff62fc6511cc", "score": "0.6155375", "text": "public function create()\n {\n if ($this->getCurrentAction()->isAffordanceAvailable($this) === false) {\n $this->abort(HttpResponse::HTTP_FORBIDDEN);\n }\n\n $request = $this->getCurrentRequest();\n $input = $this->extractDataFromRequest($request);\n\n // check for a duplicate record\n if ($this->hasDuplicate($request, $input) == true) {\n $this->abort(HttpResponse::HTTP_CONFLICT, ['An item already exists']);\n }\n\n $instance = null;\n\n $closure = function() use ($input, &$instance) {\n $instance = $this->createInstance($input);\n\n if ($instance !== null) {\n $this->onCreated($instance);\n }\n };\n\n if ($this->useTransaction() === true) {\n $this->databaseManager->transaction($closure);\n } else {\n $closure();\n }\n\n $item = $this->exportAll($instance);\n\n return $this->done($item, HttpResponse::HTTP_CREATED);\n }", "title": "" }, { "docid": "184b611494a2beb9167e725dbe1aae6d", "score": "0.6146334", "text": "public function store(CreateCompanyLpoItemRequest $request)\n {\n try {\n $data = $request->all();\n $data['type'] = '1';\n $data['total_price'] = round(($data['unit_price'] * $data['quantity']) - $data['discount']);\n $data['date'] = date('Y-m-d',strtotime($data['date']));\n $companyLpoItem = new CompanyLpoItem($data);\n $companyLpoItem->save();\n activity()->causedBy(Auth::user())->performedOn($companyLpoItem)->withProperties($companyLpoItem)->log('Created Successfully');\n } catch (JWTException $e) {\n throw new HttpException(500);\n }\n return response()->json($companyLpoItem);\n }", "title": "" }, { "docid": "7da2632887e00c12f42e072a0de3a66c", "score": "0.6134932", "text": "public function store(CreateOrderItemRequest $request)\n {\n $input = $request->all();\n\n $orderItem = $this->orderItemRepository->create($input);\n\n Flash::success('Order Item saved successfully.');\n\n return redirect(route('orderItems.index'));\n }", "title": "" }, { "docid": "179f912dcb37adbb685dda6a1871baaf", "score": "0.6131519", "text": "public function create()\n\t{\n\t\t$this->auth->restrict('Items.Resources.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_items())\n\t\t\t{\n\t\t\t\t// Log the activity\n\t\t\t\tlog_activity($this->current_user->id, lang('items_act_create_record') .': '. $insert_id .' : '. $this->input->ip_address(), 'items');\n\n\t\t\t\tTemplate::set_message(lang('items_create_success'), 'success');\n\t\t\t\tredirect(SITE_AREA .'/resources/items');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('items_create_failure') . $this->items_model->error, 'error');\n\t\t\t}\n\t\t}\n\t\tAssets::add_module_js('items', 'items.js');\n\n\t\tTemplate::set('toolbar_title', lang('items_create') . ' Items');\n Template::set_view('resources/edit');\n\t\tTemplate::render();\n\t}", "title": "" }, { "docid": "fe1c889d393a49cc4efb928e3086e2a1", "score": "0.6128105", "text": "public function createSingle()\n {\n $requestBody = $this->request->getParsedBody();\n\n $item = Link::create($requestBody);\n\n $item->items()->attach($requestBody['items']);\n\n return $this->buildResponse($item);\n }", "title": "" }, { "docid": "fe1008c4c1f5f1553b0d49a994810afe", "score": "0.6104656", "text": "public function store(Request $request)\n {\n $this->checkPermission(\"master_management_add\");\n \n $valid = $this->service->validateCreate($request->all());\n\n if ($valid->fails()) {\n return $this->respondWithValidationError($valid);\n }\n\n $data = $valid->validated();\n\n $data['status'] = 1; // By default status is 1.\n $data['created_by'] = Auth::user()->id;\n $data['updated_by'] = Auth::user()->id;\n\n $item = $this->service->createItem($data);\n\n $item = ApiResource::make($item);\n\n return $this->respondWithSuccess($item);\n }", "title": "" }, { "docid": "4e160ed11d1337f7ffffd84d70d145e1", "score": "0.60870653", "text": "public function createItem($item)\n {\n $this->db->insert('items', $item);\n }", "title": "" }, { "docid": "d1dd67209c06137bf9c837b63628f1c4", "score": "0.6075341", "text": "public function create()\n {\n \n \n \n\n return view('backend.items.create' );\n }", "title": "" }, { "docid": "f346f0be1ad44702005a4af670a611b7", "score": "0.60597193", "text": "public function store(Requests\\ItemRequest $request, Item $item)\n {\n $data = $this->handleRequest($request);\n $item->create($data);\n return redirect(route('item.index'))->with('save_msg','New Item added to menu');\n }", "title": "" }, { "docid": "32ba0b2404514ab010a4356e01519f1d", "score": "0.6049074", "text": "public function create()\n {\n return view ('item.create');\n }", "title": "" }, { "docid": "c7b835ee3922b6cc52571f2594856bb3", "score": "0.6048734", "text": "public function actionCreate()\n {\n $model = new Item;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "7b0476b30f8efc23c5487291f2fdda8b", "score": "0.6047649", "text": "public function create(Request $request)\n {\n if(!$request->is_request){\n abort(400);\n }\n $confirmItem = ConfirmItem::find($request->id);\n $item = new Item;\n if ($confirmItem->is_new_kind){\n $new_kind = new Kind;\n $new_kind->name = $confirmItem->new_kind;\n $new_kind->save();\n $item->kind_id = $new_kind->id;\n }\n else{\n $item->kind_id = $confirmItem->kind_id;\n }\n\n $item->user_id = $confirmItem->user_id;\n $item->is_confirmed = true;\n $item->quantity = $confirmItem->quantity;\n $item->price = $confirmItem->price;\n $item->is_on_sale = true;\n $item->save();\n $confirmItem->delete();\n\n return response()->json(\"success\", 200);\n }", "title": "" }, { "docid": "086c7b4526ca4b68e17f924df56ceedc", "score": "0.60409576", "text": "public function actionCreate()\n {\n $model = new Item();\n $model->loadDefaultValues();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "391c3b1ae9b46e181960db1e3f450655", "score": "0.6032523", "text": "public function created (Item $item)\n {\n \n \\Event::fire(new \\App\\Events\\CheckStatus($item->order_id)); \n //check the order's status - now that items have been manipulated\n }", "title": "" }, { "docid": "7e74a403ac8d9366e703738de1ce6c25", "score": "0.6026327", "text": "public function respondCreated($data = [])\n {\n return $this->setStatusCode(201)->response($data);\n }", "title": "" }, { "docid": "726935678417889026d648f4dd00c384", "score": "0.60243446", "text": "public function create()\n {\n //\n return view('item.create');\n }", "title": "" }, { "docid": "329729ad30832503ee59bb682a012286", "score": "0.60069907", "text": "public function store(CreateLearnItemAPIRequest $request)\n {\n $input = $request->all();\n\n $learnItem = $this->learnItemRepository->create($input);\n\n return $this->sendResponse($learnItem->toArray(), 'Learn Item saved successfully');\n }", "title": "" }, { "docid": "a1743ccd0321ba6bf874b8d60885a67d", "score": "0.6002019", "text": "public function createItem($items){\n if(is_array($items)){\n return $this->items->writeItems($items);\n } else {\n return $this->items->writeItems([$item]);\n }\n }", "title": "" }, { "docid": "431e0fec11f68658820e7af2a458f105", "score": "0.59973943", "text": "public function respondCreated($message = 'The resource has been created')\n {\n return $this->setStatusCode(201)->respondWithError($message);\n }", "title": "" }, { "docid": "22245afdafd3c1b325ac38ea484dd2cb", "score": "0.59934586", "text": "public function store(CreateCartItem $request)\n {\n $request->validated();\n\n // check quantity of product\n $product = Product::find($request->product_id);\n $inventoryQuantity = $product->getQuantity($product->id);\n if ($request->quantity > $inventoryQuantity) {\n return response($product->title . '庫存不足', 400);\n }\n\n $cartItem = new CartItem;\n $cartItemRes = $cartItem->addCartItem($request->all());\n return response()->json($cartItemRes);\n }", "title": "" }, { "docid": "b9a22bd1ca837fa1ea0c6f1e7c262142", "score": "0.59911793", "text": "public function create()\n {\n return response()->json([], 200);\n }", "title": "" }, { "docid": "76123541032abde11da9cd98f7ce6b8f", "score": "0.59837925", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|string|min:4|unique:items'\n ]);\n\n if ($validator->fails()) return response()->json(['success' => false, 'message' => $validator->errors()], 422);\n\n try {\n $result = Item::create(['name' => $request->name]);\n $success = true;\n $message = 'Yay! A item has been successfully created.';\n } catch (Exception $e) {\n $result = [];\n $success = false;\n $message = 'Oops! Unable to create a new item.';\n }\n\n return response()->json(['success' => $success, 'data' => $result, 'message' => $message]);\n }", "title": "" }, { "docid": "aee4162a58814d1541341b493567c1ff", "score": "0.59833294", "text": "public function create()\n {\n $this->data['pageDescription'] = 'Create new import from item';\n\n return parent::create();\n }", "title": "" }, { "docid": "afb938348c02c83d610fd4ed9e7c005d", "score": "0.59832567", "text": "public function actionCreate($item)\n {\n $model = new Step();\n $item = $this->findItem($item);\n $model->item_id = $item->id;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['item/view', 'id' => $item->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'item' => $item\n ]);\n }", "title": "" }, { "docid": "9ae8bb76aa6d682e573a000ea4a556f9", "score": "0.5982357", "text": "public function create()\n {\n $model = new Item();\n return view('item.create', compact('model'));\n }", "title": "" }, { "docid": "61b6c95d394fafa9799adbf9c6202cc0", "score": "0.59765446", "text": "public function createNewItem($items)\n {\n if($items){\n return DB::transaction(function () use ($items){\n $item = Item::create([\n 'title' => $items['title'],\n 'description' => $items['description'],\n 'isbn' => $items['isbn'],\n 'authorId' => $items['authorId'],\n 'itemTypeId' => $items['itemTypeId'],\n 'categoryId' => $items['catId'],\n 'numberInStock' => $items[ 'numOfItems'],\n ]);\n \n $itemData = ItemService::generateItemStockData( $items['numOfItems'], $item->id, $items[ 'itemCondition'], $items[ 'itemStateId']);\n ItemStock::insert($itemData);\n return $item->id;\n });\n }\n return false;\n\n }", "title": "" }, { "docid": "b5e67cbe41bf220fa3b474a1cdef94c9", "score": "0.59688234", "text": "public function createNewItem(){\n\t\treturn new Item($this->version);\n\t}", "title": "" }, { "docid": "82234836fd3e6c7a5aa3c077e8978bb1", "score": "0.5947204", "text": "public function testPostCreateItem()\n\t{\n\t\t$faker =Faker::create();\n\t\t \n\t\t $item=[\n 'name' => $faker->name,\n 'slug' => $faker->slug,\n 'description' => $faker->text,\n 'allow_decimal_quantities' => true,\n 'quantity' => $faker->randomDigit,\n 'cost' => $faker->randomNumber(2),\n 'barcodes' =>$faker->ean13,\n 'disable_discount' => true,\n 'disable_inventory' => true,\n 'enable_open_price' => true,\n 'retail_price' =>$faker->randomNumber(2),\n 'tax_exempt' =>true,\n 'category' =>$faker->randomDigit,\n 'thumbnail' =>$faker->imageUrl($width = 140, $height = 140),\n 'tag_list' => str_replace(' ', '_', $faker->text(6)),\n 'status' =>true,\n 'custom_fields' => $faker->text(6),\n 'created_by' =>$faker->randomDigit,\n 'modified_by' =>$faker->randomDigit\n ];\n\n $this->call('POST','api/items',$item);\n\n $this->assertResponseOk();\n\t}", "title": "" }, { "docid": "951ca12e72e2f4cb911aaab37a47319a", "score": "0.5937846", "text": "public function store()\n {\n $item = $this->repository()->store($this->request);\n\n return $this->item($item, 201);\n }", "title": "" }, { "docid": "8ef67592d103c5f658119f90df9fb95b", "score": "0.5927911", "text": "public function respondCreated($data = [])\n {\n return $this->setStatusCode(201)->respond($data);\n }", "title": "" }, { "docid": "7b05bd696c48a625a0aa3c64a2009645", "score": "0.59203285", "text": "public function actionCreate()\n {\n $model = new Item();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "3ee39731038bf63b6010081ffa8420eb", "score": "0.59165967", "text": "public function post_new_item(Request $request) {\n \t$item = new Todo;\n\n \t// assign attribute to the instance\n \t$item->content = $request->get('item');\n \t$item->user_id = Auth::user()->id;\n \t\n \t// save it\n \tif ($item->save()) {\n \t\treturn redirect()->route('get_account')\n \t\t\t\t->with('success', 'New item added into the list');\n \t}\n \t// redirect to acccount page\n\n }", "title": "" }, { "docid": "12ceda4b994b572870b751ec94d215ed", "score": "0.59165514", "text": "public function respondCreated(array $data = []): JsonResponse\n {\n return $this->setStatusCode(201)->response($data);\n }", "title": "" }, { "docid": "d62be8d851015ffe336aed132aeebb7e", "score": "0.5914261", "text": "public function create(Item $item)\n {\n return view('back.item.attribute.create',compact('item'));\n }", "title": "" }, { "docid": "842f99cc6af0709a3c9c84a83b21d694", "score": "0.5913515", "text": "public function postNew()\n {\n $name = request()->json('name');\n\n //first check to make sure this is not a duplicate\n $sites = $this->getCheckDuplicate($name);\n if( count($sites) > 0 )\n {\n $error_message = array('errorMsg' => 'The site name of ' . $name . ' already exists.');\n return response()->json($error_message);\n }\n\n //create new item\n $site_id = $this->saveItem();\n\n return response()->json(['id' => $site_id]);\n }", "title": "" }, { "docid": "626085a65de532fea7a772fd012a2a7f", "score": "0.58957696", "text": "public function create()\n {\n return view('item.create');\n }", "title": "" }, { "docid": "4d926fe420704bdeb802ce9924025915", "score": "0.5892596", "text": "public function created(Document $item)\n\t{\n\t\t$item->update([\n\t\t\t'slug' => $item->id . '-' . $item->slug\n\t\t]);\n\t}", "title": "" }, { "docid": "da9cf34f8447b162f61e034f98ace352", "score": "0.5884752", "text": "public function addItem(): JsonApiObject|JsonApiResponse;", "title": "" }, { "docid": "94109db4c30f5bdbb9f1af7de4ba7751", "score": "0.5877242", "text": "public function createItem($resource)\n\t{\n\t\t$this->ci->load->model($resource['model'], 'model');\n\n\t\t$postData = $this->ci->input->post();\n\n\t\t$this->ci->model->createItem($postData);\n\n\t\treturn 'Resource created successfully';\n\t}", "title": "" }, { "docid": "651ace482ed778132a028baee6e6423b", "score": "0.5872195", "text": "public function create()\n\t{\n\t\treturn view('items.create');\n\t}", "title": "" }, { "docid": "759f7c59f79787edaa05d7489ef65586", "score": "0.58710104", "text": "public function createItem(ServerRequestInterface $request) : ResponseInterface\n {\n $data = json_decode($request->getBody()->getContents());\n $validator = $this->createContactValidator((array)$data);\n $valid = $validator->validate();\n\n if (!$valid) {\n return new JsonResponse([\n 'success' => false,\n 'errors' => $validator->errors()\n ], 400);\n }\n\n $serializer = new ContactSerializer();\n $contact = $serializer->fromArray((array)$data);\n\n $this->em->persist($contact);\n $this->em->flush();\n\n return new JsonResponse([], 201);\n }", "title": "" }, { "docid": "96992e9239b76d50690bc8d2a2d1ec89", "score": "0.586078", "text": "public function store(Request $request)\n {\n $create = Item::create($request->all());\n return response()->json($create);\n }", "title": "" }, { "docid": "4366c0b3381c93e8060f2d80c6c21bdd", "score": "0.5859674", "text": "protected function itemsV1CreatePostRequest()\n {\n\n $resourcePath = '/items/v1/create';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\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 \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\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 }", "title": "" }, { "docid": "bcc0ade1a2b18908abb69ab5fd05befd", "score": "0.58578795", "text": "public function create()\n {\n \t\n \treturn view('items.create');\n\n }", "title": "" }, { "docid": "77d442acbecec92332ecb18e1e78417a", "score": "0.58522964", "text": "public function create()\n\t{\n\t\t$item = new Item;\n\t\treturn View::make('items.create', array('item' => $item));\n\t}", "title": "" }, { "docid": "01ccb20937711854d8ce055b92056581", "score": "0.5851934", "text": "public function postItem(Request $request) {\n\n $validator = Validator::make($request->all(), [\n 'firstName' => 'required',\n 'lastName' => 'required',\n 'email' => 'required',\n 'phone' => 'required',\n 'birthday' => 'required'\n ]);\n\n if ($validator->fails()) {\n return response()->json(['errors' => $validator->errors()]);\n }\n\n // Create item\n $pkg = $request->all();\n $pkg['birthday'] = \\Carbon\\Carbon::parse($request->birthday)->format('Y-m-d');\n\n return response()->json(Model::create($pkg));\n\n }", "title": "" }, { "docid": "429474092f834349c401c1e0c158e6fb", "score": "0.58503234", "text": "public function store(CreateDocumentItemRequest $request)\n {\n $input = $request->all();\n\n $documentItem = $this->documentItemRepository->create($input);\n\n Flash::success(Lang::get('validation.save_success'));\n\n return redirect(route('documentItems.index'));\n }", "title": "" }, { "docid": "7802fb11c1e2bbefcbe6bf35d270d8ee", "score": "0.5846408", "text": "public function create()\n {\n $item = Item::all();\n return view(\"items.create\",[\"items\"=>$items]);\n }", "title": "" }, { "docid": "9c06b6b0c6936439466400dd535190ce", "score": "0.5843547", "text": "function create_post( $req ) {\n\n\t$app_key = $req['APIKey'];\n\t$app_secret = $req['APISecret'];\n\n\t$itemId = $req['payload']['inboundFieldValues']['itemId'];\n\n\n\t$check = check_auth( $app_key, $app_secret );\n\n\tif ( $check ) {\n\n\t\tglobal $monday_query;\n\t\t$monday_item = $monday_query->get_monday_item( $itemId );\n\n\t\t$wp_user_id = get_wp_user_id( $monday_item['creator']['id'] );\n\n\t\tif ( empty( $wp_user_id ) ) {\n\t\t\t$wp_user_id = 1;\n\t\t}\n\n\t\tremove_action( 'save_post_post', 'update_or_create' );\n\t\t$post_id = 0;\n\n\t\tif ( empty( get_check_item_id( $itemId ) ) ) {\n\t\t\t$post_id = wp_insert_post( array( 'post_title' => $monday_item['name'], 'post_author' => $wp_user_id ) );\n\t\t\tcreate_monday_post( '', $itemId, $post_id, $monday_item['board']['id'] );\n\n\t\t\tadd_action( 'save_post_post', 'update_or_create' );\n\n\t\t\tupdate_post_meta( $post_id, 'post_status', 'draft' );\n\t\t\twp_update_post( array(\n\t\t\t\t'ID' => $post_id\n\t\t\t) );\n\t\t}\n\n\t\twp_send_json( array( 'success' => true ) );\n\t}\n\n\twp_send_json( array( 'success' => false ) );\n\n}", "title": "" }, { "docid": "0831f413e5158f643aff56640d0e2e26", "score": "0.58428574", "text": "public function createListItem(ListItemModel $item) {\n RealityCheckLogger::info(\"Entering BucketListBusinessService.createListItem()\");\n\n //get credentials for accessing the database\n $servername = config(\"database.connections.mysql.host\");\n $dbname = config(\"database.connections.mysql.database\");\n $username = config(\"database.connections.mysql.username\");\n $password = config(\"database.connections.mysql.password\");\n\n //create connection\n $conn = new PDO(\"mysql:host=$servername;dbname=$dbname\", $username, $password);\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n //create a bucketlist dao with this connection and create the item list\n $service = new BucketListDataService($conn);\n $flag = $service->createListItem($item);\n\n //return the finder results\n RealityCheckLogger::info(\"Exit BucketListBusinessService.createListItem() with \" . $flag);\n return $flag;\n }", "title": "" }, { "docid": "8ce98fa9373305fc5f15585678ce83d4", "score": "0.58420557", "text": "public function create()\n {\n return view('items.create');\n }", "title": "" }, { "docid": "d6ba04b28b5c63cc0f0681c0aa6d562c", "score": "0.58370394", "text": "public function create(): \\Illuminate\\Http\\Response\n {\n //\n }", "title": "" }, { "docid": "f80b2a95371593f03ed37705431f6db2", "score": "0.58327734", "text": "public function create(): Response\n {\n //\n }", "title": "" }, { "docid": "f80b2a95371593f03ed37705431f6db2", "score": "0.58327734", "text": "public function create(): Response\n {\n //\n }", "title": "" }, { "docid": "f0c390281ab4ff02bfb99f2e8de1d6ed", "score": "0.58316225", "text": "public function it_returns_success_when_creating_a_book()\n {\n $data = [\n 'name' => 'Bola',\n 'isbn' => '123-456',\n 'authors' => 'Ade, Bola',\n 'number_of_pages' => 10,\n 'publisher' => 'Bola Publisher',\n 'country' => 'Nigeria',\n 'release_date' => '2020-08-25',\n ];\n\n $response = $this->postJson('/api/v1/books', $data);\n $response->assertStatus(JsonResponse::HTTP_CREATED)\n ->assertJson([\"status_code\" => JsonResponse::HTTP_CREATED]);\n }", "title": "" }, { "docid": "d6aaf1f770df8dbde3b0dcea7d496cef", "score": "0.5825293", "text": "public function actionCreate()\n {\n $params = Yii::$app->request->post();\n\n $sale = new Sale();\n $sale->id_user = Yii::$app->user->getId();\n $sale->sale_finished = 0;\n $sale->save(false);\n\n $transaction = $sale->getDb()->beginTransaction();\n foreach ($params as $product)\n {\n $model = Product::findOne($product['id']);\n $orderItem = new SaleItem();\n $orderItem->id_sale = $sale->id;\n $orderItem->unit_price = $model->unit_price;\n $orderItem->id_product = $model->id;\n $orderItem->quantity = $product['quantity'];\n if (!$orderItem->save(false)) {\n $transaction->rollBack();\n $sale->getErrors();\n $response['hasErrors'] = $sale->hasErrors();\n $response['errors'] = $sale->getErrors();\n return $response;\n }\n }\n $transaction->commit();\n $response['isSuccess'] = 201;\n $response['message'] = 'Venda Registada com sucesso!';\n return $response;\n }", "title": "" }, { "docid": "464308c8fdf3213cc58a9773b7431073", "score": "0.58237684", "text": "public function store(Request $request)\n {\n $newItem = Item::create($request->all());\n return response()->json($newItem, 201);\n }", "title": "" }, { "docid": "a3d0679cf44d7569392a5ba78817e473", "score": "0.58160704", "text": "public function create()\n {\n return view('inventory.items.create');\n //\n }", "title": "" }, { "docid": "e370795b9e7052e4a59025cb07f45895", "score": "0.58149105", "text": "public function actionCreate() {\n $model = new ItemMaster();\n $model->setScenario('create');\n if ($model->load(Yii::$app->request->post()) && Yii::$app->SetValues->Attributes($model) && $model->validate() && $model->save()) {\n Yii::$app->getSession()->setFlash('success', ' Item Added succuessfully');\n $model = new ItemMaster();\n return $this->redirect(['index']);\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "7685284ed7c5ed3349592033f7b8b1a4", "score": "0.5810504", "text": "public function store(Request $request)\n {\n // validate the input\n $validatedData = $request->validate(['title' => 'required']);\n \n $item = new Item;\n $item->title = $validatedData['title'];\n $item->completed = 0;\n $item->save();\n\n ItemResource::withoutWrapping();\n return new ItemResource($item);\n \n }", "title": "" }, { "docid": "9590f083f4dc94ae5e7c76d9b8af1722", "score": "0.58095664", "text": "public function createAction(Request $request)\n {\n $entity = new Item();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n $command = new \\Numa\\DOAAdminBundle\\Command\\DBUtilsCommand();\n $command->setContainer($this->container);\n $resultCode = $command->makeHomeTabs(false);\n\n return $this->redirect($this->generateUrl('items_show', array('id' => $entity->getId())));\n }\n\n return $this->render('NumaDOAAdminBundle:Item:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c848f4e1916c0378ae96d38de4f46c95", "score": "0.5805327", "text": "public function respondCreated($data) {\n\t\treturn $this->setStatusCode(IlluminateResponse::HTTP_CREATED)->respond($data);\n\t}", "title": "" }, { "docid": "03bc55bc6069e14303729a161c040649", "score": "0.5804352", "text": "protected function sendCreated(): void {\n $this->response(\n new Response(new NoContent()),\n IResponse::R200_OK_CREATED\n )->execute();\n }", "title": "" }, { "docid": "f2a629194366042b63cae3d11def55e1", "score": "0.5798419", "text": "public function store(AttributeRequest $request, Item $item)\n {\n Attribute::create($request->all());\n return redirect()->route('back.attribute.index',$item->id)->withSuccess(__('New Attribute Added Successfully.'));\n }", "title": "" }, { "docid": "0041dbcc6b8d1aa5d429b10c45b795dd", "score": "0.5798055", "text": "public function post_new(){\n\t\treturn $this->response(array(),200);\n\t}", "title": "" }, { "docid": "a648fc4014e6089f63159589129cfef2", "score": "0.57945967", "text": "public function create()\n {\n return response()->json([\n 'buySell' => 'STRING : buy or sell',\n 'user_id' => 'INT : user id',\n 'place_id' => 'INT : place id',]\n );\n }", "title": "" } ]
84339f733b06ec954128432dda5cfd6e
Permet de modifier les informations utilisateur
[ { "docid": "cbccf07ede2e1afd8fbb621b192815cf", "score": "0.0", "text": "public function update()\n {\n $success = false;\n \n $sql = \"UPDATE \" . self::TABLE_NAME . \" SET username = :username, password = :password, role_id = :role_id, is_active = :is_active WHERE id = \" . $this->getId();\n \n $pdoStatement = PDOS::getPDO()->prepare($sql);\n\n $pdoStatement->bindValue(':username', $this->getUsername(), \\PDO::PARAM_STR);\n $pdoStatement->bindValue(':password', $this->getPassword(), \\PDO::PARAM_STR);\n $pdoStatement->bindValue(':role_id', $this->getRoleId(), \\PDO::PARAM_INT);\n $pdoStatement->bindValue(':is_active', $this->getIsActive(), \\PDO::PARAM_BOOL);\n\n if ($pdoStatement->execute()) {\n $success = $pdoStatement->rowCount() > 0;\n }\n\n return $success;\n }", "title": "" } ]
[ { "docid": "965c2613ff3521c5dbb70cbf469cd94d", "score": "0.84553236", "text": "public function modifierutilisateur(){\n\t\t\n\t}", "title": "" }, { "docid": "3a8b9ed7e5d43ddb10a70be4862bc7f9", "score": "0.75346625", "text": "function modifierUti() {\r\n \tmysql_query(\"UPDATE if_utilisateur SET nom='$this->nom',prenom='$this->prenom',login='$this->login',pwd='\".easy($this->pwd,\"e\").\"',admin='$this->admin' WHERE numuti='$this->numuti'\");\t\r\n\t$this->activerUti();\r\n }", "title": "" }, { "docid": "ca19a9bc1436be7ee3d894da58a262df", "score": "0.71836156", "text": "public function edit_user()\n\t{\n\t\t$query = \"SELECT Login FROM Osoba\";\n\t\t$result= mysqli_query($this->mysql, $query);\n\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t$change = $_POST[\"{$row[\"Login\"]}\"];\n\t\t\t$query = \"SELECT * FROM Student WHERE Login='\" . $row[\"Login\"] . \"'\";\n\t\t\t$vysledok = mysqli_query($this->mysql, $query);\n\t\t\tif ($this->change_user_permissions($change, $vysledok, \"Student\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$query = \"SELECT * FROM Spravca WHERE Login='\" . $row[\"Login\"] . \"'\";\n\t\t\t$vysledok = mysqli_query($this->mysql, $query);\n\t\t\tif ($this->change_user_permissions($change, $vysledok, \"Admin\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$query = \"SELECT * FROM Zamestnanec WHERE Login='\" . $row[\"Login\"] . \"'\";\n\t\t\t$vysledok = mysqli_query($this->mysql, $query);\n\t\t\tif ($this->change_user_permissions($change, $vysledok, \"Garant\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "53d74678a6aacca203f8f3eabc9e09a5", "score": "0.7039697", "text": "public static function modifier() {\n if(!UserModel::estAdmin())\n Controller::goTo();\n \n // L'utilisateur a annulé\n if(isset($_POST['btnAnnuler']))\n Controller::goTo(\"users/index.php\", \"L'enseignant n'a pas été modifié.\");\n \n // Le formulaire a été validé\n $data = [];\n if(isset($_POST['btnModifier'])) {\n if(!isset($_SESSION['current']['user']))\n Controller::goTo(\"users/index.php\", \"\", \"Erreur lors de la récupération de l'utilisateur.\");\n \n $data['user'] = self::__getFromForm();\n $data['user']->setId($_SESSION['current']['user']);\n \n $erreur = \"\";\n if(isset($_POST['inputConf']) && \n ($_POST['inputConf'] != $data['user']->getPassword()))\n $erreur .= \"Le mot de passe et la confirmation sont différents. \";\n if($data['user']->getName() == \"\")\n $erreur .= \"Vous devez saisir un nom. \";\n if($data['user']->getFirstname() == \"\")\n $erreur .= \"Vous devez saisir un prénom. \";\n if($data['user']->getMail() == \"\")\n $erreur .= \"Vous devez saisir une adresse email. \";\n else\n if(!filter_var($data['user']->getMail(), FILTER_VALIDATE_EMAIL))\n $erreur .= \"L'adresse email n'est pas valide. \";\n\n if($erreur == \"\") {\n if(UserModel::update($data['user']))\n Controller::goTo(\"users/index.php\", \"L'enseignant a été modifié.\");\n else\n WebPage::setCurrentMsg(\"L'enseignant n'a pas été modifié dans la base de données.\");\n } \n else\n WebPage::setCurrentErrorMsg($erreur);\n } \n else {\n $data['user'] = UserModel::read(intval($_POST['idModi']));\n if($data['user'] == null)\n return Controller::goTo(\"users/index.php\", \"\", \"Erreur lors de la récupération de l'utilisateur.\");\n $_SESSION['current']['user'] = intval($_POST['idModi']);\n }\n \n return Controller::push(\"Modifier un enseignant\", \"./view/users/modifier.php\", $data);\n }", "title": "" }, { "docid": "c6e71ec66487c4a692ad48741aa6a26d", "score": "0.69100636", "text": "private function editUser(): void {\n if (!is_numeric($_POST['user_id'])) {\n return;\n }\n\n $userID = (int) $_POST['user_id'];\n\n if (!$this->authorizeUser($userID)) {\n return;\n }\n\n //TODO: tilføj et ekstra felt, \"confirm password\" og tjek at de er ens\n\n $firstname = $_POST['firstname'];\n $lastname = $_POST['lastname'];\n $email = $_POST['email'];\n $phone = $_POST['phone'];\n $address = $_POST['address'];\n $zipcode = $_POST['zipcode'];\n $city = $_POST['city'];\n $level = $this->RCMS->Login::STANDARD_USER_LEVEL;\n\n if ($this->RCMS->Login->isAdmin()) {\n $level = $_POST['level'];\n }\n\n $currentUser = $this->getUserByID($userID);\n\n // Tjek om brugeren vil ændre sin e-mail, og om e-mailen er optaget\n if ($currentUser['Email'] !== $email) {\n $exists = $this->RCMS->execute('CALL getUserByEmail(?)', array('s', $email));\n if ($exists->num_rows !== 0) {\n // E-mail er allerede taget\n header(\"Location: ?userid=$userID&emailtaken\");\n return;\n }\n }\n\n // Tjek om brugeren vil ændre sit password\n if (isset($_POST['password']) && $_POST['password'] !== '') {\n $password = $this->RCMS->Login->saltPass($_POST['password']);\n } else {\n $password = $currentUser['Password'];\n }\n\n $this->RCMS->execute('CALL editUser(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array('issssssssi', $userID, $firstname, $lastname, $email, $password, $phone, $address, $zipcode, $city, $level));\n\n if ($userID === $this->RCMS->Login->getUserID()) {\n // Brugerens information har ændret sig, så de skal opdateres i sessionen\n $user = $this->getUserByID($userID);\n unset($user['Password']);\n $_SESSION['user'] = $user;\n }\n\n $this->editCustomerInStripe($currentUser['StripeID'], $firstname, $lastname, $email, $phone, $address, $zipcode, $city);\n\n header('Location: /dashboard');\n }", "title": "" }, { "docid": "418a9d3b05f38fab21ae30e86a38db13", "score": "0.6760474", "text": "public function modifyAccount(){\r\n // get all user's infos \r\n $user = $this->model->getUserInfos($_SESSION[\"user_password\"], $_SESSION[\"id\"]);\r\n $userPass = $user[0]->user_password;\r\n\r\n // if user click on the submit btn \r\n if(isset($_POST['submitCurrentPassword'])){\r\n $passwordTried = $_POST['currentPassword'];\r\n $encryptedPasswordTried = md5($passwordTried);\r\n // if user write the correct password \r\n if($encryptedPasswordTried == $userPass){\r\n require ROOT.\"/App/View/ProfilView.php\";\r\n // if the two password are different\r\n }else{\r\n echo('Password incorrect');\r\n }\r\n }\r\n\r\n\r\n // user update his personnal informations\r\n if(isset($_POST['submitProfilChanges'])){\r\n $newUserName = htmlspecialchars($_POST['newUsername']);\r\n $newUserPassword = md5($_POST['newPassword']);\r\n $confirmedNewUserPassword = md5($_POST['newPasswordConfirmed']);\r\n // if user write a new username \r\n if(!empty($newUserName)){\r\n // if user write a new password \r\n if(!empty($_POST['newPassword'])){\r\n // if the confirmed password macth with the password \r\n if($newUserPassword == $confirmedNewUserPassword){\r\n $userUpt = $this->model->updateUserInfos($newUserName, $newUserPassword, $_SESSION['user_password'], $_SESSION['id']);\r\n header(\"Location: ../public/index.php?page=MyPolls\");\r\n }else{\r\n echo('Les deux mots de passe sont différents');\r\n }\r\n }else{\r\n echo('Merci de choisir un nouveau password');\r\n }\r\n }else{\r\n echo('Merci de choisir un nouveau username');\r\n }\r\n }\r\n require ROOT.\"/App/View/ProfilSecurityView.php\";\r\n\r\n }", "title": "" }, { "docid": "948f766e9976a2f3264b67fa397ef3cf", "score": "0.67567927", "text": "public function edit(){\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\t$columnas= array('NIF','username','nombreUsuario','apellidos','telefono','email','clave','userType');\n\t\t$valores = array($this->NIF,$this->username,$this->nombre, $this->apellidos,$this->telefono, $this->email, $this->clave, $this->tipoUsuario);\n\t\t$filtros=array('NIF'=>$this->NIF!= null);\n\t\t\t$bd->update(self::$tabla, $columnas, $valores, $filtros);\n\t\t\t$bd->disconnect();\n\t}", "title": "" }, { "docid": "7b2c383c72a65418e614d1d595830c00", "score": "0.674892", "text": "public function userEdit(){ \r\n \r\n \r\n if(! isset($_SESSION['loginok']) || ! isset($_GET['id'])){//Si no está iniciada la sesión o no se le pasa id muestra error\r\n\r\n include_once CTRL_PATH.'error404.php';\r\n }\r\n else if ($_SESSION['tipousuario'] != 'A'){//Solo puede eliminar usuarios los administradores\r\n include_once CTRL_PATH.'error404.php';\r\n }\r\n else{\r\n $correcto = true;\r\n $errores = array(); \r\n\r\n if(!$this->model->ExisteUsuarioByID($_GET['id'])){\r\n \r\n include_once CTRL_PATH.'error404.php';\r\n }\r\n else{\r\n if(! isset($_POST['modificarusuario'])){\r\n\r\n $this->controller->Verfuera('Edita Usuario',\r\n CargaVista('userEdit', array( ))); \r\n \r\n } \r\n else{ \r\n \r\n if($_POST['clave'] != EscribeCampoUsuario($_GET['id'], 'clave')){ //CLAVE INTRODUCIDA CORRECTA\r\n $correcto = FALSE;\r\n $errores['claveincorrecta'] = TRUE;\r\n }\r\n else if($_POST['clavenueva'] != $_POST['clavenuevarep']){ //CLAVES NUEVAS IGUALES\r\n $errores['clavesdistintas'] = TRUE;\r\n $correcto = FALSE;\r\n }\r\n else if($this->model->ExisteNuevoNombreUsuario($_POST['usuario'], $_GET['id'])){//Comprobar que el nuevo nombre no sea uno de los usuarios ya guardados\r\n $errores['existenuevonombre'] = TRUE;\r\n $correcto = FALSE;\r\n }\r\n\r\n if(!$correcto){\r\n \r\n $this->controller->Verfuera('Edita Usuario',\r\n CargaVista('userEdit', array('errores'=>$errores ))); \r\n }\r\n else { \r\n $_SESSION['usuario'] = $_POST['usuario'];\r\n if(empty($_POST['clavenueva']) && empty($_POST['clavenuevarep']))//Si estan vacias las dos claves, solo se modificar el nombre de usuario\r\n $this->model->ModificaUsuarioEnBD(array('usuario'=>$_POST['usuario']), $_GET['id']); \r\n\r\n else\r\n $this->model->ModificaUsuarioEnBD(array('usuario' => $_POST['usuario'], 'clave' => $_POST['clavenueva']), $_GET['id']);\r\n\r\n\r\n $this->userList();\r\n\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n \r\n }", "title": "" }, { "docid": "0cd35696b03e112612a2b5a3fad767c6", "score": "0.67155635", "text": "public function update() {\n\t\tif ($this->getId() == 0 || $this->getId() == null) {\n\t\t\t/* un identifiant 0 ou null implique un nouvel objet => INSERT */\n\t\t\treturn$this->save();\n\t\t} else {\n\t\t\t$requete = 'UPDATE utilisateur SET ';\n\t\t\t$requete .= 'nom = \\''.$this->getNom().'\\',';\n\t\t\t$requete .= 'prenom = \\''.$this->getPrenom().'\\',';\n\t\t\t$requete .= 'email = \\''.$this->getEmail().'\\',';\n\t\t\t$requete .= 'password = \\''.$this->getPassword().'\\',';\n\t\t\t$requete .= 'adresse = \\''.$this->getAdresse().'\\',';\n\t\t\t$requete .= 'codepostal = \\''.$this->getCodepostal().'\\',';\n\t\t\t$requete .= 'ville = \\''.$this->getVille().'\\',';\n\t\t\t$requete .= 'role = '.$this->getRole().',';\n\t\t\t$requete = substr($requete,0,strlen($requete)-1);\n\t\t\t$requete .= ' WHERE id = '.$this->getId();\n\t\t\treturn $requete;\n\t\t}\n\t}", "title": "" }, { "docid": "e9c6e951b5a40743f71ee31cedf507e9", "score": "0.66342705", "text": "public function modifUtilisateurModal()\n\n {\n $data['retour']=$this->paramGET[3];\n $data['utilisateur'] = $this->utilisateurModels->getUtilisateur([\"condition\" => [\"id = \" => $this->paramGET[2]]])[0];\n $this->views->setData($data);\n $this->modal();\n\n }", "title": "" }, { "docid": "899422962a430c72292b653971357e97", "score": "0.66251075", "text": "public function testUpdateUser()\n {\n }", "title": "" }, { "docid": "0c5a6c0be9f85b2f75ef40ffd8f004c9", "score": "0.66078186", "text": "public function edit()\n {\n $session = new UserSession();\n $userSession = $session->get('_userStart');\n $session->ifNotConnected();\n\n $userData = (new UserRepository())->findOneBy('user','id', $userSession['id']);\n\n if(count($_POST) > 0)\n {\n $input = new Input();\n $post = $input->cleaner($_POST);\n \n (new UserUpdateEmail($userData, $post));\n (new UserUpdatePassword($userData, $post));\n }\n\n (new Repository())->disconnect();\n\n $this->render('admin/user/edition', [\n 'session' => (new Session()),\n 'email' => $userData['email'],\n 'law' => $userData['law'] ,\n 'createdAt' => (new DateTime($userData['created_at']))->format('d/m/Y à H:i') ,\n ]);\n \n }", "title": "" }, { "docid": "c5c59e631f4fc6b8ae79e28d30ec364c", "score": "0.65860367", "text": "public function getUserEdit(){\n\n $id = trim($_REQUEST['id']);\n $infoUser = $this->model->getById( $id );\n require_once('views/user/formUser.php');\n }", "title": "" }, { "docid": "0e28caf43989dbb336929fd27bb4d883", "score": "0.65348834", "text": "public function actionEdit(){\n\t\t$form = $_POST;\n\t\t$db = $this->context->getService('database');\n\t\t$res = $db->table('core_users')->find($form['id'])->fetch();\n\t\tif($res->password != md5($form['current'] . str_repeat('*enter any random salt here*', 10))){\n\t\t\t$this->flashMessage('Původní heslo není správné!');\n\t\t\t$this->redirect('user:');\n\t\t}elseif( strlen($form['password']) < 6){\n\t\t\t$this->flashMessage('Heslo musí mít alespoň 6 znaků');\n\t\t\t$this->redirect('user:');\n\t\t}else{\n\t\t\tif($form['password'] == $form['password_confirmation']){\n\t\t\t\t$update['password'] = md5($form['password'] . str_repeat('*enter any random salt here*', 10));\n\t\t\t\t$db->exec('UPDATE core_users SET ? WHERE id = ?', $update, $form['id']);\n\t\t\t\t$this->redirect('user:');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->flashMessage('Hesla se neschodují!');\n\t\t\t\t$this->redirect('user:');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7afe3258b2770fa61910430e10ac1e12", "score": "0.65347195", "text": "function modificarUsuarioAction() {\n\t\t\tif (BLOQUEAR == 1){\n\t\t\t\t$this->render('appBloqueada');\n\t\t\t} else if ($this->security(true) && $_SESSION['user']->rol>=100) {\n\t\t\t\t$mensaje = \"\";\n\n\t\t\t\tif(isset($_POST['modificarUsuario'])) {\n\t\t\t\t\tDBDelegados::save($_GET['id'], $_POST['rol']);\n\t\t\t\t\t$mensaje = 'Usuario modificado correctamente';\n\t\t\t\t} else if (isset($_POST['eliminarUsuario'])) {\n\t\t\t\t\tDBDelegados::remove($_GET['id']);\n\t\t\t\t\t$mensaje = 'Usuario eliminado correctamente';\n\t\t\t\t}\n\n\t\t\t\t$user = DBDelegados::findById($_GET['id']);\n\t\t\t\t$this->render('modificarUsuario', array('mensaje'=>$mensaje, 'usuario'=>$user));\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8cbc5b2cc4af0cc1cec2f9411a06197b", "score": "0.65218115", "text": "public function getUserInformations(): void\n {\n $this->mail = $_POST['mail'];\n $this->password = $_POST['password'];\n\n if (!empty($this->password) && !empty($this->mail)) {\n $model = $this->model->loginUser($this->mail);\n $connexion_user = $model->fetch();\n\n if (!empty($connexion_user)) {\n if (password_verify($this->password, $connexion_user['password'])) {\n $_SESSION['user'] = $connexion_user;\n\n // Redirect to the index page\n Router::redirectTo('home');\n exit();\n } else {\n array_push($this->errors, \"Vous n'avez pas bien rempli les bons champs, veuillez recommencer\");\n }\n } else {\n array_push($this->errors, \"Vous n'avez pas bien rempli les bons champs, veuillez recommencer\");\n }\n } else {\n array_push($this->errors, \"Vous n'avez pas bien rempli les bons champs, veuillez recommencer\");\n }\n }", "title": "" }, { "docid": "ad9a59e651895680bb6372f78596c373", "score": "0.64959794", "text": "public function editarUser($id,$datos){\n\t\t$this->_db->query(\"UPDATE usuarios SET `pass` = '\".Hash::getHash('sha1', $datos['password'], HASH_KEY).\"' WHERE `id` = \".$id);\n\t}", "title": "" }, { "docid": "cd2cf1eb806731423b59deda28afcbe5", "score": "0.6468279", "text": "function actualizeazaAdmin($request_values){\n\tglobal $conn, $errors, $rol, $username, $isEditingUser, $admin_id, $email;\n\t// preia ID-ul administratorului pentru actualizare\n\t$admin_id = $request_values['admin_id'];\n\t// seteaza starea de editare la fals\n\t$editeazaUtilizatorul = false;\n\n\n\t$username = esc($request_values['username']);\n\t$email = esc($request_values['email']);\n\t$password = esc($request_values['password']);\n\t$passwordConfirmation = esc($request_values['passwordConfirmation']);\n\tif(isset($request_values['role'])){\n\t\t$rol = $request_values['role'];\n\t}\n\t// inregistreaza utilizator daca nu sunt erori in formular\n\tif (count($errors) == 0) {\n\t\t$password = md5($password);\n\n\t\t$query = \"UPDATE utilizatori SET username='$username', email='$email', rol='$rol', password='$password' WHERE id=$admin_id\";\n\t\tmysqli_query($conn, $query);\n\n\t\t$_SESSION['message'] = \"Utilizatorul a fost actualizat cu succes\";\n\t\theader('location: users.php');\n\t\texit(0);\n\t}\n}", "title": "" }, { "docid": "cd2cf1eb806731423b59deda28afcbe5", "score": "0.6468279", "text": "function actualizeazaAdmin($request_values){\n\tglobal $conn, $errors, $rol, $username, $isEditingUser, $admin_id, $email;\n\t// preia ID-ul administratorului pentru actualizare\n\t$admin_id = $request_values['admin_id'];\n\t// seteaza starea de editare la fals\n\t$editeazaUtilizatorul = false;\n\n\n\t$username = esc($request_values['username']);\n\t$email = esc($request_values['email']);\n\t$password = esc($request_values['password']);\n\t$passwordConfirmation = esc($request_values['passwordConfirmation']);\n\tif(isset($request_values['role'])){\n\t\t$rol = $request_values['role'];\n\t}\n\t// inregistreaza utilizator daca nu sunt erori in formular\n\tif (count($errors) == 0) {\n\t\t$password = md5($password);\n\n\t\t$query = \"UPDATE utilizatori SET username='$username', email='$email', rol='$rol', password='$password' WHERE id=$admin_id\";\n\t\tmysqli_query($conn, $query);\n\n\t\t$_SESSION['message'] = \"Utilizatorul a fost actualizat cu succes\";\n\t\theader('location: users.php');\n\t\texit(0);\n\t}\n}", "title": "" }, { "docid": "91d2c746c0e99e55776df89861446c80", "score": "0.6441168", "text": "public function modify_user(){\r\n\t\t$query = \"UPDATE users SET loginUsers = '\".$_POST[\"login\"].\"',PoscUsers = '\".$_POST[\"posc\"].\"', emailUser = '\".$_POST[\"email\"].\"', statusUsers = '\".$_POST[\"status\"].\"'\r\n\t\t\tWHERE idUsers = '\".$_POST[\"idUsers\"].\"' \";\r\n\t\t$this->objDb->update($query);\r\n\t\t\r\n\t\t$query = \"DELETE FROM user_pro WHERE idUsers = '\".$_POST[\"idUsers\"].\"' \";\r\n\t\t$this->objDb->delete($query);\r\n\t\t\r\n\t\t$query = \"SELECT * FROM profiles\";\r\n\t\t$this->result = $this->objDb->select($query);\r\n\t\twhile($row=mysql_fetch_array($this->result)){\r\n\t\t\t$namePro = \"pro\" . $row[\"idProfile\"];\r\n\t\t\tif(isset($_POST[$namePro])){\r\n\t\t\t\tif($row[\"idProfile\"] == $_POST[\"profile\"]){\r\n\t\t\t\t\tmysql_query(\"INSERT INTO user_pro VALUES('', '\".$row[\"idProfile\"].\"', '\".$_POST[\"idUsers\"].\"', '1')\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmysql_query(\"INSERT INTO user_pro VALUES('', '\".$row[\"idProfile\"].\"', '\".$_POST[\"idUsers\"].\"', '0')\");\r\n\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\t\r\n\t}", "title": "" }, { "docid": "9681792178246511786d2be3115a82e8", "score": "0.64347136", "text": "public function Editar()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(!$this->cn->leer(\"call SPUsuarioGet('','\".$this->seguridad->Encrypt(usuario::getUserName()).\"')\"))\n\t\t\t{\n\t\t\t\t//por medio del objeto de la clase datos llamamos el metodo encargado de hacer modificaciones en la base de datos\n\t\t\t\tif($this->cn->ejecutar(\"call SPUsuarioUpdate('\".usuario::getIdUsuario().\"','\".usuario::getNombre().\"','\".$this->seguridad->Encrypt(usuario::getCorreo()).\"','\".usuario::getFechaNacimiento().\"','\".usuario::getIdPerfil().\"')\"))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\t$this->log->write('Error en la clase Login metodo editar '.$e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "3eeedc5e70cc4d2f6d592e9757e95e33", "score": "0.6427052", "text": "public function edit_usuario($id,$nombres_usu,$appat_usu,$apmat_usu,$nick_usu,$clave_usu,$rol_usu,$estado_usu,$usu_mod)\n\t{\n\t\n\t\t$sql=\"update T_usuario \"\n\t\t\t.\" set \"\n\t\t\n\t\t.\"\n\t\tvar_nom_usu='$nombres_usu',var_appat_usu='$appat_usu',var_apmat_usu='$apmat_usu',var_nick_usu='$nick_usu',var_cla_usu='$clave_usu',int_cod_rol='$rol_usu',int_est_usu='$estado_usu',var_usumod_usu='$usu_mod',date_fecmod_usu=now()\n\t\t\n\t\t\"\n\t\t\n\t\t\t.\" where \"\n\t\t\t.\" int_cod_usu=$id \";\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t$res=mysql_query($sql,Conectar::con());\n\t\techo \"<script type='text/javascript'>\n\t\talert('El registro ha sido modificado correctamente');\n\t\twindow.location='mod_usuario.php?id=$id && load=1';\n\t\t</script>\n\t\t<SCRIPT LANGUAGE=javascript>\n \n</SCRIPT> \n\t\t\n\t\t\";\t\n\t\t\n\t}", "title": "" }, { "docid": "d588d4cf43b07e263761ce604fee5858", "score": "0.64253294", "text": "private function canviInici ( ) {\r\n \r\n $_SESSION[\"usuari\"] = $this->correu;\r\n $this->view = $_SESSION[\"viewPath\"] . 'changepassword.php'; \r\n \r\n }", "title": "" }, { "docid": "69b4fc4f1b22a21043eab389c29573b7", "score": "0.64252484", "text": "public function modificar()\n {\n if (isset($this->usuarioActual)) {\n if ($this->usuarioActual->getRol() == \"administrador\" || $this->usuarioActual->getRol() == \"moderador\") {\n if (isset($_GET[\"id\"])) {\n $id_notica = $_GET[\"id\"];\n $id_usuario = $this->noticiaMapper->listarNoticiaPorId($id_notica)[\"id_usuario\"];\n\n if ($this->usuarioActual->getIdUsuario() == $id_usuario || $this->usuarioActual->getRol() == \"administrador\") {\n $noticia = $this->noticiaMapper->listarNoticiaPorId($id_notica);\n $this->view->setVariable(\"noticia\", $noticia);\n $this->view->render(\"noticia\", \"modificarNoticia\");\n } else {\n $this->view->setVariable(\"mensajeError\", \"No puedes modificar la noticia por no ser su creador\", true);\n $this->view->redirect(\"noticia\", \"ver\", \"id=\" . $id_notica);\n }\n } else {\n $this->view->setVariable(\"mensajeError\", \"Se necesita id_noticia\", true);\n $this->view->redirect(\"noticia\", \"index\");\n }\n } else {\n $this->view->setVariable(\"mensajeError\", \"No tienes suficientes privilegios\", true);\n $this->view->redirect(\"noticia\", \"index\");\n }\n } else {\n $this->view->setVariable(\"mensajeError\", \"Se necesita login para esa acci&oacute;n\", true);\n $this->view->redirect(\"noticia\", \"index\");\n }\n }", "title": "" }, { "docid": "3b9e0cb67c3701de35d736c502f218a5", "score": "0.6423009", "text": "public function mot_de_passe_update() {\r\n\t\tglobal $conn;\r\n\t\t$query = $conn->prepare(\"UPDATE mot_de_passe SET mdp = :mdp WHERE :id_users = id_users;\");\r\n\t\t$query->execute(array(\"mdp\" => $this->mdp, \"id_users\" => $this->id_users));\r\n\t}", "title": "" }, { "docid": "158de0cb01bcfeebe94d2a0775d281bb", "score": "0.6403334", "text": "function update_user($lista_modificada){\n\n\trequire 'conexion.php';\n\n\t//Encriptar contraseña con password_hash\n\t$hash = password_hash($lista_modificada['contrasena'],PASSWORD_DEFAULT,['cost'=>10]);\n\t//Sentecia sql\n\t$sql =\"UPDATE tareaglobal.usuarios SET usuario=:usuario, nombre=:nombre, apellidos=:apellidos, email=:email,contrasena=:contrasena,rol=:rol WHERE id=:id\";\n\t\n\t$resultado = $conexion->prepare($sql);\n\n\n\t$resultado->execute($lista_modificada);\n\n\tif($resultado->rowCount()>=1){\n\n\t\techo \"<script>alert('Se han modificado los cambios con éxito')</script>\";\n\n\t}\n\t$resultado=null;\n\t$conexion=null;\n}", "title": "" }, { "docid": "d63f87b33e7afc8f48c0732dc154673e", "score": "0.6376206", "text": "function user_update() {\n $user_obj = new SFACTIVE\\User();\n\n\t\t// we check if the password is safe\n\t\tif($user_obj->check_pass_security($_POST['password']) === \"ok\")\n\t\t{\n\t\t\t$user_fields = array(\n 'user_id' => $_POST['user_id1'],\n 'username' => $_POST['username1'],\n 'password' => $_POST['password'],\n 'email' => $_POST['email'],\n 'phone' => $_POST['phone'],\n 'first_name' => $_POST['first_name'],\n 'last_name' => $_POST['last_name']\n );\n\n \t$error_num = $user_obj->update($user_fields);\n\t\t\tif($_SESSION['secure'] !== \"yes\")\n\t\t\t{\n\t\t\t\t$_SESSION['secure'] = \"yes\" ;\n\t\t\t\t$new_loc = '../';\n\t\t\t\theader(\"Location: $new_loc\");\n\t\t\t\texit ;\n\t\t\t}else{\n\t\t\t\theader(\"Location: user_display_list.php\");\n\t\t\t\t$new_loc = \"user_display_edit.php?user_id1=\".$_POST['user_id1'];\n\t\t\t\theader(\"Location: $new_loc\");\n\t\t\t\texit;\n\t\t\t}\n\t\t}else{\n\t\t\t$new_loc = \"user_display_edit.php?user_id1=\".$_POST['user_id1'].\"&insecure=yes\";\n\t\t\theader(\"Location: $new_loc\");\n\t\t\texit;\n\t\t}\n }", "title": "" }, { "docid": "f34126dbeae2c30878f5aa50ffa39efd", "score": "0.63694066", "text": "public function modifUserAsAdmin(user $donnees, $columnName) {\n $pdo = new connexionPDO();\n $prepare = $pdo->pdo_start()->prepare(\"UPDATE utilisateurs SET $columnName = ? WHERE id = ?\");\n $prepare->execute([\n $donnees->getText(),\n $donnees->getUserId(),\n ]);\n echo \"Modification effectué\";\n }", "title": "" }, { "docid": "637235410518b633fdda040dce179df2", "score": "0.6369165", "text": "public function ModificationUser(user $donnees) {\n $pdo=new connexionPDO();\n $prepare = $pdo->pdo_start()->prepare(\"UPDATE utilisateurs SET nom = ?, prenom = ?, adresse = ?, telephone = ?, dateNaissance = ?, email = ? WHERE id=?\");\n $prepare->execute([\n $donnees->getNom(),\n $donnees->getPrenom(),\n $donnees->getAdresse(),\n $donnees->getTelephone(),\n $donnees->getDateNaissance(),\n $donnees->getEmail(),\n $_COOKIE['user']\n ]);\n return 1;\n }", "title": "" }, { "docid": "6efa70fa8bac08cc0c8bdf69f7efd0e8", "score": "0.63559693", "text": "function modificar_user($email,$password,$name,$modificar)\n\t\t{\n\t\t \ttry\n\t\t \t{\n\t\t if($email!=null)\n\t\t {\n\t\t \t \t$sql=\"UPDATE usuarios set email=:email where email=:modificar\";\n\t\t\t\t $this->query($sql);\n\t\t\t\t $this->bind(':modificar',$modificar);\n\t\t\t\t $this->bind(':email',$email);\n\t\t\t\t $this->execute();\n\t\t return TRUE;\n\t\t }\n\n\t\t if($name!=null)\n\t\t {\n\t\t \t \t$sql=\"UPDATE usuarios set nombre=:nombre where email=:modificar\";\n\t\t\t\t $this->query($sql);\n\t\t\t\t $this->bind(':modificar',$modificar);\n\t\t\t\t $this->bind(':nombre',$name);\n\t\t\t\t $this->execute();\n\t\t return TRUE;\n\t\t }\n\n\t\t if($password!=null)\n\t\t {\n\t\t \t \t$sql=\"UPDATE usuarios set pass=:pass where email=:modificar\";\n\t\t\t\t $this->query($sql);\n\t\t\t\t $this->bind(':modificar',$modificar);\n\t\t\t\t $this->bind(':pass',$password);\n\t\t\t\t $this->execute();\n\t\t return TRUE;\n\t\t }\n\t\t \n }catch(PDOException $e)\n {\n echo \"Error:\".$e->getMessage();\n }\n\t}", "title": "" }, { "docid": "ca29747efca20dd0d1326d173c028964", "score": "0.6349703", "text": "function Modifica_Profilo(){\n global $db;\n $user = $_SESSION['logged'];\n $q=\"SELECT * FROM personale WHERE Username='$user'\";\n $res = $db->query($q);\n $row = mysql_fetch_array($res);\n \n $personale = new Personale();\n $personale->setUsername($row['Username']);\n $personale->setPassword($row['Password']);\n $personale->setEmail($row['Email']);\n $personale->setIndirizzo($row['Indirizzo']);\n $personale->setCap($row['Cap']);\n $personale->setNome($row['Nome']);\n $personale->setCognome($row['Cognome']);\n $personale->setCitta($row['Citta']);\n $personale->setTelefono($row['Telefono']);\n \n echo \"<h2>Modifica i miei dati personali </h2>\";\n PagePersonale($personale,1);\n \n}", "title": "" }, { "docid": "3cde1b86d51c0fda443378ddcf3df04e", "score": "0.6348858", "text": "function action() {\r\n\t\t\r\n\t\t$u = owa_coreAPI::entityFactory('base.user');\r\n\t\t$u->getByColumn('user_id', $this->getParam('user_id'));\r\n\t\t$u->set('email_address', $this->getParam('email_address'));\r\n\t\t$u->set('real_name', $this->getParam('real_name'));\r\n\t\t\r\n\t\t// never change the role of the admin user\r\n\t\tif (!$u->isOWAAdmin()) {\r\n\t\t\t$u->set('role', $this->getParam('role'));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$u->update();\r\n\t\t$this->set('status_code', 3003);\r\n\t\t$this->setRedirectAction('base.users');\r\n\t}", "title": "" }, { "docid": "2776463308d91cdc49d19aee4c7b4b47", "score": "0.6347883", "text": "function updateUser(){\n\t}", "title": "" }, { "docid": "4d647bdc3e0906d35f5bc8666d563395", "score": "0.6340137", "text": "function updatePermiso($params = null){\n if ($this->loggeado){\n $usuario = $_SESSION[\"ALIAS\"];\n }else{\n $usuario = '';\n } \n if(isset($params[':ID'])){\n $id = $params[':ID'];\n if ($this->admin){\n $existe = $this->usersModel->getUserById($id);\n if ($existe){\n if ($existe->admin == 1){\n $permiso = 0;\n }else{\n $permiso = 1; \n } \n $this->usersModel->updatePermiso($permiso, $id);\n $usuarios = $this->usersModel->getUsuarios($usuario); \n header(\"Location: \" . MENUADMIN);\n }else{\n $seccion = \"al Menú Administrador\";\n $this->homeView->showError(\"No existe el usuario con ese ID.\", \"showMenuAdmin\", $seccion, $this->loggeado, $usuario, $this->admin);\n }\n }else{\n header(\"Location: \" . HOME);\n } \n }else{\n $seccion = \"a Home\"; \n $this->homeView->showError(\"La página a la que intentas ingresar no existe..\", \"Home\", $seccion, $this->loggeado, $usuario, $this->admin);\n } \n }", "title": "" }, { "docid": "930cc5862d852939c7f6a5c925df2c62", "score": "0.6339648", "text": "function edit(){\r\n $this->reg->config->set('page_title', 'Edit User');\r\n\r\n if($this->reg->url->is_set('user_id')){\r\n if(\tarray_key_exists('edit_user', $_SESSION['FORM']) &&\r\n array_key_exists('user_id', $_SESSION['FORM']['edit_user']) &&\r\n array_key_exists('username', $_SESSION['FORM']['edit_user']) &&\r\n array_key_exists('password', $_SESSION['FORM']['edit_user']) &&\r\n array_key_exists('email', $_SESSION['FORM']['edit_user']) &&\r\n array_key_exists('privileges', $_SESSION['FORM']['edit_user'])){\r\n\r\n if($this->model->edit_do($_SESSION['FORM']['edit_user']['user_id'],\r\n $_SESSION['FORM']['edit_user']['username'],\r\n $_SESSION['FORM']['edit_user']['password'],\r\n $_SESSION['FORM']['edit_user']['email'],\r\n $_SESSION['FORM']['edit_user']['privileges'])){\r\n unset($_SESSION['FORM']['edit_user']);\r\n header('location:/user/index/');\r\n }else{\r\n $this->reg->template->assign('edit', $this->model->edit($this->reg->url->get('user_id')));\r\n unset($_SESSION['FORM']['edit_user']);\r\n }\r\n }else{\r\n $this->reg->template->assign('edit', $this->model->edit($this->reg->url->get('user_id')));\r\n }\r\n }else{\r\n header('location:/user/index/');\r\n }\r\n }", "title": "" }, { "docid": "fe478c9b54c915bc9249b793aed60614", "score": "0.63395417", "text": "function changeUserAdmin()\n{\n $changeUser = $_GET['idUser'];\n $user = getUser($changeUser);\n if ($user['admin']) {\n $user['admin'] = 0;\n } else {\n $user['admin'] = 1;\n }\n $res = saveUser($user);\n if ($res == true) {\n if ($user['admin']) {\n setFlashMessage($user['initials'] . \" est désormais administrateur.\");\n } else {\n setFlashMessage($user['initials'] . \" est désormais utilisateur.\");\n }\n } else {\n setFlashMessage(\"Erreur de modification du rôle pour \" . $user['initials']);\n }\n redirect(\"adminCrew\");\n}", "title": "" }, { "docid": "7613dcc0ba6e27beb21d4f67bf08a2d4", "score": "0.6333296", "text": "function moderateur() {\n\t\tif(empty($_SESSION['id_user']) OR empty($_SESSION['niveau'])){//OR empty($_SESSION['jeton'])) {\n\t\t\t$redirect='deconnexion.php';\n\t\t}\n\t\telse {\n\t\t\tif($_SESSION['niveau'] !== '2') {\n\t\t\t\theader(\"location:\".$_SESSION['baseurl'].\"connexion.php\");\n\t\t\t}\n\t\t\t$query ='SELECT * FROM JETON WHERE id_user= :id_user AND jeton= :jeton';\n\t\t\t$prep= $db -> prepare($query);\n\t\t\t$prep -> bindValue('id_user', $_SESSION['id_user'], PDO::PARAM_INT);\n\t\t\t$prep -> bindValue('jeton', $_SESSION['jeton'], PDO::PARAM_INT);\n\t\t\t$prep -> execute();\n\t\t\tif($prep -> rowCount() !== 1) {\n\t\t\t\theader(\"location:\".$_SESSION['baseurl'].\"deconnexion.php\");\n\t\t\t}\n\t\t\t/*else {\n\t\t\t\tif(Membre::info($id, 'activation') === '5') {\n\t\t\t\t\tredirection(URLSITE.'/banni.php');\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}*/\n\t\t\t$prep->closeCursor();\n\t\t\t$prep = NULL;\n\n\t\t}\n\t}", "title": "" }, { "docid": "42ef8f49227cfff364c255e378b9f445", "score": "0.63327605", "text": "function infosUti() {\r\n\t\t$row=SelectMultiple(\"if_utilisateur\",\"numuti\",$this->numuti);\r\n\t\t$this->iduti=$row[\"iduti\"];\t\r\n\t\t$this->nom=$row[\"nom\"];\t\r\n\t\t$this->prenom=$row[\"prenom\"];\t\r\n\t\t$this->login=$row[\"login\"];\r\n\t\t$this->pwd=easy($row[\"pwd\"],\"d\");\r\n\t\t$this->admin=$row[\"admin\"];\r\n\t\t$this->actif=$row[\"actif\"];\r\n }", "title": "" }, { "docid": "bdffd105dd325b5804a1d6a4e786096a", "score": "0.63309", "text": "public function userEdit_O(){\r\n \r\n if(! isset($_SESSION['loginok']) || ! isset($_GET['id'])){//Si no está iniciada la sesión o no se le pasa id muestra error\r\n\r\n include_once CTRL_PATH.'error404.php';\r\n }\r\n else if ($_SESSION['tipousuario'] != 'O' || $_SESSION['idusuario']!= $_GET['id']){//solo puede modificar si es operario \r\n // y si el id que llega es el suyo\r\n include_once CTRL_PATH.'error404.php';\r\n }\r\n else{\r\n\r\n $correcto = true;\r\n $errores = array();\r\n\r\n if(!$this->model->ExisteUsuarioByID($_GET['id'])){\r\n include_once CTRL_PATH.'error404.php';\r\n }\r\n else{\r\n if(! isset($_POST['modificarusuario'])){\r\n $this->controller->Verfuera('Edita Operario',\r\n CargaVista('userEdit_O', array( )));\r\n }\r\n else{\r\n \r\n $as=EscribeCampoUsuario($_GET['id'], 'clave');\r\n echo $as;\r\n\r\n if($_POST['clave'] != EscribeCampoUsuario($_GET['id'], 'clave')){ //CLAVE INTRODUCIDA CORRECTA\r\n echo 'Entra en clave incorrecta.................';\r\n $correcto = FALSE;\r\n $errores['claveincorrecta'] = TRUE;\r\n }\r\n else if($_POST['clavenueva'] != $_POST['clavenuevarep']){ //CLAVES NUEVAS IGUALES\r\n $errores['clavesdistintas'] = TRUE;\r\n $correcto = FALSE;\r\n }\r\n else if($this->model->ExisteNuevoNombreUsuario($_POST['usuario'], $_GET['id'])){//Comprobar que el nuevo nombre no sea uno de los usuarios ya guardados\r\n $errores['existenuevonombre'] = TRUE;\r\n $correcto = FALSE;\r\n }\r\n\r\n if(!$correcto){\r\n \r\n $this->controller->Verfuera('Edita Operario',\r\n CargaVista('userEdit_O', array('errores'=>$errores )));\r\n }\r\n else {\r\n $_SESSION['usuario'] = $_POST['usuario'];\r\n\r\n if(empty($_POST['clavenueva']) && empty($_POST['clavenuevarep']))//Si estan vacias las dos claves, solo se modificar el nombre de usuario\r\n $this->model->ModificaUsuarioEnBD(array('usuario'=>$_POST['usuario']), $_GET['id']);\r\n else\r\n $this->model->ModificaUsuarioEnBD(array('usuario' => $_POST['usuario'], 'clave' => $_POST['clavenueva']), $_GET['id']);\r\n\r\n header('Location: index.php');\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n }", "title": "" }, { "docid": "95b6f787ed17b92b4f7100f820cd143c", "score": "0.6325781", "text": "public function modificationProfil($nomUtilisateur, $motDePasse){\n $utilisateur = \\justjob\\model\\Utilisateur::where('nom','=',$_SESSION['profile']['username'])->first();\n if(!is_null($nomUtilisateur)){\n $utilisateur->nom = $nomUtilisateur;\n }\n\n if(!is_null($motDePasse)){\n $newMotDePasse = password_hash($motDePasse, PASSWORD_DEFAULT);\n $utilisateur->pass = $newMotDePasse;\n }\n $utilisateur->save();\n session_destroy();\n }", "title": "" }, { "docid": "0aa759509491f7d42f884d9ee3bd19d0", "score": "0.63224137", "text": "public function editarPerfil($id, $nombre, $apellidos,$email,$Password,$rol){\n\t\t\t\t\n\t\t\t\tif(Session::get('level')==1){/**Si eres admin pasas todos los campos que nos pasan de la vista del editar del perfil*/\n\t\t\t\t\n\t\t\t\t\t$id = (int) $id;\n\t\t\t\t\t//$user = Session::get('id_usuario');\t\n\t\t\t\t\t//$id = $user;\n\t\t\t\t\t$this->_db->prepare(\"UPDATE usuarios SET Nombre = :nombre, Apellidos = :apellidos, email = :email, Password = :password, Rol = :rol WHERE id_user = :id\")\n\t\t\t\t\t\t\t->execute(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t ':id' => $id,\n\t\t\t\t\t\t\t\t\t ':nombre' => $nombre,\n\t\t\t\t\t\t\t\t\t ':apellidos' => $apellidos,\n\t\t\t\t\t\t\t\t\t ':email'=>$email,\n\t\t\t\t\t\t\t\t\t ':password'=>$Password,\n\t\t\t\t\t\t\t\t\t ':rol' =>$rol\n\t\t\t\t\t\t\t\t\t));\n\t\t\t\t}else{/**Si eres usuario normal pasas todos los campos excepto el de rol que estara precargado con el valor 2 de usuario normal*/\n\t\t\t\t\t\n\t\t\t\t\t$id = (int) $id;\n\t\t\t\t\t$rol = Session::get('level');\t\n\t\t\t\t\t//$id = $user;\n\t\t\t\t\t$this->_db->prepare(\"UPDATE usuarios SET Nombre = :nombre, Apellidos = :apellidos, email = :email, Password = :password, Rol = :rol WHERE id_user = :id\")\n\t\t\t\t\t\t\t->execute(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t ':id' => $id,\n\t\t\t\t\t\t\t\t\t ':nombre' => $nombre,\n\t\t\t\t\t\t\t\t\t ':apellidos' => $apellidos,\n\t\t\t\t\t\t\t\t\t ':email'=>$email,\n\t\t\t\t\t\t\t\t\t ':password'=>$Password,\n\t\t\t\t\t\t\t\t\t ':rol' =>$rol\n\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "102f002512a8316dffee0d44ee71c301", "score": "0.62983346", "text": "public function executeUserinfo() {\r\n\r\n\r\n //$plantilla = Doctrine_Core::getTable('user')->find(array($this->getUser()->getAttribute(\"userid\")));\r\n\r\n\r\n $user = Doctrine_Core::getTable('user')->find(array($this->getUser()->getAttribute(\"userid\")));\r\n\r\n //$data[] = array(false, \"Scan de documento\");\r\n $data[] = array(($user->getDriverLicenseFile() != null), \"Scan de licencia\");\r\n //$data[] = array(($user->getRutFile() != null), \"Scan de Foto de Rut\");\r\n $data[] = array(($user->getConfirmed()), \"Email confirmado\");\r\n $data[] = array(($user->getConfirmedFb()), \"Facebook confirmado\");\r\n $data[] = array(($user->getConfirmedSms()), \"Telefono confirmado\");\r\n $data[] = array(($user->getFriendInvite()), \"Invita a tus amigos\");\r\n\r\n //$data[] = array( false , \"Identidad verificada\");\r\n // $data[] = array(($user->getPaypalId() != null), \"Medios de pagos\");\r\n\r\n $this->userdata = $data;\r\n $this->user = $user;\r\n }", "title": "" }, { "docid": "f8e93d96159d85f81798bba64de914c2", "score": "0.6282997", "text": "function asignarPermisoUsuario($id, $permiso){\n $sentencia = $this->db->prepare(\"UPDATE usuario SET superAdmin=? WHERE id_usuario=?\");\n $sentencia->execute([$permiso, $id]);\n }", "title": "" }, { "docid": "9e9d19130d1b588b549883907a27fd95", "score": "0.62813395", "text": "function activerUti() {\r\n \tmysql_query(\"UPDATE if_utilisateur SET actif='$this->actif' WHERE numuti='$this->numuti'\");\t\r\n }", "title": "" }, { "docid": "ed26faec6a52da601be0d32cb57d7db4", "score": "0.6275977", "text": "function EDIT()\r\n{\r\n\tif($this->Validar_atributos()===true){\r\n\t\t$compEmail=$this->getByEmail();\r\n\r\n\t\tif(isset($compEmail['code']) || $compEmail['login']==$this->login){\r\n\t\t\t//comprobamos que el email no está siendo usado por otro usuario\r\n\t\t\r\n\t\t\t$this->query = \"UPDATE USUARIOS\r\n\t\t\t\t\tSET \r\n\t\t\t\t\t\tpassword = '$this->password',\r\n\t\t\t\t\t\tnombre = '$this->nombre',\r\n\t\t\t\t\t\tapellidos = '$this->apellidos',\r\n\t\t\t\t\t\temail = '$this->email',\r\n\t\t\t\t\t\tid_rol= '$this->id_rol'\r\n\t\t\t\t\tWHERE (\r\n\t\t\t\t\t\tlogin = '$this->login'\r\n\t\t\t\t\t)\r\n\t\t\t\t\t\";\r\n\t\t\t$this->execute_single_query();\r\n\r\n\t\t\tif ($this->feedback['code']==='00001')\r\n\t\t\t{\r\n\t\t\t\t$this->ok=true;\r\n\t\t\t\t$this->resource='EDIT';\r\n\t\t\t\t$this->code = '000054';\r\n\t\t\t\t$this->construct_response(); //modificacion en bd correcta\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\t$this->ok=false;\r\n\t\t\t\t$this->resource='EDIT';\r\n\t\t\t\t$this->code = '000074'; //error al modificar el usuario en la bd\r\n\t\t\t\t$this->construct_response();\r\n\t\t\t}\r\n\r\n\t\t\treturn $this->feedback;\r\n\t\t}else{\r\n\t\t\t$this->ok=false;\r\n\t\t\t\t$this->resource='EDIT';\r\n\t\t\t\t$this->code = '000076';\r\n\t\t\t\t$this->construct_response(); //ya existe un usuario con ese email\r\n\t\t\t\treturn $this->feedback;\r\n\t\t}\r\n\t\t\r\n\t}else{\r\n\t\treturn $this->erroresdatos;\r\n\t}\r\n}", "title": "" }, { "docid": "98d76ca84eab0daa958b6ba44809f500", "score": "0.6257865", "text": "private function EditUserStep2()\n\t\t{\n\t\t\t$userId = $_POST['userId'];\n\t\t\t$arrData = array();\n\t\t\t$arrPerms = array();\n\t\t\t$err = \"\";\n\t\t\t$arrUserData = array();\n\n\t\t\t$this->_GetUserData($userId, $arrUserData);\n\n\t\t\t// Does this user have permission to edit this user?\n\t\t\tif($GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId() && $arrUserData['uservendorid'] != $GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId()) {\n\t\t\t\tFlashMessage(GetLang('Unauthorized'), MSG_ERROR, 'index.php?ToDo=viewUsers');\n\t\t\t}\n\n\t\t\t$this->_GetUserData(0, $arrData);\n\t\t\tif($arrUserData['pk_userid'] == 1 || $arrUserData['username'] == \"admin\") {\n\t\t\t\t$arrData['username'] = \"admin\";\n\t\t\t}\n\n\t\t\t$this->_GetPermissionData(0, $arrPerms);\n\n\t\t\t// Commit the values to the database\n\t\t\tif($this->_CommitUser($userId, $arrData, $arrPerms, $err)) {\n\t\t\t\t// Log this action\n\t\t\t\tif(!isset($arrData['username'])) {\n\t\t\t\t\t$arrData['username'] = 'admin';\n\t\t\t\t}\n\n\t\t\t\t$GLOBALS['ISC_CLASS_LOG']->LogAdminAction($userId, $arrData['username']);\n\n\t\t\t\tif($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Users)) {\n\t\t\t\t\t$this->ManageUsers(GetLang('UserUpdatedSuccessfully'), MSG_SUCCESS);\n\t\t\t\t} else {\n\t\t\t\t\t$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('UserUpdatedSuccessfully'), MSG_SUCCESS);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Users)) {\n\t\t\t\t\t$this->ManageUsers(sprintf(GetLang('ErrUserNotUpdated'), $err), MSG_ERROR);\n\t\t\t\t} else {\n\t\t\t\t\t$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(sprintf(GetLang('ErrUserNotUpdated'), $err), MSG_ERROR);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4c6caf343a1668aef2d6302d4aff8815", "score": "0.6251379", "text": "public function profilAction() {\n $user = $this->container->get('security.context')->getToken()->getUser();\n\n if (is_object($user) && $user->getFirstLog()) {\n return $this->redirectToRoute('utilisateur_profil-updatepassword');\n }\n\n\n $utilisateur = $this->container->get('security.context')->getToken()->getUser();\n $erreurs = array();\n $erreurs['username'] = 1;\n $erreurs['email'] = 1;\n $erreurs['password'] = 1;\n return $this->render('UtilisateursBundle:utilisateurs:profil.html.twig', array(\n 'utilisateur' => $utilisateur, 'erreurs' => $erreurs\n ));\n }", "title": "" }, { "docid": "f92e53147952435fabf8c6836dc49d08", "score": "0.6250574", "text": "function displayModifyMyAccount($userId = null, $error=null, $fillingError=null)\n{\n if ($userId) {\n $userDataToModify = getUserById($userId);\n } else {\n $userDataToModify = getUserById($_SESSION['id']);\n }\n if ($userDataToModify) {\n require_once('view/frontEndUserConnected/v_myAccountModificationForm.php');\n } else {\n $error = \"Erreur!\";\n require_once('view/frontEnd/v_error.php');\n }\n}", "title": "" }, { "docid": "55fe51e1f2a80ac77225eb12d214aa8c", "score": "0.62465024", "text": "private function EditUserStep1()\n\t\t{\n\t\t\t$userId = (int)$_GET['userId'];\n\t\t\t$arrData = array();\n\t\t\t$arrPerms = array();\n\n\t\t\tif(UserExists($userId)) {\n\t\t\t\t$this->_GetUserData($userId, $arrData);\n\t\t\t\t$this->_GetPermissionData($userId, $arrPerms);\n\n\t\t\t\t// Does this user have permission to edit this user?\n\t\t\t\tif($GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId() && $arrData['uservendorid'] != $GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId()) {\n\t\t\t\t\tFlashMessage(GetLang('Unauthorized'), MSG_ERROR, 'index.php?ToDo=viewUsers');\n\t\t\t\t}\n\n\t\t\t\t$GLOBALS['Username'] = isc_html_escape($arrData['username']);\n\t\t\t\t$GLOBALS['UserEmail'] = isc_html_escape($arrData['useremail']);\n\t\t\t\t$GLOBALS['UserFirstName'] = isc_html_escape($arrData['userfirstname']);\n\t\t\t\t$GLOBALS['UserLastName'] = isc_html_escape($arrData['userlastname']);\n\n\t\t\t\t$GLOBALS['XMLPath'] = sprintf(\"%s/xml.php\", $GLOBALS['ShopPath']);\n\t\t\t\t$GLOBALS['XMLToken'] = isc_html_escape($arrData['usertoken']);\n\n\t\t\t\tif(!gzte11(ISC_HUGEPRINT)) {\n\t\t\t\t\t$GLOBALS['HideVendorOptions'] = 'display: none';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif($GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId()) {\n\t\t\t\t\t\t$vendorDetails = $GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendor();\n\t\t\t\t\t\t$GLOBALS['HideVendorSelect'] = 'display: none';\n\t\t\t\t\t\t$GLOBALS['Vendor'] = $vendorDetails['vendorname'];\n\t\t\t\t\t\t$GLOBALS['HideAdminoptions'] = 'display: none';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$GLOBALS['VendorList'] = $this->GetVendorList($arrData['uservendorid']);\n\t\t\t\t\t\t$GLOBALS['HideVendorLabel'] = 'display: none';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif($arrData['userapi'] == \"1\") {\n\t\t\t\t\t$GLOBALS['IsXMLAPI'] = 'checked=\"checked\"';\n\t\t\t\t}\n\n\t\t\t\tif($arrData['userstatus'] == 0) {\n\t\t\t\t\t$GLOBALS['Active0'] = 'selected=\"selected\"';\n\t\t\t\t} else {\n\t\t\t\t\t$GLOBALS['Active1'] = 'selected=\"selected\"';\n\t\t\t\t}\n\n\t\t\t\t// Setup the permission check boxes\n\t\t\t\tforeach($arrPerms as $k=>$v) {\n\t\t\t\t\t$GLOBALS[\"Selected_\" . $v] = \"selected='selected'\";\n\t\t\t\t}\n\n\t\t\t\tif($arrData['userrole'] && $arrData['userrole'] != 'custom') {\n\t\t\t\t\t$GLOBALS['HidePermissionSelects'] = 'display: none';\n\t\t\t\t}\n\n\t\t\t\t// If the user is the super admin we need to disable some fields\n\t\t\t\tif($userId == 1 || $arrData['username'] == \"admin\") {\n\t\t\t\t\t$GLOBALS['DisableUser'] = \"DISABLED\";\n\t\t\t\t\t$GLOBALS['DisableStatus'] = \"DISABLED\";\n\t\t\t\t\t$GLOBALS['DisableUserType'] = \"DISABLED\";\n\t\t\t\t\t$GLOBALS['DisablePermissions'] = \"DISABLED\";\n\t\t\t\t\t$GLOBALS['HideVendorOptions'] = 'display: none';\n\t\t\t\t}\n\n\t\t\t\t$GLOBALS['UserRoleOptions'] = $this->GetUserRoleOptions($arrData['userrole'], $arrData['uservendorid']);\n\n\t\t\t\t$GLOBALS['UserId'] = (int) $userId;\n\t\t\t\t$GLOBALS['FormAction'] = \"editUser2\";\n\t\t\t\t$GLOBALS['Title'] = GetLang('EditUser1');\n\t\t\t\t$GLOBALS['PassReq'] = \"&nbsp;&nbsp;\";\n\n\t\t\t\t/* Added below condition for applying store credit permission - vikas */\n\t\t\t\t$loggeduser = $GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetUser();\n\t\t\t\t\n\t\t\t\tif((int)$arrData['userstorecreditperm'] == 0) {\n\t\t\t\t\t$GLOBALS['StoreCreditActive0'] = 'selected=\"selected\"';\n\t\t\t\t} else {\n\t\t\t\t\t$GLOBALS['StoreCreditActive1'] = 'selected=\"selected\"';\n\t\t\t\t}\n\n\t\t\t\tif( $userId == 1 || $loggeduser['pk_userid'] != 1 )\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['StoreCreditDisable'] = \" disabled=\\\"\\\" \";\n\t\t\t\t}\n\n\t\t\t\t$GLOBALS['StoreCreditPermission'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"StoreCreditPerm\");\n\n\t\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"user.form\");\n\t\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// The news post doesn't exist\n\t\t\t\tif($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Users)) {\n\t\t\t\t\t$this->ManageUsers(GetLang('UserDoesntExist'), MSG_ERROR);\n\t\t\t\t} else {\n\t\t\t\t\t$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "1cb30525d4d876272795628221d791cf", "score": "0.6246028", "text": "public static function changeToUser() {\r\n\t\tself::$username = NORMAL_USER;\r\n\t\tself::$password = NORMAL_PASS;\r\n\t\tself::$dbConn = NULL;\r\n\t}", "title": "" }, { "docid": "3a3459eb432becca69dbbde06e364467", "score": "0.6244737", "text": "public function editAction()\n {\n Tools\\Helper::checkUrlParamsIsNumeric(); //kiểm tra parameter có phải là số hay ko(edit theo id)\n Tools\\Helper::checkRoleAdmin();\n $id = $_GET['params']; //lấy số id user người dùng đã bấm\n global $connection;\n $co = $connection->getCo();\n $userModel = new \\Administration\\Models\\User($co);\n $roleModel = new \\Administration\\Models\\Role($co);\n $profileModel = new \\Administration\\Models\\Profile($co);\n //Hiển thị ra form để edit\n $formUser = $userModel->findById($id);\n $formProfile = $profileModel->getByUserId($id);\n $role = $roleModel->fetchAll();\n $right = Tools\\Helper::checkRoleAdmin();\n if ($_POST) {\n $usernameResult = $userModel->getUserByUsername($_POST['username']);\n $emailResult = $profileModel->getUserByMail($_POST['email']);\n if (!empty($usernameResult) && $_POST['username'] != $formUser[0]->username) {\n $alert = Tools\\Alert::render('Tên tài khoản này đã tồn tại. Vui lòng nhập lại!', 'danger');\n } elseif (!empty($emailResult) && $_POST['email'] != (isset($formProfile[0]->email) ? $formProfile[0]->email : false)) {\n $alert = Tools\\Alert::render('Tên email này đã tồn tại. Vui lòng nhập lại!', 'danger');\n } else {\n if (!$right) {\n $_POST['role'] = $formUser[0]->id_role;\n }\n if (!empty($_POST['password'])) {\n $userModel->update(array('password' => $userModel->blowfishHasher($_POST['password'])), ' id = ' . $id);\n }\n if ($userModel->modifyUser($_POST, $id)) {\n $image = $_FILES['image'];\n if (!empty($image)) {\n $upload = new \\Library\\Tools\\Upload();\n $name = $upload->copy(array(\n 'file' => $image,\n 'path' => 'avatar/', //name your optional folder if needed\n 'name' => time() . '-' . $_POST['username'] // name your file name if needed\n ));\n $_POST['avatar'] = (isset($name) && !empty($_FILES['image'])) ? $name : (isset($formProfile[0]->avatar) ? $formProfile[0]->avatar : 'updatelater.jpg');\n }\n if (!empty($_POST['avatar'])) {\n $_SESSION['User']['avatar'] = $_POST['avatar'];\n }\n if (!empty($formProfile) && $profileModel->modifyProfile($_POST, $id)) {\n $alert = Tools\\Alert::render('Tài khoản ' . $_POST['username'] . ' đã được chỉnh sửa thành công! ', 'success');\n header(\"Refresh:3; url=/admin/user/list\", true, 303);\n } elseif (empty($formProfile) && $profileModel->insertProfile($_POST, $id)) {\n $alert = Tools\\Alert::render('Tài khoản ' . $_POST['username'] . ' đã được chỉnh sửa thành công! ', 'success');\n header(\"Refresh:3; url=/admin/user/list\", true, 303);\n } elseif ($upload->getErrors()) {\n $alert = \\Library\\Tools\\Alert::render($upload->getErrors()[0], 'warning');\n } else {\n $alert = Tools\\Alert::render('Tài khoản ' . $_POST['username'] . ' đã thay đổi, tuy nhiên thông tin cá nhân cần được cập nhật! ', 'warning');\n }\n } else {\n $alert = Tools\\Alert::render('Xảy ra lỗi, vui lòng thử lại! ', 'danger');\n }\n }\n } else {\n// $alert = Tools\\Alert::render('Vui lòng nhập đầy đủ thông tin theo yêu cầu! ', 'danger');\n }\n\n //truyền dữ liệu vào view\n $this->addDataView(array(\n 'viewTitle' => 'Thành viên',\n 'viewSiteName' => 'Chỉnh sửa',\n 'role' => $role,\n 'formUser' => !empty($formUser) ? $formUser[0] : '',\n 'formProfile' => !empty($formProfile) ? $formProfile[0] : '',\n 'alert' => (!empty($alert) ? $alert : ''),\n 'right' => $right\n ));\n }", "title": "" }, { "docid": "5436ba84f2f8cd50ce7e9fb9cb93d3f5", "score": "0.6240613", "text": "public function edit($fields,$update){\n\t\tif($this->user->updateUser($fields)){\n\t\t\t$this->edtOrUpdt($update,$fields['id']);\n\t\t}\n\t\t$dados = array('msg' => 'Erro ao editar os dados do usuário', 'type' => parent::$error);\n\t\t$_SESSION['data'] = $dados;\n\t\theader('location: ../view/update_user.php?id='.$fields['id']);\n\t\texit;\n\t}", "title": "" }, { "docid": "84315e20ade9ea0b42cf66d62226406c", "score": "0.6237894", "text": "function updateUser()\n{\n $user = getUser($_POST['idUser']);\n if (!$user) redirect(\"/\");\n $user[\"firstname\"] = ucfirst($_POST[\"fname\"]);\n $user[\"lastname\"] = ucfirst($_POST[\"lname\"]);\n $user[\"initials\"] = strtoupper($_POST[\"initials\"]);\n $user[\"status\"] = $_POST[\"status\"];\n if (saveUser($user)) {\n setFlashMessage(\"L'utilisateur a été enregistré\");\n } else {\n setFlashMessage(\"L'utilisateur n'a pas pu être enregistré. Ces initiales sont probablement déjà utilisées\");\n }\n redirect(\"adminCrew\");\n}", "title": "" }, { "docid": "53a8daa568cfb98a7416fdcfb48e32af", "score": "0.62372154", "text": "private function usrSaveAlta(){\n\t\tif($this->revisaDatos()){\n\t\t\tif($this->modUser->altaUser(isset($_POST['idUpdate']))){\n\t\t\t\t$this->users();\n\t\t\t\t$this->enviaCorreo();\n\t\t\t}\n\t\t\telse\n\t\t\t\tdie('Error al Guardar el User');\n\t\t}\t\n\t}", "title": "" }, { "docid": "670e927c869fd4bfb7640864981f39b6", "score": "0.6227588", "text": "function canModifyUser()\n {\n // because otherwise the new status adding functionality wouldn't work\n return\n $this->isic_common->canModifyUser($this->userData) ||\n $this->user_type == $this->isic_common->user_type_admin;\n }", "title": "" }, { "docid": "522d4aa4585ea6cfdfc9a72c4d02eae1", "score": "0.62163633", "text": "Public function utilisateur ( $id_util, $nom_util, $prenom_util, $tel_util, $email_util, $rue_util, $ville_util, $cp_util, $photo_util, $login_util, $mdp_util, $etat_util, $fil_util)\r\n\t\t\t{\r\n\t\t\t\t$this -> id_utilisateur = $id_util;\r\n\t\t\t\t$this -> nom_utilisateur = $nom_util;\r\n\t\t\t\t$this -> prenom_utilisateur = $prenom_util;\r\n\t\t\t\t$this -> tel_utilisateur = $tel_util;\r\n\t\t\t\t$this -> email_utilisateur = $email_util;\r\n\t\t\t\t$this -> rue_utilisateur = $rue_util;\r\n\t\t\t\t$this -> ville_utilisateur = $ville_util;\r\n\t\t\t\t$this -> cp_utilisateur = $cp_util;\r\n\t\t\t\t$this -> photo_utilisateur = $photo_util;\r\n\t\t\t\t$this -> login_utilisateur = $login_util;\r\n\t\t\t\t$this -> mdp_utilisateur = $mdp_util;\r\n\t\t\t\t$this -> etat_utilisateur = $etat_util;\r\n\t\t\t\t$this -> filiere_utilisateur = $fil_util;\r\n\t\t\t}", "title": "" }, { "docid": "c7611668ab6e4187752a2bb80d75ddac", "score": "0.62162584", "text": "public function editAction() {\n $userId = $this->getRequest()->getParam('id');\n /* Edit by Dante - Trinh Huy Hoang - 28/08/2015 */\n $modelCollection = Mage::getModel('webpos/user')->getCollection()\n ->addFilterToMap('user_id', 'main_table.user_id')\n ->addFieldToFilter('user_id', array('eq' => $userId));\n if (Mage::helper('webpos')->isInventoryWebPOS11Active()) {\n $modelCollection->getSelect()\n ->joinLeft(array('webpos_user_warehouse' => $modelCollection->getTable('inventorywebpos/webposuser')), \"main_table.user_id = webpos_user_warehouse.user_id\", array('warehouse_id'))->group('main_table.user_id');\n }\n\n $model = $modelCollection->getFirstItem();\n /* End edit by Dante */\n if ($model->getId() || $userId == 0) {\n $data = Mage::getSingleton('adminhtml/session')->getUserData(true);\n if (!empty($data)) {\n $model->setData($data);\n }\n Mage::register('user_data', $model);\n\n $this->loadLayout();\n $this->_setActiveMenu('webpos/posuser');\n\n $this->_addBreadcrumb(\n Mage::helper('adminhtml')->__('POS User Manager'), Mage::helper('adminhtml')->__('POS User Manager')\n );\n $this->_addBreadcrumb(\n Mage::helper('adminhtml')->__('POS User News'), Mage::helper('adminhtml')->__('POS User News')\n );\n\n $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);\n $this->_addContent($this->getLayout()->createBlock('webpos/adminhtml_user_edit'))\n ->_addLeft($this->getLayout()->createBlock('webpos/adminhtml_user_edit_tabs'));\n\n $this->renderLayout();\n } else {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('webpos')->__('Item does not exist')\n );\n $this->_redirect('*/*/');\n }\n }", "title": "" }, { "docid": "62294e32660b858a117eb91e81d7e325", "score": "0.62098604", "text": "function alterar($id_usuario, $ativo, $data_cadastro, $email, $login, $nome_usuario, $senha, $papeis, $dbhw) {\n\t$convUTF = $_SESSION[\"convUTF\"];\n\t$esquemaadmin = $_SESSION[\"esquemaadmin\"];\n\tif ($convUTF != true) {\n\t\t$nome_usuario = utf8_decode ( $nome_usuario );\n\t}\n\t$dataCol = array (\n\t\t\t\"nome_usuario\" => $nome_usuario,\n\t\t\t\"login\" => $login,\n\t\t\t\"email\" => $email,\n\t\t\t\"ativo\" => $ativo\n\t);\n\t// se a senha foi enviada, ela sera trocada\n\tif ($senha != \"\") {\n\t\tif(!function_exists(\"password_hash\")){\n\t\t\t$dataCol [\"senha\"] = md5 ( $senha );\n\t\t} else {\n\t\t\t$dataCol[\"senha\"] = password_hash($senha, PASSWORD_DEFAULT);\n\t\t}\n\t}\n\t$resultado = \\admin\\php\\funcoesAdmin\\i3GeoAdminUpdate ( $dbhw, \"i3geousr_usuarios\", $dataCol, \"WHERE id_usuario = $id_usuario\" );\n\tif ($resultado === false) {\n\t\treturn false;\n\t}\n\t// apaga todos os papeis\n\t$resultado = \\admin\\usuarios\\cadastro\\excluirPapeis ( $id_usuario, $dbhw );\n\tif ($resultado === false) {\n\t\treturn false;\n\t}\n\tif (! empty ( $papeis )) {\n\t\t// atualiza papeis vinculados\n\t\tforeach ( $papeis as $p ) {\n\t\t\t$resultado = \\admin\\usuarios\\cadastro\\adicionaPapel ( $id_usuario, $p, $dbhw );\n\t\t\tif ($resultado === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn $id_usuario;\n}", "title": "" }, { "docid": "7f28fa6a416de996a5f947992e2e1e7c", "score": "0.62008435", "text": "function personas_usuario_seguimiento(){\n\t\tif ($_SESSION[\"equivida\"][\"rol\"]==\"seguimiento\" && $_SESSION[\"equivida\"][\"permiso_personas\"]!=1)\n header('Location: ?page=administrador&action=mensaje_usuario_seguimiento'); \n \n\t\t$user=new User();\n\t\t//$this->tpl->users=$user->get_usuarios(\"1\");\n\t\t//$this->tpl->display('html/administrador/usuarios/personas.tpl.php');\n switch($_GET[\"format\"]){\n\t\t\t\tcase \"excel\":\n $this->tpl->users=$user->get_usuarios_excel(\"1\");\n\t\t\t\t\t$this->tpl->display('html/administrador/vistas_usuarios_seguimiento/usuarios/excel/todos.tpl.php');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n $this->tpl->users=$user->get_usuarios(\"1\"); \n\t\t\t\t\t$this->tpl->display('html/administrador/vistas_usuarios_seguimiento/usuarios/personas.tpl.php');\n break;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "8036b92cf3ccd02c446f66ca6b4e1142", "score": "0.6184946", "text": "public function update($id)\n {\n self::$user = $this->membresManager->selectUser($id);\n require ('views/editProfilView.php');\n \n if(isset($_POST['newPseudo']) AND !empty($_POST['newPseudo']) AND $_POST['newPseudo'] != self::$user['pseudo'])\n { \n $pseudo = $this->membresManager->newPseudo($id, $newPseudo);\n require ('views/editProfilView.php');\n }\n if(isset($_POST['newMail']) AND !empty($_POST['newMail']) AND $_POST['newMail'] != self::$user['Mail'])\n { \n $mail = $this->membresManager->newMail($id, $newMail);\n require ('views/editProfilView.php');\n }\n \n if(isset($_POST['newPassword']) AND !empty($_POST['newPassword']) AND isset($_POST['newPasswordConf']) AND !empty($_POST['newPasswordConf']))\n {\n $password = sha1($_POST['newPassword']);\n $passwordconf = sha1($_POST['newPasswordConf']);\n if($password == $passwordconf)\n {\n $password = $this->membresManager->newPassword($id, $_POST['newPassword']);\n require ('views/editProfilView.php');\n }\n else\n {\n array_push(self::$erreurs, 'Vos 2 mots de passe sont différents');\n }\n \n }\n \n }", "title": "" }, { "docid": "8eca9a052f501f5ca05e52ffa64e30b0", "score": "0.6181481", "text": "public function modificarDatosUsuario($id, $username, $email, $poblacion, $idioma, $telefono, $url, $foto, $textoPresentacion) {\n $bitacleDB = new BitacleDB();\n $bitacleDB->modificarDatosUsuario($id, $username, $email, $poblacion, $idioma, $telefono, $url, $foto, $textoPresentacion);\n }", "title": "" }, { "docid": "9474869dfb379d924dc5071d43a36a2d", "score": "0.61785704", "text": "public function edit($id)\n {\n if (in_array(Auth::user()->UsRol, Permisos::CLIENTE)) {\n\n\t\t\t$IDClienteSegunUsuario = userController::IDClienteSegunUsuario();\n\t /*registro de persona habilitada para administracion de usuarios del cliente*/\n\t\t\t$IdPersonaAdmin = DB::table('personals')\n\t\t\t\t->join('cargos', 'FK_PersCargo', '=', 'ID_Carg')\n\t\t\t\t->join('areas', 'cargos.CargArea', '=', 'areas.ID_Area')\n\t\t\t\t->join('sedes', 'areas.FK_AreaSede', '=', 'sedes.ID_Sede')\n\t\t\t\t->join('clientes', 'sedes.FK_SedeCli', '=', 'clientes.ID_Cli')\n\t\t\t\t->select('personals.ID_Pers')\n\t\t\t\t->where('PersAdmin', 1)\n\t\t\t\t->where('ID_Cli', $IDClienteSegunUsuario)\n\t\t\t\t->get();\n\t\t\tif ($IdPersonaAdmin[0]->ID_Pers != Auth::user()->FK_UserPers) {\n\t\t\t\tabort(403, 'solo el administrador puede usar el control de usuarios en el sistema');\n\t\t\t}\n\n\t\t\t/*se continua con el proceso si es el admisnitrador*/\n $User = User::where('UsSlug', $id)->first();\n if (!$User) {\n abort(404, 'el usuario que trata de editar ya no existe en la base de datos');\n }\n $Personal = Personal::select('PersFirstName', 'PersLastName', 'PersSlug', 'ID_Pers')->where('ID_Pers', $User->FK_UserPers)->first();\n \n // Sede del usuario\n $SedeSlug = userController::IDSedeSegunUsuario();\n $Sede = Sede::select('ID_Sede')->where('SedeSlug', $SedeSlug)->first();\n \n // Usuarios que tienen personal\n $Users = DB::table('users')\n ->join('personals', 'personals.ID_Pers', '=', 'users.FK_UserPers')\n ->join('cargos', 'personals.FK_PersCargo', '=', 'cargos.ID_Carg')\n ->join('areas', 'cargos.CargArea', '=', 'areas.ID_Area')\n ->join('sedes', 'areas.FK_AreaSede', '=', 'sedes.ID_Sede')\n\t\t\t\t->join('clientes', 'sedes.FK_SedeCli', '=', 'clientes.ID_Cli')\n\t\t\t\t->where('clientes.ID_Cli', $IDClienteSegunUsuario)\n ->where('DeleteUser', 0)\n ->select('users.FK_UserPers')\n ->get();\n\n // personal de una sede en concreto\n $Personals = DB::table('personals')\n ->join('cargos', 'personals.FK_PersCargo', '=', 'cargos.ID_Carg')\n ->join('areas', 'cargos.CargArea', '=', 'areas.ID_Area')\n ->join('sedes', 'areas.FK_AreaSede', '=', 'sedes.ID_Sede')\n\t\t\t->join('clientes', 'sedes.FK_SedeCli', '=', 'clientes.ID_Cli')\n\t\t\t->where('clientes.ID_Cli', $IDClienteSegunUsuario)\n ->where(function ($query) use($Users, $User){\n foreach($Users as $User){\n $query->where('personals.ID_Pers', '<>', $User->FK_UserPers);\n }\n })\n ->select('personals.PersFirstName', 'personals.PersLastName', 'personals.PersSlug', 'personals.ID_Pers')\n ->get();\n \n $Roles = DB::table('rols')\n ->where('rols.RolDelete', 0)\n ->where('rols.RolName', '<>', 'Programador')\n ->get();\n \n return view('usuariosexternos.edit', compact('User', 'Personals', 'Roles', 'Personal'));\n }else{\n abort(403, 'solo los clientes tienen acceso a la gestion de usuarios externos');\n }\n }", "title": "" }, { "docid": "511990c4d98729149c23e59ab984f002", "score": "0.6170233", "text": "function modifieridentite($iduser, $prenom, $pseudo, $email, $passwd) {\r\n// return true or error message\r\n\r\n // connect to db\r\n $conn = connectbase();\r\n\r\n // check if username is unique\r\n \r\n $result = $conn->query(\"update user set mail='\".$email.\"',prenom='\".$prenom.\"',pseudo='\".$pseudo.\"',passwd='\".sha1($passwd).\"' where iduser='\".$iduser.\"'\");\r\n \r\n if (!$result) {\r\n throw new Exception('impossible de modifier');\r\n }\r\n\r\n return true;\r\n}", "title": "" }, { "docid": "f082700ffbda4248553e3f9c611e077e", "score": "0.6164925", "text": "public function editUser($parameters) {\n\t\t$userInfo = $this->dbHandler->readData(['selectQuery' => 'SELECT username, GUID, creation_date FROM users WHERE id = :id', 'bindParam' => [':id' => $parameters[1]]]);\n\t\t/*Get all the status options so we can use it to update the user status.*/\n\t\t//$statusInfo = $this->dbhandler->readData(['selectQuery' => 'SELECT id, status FROM status']);\n\n\t\t$editForm = $this->HtmlGenerator->createUpdateForm($userInfo, 'dashboard/one');\n\t require('view/pages/dashboard/users/editUser.php');\n\n\t}", "title": "" }, { "docid": "3983b50b4cf0191eef312346976bd822", "score": "0.616022", "text": "function changeUser(){\n global $e, $t, $a, $pwd, $allSet;\n $db = new PDO('mysql:host='.DB_HOST.'; dbname='.DB_NAME, DB_USER, DB_PASSWORD);\n $hashword= hash('sha256', $pwd.SALT);\n $allSet= FALSE;\n //NEED TO update only logged in users contact information\n $query= '';\n if(strlen($pwd)==0){\n $query= \"UPDATE BikeshareUsers SET email=?, phone=?, affiliation=? WHERE email='\".$_SESSION['user'].\"';\"; \n }\n else{\n $query= \"UPDATE BikeshareUsers SET email=?, phone=?, affiliation=?, password=? WHERE email='\".$_SESSION['user'].\"';\";\n }\n \n \n $stmt= $db->prepare($query);\n $stmt->bindParam(1, $e);\n $stmt->bindParam(2, $t);\n $stmt->bindParam(3, $a);\n if(strlen($pwd)<>0){\n $stmt->bindParam(4, $hashword);\n }\n $stmt->execute();\n $result= $stmt->rowCount();\n load();\n \n //Set session variables\n if($result!=0){ \n generateEdits();\n \n }\n else{\n $err=$db->errorInfo();\n if($err[2]<>''){\n echo '<p>You have encountered an error. '.$err[2].'</p>';\n echo \"<script> $('#edit_user').modal({show:true});</script>\";\n generateEdits();\n }\n $allSet=FALSE;\n generateEdits();\n }\n \n \n }", "title": "" }, { "docid": "146c5fa61589ff604d94bd501870d6e4", "score": "0.61568356", "text": "function edit(usuario $usr){\n\n }", "title": "" }, { "docid": "5543d012b012e8a7e3ee109540cf35d5", "score": "0.61522853", "text": "public function editPerfil(){\n\t\t$this->set('menuActivo', 'inicio');\n\t}", "title": "" }, { "docid": "ad58c5553a219ea333ee00ceb9a8e625", "score": "0.6150487", "text": "private function usrMuere(){\n\t\tif(isset($_POST['usrID'])){\n\t\t\tif(preg_match('/^\\d+$/',$_POST['usrID'])!=0){\n\t\t\t\t$this->modUser->muereUser();\n\t\t\t\t$this->users();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9ce79eea10ba08b51e6a1504a522f70e", "score": "0.6150179", "text": "public function update()\r\n {\r\n \r\n $usuario = new Usuario($this->conexion);\r\n $usuario->setNombre($_POST[\"nombre\"]);\r\n $usuario->setApellido1($_POST[\"apellido1\"]);\r\n $usuario->setApellido2($_POST[\"apellido2\"]);\r\n $usuario->setEmail($_POST[\"email\"]);\r\n $usuario->setTelefono($_POST[\"telefono\"]);\r\n $usuario->setContrasena($_POST[\"contrasena\"]);\r\n $usuario->setId($_POST[\"id\"]);\r\n $nombreFoto=$usuario->foto();\r\n $usuario->setFoto($nombreFoto);\r\n if($usuario->updateUsuario()){\r\n $usuario = new Usuario($this->conexion);\r\n $reNew=$usuario->infoPorEmail($_POST[\"email\"]); \r\n $_SESSION[\"usuario\"]=$reNew;\r\n $lastId=\"\";\r\n foreach ($_SESSION[\"usuario\"] as $usu){$lastId = $usu[\"idUsuario\"];}\r\n }\r\n header('Location: index.php?controller=perfil&action=perfilUsuario&idUsuario='.$lastId);\r\n }", "title": "" }, { "docid": "7e2de8d35be570023e9a8159148a7d12", "score": "0.6148968", "text": "private function users(){\n\t\t$plantillaPrincipal=file_get_contents('views/principal.html');\n\t\t$plantillaPrincipal=str_replace('{Titulo}','Usuarios - Golden Eagle',$plantillaPrincipal);\n\t\t$contenido=file_get_contents('views/cont_users.html');\n\t\t$plantillaTabla=file_get_contents('views/cont_TablaUsers.html');\n\t\t\n\t\t$opciones=$this->modUser->obtieneUsuarios($plantillaTabla);\n $contenido=str_replace('{det_tabla}',$opciones,$contenido);\n\t\t\n\t\tif($this->getNivel()>5)\n\t\t\t$contenido=str_replace('{selAdm}',\"<option value=\\\"full-power\\\">Administrador</option>\", $contenido);\n\t\telse \n\t\t\t$contenido=str_replace('{selAdm}',\"\", $contenido);\n\t\n\t\tif($this->getNivel()>=5)\n\t\t\t$contenido=str_replace('{selSpr}',\"<option value=\\\"medium-power\\\">Supervisor</option>\", $contenido);\n\t\telse \n\t\t\t$contenido=str_replace('{selSpr}',\"\", $contenido);\n\t\t\n\t\techo str_replace('{contenido}', $contenido, $plantillaPrincipal);\t\n\t}", "title": "" }, { "docid": "976fe2de32fc5d62cd475e60189113b9", "score": "0.6147124", "text": "public function usuarioAdministrador(){\n try {\n if($this->verificarSession()){\n \n $this->vista->set('titulo', 'Usuario Administrador');\n return $this->vista->imprimir();\n }\n } catch (Exception $exc) {\n echo 'Error de aplicacion: ' . $exc->getMessage();\n }\n \n }", "title": "" }, { "docid": "495a031d3aa4d43b3da0f5141dd29a9a", "score": "0.61411434", "text": "private function EditUserStep2()\n\t{\n\t\t$userId = $_POST['userId'];\n\t\t$arrData = array();\n\t\t$arrPerms = array();\n\t\t$err = \"\";\n\t\t$arrUserData = array();\n\n\t\t$this->_GetUserData($userId, $arrUserData);\n\n\t\t// Does this user have permission to edit this user?\n\t\tif($GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId() && $arrUserData['uservendorid'] != $GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId()) {\n\t\t\tFlashMessage(GetLang('Unauthorized'), MSG_ERROR, 'index.php?ToDo=viewUsers');\n\t\t}\n\n\t\t$this->_GetUserData(0, $arrData);\n\t\tif($arrUserData['pk_userid'] == 1 || $arrUserData['username'] == \"admin\") {\n\t\t\t$arrData['username'] = \"admin\";\n\t\t}\n\n\t\t$arrPerms = $this->_GetPermissionData(0);\n\n\t\t// Commit the values to the database\n\t\tif($this->_CommitUser($userId, $arrData, $arrPerms, $err)) {\n\t\t\t// Log this action\n\t\t\tif(!isset($arrData['username'])) {\n\t\t\t\t$arrData['username'] = 'admin';\n\t\t\t}\n\n\t\t\t$GLOBALS['ISC_CLASS_LOG']->LogAdminAction($userId, $arrData['username']);\n\n\t\t\tif($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Users)) {\n\t\t\t\t$this->ManageUsers(GetLang('UserUpdatedSuccessfully'), MSG_SUCCESS);\n\t\t\t} else {\n\t\t\t\t$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('UserUpdatedSuccessfully'), MSG_SUCCESS);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Users)) {\n\t\t\t\tflashMessage(sprintf(GetLang('ErrUserNotUpdated'), $err), MSG_ERROR, 'index.php?ToDo=editUser&userId='.$userId);\n\t\t\t} else {\n\t\t\t\t$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(sprintf(GetLang('ErrUserNotUpdated'), $err), MSG_ERROR);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "aa7fc6281e06ba3ddf562c75cc496f3a", "score": "0.6121327", "text": "public function modificar_usuario($id, $nombres, $ape_pat, $ape_mat, $fecha_nac, $comuna, $calle, $f_movil, $f_fijo, $email, $pass)\n\t{\n\t\t$control = true;\n\t\t$sql = \"update cliente set NOMBRES='$nombres', APE_PATERNO='$ape_pat', APE_MATERNO='$ape_mat', FECHA_NAC='$fecha_nac', COMUNA='$comuna', CALLE='$calle', FONO_MOVIL='$f_movil', FONO_FIJO='$f_fijo', EMAIL='$email', PASS_CLIE=AES_ENCRYPT('$pass','llave_AES') where ID_CLIENTE = $id;\";\n\t\t\n\t\tif (!$modificar = mysql_query($sql)) {\n\t\t\t$control = false;\n\t\t\treturn $control;\n\t\t}\n\t\telse\n\t\t{\n\t\treturn $control;\n\t\t}\n\t}", "title": "" }, { "docid": "5bc594a8f7c3448fb3e86981b94efe32", "score": "0.6115235", "text": "public function editvisitaid($cedula,$nombre,$telefono,$email, $fecha_nac,$sexo,$id){\n $sql=\"UPDATE reg_user SET nombre_user='$nombre',cedula_user='$cedula',email_user='$email',telefono_user='$telefono',fecha_nac='$fecha_nac',sexo_user='$sexo' WHERE id_user='$id'\"; \n $res= mysqli_query(Conectar::con(), $sql);\n \n }", "title": "" }, { "docid": "ef0fee96653049e6872594569aae2315", "score": "0.61150247", "text": "public function edit(User $usuario)\n {\n //\n }", "title": "" }, { "docid": "f6787e88801818c3c045aa8899e8c9d4", "score": "0.61143994", "text": "public function checkUserUpdate(){\n\t\t\t//check registration radi većinu istih provjera\n\t\t\t$this->checkRegistration();\n\t\t\t$this->cleanRegistration();\n\t\t\t\n\t\t\tif($this->checkPassword($this->data['new_password'], \"'Nova lozinka'\") === false){\n\t\t\t\t$this->passed = false;\n\t\t\t}\n\n\t\t\t$this->data['about'] = trim($this->data['about']);\n\t\t}", "title": "" }, { "docid": "914149185f77e819be12eeacd664f652", "score": "0.6112992", "text": "function adminEditUsers(){\n\n //si le admin n'est pas connecter au le renvois a l'accueil\n if(!isAuthenticatedAdmin()){\n redirect(\"index.php\");\n }\n\n //controle de formulaire en php\n if(!empty($_POST)){\n if(array_key_exists('id',$_POST) && isset($_POST['id']) && ctype_digit($_POST['id'])){\n if(array_key_exists('first_name',$_POST) && isset($_POST['first_name']) && ctype_alpha($_POST['first_name'])){\n if( strlen($_POST['first_name']) >= 2 && strlen($_POST['first_name']) <= 40){\n if(array_key_exists('last_name',$_POST) && isset($_POST['last_name']) && ctype_alpha($_POST['last_name'])){\n if(strlen($_POST['last_name']) >= 2 && strlen($_POST['last_name']) <= 40){\n if(array_key_exists('password',$_POST) && isset($_POST['password']) && strlen($_POST['password']) >= 8){\n if(array_key_exists('mail',$_POST) && isset($_POST['mail'])){\n if(preg_match(\"/^[a-zA-Z][a-zA-Z0-9._-]{1,19}@[a-z]{4,7}\\.[a-z]{2,3}$/\", $_POST['mail'])){\n\n editUsers((string)$_POST['first_name'], (string)$_POST['last_name'], (string)$_POST['mail'], (string)$_POST['password'], (int)$_POST['id']);\n\n //on redirectionne l'admin vers la liste des users\n redirect(\"index.php?action=admin&action2=users&action3=get\");\n }\n redirect('index.php?action=admin&action2=users&action3=editForm&id=' . (int)$_POST['id']);\n }\n redirect('index.php?action=admin&action2=users&action3=editForm&id=' . (int)$_POST['id']);\n }\n redirect('index.php?action=admin&action2=users&action3=editForm&id=' . (int)$_POST['id']);\n }\n redirect('index.php?action=admin&action2=users&action3=editForm&id=' . (int)$_POST['id']);\n }\n redirect('index.php?action=admin&action2=users&action3=editForm&id=' . (int)$_POST['id']);\n }\n redirect('index.php?action=admin&action2=users&action3=editForm&id=' . (int)$_POST['id']);\n }\n //on redirectionne l'admin vers la liste des users\n redirect('index.php?action=admin&action2=users&action3=editForm&id=' . (int)$_POST['id']);\n }\n }\n\n //on redirectionne l'admin vers la liste des users\n redirect(\"index.php?action=admin&action2=users&action3=get\");\n}", "title": "" }, { "docid": "48cec14c9bf2c07eb0bb0d89c5e0d679", "score": "0.61107826", "text": "public static function AdminChangeIdentity() {\n\t\ttry {\n\t\t\t// Get user data\n\t\t\t$userData = $GLOBALS['db']->fetch('SELECT * FROM users WHERE id = ?', $_GET['id']);\n\t\t\t$userStatsData = $GLOBALS['db']->fetch('SELECT * FROM users_stats WHERE id = ?', $_GET['id']);\n\t\t\t// Check if this user exists\n\t\t\tif (!$userData || !$userStatsData) {\n\t\t\t\tthrow new Exception(\"That user doesn't exist\");\n\t\t\t}\n\t\t\t// Check if we are trying to edit our account or a higher rank account\n\t\t\tif ($userData['username'] != $_SESSION['username'] && $userData['rank'] >= getUserRank($_SESSION['username'])) {\n\t\t\t\tthrow new Exception(\"You dont't have enough permissions to edit this user.\");\n\t\t\t}\n\t\t\t// Print edit user stuff\n\t\t\techo '<div id=\"wrapper\">';\n\t\t\tprintAdminSidebar();\n\t\t\techo '<div id=\"page-content-wrapper\">';\n\t\t\t// Maintenance check\n\t\t\tself::MaintenanceStuff();\n\t\t\t// Print Success if set\n\t\t\tif (isset($_GET['s']) && !empty($_GET['s'])) {\n\t\t\t\tself::SuccessMessage($_GET['s']);\n\t\t\t}\n\t\t\t// Print Exception if set\n\t\t\tif (isset($_GET['e']) && !empty($_GET['e'])) {\n\t\t\t\tself::ExceptionMessage($_GET['e']);\n\t\t\t}\n\t\t\techo '<p align=\"center\"><font size=5><i class=\"fa fa-refresh\"></i>\tChange identity</font></p>';\n\t\t\techo '<table class=\"table table-striped table-hover table-50-center\">';\n\t\t\techo '<tbody><form id=\"system-settings-form\" action=\"submit.php\" method=\"POST\"><input name=\"action\" value=\"changeIdentity\" hidden>';\n\t\t\techo '<tr>\n\t\t\t<td>ID</td>\n\t\t\t<td><p class=\"text-center\"><input type=\"number\" name=\"id\" class=\"form-control\" value=\"'.$userData['id'].'\" readonly></td>\n\t\t\t</tr>';\n\t\t\techo '<tr>\n\t\t\t<td>Old Username</td>\n\t\t\t<td><p class=\"text-center\"><input type=\"text\" name=\"oldu\" class=\"form-control\" value=\"'.$userData['username'].'\" readonly></td>\n\t\t\t</tr>';\n\t\t\techo '<tr class=\"success\">\n\t\t\t<td>New Username</td>\n\t\t\t<td><p class=\"text-center\"><input type=\"text\" name=\"newu\" class=\"form-control\"></td>\n\t\t\t</tr>';\n\t\t\techo '<tr>\n\t\t\t<td>Keep old scores<br>(with new username)</td>\n\t\t\t<td>\n\t\t\t<select name=\"ks\" class=\"selectpicker\" data-width=\"100%\">\n\t\t\t<option value=\"1\" selected>Yes</option>\n\t\t\t<option value=\"0\">No</option>\n\t\t\t</select>\n\t\t\t</td>\n\t\t\t</tr>';\n\t\t\techo '</tbody></form>';\n\t\t\techo '</table>';\n\t\t\techo '<div class=\"text-center\"><button type=\"submit\" form=\"system-settings-form\" class=\"btn btn-primary\">Change identity</button></div>';\n\t\t\techo '</div>';\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\t// Redirect to exception page\n\t\t\tredirect('index.php?p=102&e='.$e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "1c6b43f704d438c0796a2f30f0aa472a", "score": "0.61081165", "text": "public function viewUsr(){\n $Id=$_GET['Id'];\n $action=$_GET['modAct'];\n try {\n $userToSee = User::getFromDataBase($this->getPdo(), $Id);\n } catch (Exception $e) {\n //pas connecté ou problème de connexion bdd\n die($e->getMessage());\n }\n\n\n echo $this->renderView(\n \"usr_fiche_edit.php\",\n array(\n 'userToSee' => $userToSee,\n 'modAct' => $action\n )\n );\n }", "title": "" }, { "docid": "90637419a9b909b52c522a67cef25bc4", "score": "0.6104375", "text": "private function setUserData()\n {\n $auth = Auth::getInstance();\n $user = $auth->getUser()[\"username\"];\n $result = $this->db->Query(\"SELECT * FROM `tbl_user` WHERE `login`='$user'\");\n\n if ($result == null)\n return;\n\n $user = $result[0];\n $kontostand = number_format($user[\"kontostand\"], \"2\", \",\", \".\") . \"€\";\n $this->tmp->setVar(\"Vorname\", $user[\"vorname\"]);\n $this->tmp->setVar(\"Name\", $user[\"nachname\"]);\n $this->tmp->setVar(\"Login\", $user[\"login\"]);\n $this->tmp->setVar(\"Kontostand\", $kontostand);\n }", "title": "" }, { "docid": "020d6bf3b730447acd47fed3d1d14664", "score": "0.6104336", "text": "public static function AdminEditUser() {\n\t\ttry {\n\t\t\t// Check if id is set\n\t\t\tif (!isset($_GET['id']) || empty($_GET['id'])) {\n\t\t\t\tthrow new Exception('Invalid user ID!');\n\t\t\t}\n\t\t\t// Get user data\n\t\t\t$userData = $GLOBALS['db']->fetch('SELECT * FROM users WHERE id = ?', $_GET['id']);\n\t\t\t$userStatsData = $GLOBALS['db']->fetch('SELECT * FROM users_stats WHERE id = ?', $_GET['id']);\n\t\t\t// Check if this user exists\n\t\t\tif (!$userData || !$userStatsData) {\n\t\t\t\tthrow new Exception(\"That user doesn't exist\");\n\t\t\t}\n\t\t\t// Set readonly stuff\n\t\t\t$readonly[0] = ''; // User data stuff\n\t\t\t$readonly[1] = ''; // Username color/style stuff\n\t\t\t$selectDisabled = '';\n\t\t\t// Check if we are editing our account\n\t\t\tif ($userData['username'] == $_SESSION['username']) {\n\t\t\t\t// Allow to edit only user stats\n\t\t\t\t$readonly[0] = 'readonly';\n\t\t\t\t$selectDisabled = 'disabled';\n\t\t\t} elseif ($userData['rank'] >= getUserRank($_SESSION['username'])) {\n\t\t\t\t// We are trying to edit a user with same/higher rank than us :akerino:\n\t\t\t\tredirect(\"index.php?p=102&e=You dont't have enough permissions to edit this user\");\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t// Print edit user stuff\n\t\t\techo '<div id=\"wrapper\">';\n\t\t\tprintAdminSidebar();\n\t\t\techo '<div id=\"page-content-wrapper\">';\n\t\t\t// Maintenance check\n\t\t\tself::MaintenanceStuff();\n\t\t\t// Print Success if set\n\t\t\tif (isset($_GET['s']) && !empty($_GET['s'])) {\n\t\t\t\tself::SuccessMessage($_GET['s']);\n\t\t\t}\n\t\t\t// Print Exception if set\n\t\t\tif (isset($_GET['e']) && !empty($_GET['e'])) {\n\t\t\t\tself::ExceptionMessage($_GET['e']);\n\t\t\t}\n\t\t\t// Selected values stuff 1\n\t\t\t$selected[0] = [1 => '', 2 => '', 3 => '', 4 => ''];\n\t\t\t// Selected values stuff 2\n\t\t\t$selected[1] = [0 => '', 1 => '', 2 => ''];\n\t\t\t// Get selected stuff\n\t\t\t$selected[0][current($GLOBALS['db']->fetch('SELECT rank FROM users WHERE id = ?', $_GET['id']))] = 'selected';\n\t\t\t$selected[1][current($GLOBALS['db']->fetch('SELECT allowed FROM users WHERE id = ?', $_GET['id']))] = 'selected';\n\t\t\techo '<p align=\"center\"><font size=5><i class=\"fa fa-user\"></i>\tEdit user</font></p>';\n\t\t\techo '<table class=\"table table-striped table-hover table-50-center\">';\n\t\t\techo '<tbody><form id=\"system-settings-form\" action=\"submit.php\" method=\"POST\"><input name=\"action\" value=\"saveEditUser\" hidden>';\n\t\t\techo '<tr>\n\t\t\t<td>ID</td>\n\t\t\t<td><p class=\"text-center\"><input type=\"number\" name=\"id\" class=\"form-control\" value=\"'.$userData['id'].'\" readonly></td>\n\t\t\t</tr>';\n\t\t\techo '<tr>\n\t\t\t<td>Username</td>\n\t\t\t<td><p class=\"text-center\"><input type=\"text\" name=\"u\" class=\"form-control\" value=\"'.$userData['username'].'\" readonly></td>\n\t\t\t</tr>';\n\t\t\techo '<tr>\n\t\t\t<td>Email</td>\n\t\t\t<td><p class=\"text-center\"><input type=\"text\" name=\"e\" class=\"form-control\" value=\"'.$userData['email'].'\" '.$readonly[0].'></td>\n\t\t\t</tr>';\n\t\t\techo '<tr>\n\t\t\t<td>Rank</td>\n\t\t\t<td>\n\t\t\t<select name=\"r\" class=\"selectpicker\" data-width=\"100%\" '.$selectDisabled.'>\n\t\t\t<option value=\"1\" '.$selected[0][1].'>User</option>\n\t\t\t<option value=\"2\" '.$selected[0][2].'>Supporter</option>\n\t\t\t<option value=\"3\" '.$selected[0][3].'>Mod (not working yet)</option>\n\t\t\t<option value=\"4\" '.$selected[0][4].'>Admin</option>\n\t\t\t</select>\n\t\t\t</td>\n\t\t\t<!-- <td><p class=\"text-center\"><input type=\"number\" name=\"r\" class=\"form-control\" value=\"'.$userData['rank'].'\" '.$readonly[0].'></td> -->\n\t\t\t</tr>';\n\t\t\techo '<tr>\n\t\t\t<td>Allowed</td>\n\t\t\t<td>\n\t\t\t<select name=\"a\" class=\"selectpicker\" data-width=\"100%\" '.$selectDisabled.'>\n\t\t\t<option value=\"0\" '.$selected[1][0].'>Banned</option>\n\t\t\t<option value=\"1\" '.$selected[1][1].'>Ok</option>\n\t\t\t<option value=\"2\" '.$selected[1][2].'>Pending activation</option>\n\t\t\t</select>\n\t\t\t</td>\n\t\t\t<!-- <td><p class=\"text-center\"><input type=\"number\" name=\"a\" class=\"form-control\" value=\"'.$userData['allowed'].'\" '.$readonly[0].'></td> -->\n\t\t\t</tr>';\n\t\t\techo '<tr>\n\t\t\t<td>Username color<br>(HTML or HEX color)</td>\n\t\t\t<td><p class=\"text-center\"><input type=\"text\" name=\"c\" class=\"form-control\" value=\"'.$userStatsData['user_color'].'\" '.$readonly[1].'></td>\n\t\t\t</tr>';\n\t\t\techo '<tr>\n\t\t\t<td>Username style<br>(like fancy gifs as background)</td>\n\t\t\t<td><p class=\"text-center\"><input type=\"text\" name=\"bg\" class=\"form-control\" value=\"'.$userStatsData['user_style'].'\" '.$readonly[1].'></td>\n\t\t\t</tr>';\n\t\t\techo '<tr>\n\t\t\t<td>A.K.A</td>\n\t\t\t<td><p class=\"text-center\"><input type=\"text\" name=\"aka\" class=\"form-control\" value=\"'.htmlspecialchars($userStatsData['username_aka']).'\"></td>\n\t\t\t</tr>';\n\t\t\techo '<tr>\n\t\t\t<td>Userpage<br><a onclick=\"censorUserpage();\">(reset userpage)</a></td>\n\t\t\t<td><p class=\"text-center\"><textarea name=\"up\" class=\"form-control\" style=\"overflow:auto;resize:vertical;height:200px\">'.$userStatsData['userpage_content'].'</textarea></td>\n\t\t\t</tr>';\n\t\t\techo '<tr>\n\t\t\t<td>Silence end time<br><a onclick=\"removeSilence();\">(remove silence)</a></td>\n\t\t\t<td><p class=\"text-center\"><input type=\"text\" name=\"se\" class=\"form-control\" value=\"'.$userData['silence_end'].'\"></td>\n\t\t\t</tr>';\n\t\t\techo '<tr>\n\t\t\t<td>Silence reason</td>\n\t\t\t<td><p class=\"text-center\"><input type=\"text\" name=\"sr\" class=\"form-control\" value=\"'.$userData['silence_reason'].'\"></td>\n\t\t\t</tr>';\n\t\t\techo '<tr>\n\t\t\t<td>Avatar</td>\n\t\t\t<td><img src=\"'.URL::Avatar().'/'.$_GET['id'].'\" height=\"50\" width=\"50\"></img>\t<a onclick=\"sure(\\'submit.php?action=resetAvatar&id='.$_GET['id'].'\\')\">Reset avatar</a></td>\n\t\t\t</tr>';\n\t\t\techo '</tbody></form>';\n\t\t\techo '</table>';\n\t\t\techo '<div class=\"text-center\">\n\t\t\t\t\t<button type=\"submit\" form=\"system-settings-form\" class=\"btn btn-primary\">Save changes</button><br><br>\n\t\t\t\t\t<a href=\"index.php?p=104&id='.$_GET['id'].'\" class=\"btn btn-danger\">Change identity</a>\n\t\t\t\t\t<a href=\"index.php?p=110&id='.$_GET['id'].'\" class=\"btn btn-success\">Edit badges</a>\n\t\t\t\t\t<a href=\"index.php?u='.$_GET['id'].'\" class=\"btn btn-warning\">View profile</a>\n\t\t\t\t</div>';\n\t\t\techo '</div>';\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\t// Redirect to exception page\n\t\t\tredirect('index.php?p=102&e='.$e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "34b52e8dd99ae085a5d227c642bd42bb", "score": "0.6087492", "text": "Public function get_id_utilisateur ()\r\n\t\t\t{\r\n\t\t\t\treturn $this-> id_utilisateur;\r\n\t\t\t}", "title": "" }, { "docid": "4264b2692960757e24c9e533483e11e1", "score": "0.6086668", "text": "public function modifyUser() {\n if (isset($_POST[\"id\"])) {\n $id = $_POST[\"id\"];\n } else {\n $id = \"\";\n }\n if (isset($_POST[\"lastName\"])) {\n $lastName = $_POST[\"lastName\"];\n } else\n $lastName = \"\";\n if (isset($_POST[\"firstName\"])) {\n $firstName = $_POST[\"firstName\"];\n } else {\n $firstName = \"\";\n }\n if (isset($_POST[\"birthDate\"])) {\n $birthDate = $_POST[\"birthDate\"];\n } else {\n $birthDate = \"1900-01-01\";\n }\n if (isset($_POST[\"address\"])) {\n $address = $_POST[\"address\"];\n } else {\n $address = \"\";\n }\n if (isset($_POST[\"postalCode\"])) {\n $postalCode = $_POST[\"postalCode\"];\n } else {\n $postalCode = \"\";\n }\n if (isset($_POST[\"phone\"])) {\n $phone = $_POST[\"phone\"];\n } else {\n $phone = \"\";\n }\n if (isset($_POST[\"service\"])) {\n $service = $_POST[\"service\"];\n } else {\n $service = 0;\n }\n $listusrMdf = $this->pdoTP1->prepare(\"UPDATE `user` SET `lastName` = :lastName , `firstName` = :firstName , `birthDate` = :birthDate , `address` = :address , `postalCode` = :postalCode , `phone` = :phone , `service`= :service WHERE `id` = :id'\");\n $listusrMdf->bindValue(\":id\", $id, PDO::PARAM_INT);\n $listusrMdf->bindValue(\":lastName\", $lastName, PDO::PARAM_STR);\n $listusrMdf->bindValue(\":firstName\", $firstName, PDO::PARAM_STR);\n $listusrMdf->bindValue(\":birthDate\", $birthDate, PDO::PARAM_STR);\n $listusrMdf->bindValue(\":address\", $address, PDO::PARAM_STR);\n $listusrMdf->bindValue(\":postalCode\", $postalCode, PDO::PARAM_INT);\n $listusrMdf->bindValue(\":phone\", $phone, PDO::PARAM_INT);\n $listusrMdf->bindValue(\":service\", $service, PDO::PARAM_INT);\n//Execution de la requête d\"envoie des données\n $resultatMdf = $listusrMdf->execute();\n if ($resultatMdf = true) {\n echo \"Formulaire modifié\";\n } else {\n echo \"Verifier les informations\";\n };\n var_dump($resultatMdf);\n $listusrMdf->closeCursor();\n }", "title": "" }, { "docid": "a604848f8415aa684b9f32da0aee31f8", "score": "0.6083948", "text": "function EDIT()\n{\n\t//Si todos los campos tienen valor\n\tif(\n\t\t\n\t\t$this->login <> '' && \n\t\t$this->IdTrabajo <> ''){\n\n\t\t// se construye la sentencia de busqueda de la tupla en la bd\n\t $sql = \"SELECT * FROM NOTA_TRABAJO WHERE (login = '$this->login' AND IdTrabajo = '$this->IdTrabajo')\";\n\t // se ejecuta la query\n\t $result = $this->mysqli->query($sql);\n\t $num_rows = mysqli_num_rows($result);\n\t // si el numero de filas es igual a uno es que lo encuentra\n\n\t if ($num_rows == 1)\n\t {\t// se construye la sentencia de modificacion en base a los atributos de la clase\n\t\t\t$sql = \"UPDATE NOTA_TRABAJO SET \n\t\t\t\t\t\tlogin = '$this->login',\n\t\t\t\t\t\tIdTrabajo = '$this->IdTrabajo',\n\t\t\t\t\t\tNotaTrabajo = '$this->NotaTrabajo'\n\t\t\t\t\tWHERE (login = '$this->login' AND IdTrabajo = '$this->IdTrabajo')\";\n\t\t\t\t\t\n\t\t\t// si hay un problema con la query se envia un mensaje de error en la modificacion\n\t if (!($result = $this->mysqli->query($sql))){\n\t \t\t$this->lista['mensaje'] = 'ERROR: No se ha modificado'; \n\t\t\t\t\treturn $this->lista; \n\t\t \t}\n\t\t \n\t\t\telse{ // si no hay problemas con la modificación se indica que se ha modificado\n\t\t\t\t$this->lista['mensaje'] = 'Modificado correctamente'; \n\t\t\t\treturn $this->lista; \n\t\t\t}\n\t }\n\t else {// si no se encuentra la tupla se manda el mensaje de que no existe la tupla\n\t \t$this->lista['mensaje'] = 'ERROR: No existe en la base de datos'; \n\t\t\treturn $this->lista; \n\t\t\t}\n\t}else{ //Si no se introdujeron todos los valores\n\t\t return 'ERROR: Fallo en la modificación. Introduzca todos los valores'; \n\n\t}\n}", "title": "" }, { "docid": "fedc70e9201c5fd5d44b5d0f883c0318", "score": "0.6083534", "text": "function getUsersAdmin($connexion)\n{\n if ($connexion) {\n $sql = \"SELECT * FROM `sitephp`.`users`\";\n $result = mysqli_query($connexion, $sql);\n echo(\"<table><tr><th>Nom</th><th>Mot De Passe</th><th>Mail</th><th>Rôle</th><th>Avatar</th><th>Modifier</th><th>Supprimer</th></tr>\");\n while ($row = mysqli_fetch_array($result)) {\n $id = $row['id'];\n echo(\"<tr><td>\" . $row['name'] . \"</td>\");\n echo(\"<td>\" . $row['password'] . \"</td>\");\n if (empty($row['mail'])) {\n echo(\"<td>Pas d'email ajoutée</td>\");\n } else {\n echo(\"<td>\" . $row['mail'] . \"</td>\");\n }\n if ($row['role'] == 1) {\n echo(\"<td>Admin</td>\");\n } else {\n echo(\"<td>Utilisateur</td>\");\n }\n if (empty($row['avatar'])) {\n echo(\"<td>Pas d'avatar ajouté</td>\");\n } else {\n echo('<td><img alt=\"avatar\" class=\"icon\" src=\"/php/img/' . $row['avatar'] . '\" /></td>');\n }\n $edit = (bool)false;\n echo(\"<td><a href='./edit.php?id=$id&edit=$edit'><button>X</button></td>\");\n echo(\"<td><a href='./delete.php?id=$id'><button>X</button></td></tr>\");\n }\n echo(\"</table>\");\n }\n}", "title": "" }, { "docid": "5eed5594b3e62a184d846c838872e8ad", "score": "0.6076361", "text": "public function updateUser()\n {\n $this->_logger->logData(\"User updated\");\n }", "title": "" }, { "docid": "3e45f5e40bea4edc0368771981b71903", "score": "0.6074905", "text": "public function changePass()\n {\n\n $mdp = $this->request->getParameter( 'pass' );\n $verifPass = $this->request->getParameter( 'verifPass' );\n\n if ($mdp !== false && $verifPass !== false) {\n if ($mdp === $verifPass) {\n if (preg_match( \"#^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*\\W)(?!.*[<>]).{8,30}$#\", $mdp )) {\n $this->user->updateMdp( $mdp, $this->request->getSession()->getAttribut( 'idUser' ) );\n $this->rediriger( \"admin\", \"index\" );\n $this->request->getSession()->setFlash( 'Le mot de passe a été modifié' );\n } else {\n\n $this->request->getSession()->setFlash( 'mots de passe non autorisé' );\n }\n\n } else {\n $this->request->getSession()->setFlash( 'Les mots de passe ne sont pas identiques' );\n }\n } else {\n $this->request->getSession()->setFlash( 'Action non autorisée' );\n }\n $this->rediriger( \"admin\", \"index\" );\n\n\n }", "title": "" }, { "docid": "77c2ffe56276bf622085a9d846d6b6af", "score": "0.60726196", "text": "function editUser($value){\n $id = $value['id'];\n $username = $value['username'];\n $email = $value['email'];\n $role = $value['role'];\n $profile = $value['pro_url'];\n $user = selectOne(\"user\",$id,\"userID\");\n foreach($user as $info){\n $oldpass = $info[\"password\"];\n }\n \n\n if ($value['pwd']===$oldpass){// check if you don't change password\n $pwd =$value['pwd'];\n }else { // if you user change password\n $pwd = password_hash($value['pwd'], PASSWORD_DEFAULT);\n }\n if ($profile ===\"\"){//if user don't change profile\n return db()->query(\"UPDATE user SET userName='$username',email='$email',password='$pwd',role='$role' WHERE userID='$id'\");\n }else { // if user change their profile\n return db()->query(\"UPDATE user SET userName='$username',email='$email',password='$pwd',role='$role',profile='$profile' WHERE userID='$id'\");\n }\n \n}", "title": "" }, { "docid": "601afe67e805a6c30bf3434bebc70941", "score": "0.60676974", "text": "public function SetUsuario($valor) {\r\n\t$this->usuario = $valor;\r\n\t\r\n}", "title": "" }, { "docid": "e370d7b1215f856ba760cb5543df6dff", "score": "0.60634404", "text": "function modifyMyAccount($userId=null)\n{\n //id de l'utilisateur à modifier\n if ($userId) {\n $userIdAccountToModify = $userId;\n } else {\n $userIdAccountToModify = $_SESSION['id'];\n }\n //Address $_POST\n if (isset($_POST['street'])) {\n $addressStreet = $_POST['street'];\n if (strlen($addressStreet)>255) {\n $fillingError['street'] = \"255 caractères maximum.\";\n }\n }\n if (isset($_POST['zipcode'])) {\n $addressZipcode = $_POST['zipcode'];\n if (strlen($addressZipcode)>20) {\n $fillingError['zipcode'] = \"20 caractères maximum.\";\n }\n }\n if (isset($_POST['city'])) {\n $addressCity = $_POST['city'];\n if (strlen($addressCity)>60) {\n $fillingError['city'] = \"60 caractères maximum.\";\n }\n }\n if (isset($_POST['country'])) {\n $addressCountry = $_POST['country'];\n if (strlen($addressCountry)>60) {\n $fillingError['country'] = \"60 caractères maximum.\";\n }\n }\n //User $_POST\n if (isset($_POST['civility'])) {\n $usercivility = $_POST['civility'];\n if (strlen($usercivility)>20) {\n $fillingError['civility'] = \"20 caractères maximum.\";\n }\n }\n if (isset($_POST['name'])) {\n $userName = $_POST['name'];\n if (strlen($userName)>125) {\n $fillingError['name'] = \"125 caractères maximum.\";\n }\n }\n if (isset($_POST['firstName'])) {\n $userfirstName = $_POST['firstName'];\n if (strlen($userfirstName)>125) {\n $fillingError['firstName'] = \"125 caractères maximum.\";\n }\n }\n if (isset($_POST['dateOfBirth'])) {\n //On vérifie si c'est bien un format date\n $dateOfBirth = date_parse_from_format('Y-m-d', $_POST['dateOfBirth']);\n if (!$dateOfBirth['error_count'] == 0 || !checkdate($dateOfBirth['month'], $dateOfBirth['day'], $dateOfBirth['year'])) {\n $fillingError['dateOfBirth'] = \"Vérifier votre date de naissance.\";\n } else {\n //On vérifie si la date renseignée n'est pas supérieure à la date du jour\n $dateOfTheDay = date('Y-m-d', strtotime('-18 year'));\n if ($_POST['dateOfBirth'] > $dateOfTheDay) {\n $fillingError['dateOfBirth'] = \"Date invalide, vous devez avoir plus de 18 ans pour utiliser nos services.\";\n } else {\n $userdateOfBirth = $_POST['dateOfBirth'];\n }\n }\n }\n if (isset($_POST['mail']) && !empty($_POST['mail'])) {\n if (filter_var($_POST['mail'], FILTER_VALIDATE_EMAIL)) {\n $usermail = $_POST['mail'];\n //Vérification si mail existe déja\n $mailVerification = verifyMailAlreadyPresent($usermail, $userIdAccountToModify);\n //Si le mail existe\n if ($mailVerification) {\n $fillingError['mail'] = \"Un compte est déjà existant avec cette adresse mail.\";\n } elseif (strlen($usermail) > 255) {\n $fillingError['mail'] = '255 caractères maximum.';\n }\n } else {\n $fillingError['mail'] = 'L\\'adresse mail est incomplète.';\n }\n } else {\n $fillingError['mail'] = 'Veuillez renseigner ce champ.';\n }\n if (isset($_POST['phoneNumber'])) {\n $userphoneNumber = $_POST['phoneNumber'];\n if (strlen($userphoneNumber)>20) {\n $fillingError['phoneNumber'] = \"20 caractères maximum.\";\n }\n }\n //Résultat des contrôles\n if (!empty($fillingError)) {\n displayModifyMyAccount($userIdAccountToModify, null, $fillingError);\n } else {\n //On récupère l'address_id de l'utilisateur\n $addressIdUserRequest = getUserAddressId($userIdAccountToModify);\n $addressIdUser = $addressIdUserRequest['address_id'];\n //On modifie l'adresse (table addresses)\n if (modifyAddress($addressIdUser, $addressStreet, $addressZipcode, $addressCity, $addressCountry)) {\n //On modifie les informations personnelles (table users)\n if (modifyUser($userIdAccountToModify, $usercivility, $userName, $userfirstName, $userdateOfBirth, $usermail, $userphoneNumber)) {\n //On affiche la page \"mon compte\"\n //On appelle la fonction pour afficher la page \"mon compte\"\n displayMyAccount($userIdAccountToModify);\n } else {\n $error = \"Problème technique, veuillez réessayer ultérieurement.\";\n require_once('view/frontEnd/v_error.php');\n }\n } else {\n $error = \"Problème technique, veuillez réessayer ultérieurement.\";\n require_once('view/frontEnd/v_error.php');\n }\n }\n}", "title": "" }, { "docid": "bc8fbab1b5bcc818c6c201f06c723ed7", "score": "0.60608923", "text": "function editUsuario ($id, $nombre, $correo, $contrasenia, $rol){\n\tif($id==\"\" || $nombre ==\"\" || $correo==\"\" || $contrasenia==\"\" || $rol==\"\" ){\n\t\techo 'Falta(n) completar campo(s)';\n\n\t}else{\n\t\t\t//Se manda a llamar el metodo de la persistencia para editar la info del usuario en la BD\n\t\t\tinclude_once \"Persistencia/UsuarioDAO.php\";\n\t\t\teditarUsuario($id, $nombre, $correo, $contrasenia, $rol);\n\t}\n}", "title": "" }, { "docid": "9ee023ff104d5993f9ca303d275eb38c", "score": "0.6060139", "text": "public function users_edit()\n {\n $validator = ub_validator::get_instance();\n $stack = ub_stack::get_instance();\n\n if (!$stack->is_valid())\n {\n $sql_string = 'SELECT\n user_id\n FROM\n sys_users';\n $stack->reset();\n do\n {\n $stack->keep_keys(array('user_id'));\n if (!$validator->validate('STACK', 'user_id', TYPE_INTEGER, CHECK_INSET_SQL, 'TRL_ERR_INVALID_DATA_PASSED', $sql_string))\n $stack->element_invalid();\n }\n while ($stack->next() !== false);\n\n $stack->validate();\n }\n\n if ($stack->is_valid())\n return (int)$validator->form_validate('usermanager_users_edit');\n else\n $stack->switch_to_administration();\n }", "title": "" }, { "docid": "473abb446a988401013882ed0b376d52", "score": "0.60587114", "text": "function editUser($connexion, $id, $name, $password, $mail, $role, $avatar)\n{\n $sql = \"UPDATE `sitephp`.`users` SET `name`='$name',`password`='$password', `mail`='$mail',`role`='$role',`avatar`='$avatar' WHERE `id`='$id'\";\n if ($connexion->query($sql)) {\n } else {\n echo $connexion->error;\n }\n}", "title": "" }, { "docid": "e2b4b96f43a95c82249557853129ae34", "score": "0.6055577", "text": "public function edit(Usuarioalteracion $usuarioalteracion)\n {\n //\n }", "title": "" }, { "docid": "eb62e80be6108c8e3a9ac5cf09335004", "score": "0.6048818", "text": "public function SetUser($id_korisnik,$ime,$prezime,$username,$email,$password,$poslednje_logovanje,$id_status){\n\t\t$this->Setid_korisnik($id_korisnik);\n\t\t$this->Setime($ime);\n\t\t$this->Setprezime($prezime);\n\t\t$this->Setusername($username);\n\t\t$this->Setemail($email);\n\t\t$this->Setpassword($password);\n\t\t$this->Setposlednje_logovanje($poslednje_logovanje);\n\t\t$this->Setid_status($id_status);\n\t}", "title": "" }, { "docid": "68dfd61c7ae2f424e087001f85ffdf7b", "score": "0.6048651", "text": "function edit(){\n $user = JFactory::getUser();\n $memberInfo = JResearchStaffHelper::getMemberArrayFromUsername($user->username);\t\t\n if(empty($memberInfo)){\n JError::raiseWarning(1, JText::_('JRESEARCH_NOT_EXISTING_PROFILE'));\n return;\t\t\n }\n\n //Rules at staff level\n $canDoStaff = JResearchAccessHelper::getActions();\n if($canDoStaff->get('core.staff.edit.own')){\n $model = $this->getModel('Member', 'JResearchModel');\n $view = $this->getView('Member', 'html', 'JResearchView');\t\t\t\t\n $view->setModel($model, true);\n $view->setLayout('edit');\n $view->display();\t\t\t\t\t\t\t\t\t\n }else{\n JError::raiseWarning(1, JText::_('JRESEARCH_ACCESS_NOT_ALLOWED'));\t\t\t\n }\n }", "title": "" }, { "docid": "be60ae0d347c7eaff74530b3e0c0863f", "score": "0.6047985", "text": "public function edit(Usuarios $usuarios, $id)\n {\n $validusu=Usuarios::find($id);\n\n $this->authorize('permisoEditar', $validusu);\n\n\n $use=Usuarios::where('id','=',$id)->get();\n $usuarios= Usuarios::findOrFail($id);\n $user = auth()->user();\n if($user->roles[0]->name == \"alta\"){\n $this->authorize('pass', $usuarios);\n }\n\n\n //pais\n $paiss=Paises::orderBy('id','ASC')->select('id','nombre_pais')->get();\n $estadoss=Estados::orderBy('nombre','ASC')->select('id','nombre')->where('condicion','=','1')->get();\n $muns=Municipios::orderBy('nombre_mun','ASC')->select('id','nombre_mun')->where('condicion','=','1')->get();\n $cols=Colonias::orderBy('nombre_col','ASC')->select('id','nombre_col')->where('condicion','=','1')->get();\n // $escuelas=Escuelas::orderBy('id','ASC')->select('id','nombre_escuela')->get();\n $tituloss=Titulos::orderBy('id','ASC')->select('id','nombre_titulo')->get();\n $gradoss=Grados::orderBy('id','ASC')->select('id','nom_gra')->get();\n $escuelass=Escuelas::orderBy('id','ASC')->select('id','nombre_escuela')->get();\n $carrerass=Carreras::orderBy('id','ASC')->select('id','nom_car')->get();\n $idiomass=Idiomas::orderBy('id','ASC')->select('id','nombre_idioma')->get();\n $estCS=EstadoCivil::orderBy('id','ASC')->select('id','nombre')->get();\n // $opcCiv=Opcionciviles::orderBy('id','ASC')->select('id','opcion_civil')->get();\n // $estadoCivil=EstadoCivil::orderBy('id','ASC')->select('id','nombre')->get();\n $dg=DireccionesGenerales::orderBy('id','ASC')->select('id','nombre_dir_gen')->get();\n $da=DireccionesAreas::orderBy('id','ASC')->select('id','nombre_dir_are')->get();\n $cos=Codigos::orderBy('id','ASC')->select('id','nom_codigos')->get();\n $ni=Niveles::orderBy('id','ASC')->select('id','nom_niveles')->get();\n\n\n $sel_pais=$use[0]->paises_id;\n $s_est=$use[0]->estados_id;\n $s_mun=$use[0]->municipios_id;\n $s_col=$use[0]->colonias_id;\n $s_civ=$use[0]->estado_civils_id;\n $s_opv=$use[0]->opcionciviles_id;\n //rfc\n $edi_rfc=$use[0]->carga_rfc;\n $rfc_sub=substr($edi_rfc,4);\n\n\n //dd($use[0]->DetalleEscolaridades);\n\n\n\n $s_carreras=$use[0]->DetalleEscolaridades[0]->carreras_id;\n $s_escuelas=$use[0]->DetalleEscolaridades[0]->escuelas_id;\n $s_tt=$use[0]->DetalleEscolaridades[0]->titulos_id;\n $s_idioma=$use[0]->DetalleIdiomas[0]->idiomas_id;\n $s_ni=$use[0]->DetalleIdiomas[0]->nivel_ingles;\n\n // dd($use[0]->DetalleLaborales);\n\n\n foreach ($usuarios->DetalleLaborales as $lab)\n {\n\n $codi=$lab->codigos_id;\n $nom_codigo=Codigos::select('nom_codigos')->where('id','=',$codi)->get();\n $ncodi=$nom_codigo[0]->nom_codigos;\n\n //dd($ncodi);\n\n $nivel=$lab->niveles_id;\n $nom_nivel=Niveles::select('nom_niveles')->where('id','=',$nivel)->get();\n $nivell=$nom_nivel[0]->nom_niveles;\n\n $id_dge=$lab->direcciones_generales_id;\n $nom_dge=DireccionesGenerales::select('nombre_dir_gen')->where('id','=',$id_dge)->get();\n $ndge=$nom_dge[0]->nombre_dir_gen;\n\n $id_dga=$lab->direcciones_areas_id;\n $nom_dga=DireccionesAreas::select('nombre_dir_are')->where('id','=',$id_dga)->get();\n $ndga=$nom_dga[0]->nombre_dir_are;\n\n $id_estl=$lab->est_lab;\n $nom_estl=Estados::select('nombre')->where('id','=',$id_estl)->get();\n $nestl=$nom_estl[0]->nombre;\n\n $id_munl=$lab->mun_lab;\n $nom_munl=Municipios::select('nombre_mun')->where('id','=',$id_munl)->get();\n $nmunl=$nom_munl[0]->nombre_mun;\n\n $id_coll=$lab->col_lab;\n $nom_coll=Colonias::select('nombre_col')->where('id','=',$id_coll)->get();\n $ncoll=$nom_coll[0]->nombre_col;\n }\n\n $enfermo=$use[0]->Seguros[0]->enf_seg;\n $disca=$use[0]->Seguros[0]->dis_seg;\n\n $uid=$use[0]->id;\n\n //dd($nestl);\n\n //dd($use[0]->DetalleEscolaridades);\n\n\n return view('usuarios.editar',compact('use','usuarios','paiss','sel_pais','rfc_sub','estadoss','s_est','muns','s_mun','cols','s_col'\n ,'estCS','s_civ','s_opv','opcCiv','gradoss','grados_A','carrerass','s_carreras','escuelass','s_escuelas','tituloss','s_tt'\n ,'idiomass','s_idioma','s_ni','cos','ncodi','ni','nivell','dg','ndge','da','ndga','estadoss','nestl','muns','nmunl','cols','ncoll'\n , 'enfermo','disca','uid','s_grados','user'));\n }", "title": "" }, { "docid": "bed36952053b28350b8f0eb5f86f8fdc", "score": "0.60434216", "text": "function edit_user_profile() {\n \n\t// only show the registration form to non-logged-in members\n\t$output = pippin_edit_form_fields();\n\treturn $output;\n\t\n}", "title": "" }, { "docid": "54e2f8257f9d2a027ec443648ff0df77", "score": "0.6042043", "text": "function prepare_update() {\r\n if ($_SESSION['login_level'] > 1) {\r\n foreach ($this->_rowid as $rowid) {\r\n if (!$this->get_row(array('rowid'=>$rowid,'author'=>$_SESSION['login_user']))) {\r\n echo '<p>Access denied. You are not the creator of this news.</p>';\r\n return False;\r\n }\r\n }\r\n }\r\n return True;\r\n }", "title": "" }, { "docid": "26c0a318b9dfbfda7302811077fb5b19", "score": "0.60390544", "text": "public function editUser()\r\n {\r\n $firstname = $_POST['firstname'];\r\n $email = $_POST['email'];\r\n $lastname = $_POST['lastname'];\r\n $username = $_POST['username'];\r\n $oldpwd = $_POST['oldpwd'];\r\n $newpwd = $_POST['newpwd'];\r\n $rfidID = $_POST['rfidID'];\r\n $userId = $_GET['number'];\r\n \r\n $this->refCurrentUserDataModel->editUserinDatabase($firstname, $lastname, $email, $username, $oldpwd, $newpwd, $rfidID, $userId);\r\n }", "title": "" }, { "docid": "2b7bb1501e4923a9645615ed7f4d0004", "score": "0.60385406", "text": "private function EditUserStep1()\n\t{\n\t\t$userId = (int)$_GET['userId'];\n\t\t$arrData = array();\n\n\t\tif(UserExists($userId)) {\n\t\t\t$this->_GetUserData($userId, $arrData);\n\t\t\t$arrPerms = $this->_GetPermissionData($userId);\n\n\t\t\t// Does this user have permission to edit this user?\n\t\t\tif($GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId() && $arrData['uservendorid'] != $GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId()) {\n\t\t\t\tFlashMessage(GetLang('Unauthorized'), MSG_ERROR, 'index.php?ToDo=viewUsers');\n\t\t\t}\n\n\t\t\t$GLOBALS['Username'] = isc_html_escape($arrData['username']);\n\t\t\t$GLOBALS['UserEmail'] = isc_html_escape($arrData['useremail']);\n\t\t\t$GLOBALS['UserFirstName'] = isc_html_escape($arrData['userfirstname']);\n\t\t\t$GLOBALS['UserLastName'] = isc_html_escape($arrData['userlastname']);\n\n\t\t\t$GLOBALS['XMLPath'] = sprintf(\"%s/xml.php\", $GLOBALS['ShopPath']);\n\t\t\t$GLOBALS['XMLToken'] = isc_html_escape($arrData['usertoken']);\n\n\t\t\tif(!gzte11(ISC_HUGEPRINT)) {\n\t\t\t\t$GLOBALS['HideVendorOptions'] = 'display: none';\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif($GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId()) {\n\t\t\t\t\t$vendorDetails = $GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendor();\n\t\t\t\t\t$GLOBALS['HideVendorSelect'] = 'display: none';\n\t\t\t\t\t$GLOBALS['Vendor'] = $vendorDetails['vendorname'];\n\t\t\t\t\t$GLOBALS['HideAdminoptions'] = 'display: none';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$GLOBALS['VendorList'] = $this->GetVendorList($arrData['uservendorid']);\n\t\t\t\t\t$GLOBALS['HideVendorLabel'] = 'display: none';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($arrData['userapi'] == \"1\") {\n\t\t\t\t$GLOBALS['IsXMLAPI'] = 'checked=\"checked\"';\n\t\t\t}\n\n\t\t\tif($arrData['userstatus'] == 0) {\n\t\t\t\t$GLOBALS['Active0'] = 'selected=\"selected\"';\n\t\t\t} else {\n\t\t\t\t$GLOBALS['Active1'] = 'selected=\"selected\"';\n\t\t\t}\n\n\t\t\tif($arrData['userrole'] && $arrData['userrole'] != 'custom') {\n\t\t\t\t$GLOBALS['HidePermissionSelects'] = 'display: none';\n\t\t\t}\n\n\t\t\t// If the user is the super admin we need to disable some fields\n\t\t\tif($userId == 1 || $arrData['username'] == \"admin\") {\n\t\t\t\t$GLOBALS['DisableUser'] = \"DISABLED\";\n\t\t\t\t$GLOBALS['DisableStatus'] = \"DISABLED\";\n\t\t\t\t$GLOBALS['DisableUserType'] = \"DISABLED\";\n\t\t\t\t$GLOBALS['DisablePermissions'] = \"DISABLED\";\n\t\t\t\t$GLOBALS['HideVendorOptions'] = 'display: none';\n\t\t\t}\n\n\t\t\t$GLOBALS['PermissionSelects'] = $this->GeneratePermissionRows($arrData, $arrPerms);\n\t\t\t$GLOBALS['UserRoleOptions'] = $this->GetUserRoleOptions($arrData['userrole'], $arrData['uservendorid']);\n\n\t\t\t$GLOBALS['UserId'] = (int) $userId;\n\t\t\t$GLOBALS['FormAction'] = \"editUser2\";\n\t\t\t$GLOBALS['Title'] = GetLang('EditUser1');\n\t\t\t$GLOBALS['PassReq'] = \"&nbsp;&nbsp;\";\n\n\t\t\t$this->template->assign('FlashMessages', GetFlashMessageBoxes());\n\t\t\t$this->template->assign('PCIPasswordMinLen', GetConfig('PCIPasswordMinLen'));\n\t\t\t$this->template->display('user.form.tpl');\n\t\t}\n\t\telse {\n\t\t\t// The news post doesn't exist\n\t\t\tif($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Users)) {\n\t\t\t\t$this->ManageUsers(GetLang('UserDoesntExist'), MSG_ERROR);\n\t\t\t} else {\n\t\t\t\t$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
ba08a293e63cfee9de8d09170dca1435
logic being applied after the action is executed
[ { "docid": "78275ca8a177c75af857c971c6626b30", "score": "0.0", "text": "protected function postFilter($filterChain)\n {\n }", "title": "" } ]
[ { "docid": "afee980f0623f3d3ca1dc77a49a211e1", "score": "0.7432052", "text": "public function afterAction()\n {\n\n }", "title": "" }, { "docid": "9d72548b03dbff9bbd831f344a06ed9d", "score": "0.742551", "text": "public function afterAction()\n {\n }", "title": "" }, { "docid": "37c0a574adb1b9c4dd4db20ecdfc24ad", "score": "0.7398263", "text": "public function afterAction() {\n }", "title": "" }, { "docid": "97d5c7e35ffc101cbc75ddfb127409df", "score": "0.69029796", "text": "protected function after(){}", "title": "" }, { "docid": "f2d1535c762149b0b3906f0d6ea3a028", "score": "0.6760203", "text": "protected function after_execute() {\n }", "title": "" }, { "docid": "6be0f765d3c5cafae20b8b4d9d8b79a0", "score": "0.6664528", "text": "public function postProcess() {\n\t\t\n }", "title": "" }, { "docid": "5967c74d291d67fe04698625a02ddf2c", "score": "0.66391563", "text": "abstract public function processAction();", "title": "" }, { "docid": "5bd4a822ba879a906ae854c4a9d1b04a", "score": "0.6601961", "text": "public function actoin()\n {\n }", "title": "" }, { "docid": "2f05c8bbdaecc49571585ab4593af0b3", "score": "0.65206665", "text": "protected function afterAction() {\n foreach ($this->_components as $key => $val) {\n $val->afterAction($this->_view);\n }\n }", "title": "" }, { "docid": "c0b933205d8a4860e517ed18aa36b7ec", "score": "0.6513474", "text": "function onProcess () {\r\n\r\n switch (parent::getAction()) {\r\n \r\n default:\r\n }\r\n\r\n }", "title": "" }, { "docid": "790e9da595c8da98aaaa5565e71d6daf", "score": "0.65039927", "text": "protected function after() {}", "title": "" }, { "docid": "6f039e98829f05f0427b7f9c35018a7f", "score": "0.6498056", "text": "protected function postDispatch() {}", "title": "" }, { "docid": "271ffd31d43adeb4b2cf9ae1e952eb7c", "score": "0.64735657", "text": "public function otherAction() {\r\n }", "title": "" }, { "docid": "ceff7fb0472050588d3d2503d468f548", "score": "0.6451211", "text": "protected function perform()\n {\n }", "title": "" }, { "docid": "302d2db4fadd91b9a6bd78cf9b1cccd9", "score": "0.64354146", "text": "protected function actionPostLoadingEvent()\n {\n return;\n }", "title": "" }, { "docid": "b2cc4fc3a2d31ab444fe87a5f7aa0bd5", "score": "0.6414204", "text": "public function afterAction($action, &$result)\n\t{\n\t}", "title": "" }, { "docid": "4f4eebcba885fbd06a63b46a516a3c7f", "score": "0.6401589", "text": "protected function afterHandling () { }", "title": "" }, { "docid": "9a23edb213a7b5a64f50b66f5fab27c3", "score": "0.6397782", "text": "private function _postProcess()\n\t{\n\t}", "title": "" }, { "docid": "7b095a8d29ed65c3a7b5f29bce966557", "score": "0.63823736", "text": "function preAction()\n\t{\n\n\t}", "title": "" }, { "docid": "48329688a075c116dc77317dde22cf44", "score": "0.6371624", "text": "public function act() {\n\t}", "title": "" }, { "docid": "6f922b40e37c906b291379a9c0d86fb0", "score": "0.635583", "text": "protected function afterUpdate () {}", "title": "" }, { "docid": "91b774201461cb6de7cb878211e3e87c", "score": "0.6351014", "text": "public function execute() \n { \n $opdracht = $this->action.'Action';\n if(!method_exists($this,$opdracht))\n {\n $opdracht = 'defaultAction';\n $this->action = 'default';\n }\n $this->$opdracht();\n $this->view->setAction($this->action);\n $this->view->setControl($this->control);\n $this->view->toon();\n }", "title": "" }, { "docid": "ccc1a21006646187c3f0391731a66f3a", "score": "0.63469774", "text": "protected function mustTakeAction(){ }", "title": "" }, { "docid": "d53a43e23911a64c1df9ce01deed908e", "score": "0.6340198", "text": "public function postDispatch()\n {\n parent::postDispatch();\n\n }", "title": "" }, { "docid": "c6add24cff19ac1f0fb7d20b6fc2ea72", "score": "0.6312703", "text": "protected function _after() {\n\t}", "title": "" }, { "docid": "ba44d93c01d06c94a0b57d5575d98e68", "score": "0.63073736", "text": "function postAction()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "abde707f7b3e31d6cc0112ceb9874201", "score": "0.6304017", "text": "public function postProcess()\n {\n }", "title": "" }, { "docid": "4bf54de4b14409dbce569d47336454f7", "score": "0.63018036", "text": "protected function doAfterActions() {\n // main template, the settings of the response etc..\n\n $this->body->assignIfNone('MAIN','<p>no content</p>');\n }", "title": "" }, { "docid": "4c6d1a1b7cd27bd5bfd878ec55060007", "score": "0.629428", "text": "public function action() {\n\t}", "title": "" }, { "docid": "244765924e80a5c5a1dd1a6ae6db1a8b", "score": "0.62598395", "text": "public function postAction() {\n\t\t// TODO: Implement postAction() method.\n\t}", "title": "" }, { "docid": "61677bb1b08c68148a626230e06e5474", "score": "0.6249307", "text": "public function mainAction()\n {\n\n }", "title": "" }, { "docid": "5c2d348a7596f61f307a71688097254f", "score": "0.62380064", "text": "function processAction()\n {\n global $application;\n $request = $this->getInstance( 'Request' );\n $asc_actionName = $request->getCurrentAction();\n\n #\n # IE high security mode fix. This is \"The Platform for Privacy Preferences\"\n # see http://www.w3.org/TR/P3P/ for details\n # compact policy is used\n header('P3P: CP=\"NON CUR ADMa DEVa CONi OUR DELa BUS PHY ONL UNI PUR COM NAV DEM STA\"');\n\n if (modApiFunc('Users', 'getZone') == 'AdminZone' &&\n ! modApiFunc('Users', 'checkCurrentUserAction', $asc_actionName)) {\n \techo file_get_contents($application->getAppIni('PATH_CORE_DIR') . '/block_no_action.tpl');\n \texit;\n }\n\n if ($asc_actionName === NULL)\n {\n $asc_actionName = \"ActionIsNotSetAction\";\n }\n\n # To get an object from the asc_action' name, enable the Modules_Manager\n # object. It's the only one that has metainformation\n # about modules.\n $mm = &$this->getInstance('Modules_Manager');\n loadCoreFile('ajax_action.php');\n $asc_actionObj = &$mm->getActionObject($asc_actionName);\n\n if (is_object($asc_actionObj))\n {\n $this->processActionStarted = true;\n\n $this->pushTag('NullView');\n # - return , .\n # , -\n # Ajax' .\n # $application->_exit();\n $content = $asc_actionObj->onAction();\n\n if ($content !== null and !empty($content))\n {\n echo $content;\n }\n\n # Query MM about the list of hook-classes names of the current action,\n # create their objects and direct the control.\n $hooksList = $mm->getHooksClassesList($asc_actionName);\n if ($hooksList)\n {\n foreach ($hooksList as $hookClass)\n {\n $hookObj = $this->getInstance( $hookClass );\n $hookObj->onHook($asc_actionObj);\n }\n }\n $application->popTag();\n\n // Save the module state (only for loaded modules)\n $this->saveStateofInstancedClasses();\n\n if ($this->haveToExit)\n {\n exit;\n }\n\n // Process Ajax Request, convert to JSON, print to browser and exit\n if ($request->getValueByKey('asc_ajax_req') == '1')\n {\n if(method_exists($asc_actionObj, 'generateResponse'))\n {\n \t $res = $this->processAjaxRequest($request, $asc_actionName, $asc_actionObj->generateResponse());\n }\n else {\n $base_action = new AjaxAction();\n $base_action->setStatusError();\n $base_action->setMessage(\"<b>System error.</b> The action '$asc_actionName' has just been called by AJAX request, but it is not compatible with this type of requests.\");\n $res = $base_action->generateResponse();\n }\n\t\t loadCoreFile('JSON.php');\n\t\t $json = new Services_JSON();\n if ($request->getValueByKey('asc_ajax_upload') == '1')\n\t\t echo '<body><script type=\"text/javascript\"> var resp='.$json->encode($res).'; </script></body>';\n else\n echo $json->encode($res);\n\t\t exit;\n }\n\n if($request->getValueByKey('asc_fb_req') != null)\n {\n $this->fb_request = true;\n }\n\n $this->processActionStarted = false;\n if ($this->redirectURL)\n {\n $request = new Request($this->redirectURL);\n $application->redirect($request);\n }\n\n if ($this->js_redirectURL)\n {\n $js_redirect = new Request($this->js_redirectURL);\n $application->jsRedirect($js_redirect);\n }\n }\n }", "title": "" }, { "docid": "6767aec50172639f6ca6ff66d9267588", "score": "0.6236013", "text": "public function afterFilter() {\n $this->response->disableCache();\n if ($this->Session->read('user_id') == '') {\n $this->redirect(array('controller' => 'users', 'action' => 'login'));\n }\n\n\n if ($this->Session->read('fyear') == '') {\n $this->redirect(array('controller' => 'selections', 'action' => 'index'));\n }\n\n }", "title": "" }, { "docid": "390fcfb298b9f84ac736de9dff44e0ee", "score": "0.6234251", "text": "public function __beforeExecuteRoute()\r\n {\r\n }", "title": "" }, { "docid": "e43017a73d8605ae2a8a79b650ea30cc", "score": "0.62293637", "text": "public function postAction() {\n\t\techo \"TODO: postAction()\";\n\t}", "title": "" }, { "docid": "04788c94df11587ee743fb2e1963f831", "score": "0.6227497", "text": "protected function afterPasses(){}", "title": "" }, { "docid": "6e5b6efaacb840dc60689eba88f80d0d", "score": "0.61961067", "text": "public function perform()\n {\n $this->action->perform();\n }", "title": "" }, { "docid": "8d27c03f5f81d3ebb3ad015fb165151f", "score": "0.61735725", "text": "public function onAction()\n {\n $this->handleMsg();\n }", "title": "" }, { "docid": "04a90edac8b375086f5195c388a66464", "score": "0.615876", "text": "abstract public function afterAuthorization();", "title": "" }, { "docid": "c4608f3062b6215b7e89140b508e0ca1", "score": "0.61454064", "text": "protected function afterSave() {\r\n }", "title": "" }, { "docid": "ca6705ae404bfbc810e782e7b6c28f14", "score": "0.6140913", "text": "public function afterControllerAction($controller, $action)\r\n {\r\n\r\n }", "title": "" }, { "docid": "778879356a3ced69eefc5d430ad04ec2", "score": "0.6139509", "text": "public function utilizatorAction()\n\t{\n\t}", "title": "" }, { "docid": "f54decc812d591efde3b1343f9495d9d", "score": "0.6122326", "text": "abstract public function postAction();", "title": "" }, { "docid": "f54decc812d591efde3b1343f9495d9d", "score": "0.6122326", "text": "abstract public function postAction();", "title": "" }, { "docid": "f44d5b0f018ee1c9f5efc9c27cbec141", "score": "0.6120701", "text": "public function onAfterRequestSet()\n {\n }", "title": "" }, { "docid": "c695551d40acd10958264e3c52ada00a", "score": "0.61119986", "text": "abstract public function action();", "title": "" }, { "docid": "55183cb4e6837746c434eb594fc90893", "score": "0.6107909", "text": "public function Action(){\n /* nothing yet */\n }", "title": "" }, { "docid": "232bc9a587bd1b50dad12fb23b675ef1", "score": "0.6098672", "text": "public function execute()\n {\n $this->_initAction()->_addBreadcrumb(__('Promotions'), __('Synchrony Promotions'));\n $this->_view->getPage()->getConfig()->getTitle()->prepend(__('Synchrony Promotions'));\n $this->_view->renderLayout();\n }", "title": "" }, { "docid": "9a0114589977af3049b65ff776ba1d74", "score": "0.6096195", "text": "public function postDispatch()\n {\n }", "title": "" }, { "docid": "602c6f083fb88b8c26045dc44c36bd57", "score": "0.609111", "text": "public function AfterUpdate()\n {\n }", "title": "" }, { "docid": "f1acd2be3f829c4f4d8c56424178b183", "score": "0.6079361", "text": "public function utileAction()\n\t{\n\t}", "title": "" }, { "docid": "10789ef08c2d706fe04328186bfa2e24", "score": "0.6060042", "text": "private function _processAction()\n {\n switch ($this->options['page_action']) {\n case \"edit\":\n try {\n if (isset($_GET[1]) && is_numeric($_GET[1])) {\n $this->_fetchClientDetails();\n }\n } catch (\\Exception $e) {\n GlobalFunction::logError($e);\n $this->options['error'] = $e->getMessage();\n }\n case \"new\":\n $this->_fetchCountries();\n $this->_fetchAccountManagers();\n break;\n\n case \"list\":\n default:\n $this->_fetchClientList();\n break;\n }\n }", "title": "" }, { "docid": "492a9c1c3ee3b1981791e794c46b36c7", "score": "0.6050646", "text": "protected function after()\n {}", "title": "" }, { "docid": "dbb580947118c7c5c8ad60e3ca53e15b", "score": "0.6043878", "text": "final protected function processAfterDeferredCalculationAction(): void\n\t{\n\t\tSku::disableDeferredCalculation();\n\t\tself::addBackgroundJob();\n\t}", "title": "" }, { "docid": "f8eb005a43ab9325b1f089e45132a334", "score": "0.6037324", "text": "public function afterAdd() {\n \n }", "title": "" }, { "docid": "e22d161c98592aa78db3f730c0c4cfa4", "score": "0.6035758", "text": "public function onExecute(Action $action)\n {\n }", "title": "" }, { "docid": "003ad532f241113f9e9e392f8b17b5b8", "score": "0.6034176", "text": "public function omgAction() {\n }", "title": "" }, { "docid": "81e52dc8a9684b7a64c463e6c22d16bf", "score": "0.6028859", "text": "protected function after()\n\t{\n//\t\techo \" (after) \";\n\t}", "title": "" }, { "docid": "a498613436b6d17b0a4c117874cdb6ce", "score": "0.6028598", "text": "public function postDispatch() {\n }", "title": "" }, { "docid": "fc62fc6ecb200aa8d0078e9c47bad14f", "score": "0.601887", "text": "protected function afterRun()\n {\n }", "title": "" }, { "docid": "f2602c7ec5c1366850ebe3c8b5c497f8", "score": "0.60159755", "text": "public function menumaintenanceAction(){\r\n\t}", "title": "" }, { "docid": "990daa4b167f9f456f7c7ca98a6ffeb3", "score": "0.601161", "text": "public function requestSentAction(){\n \t\n }", "title": "" }, { "docid": "6b95dba4b66fdd67cb7a6d5035456230", "score": "0.59977525", "text": "public function UpdateyAction(){\n\t \n\t $this->UpdateyActionVariables();\n self::SetTemplateAction($this->templateAction);\n\t \n\t}", "title": "" }, { "docid": "0c6b34a202b7587228b7edb07ad32325", "score": "0.59956014", "text": "public function beforeExecuteRoute()\n {\n }", "title": "" }, { "docid": "93d57849f1418a2723b4fe19df4a6077", "score": "0.5979398", "text": "public function action()\n {\n foreach ($this->actions as $action) {\n $action->run();\n }\n }", "title": "" }, { "docid": "b307b2cc14890d58d837c3e0fc543f3e", "score": "0.5971938", "text": "public function afterAction(SFMediator\\Event $Event);", "title": "" }, { "docid": "0d530733aad62615fec7739c2f0248ea", "score": "0.5963131", "text": "function onAfterDispatch()\n {\n }", "title": "" }, { "docid": "ed96a08eb43ee3f37ccfad2ed5ac2ebf", "score": "0.5934594", "text": "public function addAction() {\n\t\t\n\t}", "title": "" }, { "docid": "c2c94f7048a8cbd17ea87d91b83391e8", "score": "0.59333855", "text": "protected function execute()\n\t{\n\t\t// just a placeholder\n\t}", "title": "" }, { "docid": "6d999561735343eb5c8d4cb754f35696", "score": "0.59333193", "text": "public function actions();", "title": "" }, { "docid": "a1f32ab5fc96a99e261eab1c2f69a834", "score": "0.59253675", "text": "public function postDispatch() {\n\t\t$this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo ();\n\t}", "title": "" }, { "docid": "a1f32ab5fc96a99e261eab1c2f69a834", "score": "0.59253675", "text": "public function postDispatch() {\n\t\t$this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo ();\n\t}", "title": "" }, { "docid": "a1f32ab5fc96a99e261eab1c2f69a834", "score": "0.59253675", "text": "public function postDispatch() {\n\t\t$this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo ();\n\t}", "title": "" }, { "docid": "a1f32ab5fc96a99e261eab1c2f69a834", "score": "0.59253675", "text": "public function postDispatch() {\n\t\t$this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo ();\n\t}", "title": "" }, { "docid": "f28b5fbd05b84f8e59431ed603244e3b", "score": "0.5924233", "text": "public abstract function actions();", "title": "" }, { "docid": "799737daf841776abda630c147ce6dde", "score": "0.59240127", "text": "protected function initActions() { }", "title": "" }, { "docid": "18dad598a7bc4a5a27b0dd50b7327136", "score": "0.5923803", "text": "protected function preDispatch() {}", "title": "" }, { "docid": "7a48226325cc0b4b1373f6d2a6fc808b", "score": "0.59231335", "text": "protected function _afterLoad()\n {\n $this->setConditions(null);\n $this->setActions(null);\n return parent::_afterLoad();\n }", "title": "" }, { "docid": "a3c2759775529887e4282a82b271bfd4", "score": "0.591923", "text": "protected function performActionList(){\r\n\t\t// set coupon\r\n\t\t//$this->performActionCoupon();\r\n\t\t// add order\r\n\t\t$this->performActionBuy();\r\n\t\t\r\n\t\t// some other ...\r\n\t}", "title": "" }, { "docid": "82320612cc7575e2ad8364d390b17015", "score": "0.5913645", "text": "public function lastAction();", "title": "" }, { "docid": "330afb14abf8976addc1f3af8895030c", "score": "0.59108794", "text": "protected function processActions()\n\t{\n\t\tif (!check_bitrix_sessid())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$actionFilter = $this->getFilter();\n\t\t$actionIds = array();\n\n\t\tif (isset($_REQUEST['ID']))\n\t\t{\n\t\t\tif (is_array($_REQUEST['ID']))\n\t\t\t{\n\t\t\t\tforeach ($_REQUEST['ID'] as $key => $ID)\n\t\t\t\t{\n\t\t\t\t\t$ID = (int)$ID;\n\t\t\t\t\tif ($ID > 0 && !in_array($ID, $actionIds))\n\t\t\t\t\t{\n\t\t\t\t\t\t$actionIds[] = $ID;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif (is_numeric($_REQUEST['ID']))\n\t\t\t{\n\t\t\t\t$actionIds[] = (int)$_REQUEST['ID'];\n\t\t\t}\n\t\t}\n\t\t$actionFilter[\"ID\"] = count($actionIds) ? $actionIds : -1;\n\t\t$action = $_REQUEST['action'];\n\n\t\t$event = new Main\\Event(\n\t\t\t'citrus.arealtypro',\n\t\t\tstatic::ON_BEFORE_ACTION,\n\t\t\tarray(\n\t\t\t\t'action' => $action,\n\t\t\t\t'ids' => $actionIds,\n\t\t\t\t'filter' => $actionFilter,\n\t\t\t\t'component' => $this,\n\t\t\t)\n\t\t);\n\t\tMain\\EventManager::getInstance()->send($event);\n\n\t\t/**\n\t\t * Esli hotya bi odin obrabotchik vernul rezulytat SUCCESS sdelaem redirekt\n\t\t */\n\t\tforeach ($event->getResults() as $result)\n\t\t{\n\t\t\tif ($result->getType() == Main\\EventResult::SUCCESS)\n\t\t\t{\n\t\t\t\tLocalRedirect($this->getBackUrl() ?: $this->getListUrl());\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Esli obrabotchiki dobavili oshibki sdelaem redirekt\n\t\t */\n\t\tif ($this->hasErrors())\n\t\t{\n\t\t\tLocalRedirect($this->getBackUrl() ?: $this->getListUrl());\n\t\t}\n\n\t\tif ($action === 'delete')\n\t\t{\n\t\t\t$rsElementDel = CIBlockElement::GetList(array(), $actionFilter, false, false, array(\"ID\"));\n\t\t\t$obElementDel = new CIBlockElement();\n\t\t\t$cnt = 0;\n\t\t\twhile ($arElementDel = $rsElementDel->Fetch())\n\t\t\t{\n\t\t\t\tif (!$this->getRights()->canDoOperation(RightsProvider::OP_ELEMENT_DELETE, $arElementDel['ID']))\n\t\t\t\t{\n\t\t\t\t\t$this->pushError(Loc::getMessage('C_ELEMENT_DELETE_ACCESS_DENIED', ['ID' => $arElementDel['ID']]));\n\t\t\t\t}\n\n\t\t\t\tif ($obElementDel->Delete($arElementDel[\"ID\"]))\n\t\t\t\t{\n\t\t\t\t\t$cnt++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($cnt > 0)\n\t\t\t{\n\t\t\t\t$this->pushMessage(Loc::getMessage('C_ELEMENTS_DELETED'));\n\t\t\t}\n\n\t\t\tLocalRedirect($this->getBackUrl() ?: $this->getListUrl());\n\t\t}\n\t}", "title": "" }, { "docid": "b0f43014d4775841ba2eb611f5d7d401", "score": "0.5909514", "text": "public function manageAction()\n {\n \n }", "title": "" }, { "docid": "de722fb7d784a79cfa5d126916adcbd2", "score": "0.5907166", "text": "public function donepro() {\r\n $etat = $this->filterDashboardByState('2');\r\n $this->set(compact('etat'));\r\n }", "title": "" }, { "docid": "078c6679aef690a5d8c5310d98a63ded", "score": "0.5902341", "text": "public function preExecute()\n {\n if (clsCommon::permissionCheck($this->getModuleName().\"/\".$this->getActionName()) == false){\n $this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n $this->redirect('default/index');\n }\n }", "title": "" }, { "docid": "39ac8a9d3baa9d6707bd19fb155102a1", "score": "0.5898283", "text": "protected function _post() {}", "title": "" }, { "docid": "41ad999e6ba3aa3342fddb45a50485e0", "score": "0.58981353", "text": "public function after() {\n\t\t$this->_beans_default_calls();\n\t\t\n\t\t$this->_view->layout_scripts = $this->_scripts;\n\n\t\tif( $this->_action_tab_name AND \n\t\t\t$this->_action_tab_uri )\n\t\t{\n\t\t\t// Make sure that the uri starts with a slash.\n\t\t\t$this->_action_tab_uri = ( substr($this->_action_tab_uri,0,1) == \"/\" )\n\t\t\t\t\t\t\t\t ? $this->_action_tab_uri\n\t\t\t\t\t\t\t\t : '/'.$this->_action_tab_uri;\n\t\t\t$tab_links = Session::instance()->get('tab_links');\n\t\t\t$new_tab = TRUE;\n\t\t\tforeach( $tab_links as $tab_link )\n\t\t\t\tif( $tab_link['url'] == $this->_action_tab_uri )\n\t\t\t\t\t$new_tab = FALSE;\n\n\t\t\tif( $new_tab )\n\t\t\t{\n\t\t\t\t$tab_links[] = array(\n\t\t\t\t\t'url' => $this->_action_tab_uri,\n\t\t\t\t\t'text' => $this->_action_tab_name,\n\t\t\t\t\t'removable' => TRUE,\n\t\t\t\t);\n\n\t\t\t\tSession::instance()->set('tab_links',$tab_links);\n\t\t\t}\n\t\t}\n\n\t\tif( Session::instance()->get('global_error_message') ) {\n\t\t\t$this->_view->send_error_message(Session::instance()->get('global_error_message'));\n\t\t\tSession::instance()->delete('global_error_message');\n\t\t}\n\t\t\n\t\tif( Session::instance()->get('global_success_message') ) {\n\t\t\t$this->_view->send_success_message(Session::instance()->get('global_success_message'));\n\t\t\tSession::instance()->delete('global_success_message');\n\t\t}\n\t\t\n\t\tif( get_class($this->_view) != \"stdClass\" ){\n\t\t\t$this->response->body($this->_view->render());\n\t\t}\n\t\telse{\n\t\t\t$this->response->body('Error! Could not find view class: '.$this->_view_class);\t\n\t\t}\n\n\t\t// Append debug data in case we're in development mode.\n\t\tif( Kohana::$environment == Kohana::DEVELOPMENT )\n\t\t\t$this->response->body($this->response->body().'<div class=\"wrapper\"><br><br><br><br><br><br><hr><hr><hr><br><br><br><br><br><br><h1>Debug Output:</h1><br>'.View::factory('profiler/stats')->render().'<br><br><br><br><br><br></div>');\n\t}", "title": "" }, { "docid": "4bc364f1038818a81cc83816f2aaf29a", "score": "0.5897691", "text": "public function addAction() {\r\n\t}", "title": "" }, { "docid": "02e7062ef7ab7d3167f60c10e55eacc3", "score": "0.589068", "text": "public function after() {}", "title": "" }, { "docid": "70a0de16c1ab52642266068dd52e413e", "score": "0.58891827", "text": "public function postDispatch()\n {\n $this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo();\n }", "title": "" }, { "docid": "1b6df5a4516ebaf2048154ce4c6e7b6a", "score": "0.58814687", "text": "public function execute()\n {\n $this->receiver->defenseAction();\n }", "title": "" }, { "docid": "5e7c9a4e0c0fff147ea90749432d9516", "score": "0.5876829", "text": "public function execute()\n {\n $keys = array_keys($this->actions);\n $count = count($keys);\n\n // retrieve current render mode\n $renderMode = $this->controller()->getRenderMode();\n\n // force all actions at this point to render to variable\n $this->controller()->setRenderMode(Xadr::RENDER_VARIABLE);\n\n for ($i = 0; $i < $count; $i++) {\n $action =& $this->actions[$keys[$i]];\n\n if ($this->preserve && $action['params'] != null) {\n $originalParams = $this->request()->parameters()->getArrayCopy();\n }\n\n if ($action['params'] != null) {\n $this->request()->parameters()->setMerge($action['params']);\n }\n\n // execute/forward the action and retrieve rendered result\n $this->controller()->forward($action['unit'], $action['action']);\n\n // retrieve renderer for action\n $renderer =& $this->request()->attributes()->get('org.mojavi.renderer');\n\n // did the action render a view?\n if ($renderer !== null) {\n // retrieve rendered result\n $action['result'] = $renderer->fetchResult();\n // clear rendered result\n $renderer->clearResult();\n // remove renderer\n $this->request()->attributes()->remove('org.mojavi.renderer');\n }\n\n if (isset($originalParams)) {\n $this->request()->parameters()->exchangeArray($originalParams);\n unset($originalParams);\n }\n }\n\n // put the old rendermode back\n $this->controller()->setRenderMode($renderMode);\n }", "title": "" }, { "docid": "c1aa68be68297b65c716c12533f804ee", "score": "0.5876234", "text": "public function afterAction(Request $request);", "title": "" }, { "docid": "ab7ecdb2ac6c455ffd11744dfc4728b6", "score": "0.58751756", "text": "public function updateAction()\n\t{\n\t}", "title": "" }, { "docid": "1da165d84c8b9395f4f405135ee3210f", "score": "0.58700335", "text": "public function execute ()\n\t{\n\t\t$this->_forward('edit');\n\t}", "title": "" }, { "docid": "7f36c3a99ff07f5a1a26ebbfe1769494", "score": "0.5856892", "text": "public function preExecute()\n {\n if (clsCommon::permissionCheck($this->getModuleName().\"/\".$this->getActionName()) == false){\n $this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n $this->redirect('default/index');\n }\n }", "title": "" }, { "docid": "7f36c3a99ff07f5a1a26ebbfe1769494", "score": "0.5856892", "text": "public function preExecute()\n {\n if (clsCommon::permissionCheck($this->getModuleName().\"/\".$this->getActionName()) == false){\n $this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n $this->redirect('default/index');\n }\n }", "title": "" }, { "docid": "46c837c32de0a9a93cfb81825276a32f", "score": "0.5847967", "text": "function onProcess () {\r\n switch (parent::getAction()) {\r\n case \"save\":\r\n if (Context::hasRole(\"company.employee.edit\")) {\r\n parent::param(\"mode\",parent::post(\"mode\"));\r\n }\r\n parent::blur();\r\n parent::redirect();\r\n break;\r\n case \"edit\":\r\n if (Context::hasRole(\"company.employee.edit\")) {\r\n parent::focus();\r\n }\r\n break;\r\n default:\r\n if (parent::get(\"companyId\") == self::modeSelectedCompany) {\r\n Context::getSelection()->company = parent::get(\"companyId\");\r\n } else if (parent::param(\"mode\") == self::modeCurrentCompany) {\r\n $company = CompanyModel::getMainUserCompany(Context::getUserId());\r\n Context::getSelection()->company = $company->id;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "d0f9d57c56bd090246ce95f01916df3d", "score": "0.58444697", "text": "private function _redirectAction()\r\n {\r\n //Redirect to the real action to process If no actionKey = list page.\r\n // echo $this->_actionKey;\r\n //exit;\r\n switch ($this->_actionKey)\r\n {\r\n case 'add':\r\n $this->addAction();\r\n $this->_helper->viewRenderer->setRender('add');\r\n break;\r\n case 'edit':\r\n $this->editAction();\r\n $this->_helper->viewRenderer->setRender('edit');\r\n break;\r\n case 'delete':\r\n $this->deleteAction();\r\n $this->_helper->viewRenderer->setRender('delete');\r\n break;\r\n default:\r\n if(isset($this->_actionKey)){\r\n $this->_listAction($this->_objectList[$this->_actionKey]);\r\n }\r\n else{\r\n $this->_listAction($this->_objectList[$this->_currentAction]);\r\n }\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "6c013986a1246bf0ae44ec18c1162789", "score": "0.5838509", "text": "public function proccess()\n \t{\n\t}", "title": "" }, { "docid": "064f71053672349b5521a31017e07929", "score": "0.5838199", "text": "public function preDispatch()\n {\n parent::preDispatch();\n \n }", "title": "" }, { "docid": "fa5c7649d635fb355ae410d79a70b77f", "score": "0.5838017", "text": "public function novoAction() { }", "title": "" } ]
9778c904166629fd4a6ba417094a125c
Add or replace the model's document representation in the index.
[ { "docid": "5ee594a74719e11a817001bf14938581", "score": "0.0", "text": "public function save($model);", "title": "" } ]
[ { "docid": "02e43a3f008705fe25d09aa966fed650", "score": "0.69685656", "text": "public function addDocToIndex()\n {\n if (isset($this->data)) {\n $this->filter();\n $this->normalize();\n $this->selectIndexService();\n $index = $this->control->getIndex();\n if ($this->enableSearchById) {\n $index->includePrimaryKey();\n }\n $index->insert($this->data);\n echo 'Inserted' . PHP_EOL;\n } else {\n echo 'Please Insert Data To Add First';\n }\n\n }", "title": "" }, { "docid": "e3e09ef23de4182219712c47b4de3017", "score": "0.6560744", "text": "protected function addToIndex()\n\t\t{\n\t\t\ttry{\n\t\t\t\t$index = Zend_Search_Lucene::open(self::getIndexFullpath());\n\t\t\t\t\n\t\t\t\t/*$logger = Zend_Registry::get('logger');\n\n\t\t\t\t$logger->warn('at addto index');*/\n\t\t\t}\n\t\t\tcatch(Exception $ex)\n\t\t\t{\n\t\t\t\tself::RebuildIndex();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\ttry{\n\t\t\t\t$query=new Zend_Search_Lucene_Search_Query_Term(new Zend_Search_Lucene_Index_Term($this->getId(), 'product_id')\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$hits = $index->find($query);\n\t\t\t\tforeach($hits as $hit)\n\t\t\t\t{\n\t\t\t\t\t$index->delete($hit->id);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->status =='L')\n\t\t\t\t{\n\t\t\t\t\t$index->addDocument($this->getIndexableDocument());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$index->commit();\n\t\t\t}\n\t\t\tcatch (Exception $ex) \n\t\t\t{\n\t\t\t\t$logger = Zend_Registry::get('logger');\n\t\t\t\t$logger->warn('Error updateing document in search index: '.$ex->getMessage());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4ce5aa9bb22db89cfd8a68c4bf491c7f", "score": "0.6436903", "text": "public function testUpdateDocInIndex()\n {\n //Updates the index files\n $this->name = 'CoreProduct';\n //Whatever that is being saved using modal should be saved using theese functions also\n $this->data = ['id' => 28, 'name' => 'Qalam'];\n $this->updateDocInIndex();\n }", "title": "" }, { "docid": "b17018843643dd74a78c90ac5d9fa655", "score": "0.6407314", "text": "public function updateDocInIndex()\n {\n if (isset($this->data)) {\n $this->filter();\n $this->normalize();\n $this->selectIndexService();\n $index = $this->control->getIndex();\n if ($this->enableSearchById) {\n $index->includePrimaryKey();\n }\n $index->update($this->id, $this->data);\n echo 'Updated' . PHP_EOL;\n } else {\n echo 'Please Insert Data To Update First';\n }\n\n }", "title": "" }, { "docid": "b2f0dd89bfdf89c06120f15bef06c151", "score": "0.61322033", "text": "public function add() {\n $name = $this->getNewIndexName();\n $index = $this->getRealIndex($name);\n $index->create($this->search_api_index->options['search_api_elasticsearch'] ?: [], TRUE);\n }", "title": "" }, { "docid": "236c7b70436abd72332a770ff522ecb7", "score": "0.6032418", "text": "public function testAddDocToIndex()\n {\n $this->name = 'CoreProduct';\n $this->data = ['id' => 455555, 'name' => 'Menumenu'];\n $this->addDocToIndex();\n }", "title": "" }, { "docid": "e3bd14ac0663f67654ab746f46a84ab0", "score": "0.5996525", "text": "public function reload()\n {\n if ($this->client->indices()->exists(['index' => $this->name])) {\n $this->client->indices()->delete(['index' => $this->name]);\n }\n $this->create();\n }", "title": "" }, { "docid": "500b814397d2ddfc5addcfcc9e9ebb50", "score": "0.59012586", "text": "function updateSearchIndex() {\n\t\t$this->owner->SearchIndex = self::buildSearchIndex($this->owner);\n\t}", "title": "" }, { "docid": "4209ba4945063bd99130890dd4e0aeda", "score": "0.5831996", "text": "public function actionIndex()\n {\n $elastic = new ElasticCmsDocument();\n// $elastic->doc_id = '0001';\n// $elastic->doc_subject = 'a 5';\n// if ($elastic->insert()) {\n// echo \"Added Successfully\";\n// } else {\n// echo \"Error\";\n// }\n $elastic->deleteIndex();\n $elastic->updateMapping();\n $elastic->createIndex();\n $elastic->reIndex();\n\n }", "title": "" }, { "docid": "b7fc1487242e387a839391f1e7b71fdc", "score": "0.57780135", "text": "public function add_or_update_document($o, $new=false)\n {\n $status = SettingsManager::get_instance()->get(Constants::OPTION_INDEX_STATUS);\n $builder = $this->document_builder_factory->create($o);\n\n $indexable = $builder->is_indexable($o);\n\n if ($indexable) {\n $private = $builder->is_private($o);\n \n if (is_multisite()) {\n $blog_id = get_current_blog_id();\n $primary = $status[$blog_id]['index'] == \"primary\";\n } else {\n $primary = $status['index'] == \"primary\";\n }\n \n $private_fields = $builder->has_private_fields();\n \n $document = $builder->build($o, false);\n \n if ($private_fields) {\n $private_document = $builder->build($o, true);\n } else {\n $private_document = $document;\n }\n\n $id = $builder->get_id($o);\n $doc_type = $builder->get_type($o);\n $mapping_type = $builder->get_mapping_type($o);\n\n // ensure the document and id are valid before indexing\n if (isset($document) && !empty($document) &&\n isset($id) && !empty($id)) {\n if (!$private) {\n // index public documents in the public repository\n $public_type = $this->type_factory->create($mapping_type, false, false, $primary);\n if ($public_type) {\n if ($this->bulk) {\n $this->queue($public_type, new \\Elastica\\Document($id, $document));\n } else {\n $public_type->addDocument(new \\Elastica\\Document($id, $document));\n }\n }\n if ($new) {\n $public_type = $this->type_factory->create($mapping_type, false, false, !$primary);\n if ($public_type) {\n if ($this->bulk) {\n $this->queue($public_type, new \\Elastica\\Document($id, $document));\n } else {\n $public_type->addDocument(new \\Elastica\\Document($id, $document));\n }\n }\n }\n }\n // index everything to private index\n $private_type = $this->type_factory->create($mapping_type, false, true, $primary);\n if ($private_type) {\n if ($this->bulk) {\n $this->queue($private_type, new \\Elastica\\Document($id, $private_document));\n } else {\n $private_type->addDocument(new \\Elastica\\Document($id, $private_document));\n }\n }\n if ($new) {\n $private_type = $this->type_factory->create($mapping_type, false, true, !$primary);\n if ($private_type) {\n if ($this->bulk) {\n $this->queue($private_type, new \\Elastica\\Document($id, $private_document));\n } else {\n $private_type->addDocument(new \\Elastica\\Document($id, $private_document));\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "150686cd8e5ff1828933f0d71d744d8b", "score": "0.5713445", "text": "public function updated(Model $indexable)\n {\n $this->indexDocument($indexable);\n }", "title": "" }, { "docid": "25a464638fc1b8b6ac464bc25f1c413f", "score": "0.5673169", "text": "public function updateIndex()\n {\n $indexer = new BusinessIndexer($this);\n $indexer->index();\n }", "title": "" }, { "docid": "5a38511557bcc0865330ad7bc1d43055", "score": "0.5626769", "text": "public function put_index()\n {\n $content = self::getRequest();\n\n $tagged = $content->tagged_with;\n $id = $content->id;\n unset($content->tagged_with, $content->id, $content->position_id);\n\n // find the model to update\n $position = Model_Position::find($id);\n\n if ($position !== null) {\n unset($content->id);\n foreach (get_object_vars($content) as $propName => $propValue) {\n $position->$propName = $propValue;\n }\n unset($position->tags);\n\n try {\n $position->save();\n\n // update the position's tags\n $tags = Model_Postag::find()\n ->where('position_id', $position->id)->get();\n\n foreach ($tags as $tag) {\n $t = Model_Postag::find($tag->id);\n $t->delete();\n }\n // add the new tags\n foreach (explode(',', $tagged) as $tag) {\n $val = array(\n 'position_id' => $position->id,\n 'tag' => trim($tag)\n );\n $p = new Model_Postag($val);\n $p->save();\n }\n\n } catch (\\Exception $e) {\n $this->response($this->_parseErrors($e), 400);\n }\n }\n }", "title": "" }, { "docid": "7e854998bb5f7b6a84a6b2d41e9fbd55", "score": "0.56063354", "text": "public function persist() {\n\n\t \t\t$this->setModelValues();\n\n\t \t parent::persist($this->getModel());\n\t \t $this->__construct();\n\t \t \t $this->index($this->getPage());\n\t }", "title": "" }, { "docid": "db8fdc3386c1613894933618f7ad87cd", "score": "0.56007665", "text": "public function createOrReplaceDocument(StateDocument $document);", "title": "" }, { "docid": "266aa586eedc5e693ade5344721ea761", "score": "0.5590237", "text": "public function index($document);", "title": "" }, { "docid": "b56cdd58987fd48894108a214e73d7f5", "score": "0.5583839", "text": "public function created(Model $indexable)\n {\n $this->indexDocument($indexable);\n }", "title": "" }, { "docid": "32eed24d11d276d3062c507bf195906e", "score": "0.55637974", "text": "public function restored(Model $indexable)\n {\n $this->indexDocument($indexable);\n }", "title": "" }, { "docid": "a7c7b917a9d230e722cbcb3281183c1c", "score": "0.5515043", "text": "public function actionAddDocField($index)\n {\n $model = new ArticleFile();\n\t\t$this->renderPartial('_adddoc', array(\n\t\t\t'model' => $model,\n\t\t\t'index' => $index,\n\t\t), false, false);\n\t}", "title": "" }, { "docid": "fcbfa55f1c89475e9ec9627af2652723", "score": "0.54724103", "text": "public function updateIndex()\n {\n if (isset($this->name)) {\n $this->normalize();\n exec($this->path . \"bin/indexer --rotate \" . $this->Dname . \" --config \" . $this->path . \"bin/sphinx.conf\", $o);\n print_r($o);\n } else {\n exec($this->path . \"bin/indexer --rotate --all --config \" . $this->path . \"bin/sphinx.conf\", $o);\n print_r($o);\n }\n }", "title": "" }, { "docid": "8720fc836fa1bc5092b4ff6495c3a720", "score": "0.54182094", "text": "public function persist(DocumentInterface $document)\n {\n $documentArray = $this->converter->convertToArray($document);\n $typeMapping = $this->getMetadataCollector()->getDocumentMapping($document);\n\n $this->bulk('index', $typeMapping['type'], $documentArray);\n }", "title": "" }, { "docid": "c61abeff34ce8d4a942806923838edc6", "score": "0.54111886", "text": "public function index()\n {\n if ($this->luceneIndex->count() !== 0) {\n $this->luceneIndex = Lucene::create($this->indexDirectory);\n }\n\n /** @var \\yii\\db\\ActiveRecord $model */\n foreach ($this->models as $model) {\n if (!is_subclass_of($model::className(), __NAMESPACE__ . '\\SearchInterface')) {\n throw new InvalidConfigException('The model object must implement `SearchInterface`');\n }\n /** @var SearchInterface $page */\n foreach ($model::find()->all() as $page) {\n $this->luceneIndex->addDocument(\n $this->createDocument($page->getSearchTitle(), $page->getSearchBody(), $page->getSearchUrl())\n );\n }\n }\n }", "title": "" }, { "docid": "c14361761830a5943221e89e1ce53339", "score": "0.5402654", "text": "abstract protected function updateObject(UllFlowDoc $doc);", "title": "" }, { "docid": "5286cb52e43250fe679078d226936561", "score": "0.53995985", "text": "function update_post_index($id, $title, $text, $summary, $tags = array(), $author, $lang, $file_path, $normalized_title, $custom_name = '', $version = 1)\n{\n $index = get_post_index();\n $post_versions = get_post_versions($id);\n \n // is a new post?\n if ($post_versions === false)\n {\n // create index entry for post version object\n $post_version = array( // versions of this post\n array( // this post\n \"title\" => $title,\n \"summary\" => $summary,\n \"normalized_title\" => $normalized_title,\n \"timestamp\" => time(),\n \"tags\" => $tags,\n \"file\" => $file_path,\n \"author\" => $author,\n \"lang\" => $lang,\n \"version\" => $version\n )\n );\n \n $index['posts'][$id] = $post_version;\n }\n else // create a new version of an existing post\n {\n $version = array(\n \"title\" => $title,\n \"summary\" => $summary,\n \"normalized_title\" => $normalized_title,\n \"timestamp\" => time(),\n \"tags\" => $tags,\n \"file\" => $file_path,\n \"author\" => $author,\n \"lang\" => $lang,\n \"version\" => $version\n );\n \n // add at the begining of the versions\n array_unshift($index['posts'][$id], $version);\n }\n \n // update the index file\n $json = json_encode($index, JSON_UNESCAPED_UNICODE);\n echo '++'.$normalized_title.'++';\n echo '**'.$json.'**';\n \n $index_path = 'conf/metadata2.json';\n write_file($index_path, $json);\n \n // reload index to session\n load_post_index();\n}", "title": "" }, { "docid": "bbbf9717d1e67d35bd18a5912a3d2298", "score": "0.53883076", "text": "public function getIndexableDocument()\n\t{\t\n\t\t$doc = new Zend_Search_Lucene_Document();\n\t\t$doc->addField(Zend_Search_Lucene_Field::keyword('content_id', $this->getId()));\t\t\n\t\t$doc->addField(Zend_Search_Lucene_Field::unIndexed('content_name', $this->name));\n\t\t$doc->addField(Zend_Search_Lucene_Field::text('content_slug', $this->slug));\n\t\t$doc->addField(Zend_Search_Lucene_Field::text('content_description', $this->description));\n\t\t$doc->addField(Zend_Search_Lucene_Field::unIndexed('content_date', $this->date));\t\t\n\t\treturn $doc;\n\t}", "title": "" }, { "docid": "1a93fd066b0a6970beadd39aa1955456", "score": "0.53635114", "text": "public function create() {\n $index = $this->getRealIndex();\n $index->create($this->search_api_index->options['search_api_elasticsearch'] ?: [], TRUE);\n $index->addAlias($this->search_api_index->machine_name);\n }", "title": "" }, { "docid": "d71ac4602ef5c76a2793d5caa1c0ac07", "score": "0.5311565", "text": "function _render_index_bindModel(){\n\t}", "title": "" }, { "docid": "da06a3754a16b20973ca8af99bf6b33c", "score": "0.52930963", "text": "function putIndex(){\n\n }", "title": "" }, { "docid": "fb687bd00d718208a236316a941aa346", "score": "0.5286953", "text": "public function forceindexupdateAction(){\n\t$this->_helper->solrUpdater->update('beowulf', $this->_getParam('findID'));\n }", "title": "" }, { "docid": "0f16329b67e75ba7d206187878a9bc84", "score": "0.52865607", "text": "public function store($record)\n\t{\n\t\t$params['index'] = $this->getName();\n\t\t$params['type'] = $record['type'];\n\t\t$params['id'] = $record['id'];\n\t\t$params['body'] = $record['data'];\n\n\t\tself::getClient()->index($params);\n\t}", "title": "" }, { "docid": "03e9171c67de609a1e98b78122229cf8", "score": "0.5285635", "text": "function add_index() {}", "title": "" }, { "docid": "486a965d86814dc125623bb21f4af997", "score": "0.52666956", "text": "private function updateElasticSearchIndex($object)\n {\n $careHome = [\n 'id' => $object->getId(),\n 'title' => $object->getTitle(),\n 'address' => [\n 'postcode' => $object->getPostcode(),\n ],\n 'location' => [\n 'lat' => $object->getLat(),\n 'lon' => $object->getLon(),\n ]\n ];\n\n // Create document\n $careHomeDocument = new Document($object->getId(), $careHome);\n\n // Get care home index\n $careHomeIndex = $this->client->getIndex(self::ES_INDEX);\n\n // Get care home type\n $careHomeType = $careHomeIndex->getType(self::ES_TYPE);\n $careHomeType->addDocument($careHomeDocument);\n\n // Save\n $careHomeType->getIndex()->refresh();\n }", "title": "" }, { "docid": "172bc061da9e6de0a74dc69f27d6896d", "score": "0.5260067", "text": "public function storeDocument(Document $document, string $index): void\n {\n $client = new Client();\n $response = $client->put(\n $this->buildUrl($index, '_doc', $document->getId()),\n json_encode($document->getData()),\n [\n 'headers' => [\n 'Content-Type' => 'application/json',\n ],\n ]\n );\n\n $this->validateResponse($response, 201);\n }", "title": "" }, { "docid": "995ab5b17223a9338c82e41a08458196", "score": "0.52538514", "text": "public function onTNTSearchReIndex(): void\n {\n $this->GravTNTSearch()->createIndex();\n }", "title": "" }, { "docid": "c759bae59d623dbb53b160ad05c37fda", "score": "0.5238751", "text": "protected function indexDocument(Model $indexable)\n {\n try {\n $this->indexer->indexDocument($indexable);\n } catch (Exception $exception) {\n Log::critical('ej:es:indexing:observer ' . $exception->getMessage(), $indexable->toArray());\n }\n }", "title": "" }, { "docid": "50e772f8a3808938ad1d7e9582a30073", "score": "0.522761", "text": "abstract public function index($document, $id = false, array $options = array());", "title": "" }, { "docid": "e999f69436b07cef49e1bfe49ae832e3", "score": "0.5207156", "text": "public function edit(Document $doc, Request $request)\n {\n $breadcrumbs = [\n ['link' => \"/\", 'name' => \"Главная\"],\n ['link' => \"/admin/doc\", 'name' => \"Документы\"],\n ['name' => \" Редактирование\"]\n ];\n\n\n $tags = Tag::where('active', 1)->orderByDesc('hits')->get();\n\n $sTags = $doc->tags->pluck('id')->toArray();\n\n\n // корректная версия документа\n $curVersion = 0;\n // выбраная версия документа\n $selVersion = ($request->izm) ?: 0;\n // текст для отображения, в завистмости от корректной версии или выбраных изменеий\n $curText = $doc->text;\n\n\n // получаю редакции документа и сортирую по дате вступления\n $edition = Izm::where('document_current_id', $doc->id)->select('izms.*')\n ->join('documents', 'documents.id', '=', 'izms.document_id')\n ->orderByDesc('documents.date_vst')\n ->orderByDesc('izms.id')\n ->get();\n\n // если есть редакции , ищем корректную версию\n $query = Izm::where('document_current_id', $doc->id)\n ->select('izms.*')\n ->join('documents', 'documents.id', '=', 'izms.document_id')\n ->orderByDesc('documents.date_vst')\n ->orderByDesc('izms.id')\n ->where('documents.date_vst', '<=', date('Y-m-d'))\n ->first();\n if ($query) {\n $curVersion = $query->id;\n $curText = $query->text;\n $selVersion = (!isset($request->izm)) ? $curVersion : $selVersion;\n }\n\n if (isset($request->izm) && $request->izm != $curVersion) {\n //Log::info($request->izm);\n if ($request->izm == '0') {\n $curText = $doc->text;\n } else {\n $izmVer = Izm::find($request->izm);\n $curText = $izmVer->text;\n $request->session()->now('message', 'Просматриваете не актуальную версию!');\n }\n }\n\n // Вносит изменения\n $toEdition = Izm::where('document_id', $doc->id)->get();\n $idIzm = $toEdition->pluck('document_current_id');\n $toEdition = Doc::whereIn('id', $idIzm)->get();\n\n\n return view('backend.pages.doc.edit', compact('doc', 'breadcrumbs',\n 'edition',\n 'curText',\n 'tags',\n 'sTags',\n 'selVersion',\n 'toEdition',\n 'curVersion'\n ));\n }", "title": "" }, { "docid": "2d6f166731ea406954b55bd54f14ca7d", "score": "0.51955336", "text": "public static function reindex()\n {\n $i = 1;\n $subjects = self::ordered()->get();\n foreach ($subjects as $subject) {\n $subject->index = $i;\n $subject->save();\n $i++;\n }\n }", "title": "" }, { "docid": "b7e22c60951c510d7cd114b8100d8fed", "score": "0.5167132", "text": "public function store(Request $request, Documents $document)\n {\n /*$areas = Areas::whereIn('id', $request->input('areas'))->get();*/\n if ($request->input('DocGeneral') == 1) {\n $areaid = Areas::pluck('id');\n }else{\n $areaid = $request->input('areas');\n }\n \n // se almacena el archivo\n $path = $request->file('DocSrc')->store('public/'.$request->input('DocType'));\n\n // se extraen los metadotos\n $archivo = $request->file('DocSrc');\n $mime = $archivo->getClientMimeType();\n $nombreorigi = $archivo->getClientOriginalName();\n $tamaño = ceil(($archivo->getClientSize())/1024);\n\n // se crea el registro del documento en la base de datos\n $document = new Documents();\n $document->DocName = $request->input('DocName');\n $document->DocVersion = $request->input('DocVersion');\n $document->DocCodigo = $request->input('DocCodigo ');\n $document->DocType = $request->input('DocType');\n $document->DocPublisher = $request->input('DocPublisher');\n $document->DocGeneral = $request->input('DocGeneral');\n $document->DocSrc = $path;\n $document->DocMime = $mime;\n $document->DocOriginalName = $nombreorigi;\n $document->DocSize = $tamaño;\n $document->users_id = Auth::user()->id;\n $document->save();\n\n $document->areas()->attach($areaid);\n /*$document->assignAreas($areas);*/\n\n // redireccionamiento al index de documentos\n return redirect()->route('documents.index')->withStatus(__('Documento creado correctamente')); \n }", "title": "" }, { "docid": "f5c1b9ce9fad7882d807199c6f923996", "score": "0.51571685", "text": "protected static function recreateSearchIndex($model)\n {\n if (! $index = SearchIndex::for($model)) {\n return;\n }\n\n $language = config('searchable.language', 'english');\n\n $vectorQuery = collect($model->composeSearchIndex())\n ->filter(function ($value, $key) {\n return in_array($key, ['A', 'B', 'C', 'D']) && ! empty($value);\n })\n ->map(function ($value, $key) use ($language) {\n $content = self::sanitizeTSVectorInput($value);\n return \"setweight(to_tsvector('{$language}', '{$content}'), '{$key}')\";\n })\n ->implode(' || ');\n\n $index->update([\n 'vector' => DB::raw($vectorQuery),\n ]);\n\n $index->save();\n }", "title": "" }, { "docid": "a555bcffcf1bf14be51a285b95ea978a", "score": "0.51394314", "text": "function index()\n {\n try {\n if (!empty($this->chunks)) {\n foreach ($this->chunks as $chunk) {\n $doc = new XapianDocument();\n $this->indexer->set_document($doc);\n if (!empty($chunk->terms)) {\n foreach ($chunk->terms as $term) {\n /* FIXME: think of getting weight */\n $doc->add_term($term['flag'] . $term['name'], 1);\n }\n }\n\n // free-form index all data array (title, content, etc)\n if (!empty($chunk->data)) {\n foreach ($chunk->data as $key => $value) {\n $this->indexer->index_text($value, 1);\n }\n }\n $doc->set_data($chunk->xapian_data, 1);\n $did = $this->db->add_document($doc);\n\n //write to disk\n $this->db->flush();\n\n return $did;\n }\n }\n } catch (Exception $e) {\n Display::display_error_message($e->getMessage());\n exit(1);\n }\n }", "title": "" }, { "docid": "a9a388cec400a914892392d1c68b407a", "score": "0.51366806", "text": "public function attachIndex()\n {\n if (isset($this->name)) {\n if (!isset($this->Dname)) {\n $this->normalize();\n }\n $res = $this->mainP->Query(\"attach index \" . $this->Dname . \" to rtindex \" . $this->Dname . \"Rt\");\n $res = $res->execute();\n var_dump($res);\n }\n }", "title": "" }, { "docid": "1dc1f763a95db77cac79eb0412bf643c", "score": "0.51206285", "text": "function change_index($data = array()) {\n global $CFG, $DB;\n\n require_once(dirname(__FILE__).'/include/comms/class.EphorusApi.php');\n\n $index = isset($data['index']) ? $data['index'] : $DB->get_field('plagiarism_eph_document', 'visible', array('guid' => $data['document_guid']));\n $index = ($index == 1) ? 2 : 1;\n if ($index) {\n $ephorus_service = new EphorusService();\n $ephorus_service->visibilityService($data['document_guid'], $index);\n }\n\n /*if(isArray($result) || !$index) {\n header(\"HTTP/1.0 500 Internal Server Error\");\n return get_string('indexError', 'plagiarism_ephorus');\n }*/\n header('Location: '.$_SERVER['HTTP_REFERER']);\n}", "title": "" }, { "docid": "3598974e89b471bb21b36860ecb400d0", "score": "0.51096916", "text": "public function merge() {\n\n\t \t\t $this->setModelValues();\n\n\t \t \t parent::merge($this->getModel());\n\t \t \t $this->__construct();\n\t \t \t $this->index($this->page);\n\t }", "title": "" }, { "docid": "1be2a70d61c534261d5373f646d591a5", "score": "0.5103603", "text": "public function create()\n {\n return view('admin.document.doc-add');\n }", "title": "" }, { "docid": "6acc33e7d733f597f44011e17fd8d464", "score": "0.5101361", "text": "public function saveIndex($items);", "title": "" }, { "docid": "7782c2dbe9a18ea182a7b966e9f88fb0", "score": "0.5094404", "text": "public function enableIndex()\n {\n $this->index = true;\n }", "title": "" }, { "docid": "ea368f72cfd9571aec4e682eb5cf89d9", "score": "0.50898975", "text": "public function createindex()\n\t{\n\t\tjimport('solrsearch.joomlasolr');\n\t\t\n\t\t$db = JFactory::getDBO();\n\t\t$query = \"SELECT count(*) as totals FROM #__content\";\n\t\t\n\t\t$db->setQuery($query);\n\t\t\n\t\t$total_values = $db->loadResult();\n\t\t\n\t\t//echo $total_values . '<-- ' ;\n\t\t\n\t\t$rows_per_update = 100;\n\t\t\n\t\t\n\t\t$current = JRequest::getInt('current');\n\t\t\n\t\t//echo $current . ' <-- <br />'; \n\t\t\n\t\tset_time_limit(120);\n\t\t\n\t\t$current_rows = ($total_values / 100) * $current;\n\t\t\n\t\t//echo $current_rows . ' <-- current rows <br />';\n\t\t\n\t\t$current_percentage = ( $current_rows + $rows_per_update ) / ( $total_values / 100 ) ;\n\t\t\n\t\t//echo $current_percentage . ' <-- current percentage <br />';\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t3365 RIJEN\n\t\t200 PER KEER\n\t\t3365 / 100 33.65\n\t\t\n\t\t\n\t\t200 / 33.65 =\n\t\t*/\n\t\t$solr = new JoomlaSolr();\n\t\t\n\t\t//TODO: change this\t\n\t\t$articlesQuery = \"SELECT a.id as articleid, a.`alias`, a.* FROM #__content as a LIMIT \" . (int)$current_rows . \",\" . $rows_per_update;\n\t\t\n\t\t$db->setQuery( $articlesQuery );\n\t\t\n\t\t\n\t\t\n\t\t$articles = $db->loadObjectList();\n\t\t\n\t\t\n\t\t\tforeach($articles as $articleMass)\n\t\t\t{\n\t\t\t\t//print_r($animeMass);\n\t\t\t\t//die($animeMass->rating . ' <--');\n\n\t\t\t \n\t\t\t\t$solr->createDocument();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Update anime\n\t\t\t\t$solr->addField('id', $articleMass->articleid);\n\t\t\t\t$solr->addField('catid', $articleMass->articleid);\n\t\t\t\t\n\t\t\t\t$solr->addField('title', $articleMass->title);\n\t\t\t\t\n\t\t\t\t$solr->addField('alias', $articleMass->alias);\n\t\t\t\t\n\t\t\t\t$solr->addField('introtext', strip_tags($articleMass->introtext));\n\t\t\t\t\n\t\t\t\t$solr->saveDocument();\n\t\t\t}\n\t\tif ( $current >= 0 )\n\t\t{\n\t\t\theader('Content-Type: application/json');\n\t\t\theader(\"Connection: Keep-Alive\"); \n\t\t\theader(\"Keep-Alive: timeout=130\"); \n\t\t\techo json_encode(array('percentage' => (int)$current_percentage ) );\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo json_encode(array('percentage' => 100 ) );\n\t\t}\n\t\t\n\t\t\n\t\tdie();\n\t}", "title": "" }, { "docid": "9645441cf6c94995f7aa8a8b7595ebdc", "score": "0.5085017", "text": "public function build(){\n echo 'building index....';\n $index = Lucene::create( $this->getOptions()->getIndexDir() );\n\n if($this->getOptions()->getModules()){\n foreach($this->getOptions()->getModules() as $module){\n $indexes = $this->getEntityManager()->getRepository( $module['name'] )->findAll();\n foreach($indexes as $dbindex){\n $doc = new Document();\n\n // Store document URL to identify it in the search results\n $doc->addField(Field::Text('route', $module['route'] ));\n \n // produces \"->getSlug() | ->getUri()\" as the getter to allow different field for pages module\n $getter = 'get' . ucfirst($module['slug_field']);\n $doc->addField(Field::Text('slug', $dbindex->{$getter}() ));\n\n $doc->addField(Field::Text('title', $dbindex->getTitle() ));\n $doc->addField(Field::Text('description', $dbindex->getBody() ));\n\n // Indexed document contents\n $doc->addField(Field::UnStored('contents', $dbindex->getBody()));\n $index->addDocument($doc);\n\n }\n }\n }\n }", "title": "" }, { "docid": "38d8232249589d9444628e3728c67f19", "score": "0.5078776", "text": "public function persist($index)\n {\n # $this->index->add($this->getName(), $index);\n }", "title": "" }, { "docid": "c9a1e0a987463b7d756e2f237ae5a732", "score": "0.50650454", "text": "function getIndexDocument($index) {\n\t\tif (null == ($document = parent::getIndexDocument($index)))\n\t\t\treturn null;\n\t\t$fragments = array(\n\t\t\t$index->createFragment($this->data['INFO_INVOICE_NUMBER'], 'id'),\n\t\t\t$index->createFragment(date('Y-m-d', $this->data['TS_PAID'])),\n\t\t\t$document);\n\t\treturn $index->createComposite($fragments, null, 1, $this->data['TS_UPDATE']);\n\t}", "title": "" }, { "docid": "a4f5006d7f810a694595966598184995", "score": "0.5045203", "text": "public function createOrUpdateDocument(StateDocument $document);", "title": "" }, { "docid": "3ccb0fc4fd5ca04d61efc02344b36f78", "score": "0.50371456", "text": "public function deleteDocFromIndex()\n {\n if (isset($this->data)) {\n $this->filter();\n $this->normalize();\n $this->selectIndexService();\n $index = $this->control->getIndex();\n if ($this->enableSearchById) {\n $index->includePrimaryKey();\n }\n $index->delete($this->id);\n echo 'Deleted' . PHP_EOL;\n } else {\n echo 'Please Insert ID To Delete';\n }\n\n }", "title": "" }, { "docid": "10b219d072a12f1cda1e91806d990a96", "score": "0.50332975", "text": "public function edit(Document $document)\n {\n //\n }", "title": "" }, { "docid": "10b219d072a12f1cda1e91806d990a96", "score": "0.50332975", "text": "public function edit(Document $document)\n {\n //\n }", "title": "" }, { "docid": "10b219d072a12f1cda1e91806d990a96", "score": "0.50332975", "text": "public function edit(Document $document)\n {\n //\n }", "title": "" }, { "docid": "10b219d072a12f1cda1e91806d990a96", "score": "0.50332975", "text": "public function edit(Document $document)\n {\n //\n }", "title": "" }, { "docid": "10b219d072a12f1cda1e91806d990a96", "score": "0.50332975", "text": "public function edit(Document $document)\n {\n //\n }", "title": "" }, { "docid": "b828f87a0552db60f4e187e50d68766e", "score": "0.50286067", "text": "public function store()\n\t{\n\t\tparent::storeModel();\n\t}", "title": "" }, { "docid": "e24e617299252e18d9e2f65666b2b55c", "score": "0.50229174", "text": "public function change()\n {\n $tableDoc = $this->table('documents');\n if(defined('ORM_ID_AS_UID') && ORM_ID_AS_UID){\n $strategy = ! defined('ORM_UID_STRATEGY') ? 'php' : ORM_UID_STRATEGY;\n $table = $this->table('folders', ['id' => false, 'primary_key' => 'id']);\n switch($strategy){\n case 'mysql':\n case 'laravel-uuid':\n $table->addColumn('id', 'char', ['limit' => 36])\n ->addColumn('parent_id', 'char', ['limit' => 36, 'default'=>null])\n ->addColumn('root_id', 'char', ['limit' => 36, 'default'=>null]);\n $tableDoc->addColumn('folder_id', 'char', ['limit'=>36, 'default'=>null, 'after'=>'id']);\n break;\n default:\n case 'php':\n $table->addColumn('id', 'char', ['limit' => 23])\n ->addColumn('parent_id', 'char', ['limit' => 23, 'default'=>null])\n ->addColumn('root_id', 'char', ['limit' => 23, 'default'=>null]);\n $tableDoc->addColumn('folder_id', 'char', ['limit'=>23, 'default'=>null, 'after'=>'id']);\n break;\n }\n }\n else{\n $table = $this->table('folders');\n $table->addColumn('parent_id', 'integer', ['default' => 0])\n ->addColumn('root_id', 'integer', ['default' => 0]);\n $tableDoc->addColumn('folder_id', 'integer', ['default'=>0, 'after'=>'id']);\n }\n $table->addColumn(\"name\", \"string\")\n ->addColumn(\"created_at\", \"datetime\")\n ->addColumn(\"created_by\", \"string\")\n ->addColumn(\"updated_at\", \"datetime\")\n ->addColumn(\"updated_by\", \"string\")\n ->addIndex(\"parent_id\")\n ->addIndex(\"root_id\")\n ->create();\n $tableDoc->addIndex('folder_id')\n ->update();\n }", "title": "" }, { "docid": "fc8805910563b339f87cf2710f45cd84", "score": "0.501704", "text": "public function updateIndex()\r\n\t{\r\n\t\t// Empty search table (so we can repopulate it)\r\n\t\t$this->_db->setQuery('TRUNCATE TABLE search');\r\n\t\t$this->_db->query();\r\n\r\n\t\t// Data to insert\r\n\t\t$data = array();\r\n\r\n\t\t// Articles\r\n\t\t$query = 'SELECT a.articleID, a.articleTime, a.articleTitle, a.articleBody,\r\n\t\t\t\tcc.contentCreatorID,\r\n\t\t\t\tuv.userImage, cc.contentCreatorImage, np.newsProviderImage,\r\n\t\t\t\tcc.fullName, u.username, u.firstname, u.lastname, np.newsProviderName,\r\n\t\t\t\ta.articleType, GROUP_CONCAT(t.tagName) AS tags, u.UserID, ac.articleCategoryName\r\n\t\t\tFROM article AS a\r\n\t\t\t\tLEFT JOIN articleCategory AS acx ON acx.articleID = a.articleID\r\n\t\t\t\tLEFT JOIN articleCategories AS ac ON ac.articleCategoryID = acx.categoryID\r\n\t\t\t\tLEFT JOIN contentCreators AS cc ON cc.contentCreatorID = a.articleAuthor\r\n\t\t\t\tLEFT JOIN newsProvider AS np ON np.newsProviderID = cc.contentCreatorNewsSiteID\r\n\t\t\t\tLEFT JOIN users AS u ON u.UserID = cc.contentCreatoruserID\r\n\t\t\t\tLEFT JOIN userVariables AS uv ON uv.userID = cc.contentCreatoruserID\r\n\t\t\t\tLEFT JOIN articleTags AS at ON at.articleID = a.articleID\r\n\t\t\t\tLEFT JOIN tags AS t ON t.tagId = at.tagId\r\n\t\t\tWHERE a.articleDeleted = 0\r\n\t\t\t\tAND a.articleLive = 1\r\n\t\t\tGROUP BY a.articleID';\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$articles = $this->_db->loadAssocList();\r\n\t\tif (!empty($articles)) {\r\n\t\t\tforeach ($articles as $article) {\r\n\r\n\t\t\t\t// Determine URL\r\n\t\t\t\t$url = '';\r\n\t\t\t\tswitch ($article['articleType']) {\r\n\t\t\t\t\tcase 'article':\r\n\t\t\t\t\t\t$url = 'articles/detail/'.$article['articleID'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'note':\r\n\t\t\t\t\t\t$url = 'blogs/members/'.$article['username'].'/'.$article['articleID'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'interview':\r\n\t\t\t\t\t\t$url = 'interviews/detail/'.$article['articleID'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'question':\r\n\t\t\t\t\t\t$url = 'questions/detail/'.$article['articleID'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'news':\r\n\t\t\t\t\t\t$url = 'news/detail/'.$article['articleID'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'slideshow':\r\n\t\t\t\t\t\t$url = 'slideshows/detail/'.$article['articleID'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'quicktip':\r\n\t\t\t\t\t\t$url = 'quicktips/detail/'.$article['articleID'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'checklist':\r\n\t\t\t\t\t\t$url = 'checklists/detail/'.$article['articleID'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'landingpage':\r\n\t\t\t\t\t\t$url = 'essentials/detail/'.$article['articleID'];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Determine item image\r\n\t\t\t\tif ($article['newsProviderImage']) {\r\n\t\t\t\t\t$image = $article['newsProviderImage'];\r\n\t\t\t\t} elseif ($article['contentCreatorImage']) {\r\n\t\t\t\t\t$image = $article['contentCreatorImage'];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$image = $article['userImage'];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Determine item creator\r\n\t\t\t\tif ($article['newsProviderName']) {\r\n\t\t\t\t\t$creator = $article['newsProviderName'];\r\n\t\t\t\t} elseif ($article['fullName']) {\r\n\t\t\t\t\t$creator = $article['fullName'];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$creator = $article['firstname'].' '.$article['lastname'];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Insert\r\n\t\t\t\t$query = 'INSERT DELAYED INTO search SET\r\n\t\t\t\t\tthingLink = \"'.Database::escape($url).'\",\r\n\t\t\t\t\tthingType = \"'.$article['articleType'].'\",\r\n\t\t\t\t\tthingTime = \"'.$article['articleTime'].'\",\r\n\t\t\t\t\tthingTitle = \"'.Database::escape($article['articleTitle']).'\",\r\n\t\t\t\t\tthingImage = \"'.Database::escape($image).'\",\r\n\t\t\t\t\tthingCreator = \"'.Database::escape($creator).'\",\r\n\t\t\t\t\tthingCreatorID = '.(int)$article['contentCreatorID'].',\r\n\t\t\t\t\tthingText = \"'.Database::escape(strip_tags($article['articleTitle'].' '.$article['articleBody']).' '.$article['tags']).'\",\r\n\t\t\t\t\tthingCategory = \"'.Database::escape($article['articleCategoryName']).'\"';\r\n\t\t\t\t$this->_db->setQuery($query);\r\n\t\t\t\t$this->_db->query();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Groups\r\n\t\t$query = 'SELECT g.id, g.name, g.slug, g.photo,\r\n\t\t\t\tg.description, g.blurb, g.created,\r\n\t\t\t\tgc.name AS categoryName, u.UserID, u.firstname, u.lastname,\r\n\t\t\t\tGROUP_CONCAT(t.tagName) AS tags\r\n\t\t\tFROM groups AS g\r\n\t\t\t\tLEFT JOIN users AS u ON u.UserID = g.owner\r\n\t\t\t\tLEFT JOIN groupCategories AS gc ON gc.id = g.categoryId\r\n\t\t\t\tLEFT JOIN groupTags AS gt ON gt.groupId = g.id\r\n\t\t\t\tLEFT JOIN tags AS t ON t.tagId = gt.tagId\r\n\t\t\tWHERE g.deleted != 1\r\n\t\t\t\tAND g.type = \"public\"\r\n\t\t\tGROUP BY g.id';\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$groups = $this->_db->loadAssocList();\r\n\t\tif (!empty($groups)) {\r\n\t\t\tforeach ($groups as $group) {\r\n\r\n\t\t\t\t// Insert\r\n\t\t\t\t$query = 'INSERT DELAYED INTO search SET\r\n\t\t\t\t\tthingLink = \"'.Database::escape('groups/detail/'.$group['id']).'\",\r\n\t\t\t\t\tthingType = \"group\",\r\n\t\t\t\t\tthingTime = \"'.$group['created'].'\",\r\n\t\t\t\t\tthingTitle = \"'.Database::escape($group['name']).'\",\r\n\t\t\t\t\tthingImage = \"'.Database::escape($group['photo']).'\",\r\n\t\t\t\t\tthingCreator = \"'.Database::escape($group['firstname'].' '.$group['lastname']).'\",\r\n\t\t\t\t\tthingCreatorID = '.(int)$group['UserID'].',\r\n\t\t\t\t\tthingText = \"'.Database::escape(strip_tags($group['name'].' '.$group['description'].' '.$group['blurb']).' '.$group['tags']).'\",\r\n\t\t\t\t\tthingCategory = \"'.Database::escape($group['categoryName']).'\"';\r\n\t\t\t\t$this->_db->setQuery($query);\r\n\t\t\t\t$this->_db->query();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Discussion posts\r\n\t\t$query = 'SELECT p.id, p.topicId, p.groupId, p.text, p.created, t.title AS topicTitle,\r\n\t\t\t\tu.UserID, u.firstname, u.lastname, uv.userImage\r\n\t\t\tFROM groupPosts AS p\r\n\t\t\t\tLEFT JOIN groupTopics AS t ON t.id = p.topicId\r\n\t\t\t\tLEFT JOIN groups AS g ON g.id = p.groupId\r\n\t\t\t\tLEFT JOIN users AS u ON u.UserID = p.userId\r\n\t\t\t\tLEFT JOIN userVariables AS uv ON uv.userID = u.UserID\r\n\t\t\tWHERE g.deleted != 1\r\n\t\t\t\tAND g.type = \"public\"';\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$posts = $this->_db->loadAssocList();\r\n\t\tif (!empty($posts)) {\r\n\t\t\tforeach ($posts as $post) {\r\n\r\n\t\t\t\t// Insert\r\n\t\t\t\t$query = 'INSERT DELAYED INTO search SET\r\n\t\t\t\t\tthingLink = \"'.Database::escape('groups/discussion/'.$post['topicId']).'#post_'.$post['id'].'\",\r\n\t\t\t\t\tthingType = \"forum\",\r\n\t\t\t\t\tthingTime = \"'.$post['created'].'\",\r\n\t\t\t\t\tthingTitle = \"'.Database::escape($post['topicTitle']).'\",\r\n\t\t\t\t\tthingImage = \"'.Database::escape($post['userImage']).'\",\r\n\t\t\t\t\tthingCreator = \"'.Database::escape($post['firstname'].' '.$post['lastname']).'\",\r\n\t\t\t\t\tthingCreatorID = '.(int)$post['UserID'].',\r\n\t\t\t\t\tthingText = \"'.Database::escape(strip_tags($post['topicTitle'].' '.$post['text'])).'\",\r\n\t\t\t\t\tthingCategory = \"'.Database::escape($post['topicTitle']).'\"';\r\n\t\t\t\t$this->_db->setQuery($query);\r\n\t\t\t\t$this->_db->query();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Featured (Wordpress) blog Entries\r\n\t\t$query = 'SELECT b.blogURL, b.blogHosted, b.blogCategory,\r\n\t\t\t\tu.UserID, u.firstname, u.lastname, uv.userImage\r\n\t\t\tFROM blogs AS b\r\n\t\t\t\tLEFT JOIN users AS u ON u.UserID = b.blogOwner\r\n\t\t\t\tLEFT JOIN userVariables AS uv ON uv.userID = u.UserID\r\n\t\t\tWHERE b.blogHosted IS NOT NULL';\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$blogs = $this->_db->loadAssocList();\r\n\t\tif (!empty($blogs)) {\r\n\t\t\tforeach ($blogs as $blog) {\r\n\r\n\t\t\t\tif ($blog['blogHosted'] == 999) {\r\n\t\t\t\t\t$table = 'mainwp_posts';\r\n\t\t\t\t\t$tagtable = 'mainwp_stp_tags';\r\n\t\t\t\t\t$blogurl = 'blog';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$table = 'wp_'.$blog['blogHosted'].'_posts';\r\n\t\t\t\t\t$tagtable = 'wp_'.$blog['blogHosted'].'_stp_tags';\r\n\t\t\t\t\t$blogurl = 'bloggers/'.$blog['blogURL'];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->_db->setQuery(\"SHOW TABLES LIKE '\".$table.\"'\");\r\n\t\t\t\t$checktable = $this->_db->loadAssocList();\r\n\t\t\t\t\r\n\t\t\t\t$this->_db->setQuery(\"SHOW TABLES LIKE '\".$tagtable.\"'\");\r\n\t\t\t\t$checkTagTable = $this->_db->loadAssocList();\r\n\t\t\t\t\r\n\t\t\t\tif(!empty($checktable) && !empty($checkTagTable))\r\n\t\t\t\t{\r\n\t\t\t\t\t// Get blog posts\r\n\t\t\t\t\t$query = 'SELECT p.ID, p.post_name, p.post_title, p.post_content, p.post_date,\r\n\t\t\t\t\t\t\tGROUP_CONCAT(tag_name) AS tags\r\n\t\t\t\t\t\tFROM '.$table.' AS p\r\n\t\t\t\t\t\t\tLEFT JOIN '.$tagtable.' AS t ON t.post_id = p.ID\r\n\t\t\t\t\t\tWHERE p.post_status = \"publish\"\r\n\t\t\t\t\t\t\tGROUP BY p.ID';\r\n\t\t\t\t\t$this->_db->setQuery($query);\r\n\t\t\t\t\t$posts = $this->_db->loadAssocList();\r\n\t\t\t\t\tif (!empty($posts)) {\r\n\t\t\t\t\t\tforeach ($posts as $post) {\r\n\r\n\t\t\t\t\t\t\t// Build URL\r\n\t\t\t\t\t\t\t$date = strtotime($post['post_date']);\r\n\t\t\t\t\t\t\t$url = $blogurl.'/'.date('Y', $date).'/'.date('m', $date).'/'.date('d', $date).'/'.$post['post_name'].'/';\r\n\r\n\t\t\t\t\t\t\t// Insert\r\n\t\t\t\t\t\t\t$query = 'INSERT DELAYED INTO search SET\r\n\t\t\t\t\t\t\t\tthingLink = \"'.Database::escape($url).'\",\r\n\t\t\t\t\t\t\t\tthingType = \"blog\",\r\n\t\t\t\t\t\t\t\tthingTime = \"'.$post['post_date'].'\",\r\n\t\t\t\t\t\t\t\tthingTitle = \"'.Database::escape($post['post_title']).'\",\r\n\t\t\t\t\t\t\t\tthingImage = \"'.Database::escape($blog['userImage']).'\",\r\n\t\t\t\t\t\t\t\tthingCreator = \"'.Database::escape($blog['firstname'].' '.$blog['lastname']).'\",\r\n\t\t\t\t\t\t\t\tthingCreatorID = '.(int)$blog['UserID'].',\r\n\t\t\t\t\t\t\t\tthingText = \"'.Database::escape(strip_tags($post['post_title'].' '.$post['post_content']).' '.$post['tags']).'\",\r\n\t\t\t\t\t\t\t\tthingCategory = \"'.Database::escape($blog['blogCategory']).'\"';\r\n\t\t\t\t\t\t\t$this->_db->setQuery($query);\r\n\t\t\t\t\t\t\t$this->_db->query();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Optimize table\r\n\t\t$this->_db->setQuery('OPTIMIZE TABLE search');\r\n\t\t$this->_db->query();\r\n\t}", "title": "" }, { "docid": "423323b9babd7519df3a420c8b6d8f42", "score": "0.50047743", "text": "public function reindexFiles()\n {\n $file_types = array\n (\n AgreementModel::UPLOADED_FILE_MODEL_TYPE,\n AgreementModel::UPLOADED_FILE_SCENARIO_TYPE,\n AgreementModel::UPLOADED_FILE_RECORD_TYPE,\n AgreementModel::UPLOADED_FILE_FINANCIAL_FILE_TYPE,\n AgreementModel::UPLOADED_FILE_ADDITIONAL_FILE_TYPE,\n AgreementModel::UPLOADED_FILE_ADDITIONAL_EXT_FILE_TYPE\n );\n\n foreach ($file_types as $type) {\n $idx = 1;\n\n $records = AgreementModelReportFilesTable::getInstance()->createQuery()->where('object_id = ? and file_type = ?',\n array\n (\n $this->getId(),\n $type,\n )\n )\n ->orderBy('id ASC')\n ->execute();\n\n foreach ($records as $record) {\n $record->setFieldName($record->getField() . '_' . $idx++);\n $record->save();\n }\n }\n }", "title": "" }, { "docid": "984897e3f92e7935d5fcbc88970bccc5", "score": "0.49976167", "text": "public function index_post(){\n\n // Comprobar que venga un objeto indice en la peticion\n if( !$this->post() ){\n $this->response( null, 400 );\n }\n\n $id = $this->indices_model->save( $this->post() );\n\n // Comprobar que el id tiene informacion\n if( !is_null( $id ) ){\n $this->response( array( 'response' => $id ), 200 );\n } else {\n $this->response( array('error' => \"Algo ha falldo en el servidor. No se pudo añadir el indice\" ), 400 );\n }\n }", "title": "" }, { "docid": "1d768e193104f1822b1a70d7a2932679", "score": "0.49963778", "text": "public function update_news(){\n //de language_id nu cred ca este nevoie\n $news_id=$_POST['news_id'];\n $language_id= (isset($_POST['language_id'])?($_POST['language_id']):null);\n $language=((isset($_POST['language'])?($_POST['language']):null));\n $article=((isset($_POST['article'])?($_POST['article']):null));\n\n if($language_id && $article)\n {\n $myHelper=new Helpers();\n list($title,$body)=$myHelper->token_news($_POST['article']);\n if($this->ioc->admin->update_news($news_id,$language_id,$title,$body))\n {\n //sterge indexul\n include('Zend/Search/Lucene.php');\n $lucene_index = Zend_Search_Lucene::open($GLOBALS['index_path']);\n $term = new Zend_Search_Lucene_Index_Term($_POST['news_id'], 'news_id');\n $query = new Zend_Search_Lucene_Search_Query_Term($term);\n $results =$lucene_index->find($query);\n if(count($results) > 0) {\n foreach($results as $result)\n {\n $lucene_index->delete($result->id);\n $lucene_index->commit();\n }\n }\n\n //reindexeaza\n $doc = new Zend_Search_Lucene_Document();\n $title_url=str_replace(\" \",\"-\",$title);\n $title_url.=\"-\".$news_id;\n $docUrl= BASE_PATH.\"{$language}/news/details/{$title_url}\";\n $doc->addField(Zend_Search_Lucene_Field::UnIndexed('url', $docUrl));\n $doc->addField(Zend_Search_Lucene_Field::keyword('news_id', $news_id));\n $doc->addField(Zend_Search_Lucene_Field::Text('title',$title));\n $doc->addField(Zend_Search_Lucene_Field::UnStored('contents', $body));\n $lucene_index->addDocument($doc);\n $lucene_index->commit();\n\n echo \"The article was updated succefully\";\n }\n else{\n echo \"*ERROR*</br>Articolul nu a putut fi modificat.Contacteaza administratorul\";\n }\n }\n\n }", "title": "" }, { "docid": "e47f5fe9f7da54e36d424b5e99b94f29", "score": "0.49922425", "text": "function add_page_template_to_document_for_update( array $document_for_update, $solr_indexing_options, $post, $attachment_body, wpsolr\\core\\classes\\engines\\WPSOLR_AbstractResultsClient $search_engine_client ) {\n $value = get_post_meta($post, '_wp_page_template');\n\n $solr_dynamic_type = WpSolrSchema::_SOLR_DYNAMIC_TYPE_STRING; // Depends on the type selected on your field on screen 2.2\n $document_for_update[ '_wp_page_template' . $solr_dynamic_type] = $value;\n\n return $document_for_update;\n}", "title": "" }, { "docid": "1f8fda9b6450d8bbd507b5b3d317aaca", "score": "0.4988267", "text": "abstract protected function addIndexes();", "title": "" }, { "docid": "e7bff9d30263d168452d99f7e6982f49", "score": "0.49835297", "text": "public function beforeCreate()\n {\n $this->index = self::count() + 1;\n }", "title": "" }, { "docid": "99b868512cd8838835c86153b630eeaa", "score": "0.49781984", "text": "public function reindex()\n {\n // Clear the search index\n if ($this->getIndex()->exists()) {\n $this->getIndex()->delete();\n $this->getIndex()->create();\n }\n\n // Get all items and reindex them\n Item::with('itemable')->chunk(100, function($items) {\n $documents = [];\n foreach($items as $item) {\n /* @var $itemable Searchable */\n $itemable = $item->itemable;\n $documents[] = new Document($itemable->getSearchableId(), $itemable->getSearchableBody());\n }\n $this->getTypedIndex()->addDocuments($documents);\n });\n\n return true;\n }", "title": "" }, { "docid": "7c96eb83c0039832b849a6dfa5bb530d", "score": "0.49676296", "text": "public function prepareForIndexing();", "title": "" }, { "docid": "224ec8478f5f177d6b7dc11533ff9326", "score": "0.49571684", "text": "public function syncOriginalDocumentAttributes();", "title": "" }, { "docid": "1b99c61544f780ad5a18378b1763da2b", "score": "0.4952941", "text": "protected function addAttributes()\n {\n \t\n $this->addField(Zend_Search_Lucene_Field::Text('name',\n $this->getSourceModel()->getName(), self::ENCODING));\n \n $this->addField(Zend_Search_Lucene_Field::UnIndexed('short_content', \n $this->getSourceModel()->getShortDescription(), self::ENCODING));\n \n $this->addField(Zend_Search_Lucene_Field::UnIndexed('url',\n $this->getSourceModel()->getProductUrl(), self::ENCODING));\n \n //:updated\n $this->addField(Zend_Search_Lucene_Field::Text('image',$this->getSourceModel()->getImage(), self::ENCODING));\n \n $this->addField(Zend_Search_Lucene_Field::Text('thumbnail',$this->getSourceModel()->getThumbnail(), self::ENCODING));\n \n $this->addField(Zend_Search_Lucene_Field::Text('small_image',$this->getSourceModel()->getSmallImage(), self::ENCODING));\n \n $this->addField(Zend_Search_Lucene_Field::Text('url_path',$this->getSourceModel()->getUrlPath(), self::ENCODING));\n \n \n \n $this->addFilterableAttributes();\n $this->addSearchableAttributes();\n }", "title": "" }, { "docid": "fcbbf8945c91b3c782f1000f830a57bd", "score": "0.4946114", "text": "public function applyUpdates()\n {\n parent::applyUpdates();\n $this->_syncIndexes();\n }", "title": "" }, { "docid": "23f12bfce845ff160894766591f9bd55", "score": "0.49291945", "text": "function search_api_admin_add_index(array $form, array &$form_state) {\n drupal_set_title(t('Add index'));\n\n $form['#attached']['css'][] = drupal_get_path('module', 'search_api') . '/search_api.admin.css';\n $form['#tree'] = TRUE;\n $form['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Index name'),\n '#maxlength' => 50,\n '#required' => TRUE,\n );\n\n $form['machine_name'] = array(\n '#type' => 'machine_name',\n '#maxlength' => 50,\n '#machine_name' => array(\n 'exists' => 'search_api_index_load',\n ),\n );\n\n $form['item_type'] = array(\n '#type' => 'select',\n '#title' => t('Item type'),\n '#description' => t('Select the type of items that will be indexed in this index. ' .\n 'This setting cannot be changed afterwards.'),\n '#options' => array(),\n '#required' => TRUE,\n );\n foreach (search_api_get_item_type_info() as $type => $info) {\n $form['item_type']['#options'][$type] = $info['name'];\n }\n $form['enabled'] = array(\n '#type' => 'checkbox',\n '#title' => t('Enabled'),\n '#description' => t('This will only take effect if the selected server is also enabled.'),\n '#default_value' => TRUE,\n );\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Index description'),\n );\n $form['server'] = array(\n '#type' => 'select',\n '#title' => t('Server'),\n '#description' => t('Select the server this index should reside on.'),\n '#default_value' => '',\n '#options' => array('' => t('< No server >'))\n );\n $servers = search_api_server_load_multiple(FALSE);\n // List enabled servers first.\n foreach ($servers as $server) {\n if ($server->enabled) {\n $form['server']['#options'][$server->machine_name] = $server->name;\n }\n }\n foreach ($servers as $server) {\n if (!$server->enabled) {\n $form['server']['#options'][$server->machine_name] = t('@server_name (disabled)', array('@server_name' => $server->name));\n }\n }\n $form['read_only'] = array(\n '#type' => 'checkbox',\n '#title' => t('Read only'),\n '#description' => t('Do not write to this index or track the status of items in this index.'),\n '#default_value' => FALSE,\n );\n $form['options']['index_directly'] = array(\n '#type' => 'checkbox',\n '#title' => t('Index items immediately'),\n '#description' => t('Immediately index new or updated items instead of waiting for the next cron run. ' .\n 'This might have serious performance drawbacks and is generally not advised for larger sites.'),\n '#default_value' => FALSE,\n );\n $form['options']['cron_limit'] = array(\n '#type' => 'textfield',\n '#title' => t('Cron batch size'),\n '#description' => t('Set how many items will be indexed at once when indexing items during a cron run. ' .\n '\"0\" means that no items will be indexed by cron for this index, \"-1\" means that cron should index all items at once.'),\n '#default_value' => SEARCH_API_DEFAULT_CRON_LIMIT,\n '#size' => 4,\n '#attributes' => array('class' => array('search-api-cron-limit')),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Create index'),\n );\n\n return $form;\n}", "title": "" }, { "docid": "96215fb8b6cc84b337c5ffeb92f40421", "score": "0.49228826", "text": "public function create()\n {\n return $this->index();\n }", "title": "" }, { "docid": "a40d8e67b1b0d0de2bc8f96d3a1c7943", "score": "0.49228537", "text": "public function normalize($document);", "title": "" }, { "docid": "046f68a16ada153d523606e571f8fb69", "score": "0.49053857", "text": "public function run()\n {\n try {\n \\App\\Models\\Documents::truncate();\n \\App\\Models\\Documents::insert([\n [\n 'title' => 'Документы',\n 'content' => '<h4 id=\"term_of_use\">Пользовательское соглашение</h4>\n\n<p>Aenean vitae sapien sit amet est lobortis finibus lobortis eget justo. Etiam lacus nunc, semper non elementum sed, consequat sed lacus. Etiam ac lorem at justo aliquam maximus quis in nisi. Ut imperdiet egestas tempor. Suspendisse potenti. Suspendisse potenti. Mauris pellentesque magna a enim maximus, bibendum accumsan orci pretium. Fusce viverra diam in arcu luctus finibus. Vestibulum vel porttitor ipsum. Nam tristique scelerisque libero eu tristique. Etiam vel nulla tellus. Nullam ut rutrum magna. Donec malesuada orci id erat luctus, quis lacinia magna aliquet.\n\nAenean auctor ultricies viverra. Aenean vestibulum quis ipsum non commodo. Quisque dapibus sem a dignissim rutrum. Nullam est leo, sollicitudin et justo vel, fermentum ornare tortor. Quisque porttitor eros in mollis hendrerit. Nulla id mattis nunc. Duis faucibus tempor fringilla. Pellentesque euismod nibh enim, ac lobortis sapien hendrerit eu. Morbi vel ante laoreet, laoreet velit ac, elementum nisi. Vestibulum in aliquam ligula, id pellentesque sem. Phasellus posuere augue ex, id sollicitudin massa elementum ac. Aliquam nec enim iaculis, sodales sem sit amet, molestie sapien. Mauris sit amet finibus neque. In hac habitasse platea dictumst. Praesent in convallis nisi.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit orci quis est malesuada, ut sagittis tellus rutrum. Proin dignissim massa in fermentum pulvinar. Aliquam tempus nunc justo, gravida elementum magna bibendum quis. Suspendisse bibendum ante lectus, id tempor velit sodales in. Curabitur sollicitudin purus felis, eget ultricies tortor congue et. In viverra rhoncus mollis. Nullam id diam maximus, facilisis magna eu, sagittis lorem. Integer faucibus ullamcorper tristique. Curabitur consectetur nulla nec quam maximus, et congue arcu consequat. Integer molestie tellus et nibh viverra, non posuere diam volutpat. Integer euismod fermentum leo vitae dignissim. Cras sed posuere odio. Mauris sit amet consequat mauris.\n\nNunc ut tincidunt elit, sed faucibus velit. Curabitur eu maximus risus, ut varius tortor. Duis mattis ex eget libero facilisis ornare. Donec neque ligula, feugiat nec hendrerit non, fermentum et risus. In hac habitasse platea dictumst. Donec commodo sagittis dui rutrum faucibus. In fermentum vitae nisl eget maximus. Quisque vel orci congue, placerat diam eu, interdum massa. Vivamus dignissim laoreet sem et pulvinar. Sed sed lobortis sapien, vitae cursus turpis. Cras euismod varius ante, pharetra condimentum neque porttitor non. Sed lacinia justo finibus, viverra magna ac, feugiat urna.</p>\n\n<h4 id=\"rules\">Правила</h4>\n\n<p>Aenean vitae sapien sit amet est lobortis finibus lobortis eget justo. Etiam lacus nunc, semper non elementum sed, consequat sed lacus. Etiam ac lorem at justo aliquam maximus quis in nisi. Ut imperdiet egestas tempor. Suspendisse potenti. Suspendisse potenti. Mauris pellentesque magna a enim maximus, bibendum accumsan orci pretium. Fusce viverra diam in arcu luctus finibus. Vestibulum vel porttitor ipsum. Nam tristique scelerisque libero eu tristique. Etiam vel nulla tellus. Nullam ut rutrum magna. Donec malesuada orci id erat luctus, quis lacinia magna aliquet.\n\nAenean auctor ultricies viverra. Aenean vestibulum quis ipsum non commodo. Quisque dapibus sem a dignissim rutrum. Nullam est leo, sollicitudin et justo vel, fermentum ornare tortor. Quisque porttitor eros in mollis hendrerit. Nulla id mattis nunc. Duis faucibus tempor fringilla. Pellentesque euismod nibh enim, ac lobortis sapien hendrerit eu. Morbi vel ante laoreet, laoreet velit ac, elementum nisi. Vestibulum in aliquam ligula, id pellentesque sem. Phasellus posuere augue ex, id sollicitudin massa elementum ac. Aliquam nec enim iaculis, sodales sem sit amet, molestie sapien. Mauris sit amet finibus neque. In hac habitasse platea dictumst. Praesent in convallis nisi.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit orci quis est malesuada, ut sagittis tellus rutrum. Proin dignissim massa in fermentum pulvinar. Aliquam tempus nunc justo, gravida elementum magna bibendum quis. Suspendisse bibendum ante lectus, id tempor velit sodales in. Curabitur sollicitudin purus felis, eget ultricies tortor congue et. In viverra rhoncus mollis. Nullam id diam maximus, facilisis magna eu, sagittis lorem. Integer faucibus ullamcorper tristique. Curabitur consectetur nulla nec quam maximus, et congue arcu consequat. Integer molestie tellus et nibh viverra, non posuere diam volutpat. Integer euismod fermentum leo vitae dignissim. Cras sed posuere odio. Mauris sit amet consequat mauris.\n\nNunc ut tincidunt elit, sed faucibus velit. Curabitur eu maximus risus, ut varius tortor. Duis mattis ex eget libero facilisis ornare. Donec neque ligula, feugiat nec hendrerit non, fermentum et risus. In hac habitasse platea dictumst. Donec commodo sagittis dui rutrum faucibus. In fermentum vitae nisl eget maximus. Quisque vel orci congue, placerat diam eu, interdum massa. Vivamus dignissim laoreet sem et pulvinar. Sed sed lobortis sapien, vitae cursus turpis. Cras euismod varius ante, pharetra condimentum neque porttitor non. Sed lacinia justo finibus, viverra magna ac, feugiat urna.</p>',\n 'is_active' => 1,\n 'lang' => 'ru',\n ],\n [\n 'title' => 'Documents',\n 'content' => '<h4 id=\"term_of_use\">Terms of use</h4>\n\n<p>text</p>\n\n<h4 id=\"rules\">Rules</h4>\n\n<p>Rules text</p>',\n 'is_active' => 1,\n 'lang' => 'en',\n ],\n ]);\n } catch (Exception $ex) {\n }\n }", "title": "" }, { "docid": "915f6180bd9af43d1d1e2f08f76abe82", "score": "0.49045542", "text": "public function add_news(){\n\n $language_id= (isset($_POST['language_id'])?($_POST['language_id']):null);\n $article=((isset($_POST['article'])?($_POST['article']):null));\n $language=((isset($_POST['language'])?($_POST['language']):null));\n\n if($language_id && $article)\n {\n include('Zend/Search/Lucene.php');\n try\n {\n $lucene_index = Zend_Search_Lucene::open($GLOBALS['index_path']);\n }catch(Zend_Search_Lucene_Exception $e)\n {\n $lucene_index = Zend_Search_Lucene::create($GLOBALS['index_path']);\n }\n\n $myHelper=new Helpers();\n list($title,$body)=$myHelper->token_news($_POST['article']);\n\n $news_id=$this->ioc->admin->add_news($language_id,$title,$body);\n\n if($news_id)\n {\n $doc = new Zend_Search_Lucene_Document();\n //$titleUrl=str_replace(' ','-',$title);\n $title_url=str_replace(\" \",\"-\",$title);\n $title_url.=\"-\".$news_id;\n $docUrl= BASE_PATH.\"{$language}/news/details/{$title_url}\";\n $doc->addField(Zend_Search_Lucene_Field::UnIndexed('url', $docUrl));\n $doc->addField(Zend_Search_Lucene_Field::keyword('news_id', $news_id));\n $doc->addField(Zend_Search_Lucene_Field::Text('title',$title));\n $doc->addField(Zend_Search_Lucene_Field::UnStored('contents', $body));\n $lucene_index->addDocument($doc);\n $lucene_index->commit();\n echo \"The article was added succefully\";\n }\n else{\n echo \"*ERROR*</br>Articolul nu a putut fi adaugat.Contacteaza administratorul\";\n }\n }\n\n }", "title": "" }, { "docid": "58f524d06f2ab9da63eeea67d07cac4c", "score": "0.4883344", "text": "public function storeSelf() {\n\t\t\n\t\t$this->uid = tx_ptgsapdfdocs_documentAccessor::getInstance()->insertDocument(\n\t\t\tarray(\n\t\t\t\t'documenttype' => $this->documenttype,\n\t\t\t\t'orderWrapperUid' => $this->orderWrapperUid,\n 'gsaCustomerId' => $this->gsaCustomerId,\n\t\t\t\t'file' => $this->outputFile,\n\t\t\t)\n\t\t);\n\t\t\n\t\ttrace($this,0,'ptgsapdfdocs_document');\n\t\treturn $this; \n\t}", "title": "" }, { "docid": "e56b067c0e3a21eaeef5bdd6173785c3", "score": "0.48791608", "text": "public function add($document, $json)\n {\n\n $client = $this->clientRepository->findAll()->current();\n\n // build es json\n $esJson = array();\n $esJson['OWNER_ID'] = $client->getOwnerId();\n $esJson['_dissemination'] = array();\n $esJson['_dissemination']['_content'] = json_decode($json);\n\n $esJson = json_encode($esJson);\n\n try {\n // send json\n // updates if document id already exists\n $response = Request::put($this->url . $document->getUid())\n ->sendsJson()\n ->body($esJson)\n ->send();\n\n } catch (Exception $exception) {\n var_dump($exception);\n }\n\n }", "title": "" }, { "docid": "dc1c895f2c0c3dff141da2f01c917f4c", "score": "0.48751158", "text": "public function save() {\n\n if($this->persists) {\n return $this->update();\n }\n\n // Get arranger (for compatibility with 5.6 set into separated operation)\n $arranger = DBOModelTransformerManager::getArranger();\n\n // Do Save\n if($id = $arranger::save($this->_getStructure(), $this->currentData)) {\n\n $this->persists = true;\n\n // If index was defined — then newly created entity\n // should populate it with fresh DB id\n if($index = $this->__currentSchema->primary) {\n\n $this->set($index->parameterName, $id);\n\n }\n\n }\n\n return $this;\n\n }", "title": "" }, { "docid": "0f8996a1f84cd28dc464fecbe81c2206", "score": "0.48732466", "text": "public function store(Request $request)\n {\n //\n Index::create([\n 'book_id' => $request->book_id,\n 'description' => ucwords($request->description),\n 'page' => $request->page,\n ]);\n\n flash('Index '.ucwords($request->description).' added successfully!')->success();\n\n return back();\n }", "title": "" }, { "docid": "3c1f51f9c45a3b65d3d140487ee0bc39", "score": "0.48599997", "text": "public function create()\n {\n\n return $this->index();\n }", "title": "" }, { "docid": "2d5a2350aeb322af47d49836c898a70d", "score": "0.4856632", "text": "protected function deleteFromIndex()\n\t\t{\n\t\t\ttry{\n\t\t\t\t$index = Zend_Search_Lucene::open(self::getIndexFullpath());\n\t\t\t\t\n\t\t\t\t$query = new Zend_Search_Lucene_Search_Query_Term(new Zend_Search_Lucene_Index_Term($this->getId(), 'product_id')\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$hits = $index->find($query);\n\t\t\t\tforeach($hits as $hit)\n\t\t\t\t{\n\t\t\t\t\t$index->delete($hit->id);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$index->commit();\n\t\t\t}\n\t\t\tcatch(Exception $ex)\n\t\t\t{\n\t\t\t\t$logger = Zend_Registry::get('logger');\n\t\t\t\t$logger->warn('Error removing document from search index: '.$ex->getMessage());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b2b3ade294c1e3043b335fd7e1222e05", "score": "0.48536128", "text": "function index() {\n \n // API call\n if($this->request->isApiCall()) {\n $this->response->respondWithData(Documents::findAll(STATE_VISIBLE, $this->logged_user->getMinVisibility()), array(\n 'as' => 'documents', \n ));\n \n // Mass edit\n } elseif($this->request->isSubmitted()) {\n if (!$this->request->isAsyncCall()) {\n $this->response->badRequest();\n } // if\n\n $this->mass_edit(Documents::findByIds($this->request->post('selected_item_ids'), STATE_VISIBLE, $this->logged_user->getMinVisibility()));\n \n // Print interface\n } elseif($this->request->isPrintCall()) {\n $group_by = strtolower($this->request->get('group_by', null));\n \n $page_title = lang('All documents');\n \n // find invoices\n $documents = Documents::findForPrint($group_by);\n \n // maps\n if ($group_by == 'category_id') {\n $map = Categories::getIdNameMap('','DocumentCategory');\n \n if(empty($map)) {\n $map = null;\n } // if\n \n $map[0] = lang('Unknown Category');\n $getter = 'getCategoryId';\n $page_title.= ' ' . lang('Grouped by Category'); \n \n } else if ($group_by == 'first_letter') {\n $map = get_letter_map();\n $getter = 'getFirstLetter';\n $page_title.= ' ' . lang('Grouped by First Letter');\n } // if \n \n $this->smarty->assignByRef('documents', $documents);\n $this->smarty->assignByRef('map', $map);\n $this->response->assign(array(\n 'page_title' => $page_title,\n 'getter' => $getter\n ));\n \n // Regular web browser request\n } elseif($this->request->isWebBrowser()) {\n $this->wireframe->list_mode->enable();\n\n $can_add_documents = false;\n if (Documents::canManage($this->logged_user)) {\n $can_add_documents = true;\n $this->wireframe->actions->add('add_text_document', lang('New Text Document'), Router::assemble('documents_add_text'), array(\n 'onclick' => new FlyoutFormCallback('document_created', array(\n 'success_message' => lang('Text document has been created')\n )),\n 'icon' => AngieApplication::getImageUrl('layout/button-add.png', ENVIRONMENT_FRAMEWORK, AngieApplication::getPreferedInterface()),\n ));\n \n $this->wireframe->actions->add('upload_document', lang('Upload File'), Router::assemble('documents_upload_file'), array(\n 'onclick' => new FlyoutFormCallback('document_created', array(\n 'success_message' => lang('File has been uploaded')\n )),\n 'icon' => AngieApplication::getImageUrl('layout/button-add.png', ENVIRONMENT_FRAMEWORK, AngieApplication::getPreferedInterface()), \n ));\n } // if\n \n $this->response->assign(array(\n 'can_add_documents' => $can_add_documents,\n 'can_manage_documents' => Documents::canManage($this->logged_user),\n 'documents' => Documents::findForObjectsList($this->logged_user, STATE_VISIBLE),\n 'letters' => get_letter_map(),\n 'categories' => Categories::getIdNameMap(null, 'DocumentCategory'),\n 'manage_categories_url' => $can_add_documents ? Router::assemble('document_categories') : null,\n 'in_archive' => false\n ));\n \n // mass manager\n if ($this->logged_user->isAdministrator()) {\n $mass_manager = new MassManager($this->logged_user, $this->active_document); \n $this->response->assign('mass_manager', $mass_manager->describe($this->logged_user));\n } // if\n } // if\n }", "title": "" }, { "docid": "627f6ebdcb84c334d05440c0f0d11e32", "score": "0.48502728", "text": "public function renderAdd()\n {\n $this->template->title = \"Přidat dokumenty\";\n $form = $this->getComponent('docsForm');\n $form['save']->caption = 'Přidat';\n $this->template->form = $form;\n }", "title": "" }, { "docid": "d30205cebae214362df5adc1626f607b", "score": "0.48426116", "text": "public function updateSearchIndexForEntity(Entity $entity, $create = false)\n {\n $keyVal = $entity->getData();\n $entityKey = $entity->getEntityName();\n\n $resourceId = $this->orm->getResourceId($entityKey);\n\n if (!$resourceId) {\n Log::warn(\"Control Structure out of sync\");\n\n return;\n }\n\n $id = $entity->getId();\n\n $indexData = [];\n\n try {\n $titleFields = $entity->getIndexTitleFields();\n $keyFields = $entity->getIndexKeyFields();\n $descriptionFields = $entity->getIndexDescriptionFields();\n\n $indexData['title'] = $this->concatenateArrayValues($titleFields, $keyVal);\n $indexData['access_key'] = $this->concatenateArrayValues($keyFields, $keyVal);\n $indexData['description'] = $this->retrieveDescriptionData($descriptionFields, $keyVal);\n $indexData['vid'] = $id;\n $indexData['id_vid_entity'] = $resourceId;\n\n if ($create) {\n\n if (isset($keyVal[Db::UUID])) {\n $indexData[Db::UUID] = $keyVal[Db::UUID];\n }\n\n if (isset($keyVal[Db::TIME_CREATED])) {\n $indexData[Db::TIME_CREATED] = $keyVal[Db::TIME_CREATED];\n }\n\n $sqlString = $this->orm->sqlBuilder->buildInsert($indexData, 'buiz_data_index');\n\n $this->orm->db->insert($sqlString, 'buiz_data_index', 'rowid');\n } else {\n\n $where = \"vid={$id} and id_vid_entity={$resourceId}\";\n\n $sqlString = $this->orm->sqlBuilder->buildUpdateSql($indexData, 'buiz_data_index', $where);\n $res = $this->orm->db->update($sqlString);\n\n /* @var $res LibDbPostgresqlResult */\n if (!$res->getAffectedRows()) {\n if (isset($keyVal[Db::UUID])) {\n $indexData[Db::UUID] = $keyVal[Db::UUID];\n }\n\n if (isset($keyVal[Db::TIME_CREATED])) {\n $indexData[Db::TIME_CREATED] = $keyVal[Db::TIME_CREATED];\n }\n\n $sqlString = $this->orm->sqlBuilder->buildInsert($indexData, 'buiz_data_index');\n\n $this->orm->db->insert($sqlString, 'buiz_data_index', 'rowid');\n }\n }\n } catch (LibDb_Exception $exc) {\n return null;\n }\n }", "title": "" }, { "docid": "746f84aca5ea596482e4641f055d81a5", "score": "0.48356935", "text": "public function saveDocument(DocumentInterface $document);", "title": "" }, { "docid": "d47af8f0ed02c4dd0ede1501f774721a", "score": "0.48232323", "text": "public function create()\n {\n return view('coinadmin.document.create');\n }", "title": "" }, { "docid": "3066f6c697a2fd4b54f5479c4189c9a2", "score": "0.48158067", "text": "public function save_index()\n {\n $features_title_chn = $this -> input -> post('features_title_chn');\n $features_chn = $this -> input -> post('features_chn');\n $features_title_en = $this -> input -> post('features_title_en');\n $features_en = $this -> input -> post('features_en');\n $row = $this -> index_model -> save_index($features_title_chn, $features_chn, $features_title_en, $features_en);\n if($row > 0){\n redirect('admin/index_mgr');\n }\n }", "title": "" }, { "docid": "d9794f1dbb95176af9b048d9452ef552", "score": "0.48048067", "text": "public function save() {\n\t\tforeach($this->documents as $doc) {\n\t\t\t$doc->save();\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "94407cbfdb6483098a0aed4d4311e65f", "score": "0.4800544", "text": "public function index()\n {\n $docs = Document::all();\n return view('admin.document.index', ['docs' => $docs]);\n }", "title": "" }, { "docid": "41eddb1fdcf1f9999b281f64c335587f", "score": "0.4791814", "text": "private function create()\n {\n $indexParams['index'] = $this->name;\n $indexParams['body'] = $this->config;\n\n $this->client->indices()->create($indexParams);\n }", "title": "" }, { "docid": "19b6f5f4edb3d35d3cff778705f5b57a", "score": "0.47856838", "text": "public function insertObject(IndexInterface $index, $type, $object);", "title": "" }, { "docid": "2318a21f207777c69cb00adef35b6b1f", "score": "0.47811997", "text": "function on_indexing_operations_conf()\n {\n $this->custom_buttons(\"elasticsearch_index_all_posts\", \"Index All Posts\");\n $this->custom_buttons(\"elasticsearch_delete_all_posts\", \"Delete Documents\");\n }", "title": "" }, { "docid": "c99f89608df52ef283123493d94515f8", "score": "0.47791097", "text": "public function getIndex()\n {\n return view('document_type.index');\n }", "title": "" }, { "docid": "2613a6db96cba57979482cbb84a52e9a", "score": "0.47787073", "text": "public function add(): Response{\r\n $this->document_id = $this->findMaxColumnValue(\"document_id\")+1;\r\n return parent::add();\r\n }", "title": "" }, { "docid": "f5277f8ed55f7c35c628bbeac259fdf4", "score": "0.477509", "text": "public function action_update()\n {\n $model = Request::$current->param('model');\n $post = Request::$current->post();\n\n if ( $post['ajax'] )\n {\n $this->auto_render = FALSE;\n $struct = [];\n\n Arr::from_char('.', $struct, $post['path'], $post['data']);\n\n // Set to an empty string for better display\n if ( $post['data'] == '<p><br></p>' )\n {\n $post['data'] = '';\n }\n\n // If this is a global content item\n if ( isset($struct['cms_global']) )\n {\n $post['global'] = 'true';\n $post['cms_global'] = $struct['cms_global'];\n unset($post['controller']);\n unset($post['action']);\n\n $params = ['global' => 'true'];\n $existing = BrassDB::instance()->find_one('pages', $params);\n }\n // Must be local to a controller and action\n // in the future this may use ID's too\n else\n {\n $post['cms'] = $struct['cms'];\n\n $params = ['controller' => $post['controller'], 'action' => $post['action']];\n $existing = BrassDB::instance()->find_one('pages', $params);\n }\n\n // If we found a document, lets update it\n if ( $existing )\n {\n $updated = BrassDB::instance()->update('pages', $params, ['$set' => [$post['path'] => $post['data']]]);\n }\n // Otherwise we need to create it\n else\n {\n unset($post['path']);\n unset($post['ajax']);\n unset($post['data']);\n\n $created = BrassDB::instance()->insert('pages', $post);\n }\n\n if ( isset($updated) OR isset($created) )\n echo json_encode(['status' => 'success']);\n else\n echo json_encode(['status' => 'failed']);\n }\n }", "title": "" }, { "docid": "efdaa021be2001bc65c7a8db9bfbd5fc", "score": "0.47604388", "text": "public function create()\n {\n return view('admin.indexText-add');\n }", "title": "" }, { "docid": "9dad0391e431fe05db73ab1ff2cf43df", "score": "0.47522426", "text": "function edit() {\n if($this->request->isAsyncCall() || ($this->request->isApiCall() && $this->request->isSubmitted())) {\n if($this->active_document->isLoaded()) {\n if($this->active_document->canEdit($this->logged_user)) {\n $document_data = $this->request->post('document', array(\n 'name' => $this->active_document->getName(),\n 'body' => $this->active_document->getBody(),\n 'category_id' => $this->active_document->getCategoryId(),\n 'visibility' => $this->active_document->getVisibility(),\n ));\n \n $this->response->assign(array(\n 'document_data' => $document_data,\n ));\n \n if($this->request->isSubmitted()) {\n try {\n DB::beginWork('Updating document @ ' . __CLASS__);\n \n $this->active_document->setAttributes($document_data);\n $this->active_document->save();\n \n DB::commit('Document updated @ ' . __CLASS__);\n \n $this->response->respondWithData($this->active_document, array(\n 'as' => 'document',\n 'detailed' => true\n ));\n } catch(Exception $e) {\n DB::rollback('Failed to update document @ ' . __CLASS__);\n $this->response->exception($e);\n } // try\n } // if\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n } else {\n $this->response->badRequest();\n } // if\n }", "title": "" }, { "docid": "aae7fab9bd8f5c050bfd87ac8ef73d4f", "score": "0.47496232", "text": "public function actionCreate()\n\t\t {\n\t\t \t //CREATING INDEX TO SEARCH DOCUMENT\n\t\t \t \n\t\t \t\t$_indexFiles = '\\runtime\\search';\n\t\t \t $index = Zend_Search_Lucene::create($_indexFiles);\n\t\t \t\t$index = new Zend_Search_Lucene(Yii::getPathOfAlias('application.' . $this->_indexFiles), true);\n\t\t \t\t$index = new Zend_Search_Lucene($this->_indexFiles,true);\n\n \t\t\n \t\t\n\t \t\t //CODE TO GET THE EXTENTION OF FILE\n\t \t\t /*\n\t \t\t if(($pos=strrpos($post->file,'.'))!==false)\n\t \t\t\t$ext=substr($post->file,$pos+1);\n\t \t\t\t\n\t \t\t\t*/\n\t\t \t\t/*\n\t\t \t\t *\n\t\t\t\t //THIS FUCTION IS USE TO READ THE CONTENT OF DOC FILE FOR SEACHING .\t\t\n\t\t\t\t * \n\t\t\t\t */ \n\n\t\t\t\t \tfunction read_doc($filename)\t{\n\t\t\t\t\t\t$fileHandle = fopen($filename, \"r\");\n\t\t\t\t\t\t$line = @fread($fileHandle, filesize($filename)); \n\t\t\t\t\t\t$lines = explode(chr(0x0D),$line);\n\t\t\t\t\t\t$outtext = \"\";\n\t\t\t\t\t\tforeach($lines as $thisline)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t$pos = strpos($thisline, chr(0x00));\n\t\t\t\t\t\t\tif (($pos !== FALSE)||(strlen($thisline)==0))\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t$outtext .= $thisline.\" \";\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t\t $outtext = preg_replace(\"/[^a-zA-Z0-9\\s\\,\\.\\-\t\t\t\t\\n\\r\\t@\\/\\_\\(\\)]/\",\"\",$outtext);\n\t\t\t\t\t\treturn $outtext;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t *\n\t\t\t\t\t//METHOD TO READ THE TEXT OF ODT FILE\n\t\t\t\t\t * \n\t\t\t\t\t */\n\t\t\t\t \tfunction odt_to_text($input_file){\n\t\t\t\t $xml_filename = \"content.xml\"; //content file name\n\t\t\t\t $zip_handle = new ZipArchive;\n\t\t\t\t $output_text = \"\";\n\t\t\t\t if(true === $zip_handle->open($input_file)){\n\t\t\t\t if(($xml_index = $zip_handle->locateName($xml_filename)) !== false){\n\t\t\t\t $xml_datas = $zip_handle->getFromIndex($xml_index);\n\t\t\t\t // $var = new DOMDocument;\n\t\t\t\t $xml_handle = @DOMDocument::loadXML($xml_datas, LIBXML_NOENT | LIBXML_XINCLUDE | LIBXML_NOERROR | LIBXML_NOWARNING);\n\t\t\t\t $output_text = strip_tags($xml_handle->saveXML());\n\t\t\t\t }else{\n\t\t\t\t $output_text .=\"\";\n\t\t\t\t }\n\t\t\t\t $zip_handle->close();\n\t\t\t\t }else{\n\t\t\t\t $output_text .=\"\";\n\t\t\t\t }\n\t\t\t\t return $output_text;\n\t\t\t\t }\n\t\n\t\t\t\t /*\n\t\t\t\t *\n\t\t\t METHOD TO EXTRACT FROM DOCX FILE\n\t\t\t * \n\t\t\t */\t\n\t\t\t \t\tfunction read_file_docx($filename)\n\t\t\t \t\t{\n\t\t\t \t\t\t$striped_content = '';\n\t\t\t \t\t\t$content = '';\n\t\t\t \t\t\tif(!$filename || !file_exists($filename)) return false;\n\t\t\t \t\t\t$zip = zip_open($filename);\n\t\t\t \t\t\tif (!$zip || is_numeric($zip)) return false;\n\t\t\t \t\t\twhile ($zip_entry = zip_read($zip)) {\n\t\t\t \t\t\t\tif (zip_entry_open($zip, $zip_entry) == FALSE) continue;\n\t\t\t \t\t\t\tif (zip_entry_name($zip_entry) != \"word/document.xml\") continue;\n\t\t\t \t\t\t\t$content .= zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));\n\t\t\t \t\t\t\tzip_entry_close($zip_entry);\n\t\t\t \t\t\t}\n\t\t\t \t\t\tzip_close($zip);\n\t\t\t \t\t\t$content = str_replace('</w:r></w:p></w:tc><w:tc>', \" \", $content);\n\t\t\t \t\t\t$content = str_replace('</w:r></w:p>', \"\\r\\n\", $content);\n\t\t\t \t\t\t$striped_content = strip_tags($content);\n\t\t\t \t\t\n\t\t\t \t\t\treturn $striped_content;\n\t\t\t \t\t}\n\t\t\t \t\t\n\t\t\t \t\t/*\n\t\t\t \t\t *\n\t\t\t\t \t\t METHOD TO EXTRACT FROM PPT FILE\n\t\t\t\t \t\t * \n\t\t\t\t \t\t */\n\t\t\t\t \t\t \n\t\t\t\t \t\t function pptx_to_text($input_file){\n\t\t\t\t \t\t$zip_handle = new ZipArchive;\n\t\t\t\t \t\t$output_text = \"\";\n\t\t\t\t \t\tif(true === $zip_handle->open($input_file)){\n\t\t\t\t \t\t$slide_number = 1; //loop through slide files\n\t\t\t\t \t\twhile(($xml_index = $zip_handle->locateName(\"ppt/slides/slide\".$slide_number.\".xml\")) !== false){\n\t\t\t\t \t\t$xml_datas = $zip_handle->getFromIndex($xml_index);\n\t\t\t\t \t\t$xml_handle =@DOMDocument::loadXML($xml_datas, LIBXML_NOENT | LIBXML_XINCLUDE | LIBXML_NOERROR | LIBXML_NOWARNING);\n\t\t\t\t \t\t$output_text .= strip_tags($xml_handle->saveXML());\n\t\t\t\t \t\t$slide_number++;\n\t\t\t\t \t\t}\n\t\t\t\t \t\tif($slide_number == 1){\n\t\t\t\t \t\t$output_text .=\"\";\n\t\t\t\t \t\t}\n\t\t\t\t \t\t$zip_handle->close();\n\t\t\t\t \t\t}else{\n\t\t\t\t \t\t$output_text .=\"\";\n\t\t\t\t \t\t}\n\t\t\t\t \t\treturn $output_text;\n\t\t\t\t \t\t}\n\t\t\t\t \t\t \n\t\t\t\t \t\t/*\n\t\t\t\t \t\t *\n\t\t\t\t \t\t\n\t\t\t\t \tMETHOD TO READ PPT CONTENT\t\n\t\t\t\t \t * \n\t\t\t\t \t */\n\t\t\t\t\t\t function parsePPT($filename) {\n\t\t\t\t\t\t // This approach uses detection of the string\n\t\t\t\t\t\t\n\t\t\t\t\t\t $fileHandle = fopen($filename, \"r\");\n\t\t\t\t\t\t $line = @fread($fileHandle, filesize($filename));\n\t\t\t\t\t\t $lines = explode(chr(0x0f),$line);\n\t\t\t\t\t\t $outtext = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\t foreach($lines as $thisline) {\n\t\t\t\t\t\t if (strpos($thisline, chr(0x00).chr(0x00).chr(0x00)) == 1) {\n\t\t\t\t\t\t $text_line = substr($thisline, 4);\n\t\t\t\t\t\t $end_pos = strpos($text_line, chr(0x00));\n\t\t\t\t\t\t $text_line = substr($text_line, 0, $end_pos);\n\t\t\t\t\t\t $text_line =\n\t\t\t\t\t\t preg_replace(\"/[^a-zA-Z0-9\\s\\,\\.\\-\\n\\r\\t@\\/\\_\\(\\)]/\",\"\",$text_line);\n\t\t\t\t\t\t if (strlen($text_line) > 1) {\n\t\t\t\t\t\t $outtext.= substr($text_line, 0, $end_pos).\"\\n\";\n\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t\t return $outtext;\n\t\t\t\t\t\t }\n\t\t\t\t \n\t\t\t\t\t\t /*\n\t\t\t\t\t\t *\n\t\t\t\t \t\t METHOD TO EXTRACT FROM EXCEL FILE\n\t\t\t\t \t\t * \n\t\t\t\t \t\t */\n\t\t\t\t \t\tfunction xlsx_to_text($input_file){\n\t\t\t\t \t\t\t$xml_filename = \"xl/sharedStrings.xml\"; //content file name\n\t\t\t\t \t\t\t$zip_handle = new ZipArchive;\n\t\t\t\t \t\t\t$output_text = \"\";\n\t\t\t\t \t\t\tif(true === $zip_handle->open($input_file)){\n\t\t\t\t \t\t\t\tif(($xml_index = $zip_handle->locateName($xml_filename)) !== false){\n\t\t\t\t \t\t\t\t\t$xml_datas = $zip_handle->getFromIndex($xml_index);\n\t\t\t\t \t\t\t\t\t$xml_handle = @DOMDocument::loadXML($xml_datas, LIBXML_NOENT | LIBXML_XINCLUDE | LIBXML_NOERROR | LIBXML_NOWARNING);\n\t\t\t\t \t\t\t\t\t$output_text = strip_tags($xml_handle->saveXML());\n\t\t\t\t \t\t\t\t}else{\n\t\t\t\t \t\t\t\t\t$output_text .=\"\";\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\t$zip_handle->close();\n\t\t\t\t \t\t\t}else{\n\t\t\t\t \t\t\t\t$output_text .=\"\";\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\treturn $output_text;\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t\t\n\t\t\t\t \t\t/*\n\t\t\t\t \t\t *\n\t\t\t\t \t\t FOR EXTRACT DATA OF PDF FILE\n\t\t\t\t \t\t * \n\t\t\t\t \t\t */\n\t\t\t\t \t\t \n\t\t\t\t \t\tfunction ExtractTextFromPdf ($pdfdata) {\n\t\t\t\t \t\t\tif (strlen ($pdfdata) < 1000 && file_exists ($pdfdata)) $pdfdata = file_get_contents ($pdfdata); //get the data from file\n\t\t\t\t \t\t\tif (!trim ($pdfdata)) echo \"Error: there is no PDF data or file to process.\";\n\t\t\t\t \t\t\t$result = ''; //this will store the results\n\t\t\t\t \t\t\t//Find all the streams in FlateDecode format (not sure what this is), and then loop through each of them\n\t\t\t\t \t\t\tif (preg_match_all ('/<<[^>]*FlateDecode[^>]*>>\\s*stream(.+)endstream/Uis', $pdfdata, $m)) foreach ($m[1] as $chunk) {\n\t\t\t\t \t\t\t\t$chunk = gzuncompress (ltrim ($chunk)); //uncompress the data using the PHP gzuncompress function\n\t\t\t\t \t\t\t\t//If there are [] in the data, then extract all stuff within (), or just extract () from the data directly\n\t\t\t\t \t\t\t\t$a = preg_match_all ('/\\[([^\\]]+)\\]/', $chunk, $m2) ? $m2[1] : array ($chunk); //get all the stuff within []\n\t\t\t\t \t\t\t\tforeach ($a as $subchunk) if (preg_match_all ('/\\(([^\\)]+)\\)/', $subchunk, $m3)) $result .= join ('', $m3[1]); //within ()\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\telse echo \"Error: there is no FlateDecode text in this PDF file that I can process.\";\n\t\t\t\t \t\t\treturn $result; //return what was found\n\t\t\t\t \t\t}\n \t\t\n \t\t\n \t\t\n \t\n \t\t \n \t\t $posts = Asset::model()->findAll(); //LOADING ASSET MODULE TO SEARCH DOCUMENT\n \t\t \n \t\t // FOR EACH LOOP TO GET THE DATA\n \t foreach($posts as $post){\n \t\t \n \t\t \n \t\t \t if(($pos=strrpos($post->file,'.'))!==false)\n \t\t\t\t\t$ext=substr($post->file,$pos+1);\n \t\t \n\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t if ($ext==='docx')//INDEXING DOCX FILE INTO SEARCH\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \t\t \n\t\t\t\t\t\t\t \t\t $a = $post->categoryId;\n\t\t\t\t\t\t\t \t\t $b = $b=$post->orgId;\n\t\t\t\t\t\t\t \t //creating a document for docx file\n\t\t\t\t\t\t\t \t $doc = Zend_Search_Lucene_Document_Docx::loadDocxFile(Yii::app()->basePath.'\\..\\upload\\\\'.$b.'\\\\'.$a.'\\\\'.$post->assetId.'.docx');\n\n\t\t\t\t\t\t\t \t $numericalValue = '123456789';\n\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Keyword('keyword', $this->numericalValue));\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t //exttracting data for searching in docx file content. \n\t\t\t\t\t\t\t \t $data=read_file_docx(Yii::app()->basePath.'\\..\\upload\\\\'.$b.'\\\\'.$a.'\\\\'.$post->assetId.'.docx');\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t//adding fields to search document. \n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('link',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->url)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t\t\t \t);\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t //adding fields name to search document with assetId.\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('name',\n\t\t\t\t\t\t\t \t \t\tCHtml::encode($post->assetId), 'utf-8')\n\t\t\t\t\t\t\t \t );\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t //adding fieldstitle to search document file name.\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('title',\n\t\t\t\t\t\t\t \t \t\tCHtml::encode($post->file)\n\t\t\t\t\t\t\t \t \t\t, 'utf-8')\n\t\t\t\t\t\t\t \t );\n\t\t\t\t\t\t\t \t //adding field content to search document with data of file. \n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('content',\n\t\t\t\t\t\t\t \t \t\tCHtml::encode($data)\n\t\t\t\t\t\t\t \t \t\t, 'utf-8')\n\t\t\t\t\t\t\t \t );\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t //adding document to search. \n\t\t\t\t\t\t\t \t $index->addDocument($doc);\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t \t elseif($ext=='pptx') //INDEXING PPTX FILE INTO SEARCH\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t {\n\t\t\t\t\t\t\t \t\t $a = $post->categoryId;\n\t\t\t\t\t\t\t \t\t $b=$post->orgId;\n\t\t\t\t\t\t\t \t\t \n\t\t\t\t\t\t\t \t //here craeting an document to add pptx files into search index \n\t\t\t\t\t\t\t $doc1 = Zend_Search_Lucene_Document_Pptx::loadPptxFile(Yii::app()->basePath.'\\..\\upload\\\\'.$b.'\\\\'.$a.'\\\\'.$post->assetId.'pptx');\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t $numericalValue = '123456789';\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t $doc1->addField(Zend_Search_Lucene_Field::Keyword('keyword', $this->numericalValue));\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t //etracting pptx file text to add it in search document\n\t\t\t\t\t\t\t $data=pptx_to_text(Yii::app()->basePath.'\\..\\upload\\\\'.$b.'\\\\'.$a.'\\\\'.$post->assetId.'.pptx');\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t//adding field title to search document with file name\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t$doc1->addField(Zend_Search_Lucene_Field::Text('title',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->file)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t\t\t \t);\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t//adding content field to search document with content of pptx file.\n\t\t\t\t\t\t\t \t$doc1->addField(Zend_Search_Lucene_Field::Text('content',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($data)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t\t\t \t);\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t//adding name field to search with assetId\n\t\t\t\t\t\t\t \t$doc1->addField(Zend_Search_Lucene_Field::Text('name',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->assetId), 'utf-8')\n\t\t\t\t\t\t\t \t);\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t//adding link field to search document with url\n\t\t\t\t\t\t\t \t$doc1->addField(Zend_Search_Lucene_Field::Text('link',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->url)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t\t\t \t);\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t//adding document to search index\n\t\t\t\t\t\t\t \t $index->addDocument($doc1);\n\t\t\t\t\t\t\t \t }\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t elseif($ext=='xlsx') //INDEXING XLSX FILE INTO SEARCH\n\t\t\t\t\t\t\t \t {\n\t\t\t\t\t\t\t \t \t\n\t\t\t\t\t\t\t \t $a = $post->categoryId;\n\t\t\t\t\t\t\t \t\t $b=$post->orgId;\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \t//here creating document to load xlsx file in search document\n\t\t\t\t\t\t\t \t$doc3 = Zend_Search_Lucene_Document_Xlsx::loadXlsxFile(Yii::app()->basePath.'\\..\\upload\\\\'.$b.'\\\\'.$a.'\\\\'.$post->assetId.'.xlsx');\n\t\t\t\t\t\t\t \t$numericalValue = '123456789';\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t$doc3->addField(Zend_Search_Lucene_Field::Keyword('keyword', $this->numericalValue));\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t//here extracting text of xlsx file to search in conent \n\t\t\t\t\t\t\t \t$data=xlsx_to_text(Yii::app()->basePath.'\\..\\upload\\\\'.$b.'\\\\'.$a.'\\\\'.$post->assetId.'.xlsx');\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t //here adding link field to search document with url.\n\t\t\t\t\t\t\t \t$doc3->addField(Zend_Search_Lucene_Field::Text('link',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->url)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t\t\t \t);\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t//here adding name field to search document with asset id. \n\t\t\t\t\t\t\t \t$doc3->addField(Zend_Search_Lucene_Field::Text('name',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->assetId), 'utf-8')\n\t\t\t\t\t\t\t \t);\n\n\t\t\t\t\t\t\t \t//here adding title field in search document with filename\n\t\t\t\t\t\t\t \t$doc3->addField(Zend_Search_Lucene_Field::Text('title',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->file)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t\t\t \t);\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t//here adding content field in search document with extracted data\n\t\t\t\t\t\t\t \t$doc3->addField(Zend_Search_Lucene_Field::Text('content',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($data)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t\t\t \t);\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t// adding document into search index.\n\t\t\t\t\t\t\t \t $index->addDocument($doc3);\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \t else if ($ext == 'doc') //INDEXING DOC FILE INTO SEARCH\n\t\t\t\t\t\t\t \t {\n\t\t\t\t\t\t\t \t \t$a = $post->categoryId;\n\t\t\t\t\t\t\t \t \t $b=$post->orgId;\n\t\t\t\t\t\t\t \t \t\t\n\t\t\t\t\t\t\t \t \t//creating instance of document for doc file \n\t\t\t\t\t\t\t \t \t$doc = new Zend_Search_Lucene_Document();\n\t\t\t\t\t\t\t \t \t\n\t\t\t\t\t\t\t \t \t$numericalValue = '123456789';\n\t\t\t\t\t\t\t \t \t\n\t\t\t\t\t\t\t \t \t$doc->addField(Zend_Search_Lucene_Field::Keyword('keyword', $this->numericalValue));\n\t\t\t\t\t\t\t \t \t\n\t\t\t\t\t\t\t \t \t//extracting data from bdaoc file to add it into search document,\n \t\t\t\t\t\t\t\t\t\t$data1 = read_doc(Yii::app()->basePath.'\\..\\upload\\\\'.$b.'\\\\'.$a.'\\\\'.$post->assetId.'doc');\n\t\t\t\t\t\t\t \t \t\n\t\t\t\t\t\t\t \t \t$data=substr($data1,0,1000);\n\t\t\t\t\t\t\t \t \t \n\t\t\t\t\t\t\t \t \t//adding link field to search document with url\n\t\t\t\t\t\t\t \t \t $doc->addField(Zend_Search_Lucene_Field::Text('link',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->url)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t\t\t \t\t);\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t \t //adding name field to search document with asset id\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('name',\n\t\t\t\t\t\t\t \t \t\tCHtml::encode($post->assetId), 'utf-8')\n\t\t\t\t\t\t\t \t );\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t //adding title field in search document with file name\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('title',\n\t\t\t\t\t\t\t \t \t\tCHtml::encode($post->file)\n\t\t\t\t\t\t\t \t \t\t, 'utf-8')\n\t\t\t\t\t\t\t \t );\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t //adding content field in search document with extracted data from doc file\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('content',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($data)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\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 \t //adding search document to search index\n\t\t\t\t\t\t\t \t $index->addDocument($doc);\n\t\t\t\t\t\t\t \t \t\t\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t }else if ($ext == 'odt') //INDEXING ODT FILE INTO SEARCH\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \t$a = $post->categoryId;\n\t\t\t\t\t\t\t \t $b=$post->orgId;\n\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t \t \t//creating instance of search document to add odt file \n\t\t\t\t\t\t\t \t \t$doc = new Zend_Search_Lucene_Document();\n\t\t\t\t\t\t\t \t \t\n\t\t\t\t\t\t\t \t \t//here text is extracted to search \n\t\t\t\t\t\t\t \t \t$data = odt_to_text(Yii::app()->basePath.'\\..\\upload\\\\'.$b.'\\\\'.$a.'\\\\'.$post->assetId.'.odt');\n\t\t\t\t\t\t\t \t \t\n\t\t\t\t\t\t\t \t \t$numericalValue = '123456789';\n\t\t\t\t\t\t\t \t \t\n\t\t\t\t\t\t\t \t \t$doc->addField(Zend_Search_Lucene_Field::Keyword('keyword', $this->numericalValue));\n\t\t\t\t\t\t\t \t \t\n\t\t\t\t\t\t\t \t \t \n\t\t\t\t\t\t\t \t \t //adding link field in search document with url\n\t\t\t\t\t\t\t \t \t $doc->addField(Zend_Search_Lucene_Field::Text('link',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->url)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t\t\t \t\t);\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t \t //adding name fioeld in search document with assetid\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('name',\n\t\t\t\t\t\t\t \t \t\tCHtml::encode($post->assetId), 'utf-8')\n\t\t\t\t\t\t\t \t );\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t //adding title field in search document with file name\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('title',\n\t\t\t\t\t\t\t \t \t\tCHtml::encode($post->file)\n\t\t\t\t\t\t\t \t \t\t, 'utf-8')\n\t\t\t\t\t\t\t \t );\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t //here adding content field search document with extracted data\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('content',\n\t\t\t\t\t\t\t \t\t\t$data\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\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 \t //here the search document is added to search index\n\t\t\t\t\t\t\t \t $index->addDocument($doc);\n\t\t\t\t\t\t\t \t \t\t\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t } else if ($ext == 'pdf') //INDEXING PDF FILE INTO SEARCH\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t$a = $post->categoryId;\n\t\t\t\t\t\t\t \t $b=$post->orgId;\n\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t \t //creating instant of search document for pdf file\t\n\t\t\t\t\t\t\t \t$doc5 = new Zend_Search_Lucene_Document();\n\t\t\t\t\t\t\t \t//here extracting the text from pdf file for content search\n\t\t\t\t\t\t\t \t$data1 = ExtractTextFromPdf (Yii::app()->basePath.'\\..\\upload\\\\'.$b.'\\\\'.$a.'\\\\'.$post->assetId.'.pdf');\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t $numericalValue = '123456789';\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t$doc5->addField(Zend_Search_Lucene_Field::Keyword('keyword', $this->numericalValue));\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t$data=substr($data1,0,1000);\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t//adding content field to search document with extracted data\n\t\t\t\t\t\t\t \t $doc5->addField(Zend_Search_Lucene_Field::Text('content',\n\t\t\t\t\t\t\t \t \t\t $data\n\t\t\t\t\t\t\t \t \t\t )\n\t\t\t\t\t\t\t \t );\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t //adding link field to search document wit url\n\t\t\t\t\t\t\t \t$doc5->addField(Zend_Search_Lucene_Field::Text('link',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->url)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t\t\t \t);\n\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t \t//adding name field to search document with asset id\n\t\t\t\t\t\t\t \t$doc5->addField(Zend_Search_Lucene_Field::Text('name',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->assetId), 'utf-8')\n\t\t\t\t\t\t\t \t);\n\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t \t//adding title field to search document with file name\n\t\t\t\t\t\t\t \t$doc5->addField(Zend_Search_Lucene_Field::Text('title',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->file)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t\t\t \t);\n\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t//ADDIND PDF DOCUMENT TO SEARCH\n\t\t\t\t\t\t\t \t$index->addDocument($doc5);\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t } else if ($ext == 'ppt')//INDEXING PPT FILE INTO SEARCH\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t \t$a = $post->categoryId;\n\t\t\t\t\t\t\t\t\t $b=$post->orgId;\n\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\t \t\t$doc = new Zend_Search_Lucene_Document();\n\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t \t\t//here browsing a file to add the content of file to lucene search document.\n\t\t\t\t\t\t\t \t \t$data = pptx_to_text(Yii::app()->basePath.'\\..\\upload\\\\'.$b.'\\\\'.$a.'\\\\'.$post->assetId.'.ppt');\n\t\t\t\t\t\t\t \t \t \n\t\t\t\t\t\t\t \t \t$numericalValue = '123456789';\n\t\t\t\t\t\t\t \t \t\n\t\t\t\t\t\t\t \t \t$doc->addField(Zend_Search_Lucene_Field::Keyword('keyword', $this->numericalValue));\n\t\t\t\t\t\t\t \t \t\n\t\t\t\t\t\t\t \t \t//adding link of file to lucene search document.\n\t\t\t\t\t\t\t \t \t $doc->addField(Zend_Search_Lucene_Field::Text('link',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->url)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t\t\t \t\t);\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t \t //adding name field of file to search document.\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('name',\n\t\t\t\t\t\t\t \t \t\tCHtml::encode($post->assetId), 'utf-8')\n\t\t\t\t\t\t\t \t );\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t //adding title field of file to search document..\n\t\t\t\t\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('title',\n\t\t\t\t\t\t\t \t \t\tCHtml::encode($post->file)\n\t\t\t\t\t\t\t \t \t\t, 'utf-8')\n\t\t\t\t\t\t\t \t );\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t //here adding content to lucene search index.\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('content',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($data)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\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 \t \n\t\t\t\t\t\t\t \t// adding this document \n\t\t\t\t\t\t\t \t $index->addDocument($doc);\n\t\t\t\t\t\t\t \t \t\t\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t \t//INDEXING OTHER FILES INTO SEARCH\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t $doc = new Zend_Search_Lucene_Document();\n\t\t\t\t\t\t\t \t \t \n\t\t\t\t\t\t\t \t \t //\tadding link to search\n\t\t\t\t\t\t\t \t \t $doc->addField(Zend_Search_Lucene_Field::Text('link',\n\t\t\t\t\t\t\t \t\t\tCHtml::encode($post->url)\n\t\t\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t\t\t \t\t);\n\t\t\t\t\t\t\t \t \t \n\t\t\t\t\t\t\t \t \t$numericalValue = '123456789';\n\t\t\t\t\t\t\t \t \t \n\t\t\t\t\t\t\t \t \t $doc->addField(Zend_Search_Lucene_Field::Keyword('keyword', $this->numericalValue));\n\t\t\t\t\t\t\t \t \t \n\t\t\t\t\t\t\t \t \t //\tadding name field to search\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('name',\n\t\t\t\t\t\t\t \t \t\tCHtml::encode($post->assetId), 'utf-8')\n\t\t\t\t\t\t\t \t );\n\t\t\t\t\t\t\t \t //adding title fieild to search\n\t\t\t\t\t\t\t \t $doc->addField(Zend_Search_Lucene_Field::Text('title',\n\t\t\t\t\t\t\t \t \t\tCHtml::encode($post->file)\n\t\t\t\t\t\t\t \t \t\t, 'utf-8')\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 \t //adding this document to search index\n\t\t\t\t\t\t\t \t $index->addDocument($doc);\n }\n \t\n \n \t\t\n }\n \n \n \n //HERE LOADING TAGS TABLE TO SEARCH\n \t $posts = Tags::model()->findAll(); \n \n foreach($posts as $post){\n \t // here creating document for tag \n\t\t\t\t\t \t$doc5 = new Zend_Search_Lucene_Document();\n\t\t\t\t\t \t\t\n\t\t\t\t\t \t//here adding title to search document with tag name.\n\t\t\t\t\t \t$doc5->addField(Zend_Search_Lucene_Field::Text('title',\n\t\t\t\t\t \t\t\tCHtml::encode($post->tagName), 'utf-8')\n\t\t\t\t\t \t);\n\t\t\t\t\t //here adding name to search document with tag id.\n\t\t\t\t\t \t$doc5->addField(Zend_Search_Lucene_Field::Text('name',\n\t\t\t\t\t \t\t\tCHtml::encode($post->tagId), 'utf-8')\n\t\t\t\t\t \t);\n\t\t\t\t\t \t\t\n\t\t\t\t\t \t//here adding link to search document with url.\n\t\t\t\t\t \t$doc5->addField(Zend_Search_Lucene_Field::Text('link',\n\t\t\t\t\t \t\t\tCHtml::encode($post->url)\n\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t \t);\n\t\t\t\t\t \t\n\t\t\t\t\t \t$numericalValue = '123456789';\n\t\t\t\t\t \t\n\t\t\t\t\t \t$doc->addField(Zend_Search_Lucene_Field::Keyword('keyword', $this->numericalValue));\n\t\t\t\t\t \t\n\t\t\t\t\t \t\t//here adding content to search document with ornization id.\n\t\t\t\t\t \t$doc5->addField(Zend_Search_Lucene_Field::Text('content',\n\t\t\t\t\t \t\t\tCHtml::encode($post->orgId)\n\t\t\t\t\t \t\t\t, 'utf-8')\n\t\t\t\t\t \t);\n\t\t\t\t\t \t\t//adding search document to lucene search index.\n\t\t\t\t\t \t $index->addDocument($doc5);\n\t\t\t\t\t \t\t\n \t \n\t\t\t\t \t\t\n\t\t\t\t \t\t\n\t\t\t\t \t\t\n\t\t\t\t \t\t\n\t\t\t\t \t\t\n\t\t\t\t }\n\t\t\t\t \t\n\t\t\t\t\t\t\t \t \n \t \n\t\t\t\t\t\t\t \t\n \n \n \t \n \t \n \t \n \t\t\n \t //COMMITING INDEX HERE\n \t \n\t\t\t\t \t\t $index->commit();\n\t\t\t\t \t\t echo 'Lucene index created';\n \t\t\n \t \t \n \t\t\n \t}", "title": "" }, { "docid": "45b6d950302588fe1b5a0a7495b57ba8", "score": "0.47467002", "text": "public function addDocument($article){\n $this->Docs[$article['id']]=$article['description'];\n }", "title": "" } ]
15eeb14feb213536867a7c565e2c8e3d
Fields to be shown on lists
[ { "docid": "af789a539561e10eefbb51e519a62f05", "score": "0.0", "text": "protected function configureListFields(ListMapper $listMapper)\n {\n $listMapper\n ->addIdentifier('name')\n ->addIdentifier('url')\n ->add('website')\n ;\n }", "title": "" } ]
[ { "docid": "704fd4d8ce831ccd84579cbdecbce146", "score": "0.7688752", "text": "abstract public function list_fields();", "title": "" }, { "docid": "3640ba20b7819f66038ce200205140a7", "score": "0.767854", "text": "protected function listFields() {\n\t\t/** @var ilToolbarGUI $ilToolbar */\n\t\tglobal $ilToolbar;\n\n\t\t$ilToolbar->addButton($this->lng->getTxtAddField(), $this->ctrl->getLinkTarget($this, 'addField'));\n\n\t\t$table = $this->createILubFieldDefinitionTableGUI();\n\t\t$table->parse($this->container->getFieldDefinitions());\n\t\t$this->tpl->setContent($table->getHTML());\n\t}", "title": "" }, { "docid": "64da24a01a6b2f8a86b8b3897bb373ce", "score": "0.74922556", "text": "public function makeFieldList() {}", "title": "" }, { "docid": "19ea6e850629f4b7b9748c249b1cd209", "score": "0.73961174", "text": "protected function getFieldsFromShowItem() {}", "title": "" }, { "docid": "c097bad8e7ac7cc13ce52f3e2daf1fc9", "score": "0.73941326", "text": "function showFields()\n {\n echo '|---------------------------------------|<br/>';\n for($i = 0; $i < count($this->fields); $i++)\n {\n echo $this->fields[$i].'<br/>';\n }\n echo '|---------------------------------------|<br/>';\n }", "title": "" }, { "docid": "33d611cec9f96fd51a151397d785fa93", "score": "0.73517346", "text": "public function getFieldsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.7065264", "text": "public function fields();", "title": "" }, { "docid": "33a191a4112624710dd286277bbd861c", "score": "0.70260215", "text": "public function FieldList() {\n $output = FieldList::create();\n $index = 0;\n\n if ($this->value) {\n foreach ($this->value as $record) {\n $output->push(LiteralField::create(\n 'Template'. $record->ID,\n $record->customise(ArrayData::create([\n 'RemoveLink' => $this->Link(sprintf(\n 'deleteRecord?ClassName=%s&ID=%s&SecurityID=%s',\n $record->ClassName,\n $record->ID,\n SecurityToken::inst()->getValue()\n ))\n ]))->renderWith($this->summaryTemplate)\n ));\n }\n }\n\n return $output;\n }", "title": "" }, { "docid": "374d46739d53c42bbf50e89a8d6b616f", "score": "0.69452024", "text": "public function buildFields()\n {\n $this\n ->addField('title', 'kuma_node.admin.list.header.title', true, '@KunstmaanNode/Admin/title.html.twig')\n ->addField('created', 'kuma_node.admin.list.header.created_at', true)\n ->addField('updated', 'kuma_node.admin.list.header.updated_at', true)\n ->addField('online', 'kuma_node.admin.list.header.online', true, '@KunstmaanNode/Admin/online.html.twig');\n }", "title": "" }, { "docid": "2888c6bd7c25be5c7d0c995a913b648b", "score": "0.6930568", "text": "protected function listRegisterFields() {\n \n }", "title": "" }, { "docid": "a30c85399b60b3a0489e405a07e379a5", "score": "0.6918862", "text": "public function getFieldsToShow()\r\n {\r\n // the first field in the array is the one used as header in the smartSearch\r\n return array(\r\n \"username\",\r\n \"fullname\"\r\n );\r\n }", "title": "" }, { "docid": "fc70d737e23130af8a6253498959be7e", "score": "0.68914634", "text": "public static function listFields(){\n\t\treturn [ \n\t\t\t\"id\", \n\t\t\t\"username\", \n\t\t\t\"points\", \n\t\t\t\"date\", \n\t\t\t\"user_id\" \n\t\t];\n\t}", "title": "" }, { "docid": "b6df31545141496020dfac1533ee0b7e", "score": "0.6867474", "text": "public function fieldsAction()\n {\n $max=$this->_getParam('max');\n try{\n\t$this->view->items = $this->_getItems($max);\n\t$this->view->fields = $this->_getFields($this->_getItems(),$max);\n }catch(Exception $e) {\n\treturn(array());\n }\n }", "title": "" }, { "docid": "76dd1d9bfa450d17df4d5c12eb9d3547", "score": "0.68636364", "text": "function render_fields(){\n\t\tforeach($this->fields as &$value)\n\t\t\techo $value->render(), PHP_EOL;\n\t}", "title": "" }, { "docid": "3c4d1dd6ff0f562ef15d5721537dfc8c", "score": "0.68615305", "text": "function fill_in_additional_list_fields()\n\t{\n\t\t$this->fill_in_additional_detail_fields();\n\t}", "title": "" }, { "docid": "94bcdc5060c597266d4860ec3e84abef", "score": "0.68465304", "text": "function _list_field()\n\t{\n\t\t// VARCHAR\n\t\t$fields['code'] = ['type' => 'VARCHAR', 'constraint' => '40', 'null' => TRUE];\n\t\t// TEXT\n\t\t$fields['description'] = ['type' => 'TEXT', 'null' => TRUE];\n\t\t// ID & FOREIGN ID\n\t\t$fields['_id'] \t= ['type' => 'INT', 'constraint' => '32', 'null' => TRUE];\n\t\t// DATE\n\t\t$fields['_date'] = \t['type' => 'DATE', 'null' => TRUE];\n\t\t// NUMERIC PERCENTAGE\n\t\t$fields['percent'] \t= ['type' => 'NUMERIC', 'constraint' => '18,4', 'null' => TRUE];\t\n\t\t// NUMERIC AMOUNT\n\t\t$fields['amount'] = ['type' => 'NUMERIC', 'constraint' => '18,2', 'null' => TRUE];\n\t}", "title": "" }, { "docid": "e9561a7e011fd7b10653a4690afe696f", "score": "0.67539775", "text": "function vibrant_life_do_field_list( $args = array() ) {\n\tvibrant_life_field_helpers()->fields->do_field_list( $args['name'], $args );\n}", "title": "" }, { "docid": "938a800b99b0c576966cafb3941394bf", "score": "0.67437744", "text": "public function getFieldsList()\n\t{\n\t\treturn $this->_fieldsList['list'];\n\t}", "title": "" }, { "docid": "79cdfc186935679a9a7d25c0761405aa", "score": "0.67383116", "text": "public static function viewFields(){\n\t\treturn [ \n\t\t\t\"questions.id AS id\", \n\t\t\t\"questions.user_id AS user_id\", \n\t\t\t\"Users.username AS users_username\", \n\t\t\t\"questions.points AS points\", \n\t\t\t\"questions.date AS date\", \n\t\t\t\"questions.username AS username\" \n\t\t];\n\t}", "title": "" }, { "docid": "531c507501b8db22d31bf8f21cb9886f", "score": "0.6732835", "text": "public function get_fields();", "title": "" }, { "docid": "190e81bc9d5ffe4e5d2f01378bf4a034", "score": "0.6718889", "text": "public function fieldListe($param = array()) {\n\n $fieldsArray = $this->fetch_fields();\n\n if (!count($fieldsArray)) {\n $output = '<p>' . __('Es wurden leider keine Forschungsbereiche gefunden.', 'fau-cris') . '</p>';\n return $output;\n }\n if (array_key_exists('relation left seq', reset($fieldsArray)->attributes)) {\n $sortby = 'relation left seq';\n $orderby = $sortby;\n } else {\n $sortby = NULL;\n $orderby = __('O.A.','fau-cris');\n }\n $hide = $param['hide'];\n $formatter = new CRIS_formatter(NULL, NULL, $sortby, SORT_ASC);\n $res = $formatter->execute($fieldsArray);\n if ($param['limit'] != '')\n $fieldList = array_slice($res[$orderby], 0, $param['limit']);\n else\n $fieldList = $res[$orderby];\n $output = '';\n $output .= $this->make_list($fieldList);\n\n return $this->langdiv_open . $output . $this->langdiv_close;\n }", "title": "" }, { "docid": "1dbec63313c6decd037085e0a013a365", "score": "0.6697371", "text": "function listFieldsForFlexForm(&$params,&$pObj)\t{\n\t\tglobal $TCA;\n\t\t$table = $params['config']['params']['table'];\n\t\tif ($table == '') {\n\t\t\t$table = tx_x4epibase_flexform::getSelectedTable($params,$pObj);\n\t\t}\n\t\tt3lib_div::loadTCA($table);\n\n\n\t\t$params['items']=array();\n\t\tif (is_array($TCA[$table]['columns']))\t{\n\t\t\tforeach($TCA[$table]['columns'] as $key => $config)\t{\n\t\t\t\tif ($config['label'])\t{\n\t\t\t\t\t$label = t3lib_div::fixed_lgd(ereg_replace(':$','',$GLOBALS['LANG']->sL($config['label'])),30).' ('.$key.')';\n\t\t\t\t\t$params['items'][] = array($label, $key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$params['items'][] = array('Stadt, Land', 'country_and_city');\n\t}", "title": "" }, { "docid": "82369edb3256db6e323a5aa6aacce9c1", "score": "0.6668185", "text": "function getFields();", "title": "" }, { "docid": "82369edb3256db6e323a5aa6aacce9c1", "score": "0.6668185", "text": "function getFields();", "title": "" }, { "docid": "a23e744ac47bf3b903a5393230481d86", "score": "0.6665198", "text": "private function buildFieldList()\n {\n // Ensure the ACF functions are available. Old ACF versions.\n if (function_exists('acf_get_field_groups')) {\n // Available fields.\n foreach (acf_get_field_groups() as $group) {\n $this->fields = array_merge($this->fields, $this->getAcfFields($group['key']));\n }\n }\n\n // Filter down to searchable fields only.\n self::$searchable_fields = array_filter(\n $this->fields,\n function ($a) {\n return isset($a['searchable']) && $a['searchable'];\n }\n );\n }", "title": "" }, { "docid": "ffad603902ee6db4b49c0505a43fc053", "score": "0.6635589", "text": "protected function getListFields()\r\n {\r\n return array_merge(\r\n $this->getIdCheckboxProp(),\r\n array_combine($this->modelFields, array_fill(0, count($this->modelFields), [])),\r\n $this->getEditLinkProp(),\r\n $this->getDeleteLinkProp()\r\n );\r\n }", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6633424", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6633424", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6633424", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6633424", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6633424", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6633424", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.6633424", "text": "public function getFields();", "title": "" }, { "docid": "c9c311b6500b440e9cb9ba43932a9507", "score": "0.6632158", "text": "public function getVisibleFields();", "title": "" }, { "docid": "a3b9518473ce332a54537103603e8e7e", "score": "0.66309243", "text": "public function getFields() {\n $fields = [\n 'rows' => $this->t('View Rows'),\n 'title' => $this->t('View Title'),\n ];\n\n if ($this->view->header) {\n foreach ($this->view->header as $key => $header) {\n $fields[\"header:$key\"] = $header->adminLabel();\n }\n }\n if ($this->view->footer) {\n foreach ($this->view->footer as $key => $footer) {\n $fields[\"footer:$key\"] = $footer->adminLabel();\n }\n }\n return $fields;\n }", "title": "" }, { "docid": "f808c814e5008a2718aea023e8981155", "score": "0.66066056", "text": "public function getFormFields()\n {\n\n $modelInstance = $this->getModel();\n// $rules = collect($modelInstance->rules());\n\n\n $this->add('display_name', 'text')->add('name', 'text');\n\n if ($modelInstance->id) {\n $this->modify('name', 'text', [\n 'attr' => ['readonly' => true]\n ]);\n }\n $this->add('description', 'textarea');\n// $this->add('permission_group_id', 'text' );\n\n\n }", "title": "" }, { "docid": "fcdda53a144879fb0d76b837630b49fb", "score": "0.66004455", "text": "protected function prepareListFields()\r\n {\r\n $listFields = $this->getListFields();\r\n\r\n $result = [];\r\n foreach ($listFields as $field => &$data) {\r\n if (is_numeric($field) && is_string($data)) {\r\n $field = $data;\r\n $data = [];\r\n }\r\n\r\n $data['original_field_name'] = $field;\r\n\r\n if (!$data['type'] && $field != $this->model->id_field) {\r\n $data['type'] = 'text';\r\n }\r\n\r\n if (!array_key_exists('title', $data) || $data['title'] === null) {\r\n $data['title'] = ucwords(implode(' ', preg_split('/_+/', $field, -1, PREG_SPLIT_NO_EMPTY)));\r\n }\r\n\r\n $this->checkSubProp($field, $data);\r\n\r\n if ($data['type'] == 'link' || $data['is_link']) {\r\n $data['is_link'] = true;\r\n if (!$data['template']) {\r\n $data['template'] = '/admin/' . $this->alias . '/edit/%' . $this->model->id_field . '%';\r\n }\r\n }\r\n\r\n if ($data['type'] == 'image') {\r\n if (!$data['max_width']) {\r\n $data['max_width'] = 40;\r\n }\r\n\r\n if (!$data['max_height']) {\r\n $data['max_height'] = 30;\r\n }\r\n\r\n if (!$data['dir_path']) {\r\n $data['dir_path'] = '/images/';\r\n }\r\n\r\n if (!array_key_exists('orderable', $data)) {\r\n $data['orderable'] = false;\r\n }\r\n\r\n if (!array_key_exists('searching', $data)) {\r\n $data['searching'] = false;\r\n }\r\n }\r\n\r\n if ($data['extra']) {\r\n $data['orderable'] = false;\r\n $data['searching'] = false;\r\n }\r\n\r\n if (!array_key_exists('orderable', $data)) {\r\n $data['orderable'] = true;\r\n }\r\n\r\n if (!array_key_exists('searching', $data)) {\r\n $data['searching'] = true;\r\n }\r\n\r\n $field = $this->recursiveCreateRelativeFieldName($field, $data);\r\n\r\n $result[$field] = $data;\r\n }\r\n $listFields = $result;\r\n unset($data);\r\n if (array_key_exists($this->model->id_field, $listFields)) {\r\n if (!array_key_exists('type', $listFields[$this->model->id_field])) {\r\n $listFields[$this->model->id_field]['type'] = 'link';\r\n $listFields[$this->model->id_field]['template'] = '/admin/' . $this->alias . '/edit/%' . $this->model->id_field . '%';\r\n }\r\n $listFields[$this->model->id_field]['width'] = '60';\r\n }\r\n\r\n return $listFields;\r\n }", "title": "" }, { "docid": "bc121dcd9395f62f88adb5519e95824e", "score": "0.65856946", "text": "public static function exportListFields(){\n\t\treturn [ \n\t\t\t\"id\", \n\t\t\t\"username\", \n\t\t\t\"points\", \n\t\t\t\"date\", \n\t\t\t\"user_id\" \n\t\t];\n\t}", "title": "" }, { "docid": "4818517b75948ca7fa854c5b2c2f62ad", "score": "0.6580181", "text": "private function buildDisplayFields() {\n\tif(count($this->displayFields) < 1) {\n $row = $this->dataSource[0];\n foreach($row as $field=>$value) {\n $this->displayFields[$field] = $field;\n }\n $this->displaySource = $this->dataSource;\n\t}\n }", "title": "" }, { "docid": "259a9b5ff882c7388333ccd19bac3411", "score": "0.65692794", "text": "public function FieldList()\n {\n return $this->_fieldList;\n }", "title": "" }, { "docid": "de7c743d380cc8a8670b32ed97080503", "score": "0.65680367", "text": "public function extractFields() {\n\t\t$model = $this->collection->getModel();\n\t\t$fields = $model->getDisplayFieldNames();\n\t\tforeach ($fields as $field) {\n\t\t\tif ($model->isField($field.'_id'))\n\t\t\t\t$fields[$field.'_id'] = $field.'_id';\n\t\t}\n\t\t//we want to make sure we have the identifier though\n\t\t/*if(!$model->isField($model->getIdentifier()))\n\t\t\t$fields=array('_identifier'=>'Description')+$fields;\n\t\telse\n\t\t\t$fields=array($model->getIdentifier()=>$model->getTag($model->getIdentifier()))+$fields;*/\n\n\t\t//and we want 'id' as well\n\t\t$fields=array($model->idField=>$model->getTag($model->idField))+$fields;\n\t\t$this->fields=$fields;\n\t}", "title": "" }, { "docid": "5d48d38fe0be714f0c11855cd45a0411", "score": "0.65648067", "text": "protected function renderList()\n {\n return $this->value->{$this->display};\n }", "title": "" }, { "docid": "850795f651aa20ae1a332d8ccad399c6", "score": "0.65645355", "text": "public function fieldsAction()\n {\n return $this->handleView(\n $this->view(\n array_values($this->getManager()->getFieldDescriptors())\n )\n );\n }", "title": "" }, { "docid": "515b92b4a4bc85b8581a398fed07cf46", "score": "0.6550905", "text": "function getFields() {\n\n\t\t$aFieldTypes \t= $this->oField->getFieldTypes();\n\t\t$aFields \t\t= $this->oField->select()\n\t\t\t\t\t\t\t->columns('id, type_id, name, label')\n\t\t\t\t\t\t\t->from($this->oField->_name)\n\t\t\t\t\t\t\t->where(\"form_name = '\".$this->_formName.\"'\")\n\t\t\t\t\t\t\t->order('`order`')\n\t\t\t\t\t\t\t->getList();\n\n\t\t// Do the field type mapping\n\t\tforeach($aFields as $key => $aField) {\n\t\t\t$aFields[$key]['type'] = $aFieldTypes[$aField['type_id']]; // Set the field type\n\t\t\tforeach(array('type_id', 'id') as $unsetField) {\n\t\t\t\tunset($aFields[$key][$unsetField]);\n\t\t\t}\n\t\t\t$iFieldID = $aField['id'];\n\t\t\t// Get all the attributes and assign it to the\n\t\t\t$aFieldAttributes = $this->oField->getAttributes($iFieldID);\n\t\t\tforeach($aFieldAttributes as $attrkey => $attrval) {\n\t\t\t\t$aFields[$key][$attrkey] = $attrval;\n\t\t\t}\n\n\t\t}\n\t\t$this->_formFields = $aFields;\n\t}", "title": "" }, { "docid": "2cf21a2532140d8fbbd5e7818f6a9664", "score": "0.65481627", "text": "private function getFields()\n\t{\n\t\t$form = \\GFAPI::get_form($this->form_id);\n\t\tif ( !$form ) return $this->error(__('The form was not found.', 'gfpd'));\n\t\t$fields = $form['fields'];\n\t\tforeach ( $fields as $key => $field ){\n\t\t\t$this->fields[$key]['id'] = $field['id'];\n\t\t\t$this->fields[$key]['title'] = $field['label'];\n\t\t}\n\t}", "title": "" }, { "docid": "4e11791e170934fa1a387243dcf14374", "score": "0.6515439", "text": "protected function configureListFields(ListMapper $listMapper)\n{\n $listMapper\n ->add('nombre')\n ->add('descripcion')\n ->add('rama.nombre');\n }", "title": "" }, { "docid": "0bd9913ceafb7869674500e39c678c3c", "score": "0.6462147", "text": "abstract public function fields();", "title": "" }, { "docid": "d4c2c82d3261ddc0dbf4783eaf43efcb", "score": "0.64183515", "text": "function getListFields(&$conf,$textmode=false,$type='') {\n\t\t$fields=$conf['list.']['show_fields']?$conf['list.']['show_fields']:$this->id_field;\n\t\t$fieldArray=array_unique(t3lib_div::trimExplode(\",\",$fields));\n\t\tforeach($fieldArray as $FN) {\n\t\t\t$params=t3lib_div::trimExplode(';',$FN);\n\n\t\t\tif ($params[0]!='--div--' && $params[0]!='--fse--' && $params[0]!='--fsb--') {\n\t\t\t\t$masterTable = $conf['table'];\n\t\t\t\t$size = $this->getSize($conf, $FN, $masterTable);\n\t\t\t\t$tab=array();\n\t\t\t\t$this->metafeeditlib->getJoin($conf,$tab,$masterTable);\n\t\t\t\t$ftA=$this->metafeeditlib->getForeignTableFromField($FN,$conf,'',$tab,__METHOD__);\t \n\t\t\t\t$Lib=$this->metafeeditlib->getLLFromLabel($ftA['fieldLabel'],$conf);\n\t\t\t\t$href=$this->metafeeditlib->hsc($conf,$this->pi_linkTP_keepPIvars_url(array('sort' => $FN.':###SORT_DIR_'.$FN.'###'),1));\n\t\t\t\tif(!$textmode) {\n\t\t\t\t\tif ($this->piVars['exporttype']=='EXCEL' || $this->piVars['exporttype']=='XLS')\n\t\t\t\t\t\t$ret.='<th><data>'.$Lib.'</data><size>'.$size.'</size></th>';\n\t\t\t\t\telse\n\t\t\t\t\t\t$ret.=$conf['list.']['sortFields']?'<th><a class=\"###SORT_CLASS_'.$FN.'###\" href=\"'.$href.'###GLOBALPARAMS###\">'.$Lib.'</a></th>':'<th>'.$Lib.'</th>';\n\t\t\t\t} else if ($type) {\n\t\t\t\t\t$img=0;\n\t\t\t\t\t$ret.='<td><data>'.$Lib.'</data><size>'.$size.'</size><img>'.$img.'</img></td>';\t\n\t\t\t\t} else {\n\t\t\t\t\t$ret.=$Lib.';';\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "4e32e2c58eeb3979bd8a855494762286", "score": "0.6413194", "text": "protected function configureListFields(ListMapper $listMapper)\n {\n if($this->isGranted('FIELD_VOORNAAM'))\n $listMapper->addIdentifier('voornaam');\n if($this->isGranted('FIELD_TUSSENVOEGSEL'))\n $listMapper->add('tussenvoegsel');\n if($this->isGranted('FIELD_ACHTERNAAM'))\n $listMapper->add('achternaam');\n if($this->isGranted('FIELD_GESLACHT'))\n $listMapper->add('geslacht');\n if($this->isGranted('FIELD_GEBOORTEDATUM'))\n $listMapper->add('geboortedatum', null, array('format' => 'd M Y'));\n if($this->isGranted('FIELD_EMAILADRES'))\n $listMapper->add('emailadres');\n if($this->isGranted('FIELD_STUDENTNUMMER'))\n $listMapper->add('studentnummer');\n if($this->isGranted('FIELD_STARTJAAR'))\n $listMapper->add('startjaar' ,'text');\n if($this->isGranted('FIELD_INSCHRIJFDATUM'))\n $listMapper->add('inschrijfdatum', null, array('format' => 'd M Y'));\n if($this->isGranted('FIELD_BETAALD'))\n $listMapper->add('betaald', 'boolean');\n if($this->isGranted('MOLLIE'))\n $listMapper->add('checkIncassoPossibleInFuture', 'boolean', array('label'=>'Incasso'));\n if($this->isGranted('FIELD_HEEFT_BEVESTIGING'))\n $listMapper->add('heeftBevestiging', null, array('label' => 'Welkom'));\n if($this->isGranted('FIELD_GEACTIVEERD'))\n $listMapper->add('geactiveerd', 'boolean', array('label' => 'Actief'));\n if($this->isGranted('FIELD_STUDIERICHTING'))\n $listMapper->add('studierichting.afkorting', null, array('label' => 'Richting'));\n if($this->isGranted('FIELD_LIDMAATSCHAP'))\n $listMapper->add('lidmaatschap.afkorting', null, array('label' => 'Type'));\n\n if($this->isGranted('MOLLIE')) {\n $listMapper->add('_action', null, array(\n 'actions' => array(\n 'incasseren' => array(\n 'template' => 'SITBundle:CRUD:list__action_incasseren.html.twig'\n )\n )\n ));\n }\n\n }", "title": "" }, { "docid": "24314c913b9649f7283235c39b4aeb44", "score": "0.6412223", "text": "public function getFieldsInfo()\n {\n $aFields = [\n 'name' => [\n 'type' => 'mstring',\n 'name' => 'name',\n 'title' => _p('Name'),\n 'rules' => 'required',\n ],\n 'price' => [\n 'type' => 'price',\n 'name' => 'price',\n 'title' => _p('Digital Download Activation'),\n 'rules' => 'required',\n 'value' => '0.00',\n ],\n 'allowed_count_pictures' => [\n 'type' => 'string',\n 'name' => 'allowed_count_pictures',\n 'title' => _p('Allowed pictures count'),\n 'rules' => 'required|num|1:min',\n 'value' => 1,\n ],\n 'life_time' => [\n 'type' => 'string',\n 'name' => 'life_time',\n 'title' => _p('Life time(in day)'),\n 'rules' => 'required|num|1:min',\n 'value' => 1,\n ],\n ];\n\n (($sPlugin = \\Phpfox_Plugin::get('digitaldownload.collect_plan_fields')) ? eval($sPlugin) : false);\n $aUserGroups = \\Phpfox::getService('user.group')->get();\n $aGroupItems = [];\n foreach($aUserGroups as $aUserGroup) {\n $aGroupItems[$aUserGroup['user_group_id']] = $aUserGroup['title'];\n }\n $aFields['user_groups'] = [\n 'type' => 'multilist',\n 'name' => 'user_groups',\n 'title' => _p('Allowed user groups'),\n 'items' => $aGroupItems,\n ];\n\n return $aFields;\n }", "title": "" }, { "docid": "9f331587ac4048f060995e969985ccf0", "score": "0.6398939", "text": "function __pulldownLists()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //[all_quotation_forms]\n $data = $this->quotationforms_model->allQuotationForms('enabled');\n $this->data['debug'][] = $this->quotationforms_model->debug_data;\n $this->data['lists']['all_quotation_forms'] = create_pulldown_list($data, 'quotation_forms', 'id');\n\n }", "title": "" }, { "docid": "e325614dcaf98a6c2c4dde8f56b26403", "score": "0.63981444", "text": "protected function getFields()\n {\n return array(\n 'id',\n 'name',\n 'title',\n 'description',\n 'color',\n 'sorting'\n );\n }", "title": "" }, { "docid": "e455d93fb2c834b6b55516b1e51616c1", "score": "0.6396908", "text": "function getProductDisplayFields(){\n $field_list = array();\n foreach (field_info_instances('node', $this->product_display['content_type_name']) as $key => $value)\n $field_list[$key] = $value['label'];\n foreach($this->product_display['natural_fields'] as $field => $label)\n $field_list[$field] = $label;\n return $field_list;\n }", "title": "" }, { "docid": "524c8857f5f26db8140932f4dc2de832", "score": "0.638679", "text": "public function fieldsAction()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "fe56f3d123deb1d1989b321cc1ad51a6", "score": "0.63798", "text": "public function getFields() {\n $defaults = array(\n 'type' => 'string',\n 'crop' => '20',\n 'format'=> 'default',\n );\n \n // TODO move to yaml format\n\n $fields = array(\n /*\n array(\n 'name' => 'Name',\n 'property' => 'title',\n 'help' => ''\n ),\n */\n array(\n 'name' => 'User',\n 'property' => 'user',\n 'type' => 'object',\n 'relation' => array(\n 'items' => function() {\n return $this->userRepository->listItems('lastName', 'ASC');\n },\n 'type' => 'n-1',\n 'display' => 'fullName',\n ),\n 'format' => 'select',\n 'help' => 'Wer die Schicht belegt.' \n ),\n /*\n array(\n 'name' => 'Template',\n 'property' => 'scheduleTemplate',\n 'valueIndex' => 'scheduleTemplate',\n 'format' => 'hidden',\n ),\n/* \n array(\n 'name' => 'Template',\n 'property' => 'scheduleTemplate',\n 'type' => 'object',\n 'relation' => array(\n 'items' => function() {\n return $this->scheduleTemplateRepository->listItems('title', 'ASC');\n },\n 'type' => 'n-1',\n 'display' => 'title',\n ),\n 'format' => 'select',\n 'help' => 'Die Vorlage' \n ),\n */\n \n array(\n 'name' => 'Inhalt',\n 'property' => 'content',\n 'help' => 'Ein aussagekräftiger Titel für die Schicht (zB. \"Bar #1 vormittag\")'\n ),\n array(\n 'name' => 'Tag',\n 'property' => 'day',\n 'type' => 'int',\n 'help' => 'Eine Zahl von 1-7 für den Wochentag.'\n ),\n array(\n 'name' => 'Datum',\n 'property' => 'date',\n 'type' => 'datetime',\n 'help' => 'Absolutes Datum der Schicht'\n ),\n\n \n );\n\n \n // set default values where no default given above\n $keys = array('type', 'format', 'crop');\n foreach($fields as $dk => $items) {\n foreach ($keys as $key) {\n if (! array_key_exists($key, $items)) {\n $fields[$dk][$key] = $defaults[$key];\n }\n }\n }\n \n return $fields;\n }", "title": "" }, { "docid": "48f7b49ea98b4cb0e00193ce4c557530", "score": "0.63773936", "text": "public function lapsedList() {\n\n // sorting params\n $params = \\Drupal::request()->query;\n $sort_dir = $params->get('sort');\n $sort_col = $params->get('order');\n\n $fields = array(\n 'ID' => 'ID',\n 'First name' => 'fname',\n 'Last name' => 'lname',\n 'E-mail' => 'mail',\n 'Created' => 'date_created',\n 'Expiration' => 'Date_renewed',\n );\n\n $header = array(\n array('data' => t('ID'), 'field' => 'ID', 'sort' => 'asc'),\n array('data' => t('First name'), 'field' => 'fname'),\n array('data' => t('Last name'), 'field' => 'lname'),\n array('data' => t('E-mail'), 'field' => 'mail'),\n array('data' => t('Created'), 'field' => 'date_created'),\n array('data' => t('Expiration'), 'field' => 'Date_renewed'),\n array('data' => t('')),\n array('data' => t('')),\n );\n\n $query = db_select('members', 'm');\n $query->innerJoin('users_field_data', 'u', 'u.uid = m.ID');\n $query->condition('m.ID', 1, '>');\n $query->condition('m.Date_renewed', date('Y-m-d'), '<');\n\n $count_query = clone $query;\n $count_query->addExpression('count(m.ID)');\n\n $paged_query = $query->extend('Drupal\\Core\\Database\\Query\\PagerSelectExtender');\n $paged_query->limit(50);\n\n if (!empty($sort_dir) && !empty($fields[$sort_col])) {\n $paged_query->orderBy($fields[$sort_col], $sort_dir);\n }\n\n $paged_query->setCountQuery($count_query);\n\n // pull the fields in the specified order\n $paged_query->addField('m', 'ID', 'ID');\n $paged_query->addField('m', 'fname', 'fname');\n $paged_query->addField('m', 'lname', 'lname');\n $paged_query->addField('u', 'mail', 'mail');\n $paged_query->addField('m', 'date_created', 'date_created');\n $paged_query->addField('m', 'Date_renewed', 'Date_renewed');\n\n $result = $paged_query->execute();\n\n $rows = array();\n\n // add edit and delete links to rows\n foreach ($result as $row) {\n\n $row = (array) $row;\n\n $editUrl = Url::fromRoute('smt_admin.memberEdit', array('id' => $row['ID']));\n array_push($row, \\Drupal::l('edit', $editUrl));\n\n $deleteUrl = Url::fromRoute('smt_admin.memberDelete', array('id' => $row['ID']));\n array_push($row, \\Drupal::l('delete', $deleteUrl));\n\n $rows[] = array('data' => $row);\n }\n\n return array(\n 'markup' => array(\n '#type' => 'markup',\n '#markup' => '<div class=\"well\">This view enumerates people with expired memberships.</div>',\n ),\n 'pager1' => array(\n '#type' => 'pager'\n ),\n 'pager_table' => array(\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n '#empty' => t('No records found'),\n ),\n 'pager2' => array(\n '#type' => 'pager'\n )\n );\n }", "title": "" }, { "docid": "4f795ebd14b1b58c22f7a6eb1c2b3b77", "score": "0.6374138", "text": "public function getFieldsAttribute()\n {\n $fields = $this->config->show->getRegisteredFields();\n\n foreach ($fields as $field) {\n if ($field instanceof Block && $field->id == $this->field_id) {\n\n // Returning fields from repeatables form.\n return $field->repeatables->{$this->type}->getRegisteredFields();\n }\n }\n }", "title": "" }, { "docid": "2ab6f9e52b85e18d0c41065158a10796", "score": "0.63660455", "text": "function listFieldsForFilter($obj, $nbRows, $included = false) {\r\n global $contextForAttributes;\r\n $contextForAttributes='global';\r\n if (method_exists($obj,'setAttributes')) $obj->setAttributes();\r\n foreach ( $obj as $col => $val ) {\r\n if (get_class($obj)=='GlobalView' and $col=='id') continue;\r\n if ($col=='_Assignment') {\r\n if ($nbRows > 0) echo ', ';\r\n echo '{\"id\":\"' . ($included ? get_class ( $obj ) . '_' : '') . 'assignedResource__idResourceAll' . '\", \"name\":\"' . i18n(\"assignedResource\") . '\", \"dataType\":\"list\"}';\r\n continue;\r\n }\r\n if (substr ( $col, 0, 1 ) != \"_\" and substr ( $col, 0, 1 ) != ucfirst ( substr ( $col, 0, 1 ) ) and ! $obj->isAttributeSetToField ( $col, 'hidden' ) and ! $obj->isAttributeSetToField ( $col, 'calculated' ) and \r\n // ADD BY Marc TABARY - 2017-03-20 - FIELD NOT PRESENT FOR FILTER\r\n ! $obj->isAttributeSetToField ( $col, 'notInFilter' ) and \r\n // END ADD BY Marc TABARY - 2017-03-20 - FIELD NOT PRESENT FOR FILTER\r\n (! $included or ($col != 'id' and $col != 'refType' and $col != 'refId' and $col != 'idle'))) {\r\n if ($nbRows > 0)\r\n echo ', ';\r\n $dataType = $obj->getDataType ( $col );\r\n $dataLength = $obj->getDataLength ( $col );\r\n if ($dataType == 'int' and $dataLength == 1) {\r\n $dataType = 'bool';\r\n } else if ($dataType == 'datetime') {\r\n $dataType = 'date';\r\n //} else if ((substr ( $col, 0, 2 ) == 'id' and $dataType == 'int' and strlen ( $col ) > 2 and substr ( $col, 2, 1 ) == strtoupper ( substr ( $col, 2, 1 ) ))) {\r\n } else if (isForeignKey($col, $obj)) {\r\n $dataType = 'list';\r\n }\r\n $colName = $obj->getColCaption ( $col );\r\n if (substr ( $col, 0, 9 ) == 'idContext') {\r\n $colName = SqlList::getNameFromId ( 'ContextType', substr ( $col, 9 ) );\r\n }\r\n echo '{\"id\":\"' . ($included ? get_class ( $obj ) . '_' : '') . $col . '\", \"name\":\"' . $colName . '\", \"dataType\":\"' . $dataType . '\"}';\r\n $nbRows ++;\r\n } else if (substr ( $col, 0, 1 ) != \"_\" and substr ( $col, 0, 1 ) == ucfirst ( substr ( $col, 0, 1 ) )) {\r\n $sub = new $col ();\r\n $nbRows = listFieldsForFilter ( $sub, $nbRows, true );\r\n }\r\n }\r\n if (isset ( $obj->_Note )) {\r\n if ($nbRows > 0)\r\n echo ', ';\r\n echo '{\"id\":\"Note\", \"name\":\"' . i18n ( 'colNote' ) . '\", \"dataType\":\"refObject\"}';\r\n $nbRows ++;\r\n }\r\n return $nbRows;\r\n}", "title": "" }, { "docid": "25398d85c6f67353aefeff94b34e5fa1", "score": "0.6352623", "text": "function get_fieldlist($parameters){\n\t\treturn $this->metadata_fields;\n\t}", "title": "" }, { "docid": "114d45ae839b19241496aba60e36786e", "score": "0.634894", "text": "private function getMemberFields()\n {\n return new F\\FieldList(\n new F\\Tabset(\n 'Root',\n new F\\Tab(\n 'Main',\n new F\\TextField('FirstName', 'First name'),\n new F\\TextField('Surname'),\n new F\\TextField('Email'),\n new F\\ReadonlyField('ClubhouseMember.AccessLevel', 'Access level', '(work in progress)')\n )\n )\n );\n }", "title": "" }, { "docid": "b90fa6f71152e56f949ed18c5bf6b567", "score": "0.63485026", "text": "function fields();", "title": "" }, { "docid": "7ece80e811bd884691708650b1d00760", "score": "0.6338479", "text": "protected function configureListFields(ListMapper $listMapper){\n $listMapper\n ->addIdentifier('nom')\n ->add('prenom')\n ->add('telephone')\n ;\n\n\n }", "title": "" }, { "docid": "95290e8268e2ca719303d263d7a1d447", "score": "0.6331541", "text": "public function buildFields()\n {\n $this->addField('role', 'kuma_user.role.adminlist.header.role', true);\n }", "title": "" }, { "docid": "449b0ebbaf06fa9f9bcb8fbe21234558", "score": "0.63301754", "text": "public function listRegisterFields(){\n\t\t$this->registerFieldString('col2Time', 'Hora');\n\t\t$this->registerFieldInt('col3IdCompany', 'Id Empresa');\n\t\t$this->registerFieldString('col4UserName', 'Usuario');\n\t\t$this->registerFieldFloat('col5Delayed', 'Demora');\n\t\t$this->registerFieldString('col6RequestMethod', 'Método');\n\t\t$this->registerFieldInt('col7TypeError', 'Id Tipo de Error');\n\t\t$this->registerFieldString('col7TypeErrorStr', 'Tipo');\n\t\t$this->registerFieldString('col8Msg', 'Mensaje');\n\t\t$this->registerFieldString('col9Traces', 'Trasas');\n\t\t$this->registerFieldString('col10PathInfo', 'Path');\n\t\t$this->registerFieldString('col11UserAgent', 'HTTP User');\n\t\t$this->registerFieldString('col12Query', 'Query');\n\t}", "title": "" }, { "docid": "834886db5aee4cec11811079c6a7e202", "score": "0.6327042", "text": "public function getFieldlist()\n {\n return $this->getOptionalElement('fieldlist');\n }", "title": "" }, { "docid": "d1093b9fb285ff99abed2daa9c38806b", "score": "0.63239145", "text": "public function fields()\n {\n return [\n Text::make('Info'),\n Select::make('Status')\n ->options([\n 'return' => '退回修改',\n 'cancel' => '取消采购',\n 'already' => '同意下单',\n ]),\n ];\n }", "title": "" }, { "docid": "fa303d26d62f499f8f335bbdc1d1da31", "score": "0.6315073", "text": "public function set_listing_fields(){\r\n\r\n //Nueva llamada a Trestle\r\n $field_mapping = FFD_Listings_Trestle_Sync::fields(null, 'meta');\r\n\r\n $fields = array();\r\n $field_types = array();\r\n foreach($field_mapping as $pb_key => $db_key){\r\n $sanitize_field = $this->sanitize_field_key($db_key);\r\n $key = $sanitize_field['key'];\r\n $type = $sanitize_field['type'];\r\n if( !empty($key) ){\r\n $field_types[$key] = $type;\r\n $fields[$key] = $pb_key;\r\n }\r\n }\r\n /* $fields = array(\r\n 'mls_id' => 'mls_id__c',\r\n 'listdate' => 'listed_date__c',\r\n 'saledate' => 'sale_date__c',\r\n 'listprice' => 'pba__listingprice_pb__c',\r\n 'saleprice' => 'sale_price__c',\r\n 'sqftprice' => 'price_per_sqft__c',\r\n 'status' => 'pba__status__c',\r\n 'listtype' => 'pba__listingtype__c',\r\n 'proptype' => 'propertytypenormailzed__c',\r\n 'dom' => 'dom__c',\r\n 'lat' => 'pba__latitude_pb__c',\r\n 'lng' => 'pba__longitude_pb__c',\r\n 'beds' => 'pba__bedrooms_pb__c',\r\n 'baths' => 'pba__fullbathrooms_pb__c',\r\n 'size' => 'pba__lotsize_pb__c',\r\n 'totalarea' => 'pba__totalarea_pb__c',\r\n 'city' => 'pba__city_pb__c',\r\n 'state' => 'pba__state_pb__c',\r\n 'neighborhood' => 'area_text__c',\r\n 'address' => 'pba__address_pb__c',\r\n 'postalcode' => 'pba__postalcode_pb__c',\r\n 'image' => 'media',\r\n 'openhouse' => 'open_house_date_time__c',\r\n 'yearbuilt' => 'pba__yearbuilt_pb__c',\r\n 'parking' => 'parkingspaces__c',\r\n 'view' => 'view__c'\r\n ); */\r\n \r\n $_fields = apply_filters( 'ffd_listing_fields', $fields);\r\n \r\n if( !empty($_fields) ){\r\n foreach($fields as $name => $value ){\r\n if( isset($_fields[$name]) ){\r\n $fields[$name] = $_fields[$name];\r\n }\r\n } \r\n }\r\n\r\n $this->listing_fields = $fields;\r\n $this->field_types = $field_types;\r\n \r\n \r\n }", "title": "" }, { "docid": "0e062fc22d8d68bf742b26c549ba8c5e", "score": "0.63112825", "text": "function _set_fields()\n {\n $this->label = array(\n 'fieldType' => 'TextField',\n 'label' => 'Post Label',\n 'config' => array(\n 'placeholder' => 'separate by comma, leave blank to show all',\n 'id' => 'label',\n 'class' => 'form-control'\n )\n );\n $this->num_posts = array(\n 'fieldType' => 'TextField',\n 'label' => 'Number of Posts',\n 'config' => array(\n 'value' => '5',\n 'id' => 'num_posts',\n 'class' => 'form-control'\n )\n );\n }", "title": "" }, { "docid": "0166fb2d3a7219e3d029cde5f57368f6", "score": "0.63111335", "text": "public function fields()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "8439ba1b61c18720e035189c5b8e6125", "score": "0.6303008", "text": "public function getFieldList()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "e21ff572f77a98df5e557f8ac1177565", "score": "0.6299973", "text": "protected function _renderFields()\n {\n $fields = $this->_query->get_option('fields');\n if($fields && array_sum($fields)) {\n foreach($this->_preloadFields as $field => $true) {\n $fields[$field] = 1;\n }\n $this->_query->set_option('fields', $fields);\n }\n }", "title": "" }, { "docid": "47a349c5bbe57812cfca4d01527074ac", "score": "0.629142", "text": "abstract protected function list_fields($strTable);", "title": "" }, { "docid": "f7c9eea1706d9b62787c2049e9e1541f", "score": "0.6284546", "text": "function get_fields() {\n return (isset($this->options['fields'])) ? $this->options['fields'] : $this->view->display['default']->display_options['fields'];\n }", "title": "" }, { "docid": "6c7ee61ca64b478870a7d256a5b14511", "score": "0.6282016", "text": "public function renderList()\n\t{\n\t\t$this->addRowAction('edit');\n\t\t$this->addRowAction('delete');\n\t\t$this->addRowAction('details');\n\t\t$this->bulk_actions = array(\n\t\t\t'delete' => array(\n\t\t\t\t'text' => $this->trans('Delete selected', array(), 'Modules.cmsseo.Admin'),\n\t\t\t\t'confirm' => $this->trans('Delete selected items?', array(), 'Modules.cmsseo.Admin')\n\t\t\t\t)\n\t\t\t);\n\t\t$this->fields_list = array(\n\t\t\t'id' => array(\n\t\t\t\t'title' => $this->trans('ID', array(), 'Modules.cmsseo.Admin'),\n\t\t\t\t'align' => 'center',\n\t\t\t\t'width' => 25\n\t\t\t),\n\t\t\t'id_object' => array(\n\t\t\t\t'title' => $this->trans('Object ID', array(), 'Modules.cmsseo.Admin'),\n\t\t\t\t'width' => 'auto',\n\t\t\t),\n\t\t\t'object_type' => array(\n\t\t\t\t'title' => $this->trans('Object type', array(), 'Modules.cmsseo.Admin'),\n\t\t\t\t'width' => 'auto',\n\t\t\t),\n\t\t\t'link_rewrite' => array(\n\t\t\t\t'title' => $this->trans('Link to be rewrited to', array(), 'Modules.cmsseo.Admin'),\n\t\t\t\t'width' => 'auto',\n\t\t\t),\n\t\t);\n\t\t// Gère les positions\n\t\t$this->fields_list['position'] = array(\n\t\t\t'title' => $this->trans('PUEDE QUE HAYA QUE BORRAR POSITION DE TODOS LOS CONTROLLERS Position', array(), 'Modules.cmsseo.Admin'),\n\t\t\t'width' => 70,\n\t\t\t'align' => 'center',\n\t\t\t'position' => 'position'\n\t\t);\n\t\t$lists = parent::renderList();\n\t\tparent::initToolbar();\n\t\treturn $lists;\n\t}", "title": "" }, { "docid": "b0e6d7b201d55194dcd2868311e04886", "score": "0.6274993", "text": "public function getFormFields();", "title": "" }, { "docid": "9565bd9df4c43f792e8c29a26cbbc16d", "score": "0.6271843", "text": "public static function exportViewFields(){\n\t\treturn [ \n\t\t\t\"questions.id AS id\", \n\t\t\t\"questions.user_id AS user_id\", \n\t\t\t\"Users.username AS users_username\", \n\t\t\t\"questions.points AS points\", \n\t\t\t\"questions.date AS date\", \n\t\t\t\"questions.username AS username\" \n\t\t];\n\t}", "title": "" }, { "docid": "5c96b88e0a5a524e6e83ce53b990ff94", "score": "0.626076", "text": "public function get_form_fields()\n {\n }", "title": "" }, { "docid": "3280ed046dfad920b2d770c82cac4094", "score": "0.625681", "text": "function smd_ebook_fld_list($name, $val = '')\n{\n $cfs = getCustomFields();\n $cfs['Title'] = gTxt('title');\n $cfs['Excerpt_html'] = gTxt('excerpt');\n $cfs['SMD_FIXED'] = gTxt('smd_ebook_fixed');\n\n return selectInput($name, $cfs, $val, true, '', $name);\n}", "title": "" }, { "docid": "19baa6288448893fcc6765ad7a943d92", "score": "0.6253252", "text": "function get_show_fields(){\n //\n return array_filter($this->fields, function($field){\n //\n //Filter out the no-show cases.\n return $field->is_shown;\n });\n }", "title": "" }, { "docid": "9af0f221c444b8b0c9d8996b0d96b36f", "score": "0.62492263", "text": "public function define_fields() {\n\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'type' => 'container',\n\t\t\t\t'html' => sprintf( '<p class=\"strong\">%s</p>', esc_html__( 'Optional settings', 'give' ) ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'listbox',\n\t\t\t\t'name' => 'price',\n\t\t\t\t'label' => esc_html__( 'Show Donation Amount:', 'give' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'false' => esc_html__( 'Hide', 'give' ),\n\t\t\t\t),\n\t\t\t\t'placeholder' => esc_html__( 'Show', 'give' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'listbox',\n\t\t\t\t'name' => 'donor',\n\t\t\t\t'label' => esc_html__( 'Show Donor Name:', 'give' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'true' => esc_html__( 'Show', 'give' ),\n\t\t\t\t\t'false' => esc_html__( 'Hide', 'give' ),\n\t\t\t\t),\n\t\t\t\t'placeholder' => esc_html__( 'Show', 'give' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'listbox',\n\t\t\t\t'name' => 'date',\n\t\t\t\t'label' => esc_html__( 'Show Date:', 'give' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'false' => esc_html__( 'Hide', 'give' ),\n\t\t\t\t),\n\t\t\t\t'placeholder' => esc_html__( 'Show', 'give' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'listbox',\n\t\t\t\t'name' => 'payment_method',\n\t\t\t\t'label' => esc_html__( 'Show Payment Method:', 'give' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'false' => esc_html__( 'Hide', 'give' ),\n\t\t\t\t),\n\t\t\t\t'placeholder' => esc_html__( 'Show', 'give' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'listbox',\n\t\t\t\t'name' => 'payment_id',\n\t\t\t\t'label' => esc_html__( 'Show Payment ID:', 'give' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'false' => esc_html__( 'Hide', 'give' ),\n\t\t\t\t),\n\t\t\t\t'placeholder' => esc_html__( 'Show', 'give' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'listbox',\n\t\t\t\t'name' => 'company_name',\n\t\t\t\t'label' => esc_html__( 'Company Name:', 'give' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'true' => esc_html__( 'Show', 'give' ),\n\t\t\t\t),\n\t\t\t\t'placeholder' => esc_html__( 'Hide', 'give' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'docs_link',\n\t\t\t\t'text' => esc_html__( 'Learn more about the Donation Receipt Shortcode', 'give' ),\n\t\t\t\t'link' => 'http://docs.givewp.com/shortcode-donation-receipt',\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "0a97ce82b160790ad760482059b897a5", "score": "0.62324077", "text": "public static function getFields();", "title": "" }, { "docid": "41603b369357f7eae0de6df012a025f5", "score": "0.62317616", "text": "function show_list()\n\t{\n\t\t$this->tpl->set_var('value', $this->get_value_list());\n\t\t\n\t\t$out = $this->tpl->process('temp', 'avcId_list');\n\n\t\t$this->tpl->drop_var('value');\n\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.62313944", "text": "abstract public function getFields();", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.62313944", "text": "abstract public function getFields();", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.62313944", "text": "abstract public function getFields();", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.62313944", "text": "abstract public function getFields();", "title": "" }, { "docid": "bba7c392e1572d51edfc298e092a840e", "score": "0.62310064", "text": "public function getFields()\n\t{\n\t\t// Load fields model\n\t\tJLoader::import('components.com_tjfields.models.fields', JPATH_ADMINISTRATOR);\n\t\t$fieldsModel = JModelLegacy::getInstance('Fields', 'TjfieldsModel', array('ignore_request' => true));\n\t\t$fieldsModel->setState('filter.showonlist', 1);\n\t\t$fieldsModel->setState('filter.state', 1);\n\t\t$this->client = $this->getState('ucm.client');\n\n\t\tif (!empty($this->client))\n\t\t{\n\t\t\t$fieldsModel->setState('filter.client', $this->client);\n\t\t}\n\n\t\t$items = $fieldsModel->getItems();\n\n\t\t$data = array();\n\n\t\tforeach ($items as $item)\n\t\t{\n\t\t\t$data[$item->id] = $item->label;\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "02a927342337a3fdd5b405f5e5db06ea", "score": "0.6229258", "text": "public function listFields()\n {\n return array_keys($this->fields);\n }", "title": "" }, { "docid": "3f98ac552afaa91bfbf5aa86bf4f3d4b", "score": "0.6229104", "text": "public function get_fields() {\n\t\treturn array(\n 'premium_pricing_list_item_text'\n );\n\t}", "title": "" }, { "docid": "3da9ae2f07af91f68160efd032e6b57f", "score": "0.62259704", "text": "public function getDisplayFields()\n\t{\n\t\treturn array(\n\t\t\t'a.id' => 'JGRID_HEADING_ID',\n\t\t\t'a.title' => 'JGLOBAL_TITLE',\n\t\t\t//'a.ordering' => 'JGRID_HEADING_ORDERING',\n\t\t\t'category_title' => 'JCATEGORY',\n\t\t\t//'a.created' => 'JDATE'\n\t\t);\n\t}", "title": "" }, { "docid": "993d368d5380af7c65cb15f1dc379af1", "score": "0.62162143", "text": "abstract protected function getFields();", "title": "" }, { "docid": "993d368d5380af7c65cb15f1dc379af1", "score": "0.62162143", "text": "abstract protected function getFields();", "title": "" }, { "docid": "cbfa91bcbf3b066558be39b47cd4253f", "score": "0.62108064", "text": "protected function configureListFields(ListMapper $listMapper)\r\n {\r\n $listMapper\r\n ->addIdentifier('id')\r\n ->add('produits')\r\n ->add('membres')\r\n ->add('paye')\r\n ->add('date')\r\n \r\n \r\n ;\r\n }", "title": "" }, { "docid": "47386a518d807722fded55ac73598d30", "score": "0.62063986", "text": "function rbm_do_field_list( $name, $label = false, $value = false, $args = array() ) {\n\n\tglobal $rbm_fh_deprecated_support;\n\n\t$args['label'] = $label;\n\t$args['value'] = $value;\n\n\t$rbm_fh_deprecated_support->fields->do_field_list( $name, $args );\n}", "title": "" }, { "docid": "c26a30db557d35b1dd069e3dbede0789", "score": "0.62045515", "text": "public function fields() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "c2aad94bc2063fb1f18d184268831836", "score": "0.62008727", "text": "function getFields ()\n {\n \treturn $this->fields ;\n }", "title": "" }, { "docid": "f6101128257e3860933fa10e67067946", "score": "0.6194738", "text": "public function buildFields();", "title": "" }, { "docid": "ead1be6c664bd75a9cae28c0f9f082b4", "score": "0.619246", "text": "function configureListFields(ListMapper $listMapper)\n {\n $listMapper\n ->addIdentifier('name')\n ->add('description');\n }", "title": "" }, { "docid": "0564a29726cbd3ae75f9264f52b9e5ff", "score": "0.61907244", "text": "public function renderList()\n {\n // $this->addRowAction('view');\n $this->addRowAction('edit');\n $this->addRowAction('delete');\n $this->bulk_actions = [\n 'delete' => [\n 'text' => $this->l('Delete selected'),\n 'confirm' => $this->l('Delete selected items?'),\n ],\n ];\n $this->fields_list = [\n 'id_mm_model3' => ['title' => $this->l('ID'),],\n 'property1' => ['title' => $this->l('Property 1'),],\n 'toggleable' => [\n 'title' => $this->l('Toggleable Property'),\n 'align' => 'center',\n 'active' => 'bool_prop',\n 'type' => 'bool',\n 'class' => 'fixed-width-sm',\n 'orderby' => false,\n ],\n 'active' => [\n 'title' => $this->l('Active'),\n 'align' => 'center',\n 'active' => 'status',\n 'type' => 'bool',\n 'class' => 'fixed-width-sm',\n 'orderby' => false,\n ],\n ];\n\n if (Shop::getContext() != Shop::CONTEXT_ALL && Shop::getContext() != Shop::CONTEXT_GROUP) {\n $id_shop = Shop::getContextShopID();\n\n $this->_defaultOrderBy = 'position';\n $this->_select = 'shop.position as position';\n\n $this->_join = 'LEFT JOIN '._DB_PREFIX_.'mm_model3 shop\n ON a.id_mm_model3 = shop.id_mm_model3 AND shop.id_shop = '.(int)$id_shop;\n\n $this->fields_list['position'] = [\n 'title' => $this->l('Position'),\n 'filter_key' => 'shop!position',\n 'align' => 'center',\n 'class' => 'fixed-width-sm',\n 'position' => 'position'\n ];\n\n $this->informations[] = $this->l('If you would like to order items, sort the list by position.');\n } else {\n $this->informations[] = $this->l('If you would like to order items, select shop context.');\n }\n\n return parent::renderList();\n }", "title": "" }, { "docid": "7214813007e43f62eddeec9019c0129a", "score": "0.6190681", "text": "function system_html_list_object(array $List, array $fields){\n\t$html = '<table class=\"table\"><tr><thead>';\n\tforeach ($fields as $key => $value){\n\t\t$html .= '<td><b>' . $key . '</b></td>';\n\t}\n\t$html .= '</thead></tr>';\n\tfor($i=0 ; $i<count($List) ; $i++){\n\t\t$html .= '<tr>';\n\t\t$obj = $List[$i];\n\t\tforeach ($fields as $key => $value){\n\t\t\tif(is_array($value)){\n\t\t\t\t$html .= '<td>';\n\t\t\t\t$fct = $value[0];\n\t\t\t\t$link = $value[1];\n\t\t\t\t$url = $link[0];\n\t\t\t\t$param = $link[1];\n\t\t\t\t$html .= '<a href=\"'.$url.$obj->$param().'\">' . $obj->$fct() . '</a>';\n\t\t\t\t$html .= '</td>';\n\t\t\t}else{\n\t\t\t\t$html .= '<td>' . $obj->$value() . '</td>';\n\t\t\t}\n\t\t}\n\t\t$html .= '</tr>';\n\t}\n\t$html .= '</table>';\n\treturn $html;\t\n}", "title": "" }, { "docid": "549f30324e9b295376fa562b77d61c05", "score": "0.61886615", "text": "function show_fields_from($table);", "title": "" } ]
fa9b1514792b0fbfa29d76425fd7fe32
/ It retrieves all the store data from the database This function is called from the datatable ajax function The data is return based on the json format.
[ { "docid": "328ca86e52bb03ec3bf89d5ae9b61e2b", "score": "0.73893523", "text": "public function fetchStoresData()\n\t{\n\t\t$result = array('data' => array());\n\n\t\t$data = $this->model_stores->getStoresData();\n\n\t\tforeach ($data as $key => $value) {\n\n\t\t\t// button\n\t\t\t$buttons = '';\n\n\t\t\tif(in_array('updateStore', $this->permission)) {\n\t\t\t\t$buttons = '<button type=\"button\" class=\"btn btn-default\" onclick=\"editFunc('.$value['id'].')\" data-toggle=\"modal\" data-target=\"#editModal\"><i class=\"fa fa-pencil\"></i></button>';\n\t\t\t}\n\n\t\t\tif(in_array('deleteStore', $this->permission)) {\n\t\t\t\t$buttons .= ' <button type=\"button\" class=\"btn btn-default\" onclick=\"removeFunc('.$value['id'].')\" data-toggle=\"modal\" data-target=\"#removeModal\"><i class=\"fa fa-trash\"></i></button>';\n\t\t\t}\n\n\t\t\t$expedited = ($value['expedited'] == 1) ? '<span class=\"label label-info\">Yes</span>' : '<span class=\"label label-default\">No</span>';\n\n\t\t\t$status = ($value['active'] == 1) ? '<span class=\"label label-warning\">Pending</span>' : '<span class=\"label label-success\">Done</span>';\n\n\t\t\tif($value['purpose'] == 1){\n\t\t\t\t$purpose = '<span class=\"label label-default\">Hospital Inclusion</span>';\n\t\t\t}elseif ($value['purpose'] == 2) {\n\t\t\t\t$purpose = '<span class=\"label label-default\">Thesis/Disseration/SP</span>';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$purpose = '<span class=\"label label-default\">Other</span>';\n\t\t\t}\n\t\t\t\t\t\n\n\t\t\t$result['data'][$key] = array(\n\t\t\t\t#$value['id']\n\t\t\t\t$value['date_added'],\n\t\t\t\t$value['generic_name'],\n\t\t\t\t$value['brand_name'],\n\t\t\t\t$value['company'],\n\t\t\t\t$purpose,\n\t\t\t\t$value['quantity'],\n\t\t\t\t$expedited,\n\t\t\t\t$status,\n\t\t\t\t$value['exp_sample'],\n\t\t\t\t$value['exp_standard'],\n\t\t\t\t$buttons\n\t\t\t);\n\t\t} // /foreach\n\n\t\techo json_encode($result);\n\t}", "title": "" } ]
[ { "docid": "4fbe675fb207e7406ccdf9db43268e47", "score": "0.7651688", "text": "Public function get_data()\n\t{\n\t\t$data = array();\n\t\t$data = $this->store->get_data();\n\t\techo json_encode($data);\n\n\t}", "title": "" }, { "docid": "a5c46fcd325d56f5a15b72aecd98000d", "score": "0.6803644", "text": "private function getData(){\n\t\tdb::getAdapter();\n\t\t\n\t\t$counter=0;\n\t\t$arrayFieldQuery=array();\n\t\tforeach($this->fields as $field){\n\t\t\t$arrayFieldQuery[$field]=$this->types[$counter];\n\t\t\t$counter++;\n\t\t}\n\t\t\n\t\t$counter=0;\n\t\t$arrayFilters=array();\n\t\tforeach($this->filters as $filter){\n\t\t\t$arrayFilters[$this->fields[$filter[0]]]=array(\"type\"=>$this->types[$filter[0]],\"value\"=>$filter[1]);\n\t\t}\n\t\t\n\t\tif(db::getFields($this->table,$arrayFieldQuery,$arrayFilters,$this->orderQuery,$this->limit,true)){\n\t\t\t$this->pages=ceil(((int)db::getCalculatedRows())/((int)$this->maxRowsPerPage));\n\t\t\t$this->maxRows=(int)db::getCalculatedRows();\n\t\t\twhile($row=db::fetch(db::$FETCH_TYPE_ASSOC)){\n\t\t\t\t$this->addRow($row);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "00f1571df916b0ab069d2c5a91db4e84", "score": "0.6744052", "text": "function getData() {\n checkIfNotAjax();\n $this->libauth->check(__METHOD__);\n $cpData = $this->BeOnemdl->getDataTable();\n $this->BeOnemdl->outputToJson($cpData);\n }", "title": "" }, { "docid": "e652419aded1811d751c6fe03ab49024", "score": "0.66396093", "text": "public function store_list() {\t\n\t\t$this -> db -> select('\n\t\t\ts.id , s.storecode , s.storename , s.address , s.phone , s.email , s.contactpersonname , s.contactpersonphone , st.statustitle , s.createdby , s.created_at , s.updatedby , s.updated_at , a.admincode, a.adminname\n\t\t');\n\t\t$this -> db -> from('store_info s');\n\t\t$this -> db -> join('admin_login AS a', 's.createdby = a.id');\n\t\t$this -> db -> join('status_info AS st', 's.status = st.id');\n\t\t$query = $this->db->get();\n\t\tif ($query->num_rows() > 0) {\n return $query->result();\n }else{\n\t\t\treturn false;\n\t\t}\n }", "title": "" }, { "docid": "94fdd0f600afac0e311335a39549d2f6", "score": "0.6612013", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('scon');\n\n\t\t$response = $grid->getData('scon', array(array()), array(), false, $mWHERE, 'id','desc' );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "a0ec5dfa48f732a1016c409d01b59111", "score": "0.66059357", "text": "protected function loadData(){\n\t\t//SELECT from \".self::TABLE_NAME.\"_data WHERE \".self::TABLE_NAME.\"_id=\".$this->id.\"\n\t\t\n\t\t//return the data\n\t\treturn array();\n\t}", "title": "" }, { "docid": "1a00719b35a4aeaec9d04d8a8940db09", "score": "0.6587177", "text": "public function get_data() {\n\n $query = $this->db->query(\"SELECT id, name, qty, price, is_active, qty_plastik\n FROM template_pola\n ORDER BY id DESC\")->result();\n\n echo json_encode($query);\n }", "title": "" }, { "docid": "8939521f9c85e664e99d023f5d852728", "score": "0.6550654", "text": "public function fetchStoresDataById($id) \n\t{\n\t\tif($id) {\n\t\t\t$data = $this->model_stores->getStoresData($id);\n\t\t\techo json_encode($data);\n\t\t}\n\t}", "title": "" }, { "docid": "e5cb8bf461849920fc1cdad9817f5ce7", "score": "0.65035915", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('spre');\n\n\t\t$response = $grid->getData('spre', array(array()), array(), false, $mWHERE, 'id', 'desc' );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "c7d7d07ff7d5ad6186eca6e6c2ab6369", "score": "0.65013343", "text": "public function stores () {\n $response['stores'] = Store::all();\n $response['success'] = true;\n $response['total_elements'] = count($response['stores']);\n if ($response['total_elements']>0) {\n return Response::json($response);\n } else {\n $error['success'] = false;\n $error['error_code'] = 404; \n $error['error_msg'] ='Record not found';\n return Response::json($error); \n }\n }", "title": "" }, { "docid": "8534b6a7f5e4ec3c86dd6978efde0f62", "score": "0.6498725", "text": "function getAll(){\r\n \treturn $this->data;\r\n }", "title": "" }, { "docid": "da4ea6dd8a87127859f476cfd6230671", "score": "0.64834464", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('prdo');\n\n\t\t$response = $grid->getData('prdo', array(array()), array(), false, $mWHERE, 'id', 'Desc' );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "f1aa38658dc105300f6f00d6b72553a6", "score": "0.64715916", "text": "public function allrecord_get() { \n $result = $this->Api_model->selectData('info', 'id, name, email');\n if($result == null)\n $this->set_response(array('response_code'=>400,'response_message'=>'No Data Found','response_data'=>array()), REST_Controller::HTTP_OK);\n else\n $this->set_response(array('response_code'=>200,'response_message'=>'Success','response_data'=>$result), REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "cb7179627ee042390d313942a3e0ede2", "score": "0.645788", "text": "public function index()\n {\n $data = request()->all();\n\n if(!empty($data['per_page'])){\n $this->perPage = $data['per_page'];\n }\n\n if(!empty($data['page'])){\n $this->page = $data['page'];\n }\n\n if(!empty($data['with'])){\n $with = explode(',', $data['with']);\n $stores = Stores::with($with);\n }else{\n $stores = Stores::query();\n }\n\n if(!empty($data['id'])){\n $stores->where('id', '=', $data['id']);\n }\n\n if(!empty($data['name'])){\n $stores->where('name','LIKE',\"%{$data['name']}%\");\n }\n\n if(!empty($data['active'])){\n $stores->where('active','=', $data['active']);\n }\n\n if(!empty($data['user_id'])){\n $stores->where('user_id','=', $data['user_id']);\n }\n\n if(!empty($data['description'])){\n $stores->where('description','LIKE',\"%{$data['description']}%\");\n }\n\n\n $stores = $stores->paginate($this->perPage, ['*'], 'page', $this->page);\n return response([\n 'status' => 'success',\n 'data' => $stores\n ]);\n }", "title": "" }, { "docid": "763cf6290b11fbb3cdd0e7983971864d", "score": "0.64534813", "text": "protected function data(){\nEditor::inst( $db, 'datatables_demo' )\n ->fields(\n Field::inst( 'product_name' )->validator( 'Validate::notEmpty' ),\n Field::inst( 'quantity_in_stock' )\n ->validator( 'Validate::numeric' )\n ->setFormatter( 'Format::ifEmpty', null ),\n\t\tField::inst( 'product_price' )\n ->validator( 'Validate::numeric' )\n ->setFormatter( 'Format::ifEmpty', null ),\n\t\t Field::inst( 'date' )\n ->validator( 'Validate::dateFormat', array(\n \"format\" => Format::DATE_ISO_8601,\n \"message\" => \"Please enter a date in the format yyyy-mm-dd\"\n ) )\n ->getFormatter( 'Format::date_sql_to_format', Format::DATE_ISO_8601 )\n ->setFormatter( 'Format::date_format_to_sql', Format::DATE_ISO_8601 ),\n\t\t\tField::inst( 'total' )\n ->validator( 'Validate::numeric' )\n ->setFormatter( 'Format::ifEmpty', null )\t\n )\n ->process( $_POST )\n ->json();\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "31808de18cefb274fa3aa53627d168ac", "score": "0.6437003", "text": "public function retrieveAll(){\r\n $conn = new ConnectionManager();\r\n $pdo = $conn->getConnection();\r\n \r\n\r\n // Add your codes here\r\n\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "9ce15031efbb39a7a9e0c04f512d564b", "score": "0.64290494", "text": "public function get_data()\n {\n return $this->retrieve('SELECT * FROM isys_import LIMIT 1000;');\n }", "title": "" }, { "docid": "a7017c2a9c8f723d0e0cb04daf1bc6da", "score": "0.6391129", "text": "function office() //get all records from database \n\t{\n\t $result;\n\t $csrf_token=$this->security->get_csrf_hash();\n\t $this->load->model('Sup_admin');\n\t $query=$this->Sup_admin->office(); \n\t $res=$query->result();\n\t if($res){\n\t\t $data;\n\t\t $i = 0;\n\t \t foreach($res as $r){\n\t\t\t $code = $r->office_id_pk;\n\t\t\t $type = $r->office_name;\n\t\t\t $data[$i] = array('code'=>$code,'type'=>$type);\n\t\t\t $i = $i+1;\n\t\t }\n\t\t $result = array('status'=>1,'message'=>'data found','data'=>$data,'csrf_token'=>$csrf_token);\n\t \t}\n\t\telse{\n\t\t $result = array('status'=>0,'message'=>'no data found','csrf_token'=>$csrf_token);\n\n\t \t}\n\t echo json_encode($result);\n }", "title": "" }, { "docid": "9fe53101dddda9983c9371c5290f2a85", "score": "0.638429", "text": "public function data()\n\t{\n\t\t$query = $this->query;\n\t\t$query['limit'] = $this->per_page;\n\t\t$query['offset'] = ($this->get_cur_page() - 1) * $this->per_page;\n\t\treturn $this->model->all($query);\n\t}", "title": "" }, { "docid": "5d4cd2997ebf00956faae62ca01968bf", "score": "0.638251", "text": "function GETDataKelas_All(){\r\n\r\n // Perintah Get Data Kelas\r\n return $this->MKelas->GET();\r\n }", "title": "" }, { "docid": "942d4ef480c40737a5f21f7c5f97decf", "score": "0.63785607", "text": "public function index()\n {\n\n\n $so_hdr = SaleOrders::all();\n foreach ($so_hdr as $value) {\n $value->load('items');\n }\n\n $result = array();\n $result['data'] = array();\n $result['data'] = $so_hdr;\n // $result['data']['item'] = $value->items();\n\n\n return json_encode($result, JSON_UNESCAPED_UNICODE); //Response($result);\n }", "title": "" }, { "docid": "48e0552b28597eb3c98370b19c7a8831", "score": "0.63729566", "text": "function list_data() {\r\n\r\n $list_data = $this->Master_Stock_model->get_details()->result();\r\n $result = array();\r\n $before='';\r\n foreach ($list_data as $data) {\r\n $result[] = $this->_make_item_row($data,$before);\r\n $before=$data->name;\r\n }\r\n echo json_encode(array(\"data\" => $result));\r\n }", "title": "" }, { "docid": "be376109645f603bdb1bcbf12a74ee4a", "score": "0.63692397", "text": "public function getDataStore();", "title": "" }, { "docid": "b418609fc8dc0ec7f36e2df0d49e5c9d", "score": "0.63682854", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('rcobro');\n\n\t\t$response = $grid->getData('rcobro', array(array()), array(), false, $mWHERE, 'id','desc' );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "5bd5ab7cf83747ffd008fda1e85ea528", "score": "0.6353422", "text": "public function getAllData()\n\t{\t\n\t\t//database selection\n\t\t$database = \"\";\n\t\t$constantDatabase = new ConstantClass();\n\t\t$databaseName = $constantDatabase->constantDatabase();\n\t\t\n\t\tDB::beginTransaction();\t\t\n\t\t$raw = DB::connection($databaseName)->select(\"select \n\t\tquotation_id,\n\t\tquotation_label,\n\t\tquotation_type,\n\t\tstart_at,\n\t\tend_at,\n\t\tcreated_at,\n\t\tupdated_at,\n\t\tcompany_id\t\t\t\n\t\tfrom quotation_dtl \n\t\twhere deleted_at='0000-00-00 00:00:00'\");\n\t\tDB::commit();\n\t\t\n\t\t//get exception message\n\t\t$exception = new ExceptionMessage();\n\t\t$exceptionArray = $exception->messageArrays();\n\t\tif(count($raw)==0)\n\t\t{\n\t\t\treturn $exceptionArray['204'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$enocodedData = json_encode($raw);\n\t\t\treturn $enocodedData;\n\t\t}\n\t}", "title": "" }, { "docid": "9dc61fa0a2b2ecf7591fa1a521c1c9cb", "score": "0.6351311", "text": "function getData()\r\n\t{\r\n\t\t// Lets load the data if it doesn't already exist\r\n\t\tif (empty( $this->_data ))\r\n\t\t{\r\n\t\t\t$query = $this->_buildQuery();\r\n\t\t\t$this->_db->setQuery( $query );\r\n\r\n\t\t\t//$this->_data = $this->_getList( $query );\r\n\t\t\t$this->_data = $this->_db->loadObject();\r\n\r\n\t\t}\r\n\r\n\t\treturn $this->_data;\r\n\t}", "title": "" }, { "docid": "1ce5da813b9aaf8607fb2e256d9cdf5f", "score": "0.63415706", "text": "protected function fetchData()\n\t{\n\t\t$this->addScopes();\n\t\t$criteria=$this->getCriteria();\n\t\tif(($pagination=$this->getPagination())!==false)\n\t\t{\n\t\t\t$pagination->setItemCount($this->getTotalItemCount());\n\t\t\t$pagination->applyLimit($criteria);\n\t\t}\n\t\tif(($sort=$this->getSort())!==false)\n\t\t\t$sort->applyOrder($criteria);\n\t\treturn CActiveRecord::model($this->modelClass)->findAll($criteria);\n\t}", "title": "" }, { "docid": "ef30aabb3446614bb70f0bf7c0ba7827", "score": "0.6337233", "text": "function wcmsl_ajax_get_stores() {\n\t// Fetch stores from database\n\t$stores_query = new WP_Query([\n\t\t'post_type' => 'wcmsl_store',\n\t\t'posts_per_page' => -1,\n\t]);\n\n\t$stores = [];\n\tif ($stores_query->have_posts()) {\n\t\twhile ($stores_query->have_posts()) {\n\t\t\t$stores_query->the_post();\n\n\t\t\tarray_push($stores, [\n\t\t\t\t'name' => get_the_title(),\n\t\t\t\t'address' => get_field(WCMSL_ACF_ADDRESS_FIELD),\n\t\t\t\t'city' => get_field(WCMSL_ACF_CITY_FIELD),\n\t\t\t\t'latitude' => (float)get_field(WCMSL_ACF_LATITUDE_FIELD),\n\t\t\t\t'longitude' => (float)get_field(WCMSL_ACF_LONGITUDE_FIELD),\n\t\t\t]);\n\t\t}\n\t}\n\n\twp_send_json_success($stores);\n}", "title": "" }, { "docid": "db629b9bc4d6ff24a89440539e92b250", "score": "0.63367206", "text": "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}", "title": "" }, { "docid": "f308bfb88f3f0090a3017ec68270d0ac", "score": "0.63315016", "text": "public function fetchAll(){\n $adapter = $this->adapter;\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from('flota');\n $selectString = $sql->getSqlStringForSqlObject($select);\n $data = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n \n return $data;\n }", "title": "" }, { "docid": "304a1d0a7b45de890b2d88b7039131b6", "score": "0.6313322", "text": "public function xhrGetListings()\n {\n $result = $this->db->select(\"SELECT * FROM data\");\n echo json_encode($result);\n }", "title": "" }, { "docid": "1bffc5aab3b2536fdd4166ebcd9e17fe", "score": "0.62930006", "text": "public function loadList() {\n\t\t/*Query database for names and id*/\n\t\t$CI =& get_instance(); \n\t\t$query = $CI->db->query(\"SELECT Firstname, Lastname, employeeID, Username, Password, Instructor, Lifeguard, Headguard, Supervisor FROM `Employees` \");\n\t\t$list = $query->result_array();\t\t//TODO: Add Extra Sequerity here..\t\t\t\t\n\t\techo json_encode($list );\t\t\n\t}", "title": "" }, { "docid": "732c0b73d13cc4a5c076b09ba25d7ce9", "score": "0.62898475", "text": "public function getAllData()\n\t{\n\t\treturn $this->db\n\t\t\t->where('row_status', 'A')\n\t\t\t->where('jabatan_karyawan', 'Admin')\n\t\t\t->get($this->_karyawan)\n\t\t\t->result();\n\t}", "title": "" }, { "docid": "5677e330f98a442c2591820128b45795", "score": "0.6283176", "text": "public function ajax_datagrid() {\n $data = Input::all();\n $CompanyID = User::get_companyID();\n $select = ['RoleName','Active','CreatedBy','updated_at','RoleID'];\n $roles = Role::select($select)->where('companyID',$CompanyID);\n return Datatables::of($roles)->make();\n }", "title": "" }, { "docid": "e6ee311f0cfd97f10921131116363d5b", "score": "0.62594545", "text": "public function getAllStores()\n {\n $sql = \"SELECT s.id, s.name, s.phone_number, s.address_id, a.province, a.city, a.district, a.address1, a.address2, \";\n $sql.= \"a.lat, a.lng FROM store as s, address as a \";\n $sql.= \"WHERE s.address_id=a.id\";\n $query = $this->db->prepare($sql);\n $query->execute();\n\n return $query->fetchAll();\n }", "title": "" }, { "docid": "c9f80dc61a607881fb2fcf324de6c24a", "score": "0.6255558", "text": "public function get_data(){\n\t\t// by using given function\n\t\tif($this->func_data_total && function_exists($this->func_data_total)){\n\t\t\t$this->items_total = call_user_func_array($this->func_data_total, array());\n\t\t// by using direct SQL request\n\t\t}else{\n\t\t\t$total = $this->db->fetch_all(\n\t\t\t\tsprintf(\n\t\t\t\t\t'SELECT COUNT(*) as cnt'\n\t\t\t\t\t\t.' FROM %s'\n\t\t\t\t\t\t.'%s',\n\t\t\t\t\t$this->sql['table'], // TABLE\n\t\t\t\t\t$this->sql['where'] // WHERE\n\t\t\t\t),\n\t\t\t\t'obj'\n\t\t\t);\n\t\t\t$this->items_total = $total[0]->cnt;\n\t\t}\n\t\t\n\t\t// Getting data\n\t\t// by using given function\n\t\tif($this->func_data_get && function_exists($this->func_data_get)){\n\t\t\t$param = array($this->sql['offset'], $this->sql['limit']);\n\t\t\tif($this->order_by) $param[] = current($this->order_by);\n\t\t\tif($this->order_by) $param[] = key($this->order_by);\n\t\t\t$this->rows = call_user_func_array($this->func_data_get, $param);\n\t\t// by using direct SQL request\n\t\t}else{\n\t\t $columns = array();\n\t\t foreach ( $this->columns_names as $columns_name ) {\n\t\t\t $columns[] = $this->sql['table'] . '.' . $columns_name;\n }\n\t\t\t$this->rows = $this->db->fetch_all(\n\t\t\t\tsprintf(\n\t\t\t\t\t'SELECT %s'\n\t\t\t\t\t\t.' FROM %s'\n\t\t\t\t\t\t.'%s'\n\t\t\t\t\t\t.' ORDER BY %s %s'\n\t\t\t\t\t\t.' LIMIT %s%d',\n\t\t\t\t\timplode(', ', $columns), // COLUMNS\n\t\t\t\t\t$this->sql['table'], // TABLE\n\t\t\t\t\t$this->sql['where'], // WHERE\n\t\t\t\t\tkey($this->order_by), current($this->order_by), // ORDER BY\n\t\t\t\t\t$this->sql['offset'].',', $this->sql['limit'] // LIMIT\t\n\t\t\t\t),\n\t\t\t\t$this->sql['get_array'] === true ? 'array' : 'obj'\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Adding actions to each row \n\t\tforeach($this->rows as &$row){\n\t\t\tif(is_object($row)) $row->actions = array_flip(array_keys($this->actions));\n\t\t\tif(is_array($row)) $row['actions'] = array_flip(array_keys($this->actions));\n\t\t} unset($row);\n\n\t\t$this->items_count = count((array)$this->rows);\n\t\t\n\t\t// Execute given function to prepare data\n\t\tif($this->func_data_prepare && function_exists($this->func_data_prepare))\n\t\t\tcall_user_func_array($this->func_data_prepare, array(&$this)); // Changing $this in function\n\t\telse{\n\t\t\t$this->preapre_data__default();\n\t\t}\n\t\t\n\t\treturn $this;\n\t\t\n\t}", "title": "" }, { "docid": "149236160b0319006a3829100a620a96", "score": "0.6255313", "text": "public function fetchDataToFront()\n\t{\n\t\t$this->db->order_by($this->id,$this->order);\n\t\t$this->db->limit(4);\n\t\treturn $this->db->get($this->table)->result();\n\t}", "title": "" }, { "docid": "9bc6287cfd105e8635bc4de5f64ea0d4", "score": "0.6255262", "text": "public function get()\n {\n return self::fetchAll();\n }", "title": "" }, { "docid": "84b5b680bd919f3588ed8b780cd3da20", "score": "0.62476915", "text": "public function reloadData(){\n $this->load->model('ModelPendaftaran');\n\n //QUERY ARTIKEL ADMIN\n $data = $this->ModelPendaftaran->queryAllData();\n echo json_encode($data);\n }", "title": "" }, { "docid": "d21e11b360c82357c8ce5ddbaa1d3fb6", "score": "0.6236175", "text": "static function getAll()\n {\n $returned_stores = $GLOBALS['DB']->query(\"SELECT * FROM stores;\");\n $stores = array();\n foreach ($returned_stores as $store) {\n $store_name = $store['store_name'];\n $id = $store['id'];\n $new_store = new Store($store_name, $id);\n array_push($stores, $new_store);\n }\n return $stores;\n }", "title": "" }, { "docid": "6089bed621cfed7b8b8e248855e13451", "score": "0.6227254", "text": "public function service_detail_list_json(){\r\n\t\t\t$aColumns = array( 'sl','service_title','unit_rate','qty','amount','tax','tax_amount','discount','total' );\r\n\t\t\t\r\n\t\t\t//Array of database search columns//\r\n\t\t\t$sColumns = array('service_title','qty','total');\r\n\t\t\t\r\n\t\t\t//Indexed column (used for fast and accurate table attributes) //\r\n\t\t\t$sIndexColumn = \"service_item_id\";\r\n\t\t\t\r\n\t\t\t//DB tables to use//\r\n\t\t\t$sTable = \"tbl_service_item \r\n\t\t\t\t\t INNER JOIN tbl_service ON service_item_service=service_id\r\n\t\t\t\t\t INNER JOIN tbl_service_head ON service_item_head=service_head_id\r\n\t\t\t\t\t INNER JOIN tbl_tax ON service_item_tax_id=tax_id\";\r\n\t\t\t\r\n\t\t\t//Paging//\r\n\t\t\t$sLimit = \"\";\r\n\t\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\r\n\t\t\t{\r\n\t\t\t\t$sLimit = \"LIMIT \".( $_GET['iDisplayStart'] ).\", \".\r\n\t\t\t\t\t( $_GET['iDisplayLength'] );\r\n\t\t\t}\r\n\t\r\n\t\t\t//Ordering//\r\n\t\t\tif ( isset( $_GET['iSortCol_0'] ) )\r\n\t\t\t{\r\n\t\t\t\t$sOrder = \"ORDER BY \";\r\n\t\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sOrder .= $aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\"\r\n\t\t\t\t\t\t\t\".( $_GET['sSortDir_'.$i] ) .\", \";\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$sOrder = substr_replace( $sOrder, \"\", -2 );\r\n\t\t\t\tif ( $sOrder == \"ORDER BY\" )\r\n\t\t\t\t{\r\n\t\t\t\t\t$sOrder = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\t//Filtering//\r\n\t\t\t$sWhere = \"\";\r\n\t\t\tif ( $_GET['sSearch'] != \"\" )\r\n\t\t\t{\r\n\t\t\t\t$sWhere = \"WHERE (\";\r\n\t\t\t\tfor ( $i=0 ; $i<count($sColumns) ; $i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$sWhere .= $sColumns[$i].\" LIKE '%\".( $_GET['sSearch'] ).\"%' OR \";\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\r\n\t\t\t\t$sWhere .= ')';\r\n\t\t\t}\r\n\t\r\n\t\t\t//Individual column filtering//\r\n\t\t\tfor ( $i=0 ; $i<count($sColumns) ; $i++ )\r\n\t\t\t{\r\n\t\t\t\tif ( $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( $sWhere == \"\" )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sWhere = \"WHERE \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sWhere .= \" AND \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$sWhere .= $sColumns[$i].\" LIKE '%\".($_GET['sSearch_'.$i]).\"%' \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\t//SQL queries//\r\n\t\t\t$sQuery\t\t\t= \"SELECT SQL_CALC_FOUND_ROWS service_item_id as sl,service_head_title as service_title,service_item_unit_rate as unit_rate,\r\n\t\t\t\t\t\t\tservice_item_qty as qty,service_item_amount as amount,tax_name as tax,tax_percentage as tax_perc,\r\n\t\t\t\t\t\t\tservice_item_tax_amount as tax_amount,service_item_discount_amt as discount,service_item_total as total,service_item_id as id\r\n\t\t\t\t\t\t\tFROM $sTable\r\n\t\t\t\t\t\t\t$sWhere\r\n\t\t\t\t\t\t\t$sOrder\r\n\t\t\t\t\t\t\t$sLimit\";\r\n\t\t\t$rResult \t\t= $this->db->query($sQuery);\r\n\t\r\n\t\t\t//Data set length after filtering//\r\n\t\t\t$fQuery\t\t\t= \"SELECT $sIndexColumn FROM $sTable $sWhere\";\r\n\t\t\t$fResult\t\t= $this->db->query($fQuery);\r\n\t\t\t$FilteredTotal\t= $fResult->num_rows();\r\n\t\r\n\t\t\t//Total data set length //\r\n\t\t\t$tQuery\t\t\t= \"SELECT $sIndexColumn FROM $sTable\";\r\n\t\t\t$tResult\t\t= $this->db->query($tQuery);\r\n\t\t\t$Total\t\t\t= $tResult->num_rows();\r\n\t\r\n\t\t\t//Output\r\n\t\t\t\r\n\t\t\tif($_GET['sEcho']==1){\r\n\t\t\t\t\r\n\t\t\t\t$cStart=0;\r\n\t\t\t\t$cEnd=$_GET['iDisplayLength'];\r\n\t\t\t\t$cLength=$_GET['iDisplayLength'];\r\n\t\t\t\t$cPage=0;\r\n\t\t\t\t$cTotalPage=ceil($FilteredTotal/$_GET['iDisplayLength']);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$cStart=$_GET['iDisplayStart'];\r\n\t\t\t\t$cEnd=$_GET['iDisplayStart']=$_GET['iDisplayLength'];\r\n\t\t\t\t$cLength=$_GET['iDisplayLength'];\r\n\t\t\t\t$cPage=intval($cStart/$cLength);\r\n\t\t\t\t$cTotalPage=ceil($FilteredTotal/$_GET['iDisplayLength']);\r\n\t\t\t}\r\n\t\t\t$output = array(\r\n\t\t\t\t\"cStart\"\t\t\t\t=> $cStart,\r\n\t\t\t\t\"cEnd\"\t\t\t\t\t=> $cEnd,\r\n\t\t\t\t\"cLength\"\t\t\t\t=> $cLength,\r\n\t\t\t\t\"cPage\"\t\t\t\t\t=> $cPage,\r\n\t\t\t\t\"cTotalPage\"\t\t\t=> $cTotalPage,\r\n\t\t\t\t\"sEcho\" \t\t\t\t=> intval($_GET['sEcho']),\r\n\t\t\t\t\"iTotalRecords\" \t\t=> $Total,\r\n\t\t\t\t\"iTotalDisplayRecords\" \t=> $FilteredTotal,\r\n\t\t\t\t\"aaData\" \t\t\t\t=> array()\r\n\t\t\t);\r\n\t\t\t$result\t= $rResult->result_array();\r\n\t\t\t$j=$cStart+1;\r\n\t\t\tforeach($result as $aRow){\r\n\t\t\t\t\r\n\t\t\t\t$row = array();\r\n\t\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( $aColumns[$i] == \"sl\" )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$row[] = $j;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//else if($aColumns[$i] == \"amount\"){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//if(PR_TAX_INCLUDE){\r\n\t\t\t\t\t\t\t//$row[]=$aRow[ $aColumns[$i] ];\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t\t//else{\r\n\t\t\t\t\t\t\t//$row[]=number_format($aRow[ $aColumns[$i] ]+ $aRow['pr_tax_amount'],DECIMAL_DIGITS);\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t//}\r\n\t\t\t\t\t//else if( $aColumns[$i] == \"status\" ){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//$row[] = \"<button type='button' style='margin-top:-5px; margin-bottom:-5px;' class='btn btn-xs btn-primary'>Extra Small Button</button>\";\r\n\t\t\t\t\t\t//$row[] = $this->Common_model->status_template($aRow['status']);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t//}\r\n\t\t\t\t\t//else if( $aColumns[$i] == \"action\" ){\r\n\t\t\t\t\t\t//$id\t\t=$aRow['id'];\r\n\t\t\t\t\t\t//if($aRow['status']==2){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//$row[]\t= \"<a href='Purchase/purchase_confirm/$id/' class='on-default edit-row edit-icon'><button type='button' style='margin-top:-5px; margin-bottom:-5px;' class='btn btn-xs btn-primary'>Confirm</button></a>\";\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t\t//if($aRow['status']==5){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//$row[]\t= \"<a href='Service/service_details/$id/' class='on-default edit-row edit-icon'><button type='button' style='margin-top:-5px; margin-bottom:-5px;' class='btn btn-xs btn-primary'>Details</button></a>\";\r\n\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//}\r\n\t\t\t\t\telse if ( $aColumns[$i] != ' ' )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// General output \r\n\t\t\t\t\t\t$row[] = $aRow[ $aColumns[$i] ];\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$output['aaData'][] = $row;\r\n\t\t\t\t$j++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo json_encode( $output );\r\n\t\t}", "title": "" }, { "docid": "025bfaed6797772e51cabfc76e6cfcb5", "score": "0.6223809", "text": "public function staffAllDataShow()\n\t\t{\n\t\t\t$sql = \"SELECT * FROM staffs\";\n\t\t\t$data = parent::dbConnection() -> query($sql);\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "cdf252a4b0527e0554ef5e82ee413df3", "score": "0.622259", "text": "public function get_data();", "title": "" }, { "docid": "0dde8806467f9586a228aaa0337dc61f", "score": "0.62152636", "text": "public function fetchAll()\n {\n //*** your code goes here\n //*** if there is an error, return an array which includes an error code of 2 and message == ERROR_UNABLE\n $listing = $this->table->select();\n if ($listing) {\n $data = [];\n $hydrator = $this->table->getResultSetPrototype()->getHydrator();\n foreach ($listing as $entity) $data[] = $hydrator->extract($entity);\n $result = ['success' => 1, 'data' => $data];\n } else {\n $result = ['success' => 0, 'error' => 1, 'message' => self::ERROR_UNABLE];\n }\n return $result;\n }", "title": "" }, { "docid": "dc70002f4fe9e61975d95934a82231b9", "score": "0.62133265", "text": "function apiGetCokeData()\n\t{\n\t\t$data = $this->model->dbGetData();\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "1ee9a094758af0bd86d4ec015eb1b5c4", "score": "0.6206584", "text": "public function index()\n {\n \n $purchases=PurchaseTransaction::all();\n $supplier=Supplier::all();\n $warehouse=Warehouse::all();\n return response()->json([\n 'data'=>$purchases,'dataSupplier'=>$supplier,'dataWarehouse'=>$warehouse\n ],200);\n }", "title": "" }, { "docid": "4edc6d12c701ecd1ec14da4b9e863d7a", "score": "0.62029165", "text": "function getAll() {\n\n if ($this->ion_auth->is_admin()) {\n $this->db->order_by($this->pk, $this->order);\n return $this->db->get_where($this->table_name, array('is_deleted' => 'FALSE'))->result();\n } else {\n //data jika usernya milik bank\n if ($this->session->userdata('bank_id')) {\n $this->db->order_by($this->pk, $this->order);\n return $this->db->get_where($this->table_name, array('id_bank' => $this->session->userdata('bank_id'),'is_deleted' => 'FALSE'))->result();\n \n //data jika usernya milik broker\n }elseif ($this->session->userdata('broker_id')) {\n $this->db->order_by($this->pk,$this->order);\n return $this->db->get_where($this->table_name,array('is_deleted' => 'FALSE'))->result();\n } \n }\n }", "title": "" }, { "docid": "3ab5042fda379dc608a0ca6552f02727", "score": "0.6199821", "text": "function get_records(){\n\t\t$output=array();\n\t\t/*data request dari client*/\n\t\t$request = $this->m_master->request_datatable();\n\t\t/*Token yang dikrimkan client, akan dikirim balik ke client*/\n\t\t$output['draw'] = $request['draw'];\n\t\n\t\t/*\n\t\t $output['recordsTotal'] adalah total data sebelum difilter\n\t\t$output['recordsFiltered'] adalah total data ketika difilter\n\t\tBiasanya kedua duanya bernilai sama pada saat load default(Tanpa filter), maka kita assignment\n\t\tkeduaduanya dengan nilai dari $total\n\t\t*/\n\t\t/*Menghitung total desa didalam database*/\n\t\t$total = count($this->m_master->get_supplier_order());\n\t\t$output['recordsTotal']= $output['recordsFiltered'] = $total;\n\t\n\t\t/*disini nantinya akan memuat data yang akan kita tampilkan\n\t\t pada table client*/\n\t\t$output['data'] = array();\n\t\n\t\t/*\n\t\t * jika keyword tidak kosong, maka menjalankan fungsi search\n\t\t* untuk ditampilkan di datable\n\t\t* */\n\t\tif($request['keyword'] !=\"\"){\n\t\t\t/*menjalankan fungsi filter or_like*/\n\t\t\t$this->m_master->search_like($request['keyword'],$this->column());\n\t\t}elseif ($request['date_from'] != \"\" && $request['date_to'] == \"\"){\n\t\t\t$this->db->like('A.date_add',$request['date_from']);\n\t\t}elseif ($request['date_from'] != \"\" && $request['date_to'] != \"\"){\n\t\t\t$this->db->where('DATE_FORMAT(A.date_add,\"%Y-%m-%d\") >=',$request['date_from']);\n\t\t\t$this->db->where('DATE_FORMAT(A.date_add,\"%Y-%m-%d\") <=',$request['date_to']);\n\t\t}\n\t\t/*Pencarian ke database*/\n\t\t$query = $this->m_master->get_supplier_order('',$this->column()[$request['column']],$request['sorting'],$request['length'],$request['start']);\n\t\n\t\n\t\t/*Ketika dalam mode pencarian, berarti kita harus\n\t\t 'recordsTotal' dan 'recordsFiltered' sesuai dengan jumlah baris\n\t\tyang mengandung keyword tertentu\n\t\t*/\n\t\tif($request['keyword'] !=\"\"){\n\t\t\t$this->m_master->search_like($request['keyword'],$this->column());\n\t\t\t$total = count($this->m_master->get_supplier_order());\n\t\t\t/*total record yg difilter*/\n\t\t\t$output['recordsFiltered'] = $total;\n\t\t}elseif ($request['date_from'] != \"\" && $request['date_to'] == \"\"){\n\t\t\t$this->db->like('A.date_add',$request['date_from']);\n\t\t\t/*total record yg difilter*/\n\t\t\t$output['recordsFiltered'] = $total;\n\t\t}elseif ($request['date_from'] != \"\" && $request['date_to'] != \"\"){\n\t\t\t$this->db->where('DATE_FORMAT(A.date_add,\"%Y-%m-%d\") >=',$request['date_from']);\n\t\t\t$this->db->where('DATE_FORMAT(A.date_add,\"%Y-%m-%d\") <=',$request['date_to']);\n\t\t\t/*total record yg difilter*/\n\t\t\t$output['recordsFiltered'] = $total;\n\t\t}\n\t\n\t\n\t\t$nomor_urut=$request['start']+1;\n\t\tforeach ($query as $row) {\n\t\t\tif ($row->state_received == 1){\n\t\t\t\t$status = '<span class=\"label label-success\">Complete</span>';\t\t\t\t\n\t\t\t}else if ($row->state_received == 2){\n\t\t\t\t$status = '<span class=\"label label-warning\">Not Complete</span>';\n\t\t\t}else{\n\t\t\t\t$status = '<span class=\"label label-default\">Order</span>';\n\t\t\t}\n\t\t\t//show in html\t\t\t\n\t\t\t$active = ($row->active == 1) ? '<span class=\"label label-success\">Active</span>' : '<span class=\"label label-danger\">Dibatalkan</span>';\n\t\t\t$output['data'][]=array($nomor_urut,\n\t\t\t\t\t$row->po_number,\n\t\t\t\t\t$row->po_date,\n\t\t\t\t\t$row->nama_supplier,\n\t\t\t\t\t$status,\n\t\t\t\t\t$active,\n\t\t\t\t\t$row->add_by,\n\t\t\t\t\t$row->date_add,\n\t\t\t\t\t'<a href=\"'.base_url('bo/'.$this->class.'/cancel/'.$row->id_supplier_order).'\" onclick=\"return confirm(\\'Anda yakin ingin membatalkan order ?\\')\" title=\"Batalkan\" class=\"btn btn-danger btn-circle\"><i class=\"icon-ban-circle\"></i></a>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t <a href=\"'.base_url('bo/'.$this->class.'/form/'.$row->id_supplier_order.'/1').'\" title=\"'.$this->config->config['detail'].'\" class=\"btn btn-warning btn-circle\"><i class=\"icon-search\"></i></a>'\n\t\t\t);\n\t\t\t$nomor_urut++;\n\t\t}\n\t\techo json_encode($output);\n\t\n\t}", "title": "" }, { "docid": "5b23eb4850e5a718ce7c562929898c38", "score": "0.6198948", "text": "protected function index()\n {\n \\Additional_Log::debug('【DAILY STORE LIST API】:START');\n\n // 引数取得\n $params = $this->setParams();\n $pattern = $this->params['pattern'];\n $user = \\Model_User::find($this->user_id);\n\n if($user->authority >= USER_AUTHORITY_COMPANY){\n $params['company_id'] = $user->company_id;\n }\n\n if($user->authority >= USER_AUTHORITY_BRAND){\n $params['brand_ids'] = [$user->brand_id];\n }\n\n if($user->authority >= USER_AUTHORITY_SECTION){\n $params['section_id'] = $user->section_id;\n }\n\n if($user->authority >= USER_AUTHORITY_STORE){\n $params['store_ids'] = [$user->store_id];\n }\n // 操作権限チェック\n $user->authority($params);\n\n // クーポン情報取得\n $conditions = \\Model_Daily_Store_Info::makeConditions($params);\n\n $order_condition = array('date' => 'desc');\n\n $results = \\Model_Daily_Store_Info::find('all', array(\n 'where' => $conditions,\n 'order_by' => $order_condition,\n ));\n\n $response = [];\n foreach ($results as $dailystore) {\n $rec = $dailystore->toArray($pattern);\n unset($rec['company']);\n unset($rec['brand']);\n unset($rec['store']);\n\n if (PATTERN_ONLY_KEY < $pattern) {\n $rec['company_name'] = isset($dailystore->company) ? $dailystore->company->company_name : null;\n $rec['brand_name'] = isset($dailystore->brand) ? $dailystore->brand->brand_name : null;\n $rec['store_name'] = isset($dailystore->store) ? $dailystore->store->store_name : null;\n }\n $response[] = $rec;\n }\n\n\n $this->response_fields['daily_store_info'] = $response;\n\n \\Additional_Log::debug('【DAILY STORE API】:END');\n }", "title": "" }, { "docid": "09272ff9edeee128bdb017209d7199ab", "score": "0.61910397", "text": "public function viewDataByAjax(){\n $all_data = Category::where('trash', false)->latest()->get();\n $count = Category::where('trash', true)->count();\n return response()->json([\n 'all_data' => $all_data,\n 'count' => $count\n ]);\n }", "title": "" }, { "docid": "e3cf81886e23cd3fe47c375a340feee3", "score": "0.6171797", "text": "public function queryAll()\n {\n $statement = sprintf(\"SELECT %s, %s, %s, %s, %s FROM %s WHERE deleted = 0\",\n static::FIELDS[0], static::FIELDS[1], static::FIELDS[2], static::FIELDS[3], static::FIELDS[4], static::TABLE);\n $req = $this->db->query($statement);\n $response = $req->fetchAll(PDO::FETCH_ASSOC);\n\n return json_encode($response);\n }", "title": "" }, { "docid": "3a60b8673e54aec11400a6714060b12c", "score": "0.6165558", "text": "function fetch_all() {\n $query = \"SELECT * FROM ReadingList\";\n $statement = $this->connect->prepare($query);\n if($statement->execute()) {\n while($row = $statement->fetch(PDO::FETCH_ASSOC))\n {\n $data[] = $row;\n }\n return $data;\n } else {\n return \"error\";\n }\n }", "title": "" }, { "docid": "4df0cbf947eda9dbd962b40505ae1895", "score": "0.61621964", "text": "public function actionServerdata(){\n $requestData = $_REQUEST;\n $model = new Services;\n $primary_key = $model->tableSchema->primaryKey;\n $array_cols = Yii::app()->db->schema->getTable(Services::model()->tableSchema->name)->columns;\n $array = array();\n $i = 0;\n foreach($array_cols as $key=>$col){\n $array[$i] = $col->name;\n $i++;\n }\n\n $columns = $array;\n $currentrole = Yii::app()->user->role;\n if($currentrole != \"admin\"){\n $userid = Yii::app()->user->id;\n $sql = \"SELECT * from \".Services::model()->tableSchema->name.\" where user_id = \".$userid;\n }\n else{\n $sql = \"SELECT * from \".Services::model()->tableSchema->name.\" where 1=1\";\n }\n\n if (!empty($requestData['search']['value']))\n {\n $sql.=\" AND ( $primary_key LIKE '%\" . $requestData['search']['value'] . \"%' \";\n foreach($array_cols as $key=>$col){\n if($col->name != $primary_key)\n {\n $sql.=\" OR \".$col->name.\" LIKE '%\" . $requestData['search']['value'] . \"%'\";\n }\n }\n $sql.=\")\";\n }\n\n $j = 0;\n\n // getting records as per search parameters\n foreach($columns as $key=>$column){\n\n if( !empty($requestData['columns'][$key]['search']['value']) ){ //name\n $sql.=\" AND $column LIKE '%\".$requestData['columns'][$key]['search']['value'].\"%' \";\n }\n $j++;\n }\n\n $count_sql = str_replace(\"*\",\"count(*) as columncount\",$sql);\n $data = Yii::app()->db->createCommand($count_sql)->queryAll();\n $totalData = $data[0]['columncount'];\n $totalFiltered = $totalData;\n\n $sql.=\" ORDER BY \" . $columns[$requestData['order'][0]['column']] . \" \" . $requestData['order'][0]['dir'] . \" LIMIT \" . $requestData['start'] . \" ,\" .\n $requestData['length'] . \" \";\n\n $result = Yii::app()->db->createCommand($sql)->queryAll();\n\n $data = array();\n $i=1;\n\n\n foreach ($result as $key => $row)\n {\n $nestedData = array();\n $nestedData[] = $row[$primary_key];\n\n if(!empty($row['user_id'])){\n $sql = \"SELECT full_name from user_info where user_id = \".$row['user_id'];\n $result = Yii::app()->db->createCommand($sql)->queryAll();\n if(!empty($result)){\n $row['user_id'] = $result[0]['full_name'];\n }\n }\n\n if(!empty($row['resource_id'])){\n $sql = \"SELECT resource_name from resources where resource_id = \".$row['resource_id'];\n $result = Yii::app()->db->createCommand($sql)->queryAll();\n if(!empty($result)){\n $row['resource_id'] = $result[0]['resource_name'];\n }\n }\n\n foreach($array_cols as $key=>$col){\n $nestedData[] = $row[\"$col->name\"];\n }\n\n $data[] = $nestedData;\n $i++;\n }\n\n\n $json_data = array(\n \"draw\" => intval($requestData['draw']),\n \"recordsTotal\" => intval($totalData),\n \"recordsFiltered\" => intval($totalFiltered),\n \"data\" => $data // total data array\n );\n\n echo json_encode($json_data);\n }", "title": "" }, { "docid": "6697325588784e17290172c4046022a1", "score": "0.61608917", "text": "public function getListdata() { \t\n $select = $this->select();\n $select->setIntegrityCheck(false)\n ->from(array('j'=>'job_category'),array('j.*')); \t\t\t\t\t\t\t\t\t\t\n \t\n \t$select = $this->fetchAll($select);\n\t$select = $select->toArray(); \t\t\t\n\t//_pr($select ,1);\n \n\tif($select){\n $data = array();\n foreach($select as $row){\n $data[$row['id']] = $row['name']; \n }\n return $data;\n }else{\n return null; \n } \n }", "title": "" }, { "docid": "c5746fca587c25abdaf79e1e5681165c", "score": "0.6157847", "text": "public function getDataDetail()\n {\n $data['prestasi'] = $this->db->get('prestasi')->result_array();\n $data['tingkatan'] = $this->db->get('tingkatan')->result_array();\n $data['jenis_kegiatan'] = $this->db->get('jenis_kegiatan')->result_array();\n $data['bidang_kegiatan'] = $this->db->get('bidang_kegiatan')->result_array();\n header('Content-type: application/json');\n echo json_encode($data);\n }", "title": "" }, { "docid": "0b33abb8a12c3f8c46d60052e15609fe", "score": "0.6157485", "text": "public function index()\n {\n $stores = Cache::remember('stores', 7200, function () {\n return StoreResource::collection(Store::all());\n });\n\n return response()->json($stores, 200);\n }", "title": "" }, { "docid": "5200815f3a2f1f15fae18e109c0cebf0", "score": "0.61565256", "text": "public function datatables()\n\t{\n\t\t//menunda loading (bisa dihapus, hanya untuk menampilkan pesan processing)\n\t\t// sleep(2);\n\n\t\t//memanggil fungsi model datatables\n\t\t$list = $this->m_guestbook->get_datatables();\n\t\t$data = array();\n\t\t$no = $this->input->post('start');\n\n\t\t//mencetak data json\n\t\tforeach ($list as $field) {\n\t\t\t$no++;\n\t\t\t$row = array();\n\t\t\t$row[] = $no;\n\t\t\t$row[] = $field['nama'];\n\t\t\t$row[] = $field['nim'];\n\t\t\t$row[] = $field['email'];\n\t\t\t$row[] = $field['date'];\n\t\t\t$data[] = $row;\n\t\t}\n\n\t\t//mengirim data json\n\t\t$output = array(\n\t\t\t\"draw\" => $this->input->post('draw'),\n\t\t\t\"recordsTotal\" => $this->m_guestbook->count_all(),\n\t\t\t\"recordsFiltered\" => $this->m_guestbook->count_filtered(),\n\t\t\t\"data\" => $data,\n\t\t);\n\n\t\t//output dalam format JSON\n\t\techo json_encode($output);\n\t}", "title": "" }, { "docid": "8becd6982c259c90787d470b72ed0267", "score": "0.61505914", "text": "public function showAll(){\n //global $db;\n $query = $this->db->prepare(\"SELECT * FROM `products`\");\n try{\n $query->execute();\n }catch(PDOException $e){\n die($e->getMessage());\n } \n return $query->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "70f54aa567ae3aec08fddbfd2dfe097a", "score": "0.6148923", "text": "public function dataTables()\n {\n $data = CategoryService::dataTables(app('company')->id, \\Request::all());\n return response()->json($data);\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.61452603", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.61452603", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.61452603", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.6144126", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "03911b5202b0087a996b8bce8b13eef6", "score": "0.6142102", "text": "function location_data() //get all records from database \n\t {\n\t\t$result;\n\t\t $csrf_token=$this->security->get_csrf_hash();\n\t\t $this->load->model('Sup_admin');\n\t\t $level=$this->input->post('level');\n\t\t $district=$this->input->post('district');\n\t\t //$dat=array(\"user_type_id_fk\"=>$desig);\n\t\t$query=$this->Sup_admin->mapping($level,$district);\n\t\t //$query=$this->db->get_where(\"mpr_master_location_mapping\");\n\t\t $res=$query->result();\n\t\tif($res){\n\t\t\t$data;\n\t\t\t$i = 0;\n\t\t\t foreach($res as $r){\n\t\t\t $code = $r->location_code;\n\t\t\t $type = $r->location_area;\n\t\t\t $data[$i] = array('code'=>$code,'type'=>$type);\n\t\t\t $i = $i+1;\n\t\t }\n\t\t\t$result = array('status'=>1,'message'=>'data found','data'=>$data,'csrf_token'=>$csrf_token);\n\t\t\t}\n\t\t else{\n\t\t\t$result = array('status'=>0,'message'=>'no data found','csrf_token'=>$csrf_token);\n \n\t\t\t}\n\t\techo json_encode($result);\n\t }", "title": "" }, { "docid": "6fdc1399ef42ed7fa04559b0eff93103", "score": "0.6138423", "text": "public function get_all_items() {\n $this->get_all_statement->execute();\n\n $result = $this->get_all_statement->get_result();\n\n $rows = $result->fetch_all(MYSQLI_ASSOC);\n\n return json_encode($rows);\n }", "title": "" }, { "docid": "a308f2ff09b99c08d4368bc279445111", "score": "0.61357236", "text": "public function getData()\n {\n $data = $this->dataSource->displayShoppingCart();\n\n return $data;\n\n }", "title": "" }, { "docid": "84d8cd78125486e7ee46537156e52014", "score": "0.6133184", "text": "public function json()\n {\n //\n return Laratables::recordsOf(Record::class, function ($query) {\n return $query->where('user_id', Auth::id());\n });\n }", "title": "" }, { "docid": "10594e11f2182e20f4c7b7b094a4a06c", "score": "0.612906", "text": "public function get_all () {\r\n\t\treturn $this->_data;\r\n\t}", "title": "" }, { "docid": "27382fadb650a5833a575e53e61f389e", "score": "0.6123665", "text": "public function ajax()\n {\n $this->app->get_table_data('discountlevels');\n }", "title": "" }, { "docid": "bd3c3526e8789a8cc9cdf8f18303d53a", "score": "0.612273", "text": "public function selectAllServiceData(){\n $sql = \"SELECT * FROM servicii_prestate ORDER BY id DESC\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "7c8feff4f6a2f7327af205bd493dbfa3", "score": "0.61199784", "text": "function fetch_district() //get all records from database \n\t{\n\t $result;\n\t $csrf_token=$this->security->get_csrf_hash();\n\t $this->load->model('Sup_admin');\n\t $query=$this->Sup_admin->fetch_district();\n\t\t $res=$query->result();\n\t if($res){\n\t\t $data;\n\t\t $i = 0;\n\t \t foreach($res as $r){\n\t\t\t $code = $r->location_code;\n\t\t\t $type = $r->district_name;\n\t\t\t $data[$i] = array('code'=>$code,'type'=>$type);\n\t\t\t $i = $i+1;\n\t\t }\n\t\t $result = array('status'=>1,'message'=>'data found','data'=>$data,'csrf_token'=>$csrf_token);\n\t }else{\n\t\t $result = array('status'=>0,'message'=>'no data found','csrf_token'=>$csrf_token);\n\n\t }\n\t echo json_encode($result);\n\t }", "title": "" }, { "docid": "01dbe7a9b5e0c096c6409af1ee66c439", "score": "0.61056805", "text": "public function __getData() {\n $qb = $this->entity->listQuery();\n\t$qb = $this->setArchiveStatusQuery($qb);\n $data = $this->entity->dtGetData($this->getRequest(), $this->columns, null, $qb);\n foreach ($data['data'] as $key => $val) {\n $id= \\Application\\Library\\CustomConstantsFunction::encryptDecrypt('encrypt', $val['action']['id']);\n\t $data['data'][$key]['protocol'] .= '<input type=\"checkbox\" class=\"unique hide\" value=\"'.$id.'\">';\n $data['data'][$key]['start_date'] = (isset($val['start_date'])) ? DateFunction::convertTimeToUserTime($val['start_date']) : '-';\n $studyPricingObj = $this->entity->getEntityObj($val['action']['pricingid'], 'Application\\Entity\\PhvStudyPricing');\n $data['data'][$key]['cro'] = $studyPricingObj->getCro()->getCompanyName();\n if (empty($data['data'][$key]['cro'])) {\n $data['data'][$key]['cro'] = '-';\n }\n $btnLabel = $this->translate('Archive');\n $textMessage = $this->translate('Are you sure you want to archive study?');\n if ($val['action']['status'] == 3) {\n $btnLabel = $this->translate('Unarchive');\n $textMessage = $this->translate('Are you sure you want to unarchive study?');\n }\n \n if ($data['data'][$key]['status'] != 2 && $this->currentUser->getRole()->getId() == 2) {\n $data['data'][$key]['action'] = \"<button class='tabledit-edit-button btn btn-sm btn btn-rounded btn-inline btn-primary-outline' onclick='showModal(\\\"\" . $id . \"\\\",\\\"\" . $textMessage . \"\\\")' type='button' value='1'>\" . $btnLabel . \"</button>&nbsp;\";\n } \n $data['data'][$key]['status'] = $this->entity->setStatusText($val['action']['status']);\n }\n\n return $data;\n }", "title": "" }, { "docid": "0849f58647931053e934ffcfd099a498", "score": "0.61035997", "text": "public function get_data(){\n // $id = 2;\n // $stmt = $this->verivied()->prepare(\"SELECT * FROM emptab WHERE id= :id\");\n // $stmt->bindParam(':id', $id);\n // $stmt->execute();\n // $data = $stmt->fetchAll(PDO::FETCH_ASSOC);\n // return $data;\n // select by id;\n $data1 = $this->Xgen->select('id,nama')->from('emptab')->where('id = :id', 4)->go();\n // select all;\n //$data = $this->Xgen->select('id,nama')->from('emptab')->go();\n // inser data\n // $data = $this->Xgen->insert_query('emptab',[\n // 'nama' => 'bxel'\n // ])->go();\n //update data\n //$data = $this->Xgen->update_query('emptab', ['nama' => 'new name'])->where('id = :id', 4)->go();\n //DELETE\n //$data1 = $this->Xgen->delete('emptab','id = :id',4)->go();\n\n }", "title": "" }, { "docid": "8b399b124705cfd624eff6ae3ecfaeb6", "score": "0.6099998", "text": "function getAllData() {\n \n $sql = \"call spGetAllUsuarios(@out_status);\";\n $rs = $this->db->Execute($sql);\n \t$data = $rs->getArray();\n\t\t$rs->Close();\n \treturn $data; \n \n }", "title": "" }, { "docid": "37c66283cfde28f6e8a94b8f44e087a1", "score": "0.6099853", "text": "public function fetchDataFront()\n\t{\n\t\t$this->db->order_by($this->id,$this->order);\n\t\t$this->db->limit(1);\n\t\treturn $this->db->get($this->table)->result();\n\t}", "title": "" }, { "docid": "503c93f2f4b8714113fcbbe3be8cb916", "score": "0.60985875", "text": "public function readAll()\n {\n $sql = 'SELECT id_producto, nombre_producto, descripcion_producto, precio_producto, imagen_producto, stock, nombre_marca, estado_producto \n FROM productos INNER JOIN marca USING(id_marca) \n ORDER BY nombre_producto';\n $params = null;\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "8de6d0165d169e125dc8bb623de893ac", "score": "0.6098369", "text": "private function loadAjax(): void {\n // ID på tabellen skal være sat enten i $_GET eller $_POST\n if (isset($_POST['RCMSTable']) || isset($_GET['RCMSTable'])) {\n $id = $_POST['RCMSTable'] ?? $_GET['RCMSTable'];\n } else {\n return;\n }\n\n if (!isset($this->table[$id])) {\n return;\n }\n\n ob_get_clean();\n ob_start();\n header(\"Content-Type: application/json\");\n\n $table = $this->table[$id];\n $columns = $this->columns[$id];\n $where = $this->where[$id];\n $order = $this->order[$id];\n $settings = $this->settings[$id];\n\n if (isset($_POST['pageNum'])) {\n $settings['pageNum'] = $_POST['pageNum'];\n }\n\n if (isset($_POST['searchTxt'])) {\n $settings['searchTxt'] = $_POST['searchTxt'];\n }\n\n if (isset($_POST['sortKey'])) {\n $settings['sortKey'] = $_POST['sortKey'];\n }\n\n if (isset($_POST['sortDir'])) {\n $settings['sortDir'] = $_POST['sortDir'];\n }\n\n $this->settings[$id] = $settings;\n\n $rows = $this->retrieveData($table, $columns, $where, $order, $settings);\n\n $this->buildRows($id, $rows);\n\n exit;\n }", "title": "" }, { "docid": "aa26902a580b1129aa99a0ff17b0d091", "score": "0.6094581", "text": "public function index()\n {\n $request = app()->make('request');\n \n return response()->json([\n 'stores' => $this->store->paginate(\n $this->store->whereLike('name', 'like', '%' . $request->filter . '%')\n ->when(Auth::User()->isSuperAdmin() === false, function($q){\n $q->where('user_id', Auth::User()->id);\n })\n ->with('users')\n ->orderBy('created_at', 'desc')\n ->get()\n )\n ]);\n }", "title": "" }, { "docid": "577a3e55efe80149c5245c8562edc7a2", "score": "0.60940266", "text": "public function getDataList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "eae74faf42fb523e6e46bc88f0103e20", "score": "0.6088193", "text": "public function getAllProducts(){\r\n\t\t//viet cau sql\r\n\t\t$sql =\"SELECT * FROM products\";\r\n\t\t//thuc thi cau truy van\r\n\t\t$obj = self::$conn->query($sql);\r\n\t\treturn $this->getData($obj);\r\n\t}", "title": "" }, { "docid": "797ca49cf6da99f04ae77dfabdc3daa2", "score": "0.60834557", "text": "function sqlData($sql){\n // \n $result = $this->query($sql);\n //\n //\n if (!$result) {\n print \"<p>Could not retrieve data: </p>\";\n }\n while ($row = $result->fetchAll()) {\n $data = $row;\n return json_encode($data);\n }\n }", "title": "" }, { "docid": "4db3faa6b17770dbc45d3a8f9e8e437d", "score": "0.6082053", "text": "public function get_all_data()\n\t{\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "26a2496493db6c79c43fc03c349587a0", "score": "0.60806787", "text": "private function getAll() {\r\n $result = $this->tableGateway->getAll();\r\n $response['status_code_header'] = HTTP_OK;\r\n $response['body'] = json_encode($result);\r\n return $response;\r\n }", "title": "" }, { "docid": "a139eb17aacb1b5d9ad0cd0839f626bb", "score": "0.607945", "text": "function get_all_kelas(){\n $this->datatables->select('kelas_id,kelas_nama')\n ->from('v_kelas');\n return $this->datatables->generate();\n }", "title": "" }, { "docid": "4b3db76def0af7292fe83e73d4a46f94", "score": "0.6076707", "text": "public function getAllData()\n {\n // dd($this->student);\n return $this->student->getAllData();\n }", "title": "" }, { "docid": "8d625ddbcfcc2eda2f5bce284e838952", "score": "0.6075678", "text": "public function getAll(){\n\t\treturn $this->db->get($this->table);\n\t}", "title": "" }, { "docid": "c5d29c3ea254db1ad0cb6231ba9c3b25", "score": "0.6068488", "text": "function getGridData(){\r\n\t\t$result_data\t\t=\t$this->getProducts();\r\n\t\t$response[\"error\"] \t= \tFALSE;\r\n\t\t$response[\"data\"] \t= \t$result_data;\r\n\t\techo json_encode($response);\r\n\t}", "title": "" }, { "docid": "15d15914aed1d20faaf10d36d7b1f229", "score": "0.60684174", "text": "public function getalldata()\r {\r $query=\"select * from `\".$this->tablename.\"` order by `position`\";\r\t\t\t$result=mysqli_query($this->conn,$query);\r return $result;\r }", "title": "" }, { "docid": "aed4fe2f5c3292286e0381e63b3aac60", "score": "0.6057126", "text": "public function getAllRecord()\n {\n $data = DB::table('barang')->get();\n $result = ['code' => '99', 'data' => $data];\n return response()->json($result);\n }", "title": "" }, { "docid": "6060815e542551f1d838200dce90e718", "score": "0.6051408", "text": "public function getAll()\n {\n $sql = \"SELECT * FROM \" . self::table . \";\";\n\n $conn = $this->dbc->Get();\n $statement = $conn->prepare($sql);\n $statement->execute();\n $data = $statement->fetchAll();\n $conn = null;\n\n return $data;\n }", "title": "" }, { "docid": "f34815ef07b0832efb95f96dff4642b2", "score": "0.6051042", "text": "public function getDatabaseData()\n {\n $data = array();\n $sql = 'SELECT * FROM `' . $this->table . '`';\n $db_success = mysql_query($sql)\n or die('Laden der Daten fehlgeschlagen: ' . mysql_error());\n while ($row = mysql_fetch_array($db_success, MYSQL_ASSOC))\n {\n $data[] = $row;\n }\n return $data;\n }", "title": "" }, { "docid": "23396a16251081ac920a8a51c804260b", "score": "0.6050357", "text": "public function getData()\n {\n return Datatables::of(App\\Models\\Courier::where('company_id', Auth::user()->company_id))->make(true);\n }", "title": "" }, { "docid": "0d1c05c614681153f4ebc3e04e2917f3", "score": "0.6044986", "text": "function service_list_json(){\r\n\t\t\t$aColumns = array( 'sl','branch','invoice','date','type','customer','net_amount','action' );\r\n\t\t\t\r\n\t\t\t//Array of database search columns//\r\n\t\t\t$sColumns = array('customer','invoice','net_amount');\r\n\t\t\t\r\n\t\t\t//Indexed column (used for fast and accurate table attributes) //\r\n\t\t\t$sIndexColumn = \"service_id\";\r\n\t\t\t\r\n\t\t\t//DB tables to use//\r\n\t\t\t$sTable = \"tbl_service \r\n\t\t\t\t\t INNER JOIN tbl_branch ON service_branch=branch_id\r\n\t\t\t\t\t INNER JOIN tbl_payment_method ON service_type=payment_method_id\r\n\t\t\t\t\t INNER JOIN tbl_customer ON service_customer=customer_id\";\r\n\t\t\t\r\n\t\t\t//Paging//\r\n\t\t\t$sLimit = \"\";\r\n\t\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\r\n\t\t\t{\r\n\t\t\t\t$sLimit = \"LIMIT \".( $_GET['iDisplayStart'] ).\", \".\r\n\t\t\t\t\t( $_GET['iDisplayLength'] );\r\n\t\t\t}\r\n\t\r\n\t\t\t//Ordering//\r\n\t\t\tif ( isset( $_GET['iSortCol_0'] ) )\r\n\t\t\t{\r\n\t\t\t\t$sOrder = \"ORDER BY \";\r\n\t\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sOrder .= $aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\"\r\n\t\t\t\t\t\t\t\".( $_GET['sSortDir_'.$i] ) .\", \";\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$sOrder = substr_replace( $sOrder, \"\", -2 );\r\n\t\t\t\tif ( $sOrder == \"ORDER BY\" )\r\n\t\t\t\t{\r\n\t\t\t\t\t$sOrder = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\t//Filtering//\r\n\t\t\t$sWhere = \"\";\r\n\t\t\tif ( $_GET['sSearch'] != \"\" )\r\n\t\t\t{\r\n\t\t\t\t$sWhere = \"WHERE (\";\r\n\t\t\t\tfor ( $i=0 ; $i<count($sColumns) ; $i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$sWhere .= $sColumns[$i].\" LIKE '%\".( $_GET['sSearch'] ).\"%' OR \";\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\r\n\t\t\t\t$sWhere .= ')';\r\n\t\t\t}\r\n\t\r\n\t\t\t//Individual column filtering//\r\n\t\t\tfor ( $i=0 ; $i<count($sColumns) ; $i++ )\r\n\t\t\t{\r\n\t\t\t\tif ( $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( $sWhere == \"\" )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sWhere = \"WHERE \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sWhere .= \" AND \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$sWhere .= $sColumns[$i].\" LIKE '%\".($_GET['sSearch_'.$i]).\"%' \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\t//SQL queries//\r\n\t\t\t$sQuery\t\t\t= \"SELECT SQL_CALC_FOUND_ROWS service_id as sl,branch_name as branch,service_invoice as invoice,\r\n\t\t\t\t\t\t\tDATE_FORMAT(service_date,'%d/%m/%Y') as date,payment_method_title as type,\r\n\t\t\t\t\t\t\tcustomer_name as customer,service_amount as amount,service_tax as tax,service_discount as discount,\r\n\t\t\t\t\t\t\tservice_total as total,service_net_amount as net_amount,service_id as id,\r\n\t\t\t\t\t\t\tservice_status as status\r\n\t\t\t\t\t\t\tFROM $sTable\r\n\t\t\t\t\t\t\t$sWhere\r\n\t\t\t\t\t\t\t$sOrder\r\n\t\t\t\t\t\t\t$sLimit\";\r\n\t\t\t$rResult \t\t= $this->db->query($sQuery);\r\n\t\r\n\t\t\t//Data set length after filtering//\r\n\t\t\t$fQuery\t\t\t= \"SELECT $sIndexColumn FROM $sTable $sWhere\";\r\n\t\t\t$fResult\t\t= $this->db->query($fQuery);\r\n\t\t\t$FilteredTotal\t= $fResult->num_rows();\r\n\t\r\n\t\t\t//Total data set length //\r\n\t\t\t$tQuery\t\t\t= \"SELECT $sIndexColumn FROM $sTable\";\r\n\t\t\t$tResult\t\t= $this->db->query($tQuery);\r\n\t\t\t$Total\t\t\t= $tResult->num_rows();\r\n\t\r\n\t\t\t//Output\r\n\t\t\t\r\n\t\t\tif($_GET['sEcho']==1){\r\n\t\t\t\t\r\n\t\t\t\t$cStart=0;\r\n\t\t\t\t$cEnd=$_GET['iDisplayLength'];\r\n\t\t\t\t$cLength=$_GET['iDisplayLength'];\r\n\t\t\t\t$cPage=0;\r\n\t\t\t\t$cTotalPage=ceil($FilteredTotal/$_GET['iDisplayLength']);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$cStart=$_GET['iDisplayStart'];\r\n\t\t\t\t$cEnd=$_GET['iDisplayStart']=$_GET['iDisplayLength'];\r\n\t\t\t\t$cLength=$_GET['iDisplayLength'];\r\n\t\t\t\t$cPage=intval($cStart/$cLength);\r\n\t\t\t\t$cTotalPage=ceil($FilteredTotal/$_GET['iDisplayLength']);\r\n\t\t\t}\r\n\t\t\t$output = array(\r\n\t\t\t\t\"cStart\"\t\t\t\t=> $cStart,\r\n\t\t\t\t\"cEnd\"\t\t\t\t\t=> $cEnd,\r\n\t\t\t\t\"cLength\"\t\t\t\t=> $cLength,\r\n\t\t\t\t\"cPage\"\t\t\t\t\t=> $cPage,\r\n\t\t\t\t\"cTotalPage\"\t\t\t=> $cTotalPage,\r\n\t\t\t\t\"sEcho\" \t\t\t\t=> intval($_GET['sEcho']),\r\n\t\t\t\t\"iTotalRecords\" \t\t=> $Total,\r\n\t\t\t\t\"iTotalDisplayRecords\" \t=> $FilteredTotal,\r\n\t\t\t\t\"aaData\" \t\t\t\t=> array()\r\n\t\t\t);\r\n\t\t\t$result\t= $rResult->result_array();\r\n\t\t\t$j=$cStart+1;\r\n\t\t\tforeach($result as $aRow){\r\n\t\t\t\t\r\n\t\t\t\t$row = array();\r\n\t\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( $aColumns[$i] == \"sl\" )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$row[] = $j;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//else if($aColumns[$i] == \"amount\"){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//if(PR_TAX_INCLUDE){\r\n\t\t\t\t\t\t\t//$row[]=$aRow[ $aColumns[$i] ];\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t\t//else{\r\n\t\t\t\t\t\t\t//$row[]=number_format($aRow[ $aColumns[$i] ]+ $aRow['pr_tax_amount'],DECIMAL_DIGITS);\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t//}\r\n\t\t\t\t\telse if( $aColumns[$i] == \"status\" ){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//$row[] = \"<button type='button' style='margin-top:-5px; margin-bottom:-5px;' class='btn btn-xs btn-primary'>Extra Small Button</button>\";\r\n\t\t\t\t\t\t$row[] = $this->Common_model->status_template($aRow['status']);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if( $aColumns[$i] == \"action\" ){\r\n\t\t\t\t\t\t$id\t\t=$aRow['id'];\r\n\t\t\t\t\t\t//if($aRow['status']==2){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//$row[]\t= \"<a href='Purchase/purchase_confirm/$id/' class='on-default edit-row edit-icon'><button type='button' style='margin-top:-5px; margin-bottom:-5px;' class='btn btn-xs btn-primary'>Confirm</button></a>\";\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t\t//if($aRow['status']==5){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$row[]\t= \"<a href='Service/service_details/$id/' class='on-default edit-row edit-icon'><button type='button' style='margin-top:-5px; margin-bottom:-5px;' class='btn btn-xs btn-primary'>Details</button></a>\";\r\n\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}\r\n\t\t\t\t\telse if ( $aColumns[$i] != ' ' )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// General output \r\n\t\t\t\t\t\t$row[] = $aRow[ $aColumns[$i] ];\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$output['aaData'][] = $row;\r\n\t\t\t\t$j++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo json_encode( $output );\r\n\t\t}", "title": "" }, { "docid": "e4b67403e64e6afcdcf6fcdfbb6edc37", "score": "0.60400176", "text": "public function anyData()\n\t{\n\t return Datatables::collection(goods::all())->make(true);\n\t}", "title": "" }, { "docid": "8045789d3e08def4799390698ce78043", "score": "0.60372055", "text": "public function fetchAll(){\n $sql = \"SELECT * FROM reservation \";\n $result = $this->connection()->query($sql);\n if ($result->rowCount()>0){\n while($rows = $result->fetch()){\n $data [] = $rows;\n }return $data;\n }\n }", "title": "" }, { "docid": "a369a08c80f919b1dbca96465061683b", "score": "0.60355777", "text": "public function data()\n {\n $news = News::leftJoin('company', 'news.company_id', '=', 'company.id')\n ->select([\n 'news.id',\n 'news.title',\n 'news.description',\n 'news.content',\n 'news.created_at',\n 'news.updated_at',\n 'company.name as companyname'\n ]);\n\n return $this->createCrudDataTable($news, 'admin.news.destroy', 'admin.news.edit')->make(true);\n }", "title": "" }, { "docid": "12a0f8e77790e4223b403582b59df91e", "score": "0.60338664", "text": "public function getData()\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->load->database();\n\n\t\t$aColumns = explode(\", \", $this->select);\n\t\t$searchColumns = $aColumns;\n\t\t$sTable = $this->table;\n\n\t\t//id table\n\t\t$idColumn = $aColumns[count($aColumns)-1];\n\t\t$idColumn = explode(\".\", $idColumn);\n\t\tif(count($idColumn)>1){\n\t\t\t$idColumn = $idColumn[1];\n\t\t}else{\n\t\t\t$idColumn = $idColumn[0];\n\t\t}\n\n\t\t//column ordenar al final\n\t\tfor ($i=0; $i < count($aColumns) ; $i++) {\n\t\t\t$result = explode(\" AS \", $aColumns[$i]);\n\t\t\tif(count($result)>1){\n\t\t\t\t$aColumns[$i] = trim($result[1]);\n\t\t\t}\n\t\t}\n\n\t\t//columnas para buscar\n\t\tfor ($i=0; $i < count($searchColumns) ; $i++) {\n\t\t\t$result = explode(\" AS \", $searchColumns[$i]);\n\t\t\tif(count($result)>1){\n\t\t\t\t$searchColumns[$i] = trim($result[0]);\n\t\t\t}\n\t\t}\n\n\t\t// Paging\n\t\t$limit = \"\";\n\t\tif(isset($_GET['iDisplayStart']) && $_GET['iDisplayLength'] != '-1')\n\t\t{\t\t\n\t\t\tif((int)$_GET['iDisplayStart']!=0){\n\t\t\t\t$limit .= \" LIMIT \".(int)$_GET['iDisplayLength'].\" OFFSET \".(int)$_GET['iDisplayStart'].\" \";\n\t\t\t}else{\n\t\t\t\t$limit .= \" LIMIT \".(int)$_GET['iDisplayLength'];\n\t\t\t}\n\t\t}\n \n\t\t// Ordering\n\t\t$text_order_by_datatable = \"\";\n\t\tif(isset($_GET['iSortCol_0']))\n\t\t{\n\t\t\tfor($i=0; $i<intval($_GET['iSortingCols']); $i++)\n\t\t\t{\n\t\t\t\t$coma = ($i<intval($_GET['iSortingCols'])-1)?\", \":\"\";\n\t\t\t\tif($_GET['bSortable_'.intval($_GET['iSortCol_'.$i])] == 'true')\n\t\t\t\t{\n\t\t\t\t\t$text_order_by_datatable.=\" \".$searchColumns[(int)$_GET['iSortCol_'.$i]].\" \".strtoupper($_GET['sSortDir_'.$i]).$coma;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$text_order_by = \"\";\n\t\tif( !empty($text_order_by_datatable) && !empty($this->order_by) )\n\t\t{\n\t\t\t$text_order_by_datatable .= \", \";\n\t\t}\n\n\t\t$text_order_by_datatable = ($this->order_by!=\"\")?$text_order_by_datatable.$this->order_by:$text_order_by_datatable;\n\t\t$text_order_by .= (!empty($text_order_by_datatable)) ? \" ORDER BY \".$text_order_by_datatable : \" \";\n\t\t/* Multi column filtering */\n\t\t$where = \"\";\n\t\t$text_where_datatable = \"\";\n\t\tfor ( $i = 0 ; $i < count($searchColumns) ; $i++ )\n\t\t{\n\t\t\tif ( ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" ) && $_GET['sSearch'] != '' )\n\t\t\t{\n\t\t\t\tif($i==0){ $type=\"\"; }else{ $type=\" OR \"; }\n\t\t\t\t$text_where_datatable .= $type.$searchColumns[$i].\" LIKE '%\".$_GET['sSearch'].\"%' \";\n\t\t\t}\n\t\t}\n\t\tif($text_where_datatable!=\"\"){\n\t\t\t$text_where_datatable =\" (\".$text_where_datatable.\") \";\n\t\t}\n\n\t\t//where\n\t\tfor ($i=0; $i < count($this->where); $i++) {\n\t\t\tif($i==0 && $text_where_datatable!=\"\"){ $type=\" AND \"; }elseif($i==0 && $where==\"\"){ $type=\"\"; }else{ $type=\" AND \"; }\n\t\t\t$operador = \" \";\n\t\t\tif( !empty($this->where[$i][1]) )\n\t\t\t{\n\t\t\t\tif(!strpos($this->where[$i][0], \"=\")){\n\t\t\t\t\t$operador = \" = \";\n\t\t\t\t}\n\t\t\t\tif(!is_numeric($this->where[$i][1]) && strlen($this->where[$i][1])==1){\n\t\t\t\t\t$this->where[$i][1] = \"'\".$this->where[$i][1].\"'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$text_where_datatable.=$type.$this->where[$i][0].$operador.$this->where[$i][1].\" \";\n\t\t}\n\t\t$where = ($text_where_datatable!=\"\")?\" WHERE \".$text_where_datatable : \"\";\n\t\t\n $like = '';\n $text_like_datatable = '';\n for ($i=0; $i < count($this->like); $i++) {\n\t\t\tif($i==0 && $text_like_datatable!=\"\"){ $type=\" AND \"; }elseif($i==0 && $like==\"\"){ $type=\"\"; }else{ $type=\" AND \"; }\n\t\t\t$operador = \" \";\n\t\t\tif(!strpos($this->like[$i][0], \"=\")){\n\t\t\t\t$operador = \" like \";\n\t\t\t}\n\t\t\tif(!is_numeric($this->like[$i][1]) && strlen($this->like[$i][1])==1){\n\t\t\t\t$this->like[$i][1] = \"'\".$this->like[$i][1].\"'\";\n\t\t\t}\n\t\t\t$text_like_datatable.=$type.$this->like[$i][0].$operador.$this->like[$i][1].\" \";\n\t\t}\n if($where!='')\n {\n $like = ($text_like_datatable!=\"\")?\" AND \".$text_like_datatable : \"\";\n }else{\n $like = ($text_like_datatable!=\"\")?\" WHERE \".$text_like_datatable : \"\";\n }\n\n //group by\n $text_group_by = ( !empty($this->group_by) ) ? \" GROUP BY \".$this->group_by.\" \" : $this->group_by;\n \n \n\t\t//join\n\t\t$join = \"\";\n\t\tfor ($i=0; $i < count($this->join); $i++) {\n\t\t\tif(!isset($this->join[$i][2])){ $type_join=\"INNER\"; }else{ $type_join=$this->join[$i][2]; }\n\t\t\t$join.=\" \".$type_join.\" JOIN \".$this->join[$i][0].\" ON \".$this->join[$i][1].\" \";\n\t\t}\n\n\n\n\t\t$sql = \"SELECT \".$this->select.\" FROM \".$sTable.$join.$where.$like.$text_group_by.$text_order_by.$limit;\n\t\t//echo $sql;die;\n\t\t$rResult = $CI->db->query($sql);\n\n\t\t// Total data set length\n\t\t$iTotal = count($rResult->result());\n\n\t\t// Data set length after filtering\n\t\t$new_query = $CI->db->query(\"SELECT COUNT(*) AS found_rows FROM \".$sTable.$join.$where.$limit);\n\t\tif(count($new_query->row())>0){\n\t\t\t$iFilteredTotal = $new_query->row()->found_rows;\n\t\t}else{\n\t\t\t$iFilteredTotal = $iTotal;\n\t\t}\n\n\t\t// Output\n\t\t$output = array(\n\t\t\t'sEcho' => intval($_GET['sEcho']),\n\t\t\t'iTotalRecords' => $iTotal,\n\t\t\t'iTotalDisplayRecords' => $iFilteredTotal,\n\t\t\t'url' => urldecode($_SERVER['REQUEST_URI']),\n\t\t\t'aaData' => array()\n\t\t);\n\t\tforeach($rResult->result_array() as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\tfor($i=0; $i<count($aColumns); $i++)\n\t\t\t{\n\t\t\t\t$key = explode(\".\", $aColumns[$i]);\n\t\t\t\t$key = (count($key)>1) ? trim($key[1]) : trim($key[0]);\n\t\t\t\t$row[] = $aRow[$key];\n\t\t\t\tif (trim($key) == trim($idColumn)) { $row['DT_RowId'] = $aRow[$key]; } // Sets DT_RowId\n\t\t\t}\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\n\t\t//url export\n\t\t$url= urldecode($_SERVER['REQUEST_URI']);\n\t\t$output['links'] = \"$url\";\n\t\treturn $_GET['callback'].'('.json_encode( $output ).');';\n\t}", "title": "" }, { "docid": "11938f7adcdea88c45da8e4ac28edc0b", "score": "0.60324365", "text": "protected function _retrieveData()\n\t{\n\t\t/**\n\t\t * sql has been specified\n\t\t */\n\t\tif ($this->_sql !== NULL) {\n\n\t\t\tif ($this->_offset !== NULL &&\n\t\t\t\t$this->_limit !== NULL) {\n\t\t\t\t$this->_data = $this->_database->fetchAll($this->_sql . ' LIMIT ' . $this->_offset . ', ' . $this->_limit);\n\t\t\t} else {\n\t\t\t\t$this->_data = $this->_database->fetchAll($this->_sql);\n\t\t\t}\n\n\t\t\t$message = 'queried database with'\n\t\t\t\t\t . L8M_Geshi::parse(preg_replace('/\\s+/', ' ', $this->_sql), 'mysql')\n\t\t\t;\n\t\t\t$this->addMessage($message, 'database');\n\n\t\t\t$message = 'retrieved <code>'\n\t\t\t\t\t . $this->getTotalRecords()\n\t\t\t\t\t . ' '\n\t\t\t\t\t . $this->getModelClassName()\n\t\t\t\t\t . '</code> records from <code>database</code>'\n\t\t\t;\n\t\t\t$this->addMessage($message, 'database');\n\n\t\t} else\n\n\t\t/**\n\t\t * file has been specified\n\t\t */\n\t\tif ($this->_file !== NULL) {\n\t\t\tif ($this->_offset !== NULL &&\n\t\t\t\t$this->_limit !== NULL) {\n\n\t\t\t\t$rows = array_slice(\n\t\t\t\t\t$this->_file,\n\t\t\t\t\t$this->_offset,\n\t\t\t\t\t$this->_limit\n\t\t\t\t);\n\n\t\t\t} else {\n\n\t\t\t\t$rows = $this->_file;\n\n\t\t\t}\n\n\t\t\t$this->_data = array();\n\t\t\tforeach($rows as $row) {\n\t\t\t\t$this->_data[] = $this->_convertFileRowIntoData($row);\n\t\t\t}\n\n\t\t\t$message = 'retrieved <code>'\n\t\t\t\t\t . $this->getTotalRecords()\n\t\t\t\t\t . ' '\n\t\t\t\t\t . $this->getModelClassName()\n\t\t\t\t\t . '</code> records from <code>file</code>'\n\t\t\t;\n\t\t\t$this->addMessage($message, 'file');\n\n\t\t} else\n\n\t\t/**\n\t\t * array has been specified\n\t\t */\n\t\tif ($this->_array !== NULL) {\n\t\t\tif ($this->_offset !== NULL &&\n\t\t\t\t$this->_limit !== NULL) {\n\n\t\t\t\t$this->_data = array_slice(\n\t\t\t\t\t$this->_array,\n\t\t\t\t\t$this->_offset,\n\t\t\t\t\t$this->_limit\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\t$this->_data = $this->_array;\n\t\t\t}\n\n\t\t\t$message = 'retrieved <code>'\n\t\t\t\t\t . $this->getTotalRecords()\n\t\t\t\t\t . ' '\n\t\t\t\t\t . $this->getModelClassName()\n\t\t\t\t\t . '</code> records from <code>array</code>'\n\t\t\t;\n\t\t\t$this->addMessage($message, 'page-code');\n\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "fe0a33541198e25a2b1c2c04191e5238", "score": "0.6031763", "text": "public function stores_list()\n\t{\n\t\t$data['store_list']=$this->store->get_all();\n\t\t$data['page']='Store List';\n\t\t$view = 'admin/stores/admin_store_list_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "title": "" }, { "docid": "e71babb523b243586fc2169ab59a582a", "score": "0.6025153", "text": "public function getData()\n {\n// print_r($this->where);exit;\n $records = DB::table($this->dbTable)\n ->where($this->where)\n ->get();\n if (count($records) == 0) {\n return null;\n }\n\n return $records;\n }", "title": "" } ]
892ace348ae0e86e2af0114d1326f58f
/========================================================== Creation of CRUD C:insert R:select U:update D:delete========================================================== Customer insertion function
[ { "docid": "bbffc6003b0ad3362de5afdec4c4309c", "score": "0.67955893", "text": "function addCustomer()\r {\r global $db;\r $requete = $db->prepare('INSERT INTO customers \r (customernumber,sexe,name,firstname,email,phone,society,address_id)\r values(?,?,?,?,?,?,?,?)');\r $requete->execute(array(\r $this->customernumber,\r $this->sexe,\r $this->name,\r $this->firstname,\r $this->email,\r $this->phone,\r $this->society,\r $this->address_id\r ));\r }", "title": "" } ]
[ { "docid": "021a6942ecac19098ec6c88e12910c26", "score": "0.7099123", "text": "protected function insertCustomer()\n {\n parent::$db->lockTable(\"customer\");\n $max_id = parent::$db->getMaxId(\"customer\");\n $max_id++;\n\n $this->customer = array(\n \"id\" => $max_id,\n \"name\" => $this->post_data['name'],\n \"surname\" => $this->post_data['surname'],\n \"email\" => $this->post_data['email'],\n \"phone\" => $this->post_data['phone'],\n \"street\" => $this->post_data['street'],\n \"city\" => $this->post_data['city'],\n \"zip\" => $this->post_data['zip']\n );\n \n $save_customer_result = parent::$db->insertRow(\"customer\", $this->customer); \n parent::$db->unlockTable(\"customer\");\n \n if($save_customer_result === false)\n {\n $_SESSION[\"info\"] = $this->info = \"Objednávku se nepovedlo uložit. Zkuste to prosím znovu.\";\n $this->redirect('kosik/'); \n }\n }", "title": "" }, { "docid": "c2a00ff9eaf5e731166cb86494317e90", "score": "0.6880275", "text": "function add_customer($CustName, $cust_ref, $address, $tax_id, $curr_code,\n\t$dimension_id, $dimension2_id, $credit_status, $payment_terms, $discount, $pymt_discount, \n\t$credit_limit, $sales_type, $notes)\n{\n\t$sql = \"INSERT INTO \".TB_PREF.\"debtors_master (name, debtor_ref, address, tax_id,\n\t\tdimension_id, dimension2_id, curr_code, credit_status, payment_terms, discount, \n\t\tpymt_discount,credit_limit, sales_type, notes) VALUES (\"\n\t\t.db_escape($CustName) .\", \" .db_escape($cust_ref) .\", \"\n\t\t.db_escape($address) . \", \" . db_escape($tax_id) . \",\"\n\t\t.db_escape($dimension_id) . \", \" \n\t\t.db_escape($dimension2_id) . \", \".db_escape($curr_code) . \", \n\t\t\" . db_escape($credit_status) . \", \".db_escape($payment_terms) . \", \" . $discount . \", \n\t\t\" . $pymt_discount . \", \" . $credit_limit \n\t\t .\", \".db_escape($sales_type).\", \".db_escape($notes) . \")\";\n\n\tdb_query($sql,\"The customer could not be added\");\n}", "title": "" }, { "docid": "f960bf51e3ee2145ef9b5cb79020a6a5", "score": "0.67365944", "text": "public function Do_insert_Example1(){\n\n\t}", "title": "" }, { "docid": "87dcc1b8b6b05122f1743bea06e7e23c", "score": "0.6711072", "text": "public function insert_customer($data)\n{\n$this->db->insert('customers', $data);\n$id = $this->db->insert_id();\nreturn (isset($id)) ? $id : FALSE;\n}", "title": "" }, { "docid": "2b9736f8f58392dbf06fd33a2ddccd80", "score": "0.66783303", "text": "function addCustomer($cust_fname, $cust_lname, $cust_dob, $cust_address, $cust_login_name, $cust_login_password, $cust_phone, $cust_register){\n $sql = \"INSERT INTO customer(cust_fname, cust_lname, cust_dob, cust_address, cust_login_name, cust_login_password, cust_phone, cust_register_date) VALUES ('$cust_fname', '$cust_lname', '$cust_dob', '$cust_address', '$cust_login_name', '$cust_login_password', '$cust_phone', '$cust_register')\";\n $conn = connection();\n $result = $conn->query($sql); // this will perform the addition of data to the table product\n}", "title": "" }, { "docid": "9c80566c33dc200f74b597ddf300d7bf", "score": "0.6675595", "text": "static function createCustomer(Customer $newCustomer): int {\n $sql = \"INSERT INTO Customers (Name, Address, City) VALUES (:Name, :Address, :City);\";\n\n //Query\n self::$_db->query($sql);\n //Bind\n self::$_db->bind(\":Name\",$newCustomer->getName());\n self::$_db->bind(\":Address\",$newCustomer->getAddress());\n self::$_db->bind(\":City\",$newCustomer->getCity());\n\n //Execute\n self::$_db->execute();\n\n //Return \n return self::$_db->lastInsertedId();\n\n }", "title": "" }, { "docid": "7673326ef06a71b57b108c81b6d4a508", "score": "0.6658024", "text": "public function add_customer($data){\r\n $db_debug = $this->db->db_debug;\r\n $this->db->db_debug = FALSE;\r\n\r\n $result = $this -> db -> insert(\"customers\" , $data);\r\n\r\n // end of disable error messages\r\n $this->db->db_debug = $db_debug;\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "785f1b9c3931716681d9a9d346775bca", "score": "0.66110814", "text": "protected function _insert() {\n\t}", "title": "" }, { "docid": "91d46f191ce64523e27bc20ef8f81f64", "score": "0.65965945", "text": "public function insertCustomer($data)\n {\n //Add created and modified date if not included\n if (!array_key_exists(\"created\", $data)) {\n $data['created'] = date(\"Y-m-d H i:s\");\n }\n \n //insert customer data \n $insert = $this->db->insert($this->custTable, $data);\n \n //return the status\n return $insert ? $this->db->insert_id() : false;\n }", "title": "" }, { "docid": "9edb897f83864a9431ef3aded557ac49", "score": "0.6565796", "text": "function AddToCustomers($first_name, $last_name, $id_customer, $mail, $subscriber_type, $phone, $choice) {\n $result = $this->con->query(\"INSERT INTO customers (`first_name`,`last_name`,`id_customer`,`mail`,`subscriber_type`,`phone_number`,`choice`,`register_date`) VALUES ('$first_name','$last_name','$id_customer','$mail','$subscriber_type','$phone','$choice',now());\");\n return $this->con->insert_id;\n }", "title": "" }, { "docid": "6f476fd8e5f399c982f02b79d169c800", "score": "0.65224594", "text": "public function insertCustomer($postVal,$cid) {\n\t\t$getCustomer_id = $this->getCustomerID();\n\t\tif(isset($postVal['gst_status']) && !empty($postVal['gst_status'])) {\n\t\t\t$gst_date = date(\"Y-m-d\",strtotime($postVal['gst_status']));\n\t\t} else {\n\t\t\t$gst_date = '';\n\t\t}\n\t\t$getData = array('fkcompany_id' \t\t\t=> $cid,\n\t\t\t\t\t\t \t 'customer_id' \t\t\t=> $getCustomer_id,\n\t\t\t\t\t\t \t 'customer_name' \t\t=> trim($postVal['customer_name']),\n\t\t\t\t\t\t \t 'address1' \t \t => trim(addslashes($postVal['address1'])),\n\t\t\t\t\t\t \t 'address2' \t \t\t=> trim(addslashes($postVal['address2'])),\n\t\t\t\t\t\t \t 'company_registration_no' => trim($postVal['customer_reg_no']),\n\t\t\t\t\t\t \t 'office_number' \t \t=> trim($postVal['office_number']),\n\t\t\t\t\t\t \t 'fax_number' \t\t\t=> trim($postVal['fax_number']),\n\t\t\t\t\t\t \t 'city' \t \t\t\t=> trim($postVal['city']),\n\t\t\t\t\t\t \t 'state' \t \t\t\t=> trim($postVal['state']),\n\t\t\t\t\t\t \t 'country' \t \t\t\t=> trim($postVal['country']),\n\t\t\t\t\t\t \t 'website' \t\t\t\t=> trim($postVal['website']),\n\t\t\t\t\t\t \t 'email' \t\t\t\t=> trim($postVal['email']),\n\t\t\t\t\t\t \t 'company_gst_no' \t \t=> trim($postVal['company_gst_no']),\n\t\t\t\t\t\t \t 'coa_link' \t \t\t=> trim($postVal['coa_link']),\n\t\t\t\t\t\t \t // 'other_coa_link' \t \t=> trim($postVal['other_coa']),\n\t\t\t\t\t\t \t 'postcode' \t \t\t=> trim($postVal['postcode']),\n\t\t\t\t\t\t \t 'gst_verified_date' \t=> $gst_date);\n\t\tif($this->remoteDb->insert('customers',$getData)) {\n\t\t\t$lastID = $this->remoteDb->lastInsertId();\n\t\t\tif(isset($lastID) && !empty($lastID)) {\n\t\t\t\t$shipping_counter = $postVal['shipping_counter'];\n\t\t\t\t$contact_counter = $postVal['contact_counter'];\n\t\t\t\tif(isset($shipping_counter) && !empty($shipping_counter) && $shipping_counter!=0) {\n\t\t\t\t\tfor ($i=1; $i <= $shipping_counter; $i++) { \n\t\t\t\t\t\t$ship_address1 = trim(addslashes($postVal['shipping_address_one_'.$i]));\n\t\t\t\t\t\t$ship_address2 = trim(addslashes($postVal['shipping_address_two_'.$i]));\n\t\t\t\t\t\t$ship_city \t = trim($postVal['shipping_city_'.$i]);\n\t\t\t\t\t\t$ship_state \t = trim($postVal['shipping_state_'.$i]);\n\t\t\t\t\t\t$ship_country = trim($postVal['shipping_country_'.$i]);\n\t\t\t\t\t\t$ship_postcode = trim($postVal['shipping_postal_code_'.$i]);\n\t\t\t\t\t if(isset($ship_address1) && !empty($ship_address1) && isset($ship_city) && !empty($ship_city) && isset($ship_state) && !empty($ship_state) && isset($ship_country) && !empty($ship_country)) {\n\t\t\t\t\t\t$getShipData = array('fkcustomer_id' \t\t=> $lastID,\n\t\t\t\t\t\t\t\t\t\t\t \t 'shipping_address1' \t=> $ship_address1,\n\t\t\t\t\t\t\t\t\t\t\t \t 'shipping_address2' \t=> $ship_address2,\n\t\t\t\t\t\t\t\t\t\t\t \t 'shipping_city' \t \t=> $ship_city,\n\t\t\t\t\t\t\t\t\t\t\t \t 'shipping_state' \t\t=> $ship_state,\n\t\t\t\t\t\t\t\t\t\t\t \t 'shipping_country' \t=> $ship_country,\n\t\t\t\t\t\t\t\t\t\t\t \t 'shipping_postcode' \t=> $ship_postcode);\n\t\t\t\t\t\t\t$insertShip = $this->remoteDb->insert('customer_shipping_address',$getShipData);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(isset($contact_counter) && !empty($contact_counter) && $contact_counter!=0) {\n\t\t\t\t\tfor ($j=1; $j <= $contact_counter; $j++) { \n\t\t\t\t\t\t$contact_person = trim($postVal['key_contact_person_'.$j]);\n\t\t\t\t\t\t$designation = trim($postVal['key_designation_'.$j]);\n\t\t\t\t\t\t$contact_office = trim($postVal['key_contact_office_'.$j]);\n\t\t\t\t\t\t$contact_email \t = trim($postVal['key_email_'.$j]);\n\t\t\t\t\t\t$contact_mobile = trim($postVal['key_contact_mobile_'.$j]);\n\t\t\t\t\t\t$default_person = trim($postVal['key_default_person_'.$j]);\n\t\t\t\t\t if(isset($contact_person) && !empty($contact_person) && isset($designation) && !empty($designation) && isset($default_person) && !empty($default_person)) {\n\t\t\t\t\t\t$getContactData = array('fkcustomer_id' \t\t=> $lastID,\n\t\t\t\t\t\t\t\t\t\t\t\t \t 'contact_name' \t\t\t=> $contact_person,\n\t\t\t\t\t\t\t\t\t\t\t\t \t 'designation' \t\t\t=> $designation,\n\t\t\t\t\t\t\t\t\t\t\t\t \t 'contact_office_number' => $contact_office,\n\t\t\t\t\t\t\t\t\t\t\t\t \t 'contact_mobile_number' => $contact_mobile,\n\t\t\t\t\t\t\t\t\t\t\t\t \t 'contact_email' \t\t=> $contact_email,\n\t\t\t\t\t\t\t\t\t\t\t\t \t 'default_key_contact' => $default_person,\n\t\t\t\t\t\t\t\t\t\t\t\t \t 'contact_type' => 1);\n\t\t\t\t\t\t\t$insertContact = $this->remoteDb->insert('customer_contact_person',$getContactData);\n\t\t\t\t\t } \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $lastID;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "b59aee67d445c90f64dca0293e9e5176", "score": "0.6481959", "text": "function add_Account_customer($params)\n {\n $this->db->insert('act_customer',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "72aa766598b7410c47f8cb50a352abfd", "score": "0.64433706", "text": "public function insert_customer($data)\n\t{\n\t\t$this->db->insert('customers', $data);\n\t\t$id = $this->db->insert_id();\n\t\treturn (isset($id)) ? $id : FALSE;\t\t\n\t}", "title": "" }, { "docid": "605c65f97fc5f061b5f2caba7357591b", "score": "0.6425348", "text": "function add_customer_api($new_member_insert_data)\n {\n\t\t$this->db->where('email', $new_member_insert_data['email']);\n\t\t$query = $this->db->get('customers');\n\n if($query->num_rows > 0){\n \treturn false;\n\t\t}else{\n\n\t\t\t$insert = $this->db->insert('customers', $new_member_insert_data);\n\t\t return $this->db->insert_id();\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "6abd31cf07fe4af8f876603e0754963a", "score": "0.63988084", "text": "function dbInsertNewCustomer($row,$replace = false)\n{\n // TODO - massage some of the fields to convert from php to sql (like dates)\n\n $row[\"MetDate\"] = dbDatePHP2SQL($row[\"MetDate\"]);\n return(dbGenericInsert($row,\"customers\",\"CID\",$replace));\n}", "title": "" }, { "docid": "aa1fb5b263994cadfe993b34fb4aeb1c", "score": "0.63751566", "text": "function addCustomer() {\n\t\t$dbh = PDOManager::getPDO();\n\t\t$sth = $dbh->prepare(\"INSERT INTO events_customers (event_id, customer_id) VALUES(:event_id, :customer_id)\");\n\t\t$sth->execute(array(':event_id' => $_POST['event_id'], ':customer_id' => $_POST['customer_id']));\n\t\t\n\t\treturn generate_response(STATUS_SUCCESS, \"Customer successfully added to event\");\n\t}", "title": "" }, { "docid": "5bebc8f056dba2fcc5226895c4974066", "score": "0.6331982", "text": "public function insert()\n\t{\n\t\t$billArray = array();\n\t\t$getData = array();\n\t\t$keyName = array();\n\t\t$funcName = array();\n\t\t$billArray = func_get_arg(0);\n\t\t$requestInput = func_get_arg(1);\n\t\t\n\t\t//only data insertion\n\t\tif(is_object($billArray))\n\t\t{\n\t\t\t$productArray = $billArray->getProductArray();\n\t\t\t$paymentMode = $billArray->getPaymentMode();\n\t\t\t$invoiceNumber = $billArray->getInvoiceNumber();\n\t\t\t$jobCardNumber = $billArray->getJobCardNumber();\n\t\t\t$bankName = $billArray->getBankName();\n\t\t\t$checkNumber = $billArray->getCheckNumber();\n\t\t\t$total = $billArray->getTotal();\n\t\t\t$totalDiscounttype = $billArray->getTotalDiscounttype();\n\t\t\t$totalDiscount = $billArray->getTotalDiscount();\n\t\t\t$extraCharge = $billArray->getExtraCharge();\n\t\t\t$tax = $billArray->getTax();\n\t\t\t$grandTotal = $billArray->getGrandTotal();\n\t\t\t$advance = $billArray->getAdvance();\n\t\t\t$balance = $billArray->getBalance();\n\t\t\t$remark = $billArray->getRemark();\n\t\t\t$entryDate = $billArray->getEntryDate();\n\t\t\t$companyId = $billArray->getCompanyId();\n\t\t\t$ClientId = $billArray->getClientId();\n\t\t\t$salesType = $billArray->getSalesType();\n\t\t\t$poNumber = $billArray->getPoNumber();\n\t\t\t$userId = $billArray->getUserId();\n\t\t\t$jfId= $billArray->getJfId();\n\t\t\t$expense= $billArray->getExpense();\n\t\t\t$serviceDate= $billArray->getServiceDate();\n\t\t\t//data pass to the model object for insert\n\t\t\t$billModel = new BillModel();\n\t\t\t$status = $billModel->insertData($productArray,$paymentMode,$invoiceNumber,$jobCardNumber,$bankName,$checkNumber,$total,$extraCharge,$tax,$grandTotal,$advance,$balance,$remark,$entryDate,$companyId,$ClientId,$salesType,$jfId,$totalDiscounttype,$totalDiscount,$poNumber,$requestInput,$expense,$serviceDate,$userId);\n\t\t\t//get exception message\n\t\t\t$exception = new ExceptionMessage();\n\t\t\t$exceptionArray = $exception->messageArrays();\n\t\t\tif(strcmp($status,$exceptionArray['500'])==0)\n\t\t\t{\n\t\t\t\treturn $status;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$encoded = new EncodeData();\n\t\t\t\t$encodeData = $encoded->getEncodedData($status);\n\t\t\t\treturn $encodeData;\n\t\t\t}\n\t\t}\n\t\t//data with image insertion\n\t\telse\n\t\t{\n\t\t\t$documentArray = array();\n\t\t\t$productArray = $billArray[count($billArray)-1]->getProductArray();\n\t\t\t$paymentMode = $billArray[count($billArray)-1]->getPaymentMode();\n\t\t\t$invoiceNumber = $billArray[count($billArray)-1]->getInvoiceNumber();\n\t\t\t$jobCardNumber = $billArray[count($billArray)-1]->getJobCardNumber();\n\t\t\t$bankName = $billArray[count($billArray)-1]->getBankName();\n\t\t\t$checkNumber = $billArray[count($billArray)-1]->getCheckNumber();\n\t\t\t$total = $billArray[count($billArray)-1]->getTotal();\n\t\t\t$totalDiscounttype = $billArray[count($billArray)-1]->getTotalDiscounttype();\n\t\t\t$totalDiscount = $billArray[count($billArray)-1]->getTotalDiscount();\n\t\t\t$extraCharge = $billArray[count($billArray)-1]->getExtraCharge();\n\t\t\t$tax = $billArray[count($billArray)-1]->getTax();\n\t\t\t$grandTotal = $billArray[count($billArray)-1]->getGrandTotal();\n\t\t\t$advance = $billArray[count($billArray)-1]->getAdvance();\n\t\t\t$balance = $billArray[count($billArray)-1]->getBalance();\n\t\t\t$remark = $billArray[count($billArray)-1]->getRemark();\n\t\t\t$entryDate = $billArray[count($billArray)-1]->getEntryDate();\n\t\t\t$companyId = $billArray[count($billArray)-1]->getCompanyId();\n\t\t\t$ClientId = $billArray[count($billArray)-1]->getClientId();\n\t\t\t$salesType = $billArray[count($billArray)-1]->getSalesType();\n\t\t\t$poNumber = $billArray[count($billArray)-1]->getPoNumber();\n\t\t\t$userId = $billArray[count($billArray)-1]->getUserId();\n\t\t\t$jfId = $billArray[count($billArray)-1]->getJfId();\n\t\t\t$expense = $billArray[count($billArray)-1]->getExpense();\n\t\t\t$serviceDate = $billArray[count($billArray)-1]->getServiceDate();\n\n\t\t\tfor($doc=0;$doc<(count($billArray)-1);$doc++)\n\t\t\t{\n\t\t\t\tarray_push($documentArray,$billArray[$doc]);\t\n\t\t\t}\n\t\t\t\n\t\t\t//data pass to the model object for insert\n\t\t\t$billModel = new BillModel();\n\t\t\t$status = $billModel->insertAllData($productArray,$paymentMode,$invoiceNumber,$jobCardNumber,$bankName,$checkNumber,$total,$extraCharge,$tax,$grandTotal,$advance,$balance,$remark,$entryDate,$companyId,$ClientId,$salesType,$documentArray,$jfId,$totalDiscounttype,$totalDiscount,$poNumber,$requestInput,$expense,$serviceDate,$userId);\n\t\t\t//get exception message\n\t\t\t$exception = new ExceptionMessage();\n\t\t\t$exceptionArray = $exception->messageArrays();\n\t\t\tif(strcmp($status,$exceptionArray['500'])==0)\n\t\t\t{\n\t\t\t\treturn $status;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$encoded = new EncodeData();\n\t\t\t\t$encodeData = $encoded->getEncodedData($status);\n\t\t\t\treturn $encodeData;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6d75116d2ef262f6b32edc99960a5509", "score": "0.63279074", "text": "function createCustomer(){\n\t\t\t//requires the following fields\n\t\t\t$this->requiredFieldsCheck(array(\"customer_name\"));\n\t\t\t\n\t\t\t//prevent blank customer name\n\t\t\t$this->preventBlankFields(array(\"customer_name\"));\n\t\t\t\n\t\t\t//Create the new customer insert query\n\t\t\t$stmt = $this->database->prepare(\"INSERT INTO customers (`customer_name`, `customer_contact_email`, `customer_contact_number_mobile`, `customer_contact_number_landline`) VALUES (:customer_name, :customer_contact_email, :customer_contact_number_mobile, :customer_contact_number_landline)\");\n\t\t\t\n\t\t\t//Run the query, binding parameters to it\n\t\t\tif(\n\t\t\t\t!$stmt->execute(array(\n\t\t\t\t\t\t\":customer_name\" => $_POST['customer_name'],\t\t\t\n\t\t\t\t\t\t\":customer_contact_email\" => \"None.\",\n\t\t\t\t\t\t\":customer_contact_number_mobile\" => \"None.\",\n\t\t\t\t\t\t\":customer_contact_number_landline\" => \"None.\"\n\t\t\t\t\t))\n\t\t\t)return array( 400, \"Error inserting customer to database\");\n\t\t\t\n\t\t\t//Get the new customer ID\n\t\t\t$customerID = $this->database->lastInsertID();\n\t\t\t\n\t\t\t//Queue a push notification\n\t\t\t$this->pushNotification(array(\n\t\t\t\t\t\"method\" => \"createCustomer\",\n\t\t\t\t\t\"customer_id\" => $customerID,\n\t\t\t\t\t\"customer_name\" => $_POST['customer_name'],\n\t\t\t\t\t\"customer_contact_email\" => \"Not available.\",\n\t\t\t\t\t\"customer_contact_number_mobile\" => \"Not available.\",\n\t\t\t\t\t\"customer_contact_number_landline\" => \"Not available.\"\n\t\t\t\t));\n\t\t\t\n\t\t\t//Give the user the ID of the new customer\n\t\t\treturn array( 200, $customerID );\n\t\t}", "title": "" }, { "docid": "695f1eaf049760274e6afec7db921112", "score": "0.63168854", "text": "public function insert(){\n $this->db->select_max('id_customer');\n $query = $this->db->get('customer');\n $val=$query->result();\n $datadb = substr($val[0]->id_customer,0,6);\n\t\t$tgl = date('ymd');\n if($datadb == $tgl){\n $q3 = (int) substr($val[0]->id_customer,6,4);\n $q3++;\n }else{\n $q3 = '1';\n }\n\t\t$id_customer = $tgl. sprintf(\"%04s\",$q3);\n\n\t\t$this->db->set('id_customer', $id_customer);\n\t\t$this->db->set('nama_customer', $this->input->post('nama_customer'));\n\t\t$this->db->set('no_telp', $this->input->post('no_telp'));\n\t\t$this->db->set('kota', $this->input->post('kota'));\n\t\t$this->db->set('alamat', $this->input->post('alamat'));\n\t\t$this->db->insert('customer');\n\t}", "title": "" }, { "docid": "50ec7457ff550df4598fe76b8ed69795", "score": "0.6280337", "text": "protected function _postInsert() {\n\t}", "title": "" }, { "docid": "3076a670a662de5ecd2f7e9308d4d4bc", "score": "0.6251404", "text": "private function insert() {\r\n\t\t\t// insert entry\r\n\t\t\t$this->db->dash->setOptions(array(\r\n\t\t\t\t'user_id' => $this->identity->id,\r\n\t\t\t\t'data' => $this->view->render('autopost/txt.phtml'),\r\n\t\t\t\t'serialized' => serialize(array(\r\n\t\t\t\t\t'args' => $this->args,\r\n\t\t\t\t)),\r\n\t\t\t\t'identity' => \"{$this->args[0]}|{$this->args[2]}|{$this->args[3]}\",\r\n\t\t\t\t'scope' => 'po_dashboard',\r\n\t\t\t\t'entity_id' => new \\Zend_Db_Expr('NULL')\r\n\t\t\t))->save();\r\n\r\n\t\t\t// save owner as subscriber\r\n\t\t\t$this->db->subscriptions->setOptions(array(\r\n\t\t\t\t'user_id' => $this->identity->id,\r\n\t\t\t\t'scope' => 'po_dashboard',\r\n\t\t\t\t'entity_id' => $this->db->dash->getId()\r\n\t\t\t))->save();\r\n\t\t}", "title": "" }, { "docid": "94b3d3f1bcfe8c6983e5ee0838873d68", "score": "0.62475085", "text": "function insert()\n\t{\n\t\t$query = \"INSERT INTO products (name, category, price, tax, quantity) VALUES (?,?,?,?,?);\";\n\t\t$values = array(\n\t\t\t$this->name,\n\t\t\t$this->category,\n\t\t\t$this->price,\n\t\t\t$this->tax,\n\t\t\t$this->quantity\n\t\t);\n\t\t$types = array('s','s','i','i','i');\n\t\ttry\n\t\t{\t\n\t\t\t$db = new DBPdo();\n\t\t\t$results = $db->setData($query, $values, $types);\n\t\t\t$this->SKU = $results[\"InsertId\"];\n\t\t}\n\t\tcatch(DLException $dle)\n\t\t{\n\t\t\tthrow $dle;\n\t\t}\n\t}", "title": "" }, { "docid": "b34b250a05c3fcd5e090f6ac255c8fe0", "score": "0.62450343", "text": "private function _form_insert() {\n\t\t$flashdata = $this->flashdata;\n\t\t$data = array(\n\t\t\tarray('open' => array('uri' => $this->properties['uri'], 'name' => $this->properties['name'].'_form_insert')),\n\t\t\tarray('hidden' => array('name' => 'crud_action', 'value' => 'insert_action')));\n\t\tforeach ($this->insert as $row) {\n\t\t\t$row['value'] = $flashdata['inputs'][$row['name']];\n \t\t// if password then value is NULLed\n\t\t\tif ($row['type']=='password') {\n\t\t\t\tunset($row['value']);\n\t\t\t}\n\t\t\t$data[] = array(\n\t\t\t\t$row['type'] => $row\n\t\t\t);\n\t\t\tif ($row['confirm']) {\n\t\t\t\t$row['name'] = $row['name'].'_confirm';\n\t\t\t\t$row['label'] = $row['confirm_label'];\n\t\t\t\tunset($row['value']);\n\t\t\t\t$data[] = array($row['type'] => $row);\n\t\t\t}\n\t\t}\n\t\t$data[] = array('submit' => array('name' => 'crud_submit_insert', 'class' => 'crud_button', 'value' => t('Add')));\n \n $returns = $this->_get_form('insert', $data);\n\t\treturn $returns;\n\t}", "title": "" }, { "docid": "93c2ca5034a0d9401487d1cde87f8781", "score": "0.62369347", "text": "public function insert_type(){\n\t\t$CI =& get_instance();\n\t\t$this->auth->check_admin_auth();\n\t\t$CI->load->model('Products');\n\t\t$CI->load->library('lproduct');\t\n\t\t$type_id=$this->auth->generator(15);\n\n\t \t//Customer basic information adding.\n\t\t$data=array(\n\t\t\t'type_id' \t\t\t=> $type_id,\n\t\t\t'type_name' \t\t=> $this->input->post('type_name',true),\n\t\t\t'status' \t\t\t\t=> 1\n\t\t\t);\n\n\t\t$result=$this->Products->type_entry($data);\n\t\tif ($result == TRUE) {\n\t\t\t//Previous balance adding -> Sending to customer model to adjust the data.\t\t\t\n\t\t\t$this->session->set_userdata(array('message'=>display('successfully_added')));\n\t\t\tif(isset($_POST['add-customer'])){\n\t\t\t\tredirect(base_url('Cproduct/typeindex'));\n\t\t\t\texit;\n\t\t\t}elseif(isset($_POST['add-customer-another'])){\n\t\t\t\tredirect(base_url('Cproduct/typeindex'));\n\t\t\t\texit;\n\t\t\t}\n\t\t}else{\n\t\t\t$this->session->set_userdata(array('error_message'=>display('already_inserted')));\n\t\t\tredirect(base_url('Cproduct/typeindex'));\n\t\t}\n\t}", "title": "" }, { "docid": "64ce97df614abc35dd5b92d4bc94a15a", "score": "0.62040305", "text": "function insert() {\n\t\t$insert = \"INSERT INTO clientes(direccion,comuna,ciudad,telefono,celular,email,banco,rut,fecha_creacion,fecha_modificacion) VALUES(\n\t\t\t\t\n\t\t\t\t'\".$this->direccion.\"',\n\t\t\t\t'\".$this->comuna.\"',\n \t\t'\".$this->ciudad.\"',\n\t\t\t\t'\".$this->telefono.\"',\n\t\t\t\t'\".$this->celular.\"',\n\t\t\t\t'\".$this->email.\"',\n\t\t\t\t'\".$this->banco.\"',\n\t\t\t\t'\".$this->rut.\"',\n\t\t\t\t'\".$this->fecha_creacion.\"',\n\t\t\t\t'\".$this->fecha_modificacion.\"');\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n return $insert;\n\t\n\t}", "title": "" }, { "docid": "a4f7380c757e32e249a4798d93aebedc", "score": "0.6197289", "text": "public function insert()\n {\n }", "title": "" }, { "docid": "a4f7380c757e32e249a4798d93aebedc", "score": "0.6197289", "text": "public function insert()\n {\n }", "title": "" }, { "docid": "a4f7380c757e32e249a4798d93aebedc", "score": "0.6197289", "text": "public function insert()\n {\n }", "title": "" }, { "docid": "a4f7380c757e32e249a4798d93aebedc", "score": "0.6197289", "text": "public function insert()\n {\n }", "title": "" }, { "docid": "d4cc60785f5a192164b6914003e301e5", "score": "0.6177425", "text": "public function insertAction()\n\t{\n\t\t$module = $this->_useModules ? \"{$this->_moduleName}/\" : '';\n\t\t$data = $this->_getDataFromPost();\n\n $id = Fgsl_Session_Namespace::get('post')->pro_id;\n $action = empty($id) ? 'insert' : 'edit';\n\n\t\t$options = array(\n\t\tFgsl_Form_Edit::DATA => $data,\n\t\tFgsl_Form_Edit::ACTION => BASE_URL.\"/$module{$this->_controllerAction}/save\",\n\t\tFgsl_Form_Edit::MODEL => $this->_model\n\t\t);\n\n\t\t$this->view->assign('form2', new Fgsl_Form_Edit($options));\n\t\t$this->view->assign('action', $action);\n\t\t$this->_response->setBody($this->view->render($this->_controllerAction.'/insert.phtml'));\n\t}", "title": "" }, { "docid": "f5274953cb7e53580ec828dd0002b792", "score": "0.61715347", "text": "public function insertRecord() {\n }", "title": "" }, { "docid": "6ecf4ad199693a4e6bdea06a2d1c8fcd", "score": "0.61711496", "text": "public function insert_data()\n\t{\n\t\t$client_data['client_type'] = $this->input->post('client_type');\n\t\t$client_data['client_type_name'] = $this->input->post('client_type_name');\n\n\t\t$client_id = $this->general_model->insert(CLIENT_TYPE,$client_data);\n\n\t\t$msg = $this->lang->line('common_add_success_msg');\n\t\t$this->session->set_flashdata('message_session', $msg);\n\n\t\t$searchsort_session = $this->session->userdata('client_sortsearchpage_data');\n\t\t$pagingid = $searchsort_session['uri_segment'];\n\t\t//redirect($this->type.'/'.$this->viewname.'/'.$pagingid);\n\t\tredirect($this->type.'/'.$this->viewname.'/index/'.$pagingid);\n\t}", "title": "" }, { "docid": "66ad92b68847807ec4cf6e7c1b03cf7f", "score": "0.61534655", "text": "public function add_customer()\n\t{\n\n\t\t$this->form_validation->set_rules(\"name\",\"Customer Name\",\"required|trim\");\n\t\t$this->form_validation->set_rules(\"email\",\"Email Address\",\"required|trim|callback_unique_email\");\n\t\t$this->form_validation->set_rules(\"mobile_number\",\"Mobile Number\",\"required|trim|callback_unique_mobile_number\");\n\t\t$this->form_validation->set_rules(\"password\",\"Password\",\"required|trim\");\n\t\t$this->form_validation->set_rules(\"confirm_password\",\"Confirm Password\",\"required|trim|matches[password]\");\n\n\t\tif($this->form_validation->run())\n\t\t{\n\t\t\t$values = $this->input->post();\n\t\t\t\n\t\t\t$values['user_type'] = 'customer';\n\t\t\t$this->db->insert(\"customer_partner\",$values);\n\n\t\t\t$this->session->set_flashdata(\"insert_success\",\"Customer Successfully Added\");\n\n\t\t\tredirect(base_url().\"Customer/list_customer\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn validation_errors();\n\t\t}\n\t}", "title": "" }, { "docid": "e456851eb6eb93fba6ecef0a02ca095c", "score": "0.61470616", "text": "function actioncustomerInQueryLog()\n\t{\n\t\t\t$customerObj = new Customers();\n\t\t\t$result = $customerObj->getCustomersforQueryLog();\n\t\t\t\n\t\t\tforeach($result as $data )\n\t\t\t{\n\n\t\t\t\t$querylogObj = new TblQuerylog();\n\t\t\t\t$lastLogId = $querylogObj->getLastLogId();\n\t\t\t\t\n\t\t\t\t$query['table_log_id'] =$data['customer_id'];\n\t\t\t\t$query['table_name'] = 'customers';\n\t\t\t\t$query['log_id'] = $lastLogId + 1 ;\n\n\t\t\t\t$query['query'] = \"INSERT OR REPLACE INTO customers ('customer_id', 'admin_id', 'customer_name', 'cust_address', 'cust_email', 'contact_no', 'credit', 'total_purchase', 'createdAt', 'modifiedAt', 'status') VALUES (\".$query['table_log_id'].\", '\".$data['admin_id'].\"', '\".$data['customer_name'].\"', '\".$data['cust_address'].\"', '\".$data['cust_email'].\"', '\".$data['contact_no'].\"', '\".$data['credit'].\"', '\".$data['total_purchase'].\"', '\".$data['createdAt'].\"', NULL, '\".$data['status'].\"'); \" ;\n\t\t\t\t\n\t\t\t\t$querylogObj = new TblQuerylog();\n\t\t\t\t$querylogObj->setData($query);\n $insertedId = $querylogObj->insertData();\n\t\t\t}\n\t\t\t\t\n/*--------------------------------End Query Log Function----------------------------------------------*/\t\n\t}", "title": "" }, { "docid": "d935fb34d1be062765cdd17063ec4bd6", "score": "0.61469287", "text": "public function createCustomer($firstName, $lastName, $email, $password) {\n\n try {\n\n\n //Saving input into variables coming from the business layer & hashing PW\n\n $db = new dbCon();\n $firstName = trim(htmlspecialchars($firstName));\n $lastName = trim(htmlspecialchars($lastName));\n $email = trim(htmlspecialchars($email));\n $pass = trim(htmlspecialchars($password));\n $iterations = ['cost' => 15];\n $hashed_password = password_hash($pass, PASSWORD_BCRYPT, $iterations);\n\n // Data insertion with prepared statements (security) We are only creating an ID for the address table, thus the user can add the rest later.\n\n $query = $db->dbCon->prepare(\"INSERT INTO `address` (street, postalCode, country) VALUES \n (:street, :postalCode, :country)\");\n $query->bindParam(':street', $f);\n $query->bindParam(':postalCode', $g);\n $query->bindParam(':country', $h);\n $query->execute();\n\n $found_address = $db->dbCon->lastInsertId();\n $int = (int)$found_address;\n var_dump($int);\n\n // Data insertion for the customer table\n\n $sql = $db->dbCon->prepare( \"INSERT INTO `customer` (firstName, lastName, email, password, addressID) VALUES \n (:firstName, :lastName, :email, :password, :addressID)\");\n $sql->bindParam(':firstName', $firstName);\n $sql->bindParam(':lastName', $lastName);\n $sql->bindParam(':email', $email);\n $sql->bindParam(':password', $hashed_password);\n $sql->bindParam(':addressID', $int);\n $sql->execute();\n\n $db->DBClose();\n\n }\n catch (\\PDOException $ex){\n print($ex->getMessage());\n var_dump($ex);\n }\n\n\n }", "title": "" }, { "docid": "a27deff6f542b387fa0a7fcce3ec9cd5", "score": "0.61377084", "text": "public function insert()\n {\n \n }", "title": "" }, { "docid": "f4420af456719734dc64c5f82921fa3f", "score": "0.61150247", "text": "private function insert(){\n\n\t$list = array(\"tb_editora_id\"=>$this->tbEditoraId, \"tb_editora_nome\"=>$this->tbEditoraNome, \"tb_editora_anofundacao\"=>$this->tbEditoraAnofundacao, \"tb_editora_fundador\"=>$this->tbEditoraFundador, \"tb_editora_pais\"=>$this->tbEditoraPais);\n\treturn $this->dao->insertRecord($list);\t\n\t\n}", "title": "" }, { "docid": "17c5db75e3a5e20d5d0ce012f33733e7", "score": "0.6113218", "text": "public function insert(){\n\n }", "title": "" }, { "docid": "9cd3f2441917846ea0751b287b6f6e09", "score": "0.6077804", "text": "function insert() {\n\t\t$db =& ConnectionManager::getDataSource('default');\n\t\t$table = Inflector::pluralize(Inflector::underscore($this->name));\n\n\t\tif (isset($this->records) && !empty($this->records)) {\n\t\t\tforeach ($this->records as $record) {\n\t\t\t\t$record['created'] = date('Y-m-d H:i:s');\n\t\t\t\t$record['modified'] = date('Y-m-d H:i:s');\n\t\t\t\t$fields = array_keys($record);\n\t\t\t\t$values[] = '(' . implode(', ', array_map(array(&$db, 'value'), array_values($record))) . ')';\n\t\t\t}\n\t\t\treturn $db->insertMulti($table, $fields, $values);\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6748a2a7eba444facfb135c750e1e3a3", "score": "0.6069597", "text": "public function saveCustomer(){\n\t\tif($this->rest->_getRequestMethod() != 'POST'){\n\t\t\t$this->_notAuthorized();\n\t\t}\n\t\t$response = array('status' => 'Success');\n\t\t$customer = json_decode(file_get_contents('php://input'),true);\n\t\t#verdadero crea falso actualiza\n\t\tif(!$customer['update']){\n\t\t\t$status = $this->_validData($customer);\n\t\t\t#comprobamos que no exista\n\t\t\t$this->db->where('id_cliente',$customer['id_cliente']);\n\t\t\t$this->Result_ = $this->db->get($this->Table_);\n\t\t\tif($this->Result_->num_rows() > 0){\n\t\t\t\t$response['msg'] = '1000';\n\t\t\t\t$response['data'] = $this->Result_->resul_array();\n\t\t\t}else{\n\t\t\t\t$this->db->insert($this->Table_,$customer);\n\t\t\t\t$response['msg'] = '3000';\n\t\t\t\t$response['data'] = $this->db->insert_id();\n\t\t\t}\n\n\t\t}else{\n\t\t\tunset($customer['creado']);\n\t\t\t$status = $this->_validData($customer);\n\t\t\tif($status == 1){\n\t\t\t\t$this->db->where('id_cliente',$customer['id_cliente']);\n\t\t\t\t$this->db->update($this->Table_,$customer);\n\t\t\t\t$response['msg'] = '3001';\n\t\t\t\t$response['data'] = $customer;\n\t\t\t}else{\n\t\t\t\t$response['msg'] = $status;\n\t\t\t}\n\t\t}\n\n\t\t#enviamos la respuesta al cliente\n\t\t$this->rest->_responseHttp($response,$this->CodeHttp_);\n\t}", "title": "" }, { "docid": "4a94d2957f03e56f910d4bd697f6fff4", "score": "0.60637844", "text": "public function insert() {\r\n // logica para salvar cliente no banco\r\n }", "title": "" }, { "docid": "a0a5b9ef9bd522a63ca54a27a6cf35e1", "score": "0.60559314", "text": "abstract protected function insert();", "title": "" }, { "docid": "cf51585a16f16328b922860c69fcd708", "score": "0.6055088", "text": "protected abstract function insert();", "title": "" }, { "docid": "7ddb751841ae950f7d0d5750c4a5d9dd", "score": "0.605261", "text": "public function insertCustomer($user){\n \n \n $query = new Customer;\n $query->user = $user;\n $query->balance = 0;\n $query->status = 'Offline';\n \n return $query->insert();\n }", "title": "" }, { "docid": "0fe70daeb31205ef980b03f34b0dd3f9", "score": "0.604436", "text": "public function mode_insert (){\n\n if( !$this->record_exists() ) {\n if( $this->validation() ){\n $this->kernel->templ->assign(\"result_message\", \"record_inserted\" );\n $this->insert();\n } else {\n $this->kernel->templ->assign(\"result_message\", \"data_manager_validation_error\");\n $this->kernel->params_html = array_merge( $this->kernel->html_special_chars($this->row), $this->kernel->params_html );\n $this->kernel->templ->assign(\"params\", $this->kernel->params_html);\n $this->set_mode(MODE_LIST);\n return;\n }\n } // end if record does not exists\n\n $this->set_mode(MODE_LIST);\n $this->mode_list();\n\n }", "title": "" }, { "docid": "9f4ea5cee201590829d569e0c6eb692f", "score": "0.6042788", "text": "public function insert() {\n $this->observer->idreceiver = $this->connection->insert(\"sus_receiver\", array(\n \"name\" => \"'\" . $this->observer->name . \"'\",\n \"address\" => \"'\" . $this->observer->address . \"'\",\n \"idcity\" => $this->observer->city->idcity,\n \"phone\" => \"'\" . $this->observer->phone . \"'\",\n \"idcustomer\" => $this->observer->customer->idcustomer), $this->user->iduser);\n }", "title": "" }, { "docid": "22c13469c7d01d2d8c66eb93dd8ade68", "score": "0.6042373", "text": "function dbReplaceCustomer($row)\n{\n return(dbInsertNewCustomer($row,true));\n}", "title": "" }, { "docid": "4e1b8f9635ceb0362cf89e4c60d3ec80", "score": "0.60365146", "text": "public function addCustomerInfo( $firstname, $lastname, $streetname, $city, $province, $postal_code, $email_id, $phone_no, $delivery_date, $order_id, $dbcon)\n {\n //$order_id = uniqid(); //order id \n $sql = \"INSERT INTO checkout_delivery_info (firstname, lastname, streetname, city, province, postal_code, email_id, phone_no, delivery_date, order_id )\n VALUES( :firstname, :lastname, :streetname, :city, :province, :postal_code, :email_id, :phone_no, :delivery_date, :order_id)\"; \n \n $pst = $dbcon->prepare($sql); //prepare statement \n \n // to bind all parameter\n \n $pst->bindParam(':firstname', $firstname);\n $pst->bindParam(':lastname', $lastname);\n $pst->bindParam(':streetname', $streetname);\n $pst->bindParam(':city', $city);\n $pst->bindParam(':province', $province);\n $pst->bindParam(':postal_code', $postal_code);\n $pst->bindParam(':email_id', $email_id);\n $pst->bindParam(':phone_no', $phone_no);\n $pst->bindParam(':delivery_date', $delivery_date);\n $pst->bindParam(':order_id', $order_id);\n \n \n $count = $pst->execute();//execute prepare statement\n \n return $count; //return 1 get answer if 0 there is error\n \n }", "title": "" }, { "docid": "2247ec5d2bdac57e8473ef9866dbb231", "score": "0.6018348", "text": "function customer_add($CustName,$cust_ref,$address,$tax_id,$curr_code,$dimension_id,$dimension2_id,$credit_status,$payment_terms,$discount,$pymt_discount,$credit_limit,$sales_type,$notes,$name,$name2,$phone,$phone2,$fax,$email,$salesman){\n\tadd_customer(\n\t\t$CustName,\n\t\t$cust_ref,\n\t\t$address,\n\t\t$tax_id,\n\t\t$curr_code,\n\t\t$dimension_id,\n\t\t$dimension2_id,\n\t\t$credit_status,\n\t\t$payment_terms,\n\t\t$discount,\n\t\t$pymt_discount,\n\t\t$credit_limit,\n\t\t$sales_type,\n\t\t$notes\n\t);\n\n\t$customer_id = db_insert_id();\n\n\t/*\n\t$customer_id, $br_name, $br_ref, $br_address, $salesman, $area,\n\t$tax_group_id, $sales_account, $sales_discount_account, $receivables_account,\n\t$payment_discount_account, $default_location, $br_post_address, $disable_trans, $group_no,\n\t$default_ship_via, $notes\n\t*/\n\t// defaults\n\t$sales_account = '';\n\t$default_sales_discount_act = get_company_pref('default_sales_discount_act');\n\t$debtors_act = get_company_pref('debtors_act');\n\t$default_prompt_payment_act = get_company_pref('default_prompt_payment_act');\n\n\t// For default branch\n\t$salesman = (!empty($salesman) ? $salesman : get_default_salesman());\n\t$area = (!empty($area) ? $area : get_default_area());\n\t$tax_group_id = (!empty($tax_group_id) ? $tax_group_id : '1');\n\t$location = (!empty($location) ? $location : 'DEF');\n\t$ship_via = (!empty($ship_via) ? $ship_via : '1');\n\t$phone = (isset($phone) ? $phone : '');\n\t$phone2 = (isset($phone2) ? $phone2 : '');\n\t$fax = (isset($fax) ? $fax : '');\n\t$email = (isset($email) ? $email : '');\n\t$sales_account = '1';\n\t$disable_trans = 0;\n\t$group_no = 1;\n\n\tadd_branch(\n\t\t$customer_id,\n\t\t$CustName,\n\t\t$cust_ref,\n\t\t$address,\n\t\t$salesman,\n\t\t$area,\n\t\t$tax_group_id,\n\t\t$sales_account,\n\t\t$default_sales_discount_act,\n\t\t$debtors_act,\n\t\t$default_prompt_payment_act,\n\t\t$location,\n\t\t$address,\n\t\t$disable_trans,\n\t\t$group_no,\n\t\t$ship_via,\n\t\t$notes\n\t);\n\n\t$selected_branch = db_insert_id();\n\n\t/*\n\t$ref, $name, $name2, $address, $phone, $phone2, $fax, $email, $lang, $notes\n\t*/\n\tadd_crm_person(\n\t\t$cust_ref,\n\t\t$name,\n\t\t$name2,\n\t\t$address,\n\t\t$phone,\n\t\t$phone2,\n\t\t$fax,\n\t\t$email,\n\t\t'',\n\t\t''\n\t);\n\n\t$pers_id = db_insert_id();\n\n\t/*\n\t$type, $action, $entity_id, $person_id\n\t*/\n\tadd_crm_contact(\n\t\t'cust_branch',\n\t\t'general',\n\t\t$selected_branch,\n\t\t$pers_id\n\t);\n\n\tadd_crm_contact(\n\t\t'customer',\n\t\t'general',\n\t\t$customer_id,\n\t\t$pers_id\n\t);\n}", "title": "" }, { "docid": "25ee22c7ea24324ac0216f02066f0f7c", "score": "0.60170496", "text": "protected function _insert()\n {\n $sql = \"INSERT INTO pf_internship (`from`, `to`, rating, student_id, tutor, company_id, tutor_company_id, state_id,contractId,schoolclass_id)\n VALUES (:from, :to, :rating, :student_id, :tutor, :company_id, :tutor_company_id, :state_id, :contractId,:schoolclass_id)\";\n $query = Database::getDB()->prepare($sql);\n $ret = $query->execute($this->toArray(false));\n\n // setze die ID auf den von der DB generierten Wert\n $this->id = Database::getDB()->lastInsertId();\n return $ret;\n }", "title": "" }, { "docid": "8bf0927539ce8588962782085ccfff9f", "score": "0.6012001", "text": "private function _insert()\n {\n\t$this->sql = \"INSERT INTO \";\n }", "title": "" }, { "docid": "47dc616584687d73d20c9f8ba3f53a8d", "score": "0.60058016", "text": "function addCustomer() {\nrequire(\"/home/course/cda540/u05/public_html/project/dbguest.php\");\n\n//It will import all variables such as $host , $user, $pass and $db\n\n//mysqli_connect() is to connect the database\n$link = mysqli_connect($host, $user, $pass, $db);\n\n//Check the connection. Give error message if any error\nif (!$link) die(\"Couldn't connect to MySQL\");\n\n\n//mysqli_select_db() is used to select the database\nmysqli_select_db($link, $db)\n or die(\"Couldn't open $db: \".mysqli_error($link));\n\n//mysqli_query will execute the query and stores into $result\n\n$result_fname=$_POST['firstName'];\n$result_lname=$_POST['lastName'];\n$result_phoneNumber=$_POST['phoneNumber'];\n$result_address =$_POST['address'];\n$check = $_POST['yesNo'];\n\n$result_check = mysqli_query($link, \"select * from CUSTOMER where fname='$_POST[firstName]' and lname='$_POST[lastName]' \");\n\nif ($result_check->num_rows> 0)\n{\n\tif ($_POST['yes']=='yes')\n\t{\n\techo '<span style=\"color:#008000;text-align:center;\"> With Consent : Customer has been added....</span>';\n\t$result_customer = mysqli_query($link, \"INSERT INTO CUSTOMER (lname,fname,address,phoneNumber) VALUES('$result_lname','$result_fname','$result_address','$result_phoneNumber')\");\n\t}\n\telse\n\t{\n\techo '<span style=\"color:#FF0000;text-align:center;\">Without Consent : Please provide different firstname/lastname.... </span>';\n\t}\n}\n\nelse\n{\n$result_customer = mysqli_query($link, \"INSERT INTO CUSTOMER (lname,fname,address,phoneNumber) VALUES('$result_lname','$result_fname','$result_address','$result_phoneNumber')\");\necho '<span style=\"color:#008000;text-align:center;\">Success!!! Added a new customer...</span>';\n}\n\n//Close the connection\nmysqli_close($link);\n\n}", "title": "" }, { "docid": "48883e4fd7b3122c1022711ca0e9f5e7", "score": "0.59904283", "text": "public function insertCustomerAndAccount($fName, $lName, $dob, $phone, $email, $pass, $bal) {\n $customer = new CustomerModel();\n $customer->setFirstName($fName);\n $customer->setLastName($lName);\n $customer->setDob($dob);\n $customer->setPhone($phone);\n $customer->setEmail($email);\n $customer->setPassword($pass, $pass);\n $customer->save();\n\n $account = new AccountModel();\n $account->setBal($bal);\n $account->setDateCreated(date(\"d/m/y h:i:sa\"));\n $account->setCustomerId($customer->getId());\n $account->save();\n }", "title": "" }, { "docid": "afd2237122e5ca4224508ff55afe6618", "score": "0.59875906", "text": "public function newCustomer() {\n\n $customer = new Customer();\n\n if ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n\n $validation = new Validation();\n $validation->required_field('name', \"Name is required.\");\n $validation->required_field('phone', \"Phone is required.\");\n $validation->required_field('address', \"Address is required.\");\n\n //validate the data\n $errors = $validation->run($_POST);\n\n if (count($errors) == 0) {\n $customer->setName($_POST['name']);\n $customer->setPhone($_POST['phone']);\n $customer->setAddress($_POST['address']);\n\n $customer = $this->customer_model->save($customer);\n\n $this->showCustomers();\n\n } else {\n include(\"view/header.php\");\n include(\"view/customer_new.php\");\n include(\"view/footer.php\");\n }\n } else {\n include(\"view/header.php\");\n include(\"view/customer_new.php\");\n include(\"view/footer.php\");\n }\n }", "title": "" }, { "docid": "f86bf70ee4d5f7d25d7566a20c8c0060", "score": "0.5972937", "text": "function insert()\r\n\t{\r\n\t\t$this->revision_id = $this->_getNextRevision();\r\n\t\t$this->user = new User($this->db,$_SESSION['user_id']);\r\n\t\t$this->revision_datetime = date('Y-m-d H:i:s');\r\n\t\tparent::insert();\r\n\t}", "title": "" }, { "docid": "a664251780b60fa841e29573d0c8c8cc", "score": "0.597214", "text": "public function save(){\n global $connection;\n \n //to check if we need to use insert or update procedure\n if($this->customer_uuid==\"\"){\n $sqlQuery = \"CALL customers_insert(:firstName, :lastName, :address, :city, :province, \"\n . \":postalCode, :userName, :password);\";\n }else{\n $sqlQuery = \"CALL customers_update(:customer_uuid, :firstName, :lastName, :address, :city, :province, \"\n . \":postalCode, :userName, :password);\";\n }\n\n $PDOStatement = $connection->prepare($sqlQuery);\n if($this->customer_uuid != \"\"){\n $PDOStatement->bindParam(\":customer_uuid\", $this->customer_uuid);\n }\n $PDOStatement->bindParam(\":firstName\", $this->firstName);\n $PDOStatement->bindParam(\":lastName\", $this->lastName);\n $PDOStatement->bindParam(\":address\", $this->address);\n $PDOStatement->bindParam(\":city\", $this->city);\n $PDOStatement->bindParam(\":province\", $this->province);\n $PDOStatement->bindParam(\":postalCode\", $this->postalCode);\n $PDOStatement->bindParam(\":userName\", $this->userName);\n $PDOStatement->bindParam(\":password\", $this->password);\n\n $result = $PDOStatement->execute();\n \n //closing our statement\n $PDOStatement->closeCursor();\n $PDOStatement = null;\n return $result;\n }", "title": "" }, { "docid": "986f5194e7ead9d51a8f274ec3326ee9", "score": "0.59711635", "text": "public function create()\n {\n $data['page_title'] = 'Customer Add';\n $data['page_url'] = 'customer';\n $data['page_route'] = 'customer';\n $data['sourceList'] = $this->commonRepository->all($this->parentModel, 'name', 'asc');\n $data['campaignList'] = $this->commonRepository->all($this->campaign, 'campaign_name', 'asc');\n $data['productList'] = $this->commonRepository->all($this->product, 'product_name', 'asc');\n $data['productCategoryList'] = $this->commonRepository->all($this->productCategory, 'name', 'asc');\n $data['officeList'] = $this->commonRepository->all($this->office, 'office_name', 'asc');\n $response = $this->resource->create('backend.customer.create',$data);\n return $response;\n\n }", "title": "" }, { "docid": "e5d607eb592bf1b1b54ed10e939e6645", "score": "0.5969012", "text": "public function addCustomer($data) {\n // Prepare Query\n $this->db->query('INSERT INTO booking (id, email, carno, price, dat, time, status, pid ) VALUES(:id, :email, :carno, :price, :dat, :time, :status, :pid)');\n\n // Bind Values\n $this->db->bind(':id', $data['id']);\n $this->db->bind(':email', $data['email']);\n $this->db->bind(':carno', $data['carno']);\n $this->db->bind(':price', $data['price']);\n $this->db->bind(':dat', $data['dat']);\n $this->db->bind(':time', $data['time']);\n $this->db->bind(':status', $data['status']);\n $this->db->bind(':pid', $data['pid']);\n \n // Execute\n if($this->db->execute()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "09e1d8d76a9877c42e8e62b9422aa0e3", "score": "0.5967477", "text": "public function insert()\n\t{\n\t\t$templateArray = array();\n\t\t$getData = array();\n\t\t$keyName = array();\n\t\t$funcName = array();\n\t\t$templateArray = func_get_arg(0);\n\t\tfor($data=0;$data<count($templateArray);$data++)\n\t\t{\n\t\t\t$funcName[$data] = $templateArray[$data][0]->getName();\n\t\t\t$getData[$data] = $templateArray[$data][0]->$funcName[$data]();\n\t\t\t$keyName[$data] = $templateArray[$data][0]->getkey();\n\t\t}\n\t\t//data pass to the model object for insert\n\t\t$templateModel = new TemplateModel();\n\t\t$status = $templateModel->insertData($getData,$keyName);\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "2b3e289ba90ed32621e1b278445202c4", "score": "0.5965559", "text": "public abstract function insert();", "title": "" }, { "docid": "6ae16acc16cd358844671475cbe61a16", "score": "0.59618586", "text": "public function insertClients() {\n\n $autocode = $_POST['client_code'];\n $fname = $_POST['client_fname'];\n $lname = $_POST['client_lname'];\n $address = $_POST['client_address'];\n $nic = $_POST['client_nic'];\n $phone = $_POST['client_phone'];\n $purchasedate = $_POST['client_purchase_date'];\n $amount = $_POST['client_purchase_amount'];\n $profile = $_POST['client_image'];\n require_once('models/clients_model.php');\n $sendtomodel = new clients_model();\n $sendtomodel->addclient($autocode, $fname, $lname, $address, $nic, $phone, $purchasedate, $amount, $profile);\n }", "title": "" }, { "docid": "2a3af4c38dd82050820034f31ccf2666", "score": "0.5957312", "text": "function bulkUploadCustomer($arrCustomerData) {\n global $objGeneral;\n $arrAddID = $this->insert(TABLE_CUSTOMER, $arrCustomerData);\n $objGeneral->createReferalId($arrAddID);\n return $arrAddID;\n }", "title": "" }, { "docid": "9d41722315571dfe2f4eb2ca2b524ccc", "score": "0.5952339", "text": "public function run()\n {\n \n\n \\DB::table('customers')->delete();\n \n \\DB::table('customers')->insert(array (\n 0 => \n array (\n 'customerID' => 1,\n 'firstName' => 'Dylan',\n 'lastName' => 'Doe',\n 'phoneNumber' => '212-555-2222',\n 'email' => 'test1@test.com',\n ),\n 1 => \n array (\n 'customerID' => 2,\n 'firstName' => 'Jake',\n 'lastName' => 'Doe',\n 'phoneNumber' => '212-555-3333',\n 'email' => 'test2@test.com',\n ),\n 2 => \n array (\n 'customerID' => 3,\n 'firstName' => 'Jill',\n 'lastName' => 'Doe',\n 'phoneNumber' => '212-555-4444',\n 'email' => 'test3@test.com',\n ),\n 3 => \n array (\n 'customerID' => 4,\n 'firstName' => 'Gabe',\n 'lastName' => 'Doe',\n 'phoneNumber' => '212-555-5555',\n 'email' => 'test4@test.com',\n ),\n 4 => \n array (\n 'customerID' => 5,\n 'firstName' => 'Albert',\n 'lastName' => 'Doe',\n 'phoneNumber' => '212-555-6666',\n 'email' => 'test5@test.com',\n ),\n 5 => \n array (\n 'customerID' => 6,\n 'firstName' => 'Bob',\n 'lastName' => 'Doe',\n 'phoneNumber' => '212-555-7777',\n 'email' => 'test6@test.com',\n ),\n 6 => \n array (\n 'customerID' => 7,\n 'firstName' => 'George',\n 'lastName' => 'Doe',\n 'phoneNumber' => '213-555-2222',\n 'email' => 'test7@test.com',\n ),\n 7 => \n array (\n 'customerID' => 8,\n 'firstName' => 'Nick',\n 'lastName' => 'Doe',\n 'phoneNumber' => '214-555-2222',\n 'email' => 'test8@test.com',\n ),\n 8 => \n array (\n 'customerID' => 9,\n 'firstName' => 'Noah',\n 'lastName' => 'Doe',\n 'phoneNumber' => '215-555-2222',\n 'email' => 'test9@test.com',\n ),\n 9 => \n array (\n 'customerID' => 10,\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'phoneNumber' => '216-555-2222',\n 'email' => 'test10@test.com',\n ),\n ));\n \n \n }", "title": "" }, { "docid": "8bf5e5aabb36c1b5ad096a7c9cf482f0", "score": "0.5934656", "text": "public function save_customer_account($data){\n\t\t$query = \"INSERT INTO customers (first_name, last_name, email, password, user_level, created_at, updated_at) VALUES (?,?,?,?,?,?,?)\";\n\t\t$value = array($data['first_name'], $data['last_name'], $data['email'], md5($data['password']),'customer', date(\"Y-m-d, H:i:s\"), date(\"Y-m-d, H:i:s\"));\n\t\treturn $this->db->query($query,$value);\n\t}", "title": "" }, { "docid": "ad3d256d7c78f8833620a59ff5d5a78d", "score": "0.5916256", "text": "public static function insertCustomer($database, $vNaam, $tVoegsel, $aNaam, $straat, $hNummer, $woonplaats, $postcode) : int {\n\n $query = \"INSERT INTO Customers (CustomerID, BillToCustomerID, CustomerCategoryID, PrimaryContactPersonID, DeliveryMethodID, DeliveryCityID, PostalCityID, AccountOpenedDate, StandardDiscountPercentage, IsStatementSent, IsOnCreditHold, PaymentDays, PhoneNumber, FaxNumber, WebsiteURL, DeliveryAddressLine1, DeliveryPostalCode, CustomerName, PostalAddressLine1, PostalPostalCode, LastEditedBy, ValidFrom, ValidTo )\n VALUES (:id, 1, 1, 1, 1, 1, 1, CURRENT_TIMESTAMP(), 0, 1, 1, 0, '', '', '', :adres, :postcode, :naam, :adres, :postcode, 1, '1000-01-01 01:00:00', '9999-01-01 01:00:00')\";\n\n $stmt = $database->prepare($query);\n\n $id = self::getNextId($database);\n $naam = 0;\n if($tVoegsel===NULL){\n $naam = $vNaam . \" \" . $aNaam;\n }else{\n $naam = $vNaam . \" \" . $tVoegsel . \" \" . $aNaam;\n }\n\n // We voegen de variabelen niet direct in de SQL query, maar binden ze later, dit doen we om SQL injection te voorkomen\n $stmt->bindValue(\":id\", $id, PDO::PARAM_INT);\n $stmt->bindValue(\":naam\", $naam, PDO::PARAM_STR);\n $stmt->bindValue(\":straat\", $straat, PDO::PARAM_STR);\n $stmt->bindValue(\":adres\", $hNummer . \" \" . $woonplaats, PDO::PARAM_STR);\n $stmt->bindValue(\":postcode\", $postcode, PDO::PARAM_STR);\n\n // Voer de query uit\n // Als de klant AL BESTAAT gooit hij een exception, vang deze op:\n try {\n $stmt->execute();\n } catch (Exception $ignored) {\n // De klant bestaat al dus moeten we het BESTAANDE CustomerID returnen, niet de nieuwe!!!\n return self::getIdFromName($database, $naam);\n }\n\n return $id;\n }", "title": "" }, { "docid": "ed55e01dd59cdfe599f0cc8fc37f6cf6", "score": "0.59007907", "text": "public function Insert()\n {\n //Vai filtrar os campos NULL, e adicionar a apóstrofe nos campos que requerem\n //Vale dizer que o campo AcessoCurso NÃO pode ser nulo\n $id=$this->id;\n $CPF=$this->CPF;\n $Carro=\"'\".$this->Carro.\"'\";\n $Val=$this->Val;\n $DtCompra=$this->DtCompra;\n if($DtCompra!=null)\n $DtCompra = \"'\".$DtCompra->format('Y-m-d').\"'\";\n else $DtCompra = \"NULL\";\n //\n //SqlString que o Query do SqlConnection cobra\n $sql = \"insert into Compra ( CPF, Carro, Valor, DtCompra ) values($CPF,$Carro,$Val,$DtCompra)\";\n $this->conn->SqlQuery($sql);\n }", "title": "" }, { "docid": "3df1e633f772de42e8d42134bc47d932", "score": "0.58982205", "text": "public function insertSubscriber($insert){\n $this->db->insert(\"subscriber\",$insert);\n return $this->db->insert_id('subscriber');\n }", "title": "" }, { "docid": "f7c2239292b7871ef1811195d15a5e16", "score": "0.58792174", "text": "public function convince_insert($data) {\n //Transfering data to Model\n\t\t$this->db->trans_start();\n\t\t$this->db->insert('convincebill_record', $data);\n\t\t$insert_id = $this->db->insert_id();\n\t\t$this->db->trans_complete();\n\t\treturn $insert_id;\t\t\n \t}", "title": "" }, { "docid": "b4e6eb4592579c7cf9251f3b729acf2e", "score": "0.5861842", "text": "private function new_customer()\n {\n //dd(request());\n $customer = new Customer();\n $customer->name = request()->name;\n $customer->business_name = request()->business_name;\n $customer->phone = request()->phone;\n $customer->address = request()->address;\n $customer->email = request()->email;\n $customer->type = request()->type;\n $customer->save();\n }", "title": "" }, { "docid": "d9e80b407e2c8f7be7567f290b553e0f", "score": "0.5848151", "text": "function insert()\n {\n $log = FezLog::get();\n $db = DB_API::get();\n\n if (Validation::isWhitespace(trim($_POST[\"lname\"]))) {\n return -2;\n }\n if (trim($_POST[\"org_staff_id\"] !== \"\")) {\n if (author::getIDByOrgStaffID(trim($_POST[\"org_staff_id\"]))) {\n return -3;\n }\n }\n\n if (trim($_POST[\"org_username\"] !== \"\")) {\n if (author::getIDByUsername(trim($_POST[\"org_username\"]))) {\n return -4;\n }\n }\n\n $insert = \"INSERT INTO\n \" . APP_TABLE_PREFIX . \"author\n (\n aut_title,\n aut_fname,\n aut_lname,\n aut_created_date,\n aut_display_name\";\n\n if (trim($_POST[\"org_staff_id\"] !== \"\")) {\n $insert .= \", aut_org_staff_id \";\n }\n if (trim($_POST[\"org_username\"] !== \"\")) {\n $insert .= \", aut_org_username \";\n }\n if ($_POST[\"mname\"] !== \"\") {\n $insert .= \", aut_mname \";\n }\n if ($_POST[\"position\"] !== \"\") {\n $insert .= \", aut_position \";\n }\n\tif ($_POST[\"email\"] !== \"\") {\n $insert .= \", aut_email \";\n }\n if ($_POST[\"cv_link\"] !== \"\") {\n $insert .= \", aut_cv_link \";\n }\n if ($_POST[\"homepage_link\"] !== \"\") {\n $insert .= \", aut_homepage_link \";\n }\n if ($_POST[\"aut_ref_num\"] !== \"\") {\n $insert .= \", aut_ref_num \";\n }\n if ($_POST[\"researcher_id\"] !== \"\") {\n $insert .= \", aut_researcher_id \";\n }\n if ($_POST[\"scopus_id\"] !== \"\") {\n $insert .= \", aut_scopus_id \";\n }\n if ($_POST[\"orcid_id\"] !== \"\") {\n $insert .= \", aut_orcid_id \";\n }\n if ($_POST[\"google_scholar_id\"] !== \"\") {\n $insert .= \", aut_google_scholar_id \";\n }\n if ($_POST[\"people_australia_id\"] !== \"\") {\n $insert .= \", aut_people_australia_id \";\n }\n if ($_POST[\"mypub_url\"] !== \"\") {\n $insert .= \", aut_mypub_url \";\n }\n\tif ($_POST[\"description\"] !== \"\") {\n $insert .= \", aut_description \";\n }\n\n $values = \") VALUES (\n \" . $db->quote(trim($_POST[\"title\"])) . \",\n \" . $db->quote(trim($_POST[\"fname\"])) . \",\n \" . $db->quote(trim($_POST[\"lname\"])) . \",\n \" . $db->quote(Date_API::getCurrentDateGMT()) . \"\n \";\n\n if ($_POST[\"dname\"] !== \"\") {\n $values .= \", \" . $db->quote(trim($_POST[\"dname\"]));\n } else {\n $values .= \", \" . $db->quote(trim($_POST[\"fname\"]) . ' ' . trim($_POST[\"lname\"]));\n }\n\n if (trim($_POST[\"org_staff_id\"] !== \"\")) {\n $values .= \", \" . $db->quote(trim($_POST[\"org_staff_id\"]));\n }\n if (trim($_POST[\"org_username\"] !== \"\")) {\n $values .= \", \" . $db->quote(trim($_POST[\"org_username\"]));\n }\n if ($_POST[\"mname\"] !== \"\") {\n $values .= \", \" . $db->quote(trim($_POST[\"mname\"]));\n }\n if ($_POST[\"position\"] !== \"\") {\n $values .= \", \" . $db->quote(trim($_POST[\"position\"]));\n }\n if ($_POST[\"email\"] !== \"\") {\n $values .= \", \" . $db->quote(trim($_POST[\"email\"]));\n }\n if ($_POST[\"cv_link\"] !== \"\") {\n $values .= \", \" . $db->quote(trim($_POST[\"cv_link\"]));\n }\n if ($_POST[\"homepage_link\"] !== \"\") {\n $values .= \", \" . $db->quote(trim($_POST[\"homepage_link\"]));\n }\n if ($_POST[\"aut_ref_num\"] !== \"\") {\n $values .= \", \" . $db->quote(trim($_POST[\"aut_ref_num\"]));\n }\n if ($_POST[\"researcher_id\"] !== \"\") {\n $values .= \", \" . $db->quote(trim($_POST[\"researcher_id\"]));\n }\n if ($_POST[\"scopus_id\"] !== \"\") {\n $values .= \", \" . $db->quote(trim($_POST[\"scopus_id\"]));\n }\n if ($_POST[\"orcid_id\"] !== \"\") {\n $values .= \", \" . $db->quote(trim($_POST[\"orcid_id\"]));\n }\n if ($_POST[\"google_scholar_id\"] !== \"\") {\n $values .= \", \" . $db->quote(trim($_POST[\"google_scholar_id\"]));\n }\n if ($_POST[\"people_australia_id\"] !== \"\") {\n $values .= \", \" . $db->quote(trim($_POST[\"people_australia_id\"]));\n }\n if ($_POST[\"mypub_url\"] !== \"\") {\n $values .= \", \" . $db->quote(trim($_POST[\"mypub_url\"]));\n }\n if ($_POST[\"description\"] !== \"\") {\n\t $stripped_description = strip_tags(trim($_POST[\"description\"]), $tags); //strip HTML tags\n $values .= \", \" . $db->quote($stripped_description);\n }\n\n $values .= \")\";\n\n $stmt = $insert . $values;\n try {\n $db->exec($stmt);\n }\n catch(Exception $ex) {\n $log->err($ex);\n return -1;\n }\n return 1;\n }", "title": "" }, { "docid": "e144af3c1fb005e8bbeeb53103682028", "score": "0.58429044", "text": "protected function insert()\r\n\t{\r\n\t\t$dataSource = $this->getDataSource();\r\n\t\t$fields = $placeholders = '';\r\n\t\t\r\n\t\tif (is_string($this->_primaryKey) && $this->_primaryKeyIsAutoInc) {\r\n\t\t\tunset($this->_columns[$this->_primaryKey]);\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($this->_columns as $key => $value)\r\n\t\t{\r\n\t\t\t$fields \t\t.= '`' . $dataSource->escape($key) . '`, ';\r\n\t\t\t$placeholders \t.= '?, ';\r\n\t\t}\r\n\t\t\r\n\t\t$dataSource->prepareAndExecute('\r\n\t\t\tINSERT INTO `' . $this->getTableName() . '` (' . substr($fields, 0, -2) . ')\r\n\t\t\tVALUES (' . substr($placeholders, 0, -2) . ')', array_values($this->_columns));\r\n\t\t\r\n\t\tif ($this->_primaryKeyIsAutoInc) {\r\n\t\t\t$this->setId($dataSource->lastInsertID());\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->getId();\r\n\t}", "title": "" }, { "docid": "511e908e97c0136420598dbbc5c502e6", "score": "0.58424735", "text": "public function insert() {\r\n\t\t$values = array_intersect_key(array_merge($this->getValues('flat'), $this->getChangesTable()), $this->getTable()->getField());\r\n\t\tunset($values[$this->getTable()->getIdent()]);\r\n\t\t$id = $this->getTable()->insert($values);\r\n\t\t$this->set($this->getTable()->getIdent(), $id);\r\n\t\t$this->setNew(false);\r\n\t\t$this->saveRelated();\r\n\t\t$this->saveI18n();\r\n\t\t$this->getTable()->clearCache();\r\n\t\treturn $id;\r\n\t}", "title": "" }, { "docid": "a15dca862eddfc8a8402c16f0b0896b9", "score": "0.5816299", "text": "public function insert(){\n\t\t $sql = \"INSERT INTO $this->table(name,dep,age) VALUES(:name, :dep, :age)\";\n\t\t $stmt = DB::prepareOwn($sql);\n\t\t $stmt->bindParam(':name', $this->name);\n\t\t $stmt->bindParam(':dep', $this->dep);\n\t\t $stmt->bindParam(':age', $this->age);\n\t\t return $stmt->execute();\n\t }", "title": "" }, { "docid": "03fae89a28d597863e78b9d616fa595f", "score": "0.58081526", "text": "public function isNewCustomer();", "title": "" }, { "docid": "8e5ea9c686205194b73ee89b46d39f67", "score": "0.5807519", "text": "public function add_client_data(){\r\n\t\t$referral= $this->Contest_model->run_key('alpha','10');\r\n\t\t$this->db->insert(\"user_table\", array(\"user_name\" =>$_POST[\"client_name\"],\"user_email\" => $_POST[\"client_email\"],\"user_pwd\" => $_POST[\"client_password\"],\"user_country\" => $_POST[\"client_country\"], \"user_mobile\"=> $_POST[\"client_moblie\"],\"created_date\"=> date('Y-m-d H:i:s'),\"user_status\"=>\"1\",\"user_type\"=>\"0\",\"user_referral_code\"=>$referral));\r\n\t\t\r\n\t\t$insert_id = $this->db->insert_id();\r\n\t\t$insert = array(\"name\" =>$_POST[\"client_name\"],\r\n\t\t\t\t\t\t\t\"email\" => $_POST[\"client_email\"],\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\"password\" => $_POST[\"client_password\"],\r\n\t\t\t\t\t\t\t\"country\" =>$_POST[\"client_country\"],\r\n\t\t\t\t\t\t\t\"mobile\"=> $_POST[\"client_moblie\"],\r\n\t\t\t\t\t\t\t\"created_date\"=> date('Y-m-d H:i:s'),\r\n\t\t\t\t\t\t\t\"status\"=>\"1\",\r\n\t\t\t\t\t\t\t\"users_id\"=>$insert_id);\r\n\t\t\t\t\t\t\t\r\n\t\t$this->db->insert(\"client_table\",$insert);\r\n\t\treturn $insert_id;\t\t\t\t\t\r\n\t}", "title": "" }, { "docid": "fd47055df1893c8561c72d52ec20af45", "score": "0.58070606", "text": "public function insert()\n\t{\n\t\t$data=$this->loadIntoArray();\n\t\t//print_r($data);\n\t\t$data2=parent::loadIntoArray();\n\t\t//print_r($data2);\n\t\t$parent=new Ep_Document_Document();\n\t\t$return = $parent->insertplus(parent::loadIntoArray());\n\t\t$return.= $this->insertQuery($data);\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "edfa08fc380ee985a8cc0bd694d58751", "score": "0.5802676", "text": "function insertPostProcess ()\n {\n }", "title": "" }, { "docid": "98d365c6f6194573524dab2218b60f31", "score": "0.5794223", "text": "abstract public function Insert_ID();", "title": "" }, { "docid": "d272bb6fa1fd48ba142651968cdf6fa7", "score": "0.57900095", "text": "function insertUpdateUser()\n\t{\n\t\n\t\t$ObjClsDBInteraction = new class_dbconnector();\n\t\tif(isset($this->add_myshops))\n\t\t$arr[\"add_myshops\"] = $this->add_myshops;\n\t\t\n\t\tif(isset($this->newsletter_status))\n\t\t$arr[\"newsletter_status\"] = $this->newsletter_status;\n\t\t\n\t\t\n\t\t\n\t\tif(isset($this->paypal_merchant_id))\n\t\t$arr[\"paypal_merchant_id\"] = $this->paypal_merchant_id;\n\n\t\tif(isset($this->add_to_favor))\n\t\t$arr[\"favorite_items\"] = $this->add_to_favor;\n\n\t\tif(isset($this->first_name))\n\t\t$arr[\"first_name\"] = $this->first_name;\n\n\t\tif(isset($this->payment_type))\n\t\t$arr[\"payment_type\"] = $this->payment_type;\n\t\t\n\t\tif(isset($this->API_USERNAME) )\n\t\t$arr[\"API_USERNAME\"] = $this->API_USERNAME;\n\t\t\n\t\tif(isset($this->API_PASSWORD))\n\t\t$arr[\"API_PASSWORD\"] = $this->API_PASSWORD;\n\t\t\n\t\tif(isset($this->API_SIGNATURE))\n\t\t$arr[\"API_SIGNATURE\"] = $this->API_SIGNATURE;\n\t\t\n\t\tif(isset($this->Merchant_Id))\n\t\t$arr[\"Merchant_Id\"] = $this->Merchant_Id;\t\t\n\t\t\n\t\tif(isset($this->last_name))\n\t\t$arr[\"last_name\"]\t\t = $this->last_name;\n\t\t\n\t\tif(isset($this->username))\n\t\t$arr[\"username\"]\t\t\t= $this->username;\n\t\t\t\t\n\t\tif(isset($this->email))\n\t\t$arr[\"email\"]\t\t\t\t= $this->email;\n\t\t\n\t\tif(isset($this->password))\n\t\t$arr[\"password\"]\t\t\t= $this->password;\n\t\t\n\t\tif(isset($this->address1))\n\t\t$arr[\"address1\"]\t\t\t= $this->address1;\n\t\t\n\t\tif(isset($this->address2))\n\t\t$arr[\"address2\"]\t\t\t= $this->address2;\n\t\t\n\t\tif(isset($this->city))\n\t\t$arr[\"city\"]\t\t\t\t= $this->city;\n\t\t\n\t\tif(isset($this->zipcode))\n\t\t$arr[\"zipcode\"]\t\t\t\t= $this->zipcode;\n\t\t\n\t\tif(isset($this->state))\n\t\t$arr[\"state\"]\t\t\t\t= $this->state;\n\t\t\n\t\tif(isset($this->country_id))\n\t\t$arr[\"country_id\"]\t\t\t= $this->country_id;\n\t\t\n\t\tif(isset($this->phone1))\n\t\t$arr[\"phone1\"]\t\t\t\t= $this->phone1;\n\t\t\n\t\tif(isset($this->phone2))\n\t\t$arr[\"phone2\"]\t\t\t\t= $this->phone2;\n\t\t\n\t\tif(isset($this->paypal_email))\n\t\t$arr[\"paypal_email\"]\t\t= $this->paypal_email;\n\t\t\n\t\tif(isset($this->company_name))\n\t\t$arr[\"company_name\"]\t\t= $this->company_name;\n\t\t\n\t\tif(isset($this->company_address))\n\t\t$arr[\"company_address\"]\t\t= $this->company_address;\n\t\t\n\t\tif(isset($this->company_phone))\n\t\t$arr[\"company_phone\"]\t\t= $this->company_phone;\n\t\t\n\t\tif(isset($this->store_name))\n\t\t$arr[\"store_name\"]\t\t\t= $this->store_name;\n\t\t\n\t\tif(isset($this->company_desc))\n\t\t$arr[\"company_desc\"]\t\t= $this->company_desc;\n\t\t\n\t\tif(isset($this->security_question))\n\t\t$arr[\"security_question\"]\t= $this->security_question;\n\t\t\n\t\tif(isset($this->security_answer))\n\t\t$arr[\"security_answer\"]\t\t= $this->security_answer;\n\t\t\n\t\tif(isset($this->status))\n\t\t$arr[\"status\"] \t\t \t= $this->status;\n\t\t\n\t\tif(isset($this->user_type))\n\t\t$arr[\"user_type\"]\t\t\t= $this->user_type;\n\n\t\tif(isset($this->city_value))\n\t\t$arr[\"city\"]\t\t\t = $this->city_value;\n\n\t\tif(isset($this->country_value))\n\t\t$arr[\"country_id\"]\t\t\t= $this->country_value;\n\n\t\tif(isset($this->state_value))\n\t\t$arr[\"state\"]\t\t\t = $this->state_value; \n\t\t\n\t\tif(isset($this->welcome))\n\t\t$arr[\"v_welcome\"]\t\t\t= $this->welcome;\n\n\t\tif(isset($this->payment))\n\t\t$arr[\"v_payment\"]\t\t\t= $this->payment;\n\n\t\tif(isset($this->shipping))\n\t\t$arr[\"v_shipping\"]\t\t\t= $this->shipping;\n\n\t\tif(isset($this->refund))\n\t\t$arr[\"v_refund_exchange\"]\t= $this->refund;\n\n\t\tif(isset($this->additional))\n\t\t$arr[\"v_additional_info\"]\t= $this->additional;\n\n\t\tif(isset($this->fetured_date))\n\t\t$arr[\"v_fetured_date\"]\t\t= $this->fetured_date;\n\t\t\n\t\tif(isset($this->feturedstatus))\n\t\t$arr[\"v_status\"]\t\t\t= $this->feturedstatus;\n\t\t \n\t\tif(isset($this->id) && $this->id!=\"\")\n\t\t{\n\t\t\t $sWhere = \" id = '$this->id' \";\n\t\t\t $nReturnValue = $ObjClsDBInteraction->insertUpdate(\"tbl_users\", $arr, $sWhere);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arr[\"reg_date\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$nReturnValue = $ObjClsDBInteraction->insertUpdate(\"tbl_users\", $arr, null);\n\t\t}\n\t\t\n\t\t$ObjClsDBInteraction->connection_close();\n\t\treturn $nReturnValue;\n\t}", "title": "" }, { "docid": "8441738ec676801606cecf5816fe32e5", "score": "0.57859373", "text": "private function _form_insert_process() {\n\t\t$returns = NULL;\n\t\t$error = NULL;\n\t\t\n\t\t// get valid inputs\n\t\t$data = $this->_get_data_by_name('insert');\n\t\t$inputs = $this->_get_valid_inputs('insert');\n\t\t\n\t\t// set flashdata containing current inputs, incase we need it (on error for instance)\n\t\t$flashdata['crud_flashdata']['crud_action'] = 'insert';\n\t\t$flashdata['crud_flashdata']['inputs'] = $inputs;\n\t\t\n\t\t// process answers or inputs\n\t\tforeach ($inputs as $key => $val) {\n\t\t\t// apply functions\n\t\t\tif (isset($data[$key]['apply_function'])) {\n\t\t\t\tforeach ($data[$key]['apply_function'] as $i => $function) {\n\t\t\t\t\t$inputs[$key] = call_user_func($function, $val);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// compare the field max_length with strlen\n\t\t\tif ($data[$key]['max_length'] > 0) {\n $input_val = $this->CI->input->post($key);\n if (strlen($input_val) > $data[$key]['max_length']) {\n $error[$key] = t('input length should be lower than maximum allowed').' ('.$data[$key]['max_length'].')';\n }\n\t\t\t}\n\t\t\t// compare the field min_length with strlen\n\t\t\tif ($data[$key]['min_length'] >= 0) {\n $input_val = $this->CI->input->post($key);\n if (strlen($input_val) < $data[$key]['min_length']) {\n $error[$key] = t('input length should be more than minimum allowed').' ('.$data[$key]['min_length'].')';\n }\n\t\t\t}\n\t\t\t// check if the field is unique\n\t\t\tif ($data[$key]['unique']) {\n\t\t\t\t$query = $this->CI->db->get_where($this->datasource['table'], array( $key => $val ));\n\t\t\t\tif ($query->num_rows()) {\n\t\t\t\t\t$error[$key] = t('data is already exists');\n\t\t\t\t}\n\t\t\t}\n\t\t\t// check if the field need to be confirmed, password for instance\n\t\t\tif ($data[$key]['confirm']) {\n\t\t\t\t$confirm_val = $this->CI->input->post($key.'_confirm');\n\t\t\t\tif ($confirm_val != $val) {\n\t\t\t\t\t$error[$key] = t('confirmation answer is different');\n\t\t\t\t}\n\t\t\t}\n\t\t\t// check if the field is required \n\t\t\tif ($data[$key]['required']) {\n\t\t\t\tif (empty($val)) {\n\t\t\t\t\t$error[$key] = t('you must fill this field');\n\t\t\t\t}\n\t\t\t}\n\t\t\t// check if the field is disabled or readonly, unset the inputs if it is\n\t\t\tif ($data[$key]['disabled'] || $data[$key]['readonly']) {\n\t\t\t\tunset($inputs[$key]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// determine to returns error messages or success messages\n\t\tif (count($error) > 0) {\n\t\t\t$error_string = NULL;\n\t\t\tforeach ($error as $key1 => $val1) {\n\t\t\t\t$error_string .= '<p id=\"message_error\">'.$key1.' - '.$val1.'</p>';\n\t\t\t}\n\t\t\t$returns .= $error_string;\n\t\t\t\n\t\t\t// set flashdata to session, this data will be used to re-entry the input value\n\t\t\t$this->CI->session->set_userdata($flashdata);\n\t\t\t\n\t\t} else {\n\t\t\t$result = $this->CI->db->insert($this->datasource['table'], $inputs);\n\t\t\tif ($result) { \n\t\t\t\t$returns .= '<p id=\"message_success\">'.t('data has been saved').'</p>';\n\t\t\t} else {\n\t\t\t\t$returns .= '<p id=\"message_error\">'.t('fail to save data').'</p>';\n\t\t\t}\n\t\t}\n\t\t\n\t\t// always add back button\n\t\t$returns .= anchor($this->properties['uri'], t('Back'));\n\t\t\n\t\treturn $returns;\n\t}", "title": "" }, { "docid": "84791f42f954d27be8c5cd5680bc2175", "score": "0.57800186", "text": "public function insert($attreav);", "title": "" }, { "docid": "65e920d672baf46f4a8230c1c6c83c5d", "score": "0.5777868", "text": "public static function insertCustomer($first_name, $last_name) {\r\n $db = new Database();\r\n $q = \"begin insert_customer(:cfirst_name, :clast_name); end;\";\r\n $stid = $db->parseQuery($q);\r\n oci_bind_by_name($stid, ':cfirst_name', $first_name);\r\n oci_bind_by_name($stid, ':clast_name', $last_name);\r\n $r = oci_execute($stid); // executes and commits\r\n return $r;\r\n }", "title": "" }, { "docid": "0115cc5ffa3b28597418855246cb05e8", "score": "0.5775864", "text": "function newCustomer() {\r\n\t$customer = new Customer();\r\n\t$customer->set_customer('name', 'email', 'phone');\r\n\t$customer->get_customer();\r\n}", "title": "" }, { "docid": "3c79cd3258f10301e8727dbc3294ba09", "score": "0.57725596", "text": "function insert()\n\t\t{\n\t\t\t$fields = $this->field();\n\t\t\t$fields['created'] = gmdate(\"Y-m-d H:m:s\");\n\t\t\t$fields['created_by'] = $this->session->userdata('user_id');\n\n\t\t\t$this->db->insert('cms_comment', $fields);\n\t\t\treturn $this->db->insert_id();\n\t\t}", "title": "" }, { "docid": "8833cdea73cb49e54aa73be5051e0861", "score": "0.5771983", "text": "function insert_s3db($D) {\r\n\t\t#this is meant to be a general function for every insert, froum user to group. It create the entry, based on information on array $info and adds an entry on permissions\r\n\t\t#There will be 2 special cases: creating a class also creates the rule \"has UID\" and creating an instance also creates the statament where reosurce_id is instance_id and rule is \"hasUID\"\r\n\t\textract($D);\r\n\t\t$table = $GLOBALS['s3tables'][$element];\r\n\t\t$cols_for_entry = $GLOBALS['dbstruct'][$element];\r\n\t\t$letter = strtoupper(substr($element,0,1));\r\n\t\r\n\t\t#some special restrictions apply\r\n\t\tswitch ($letter) {\r\n\t\t\tcase 'U':\r\n\t\t\t{\r\n\t\t\t\t$cols_for_entry = array_diff($cols_for_entry, array('addr1', 'addr2', 'city', 'state', 'postal_code', 'country'));\r\n\t\t\t\tarray_push($cols_for_entry, 'account_pwd');\r\n\t\r\n\t\t\t\t$inputs['account_addr_id']=insert_address($D);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 'G':\r\n\t\t\t{\r\n\t\t\t\t$cols_for_entry = array_merge($cols_for_entry, array('account_pwd', 'account_group'));\r\n\t\t\t\t$inputs['account_type'] = 'g';\r\n\t\t\t\t$inputs['account_group'] = $inputs['account_type'];\r\n\t\t\t\t$inputs['account_uname'] = $inputs['account_lid'];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 'C':\r\n\t\t\t{\r\n\t\t\t\t$inputs['iid'] = '0';\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 'I':\r\n\t\t\t{\r\n\t\t\t\t$inputs['iid'] = '1';\r\n\t\t\t\t$inputs['resource_class_id']=($inputs['resource_class_id']=='')?$inputs['class_id']:$inputs['resource_class_id'];\r\n\t\t\t\t$inputs['resource_id']=($inputs['resource_id']!='')?$inputs['resource_id']:$inputs['instance_id'];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 'F':\r\n\t\t\t{\r\n\t\t\t\t$element='statement';\r\n\t\t\t\t$cols_for_entry = $GLOBALS['dbstruct']['statements'];\r\n\t\t\t\t$table = $GLOBALS['s3tables']['statements'];\r\n\t\t\t\t$inputs['statement_id']= s3id();\r\n\t\t\t\t#now need to move file from tmp folder into final folder\r\n\t\t\t\t$moved = tmpfile2folder(array('inputs'=>$inputs, 'db'=>$db, 'user_id'=>$user_id));\r\n\t\t\t\tif(!$moved[0]) {#something went wrong, delete the statement.\r\n\t\t\t\t\treturn ($moved[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$inputs=$moved[1];\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t#remove ''_id from cols for entry if that field is empty;\r\n\t\tif($inputs[$GLOBALS['s3ids'][$element]]=='') {\r\n\t\t\t#never levae the primary key input empty\r\n\t\t\t#$inputs[$GLOBALS['s3ids'][$element]] = find_latest_UID($table, $db)+1;\r\n\t\t\t$inputs[$GLOBALS['s3ids'][$element]] = s3id();\r\n\t\t}\r\n\t\t$sql = buildInsertString($cols_for_entry, $inputs, $table);\r\n\t\t$db->query($sql, __LINE__, __FILE__);\r\n\t\tif($db->Errno==1) { #This is a duplicate key. No problem, let's try again\r\n\t\t\t$inputs[$GLOBALS['s3ids'][$element]] = s3id();\r\n\t\t\t$sql = buildInsertString($cols_for_entry, $inputs, $table);\r\n\t\t\t$db->query($sql, __LINE__, __FILE__);\r\n\t\t}\r\n\t\r\n\t\t$dbdata = get_object_vars($db);\r\n\t\t#$dbdata['Errno']='0';\r\n\t\tif($dbdata['Errno']!='0') {\r\n\t\t\tif($table=='account') {\r\n\t\t\t\t$sql = \"update s3db_\".$table.\" set account_status = 'A' where account_id = '\".$inputs['account_id'].\"'\";\r\n\t\t\t\t$db->query($sql, __LINE__, __FILE__);\r\n\t\t\t\t$dbdata = get_object_vars($db);\r\n\t\t\t}\r\n\t\t\tif($dbdata['Errno']!=0) {\r\n\t\t\t\treturn array(False,$GLOBALS['error_codes']['something_went_wrong'].'<message>'.str_replace('key', $GLOBALS['COREids'][$element], $dbdata['Error']).'</message>', $GLOBALS['error_codes']['something_went_wrong'], $dbdata['Error']);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t#$element_id = $db->get_last_insert_id($table, $GLOBALS['s3ids'][$element]);\r\n\t\t\t#$element_id = find_latest_UID($table, $db);\r\n\t\t\t$element_id = $inputs[$GLOBALS['s3ids'][$element]];\r\n\t\t\t$info[$letter.$element_id]=$inputs;\r\n\t\t\t#special restrictions apply after create:\r\n\t\t\tswitch ($letter) {\r\n\t\t\t\tcase 'P':\r\n\t\t\t\t{\r\n\t\t\t\t\t$project_id = $element_id;\r\n\t\t\t\t\t#if project_id is remote, need to change it's name a bit because / and # are not allowed in project_name;\r\n\t\t\t\t\t#$project_id = urlencode($project_id);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t#create the folder on the extras for the files of this project\r\n\t\t\t\t\t$folder_code_name = random_string(15).'.project'.urlencode($project_id);\r\n\t\t\t\t\t$maindir = $GLOBALS['s3db_info']['server']['db']['uploads_folder'].$GLOBALS['s3db_info']['server']['db']['uploads_file'];\r\n\t\t\t\t\t$destinationfolder = $maindir.'/'.$folder_code_name;\r\n\t\t\t\t\t#create the folder for the project\r\n\t\t\t\t\tif(mkdir($destinationfolder, 0777)) {\r\n\t\t\t\t\t\t$indexfile = $destinationfolder.'/index.php';\r\n\t\t\t\t\t\tif (file_exists($destinationfolder)) {\r\n\t\t\t\t\t\t\tfile_put_contents ($indexfile , 'This folder cannot be accessed');\r\n\t\t\t\t\t\t\tchmod($indexfile, 0777);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$sql = \"update s3db_project set project_folder = '\".$folder_code_name.\"' where project_id = '\".$project_id.\"'\";\r\n\t\t\t\t\t\t$db->query($sql, __LINE__, __FILE__);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\techo \"Could not create directory for this project. You might not be able to upload files to this project.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 'I':\r\n\t\t\t\t{\r\n\t\t\t\t\t$class_id = $inputs['resource_class_id'];\r\n\t\t\t\t\t$statement_info = $inputs;\r\n\t\r\n\t\t\t\t\t$statement_info['rule_id'] = fastRuleID4class(compact('class_id', 'db', 'user_id'));\r\n\t\t\t\t\t$statement_info['value'] = $element_id;\r\n\t\t\t\t\t$statement_info['resource_id'] = $element_id;\r\n\t\r\n\t\t\t\t\t#$stat_inserted = insert_s3db(array('element'=>'statement', 'inputs'=>$statement_info, 'db'=>$db, 'user_id'=>$user_id));\r\n\t\t\t\t\t$stat_inserted = insert_statement(compact('statement_info', 'db', 'user_id'));\r\n\t\t\t\t\t$action='create';\r\n\t\t\t\t\tinsert_statement_log(compact('oldvalues', 'inputs', 'action', 'statement_info', 'user_id', 'db'));\r\n\t\t\t\t\tif($stat_inserted[0]) {\r\n\t\t\t\t\t\tereg('<statement_id>([0-9]+)</statement_id>', $stat_inserted[1], $s3qlout);\r\n\t\t\t\t\t\t$statement_info['statement_id'] = $stat_inserted[1];\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t$info['S'.$statement_info['statement_id']]=$statement_info;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 'C':\r\n\t\t\t\t{\r\n\t\t\t\t\t$rule_info = $inputs;\r\n\t\t\t\t\t$rule_info['subject']=$inputs['entity'];\r\n\t\t\t\t\t$rule_info['subject_id']=$element_id;\r\n\t\t\t\t\t$rule_info['verb_id']='0';\r\n\t\t\t\t\t$rule_info['verb']='has UID';\r\n\t\t\t\t\t$rule_info['object']='UID';\r\n\t\t\t\t\t$rule_inserted = insert_rule(compact('rule_info', 'db', 'user_id'));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 'R':\r\n\t\t\t\t{\r\n\t\t\t\t\t$rule_info = $inputs;\r\n\t\t\t\t\t$rule_info['rule_id']=$element_id;\r\n\t\t\t\t\t$action='create';\r\n\t\t\t\t\t$rule_inserted = insert_rule_log(compact('rule_info', 'action', 'db', 'user_id'));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 'S':\r\n\t\t\t\t{\r\n\t\t\t\t\t$statement_info=$inputs;\r\n\t\t\t\t\t$action='create';\r\n\t\t\t\t\tinsert_statement_log(compact('oldvalues', 'action', 'statement_info', 'user_id', 'db'));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 'F':\r\n\t\t\t\t{\r\n\t\t\t\t\t$statement_info=$inputs;\r\n\t\t\t\t\t$action='create';\r\n\t\t\t\t\tinsert_statement_log(compact('oldvalues', 'action', 'statement_info', 'user_id', 'db'));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t#now add an entry that specifies user \"creator' with permission level on 222 this entry (because someone has to have it)\r\n\t\t\t#some resources need to be mirrored, or swapped:\r\n\t\t\t\t\r\n\t\t\t#if(ereg('^(U|G)$', $letter)) {\r\n\t\t\tif(preg_match('/^(U|G)$/', $letter)) {\r\n\t\t\t\t#owner of groups is automatically created within it with PL 222\r\n\t\t\t\t#if(ereg('^G$', $letter)) {\r\n\t\t\t\tif(preg_match('/^G$/', $letter)) {\r\n\t\t\t\t\t$permission_info = array('uid'=>'U'.$user_id, 'shared_with'=>strtoupper(substr($element, 0,1)).$element_id, 'permission_level'=>'222');\r\n\t\t\t\t\tinsert_permission(compact('permission_info', 'db', 'user_id', 'info'));\r\n\t\t\t\t#} elseif(ereg('^U$', $letter)) {\r\n\t\t\t\t} elseif(preg_match('/^U$/', $letter)) {\r\n\t\t\t\t\t##also, for each user insertions, create an item_id for this user in the userManagement project. This will only create it if it does not yet exist\r\n\t\t\t\t\tinclude_once(S3DB_SERVER_ROOT.'/s3dbcore/authentication.php');\r\n\t\t\t\t\t$user_proj=create_authentication_proj($db,$user_id);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t#now, create an item in the userManagement project for this user\r\n\t\t\t\t\t$user2add = $element_id;\r\n\t\t\t\t\t$c=compact('user2add','user_proj', 'user_id','db');\r\n\t\t\t\t\t$user_proj=insert_authentication_tuple($c);\r\n\t\t\t\t\tif($inputs['permission_level']!=\"\") { ##creator has specified that his own permissions can propagate\r\n\t\t\t\t\t\t$permission_info = array('uid'=>'U'.$user_id, 'shared_with'=>'U'.$user2add, 'permission_level'=>$inputs['permission_level']);\r\n\t\t\t\t\t\tinsert_permission(compact('permission_info', 'db', 'user_id', 'info'));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t#and then insert them i deployment\r\n\t\t\t\t$permission_info = array('uid'=>'D'.$GLOBALS['Did'], 'shared_with'=>strtoupper(substr($element, 0,1)).$element_id);\r\n\t\t\t\t$permission_info['permission_level']=($inputs['permission_level']!='')?$inputs['permission_level']:'200';\r\n\t\t\t} else {\r\n\t\t\t\tif(preg_match('/^P$/', $letter)) {\r\n\t\t\t\t\t#project has a special treatment, creators of project get to have permission level 222 on it.\r\n\t\t\t\t\t$permission_info['shared_with'] = 'U'.$user_id;\r\n\t\t\t\t\t$permission_info['shared_with'] = 'U'.$user_id;\r\n\t\t\t\t\t$permission_info['uid'] = $letter.$element_id;\r\n\t\t\t\t\t$permission_info['permission_level']='YYY';##This assures that it will migrate to child resources\r\n\t\t\t\t\tinsert_permission(compact('permission_info', 'db', 'user_id', 'info'));\r\n\t\t\t\t} elseif(preg_match('/^R$/', $letter)) {\r\n\t\t\t\t\t#Rule require permission to be inserted also for subject_id, verb_id and, if exists, object-id\r\n\t\t\t\t\t##For SUBJECT\r\n\t\t\t\t\t$permission_info = array('uid'=>'R'.$rule_info['rule_id'], 'shared_with'=>'C'.$rule_info['subject_id'], 'permission_level'=>'222', 'info'=>$info);\r\n\t\t\t\t\t#insert_permission(compact('permission_info', 'db', 'user_id', 'info'));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t##For VERB\r\n\t\t\t\t\t$permission_info = array('uid'=>'R'.$rule_info['rule_id'], 'shared_with'=>'I'.$rule_info['verb_id'], 'permission_level'=>'222', 'info'=>$info);\r\n\t\t\t\t\t#insert_permission(compact('permission_info', 'db', 'user_id', 'info'));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t#FOR OBJECT\r\n\t\t\t\t\tif($rule_info['object_id']) {\r\n\t\t\t\t\t\t$permission_info = array('uid'=>'R'.$rule_info['rule_id'], 'shared_with'=>'C'.$rule_info['object_id'], 'permission_level'=>'222', 'info'=>$info);\r\n\t\t\t\t\t\t#insert_permission(compact('permission_info', 'db', 'user_id', 'info'));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$permission_info['shared_with'] = 'P'.$inputs['project_id'];\r\n\t\t\t\t} elseif(preg_match('/^C$/', $letter)) {\r\n\t\t\t\t\t$permission_info['shared_with'] = 'P'.$inputs['project_id'];\r\n\t\t\t\t} elseif(preg_match('/^I$/', $letter)) {\r\n\t\t\t\t\t#insert for statement too\r\n\t\t\t\t\t$permission_info = array('uid'=>'S'.$statement_info['statement_id'], 'shared_with'=>'R'.$statement_info['rule_id'], 'permission_level'=>'222', 'info'=>$info);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t#insert_permission(compact('permission_info', 'db', 'user_id', 'info'));\r\n\t\t\r\n\t\t\t\t\t#and then for instance\r\n\t\t\t\t\t$permission_info['shared_with'] = 'C'.$inputs['resource_class_id'];\r\n\t\t\t\t} elseif(preg_match('/^S|F$/', $letter)) {\r\n\t\t\t\t\tif($letter=='F') {\r\n\t\t\t\t\t\t$element_id = $statement_info['statement_id'];\r\n\t\t\t\t\t\t$element = 'file';\r\n\t\t\t\t\t\t$letter = 'S';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$permission_info = array('uid'=>$letter.$statement_info['statement_id'], 'shared_with'=>'I'.$statement_info['resource_id'], 'permission_level'=>'222', 'info'=>$info);\r\n\t\t\t\t\t#insert_permission(compact('permission_info', 'db', 'user_id', 'info'));\r\n\t\t\t\t\t##If there is an object_id, insert one for that too\r\n\t\t\t\t\tif($statement_info['object_id']) {\r\n\t\t\t\t\t\t$permission_info = array('uid'=>$letter.$statement_info['statement_id'], 'shared_with'=>'I'.$statement_info['object_id'], 'permission_level'=>'222', 'info'=>$info);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t#insert_permission(compact('permission_info', 'db', 'user_id', 'info'));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t#And add one for the rule\r\n\t\t\t\t\t$permission_info['shared_with'] = 'R'.$inputs['rule_id'];\r\n\t\t\t\t}\r\n\t\t\t\t#and not these are global\r\n\t\t\t\t$permission_info['permission_level']=($inputs['permission_level']!='')?$inputs['permission_level']:'222';\r\n\t\t\t\t$permission_info['uid'] = $letter.$element_id;\r\n\t\t\t\t$info[$permission_info['uid']] = URI($permission_info['uid'], $user_id, $db);\r\n\t\t\t}\r\n\t\t\t#insert_permission(compact('permission_info', 'db', 'user_id', 'info'));\r\n\t\t\treturn array(TRUE, $GLOBALS['error_codes']['success'].\"; \".$element.'_id'.': <'.$element.'_id'.'>'.$element_id.'</'.$element.'_id'.'>'.'<a href =\" '.$query['url'].'?key='.$D['key'].'&query=<S3QL><select>*</select><from>'.$GLOBALS['plurals'][$element].'</from><where><'.$element.'_id>'.$element_id.'</'.$element.'_id></where></S3QL>\">View '.$element.'</a>', $element, $element.'_id'=>$element_id, $GLOBALS['messages']['success'], strtoupper($element).' inserted');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "192ecfcd51ddf200aa794d908a67c260", "score": "0.5769903", "text": "function insert() {\n\t\tif ($this->input->post(\"person_id\")) {\n\t\t\t$person_id = $this->input->post(\"person_id\");\n\t\t\t$address_id = $this->address->insert();\n\t\t\t$this->load->model(\"person_model\", \"person\");\n\t\t\t$values = [\n\t\t\t\t\"address_id\" => $address_id,\n\t\t\t];\n\t\t\t$this->person->update($person_id, $values);\n\t\t\tredirect(\"person/view/$person_id\");\n\t\t}\n\t}", "title": "" }, { "docid": "5affaa2f277f68bc02f0649af86b5c2b", "score": "0.57556295", "text": "public function index()\n\t{\n\t\t// iterate on each \n\t\t// if current iteration is not on persons table add it\n\t\t// if its already there check if the cust id is not on the table and add it\n\n /*code ni sir alfred na akong gipulihan August 15, 2017\n\t\t$customers_old = $this->customers->get_all_old();\n\n\t\tforeach ($customers_old as $customer_old)\n {\n \tif($person = $this->persons->find($customer_old))\n \t{\n \t\techo \" found \";\n \t\tif ($this->customers->find($customer_old))\n \t\t{\n \t\t\techo \" DUPLICATE <br>\";\n \t\t\tcontinue;\n \t\t} else {\n \t\t\t// insert to customers\n \t\t\techo \" ADDED:\".$person->person_id.\" <br>\";\n \t\t\t$this->customer_accounts->insert_customer($customer_old, $person->person_id);\n \t\t}\n \t} else {\n \t\t// insert to persons\n \t\t$person_id = $this->persons->insert_customer($customer_old);\n \t\t// insert to customers\n \t\t$customer_id = $this->customers->insert_customer($customer_old, $person_id);\n \t\t// insert to client,\n \t\t$this->clients->insert_customer($customer_old, $customer_id);\n \t\techo \" NEW:\".$person_id.\" <br>\";\n \t}\n\n }\n */\n\n\n\n set_time_limit(0);\n $customers_old = $this->customers->get_all_old();\n\n foreach ($customers_old as $customer_old) {\n\n $person = $this->persons->find($customer_old); \n if ($person == false)\n {\n //insert to person table\n $person_id = $this->persons->insert_customer($customer_old);\n echo \"Added to Person: \".$person_id;\n //$person = $this->persons->find($customer_old);\n } else {\n echo \"Found Person: \".$person->person_id;\n } \n\n $customer = $this->customers->find($person);\n if ($customer == false)\n {\n \n $customer_id = $this->customers->insert_customer($customer_old, $person->person_id);\n echo \" Added to Customer: \".$customer_id;\n //$customer = $this->customers->find($person);\n } else {\n echo \" Found Customer: \".$customer->customer_id;\n }\n\n //find customer account\n $customeraccount = $this->customer_accounts->find($customer);\n if ($customeraccount == false)\n {\n \n $customeraccount_id = $this->customer_accounts->insert_customer($customer_old, $person->person_id);\n echo \" Added to Customer Account: \".$customeraccount_id.\"<br />\";\n } else {\n echo \" Found Customer Account: \".$customeraccount->customer_account_id.\"<br />\";\n } \n }//end sa foreach\n\t\t\n $data['persons'] = $this->persons->get_all();\n\n\t\t$data['page_title'] = 'Home Page';\n\t\t$data['userprofile'] = 'welcome/userprofile';\n\t\t$data['navigation'] = 'welcome/navigation';\n\t\t$data['content'] = 'content';\n\n\t\t$this->load->view('default/index', $data);\n\t}", "title": "" }, { "docid": "25032a8d8faaceb0ffcae1eac9db45eb", "score": "0.5752065", "text": "public function insert(){\n\t\t$sql = new Sql();\n\n\t\t//Procedure que insere o usuario pelo login e senha e devolve o id e data do cadastro.\n\t\t$results = $sql->select(\"CALL sp_usuarios_insert(:LOGIN, :PASSWORD)\", array(\n\t\t\t':LOGIN'=>$this->getLogin(),\n\t\t\t':PASSWORD'=>$this->getSenha()\n\t\t));\n\n\t\tif(count($results) > 0){\t//Se ocorreu tudo certo o usuario é retornado\n\t\t\t$this->setDados($results[0]);\t//Chama o método que coloca as informaçoes carregadas nos atributos do obj.\n\t\t}\n\t}", "title": "" }, { "docid": "896849e7b204e5fb7ec8b5dbb13cacaf", "score": "0.5751227", "text": "private function insert(){\n $this->db->insert($this::DB_TABLE_NAME, $this);\n $this->{$this::DB_TABLE_PK_VALUE} = $this->db->insert_id();\n }", "title": "" }, { "docid": "b2fd4451ee583a4e440d9b0892bd647b", "score": "0.5749875", "text": "private function insert()\n {\n $this->onChangeBeforeSave(); // every insert is an update\n $insert = [];\n foreach (static::$dbColumns as $col) {\n if ($col === static::COL_ID) {\n continue; //ezt nem mentjük, vagy nem itt.\n }\n if (isset($this->$col)) {\n $insert[$col] = $this->$col;\n }\n }\n if (isset($this->id_to_set)) {\n $insert[static::COL_ID] = $this->id_to_set;\n }\n $this->id = (int)static::getDB()->insert($insert)->into(static::TABLE)->execute(true);\n // every column is changed.\n $this->saveDiff = [];\n foreach (static::$dbColumns as $col) {\n if ($col === static::COL_ID) {\n $data = $this->id;\n } else {\n $data = $this->$col;\n }\n if (!is_null($data)) {\n $this->saveDiff[$col] = [null, $data];\n }\n $this->dbCache[$col] = $data;\n }\n $this->_newRecord = true;\n $this->onChangeAfterSave($this->saveDiff);\n }", "title": "" }, { "docid": "3a8c66f00bfff777b387ef56d1e03781", "score": "0.5745005", "text": "private function _insert( )\n\t{\n\t\t$fields = array();\n\t\t$values = array();\n\t\tfor ( $i=0 ; $i<count($this->_fields) ; $i++ ) {\n\t\t\t$field = $this->_fields[$i];\n\n\t\t\tif ( $field->apply( 'set', $this->_formData ) ) {\n\t\t\t\t$fields[] = $field->dbField;\n\t\t\t\t$values[] = mysql_real_escape_string( $field->val('set', $this->_formData) );\n\t\t\t}\n\t\t}\n\n\t\t$sql = \n\t\t\t\"INSERT INTO {$this->_table} \n\t\t\t\t(`\".implode(\"`, `\", $fields).\"`)\n\t\t\tVALUES\n\t\t\t\t('\".implode(\"', '\", $values).\"')\";\n\t\t$res = $this->_execute( $sql );\n\t\tif ( ! $res ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$id = mysql_insert_id();\n\n\t\t// Dynamic get for fields which might have been updated on the DB\n\t\t$this->_dynamicGet( $id );\n\n\t\t$this->_out['id'] = $this->_primaryKeyPrefix . $id;\n\t}", "title": "" }, { "docid": "984afaf70ae79594a517ebc40db9c1ef", "score": "0.5743979", "text": "public function InsertCustomer($customerid, $customerData)\n\t{\n\t\tif(isset($customerData['addresses']) && count($customerData['addresses']) > 0) {\n\t\t\t$shipAddress = array_shift($customerData['addresses']);\n\t\t}\n\t\telse {\n\t\t\t$shipAddress = array(\n\t\t\t\t\"shipfullname\" => \"\",\n\t\t\t\t\"shipaddress1\" => \"\",\n\t\t\t\t\"shipaddress2\" => \"\",\n\t\t\t\t\"shipcity\" => \"\",\n\t\t\t\t\"shipstate\" => \"\",\n\t\t\t\t\"shipzip\" => \"\",\n\t\t\t\t\"shipcountry\" => \"\",\n\t\t\t\t\"shipphone\" => \"\"\n\t\t\t);\n\t\t}\n\n\t\t$customer = array(\n\t\t\t\"email\" => $GLOBALS['CUBECART_DB']->Quote($customerData['custconemail']),\n\t\t\t\"password\" => $customerData['custpassword'],\n\t\t\t\"title\" => \"\",\n\t\t\t\"firstName\" => $GLOBALS['CUBECART_DB']->Quote($customerData['custconfirstname']),\n\t\t\t\"lastName\" => $GLOBALS['CUBECART_DB']->Quote($customerData['custconlastname']),\n\t\t\t\"companyName\" => $GLOBALS['CUBECART_DB']->Quote($customerData['custconcompany']),\n\t\t\t\"add_1\" => $GLOBALS['CUBECART_DB']->Quote($shipAddress['shipaddress1']),\n\t\t\t\"add_2\" => $GLOBALS['CUBECART_DB']->Quote($shipAddress['shipaddress2']),\n\t\t\t\"town\" => $GLOBALS['CUBECART_DB']->Quote($shipAddress['shipcity']),\n\t\t\t\"county\" => $GLOBALS['CUBECART_DB']->Quote($shipAddress['shipstate']),\n\t\t\t\"postcode\" => $GLOBALS['CUBECART_DB']->Quote($shipAddress['shipzip']),\n\t\t\t\"country\" => $this->GetCubeCartISOCountry($shipAddress['shipcountry']),\n\t\t\t\"phone\" => $GLOBALS['CUBECART_DB']->Quote($customerData['custconphone']),\n\t\t\t\"mobile\" => \"\",\n\t\t\t\"customer_id\" => $customerid,\n\t\t\t\"regTime\" => $customerData['custdatejoined'],\n\t\t\t\"ipAddress\" => \"\",\n\t\t\t\"noOrders\" => 0,\n\t\t\t\"type\" => 1\n\t\t);\n\t\t$this->DbInsertArray(\"CubeCart_customer\", $customer);\n\t}", "title": "" }, { "docid": "6168e645df51c01f2d9f66cfaa35bfa2", "score": "0.57378966", "text": "public function insert($request);", "title": "" }, { "docid": "4ee1c4b8a59b70544b16d63d28f0572e", "score": "0.57330894", "text": "public function insertProd(){\n\t\t// APPPATH onde esta o codeIgnitor\n\t\trequire_once APPPATH.\"models/user.php\";\n\t\t$this->load->model('ModelProd');\n\t\t$m = $this->ModelProd;\n\t\t// \"nome\" eh o nome do campo do formulario que estou extraindo a informacao para gravar no banco\n\t\t$m->insert(new produt($_POST[\"titulo\"], $_POST[\"noticia\"], $_POST[\"autor\"])); // new Usuario eh a classe Usuario de user.php\n\t}", "title": "" }, { "docid": "201374c54b02e7be1a34c143f5702e16", "score": "0.572946", "text": "function createCustomer($name, $surname, $email, $phone, $comment, $peopleNumber, $orderDate, $productID){\r\n\r\n $name = htmlspecialchars($name, ENT_QUOTES); // apsauga nuo hackinimo uzkoduoja : ' \" < zenklus. NEPAMIRST NAUDOTI!!\r\n $surname = htmlspecialchars($surname, ENT_QUOTES);\r\n\r\n $mySQL = \" INSERT INTO bookingform\r\n VALUES (NULL, '$name', '$surname', '$email', '$phone', '$comment', '$peopleNumber', '$orderDate', '$productID')\r\n \";\r\n $success = mysqli_query(getConnection(), $mySQL);\r\n\r\n if ($success == false && DEBUG_MODE > 0){\r\n echo \"ERROR: Booking failed <br />\";\r\n }\r\n}", "title": "" }, { "docid": "38f1e6b3e81c3c2400ee918a2bebfdc7", "score": "0.57269245", "text": "public function insert_access()\n\t{\n\t\t$init = new admin_model();\n\n\t\t$resource = $this->request->getPost('resource');\n\t\t$access = $this->request->getPost('access');\n\n\t\t$resource_query = $init->insert_access([$resource, $access]);\n\n\t\t$this->output_json($resource_query);\n\t}", "title": "" }, { "docid": "004bcba7efd8375175b199c9081d20bb", "score": "0.5725933", "text": "public function customer_add()\n\t{\n\t\t$post_data = $this->input->post(NULL, TRUE);\r\n $msg = $this->check_form_validation($post_data); // serverside validation\r\n if($msg != '')\r\n {\r\n\t\t\techo json_encode(array(\"status\" => \"Error\", \"msg\" => $msg));\r\n }\r\n else\r\n {\n\t\t\t$data = array(\n\t\t\t\t'customer_name' => $this->input->post('customer_name'),\n\t\t\t\t'phone' => $this->input->post('phone'),\n\t\t\t\t'city' => $this->input->post('city'),\n\t\t\t\t'state' => $this->input->post('state'),\n\t\t\t\t'postal_code' => $this->input->post('postal_code'),\n\t\t\t\t'country' => $this->input->post('country'),\n\t\t\t);\t\n\t\t\tif($this->customer_model->customer_add($data) === true)\n\t\t\t\techo json_encode(array(\"status\" => \"Success\", \"msg\" => \"Data added successfully.\")); \n\t\t\telse\n\t\t\t\techo json_encode(array(\"status\" => \"Error\", \"msg\" => \"Please try again\")); \n\t\t}\n\t}", "title": "" }, { "docid": "c148114107ae9803153cb000b2d0f64d", "score": "0.5725887", "text": "function insertRecord()\r\n {\r\n // extract the auto increment field. Only one field can be the autoincrement\r\n $autoincrementField = '';\r\n if ($this->HasAutoInc)\r\n {\r\n $keyfields = $this->readKeyFields();\r\n if (is_array($keyfields))\r\n {\r\n foreach($keyfields as $fname => $type)\r\n {\r\n $autoincrementField = $fname;// changed from $fname to $key\r\n break;\r\n }\r\n }\r\n }\r\n\r\n try\r\n {\r\n $this->Database->insert(\r\n $this->_tablename,\r\n $this->_fieldbuffer,\r\n $autoincrementField\r\n );\r\n }\r\n catch (Exception $e)\r\n {\r\n //TODO: Handle errors\r\n throw $e;\r\n }\r\n\r\n //TODO: provide a way to resync in parent class (Dataset)\r\n $this->_fields = array_merge($this->_fields, $this->_fieldbuffer);\r\n }", "title": "" }, { "docid": "951e6ecdaafc5db27ea86a3db2f9178f", "score": "0.57239324", "text": "protected function _beforeInsert()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "b46c1b17c75cdc9a54526e9da77e257a", "score": "0.57213575", "text": "public function add_customer(){\n\t\t\tif ($this->session->userdata('is_logged_in') == true){\n\n\t\t\t\t$this->load->model('customers_model');\n\n\t\t\t\t$new_customer = $this->get_customer_data_from_form();\n\n\t\t\t\t$query = $this->customers_model->add_new_customer($new_customer);\n\n\t\t\t\tif ($query){\n\t\t\t\t\t$this->session->set_flashdata('notice', 'Customer Successfully Added');\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->session->set_flashdata('notice', 'Error Adding Customer');\n\t\t\t\t}\n\n\t\t\t\t$redirect = (site_url() . '/customers/edit_customer/' . $query );\n\t\t\t\tredirect($redirect);\n\t\t\t}\n\n\t\t\telse { // not logged in\n\n\t\t\t\tredirect (site_url());\n\t\t\t}\n\n\n\t\t}", "title": "" } ]
62e28cd5f558bca7ff67f8834334970f
Determines whether or not a piece should be added to the graph.
[ { "docid": "d6807ec3233ff16045fa0e87ab973e28", "score": "0.0", "text": "public function is_needed() {\n\t\t$post_types = apply_filters( 'be_product_review_schema_post_types', array( 'post' ) );\n\t\tif( is_singular( $post_types ) ) {\n\t\t\t$display = get_post_meta( $this->context->id, 'be_product_review_include', true );\n\t\t\tif( 'on' === $display ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" } ]
[ { "docid": "5bb3d4101307216f0fab9da64c6f2992", "score": "0.5364343", "text": "public function canAdd()\n\t{\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "5bb3d4101307216f0fab9da64c6f2992", "score": "0.5364343", "text": "public function canAdd()\n\t{\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "93816c24337b62bef14b51be553edd70", "score": "0.52318025", "text": "public function isWhereNeeded(): bool\n {\n $fac = $this->getFacility();\n return $fac && $this->isNeededAtLocation($fac);\n }", "title": "" }, { "docid": "884b3b54867ce5f8402fedd1d0d5b0da", "score": "0.52171975", "text": "public function isAdd()\n {\n return $this->getMode() === static::MODE_ADD;\n }", "title": "" }, { "docid": "d1d42e55305c7929bfb4da70300dbd50", "score": "0.52150965", "text": "public function put($piece, $square)\n {\n // check for valid piece object\n if (!(isset($piece['type']) && isset($piece['color']))) {\n return false;\n }\n\n // check for piece\n if (strpos(self::SYMBOLS, strtolower($piece['type'])) === false) {\n return false;\n }\n\n // check for valid square\n if (!array_key_exists($square, self::SQUARES)) {\n return false;\n }\n\n $sq = self::SQUARES[$square];\n\n // don't let the use place more than one king\n if ( \n $piece['type'] == self::KING \n && !(\n $this->kings[$piece['color']] == null || $this->kings[$piece['color']] == $sq)\n ) \n {\n return false;\n }\n\n $this->board[$sq] = [\n 'type' => $piece['type'], 'color' => $piece['color']\n ];\n\n if ($piece['type'] == self::KING) {\n $this->kings[$piece['color']] = $sq;\n }\n\n $this->updateSetup($this->fen()); //generate f e n\n\n return true;\n }", "title": "" }, { "docid": "343d1647faf41c9e40f2f9666e9b8107", "score": "0.52124715", "text": "public function isThereNeedToFill(): bool\n {\n return ! isset($this->fillInstance)\n || isset($this->fillInstance) && $this->fillInstance\n ;\n }", "title": "" }, { "docid": "18d3d5e37159c219dff6814639499895", "score": "0.5139407", "text": "public function isValid()\n {\n if(($this->qualityIsGreen() || $this->qualityIsOrange()) && !empty($this->items())){\n return true;\n }\n return false;\n\t}", "title": "" }, { "docid": "126082af10e0644e1d7b6ae65c8cecac", "score": "0.51393795", "text": "public function hasShape()\n {\n return !is_null($this->shape);\n }", "title": "" }, { "docid": "4ab4a4b619b46edf1a6d0b519eef9fbd", "score": "0.5115048", "text": "protected function hasAddOn()\n\t{\n\t\treturn isset($this->prepend) || isset($this->append);\n\t}", "title": "" }, { "docid": "860fdedface733384de30002c65c516b", "score": "0.51018167", "text": "public function isDrawn() {\n return $this->ply >= 9;\n }", "title": "" }, { "docid": "2491a0b710be38dd01efeafd721786e6", "score": "0.5092932", "text": "public function isDraw(): bool {\n return !$this->isWin() && count($this->legalMoves()) == 0;\n }", "title": "" }, { "docid": "2491a0b710be38dd01efeafd721786e6", "score": "0.5092932", "text": "public function isDraw(): bool {\n return !$this->isWin() && count($this->legalMoves()) == 0;\n }", "title": "" }, { "docid": "09ff0bc1b7d3b202fe112ed0d90d549d", "score": "0.50916034", "text": "public function add_unit(Unit $unit)\n {\n return true;\n }", "title": "" }, { "docid": "7b4b971527eb32d1414986c8fb2b310d", "score": "0.50830185", "text": "public function hasSpawnPointList()\n {\n return $this->SpawnPoint !== null;\n }", "title": "" }, { "docid": "fe33e84f653c7dcea6b1ccac0cdf1b67", "score": "0.5070553", "text": "public function hasBuilding(){\n return $this->_has(13);\n }", "title": "" }, { "docid": "57aa462b1eb10fee6c1ae417430ab712", "score": "0.5062886", "text": "function hasArtwork()\n {\n if (!empty($this->_parentartworks))\n { \n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "23a28f3c2bef16be6aff4146db2d0d93", "score": "0.50623196", "text": "public function isUnknownPart()\n {\n return !$this->isArticle() && !$this->isNamePart()\n && !$this->isSize() && !$this->isColor()\n && !$this->isStickOrientation();\n }", "title": "" }, { "docid": "4511b640f86be014d69306116eede0a5", "score": "0.50588846", "text": "public function canMoveSomewhere(): bool\n {\n $moves = [\n ['x' => $this->pos['x'] - 1, 'y' => $this->pos['y'] - 1],\n ['x' => $this->pos['x'] - 1, 'y' => $this->pos['y']],\n ['x' => $this->pos['x'] - 1, 'y' => $this->pos['y'] + 1],\n ['x' => $this->pos['x'], 'y' => $this->pos['y'] + 1],\n ['x' => $this->pos['x'] + 1, 'y' => $this->pos['y'] + 1],\n ['x' => $this->pos['x'] + 1, 'y' => $this->pos['y']],\n ['x' => $this->pos['x'] + 1, 'y' => $this->pos['y'] - 1],\n ['x' => $this->pos['x'], 'y' => $this->pos['y'] - 1],\n ];\n\n return $this->canAnyByMoves($moves);\n }", "title": "" }, { "docid": "d391c2a47609d265bbdad402b2288629", "score": "0.5055384", "text": "public function isFullyCovered()\n {\n return (count($this->getUnCoveredMethods()) == 0);\n }", "title": "" }, { "docid": "dc7e10490b8a82e7fed17d2321ce49a0", "score": "0.5045667", "text": "public function canAdd(Card $card, Pile $src = NULL) {\n // source can neither be foundation nor stock\n if($src instanceof FoundationPile || $src instanceof StockPile){\n return FALSE;\n }\n // if this pile has at least one card \n // and breaks suit and rank\n if(!$this->isEmpty() && \n !($card->isSameSuit($this->top()) \n && $card->isLessThanByOne($this->top()))){\n return FALSE;\n }\n return parent::canAdd($card, $src);\n }", "title": "" }, { "docid": "aa30c797de6c302c770a8c4b9d9b45e2", "score": "0.50415534", "text": "public function isThereNeedToConfigure(): bool\n {\n return ! isset($this->configureInstanceOfEntity)\n || isset($this->configureInstanceOfEntity) && $this->configureInstanceOfEntity\n ;\n }", "title": "" }, { "docid": "a8999e4745023e16739d960044ed31b9", "score": "0.5026911", "text": "private function can_add_snippet_shop() {\n\t\t/**\n\t\t * Allow developer to remove snippet data from Shop page.\n\t\t *\n\t\t * @param bool $unsigned Default: false\n\t\t */\n\t\tif (\n\t\t\tis_shop() &&\n\t\t\t(\n\t\t\t\ttrue === Helper::get_settings( 'general.remove_shop_snippet_data' ) ||\n\t\t\t\ttrue === apply_filters( 'rank_math/snippet/remove_shop_data', false )\n\t\t\t)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a1ec8f439da92e4afc6fb56524f6d1b8", "score": "0.5003426", "text": "protected function isAddable()\n {\n return $this->is_addable;\n }", "title": "" }, { "docid": "c781bbee0b431ed7981f180394721f5e", "score": "0.50008506", "text": "public function testCheckIfCalculationNeededFunctionReturnsTrueIfNotEmpty()\n {\n $entity = new Athlete();\n\n $collection = new Collection();\n $collection->push($entity);\n\n $this->strategy->setEntities($collection);\n\n $result = $this->strategy->checkIfCalculationNeeded();\n\n $this->assertInternalType('boolean', $result);\n $this->assertEquals(true, $result);\n }", "title": "" }, { "docid": "37e38cfeb06d06561bc11f69a7474aeb", "score": "0.4994793", "text": "function can_add_child($child) {\n if ($this->has_children()) {\n if (get_class($child) != $this->get_childrentype()) {\n return false;\n } else {\n return true;\n }\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "bc3b0bbdf384c7f61daa07e9c0b3f07f", "score": "0.49812728", "text": "public function hasWildPokemonList()\n {\n return $this->WildPokemon !== null;\n }", "title": "" }, { "docid": "ff156577ee3ad65ef1d34ef7b1009ca2", "score": "0.49599212", "text": "public function hasLayer(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "d332a66a2fceeadf893a3945b3188b80", "score": "0.4942196", "text": "public function hasCover()\n {\n return !empty($this->getCoverId());\n }", "title": "" }, { "docid": "3d34dd2a45374163dcfa8943df5db072", "score": "0.4941836", "text": "public function addFromPile(Pile $pile)\n\t{\n\t\tif ($pile instanceof StockPile)\n\t\t\treturn false;\n\n\t\treturn parent::addFromPile($pile);\n\t}", "title": "" }, { "docid": "7ba5f0cb50c877afa9bca696f58ab55a", "score": "0.49314427", "text": "public function canAddRewardPoints()\n {\n $frequency = $this->_rewardData->getPointsConfig(\n 'invitation_order_frequency',\n $this->getReward()->getWebsiteId()\n );\n if ($frequency == '*') {\n return !$this->isRewardLimitExceeded();\n } else {\n return parent::canAddRewardPoints();\n }\n }", "title": "" }, { "docid": "6d6d52860a55d8796d204157a2d94561", "score": "0.49182174", "text": "public function needsGMs()\n {\n if (!$this->isLoaded()) {\n return false;\n }\n\n if ($this->countParticipantType('spilleder') >= $this->getAktivitet()->spilledere_per_hold) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "264c7beca699f0313d14b7e7ed9bebad", "score": "0.4911472", "text": "public function hasKind(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "264c7beca699f0313d14b7e7ed9bebad", "score": "0.4911472", "text": "public function hasKind(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "bc2d1db08d05f5a046e48c319d0b2277", "score": "0.48908466", "text": "public function canDeductPoints(string $key): bool\n {\n $rtn = false;\n \n if ($this->getPoints($key) > 0) {\n $rtn = true;\n }\n \n return $rtn;\n }", "title": "" }, { "docid": "f1d96710cff59bc5a0ce87aaf5ede8b5", "score": "0.4888919", "text": "public function isSetup()\n {\n return $this->canClassify() && $this->hasSetCost();\n }", "title": "" }, { "docid": "9372454060e04f8d8dbec498981fbfc5", "score": "0.48880315", "text": "public function add(): bool\n\t{\n\t\t$preparedData = $this->sqlHelper->prepareInsert($this->tableName, [\n\t\t\t'DATE_CREATE' => (new DateTime()),\n\t\t\t'UUID' => $this->uuid,\n\t\t]);\n\n\t\t$this->connection->queryExecute(\n\t\t\t\"INSERT IGNORE INTO $this->tableName (\" . $preparedData[0] . \") VALUES (\" . $preparedData[1] . \");\"\n\t\t);\n\t\t$rowsAffected = $this->connection->getAffectedRowsCount();\n\n\t\treturn $rowsAffected > 0;\n\t}", "title": "" }, { "docid": "5eb98221c44fd69da9f02382d4d4009b", "score": "0.4883011", "text": "public function hasMainboardProduct()\n {\n return $this->mainboard_product !== null;\n }", "title": "" }, { "docid": "e59f75fa0952b3993c5e692fced7bf0f", "score": "0.48822612", "text": "public function add()\n { \n $productExist = $this->ifProductExist($this->product->getId());\n return $productExist && $this->checkFormat() ? $this->push() : false;\n }", "title": "" }, { "docid": "87082359be9d11186097ae3ae2d0b649", "score": "0.4877493", "text": "public function valid() {\n\t\treturn key( $this->features ) !== null;\n\t}", "title": "" }, { "docid": "6e5f03253430b8646dfe60caeaa4b139", "score": "0.48726535", "text": "public function canAdd()\n\t{\n\t\t$canAdd = (\n\t\t\t!$this->socnetGroupClosed &&\n\t\t\t(\n\t\t\t\t$this->listsPermission > \\CListPermissions::CAN_READ ||\n\t\t\t\t\\CIBlockSectionRights::UserHasRightTo(\n\t\t\t\t\t$this->rightParam->getIblockId(), $this->rightParam->getEntityId(), \"section_element_bind\")\n\t\t\t)\n\t\t);\n\n\t\tif ($canAdd)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->errorCollection->setError(new Error(\"Access denied\", self::ACCESS_DENIED));\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "77e38e74a5b84d838fedaee79ceea733", "score": "0.486911", "text": "function Add()\n {\n if(empty($this->GroupId) || empty($this->BuildType)\n || empty($this->BuildName) || empty($this->SiteId) || empty($this->Expected))\n {\n return false; \n } \n\n if(!$this->Exists())\n {\n if(!pdo_query(\"INSERT INTO build2grouprule (groupid,buildtype,buildname,siteid,expected,starttime,endtime)\n VALUES ('$this->GroupId','$this->BuildType','$this->BuildName','$this->SiteId','$this->Expected','$this->StartTime','$this->EndTime')\"))\n {\n add_last_sql_error(\"BuildGroupRule Insert()\");\n return false;\n }\n return true;\n } \n return false;\n }", "title": "" }, { "docid": "5e302bbdd3fe75102a57e061cb6a2b3f", "score": "0.48682332", "text": "private function checkDraw() {\n return $this->movesTaken == SIZE * SIZE;\n }", "title": "" }, { "docid": "51063f8eccee1bdcaff1f53d6b79567e", "score": "0.48675668", "text": "public function fitnessAlreadyMeasured(): bool\n {\n /** @var Specie $specie */\n $species = $this->pool->getSpecies();\n $specie = $species->offsetGet($species->getKeys()[$this->pool->getCurrentSpecies()]);\n if (!$specie instanceof Specie) {\n return false;\n }\n\n /** @var Genome $genome */\n $genome = $specie->getGenomes()->offsetGet($specie->getGenomes()->getKeys()[$this->pool->getCurrentGenome()]);\n if (!$specie instanceof Specie) {\n return false;\n }\n\n return $genome->getFitness() !== 0;\n }", "title": "" }, { "docid": "732b73bea35cfa306e3bbf8757283b53", "score": "0.48585153", "text": "public function isPartlyFull()\n {\n return $this->occupancyStatus == self::OCCUPANCY_STATUS_PARTLY_FULL;\n }", "title": "" }, { "docid": "c500b80fc1907a3d19f60cc9abf32e8a", "score": "0.48560596", "text": "public function valid() : bool {\n\t\treturn isset($this->children[$this->pointer]);\n\t}", "title": "" }, { "docid": "6acf267c25455987cd89b71dd935a850", "score": "0.48552433", "text": "public function shouldInsert()\n\t{\n\t\treturn ($this->table == null);\n\t}", "title": "" }, { "docid": "38f2871f60395c2bf65462952ca76c0c", "score": "0.48503417", "text": "public function isKnown(): bool\n {\n return '' !== $this->section;\n }", "title": "" }, { "docid": "62b06cf7351b5773ebe6d16ec622aa6a", "score": "0.4840536", "text": "public function hasArtifacequest(){\n return $this->_has(17);\n }", "title": "" }, { "docid": "e2e6c06d99b0beac043bc09b3fbe610f", "score": "0.4832124", "text": "public function addVertexCollection(string $collection): bool\n {\n try {\n // For new collections, just add the collection to 'orphanCollections'\n if ($this->isNew()) {\n $this->orphanCollections[] = $collection;\n return true;\n }\n\n if (!$this->database) {\n throw new DatabaseException(\"Database not defined\");\n }\n\n // Adds the vertex collection on server.\n $connection = $this->database->getConnection();\n $uri = Api::buildSystemUri($connection->getBaseUri(), Api::GRAPH);\n $uri = sprintf(\"%s/%s\", Api::addUriParam($uri, $this->getName()), 'vertex');\n $response = $connection->post($uri, ['collection' => $collection]);\n $this->orphanCollections[] = $collection;\n return true;\n } catch (ClientException $exception) {\n $response = json_decode((string)$exception->getResponse()->getBody(), true);\n $databaseException = new DatabaseException($response['errorMessage'], $exception, $response['errorNum']);\n throw $databaseException;\n }\n }", "title": "" }, { "docid": "f81a81248f21f01b9da2a61baa724f26", "score": "0.48224", "text": "public final function isEmpty() : bool\n {\n\n return $this->point->isEmpty()\n && $this->size->width < 1\n && $this->size->height < 1;\n\n }", "title": "" }, { "docid": "a4dcf609efdec574626761720b777ac0", "score": "0.4821095", "text": "public function hasNodes()\n {\n return count($this->nodes) != 0;\n }", "title": "" }, { "docid": "fdf1a33a79e64671038ba6ce3aa328dc", "score": "0.48196703", "text": "protected function HasWeight() {\n\treturn !is_null($this->ShipPounds()) || !is_null($this->ShipOunces());\n }", "title": "" }, { "docid": "476f993c1b5c08d8811314f81d3188af", "score": "0.4818806", "text": "function rules_condition_entity_is_new($entity, $settings, $state, $element) {\n $wrapper = $state->currentArguments['entity'];\n return !$wrapper->getIdentifier() || !empty($entity->is_new);\n}", "title": "" }, { "docid": "c1309a846fe77f8a0bef8d2adee8dfc9", "score": "0.48122668", "text": "public function hasKind(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "4bd8352676dbca5425172bc561b014c1", "score": "0.4807649", "text": "protected function orderDoesNotHaveFullyOperationalMember()\n {\n return $this->orderHasFullyOperationalMember() ? false : true;\n }", "title": "" }, { "docid": "62b0bb8061da39ae6762ccfccc7ca482", "score": "0.48012704", "text": "public function hasProducedAt(): bool;", "title": "" }, { "docid": "2d1e95b23074bdc871f1aa488aeba38c", "score": "0.47995764", "text": "public function valid()\n {\n if (!parent::valid()) {\n return false;\n }\n\n if ($this->container['x_resolution'] === null) {\n return false;\n }\n if ($this->container['y_resolution'] === null) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "f07cfe9e460983aa138b24dce3adef4a", "score": "0.47991106", "text": "public function isWin(): bool {\n $tuples = [\n [0, 1, 2],\n [3, 4, 5],\n [6, 7, 8],\n [0, 3, 6],\n [1, 4, 7],\n [2, 5, 8],\n [0, 4, 8],\n [2, 4, 6]\n ];\n foreach ($tuples as $tuple) {\n $fields = array_map(\n function ($i) {\n return $this->position[$i]->value();\n },\n $tuple\n );\n if ($fields[0] != TTTPiece::E && $fields[0] == $fields[1] && $fields[0] == $fields[2]) {\n return TRUE;\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "7ff70d4cb12e0ffed01c3f4b67fc3397", "score": "0.47959715", "text": "public function canAddCard(Card $card)\n\t{\n\t\t$topCard = $this->getTop();\n\n\t\t$baseRank = 1;\n\t\tif ($this->circular)\n\t\t\t$baseRank = self::$baseRank;\n\n\t\tif ($topCard === null)\n\t\t{\n\t\t\tif ($baseRank === null)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn $card->getRank() === $baseRank;\n\t\t} else {\n\t\t\treturn $card->isNextOf($topCard);\n\t\t}\n\t}", "title": "" }, { "docid": "290461d0f332ceabf6f277d85c9456e1", "score": "0.4789266", "text": "public function hasWeight(): bool\n {\n return isset($this->weight);\n }", "title": "" }, { "docid": "d5dc8b8662088a2ea22ce61b7d12cf83", "score": "0.47855502", "text": "public function canMove(): bool\n {\n return count($this->visitedCoordinates) < $this->matrix->getSize();\n }", "title": "" }, { "docid": "4d8dd107643554370524ce1541f847d9", "score": "0.477947", "text": "public function isEmpty(): bool\n {\n return $this->points->isEmpty();\n }", "title": "" }, { "docid": "cb354043cc6386a824f5f0ef15d3e72f", "score": "0.47747833", "text": "public function hasAddlist(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "ea1fff020fd3607c0d3ade8548afa4df", "score": "0.4770449", "text": "public function isWin(): bool {\n foreach ($this->getSegments() as $segment) {\n list($blackCount, $redCount) = $this->countSegment($segment);\n if ($blackCount == 4 || $redCount == 4) {\n return TRUE;\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "c8d9dc68e61912c849ff9aec838da117", "score": "0.4762123", "text": "public function add(Entity $entity, bool $allowDoubles = false): bool\n {\n if ($allowDoubles || !$this->has($entity)) {\n $id = $this->insert(array_merge([\n $this->OriginRefColumn => $this->OriginEntity->getPrimaryValue(),\n $this->TargetRefColumn => $entity->getPrimaryValue()\n ], $this->Filter));\n\n if ($id) {\n $this->addToList($id, $entity);\n return true;\n } else {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "7a994b9a8989a196f88eb483544aa24c", "score": "0.4759394", "text": "public function hasCurhair(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "369b81ce58ec82207215406c2a310de4", "score": "0.47592047", "text": "public function isPregnant() : bool\n {\n return $this->gestation > 0;\n }", "title": "" }, { "docid": "b6535ed7e92b8d7ce5bdc21ee5fec66a", "score": "0.475223", "text": "public function HasWon()\n\t{\n\t\tfor ($row=0; $row<$this->rowCount; $row++) {\n\t\t\tfor ($col=0; $col<$this->colCount; $col++) {\n\t\t\t\tif (!$this->exploredBitmap[$row][$col] && !$this->mineBitmap[$row][$col]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "93cea937fce896c57a688e793d298a2b", "score": "0.47505295", "text": "public function add($element): bool\n {\n foreach ($this->elements as $setElement) {\n if ($setElement === $element) {\n return false;\n }\n }\n\n $this->elements[] = $element;\n\n return true;\n }", "title": "" }, { "docid": "2b8e7a175f995cb983314923251c28f8", "score": "0.47488135", "text": "public function valid()\n {\n return is_object($this->pointed);\n }", "title": "" }, { "docid": "eeeb858644252c506dfb6435a55b04e0", "score": "0.47479355", "text": "protected function is_solved()\r\n {\r\n $squares = $this->_squares;\r\n\r\n foreach ($squares as $value)\r\n {\r\n if (empty($value))\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "1694b0e2c1a184b26231361b75160211", "score": "0.4734951", "text": "public function is_poly(): bool\n {\n return $this->poly_relationship;\n }", "title": "" }, { "docid": "db4a8a459cfb74b01c732453b865922e", "score": "0.47348538", "text": "public function hasOutOfSizeProduct(): bool\n {\n }", "title": "" }, { "docid": "9ef91f73f48f46ace1728ae681d936d6", "score": "0.47333726", "text": "public function isPadded(): bool;", "title": "" }, { "docid": "12dad732b9927588fae74cb6fc089636", "score": "0.47325367", "text": "public function hasStorefree(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "23c318888406d022fda2ed2affda5911", "score": "0.47320685", "text": "private function canInsertAt($x, $y, $width, $height) {\n if ($x < 0) return false;\n if ($y < 0) return false;\n if ($x + $width > $this->width ) return false;\n if ($y + $height > $this->height) return false;\n\n // Check if we intersect any already-packed triangles\n $newRectangle = array($x, $y, $width, $height);\n\n foreach ($this->rectangles as $rectangle) {\n if (RectanglePacker::rectangleIntersectsRectangle($rectangle, $newRectangle)) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "67ba7b38f19ef7a3efc6ed3864a0a523", "score": "0.47289735", "text": "public function needCard() {\n return TRUE;\n }", "title": "" }, { "docid": "7c104d4f9e3f96dbc2673ffb21c7e9cc", "score": "0.47259706", "text": "public function hasCover()\n\t{\n\t\treturn ($this->getAttribute('cover') != NULL);\n\t}", "title": "" }, { "docid": "f65a7e91667f551b7b2884f340e4669c", "score": "0.47219744", "text": "public function isSingleEliminationType()\n {\n return $this->settings != null && $this->settings->treeType == ChampionshipSettings::SINGLE_ELIMINATION;\n }", "title": "" }, { "docid": "8d755b70bb5b5aeeacdc544393ecbd5d", "score": "0.47218984", "text": "public function hasFeature($what)\n {\n return in_array($what, $this->_features) || empty($this->_features);\n }", "title": "" }, { "docid": "0560d7801fe98269bde0c59b9adebe1a", "score": "0.4719944", "text": "public function hasGood(){\r\n return $this->_has(1);\r\n }", "title": "" }, { "docid": "7422e67a8c30c359ba971958bfe2d285", "score": "0.47177327", "text": "public function is_connected() {\n\t\t$settings = $this->get_settings()->get();\n\n\t\tif ( ! $settings ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $settings['products'] ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $settings['publicationID'] ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $settings['revenueModel'] ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn parent::is_connected();\n\t}", "title": "" }, { "docid": "bad79f4e93b25eb53a1bee2278995ac0", "score": "0.47175646", "text": "public function hasFeatureImage(): bool\n {\n return !empty($this->getFeatureImageId());\n }", "title": "" }, { "docid": "9a80c8219b2c357952592bf59d43c8d1", "score": "0.47161466", "text": "public function isDruggable();", "title": "" }, { "docid": "f623e9c7c76227e58417211ecfbbda27", "score": "0.47118583", "text": "public function valid()\n {\n if (isset($this->blockChains[$this->index]))\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "c877a1818fdc156b510493a9f1e1ae6c", "score": "0.47106487", "text": "public function hasDecimatedSpawnPointList()\n {\n return $this->DecimatedSpawnPoint !== null;\n }", "title": "" }, { "docid": "c3e61823ee01e7647cdb343075b4a838", "score": "0.4708358", "text": "public function can_create_feed() {\n\t\treturn $this->square_api_ready() && $this->has_square_card_field();\n\t}", "title": "" }, { "docid": "1675e76ec4cec600f87c9dd6f161fbc5", "score": "0.47071886", "text": "public function onGrid(Point $point): bool\n {\n if(($point->x > $this->width) || ($point->x < 0)) {\n return false;\n }\n\n if(($point->y > $this->height) || ($point->y < 0)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "8f816d04b6848ae55e9294ca72c99347", "score": "0.4705211", "text": "public function isFull()\n {\n if (!$this->isLoaded())\n {\n return false;\n }\n return (!$this->needsGMs() && !$this->needsGamers());\n }", "title": "" }, { "docid": "add96191321a7b128b5bdd2f7199aa72", "score": "0.4703905", "text": "public function ajoutPossible($dossierpcg66_id) {\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "4312d67c3c74d147acd0fc9b2b3c4d75", "score": "0.46896967", "text": "public function hasHappened(): bool\n\t{\n\t\treturn $this->dateTime->diff(DateTime::createFromFormat('U', (string) time(), $this->dateTime->getTimezone()))->format(\n\t\t\t'%R'\n\t\t) === '+';\n\t}", "title": "" }, { "docid": "cdf49ca7c9fa9dfd4514289737bba885", "score": "0.46878394", "text": "public function needsGamers()\n {\n if (!$this->isLoaded()) {\n return false;\n }\n\n if ($this->countParticipantType('spiller') >= $this->getAktivitet()->min_deltagere_per_hold) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "3f50d99730f6c0a32fc8d6b78ec13c97", "score": "0.46858498", "text": "public function isMissing(): bool;", "title": "" }, { "docid": "8416e5a019fa15753ec44d4d9702e1ef", "score": "0.46812522", "text": "public function valid()\n {\n return (bool)current($this->navPoints);\n }", "title": "" }, { "docid": "92685afc21f40db750d3fc3a88d18431", "score": "0.46751776", "text": "public function addFigure($figure, $x, $y) {\n if ($this->table[$x][$y] == null) {\n $this->table[$x][$y] = $figure;\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "29724e8c657e7b2ecc61bc2dd2e6565f", "score": "0.46714574", "text": "public function hasElevator(): bool\n {\n return !!$this->elevator;\n }", "title": "" }, { "docid": "1b530a9abc24ad8abf0b3726c8e1380b", "score": "0.4653299", "text": "public function isFull(): bool\n {\n return $this->getLevel() >= $this->capacity;\n }", "title": "" }, { "docid": "f0eb9db4f115f8967a87c750044a6761", "score": "0.4648461", "text": "public function isGraph(): bool\n {\n return $this->getType() === \"graph\";\n }", "title": "" }, { "docid": "fb9d0b0808fd638eafd002146be557d1", "score": "0.46471173", "text": "public function hasX()\n {\n return $this->xComponent != null;\n }", "title": "" }, { "docid": "f1f50f6e8fefb95e497c0a659196a95a", "score": "0.46447042", "text": "public function hasThumb() {\n return ($this->thumb()) ? true : false;\n }", "title": "" }, { "docid": "876e47f9a60d55683b91633e43a96653", "score": "0.4636538", "text": "public function hasCanSingleDivorce(){\n return $this->_has(8);\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "456d95bf3a01f60e227cda982fe54cdd", "score": "0.0", "text": "public function destroy($id)\n {\n try {\n ProductMovementManager::delete($id);\n return response(200);\n } catch (\\Exception $err) {\n return response()->json(['error' => $err->getMessage()], 404);\n }\n }", "title": "" } ]
[ { "docid": "67120cc52c09f1239f92f34fd173437e", "score": "0.7333458", "text": "function remove($resource)\n {\n }", "title": "" }, { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "96aa9ea6689a46a9441f009aa879d999", "score": "0.6885214", "text": "public function removeResource($resource)\n {\n // Remove the Saved Resource\n $join = new User_resource();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n\n // Remove the Tags from the resource\n $join = new Resource_tags();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n }", "title": "" }, { "docid": "d522def58731edf5dda07c4a8e3cb839", "score": "0.6839906", "text": "public function remove(IUser $user, ?IResource $resource): void;", "title": "" }, { "docid": "5b18f4f0f245d93e1d14486ac0afbbc7", "score": "0.6735704", "text": "public function remove(ResourceInterface $resource)\n {\n $this->_em->remove($resource);\n $this->_em->flush($resource);\n }", "title": "" }, { "docid": "6ffd51684d27200dd20bb77ae5392465", "score": "0.65282005", "text": "public function dispatchOnPostRemoveResource($resource);", "title": "" }, { "docid": "20340ae69f46965449dc508b639c84e9", "score": "0.6511765", "text": "public function remove_storage()\n\t{\n\t\t$this->_storage->destroy_storage();\n\t}", "title": "" }, { "docid": "8566de5772ba8f11471da580f8907d09", "score": "0.64848197", "text": "public static function remove(string $resourcePath): void\n {\n $file = self::generatePath(\n self::generateHash($resourcePath)\n );\n\n if (\\is_file($file)) {\n \\unlink($file);\n }\n }", "title": "" }, { "docid": "b9b85ab47af2f085664ea4fb3f54b26d", "score": "0.6444909", "text": "public function dispatchOnPreRemoveResource($resource);", "title": "" }, { "docid": "ae13b12a81ef5a04c54c2ae2a1fbfc6f", "score": "0.61720115", "text": "public function unsetStorageId();", "title": "" }, { "docid": "8c0ed41f8673fd843b7ffdb22bce5eb0", "score": "0.611688", "text": "public function afterDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "77d39170a9748d8eca11f292068832c6", "score": "0.6077847", "text": "public function delete($storageName, $key);", "title": "" }, { "docid": "43dc6df10818b4435103bc0ee31fc8d1", "score": "0.6045101", "text": "public function destroy($id)\n {\n $record = Resource::where('id', $id)->get();\n\n if (!empty($record[0])) {\n DB::beginTransaction();\n\n $isRemoved = self::remove($record);\n }\n }", "title": "" }, { "docid": "db4382353b96e87cb5a70c801383930a", "score": "0.603214", "text": "public function delete($resourceId = null, $options = []);", "title": "" }, { "docid": "a2014b07fec4eb27432905d903e64664", "score": "0.59784347", "text": "public function destroy($id)\n {\n $storage = Storage::find($id);\n if($storage->item())\n {\n $storage->item()->detach();\n if( $storage->delete() )\n {\n return response('Deleted.',200);\n }\n }\n return response('Error.',400);\n }", "title": "" }, { "docid": "6dd2ae009f2219fb531720e25a26531d", "score": "0.5974692", "text": "public function remove() {\n\t\t$this->storage->rmdir($this->path);\n\t\t$this->user->triggerChange('avatar');\n\t}", "title": "" }, { "docid": "462a710c39c75c675bfe433bce80e2fe", "score": "0.5951811", "text": "public function destroy()\n {\n if ($this->instance instanceof Storage) {\n $this->instance->destroy();\n }\n $this->instance = null;\n }", "title": "" }, { "docid": "c39bd1cfb71eb924026011c0e976a9d4", "score": "0.5933563", "text": "public function delete(string $resourceType, $modelOrResourceId): void;", "title": "" }, { "docid": "31f350f911a74d37fb3a78e6981becb5", "score": "0.5921418", "text": "public function removeStorage()\n\t{\n\t\t$this->taskExec('docker rm chrome-print-storage')->run();\n\t}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "d03fcfa49d2ade09cffc8d88d701076d", "score": "0.58893216", "text": "public function dropStorageFromName($storageName);", "title": "" }, { "docid": "7a7d76b4d53301e7ae6922b772849358", "score": "0.5886972", "text": "public function destroy($file)\n {\n $file = File::where('id', $file)->first();\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n $file->delete();\n return redirect()->route('files.index')->with('eliminar', 'ok');\n }", "title": "" }, { "docid": "3f6a8794d81fc01347d2f3307ac44d78", "score": "0.58504206", "text": "public function destroy($id)\n {\n //\n\n $contratista= contratistas::findOrFail($id);\n\n if (Storage::delete('public/'.$contratista->Foto)){\n Contratistas::destroy($id);\n\n }\n\n \n \n return redirect('contratistas')->with('Mensaje','Contratista eliminado');\n }", "title": "" }, { "docid": "a85763dd50ac74b8d2b8124b1c0e3e7b", "score": "0.5850285", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return back()->with('info', 'Resource deleted');\n }", "title": "" }, { "docid": "02a5bc50f3aa8ecd04834387832bc77c", "score": "0.5844418", "text": "public function destroy($id)\n {\n // $this->authorize('haveaccess','producto.destroy');\n $producto= Producto::findOrFail($id);\n\n if(Storage::delete('public/'.$producto->imagen)){\n\n Producto::destroy($id); \n }\n\n return redirect('producto');\n }", "title": "" }, { "docid": "8f406917023a0110d93d6350033a3ab5", "score": "0.58313775", "text": "public function removeItem($id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "title": "" }, { "docid": "a193f7ebf258b5fb63b8919a07678081", "score": "0.5821789", "text": "public function removeAll ($storage) {}", "title": "" }, { "docid": "dc36a581460d40a22ac889b4e61a4ab9", "score": "0.58165264", "text": "public function removeResource($resourceID)\n {\n $resourceID = db::escapechars($resourceID);\n $sql = \"DELETE FROM kidschurchresources WHERE resourceID='$resourceID' LIMIT 1\";\n $result = db::execute($sql);\n if($result){\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "8f1b5736b25701e2b67e4f655f581689", "score": "0.57634306", "text": "public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->add($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }", "title": "" }, { "docid": "5cc9f2ec9efb9c5303b848052688e6c4", "score": "0.5744329", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $filename = $product->image;\n $product->delete();\n Storage::delete($filename);\n }", "title": "" }, { "docid": "4d84ab18e7e3c7bf3662c486977fb999", "score": "0.57371354", "text": "public function delete() {\n return $this->storage->delete($this->getId());\n }", "title": "" }, { "docid": "cbac86afaa4d65131418099d416a05f8", "score": "0.5731129", "text": "public function destroy($id)\n {\n $resource = Resource::find($id);\n\n if ($fileName = $resource->book->name) {\n $file = public_path() . '/resources/' . $fileName;\n unlink($file);\n }\n\n $resource->delete();\n\n $message = 'El recurso literario \"' . $resource->title . '\" ha sido eliminado.';\n $class = 'danger';\n\n Session::flash('message', $message);\n Session::flash('class', $class);\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "fec8d4881ffc82e41c0642f366a1a75a", "score": "0.5726655", "text": "public function delete($resource)\n {\n return DB::transaction(function () use ($resource) {\n $resource = $this->beforeDelete($resource);\n\n $resource->delete();\n\n return $this->afterDelete($resource);\n });\n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "bf109080b5ee3a89d2c795999303aee7", "score": "0.5680265", "text": "public function delete(){\n if($this->removable) {\n $directory = $this->getRootDir();\n\n App::fs()->remove($directory);\n }\n }", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.56680655", "text": "public function removeFile();", "title": "" }, { "docid": "3819490d97e5dfe8f2ffd81ae03e6e53", "score": "0.56674856", "text": "public function remove(ReadModelInterface $element);", "title": "" }, { "docid": "b182edae2a719de4edc919c7a7b5885e", "score": "0.5663417", "text": "public function destroy($id)\n {\n\n $post = Roler::findOrFail($id);\n\n $path=public_path('/storage/uploads/');\n if (isset($post->image)) {\n $oldname=$post->image;\n File::delete($path.''.$oldname);\n }\n\n if (Roler::where('id', $id)->delete()) {\n\n return redirect()->back()->with('success', 'Record deleted successfully');\n\n }\n \n return redirect()->back();\n\n }", "title": "" }, { "docid": "2d475aa3098e33e6020ec88b30a03b25", "score": "0.5662905", "text": "public function purgeAsset($asset);", "title": "" }, { "docid": "cb1740d372b49263432bcc5cf39f97d8", "score": "0.56595594", "text": "public function destroy($id)\n {\n $emp = Employee::where('id',$id)->first();\n $photo = $emp->image;\n if($photo){\n unlink($photo);\n $emp->delete();\n }else{\n $emp->delete();\n }\n\n }", "title": "" }, { "docid": "7567af40a4901dd5dd42113b0bbccb95", "score": "0.56567484", "text": "public function removeResource($name)\n {\n unset($this->resources[$name]);\n if ($name === 'file') {\n $this->resources['file'] = array(\n 'class' => 'Dwoo\\Template\\File',\n 'compiler' => null\n );\n }\n }", "title": "" }, { "docid": "dc84ba400b70ef909d87e4a92424f6ac", "score": "0.5648853", "text": "public function destroy($id)\n {\n $album = Album::find($id);\n if($album==null){\n return reidrect('/portfolio')->with('error','this portfolio does not exist');\n }else{\n if(Storage::delete('public/album_covers/'.$album->cover_image)){\n $album->delete();\n return redirect('/portfolio')->with('success','Album removed');\n }\n }\n}", "title": "" }, { "docid": "ff85d8135b960df73371ee3703e738a4", "score": "0.5643097", "text": "public function destroy($id)\n {\n $file_name = DB::table(\"research\")->where('id',$id)->value('research_image');\n unlink(public_path(\"front/assets/images/what-we-do/research/\".$file_name)); \n DB::table(\"research\")->where('id',$id)->delete();\n return redirect()->route('all-research')->with('msg','Research deleted successfully with the image');\n }", "title": "" }, { "docid": "4dfae537943a63cbddf6151c77a88821", "score": "0.5636697", "text": "public function destroy($id)\n { \n $products = Product::findOrFail($id);\n // $delete = $products->slug;\n if($products->slug) {\n \\File::delete( public_path('storage/'.$products->slug ) );\n }\n \n // File::delete(public_path(\"storage/\"), $delete);\n Product::destroy($id);\n return redirect()->route('product-list.index')->with('success','Product Destory Successfully !!!');\n\n }", "title": "" }, { "docid": "d261281fcf3d7ca08f9b610eb6c3b1f0", "score": "0.56346554", "text": "public function destroy($id)\n {\n $photo = Photo::findOrFail($id);\n unlink(public_path() . $photo->image_url);\n $photo->delete();\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "5e46d09ef2d1d9f143d6831260992e3f", "score": "0.56248415", "text": "public function destroy($id)\n {\n $pres=Prescription::find($id);\n $fileName=$pres->item;\n unlink(storage_path().'/'.'app'.'/'.'public' .'/'.'prescriptions'.'/'. $fileName);\n $pres->delete();\n }", "title": "" }, { "docid": "0428848b8d6110c6be21d9479ece2192", "score": "0.56237406", "text": "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "1ed1ac142686a23f0827e755ecbc86db", "score": "0.5618705", "text": "public function delete($resource, array $args = [], array $options = []) {\n return $this->do('DELETE', $resource, $args, $options);\n\n }", "title": "" }, { "docid": "c0ac500c5b367ee589c3c33143eb832b", "score": "0.5617002", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return response()->json(['success' => 'borrado correctamente']);\n }", "title": "" }, { "docid": "a9c212129736f6a4e7fd4eddbccc6f2f", "score": "0.56163317", "text": "public function destroy($id)\n {\n $delete = Supplier::where(\"id\", $id)->first();\n $img = $delete->photo;\n if($img){\n unlink('backend/assets/images/supplier/'.$img);\n $delete->delete();\n toast('Supplier Information Delete Successfully','success');\n return redirect()->route('index.supplier');\n }else{\n toast('Supplier Not Deleted','success');\n return redirect()->route('index.supplier');\n }\n }", "title": "" }, { "docid": "6b5dbac631e37705e1c7cf319db2d7e6", "score": "0.56112254", "text": "public function deleteFromDisk()\n {\n return Storage::disk($this->getLocalDiskName())->delete($this->getStoragePath(true));\n }", "title": "" }, { "docid": "30687a12463a759554c0cdd15b679592", "score": "0.56098014", "text": "public function remove (EntityInterface $entity);", "title": "" }, { "docid": "14d4df02668a2d07f51666ab31e093b8", "score": "0.5609148", "text": "public function destroy($id)\n {\n $store = Store::findorFail($id);\n $product = Product::firstorfail()->where('store_id', $id);\n // unlink(public_path() . '/img/' . $product->image);\n $product->delete();\n unlink(public_path() . '/str_img/' . $store->image);\n $store->delete();\n return redirect()->back()->withDelete(\"Store Deleted Succesfully\");\n\n\n \n }", "title": "" }, { "docid": "942f7427e779526c94189558d1185b66", "score": "0.56033164", "text": "public function delete()\n {\n Yii::debug(\"Deleting last upload.\", self::CATEGORY);\n unlink($this->path);\n Yii::$app->session->remove(self::cacheKey());\n }", "title": "" }, { "docid": "f7e25a0f3411ba82d9ef10dbdff68bb4", "score": "0.5600532", "text": "public function beforeDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "bc970628483c63b419ea48f599c8c972", "score": "0.5598614", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $photo = $product->image;\n if ($photo) {\n unlink($photo);\n Product::findOrFail($id)->delete(); \n }else{\n Product::findOrFail($id)->delete();\n }\n\n }", "title": "" }, { "docid": "5f7b880d9042e6af83f1343c11f66a8e", "score": "0.5595085", "text": "public function destroy($record);", "title": "" }, { "docid": "eb90c146961dd680727f52741dd87d78", "score": "0.55930966", "text": "public function delete($key) {\n $this->assertKey($key);\n \n unset($this->storage[$key]);\n }", "title": "" }, { "docid": "1f90eefbc842f865e713597e80b0fc92", "score": "0.55857533", "text": "public function remove($file);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "268c30c6782025503083fc7ba52c1d0a", "score": "0.557298", "text": "public function delete() {\n $this->dataStoreAdapter->deleteObject($this->getUuid());\n }", "title": "" }, { "docid": "68aa5a7a833751b6ce51749cd9ab047e", "score": "0.5570882", "text": "public function destroy()\n {\n LaraFile::delete(\"images/{Auth::user()->avatar}\");\n }", "title": "" }, { "docid": "8179dc9b6bd99410fef7c74e3b56208a", "score": "0.5570384", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n @unlink($file); \n \n }", "title": "" }, { "docid": "4aff284263b8a4a2b80b972accc89eb6", "score": "0.55585116", "text": "public function removeFile($file_obj)\n\t{\n\t\t$fs = new Filesystem();\n\t\tif($fs->exists($file_obj->getUrlStorage()))\n\t\t{\n\t\t\t$fs->remove($file_obj->getUrlStorage());\n\t\t}\n\t}", "title": "" }, { "docid": "614063fb503a57e9decfce510aa95492", "score": "0.5555877", "text": "public function destroy($id)\n {\n $product = Product::find($id);\n if (($oldFile = $product->photo) !== 'uyuni.jpg'){\n Storage::delete($oldFile);\n }\n $product->delete();\n return redirect()->route('product.index')->with('success', 'Product successfully destroyed');\n }", "title": "" }, { "docid": "e58edf0ef06400cd31b9c6df91114be3", "score": "0.5555602", "text": "public function destroy(Attribute $attribute)\n {\n //delete a attribute by softDelete.\n $userId = $attribute->Category->Store->user_id;\n\n if (auth()->id() == $userId) {\n if ($attribute->delete()) {\n return new AttributeResource($attribute);\n }\n } else {\n abort(400, 'the Auth user do not store owner');\n }\n }", "title": "" }, { "docid": "ec1b691c67eb4c9111f82f370bc46ab2", "score": "0.55521524", "text": "public function removeAction ()\n { \n if (!empty ($this->params ['file']) AND file_exists (UPLOAD_PATH.$this->params ['file']))\n unlink (UPLOAD_PATH.$this->params ['file']); \n if (!empty ($this->params ['media_id']))\n {\n $model = new Model_DbTable_MediaData ();\n $model->delete_media ($this->params ['media_id']);\n } \n }", "title": "" }, { "docid": "cf67810bc53f9cd6c02a127c0ee780e0", "score": "0.55445576", "text": "public function remove()\n\t{\n\t\tFile::remove($this->tempName);\n\t}", "title": "" }, { "docid": "94cb51fff63ea161e1d8f04215cfe7bf", "score": "0.55422723", "text": "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 }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "45876224e081764ab571b0cb929a5473", "score": "0.5533963", "text": "public function destroy($id)\n {\n\n $product=Product::find($id);\n $image=str_slug($product->imagePath);\n //no se borro la imagen ???\n Storage::delete($image);\n $product->delete();\n \n return back();\n \n }", "title": "" }, { "docid": "9ac57f5d74d74f050136ae1e642ec949", "score": "0.5532133", "text": "public function delete($path) {\n $absPath = $this->_getAbsPath($path);\n $status = @unlink($absPath);\n\n if (!$status) {\n if (file_exists($absPath)) {\n throw new Scalar_Storage_Exception('Unable to delete file.');\n } else {\n $this->_log(\"Scalar_Storage_Adapter_Filesystem: Tried to delete missing file '$path'.\");\n }\n }\n }", "title": "" }, { "docid": "584dea86c95ee49398418c499126a231", "score": "0.55317944", "text": "public function forgetUsed()\n {\n if ($this->app['files']->exists($this->getUsedStoragePath())) {\n $this->app['files']->delete($this->getUsedStoragePath());\n }\n }", "title": "" }, { "docid": "52c48eff326d035cdfe9e0df0c79a23f", "score": "0.55300117", "text": "public function removeFromStorage()\n {\n if ( ! $this->is_raw ) {\n return MediaStorage::adapterByDisk($this->disk)->delete($this->path);\n }\n\n return true;\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "62470bdab73b1c8776214a0d888756d6", "score": "0.55259556", "text": "public function delete($filename = null){\r\n $filename = $this->getFile($filename);\r\n unlink($filename);\r\n }", "title": "" }, { "docid": "fca5783c203ebaaaafea2bcc3d6ca335", "score": "0.5525723", "text": "public function destroy($id)\n {\n \n $deleteItem = Slider::where('id', '=', $id)->first();\n $oldImg = $deleteItem->image;\n\n $oldfile = public_path('images/').$deleteItem->image;\n\n if (File::exists($oldfile))\n {\n File::delete($oldfile);\n }\n \n $slider = Slider::findOrFail($id);\n $slider->delete(); \n\n return redirect()->route('admin.slider')->with('success','Slider Item deleted successfully');\n }", "title": "" }, { "docid": "2b40268130454e39a95a6fde14dd39ee", "score": "0.55251133", "text": "public function destroy($id)\n {\n $delete = Image::find($id);\n $image = $delete->name;\n $delete->delete();\n Storage::delete('uploads/'.$image);\n return redirect()->back();\n }", "title": "" }, { "docid": "3d971daf6c6545b8d3f3ab39cedcd813", "score": "0.55225646", "text": "public static function untagOnDelete();", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "0d93adedaef8f05d9f7cbb129944a438", "score": "0.55152917", "text": "public function delete()\n {\n imagedestroy($this->image);\n $this->clearStack();\n }", "title": "" }, { "docid": "af145ca4d7fcaa5c229e51cfdaf9bb3d", "score": "0.55152094", "text": "public function delete($identifier);", "title": "" } ]
4f38a5e5253afda338793e4e19ad962c
Get team by name
[ { "docid": "7f7713d6ff1fa28e05aae57d0c3171ae", "score": "0.8371699", "text": "public function byName($name)\n {\n return Team::where('name',$name)->first();\n }", "title": "" } ]
[ { "docid": "5393cbefe23f0bc0cff8e34230b8e756", "score": "0.8166638", "text": "function GetTeam($tname)\n{\n\tglobal $teams;\n\t\n\tif ($tname == \"\")\n\t\treturn;\n\t\t\n\tforeach ($teams as $team)\n\t{\n\t\tif ($team->name == $tname)\n\t\t{\n\t\t\treturn $team;\n\t\t}\n\t}\n\tMessageBox(\"Programming error GetTeam ($tname) unknown)!\");\n\t$e = new Exception;\n\tvar_dump($e->getTraceAsString());\n}", "title": "" }, { "docid": "957086b03564b5af48fca1444cf2f442", "score": "0.7971915", "text": "public function findOneByName(string $name) :Team;", "title": "" }, { "docid": "5db6147055e796c746f13d1893474e1c", "score": "0.7501118", "text": "public static function getTeam($name = null, $id = null)\n {\n $kernel = static::createKernel();\n $kernel->boot();\n $em = $kernel->getContainer()->get('doctrine.orm.entity_manager');\n $team_repository = $em->getRepository('IBWWebsiteBundle:Team');\n if ($name) {\n return $team_repository->findOneByName($name);\n } elseif ($id) {\n return $team_repository->findOneById($id);\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "3690ba19077d74234e556c40b6efe44e", "score": "0.74990684", "text": "public function get_team($team_id){\n $this->where(\"id\", $team_id);\n return $this->getOne(\"Teams\");\n }", "title": "" }, { "docid": "39edf857b7c72c81f560f28e8f297376", "score": "0.7322521", "text": "public function getTeam($team)\n {\n return $this->sendRequest('GET', 'teams/'.$team);\n }", "title": "" }, { "docid": "71692e334a6f52cb8303b99453b2cff8", "score": "0.72760856", "text": "public function getTeam(): string;", "title": "" }, { "docid": "931f77770dee0495a18b816d811bc495", "score": "0.7260988", "text": "function get_team_from_teamid($team_id){\n\t\tglobal $db;\n\n\t\ttry{\n\t\t\t$pdo = $db;\n\t\t\t\n\t\t\t$sql = \"SELECT Team.Name FROM `Team` INNER JOIN Season ON Team.SeasonId = Season.Id WHERE (Season.IsCurrent = '1') AND (Team.Id = :teamid)\";\n\t\t\t$statement = $pdo->prepare($sql);\n\t\t\t$statement->bindParam(\"teamid\", $team_id);\n\t\t\t$statement->execute();\n\t\t\t$result = $statement->fetchAll();\n\n\t\t\tif($result){\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\treturn $row['Name'];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\techo \"Failed: \" . $e->getMessage(); \n\t\t}\n\t}", "title": "" }, { "docid": "5b7958551ff8a4f8860cb19f48f06ccd", "score": "0.7207684", "text": "public function getTeamName($id);", "title": "" }, { "docid": "6d347184c58afc66f587974655d312ec", "score": "0.70875555", "text": "public function getTeam($team, $fields){\n\n global $db;\n\n $team = $db->get('teams', $fields, [\n 'OR' => [\n 'id' => $team,\n 'name' => $team,\n ]\n ]);\n\n if($team != NULL)\n $team['founder'] = $this->getPlayer($team['founder'], ['name'])['name'];\n\n return $team;\n }", "title": "" }, { "docid": "f145f4a65e4e2f69f6a82b03dbf959cc", "score": "0.70798147", "text": "function findTeamId($name) {\n global $teams;\n return array_search($name, $teams);\n }", "title": "" }, { "docid": "125d3241398b79bb5db9af6dfeefc994", "score": "0.6968383", "text": "public function getTeam($id) {\n $res = DB::get($this->isSingleHanded() ? DB::T(DB::SINGLEHANDED_TEAM) : DB::T(DB::TEAM), $id);\n if ($res === null || $res->regatta->id != $this->id)\n return null;\n return $res;\n }", "title": "" }, { "docid": "477910d792f1d7c81343ddb5f8d31d98", "score": "0.6956865", "text": "static function getTeam($id) {\n\t\t$teams = DAO_Group::getTeams(array($id));\n\t\t\n\t\tif(isset($teams[$id]))\n\t\t\treturn $teams[$id];\n\t\t\t\n\t\treturn null;\n\t}", "title": "" }, { "docid": "163369828bebcd9246b4ca627ce93274", "score": "0.6810768", "text": "public function getTeam($team)\n {\n return $this->teamRepository->findTeam($team, ['creator']);\n }", "title": "" }, { "docid": "7ebc721500bc8d909d2dd8ea3a92827a", "score": "0.6763799", "text": "public function getTeam()\n {\n return $this->team;\n }", "title": "" }, { "docid": "fa6bb9c593ed48ed58be0135ecb9d6fd", "score": "0.6738718", "text": "public function getName(){\r\n \t\treturn $this->teamname;\r\n \t}", "title": "" }, { "docid": "f13489d27ab4e01409054d172caefe2b", "score": "0.6719154", "text": "public function getTeamNameById($id)\n {\n $adapter = $this->getConnection();\n $select = $adapter->select()\n ->from($this->getMainTable(), 'name')\n ->where('entity_id = :entity_id');\n $binds = ['entity_id' => (int)$id];\n return $adapter->fetchOne($select, $binds);\n }", "title": "" }, { "docid": "d326e02e892e422b40940ab8f7e2437b", "score": "0.66995704", "text": "private function get_team(){\n\t\timport('wddsocial.model.WDDSocial\\UserVO');\n\t\t$data = array('id' => $this->id);\n\t\tswitch ($this->type){\n\t\t\tcase 'project':\n\t\t\t\t$query = $this->db->prepare($this->sql->getProjectTeam);\n\t\t\t\t$query->execute($data);\n\t\t\t\t$query->setFetchMode(\\PDO::FETCH_CLASS,'WDDSocial\\UserVO');\n\t\t\t\twhile($user = $query->fetch()){\n\t\t\t\t\tarray_push($this->team,$user);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'article':\n\t\t\t\t$query = $this->db->prepare($this->sql->getArticleTeam);\n\t\t\t\t$query->execute($data);\n\t\t\t\t$query->setFetchMode(\\PDO::FETCH_CLASS,'WDDSocial\\UserVO');\n\t\t\t\twhile($user = $query->fetch()){\n\t\t\t\t\tarray_push($this->team,$user);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'projectComment':\n\t\t\t\t$query = $this->db->prepare($this->sql->getProjectTeam);\n\t\t\t\t$query->execute($data);\n\t\t\t\t$query->setFetchMode(\\PDO::FETCH_CLASS,'WDDSocial\\UserVO');\n\t\t\t\twhile($user = $query->fetch()){\n\t\t\t\t\tarray_push($this->team,$user);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'articleComment':\n\t\t\t\t$query = $this->db->prepare($this->sql->getArticleTeam);\n\t\t\t\t$query->execute($data);\n\t\t\t\t$query->setFetchMode(\\PDO::FETCH_CLASS,'WDDSocial\\UserVO');\n\t\t\t\twhile($user = $query->fetch()){\n\t\t\t\t\tarray_push($this->team,$user);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "97cc264f7c465eb59577898ed2125826", "score": "0.6677594", "text": "public function show($id)\n {\n return Team::where('id', $id)->first();\n }", "title": "" }, { "docid": "27767b86a519215deb7cfc3ec8ab6692", "score": "0.6574109", "text": "function get_teamid_from_teamName($team_name){\n\t \n\t\tglobal $db;\n\n\t\ttry{\n\t\t\t$pdo = $db;\n\t\t\t$sql = \"Select Team.Id FROM `Team`INNER JOIN Season ON Team.SeasonId = Season.Id WHERE (Season.IsCurrent = '1') AND ( Team.Name = :teamname)\";\n\t\t\t$statement = $pdo->prepare($sql);\n\t\t\t$statement->bindParam(\"teamname\", $team_name);\n\t\t\t$statement->execute();\n\t\t\t$result = $statement->fetchAll();\n\n\t\t\tif($result){\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\treturn $row['Id'];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\techo \"Failed: \" . $e->getMessage(); \n\t\t}\n\t}", "title": "" }, { "docid": "13bbb414f3beda1474bea1ec3c125b42", "score": "0.6560033", "text": "public function show($id)\n {\n $team = Team::find($id);\n return $team;\n }", "title": "" }, { "docid": "afac3e7110ac254473795b39ef225698", "score": "0.6542506", "text": "public static function fetch($value, $name = \"id\"){\n $results = parent::fetch($value, $name);\n \n if ($results)\n return new GameTeams($results, $results['id']);\n else\n return false;\n }", "title": "" }, { "docid": "4f09f93d9ebfa81fb5bf76cd82b84536", "score": "0.65359664", "text": "public function getTeams($id);", "title": "" }, { "docid": "818c8e88e4083906331d4538602e39c8", "score": "0.64885217", "text": "function get_user_team($userid ){\r\n global $CFG;\r\n $teams = get_records_sql(\"SELECT id, assignment, name, membershipopen\".\r\n \" FROM {$CFG->prefix}team \".\r\n \" WHERE assignment = \".$this->assignment->id);\r\n foreach($teams as $team) {\r\n $teamid = $team->id;\r\n if (get_record('team_student','student',$userid, 'team', $teamid)) {\r\n return $team;\r\n }\r\n }\r\n return null;\r\n }", "title": "" }, { "docid": "224f12563049db555f8f0d47d4ff8f7c", "score": "0.64783907", "text": "public function name($teamname, $withTrashed = false)\n {\n if ($withTrashed) {\n return Team::withTrashed()->where('teamname', $teamname)->first();\n }\n\n return Team::name($teamname)->first(); \n }", "title": "" }, { "docid": "dc58974983ec3eecc45e7ddbb2322a9a", "score": "0.64622283", "text": "public function getTeam($teamID) {\n $stmt = $this->conn->prepare\n (\"SELECT *\n FROM Team\n WHERE TeamID = ?\n \");\n $stmt->bind_param(\"i\", $teamID);\n $stmt->execute();\n $team = $stmt->get_result();\n $stmt->close();\n return $team;\n }", "title": "" }, { "docid": "fd9382c72560a8e83aba7f7d7f880b2b", "score": "0.645536", "text": "function getTeamNameFMid($id){\n require 'dbconn.php';\n $sql = \"SELECT nome FROM teams WHERE id = $id\";\n $result = $conn->query($sql);\n while($row = $result->fetch_assoc()){\n $res = $row['nome'];\n break;\n }\n return $res;\n }", "title": "" }, { "docid": "f2adcadac4189d07dfaa55b634dc81a7", "score": "0.64526457", "text": "public function setTeamName($name) { $this->set('teamName',$name); }", "title": "" }, { "docid": "06679eb9f09436eef57a481cd3a4a099", "score": "0.6410005", "text": "public function getAllTeams();", "title": "" }, { "docid": "f57e23094fb14e7226bf07d3ab4534e4", "score": "0.6409019", "text": "function get_team_by_id($id) {\n\n\t\t// set where clause\n\t\t$this -> db -> where('Id', $id);\n\n\t\t$this -> db -> from('AllTeams');\n\n\t\t$query = $this->db->get();\n\n\t\t//Check if any rows returned\n\t\tif (!$query || $query -> num_rows() <= 0)\n\t\t\treturn FALSE;\n\t\t\n\t\treturn $query -> row();\n\t}", "title": "" }, { "docid": "83bfd7d9102da4a630a9141f4f4b679c", "score": "0.6383607", "text": "public function set_team ($team_id) {\n /*\n * $this->teams is inherited from the Database class.\n * cycle through data store to find the team with associated\n * id number\n */\n foreach ($this->teams as $team) {\n if ($team->id == $team_id) {\n return $team;\n }\n }\n }", "title": "" }, { "docid": "d2177a7b3e18127fbb54dabf01370274", "score": "0.6321594", "text": "public function team() {\n\t\treturn $this->hasOne('App\\Team');\n\t}", "title": "" }, { "docid": "91a77cb91e38588d153aa55b91e307d6", "score": "0.6319733", "text": "public function getTeam(): ?TeamInterface;", "title": "" }, { "docid": "8036022fd569ead67b7e78646836cda8", "score": "0.6315357", "text": "public function get_all_teams_by_name(){\n return $this->rawQuery('SELECT * from Teams order by name asc');\n }", "title": "" }, { "docid": "1dd2ec6db4b293875cea4561ace98949", "score": "0.63000494", "text": "public static function getTeam($team_id) {\n\t $db = TCPDatabase::getConnection();\n\t $stmt = $db->prepare(\"SELECT * FROM `team_member` WHERE `team_id` = :team_id\");\n\t $stmt->bindValue(\":team_id\", $team_id);\n\t $stmt->execute();\n\t $team = $stmt->fetchAll();\n\t return json_encode($team);\n \t}", "title": "" }, { "docid": "bd232343b4917f9eb904dd329cca7454", "score": "0.6292338", "text": "public static function getTeamByProject($project_id) {\n\t\t$db = TCPDatabase::getConnection();\n\t\t$stmt = $db->prepare(\"SELECT * FROM `team` WHERE `project_id` = :project_id\");\n\t\t$stmt->bindValue(\":project_id\", $project_id);\n\t\t$stmt->execute();\n\t\t$team = $stmt->fetchAll();\n\t\treturn $team;\n\t}", "title": "" }, { "docid": "4d129f8bca865a1ed7a1f4464b09fe0b", "score": "0.6272668", "text": "public static function getLoggedInTeam() {\n return SessionUtil::isLoggedIn() ? TeamDao::getTeamById($_SESSION[\"loggedinteamid\"]) : null;\n }", "title": "" }, { "docid": "85e020eb479467c411af54f160eddf2f", "score": "0.62597436", "text": "function getProjectteams()\n\t{\n\t\t$app\t\t= JFactory::getApplication();\n\t\t$jinput \t= $app->input;\n\t\t$option \t= $jinput->getCmd('option');\n\t\t$project_id = $app->getUserState($option.'project');\n\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query->select(array('t.name As text', 't.notes'));\n\t\t$query->from('#__joomleague_team AS t');\n\t\t\n\t\t$query->select('pt.id AS value');\n\t\t$query->join('LEFT', '#__joomleague_project_team AS pt ON pt.team_id = t.id');\n\t\t\n\t\t$query->where('pt.project_id = '.$project_id);\n\t\t$query->order('t.name ASC');\n\t\t$db->setQuery($query);\n\t\tif (!$result = $db->loadObjectList())\n\t\t{\n\t\t\t$this->setError($db->getErrorMsg());\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $result;\n\t\t}\n\t}", "title": "" }, { "docid": "0697cb9d204e6e75357451c946f8782e", "score": "0.62481326", "text": "function getTeamName( $team_id )\n\t{\n\t\tif ( !$team_id )\n\t\t{\n\t\t\treturn '';\n\t\t}\n $this->jsmquery->clear();\n $this->jsmquery->select('name');\n $this->jsmquery->from('#__sportsmanagement_team');\n $this->jsmquery->where('id = '. $team_id);\n\t\t\n try{\n $this->jsmdb->setQuery( $this->jsmquery );\n\t\treturn $this->jsmdb->loadResult();\n }\n catch (Exception $e)\n {\n $this->jsmapp->enqueueMessage(JText::_($e->getMessage()), 'error');\n return false;\n }\n\t}", "title": "" }, { "docid": "e87d1c9957e27dc5ac336f9511520180", "score": "0.6239745", "text": "public function get_all_teams(){\n return $this->get(\"Teams\");\n }", "title": "" }, { "docid": "ebf99f0b922b2c428d1d2ed86f3f16f8", "score": "0.62328357", "text": "public function findTeam($modelTeam);", "title": "" }, { "docid": "d0f0741aa16cd60f140b0b0e6bb06e69", "score": "0.6232303", "text": "function get_teams() {\n\n\t\t// set where clause\n\t\t$this -> db -> select('Id, Name');\n\t\t$this -> db -> from('AllTeams');\n\n\t\t$query = $this->db->get();\n\n\t\t//Check if any rows returned\n\t\tif (!$query || $query -> num_rows() <= 0)\n\t\t\treturn FALSE;\n\t\t\n\t\treturn $query -> result();\n\t}", "title": "" }, { "docid": "d17a104e775ae671961434e508fa8d6a", "score": "0.6221227", "text": "function set_team_name($team){\n $sql_get_team_name = \"SELECT * FROM `table_teams`\n WHERE team_id=$team\";\n $result = mysqli_query($this->db_connection, $sql_get_team_name);\n \n\n $this->team_name\n }", "title": "" }, { "docid": "d91312cbcc07134f4d3f42ed04f925dc", "score": "0.6214503", "text": "public function get_team_name($team_id){\n $team_id = (int)$team_id;\n $cols = array(\n \"id\" =>$team_id,\n );\n $names = $this->rawQuery('SELECT name from Teams where id = ?', $cols);\n $output =\"\";\n if(count($names) > 0){\n foreach ($names as $name) {\n $output .=\"\".$name['name'];\n }\n }\n return $output;\n }", "title": "" }, { "docid": "c7f54b10bafa34f151e70099d4dd09b0", "score": "0.619813", "text": "public function getTeam() :? Team\n {\n return $this->team;\n }", "title": "" }, { "docid": "cb9ab82e28dc26ff486f79dbbc741999", "score": "0.61846125", "text": "public function findAllTeams();", "title": "" }, { "docid": "406ca1d934f9f20fbf30f2f289961641", "score": "0.6170813", "text": "public function getTeam($team_id){\n if(!is_numeric($team_id)){\n return false;\n }\n $api = $this->url . 'team/' . $team_id .'?Authorization=' . $this->authorization;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $api);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n $data = curl_exec($curl);\n curl_close($curl);\n $jsonDecode = json_decode($data);\n if(isset($jsonDecode->error) && $jsonDecode->error != null){\n return false;\n }\n return $jsonDecode;\n }", "title": "" }, { "docid": "4818bb8853a33b7758f64a5f3de5a1be", "score": "0.6168835", "text": "public function get_team($id, $mod){\n\t\treturn $this->get_team_mem($id, $mod);\n\t}", "title": "" }, { "docid": "1da506da0d582045106a73b7784ac1b5", "score": "0.61502355", "text": "public function team()\n {\n return $this->belongsTo(Jetstream::teamModel());\n }", "title": "" }, { "docid": "48ab8e39e8f512b86cc1a7a231f99d49", "score": "0.6139443", "text": "public function getTeamAttribute(): string\n {\n if ($this->team_id == 0) {\n return \"SCOTLAND\";\n }\n else {\n $team = Opponent::find($this->team_id);\n return $team->name;\n }\n }", "title": "" }, { "docid": "6811bcf93a9ea54bddbf0aead4d9c707", "score": "0.61050814", "text": "public function getTeam($index)\n {\n $index = round($index);\n if ($index >= Config\\Config::$forIndex && $index < $this->getTeamNumber() + Config\\Config::$forIndex) {\n $index -= Config\\Config::$forIndex;\n $xpath = new \\DOMXPath($this->getXml());\n $nodeList = $xpath->query('//Team');\n $team = new \\DOMDocument('1.0', 'UTF-8');\n $team->appendChild($team->importNode($nodeList->item($index), true));\n return new Compendium\\Team($team);\n }\n return null;\n }", "title": "" }, { "docid": "2752d73bb3dc2a99f0e79a744016b5fd", "score": "0.60888577", "text": "public function team()\n {\n return $this->hasOne('App\\Models\\Team', 'id', 'team_id');\n }", "title": "" }, { "docid": "5d3ecee2cfad7c8923d98f394d1546a6", "score": "0.604786", "text": "public function add_team($teamname, $country) {\n\t\t$team = R::dispense('teams');\n\t\t$team->teamname = $teamname;\n\t\t$team->country = $country;\n\t\t$id = R::store($team);\n\t\treturn R::load('teams', $id);\n\t}", "title": "" }, { "docid": "f0c9fb599fda5b927f53e6d45d7cb9c0", "score": "0.60448074", "text": "public function show(Team $team)\n {\n //\n }", "title": "" }, { "docid": "f0c9fb599fda5b927f53e6d45d7cb9c0", "score": "0.60448074", "text": "public function show(Team $team)\n {\n //\n }", "title": "" }, { "docid": "4bb908c9cbd897befcfb12a169052726", "score": "0.60369366", "text": "function checkIfTeamExists( $teamName = '' ) {\n\t\t\t// Initialze return array\n\t\t\t$returnArray = array();\n\t\t\t$returnArray['status'] \t\t\t= \"false\";\n\t\t\t$returnArray['teamDetails'] = array();\n\t\t\t\n\t\t\t// Check wheter team name is empty or not\n\t\t\t// If it is blank, return.\n\t\t\tif( empty( $teamName )) return $returnArray;\n\t\t\t\n\t\t\t// Get size of teams array\n\t\t\t$sizeofTeamsArray = sizeof( $this->teams );\n\t\t\t\n\t\t\t// Check whether team name exists in teams array\n\t\t\tfor( $i = 0; $i < $sizeofTeamsArray; $i++ ) {\n\t\t\t\tif( strtolower( $this->teams[$i]['name'] ) == strtolower( $teamName ) ) {\n\t\t\t\t\t// Team name exists\n\t\t\t\t\t// Set status as true, set team details and break the loop\n\t\t\t\t\t$returnArray['status'] \t\t\t= \"true\";\n\t\t\t\t\t$returnArray['teamDetails'] = $this->teams[$i];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Return\n\t\t\treturn $returnArray;\n\t\t}", "title": "" }, { "docid": "d8acd512a342c5a0bb31136f3a722d42", "score": "0.60359836", "text": "public static function getTeam( $teamId ) {\n\t\t$dbr = wfGetDB( DB_MASTER );\n\n\t\t$res = $dbr->select(\n\t\t\t'sport_team',\n\t\t\t[ 'team_id', 'team_name', 'team_sport_id' ],\n\t\t\t[ 'team_id' => intval( $teamId ) ],\n\t\t\t__METHOD__,\n\t\t\t[ 'LIMIT' => 1 ]\n\t\t);\n\n\t\t$teams = [];\n\n\t\tforeach ( $res as $row ) {\n\t\t\t$teams[] = [\n\t\t\t\t'id' => $row->team_id,\n\t\t\t\t'name' => $row->team_name,\n\t\t\t\t'sport_id' => $row->team_sport_id\n\t\t\t];\n\t\t}\n\n\t\treturn $teams[0];\n\t}", "title": "" }, { "docid": "95d28cdedee166f5d2c52471fb01a014", "score": "0.6000879", "text": "public static function getMyTeams($person_id) {\n\t $db = TCPDatabase::getConnection();\n\t $stmt = $db->prepare(\"SELECT * FROM `team` WHERE `owner_id` = :person_id\");\n\t $stmt->bindValue(\":person_id\", $person_id);\n\t $stmt->execute();\n\t $team = $stmt->fetchAll();\n\t return $team;\n\t}", "title": "" }, { "docid": "bb1de59d031d77b3a2c960baba44ac82", "score": "0.5987868", "text": "public function getTeams() {\n $result = $this->database->query(\"SELECT name FROM {teams}\")->fetchAllAssoc('name');\n if (!$result) {\n return [];\n }\n\n $teams = array_keys($result);\n return array_combine($teams, $teams);\n }", "title": "" }, { "docid": "30075d9186c186681441a862250ca792", "score": "0.59833086", "text": "public function getTeamId()\n {\n return $this->_teamId;\n\n }", "title": "" }, { "docid": "bd7ae89713d12bad8f77a03638827889", "score": "0.5975394", "text": "public function getTeamId()\n {\n return $this->team_id;\n }", "title": "" }, { "docid": "7e4048f5ecff4d0bf5390d3929af0c69", "score": "0.59673995", "text": "public function getTeamAction(Request $request) {\n\n $data = json_decode($request->getContent(), true);\n $request->request->replace(is_array($data) ? $data : array());\n\n $team_id = $request->get('team_id');\n\n if ((trim($team_id) != \"\") &&\n is_int($team_id)) {\n\n $manager = $this->get('app.api_team_manager');\n $team = $manager->getTeam($team_id);\n\n if ($team) {\n return new JsonResponse(array(\"response\" => array(\"code\" => \"200\", \"message\" => \"SUCCESS\", \"data\" => $team)));\n } else {\n return new JsonResponse(array(\"response\" => array(\"code\" => \"400\", \"message\" => \"ERROR\", \"data\" => ApiErrorInterface::ERROR_NOT_FOUND)));\n }\n } else {\n return new JsonResponse(array(\"response\" => array(\"code\" => \"400\", \"message\" => \"ERROR\", \"data\" => ApiErrorInterface::ERROR_NOT_VALID_PARAMS)));\n }\n }", "title": "" }, { "docid": "51ec9aacca48c3fd08effed507449b90", "score": "0.59603566", "text": "public function showAction(Teams $team)\n {\n $deleteForm = $this->createDeleteForm($team);\n// echo '<pre>';\n// \\Doctrine\\Common\\Util\\Debug::dump($team);\n// echo '</pre>';\n return $this->render('teams/show.html.twig', array(\n 'users' => $team->getUsers(),\n 'team' => $team,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "3ed9c0ab04fc9c80bb9a983399099264", "score": "0.59417564", "text": "function getTeamName($conn, $input) {\r\n $input = (int)$input;\r\n $stmt = $conn->prepare('SELECT teamName FROM teams WHERE team_id = ?');\r\n $stmt->bind_param('i', $input);\r\n $stmt->execute();\r\n $result = $stmt->get_result();\r\n $row = $result->fetch_assoc();\r\n return $row['teamName'];\r\n }", "title": "" }, { "docid": "dd026222ab15eea0f46605f13f71985c", "score": "0.5938082", "text": "public function getIdTeam()\n {\n return $this->idTeam;\n }", "title": "" }, { "docid": "12eb7ddd275590efc32b6096b5a78749", "score": "0.59371054", "text": "public function getTeams($page = 1, $per_page = 40);", "title": "" }, { "docid": "f05b04ac9d1c1e3085f757cb07ec5c4b", "score": "0.59288585", "text": "public function findTeams() {\n //All teams\n $teams = [\"under9\", \"under10\", \"under11\", \"under12\", \"under13\", \"under14\", \"under15\", \"under16\", \"under18\",\n \"under21\", \"seniors\"];\n\n //Team to promote to\n $originalTeam = Auth::user()->manager->team;\n\n //Index of team to promote to\n $originalTeamIndex = array_search($originalTeam->teamName, $teams)-1;\n\n //Index of lowest age group team to promote from\n $lowestTeamToCheck = $originalTeamIndex - 2;\n if($lowestTeamToCheck < 0) {\n $lowestTeamToCheck = 0;\n }\n\n $teamsToCheck = [];\n\n //For each index, if a team exists, add to array until either two teams have been added or run out of teams\n for($originalTeamIndex; $originalTeamIndex > $lowestTeamToCheck && count($teamsToCheck) < 2; $originalTeamIndex--) {\n\n $tempCheck = Team::all()->where(\"clubId\", $originalTeam->clubId)->where(\"teamName\",\n $teams[$originalTeamIndex]);\n if(count($tempCheck) > 0) {\n array_push($teamsToCheck, $tempCheck->first());\n }\n }\n return $teamsToCheck;\n }", "title": "" }, { "docid": "3455e06511b104f32931af358f63925b", "score": "0.5924122", "text": "public function getTeamRepository();", "title": "" }, { "docid": "598d9e71abfec2e8b8d647801ea1ae0a", "score": "0.5922298", "text": "public function getTeamId() {\n return $this->getData()->team->id;\n }", "title": "" }, { "docid": "c103447a79262db015418d5784c5384a", "score": "0.59030265", "text": "function getNearbyTeams(){\n\n\n}", "title": "" }, { "docid": "0c6c7eab206ca6949c02057a8b499a98", "score": "0.5892208", "text": "function get_teams($league_id)\n\t{\n\t\t//setup variables\n\t\t$team_table = TEAM_TABLE;\n\t\t$db = db_connect();\n\n\t\t//find all teams owned by this league\n\t\t$query = \"SELECT *\n\t\t\t\t\tFROM $team_table\n\t\t\t\t\tWHERE League = $league_id\";\n\n\t\tif (!$result = $db->query($query))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tif ($result->num_rows == 0)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t//if successful and found teams\n\t\t$team_array = array();\n\t\twhile ($row = $result->fetch_assoc()) \n\t\t{\n\t\t\tarray_push($team_array, $row);\n\t\t}\n\n\t\t//return the object\n\t\t$db->close();\n\t\treturn $team_array;\n\t}", "title": "" }, { "docid": "6ff3c8458485fa7bcc01d888ea7b011e", "score": "0.5863759", "text": "function get_members_from_team ($teamid) {\r\n global $CFG;\r\n error_log('called get members');\r\n return get_records_sql(\"SELECT id, student, timemodified\".\r\n \" FROM {$CFG->prefix}team_student \".\r\n \" WHERE team = \".$teamid);\r\n }", "title": "" }, { "docid": "6eaadf2f342b0da4d9d58d9a28787c8e", "score": "0.58593816", "text": "public function getTeamNode(string $nodename);", "title": "" }, { "docid": "97b733c027a0c064856dae5f79583bbe", "score": "0.5858189", "text": "function get_all_team_names(){\n\t\tglobal $db;\n\n\t\ttry{\n\t\t\t$pdo = $db;\n\t\t\t$sql = \"SELECT `Name` FROM `Team`\"; //does not take into account current season\n\t\t\t$statement = $pdo->prepare($sql);\n\t\t\t$statement->execute();\n\t\t\t$result = $statement->fetchAll();\n\n\t\t\tif($result){\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\techo \"Failed: \" . $e->getMessage(); \n\t\t}\n\t}", "title": "" }, { "docid": "25227bd187ea80bcb5d7f02580b05fd7", "score": "0.5848591", "text": "public function team()\n\t{\n\t\tSession::put('lang','EN');\n\t\treturn $this->teamblade();\t\t\n\t}", "title": "" }, { "docid": "25227bd187ea80bcb5d7f02580b05fd7", "score": "0.5848591", "text": "public function team()\n\t{\n\t\tSession::put('lang','EN');\n\t\treturn $this->teamblade();\t\t\n\t}", "title": "" }, { "docid": "f63c1371c00db2c8366bc29d36964090", "score": "0.5845889", "text": "public function team() {\n\t\teval(ADMIN);\n\t\ttry{\n\t\t\t$team_id = xassert(safeget(\"show\"), Error(\"get\"));\n\t\t\t$res = DBModel::getTeamDetail($team_id);\n\t\t\t$tutorlist = DBModel::getByFields('cernet_tutor');\n\t\t\t$types = DBModel::getByFields('cernet_report_type');\n\n\t\t\t$this->assign('type',$types);\n\t\t\t$this->assign('tutorlist', json_encode($tutorlist));\n\t\t\t$this->assign('teamData', $res);\n\t\t\t$this->assign('mates', $res['teammate']);\n\t\t\t$this->assign('report', $res['report']);\n\t\t}catch(Exception $e){\n\t\t\tthrow_exception($e->getMessage());\n\t\t}\n\t\t$this->assign(\"less\", __FUNCTION__ .\".less\");\n\t\teval(NDSP);\n\t}", "title": "" }, { "docid": "4686f3bfaa26015e779bdb9eb2059c9d", "score": "0.58362645", "text": "public static function getSearchedTeam($search)\n {\n $result = self::where('name', 'like', '%'.$search.'%')->orderBy('name', 'desc')->get(Config::get('constants.TEAMS_FETCHABLE_COLUMNS'));\n\n $output = [\"status\" => \"Success\", \"team\" => $result, \"total_team\" => count($result)];\n \n return $output;\n }", "title": "" }, { "docid": "e4fbc1880aef618b8ac1a9fedb8f36bd", "score": "0.5835624", "text": "public function team()\n {\n return $this->belongsTo('App\\Models\\Team');\n }", "title": "" }, { "docid": "63fa5bb2a542108619e70f7ac682835b", "score": "0.5830554", "text": "public function team()\n {\n return $this->belongsTo(Team::class);\n }", "title": "" }, { "docid": "63fa5bb2a542108619e70f7ac682835b", "score": "0.5830554", "text": "public function team()\n {\n return $this->belongsTo(Team::class);\n }", "title": "" }, { "docid": "63fa5bb2a542108619e70f7ac682835b", "score": "0.5830554", "text": "public function team()\n {\n return $this->belongsTo(Team::class);\n }", "title": "" }, { "docid": "63fa5bb2a542108619e70f7ac682835b", "score": "0.5830554", "text": "public function team()\n {\n return $this->belongsTo(Team::class);\n }", "title": "" }, { "docid": "63fa5bb2a542108619e70f7ac682835b", "score": "0.5830554", "text": "public function team()\n {\n return $this->belongsTo(Team::class);\n }", "title": "" }, { "docid": "d5ccf4ecb944c69657c46c8c30d45f7d", "score": "0.58228874", "text": "public function getSummonerByName($name)\n {\n $request = $this->client->get('summoner/by-name/' . $name . \"?api_key=\" . $this->key);\n\n return $request->send()->json();\n }", "title": "" }, { "docid": "b0aacf72e4ae910ae4255094ffa8cffa", "score": "0.5820823", "text": "function get_current_teams() {\n\t\tglobal $db;\n\t\ttry{\n\t\t\t$pdo = $db;\n\t\t\t$sql = \"SELECT Team.Id, Name FROM Team INNER JOIN Season ON Season.Id = Team.SeasonId WHERE Season.IsCurrent = '1'\";\n\t\t\t$statement = $pdo->prepare($sql);\n\t\t\t$statement->execute();\n\t\t\t$result = $statement->fetchAll();\n\t\t\treturn $result;\n\t\t} catch(PDOException $e) {\n\t\t\techo \"Failed to get teams: \" . $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "f43a4110fd03872a6f0bd3c3213b7896", "score": "0.5820013", "text": "public function getFullName(\\Illuminate\\Database\\Eloquent\\Collection $games,int $team_id):string{\n\n $game = $games->first();\n if($team_id == $game->home_id) return $game->home_name;\n if($team_id == $game->away_id) return $game->away_name;\n\n // dd($game->home_name);\n }", "title": "" }, { "docid": "f7b2b12f58752b34a004341e600ab382", "score": "0.5808202", "text": "function get_user_teams($id) {\n\n\t\t$this -> db -> from('Roster');\n\t\t$this -> db -> where('UserId', $id);\n\n\t\t$query = $this -> db -> get();\n\t\t\n\t\treturn $query -> row();\n\t}", "title": "" }, { "docid": "78785597e4f0572a8c5399848b35592e", "score": "0.5808009", "text": "public function team()\n {\n return $this->belongsTo('App\\Team', 'team_id');\n }", "title": "" }, { "docid": "57390ab27b29c44c4917e053dfe32182", "score": "0.5785251", "text": "public function show($id)\n\t{\n $team = Team::findorfail($id);\n return view('teams.show', compact('team'));\n\t}", "title": "" }, { "docid": "d09174c1264847c988e2f3cedabd5279", "score": "0.57809997", "text": "public function show( Team $team ) {\n //\n }", "title": "" }, { "docid": "0818bc859e0182c8c548d40ac485ec7b", "score": "0.57775676", "text": "public function testSearchControllerGetATeamByNameSearch(AcceptanceTester $I)\n {\n $I->wantTo('Check that we can get a team from the search bar by name');\n $I->amOnPage('/app/manage/team');\n\n /** Do by team name */\n $I->fillField(['id' => 'searchText'], $this->teamName);\n $I->click(['id' => 'doSearchBoxSubmit']);\n $I->waitForElementVisible(['id' => 'searchResults'], BaseAcceptance::TEXT_WAIT_TIMEOUT);\n $I->wait(1);\n $I->see($this->teamName, 'a[title=\"Team '. $this->teamName .'\"]');\n }", "title": "" }, { "docid": "85701efac2833311edcdbdf26addab90", "score": "0.577565", "text": "public function updateTeamName($id);", "title": "" }, { "docid": "a125ea688290fe970e9fd57d364017fa", "score": "0.57720006", "text": "private function __getFleetTeam($string=''){\r\n $location = $string;\r\n if(empty($string) || is_null($string)){\r\n $location = strtolower(\r\n $this->session->get('strLocation'));\r\n }\r\n $fleets = $this->__getAvailableFleets($location);\r\n return $fleets['team_id'];\r\n }", "title": "" }, { "docid": "866cd4beada66befb307121514189cc0", "score": "0.57621574", "text": "public function team()\n {\n return $this->belongsTo('App\\Team');\n }", "title": "" }, { "docid": "866cd4beada66befb307121514189cc0", "score": "0.57621574", "text": "public function team()\n {\n return $this->belongsTo('App\\Team');\n }", "title": "" }, { "docid": "866cd4beada66befb307121514189cc0", "score": "0.57621574", "text": "public function team()\n {\n return $this->belongsTo('App\\Team');\n }", "title": "" }, { "docid": "a4f7428a1a485c8c1e5d713bca2668c9", "score": "0.57591456", "text": "public static function get_by_id($id) {\r\n global $server, $username, $password, $database;\r\n \r\n // Pull all users from the database\r\n $connection = mysqli_connect($server, $username, $password, $database) or die(\"Unable to connect\");\r\n \r\n // To protect MySQL injection (more detail about MySQL injection)\r\n $id = mysql_real_escape_string($id);\r\n \r\n $sql=\"select * from team where id='$id'\";\r\n $result=mysqli_query($connection, $sql);\r\n \r\n // Mysql_num_row is counting table row\r\n $count=mysqli_num_rows($result);\r\n \r\n // If result matched $myusername and $mypassword, table must be 1 row\r\n if($count==1){\r\n $team = new Team();\r\n $row = mysqli_fetch_assoc($result);\r\n $team->id=$id;\r\n $team->name=$row['name'];\r\n $team->season=$row['season'];\r\n $team->legacy=$row['legacy'];\r\n mysqli_free_result($result);\r\n mysqli_close($connection);\r\n \r\n return $team;\r\n }\r\n else {\r\n mysqli_free_result($result);\r\n mysqli_close($connection);\r\n return;\r\n }\r\n }", "title": "" }, { "docid": "30329d3cd609bcd61fe28028982741fe", "score": "0.57577854", "text": "public function it_can_get_a_game_by_name()\n {\n $slugify = Slugify::create();\n\n $name = $slugify->slugify($this->faker->sentence);\n factory(Game::class)->create(['name' => $name]);\n\n $getByName = Game::byName($name);\n\n $this->assertSame($getByName->name, $name);\n\n }", "title": "" }, { "docid": "06024cd529fbab5a0cf4cad0a6ae5f0b", "score": "0.5757675", "text": "public function getTeamid()\r\n {\r\n return $this->teamid;\r\n }", "title": "" }, { "docid": "242c237827cdd1c7c900e23390eab58e", "score": "0.5755318", "text": "public function setTeam() {\n If ($this->team == '') {\n $this->team = Auth::User()->currentTeam->name;\n }\n }", "title": "" } ]
d1309e7187fea0a840496757727c6cfe
Method interceptor that retrieves the corresponding endpoint and return a json decoded object or throw a Exception.
[ { "docid": "a2d74b79c38bf836a54378453d100c87", "score": "0.0", "text": "public function __call( $method, $params ) {\n\n // handle params array\n if (isset($params[0])) {\n $params = is_array($params[0])\n ? $params[0]\n : [];\n }\n\n return $this->geonames->$method( $params );\n }", "title": "" } ]
[ { "docid": "3b19d24e757dc29c30c59484c2a8c728", "score": "0.6240413", "text": "protected abstract function getEndpoint();", "title": "" }, { "docid": "669cba17feefdf7e5b9601b47929d00c", "score": "0.60696995", "text": "abstract public function getEndpoint();", "title": "" }, { "docid": "33a3ed95be8101967417ed35490476ad", "score": "0.5994132", "text": "public function getEndpoint();", "title": "" }, { "docid": "ecf52e369d11f4e46661c280b546820e", "score": "0.5927476", "text": "public function get_endpoint(){\n return $this->endpoint;\n }", "title": "" }, { "docid": "4073f1f186095ef83684996ad7594971", "score": "0.5763548", "text": "public function get($endpoint, $token) {\n\n\t\ttry{\n\t\t\n\t\t\t$response = Http::withHeaders([\n\t\t\t\t\t\t 'Content-Type' => 'application/json; charset=UTF8',\n\t\t\t\t\t\t 'timeout' => 10,\n\t\t\t\t\t\t 'Authorization' => 'Bearer '.Session::get('userInfo')->data->access_token\n\t\t\t\t\t\t\t])->get($this->base_uri . $endpoint);\n\n\t\t\t$body = json_decode($response->body());\n\n\t\t\t//dd($response->body());\n\t\t} catch(GuzzleHttp\\Exception\\ClientException $ex){\n\n\n\t\t$body = json_decode(json_encode(['success' => false, \n\t\t\t 'type'=>'ClientException', \n\t\t\t 'StatusCode' => $ex->getCode(), \n\t\t\t 'message'=> 'No se pudo conectar con el servicio',\n\t\t\t \t 'Data' => 'Ha ocurrido un problema al intentar la conexión.']\n\t\t\t \t)\n\t\t\t\t\t\t\t);\n\n\t\t} catch (ClientErrorResponseException $exception) {\n\n\t\t\t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t 'type' => 'ClientErrorResponseException', \n\t\t\t \t 'StatusCode' => $ex->getCode(), \n\t\t\t \t 'error' => 'No se pudo conectar con el servicio',\n\t\t\t \t 'Data' => 'Ha ocurrido un problema al intentar la conexión con el servicio',\n\t\t\t \t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\t\t\t \t ])\n\t\t\t\t\t\t\t\t);\n\t\t\n\t\t} catch (\\GuzzleHttp\\Exception\\ConnectException $ex) {\n\n\t\t\t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t\t\t\t 'type' => 'connection', \n\t\t\t\t\t\t\t\t 'StatusCode' => 500, \n\t\t\t\t\t\t\t\t 'error' => \n\t\t\t\t\t\t\t\t 'No se pudo conectar con el servicio',\n\t\t\t\t\t\t\t\t 'Data' => 'Ha ocurrido un problema al intentar la conexión con el servicio' ,\n\t\t\t\t\t\t\t\t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\t\t\t\t\t\t\t\t ]) \n\t\t\t );\n\t\t\n\t\t} catch (BadResponseException $ex) {\n\t\t \t \n\t\t $body = json_decode(json_encode(['success' => false, \n\t\t \t\t\t\t\t\t\t\t 'type' => 'BadResponseException', \n\t\t \t\t\t\t\t\t\t\t 'StatusCode' => $ex->getCode(), \n\t\t \t\t\t\t\t\t\t\t 'error' => 'No se pudo conectar con el servicio', \n\t\t \t\t\t\t\t\t\t\t 'Data' => 'Ha ocurrido un problema con la url y no se ha podido conectar con el servicio',\n\t\t \t\t\t\t\t\t\t\t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\t\t \t\t\t\t\t\t\t\t])\n\t\t\t\t\t\t\t\t);\n\t\t \n\t\t // do something with json string...\n\t\t} catch (\\GuzzleHttp\\Exception\\RequestException $ex) {\n\n\t \t\t$body = json_decode(json_encode(['success' => false, \n\t \t\t\t\t\t\t\t\t\t 'type' => 'request', \n\t \t\t\t\t\t\t\t\t\t 'StatusCode' => $ex->getCode(), \n\t \t\t\t\t\t\t\t\t\t 'error' => json_decode($ex->getResponse()),\n\t \t\t\t\t\t\t\t\t\t 'Data' => 'Ha ocurrido un problema al intentar la conexión con el servicio',\n\t \t\t\t\t\t\t\t\t\t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\n\n\t \t\t\t\t\t\t\t\t\t ])\n\t \t \t\t\t\t\t);\n\t \t\t\n\t\t} \n\n\t\t//dd($body);\n\t\treturn $body;\n\t}", "title": "" }, { "docid": "3626bad7f034a15305041e3eea6af1ff", "score": "0.5758223", "text": "private function retrieveEndpoint(string $endpoint)\n {\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, $this->_config['rancher_url'] . $endpoint);\n curl_setopt($ch, CURLOPT_USERPWD, $this->_config['rancher_token'] . \":\" . $this->_config['rancher_secret']);\n\n // disable SSL checks to allow using a local docker based rancher\n // installation as a source.\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n $output = curl_exec($ch);\n $error = curl_error($ch);\n\n curl_close($ch);\n\n if($error)\n {\n throw new Exception($error);\n }\n\n return json_decode($output, true);\n }", "title": "" }, { "docid": "2587112b089c90aa8eec3dff367a8cd6", "score": "0.57529765", "text": "function getEndpoint();", "title": "" }, { "docid": "2587112b089c90aa8eec3dff367a8cd6", "score": "0.57529765", "text": "function getEndpoint();", "title": "" }, { "docid": "fce31e73ed2ebd36075657b0b32880ac", "score": "0.57528293", "text": "protected function getEndpointResponse($client,$method,$endpoint,$exception,$payload = null) {\n\n try {\n\n if($payload) {\n $response = $client->request($method, $endpoint, ['json' => $payload]);\n } else {\n $response = $client->request($method, $endpoint);\n }\n\n return $response;\n\n } catch(\\Exception $e) {\n throw new $exception($e->getMessage(),$e->getCode());\n }\n\n }", "title": "" }, { "docid": "fa7997265839d4e8cffeeaa5d3999bb6", "score": "0.5690238", "text": "public function handleRequest()\n {\n\n $this->createProviders();\n $this->getHost()->getFullAbsoluteRequestUri()->validateQueryParameters();\n $requestMethod = $this->getOperationContext()->incomingRequest()->getMethod();\n if ($requestMethod != HTTPRequestMethod::GET) {\n throw ODataException::createNotImplementedError(Messages::onlyReadSupport($requestMethod));\n }\n\n\n \t\treturn UriProcessor::process($this);\n\n }", "title": "" }, { "docid": "5690e52188c33b614627842798e42dfa", "score": "0.56798923", "text": "protected function getEndpoint()\n {\n return parent::getEndpoint();\n }", "title": "" }, { "docid": "f081abdf79e42f87297d51fdd9d33932", "score": "0.55479693", "text": "abstract protected function getEndpoint() : string;", "title": "" }, { "docid": "21a1a8fd86e2684282b95a3908ddfe7b", "score": "0.55319065", "text": "public function handleWebhook(): Response\r\n {\r\n //we cant processs if we dont find the stripe header\r\n if (!$this->request->hasHeader('Stripe-Signature')) {\r\n throw new Exception('Route not found for this call');\r\n }\r\n\r\n $request = $this->request->getPost();\r\n\r\n if (empty($request)) {\r\n $request = $this->request->getJsonRawBody(true);\r\n }\r\n $type = str_replace('.', '', ucwords(str_replace('_', '', $request['type']), '.'));\r\n $method = 'handle' . $type;\r\n\r\n $payloadContent = json_encode($request);\r\n $this->log->info(\"Webhook Handler Method: {$method} \\n\");\r\n $this->log->info(\"Payload: {$payloadContent} \\n\");\r\n\r\n if (method_exists($this, $method)) {\r\n return $this->{$method}($request, $method);\r\n } else {\r\n return $this->response(['Missing Method to Handled']);\r\n }\r\n }", "title": "" }, { "docid": "e49073c38d2f383eec49691e3141a3ce", "score": "0.549285", "text": "public function sendGetRequestToAPI($endpoint = '', $optional = [])\n {\n if(in_array($endpoint, $this->validEndpoints)) {\n $res = $this->guzzleClient->get($endpoint, [\n 'auth' => [$this->token, null],\n ]+ $optional);\n\n $body = json_decode($res->getBody()->getContents());\n return $body;\n } else {\n throw new Exception('No valid Endpoint triggered. You tried to reach: \"'.$endpoint.'\"\". Valid Endpoints: ' . implode(',',$this->validEndpoints));\n }\n }", "title": "" }, { "docid": "e3e1668ca8bc3f238585344a408c62e5", "score": "0.5481684", "text": "public function getEndpoint() {\n return $this->endpoint;\n }", "title": "" }, { "docid": "81fa54e334826cc42e0767a10ec1ff4f", "score": "0.5477874", "text": "public function __invoke()\n {\n try {\n $routes = $this->importRoutes();\n return response()->json(['routes' => $routes]);\n } catch (\\Exception $exception) {\n return response()->json(['status' => false, 'message' => $exception->getMessage()]);\n }\n }", "title": "" }, { "docid": "44fd0333684a222b3625891918717532", "score": "0.547679", "text": "private function getResponse()\n {\n switch ($this->context->method) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'DELETE':\n $method = $this->context->method;\n break;\n\n case 'HEAD':\n $method = 'GET';\n break;\n\n case 'OPTIONS':\n return $this->setCORSHeaders();\n\n default:\n return RestoLogUtil::httpError(404);\n }\n \n $response = $this->router->process($method, $this->context->path, $this->context->query);\n\n return isset($response) ? $this->format($response) : null;\n }", "title": "" }, { "docid": "67433a75e8b3656219d87ddf1f3938e8", "score": "0.54767776", "text": "public function __get($endpoint)\n {\n if (array_key_exists($endpoint, static::$collections_endpoints)) {\n $this->api = $endpoint;\n } elseif (array_key_exists($endpoint, static::$cursored_enpoints)) {\n $this->api = $endpoint;\n }\n $className = \"Technauts\\Machship\\\\Helpers\\\\\" . Util::studly($endpoint);\n if (class_exists($className)) {\n return new $className($this);\n }\n\n // If user tries to access property that doesn't exist, scold them.\n throw new \\RuntimeException('Property does not exist on API');\n }", "title": "" }, { "docid": "52d4161e604c35e1032dec11bd729852", "score": "0.5474883", "text": "public function get($endpoint, array $params);", "title": "" }, { "docid": "fce2c2626e5c7c20deafb7a804d86076", "score": "0.54073197", "text": "public function endpoint()\n {\n $client = new Client([\n 'base_uri' => 'https://login.eloqua.com/',\n 'auth' => $this->auth(),\n ]);\n $response = json_decode($client->get('id')->getBody());\n if (is_string($response)) {\n throw new Exception('Eloqua endpoint error: '.$response);\n } else {\n return $response->urls->base.'/api/rest/2.0/';\n }\n }", "title": "" }, { "docid": "a0044f363bccb562436f6ee6647dcb94", "score": "0.5401599", "text": "public function get_endpoint() {\n return $this->endpoint;\n }", "title": "" }, { "docid": "9502825503c60ed238e35aeb9626d223", "score": "0.53743094", "text": "public function get()\r\n {\r\n throw new HttpException('Method Now Allowed', HttpConstants::STATUS_CODE_METHOD_NOT_ALLOWED);\r\n }", "title": "" }, { "docid": "31dc3689506f7c99c33032fba9463803", "score": "0.5357074", "text": "public function get()\n {\n throw new HttpException('Method Now Allowed', HttpConstants::STATUS_CODE_METHOD_NOT_ALLOWED);\n }", "title": "" }, { "docid": "31dc3689506f7c99c33032fba9463803", "score": "0.5357074", "text": "public function get()\n {\n throw new HttpException('Method Now Allowed', HttpConstants::STATUS_CODE_METHOD_NOT_ALLOWED);\n }", "title": "" }, { "docid": "882d48aba09744dd92a0f55364f1ae8b", "score": "0.5340135", "text": "public function fetch($endpoint = null)\n {\n if (!$this->get_endpoint())\n {\n $this->set_endpoint($endpoint);\n }\n\n //do we have a query?\n if (in_array($this->_endpoint, array(self::ENDPOINT_PRODUCT, self::ENDPOINT_UKPRODUCT, self::ENDPOINT_CAPRODUCT)) && (!$this->get_query() && !$this->hasFilters() && !$this->get_extendedQuery()))\n {\n self::throwException('No query/filters or extendedQuery were specified for the Prosperent API', $this->get_exceptionHandler());\n }\n\n $url = $this->getUrl($this->getProperties(), $this->getEndpointRoute($this->get_endpoint()));\n\n return $this->makeRequest($url);\n }", "title": "" }, { "docid": "55a71ca326af345fe91a20e5a76e7e8f", "score": "0.53382176", "text": "public function __construct($endpoint);", "title": "" }, { "docid": "b1b07b52e0d896a8cca86a81210627f5", "score": "0.5330569", "text": "public function getRequest($endpoint);", "title": "" }, { "docid": "2f7e717839aba51233e7287c45e0c4d4", "score": "0.5322961", "text": "public function retrieve($endpoint)\n {\n // Cache skipping is on. We don't even check cache for data\n if (true === $this->skipCache) {\n $response = $this->caller->retrieve($endpoint);\n } else {\n $cacheKey = md5($endpoint);\n // Retrieve data from cache\n $response = $this->cacheService->get($cacheKey, $this->expiration);\n if (null === $response) {\n // No data in cache\n $response = $this->caller->retrieve($endpoint);\n if ($this->isCachable($response)) {\n $this->cacheService->set($cacheKey, $response, $this->expiration);\n }\n }\n }\n // Always reset cache skipping\n $this->skipCache(false);\n return $response;\n }", "title": "" }, { "docid": "9374912973e5744b7184c18941d438e2", "score": "0.5322643", "text": "public function get() {\n\t\t\tthrow new Exception_HTTP_NotImplemented;\n\t\t}", "title": "" }, { "docid": "69ac78a14184a52d96af591349171d25", "score": "0.5305133", "text": "public function getEndpoint()\n {\n return $this->endpoint;\n }", "title": "" }, { "docid": "69ac78a14184a52d96af591349171d25", "score": "0.5305133", "text": "public function getEndpoint()\n {\n return $this->endpoint;\n }", "title": "" }, { "docid": "7da2e00aa73e38dea260f1e7360050cf", "score": "0.52567554", "text": "public function getEndpoint()\n {\n return $this->_endpoint;\n }", "title": "" }, { "docid": "d1656253081b08df3097e8346cd3b81f", "score": "0.52383375", "text": "public function get(string $endpoint) {\n\t\t\treturn $this->request(static::PROTOCOL_GET, $endpoint);\n\t\t}", "title": "" }, { "docid": "8765ec83552644e033f5a788fb863fa1", "score": "0.522052", "text": "public function getResponse() {}", "title": "" }, { "docid": "3ca787c3773181cca2ff10490fcd8ea0", "score": "0.52135843", "text": "public function getEndpoint() {\n return $this->endpoint;\n }", "title": "" }, { "docid": "3ca787c3773181cca2ff10490fcd8ea0", "score": "0.52135843", "text": "public function getEndpoint() {\n return $this->endpoint;\n }", "title": "" }, { "docid": "f23b95200f59e501a47ff0079bad9a4e", "score": "0.5203615", "text": "public function __invoke()\n {\n return response()->json($this->response);\n }", "title": "" }, { "docid": "ed9f0d2915d1dd380712eb521a8cc8d2", "score": "0.51641226", "text": "public function request($type, $from, $endpoint, $data ){\n\n\n\t\t//dd($data);\n\t\t$headers = ['Content-Type' => 'application/json; charset=UTF8',\n\t\t\t\t 'timeout' => 10,\n\t\t\t ];\n\n\n\t if($from == 'auth'){\n\n\t \t$headers = Arr::add($headers, 'Authorization' , 'Bearer '. Session::get('userInfo')->data->access_token);\n\n\t \t\n\n\t }\n\n\n\t\t\tswitch ($type) {\n\t\t\t\tcase 'get':\n\t\t\t\t\t\n\t\t\t\t\ttry{\n\n\t\t\t\t\t\t$response = Http::withHeaders($headers)->get($this->base_uri . $endpoint);\n\n\t\t\t\t\t\t$body = json_decode($response->body());\n\n\t\t\t\t\t} catch(GuzzleHttp\\Exception\\ClientException $ex){\n\n\n\t\t\t\t\t\t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t\t\t 'type'=>'ClientException', \n\t\t\t\t\t\t\t 'StatusCode' => $ex->getCode(), \n\t\t\t\t\t\t\t 'message'=> 'No se pudo conectar con el servicio',\n\t\t\t\t\t\t\t \t 'Data' => 'Ha ocurrido un problema al intentar la conexión.']\n\t\t\t\t\t\t\t \t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t} catch (ClientErrorResponseException $exception) {\n\n\t\t\t\t\t\t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t\t\t\t 'type' => 'ClientErrorResponseException', \n\t\t\t\t\t\t\t \t 'StatusCode' => $ex->getCode(), \n\t\t\t\t\t\t\t \t 'error' => 'No se pudo conectar con el servicio',\n\t\t\t\t\t\t\t \t 'Data' => 'Ha ocurrido un problema al intentar la conexión con el servicio',\n\t\t\t\t\t\t\t \t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\t\t\t\t\t\t\t \t ])\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (\\GuzzleHttp\\Exception\\ConnectException $ex) {\n\n\t\t\t\t\t\t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'connection', \n\t\t\t\t\t\t\t\t\t\t\t\t 'StatusCode' => 500, \n\t\t\t\t\t\t\t\t\t\t\t\t 'error' => \n\t\t\t\t\t\t\t\t\t\t\t\t 'No se pudo conectar con el servicio',\n\t\t\t\t\t\t\t\t\t\t\t\t 'Data' => 'Ha ocurrido un problema al intentar la conexión con el servicio' ,\n\t\t\t\t\t\t\t\t\t\t\t\t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\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} catch (BadResponseException $ex) {\n\t\t\t\t\t\t \t \n\t\t\t\t\t\t $body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'type' => 'BadResponseException', \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'StatusCode' => $ex->getCode(), \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'error' => 'No se pudo conectar con el servicio', \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'Data' => 'Ha ocurrido un problema con la url y no se ha podido conectar con el servicio',\n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t])\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t \n\t\t\t\t\t\t // do something with json string...\n\t\t\t\t\t} catch (\\GuzzleHttp\\Exception\\RequestException $ex) {\n\n\t\t\t\t\t \t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'type' => 'request', \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'StatusCode' => $ex->getCode(), \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'error' => json_decode($ex->getResponse()),\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'Data' => 'Ha ocurrido un problema al intentar la conexión con el servicio',\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\n\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t ])\n\t\t\t\t\t \t \t\t\t\t\t);\n\t\t\t\t\t \t\t\n\t\t\t\t\t} catch(ConnectionException $ex){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'type' => 'request', \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'StatusCode' => $ex->getCode(), \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'error' => 'Error de conexión',\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'Data' => 'Ha ocurrido un problema al intentar la conexión con el servicio',\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\n\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t ])\n\t\t\t\t\t \t \t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'post':\n\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t\t\t$response = Http::withHeaders($headers)->post($this->base_uri . $endpoint, $data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$body = json_decode($response->body());\n\n\n\n\t\t\t\t\t} catch(GuzzleHttp\\Exception\\ClientException $ex){\n\n\n\t\t\t\t\t\t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t\t\t 'type'=>'ClientException', \n\t\t\t\t\t\t\t 'StatusCode' => $ex->getCode(), \n\t\t\t\t\t\t\t 'message'=> 'No se pudo conectar con el servicio',\n\t\t\t\t\t\t\t \t 'Data' => 'Ha ocurrido un problema al intentar la conexión.']\n\t\t\t\t\t\t\t \t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t} catch (ClientErrorResponseException $exception) {\n\n\t\t\t\t\t\t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t\t\t\t 'type' => 'ClientErrorResponseException', \n\t\t\t\t\t\t\t \t 'StatusCode' => $ex->getCode(), \n\t\t\t\t\t\t\t \t 'error' => 'No se pudo conectar con el servicio',\n\t\t\t\t\t\t\t \t 'Data' => 'Ha ocurrido un problema al intentar la conexión con el servicio',\n\t\t\t\t\t\t\t \t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\t\t\t\t\t\t\t \t ])\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (\\GuzzleHttp\\Exception\\ConnectException $ex) {\n\n\t\t\t\t\t\t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'connection', \n\t\t\t\t\t\t\t\t\t\t\t\t 'StatusCode' => 500, \n\t\t\t\t\t\t\t\t\t\t\t\t 'error' => \n\t\t\t\t\t\t\t\t\t\t\t\t 'No se pudo conectar con el servicio',\n\t\t\t\t\t\t\t\t\t\t\t\t 'Data' => 'Ha ocurrido un problema al intentar la conexión con el servicio' ,\n\t\t\t\t\t\t\t\t\t\t\t\t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\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} catch (BadResponseException $ex) {\n\t\t\t\t\t\t \t \n\t\t\t\t\t\t $body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'type' => 'BadResponseException', \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'StatusCode' => $ex->getCode(), \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'error' => 'No se pudo conectar con el servicio', \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'Data' => 'Ha ocurrido un problema con la url y no se ha podido conectar con el servicio',\n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t])\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t \n\t\t\t\t\t\t // do something with json string...\n\t\t\t\t\t} catch (\\GuzzleHttp\\Exception\\RequestException $ex) {\n\n\t\t\t\t\t \t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'type' => 'request', \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'StatusCode' => $ex->getCode(), \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'error' => json_decode($ex->getResponse()),\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'Data' => 'Ha ocurrido un problema al intentar la conexión con el servicio',\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\n\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t ])\n\t\t\t\t\t \t \t\t\t\t\t);\n\t\t\t\t\t \t\t\n\t\t\t\t\t} \n\n\t\t\t\t\t//dd($body);\n\n\n\n\n\t\t\t\tbreak;\n\n\n\t\t\t\tcase 'put':\n\n\t\t\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t\t\t$response = Http::withHeaders($headers)->put($this->base_uri . $endpoint, $data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$body = json_decode($response->body());\n\t\t\t\t\t\t//dd($this->base_uri . $endpoint);\n\n\n\t\t\t\t\t} catch(GuzzleHttp\\Exception\\ClientException $ex){\n\n\n\t\t\t\t\t\t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t\t\t 'type'=>'ClientException', \n\t\t\t\t\t\t\t 'StatusCode' => $ex->getCode(), \n\t\t\t\t\t\t\t 'message'=> 'No se pudo conectar con el servicio',\n\t\t\t\t\t\t\t \t 'Data' => 'Ha ocurrido un problema al intentar la conexión.']\n\t\t\t\t\t\t\t \t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t} catch (ClientErrorResponseException $exception) {\n\n\t\t\t\t\t\t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t\t\t\t 'type' => 'ClientErrorResponseException', \n\t\t\t\t\t\t\t \t 'StatusCode' => $ex->getCode(), \n\t\t\t\t\t\t\t \t 'error' => 'No se pudo conectar con el servicio',\n\t\t\t\t\t\t\t \t 'Data' => 'Ha ocurrido un problema al intentar la conexión con el servicio',\n\t\t\t\t\t\t\t \t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\t\t\t\t\t\t\t \t ])\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (\\GuzzleHttp\\Exception\\ConnectException $ex) {\n\n\t\t\t\t\t\t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'connection', \n\t\t\t\t\t\t\t\t\t\t\t\t 'StatusCode' => 500, \n\t\t\t\t\t\t\t\t\t\t\t\t 'error' => \n\t\t\t\t\t\t\t\t\t\t\t\t 'No se pudo conectar con el servicio',\n\t\t\t\t\t\t\t\t\t\t\t\t 'Data' => 'Ha ocurrido un problema al intentar la conexión con el servicio' ,\n\t\t\t\t\t\t\t\t\t\t\t\t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\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} catch (BadResponseException $ex) {\n\t\t\t\t\t\t \t \n\t\t\t\t\t\t $body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'type' => 'BadResponseException', \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'StatusCode' => $ex->getCode(), \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'error' => 'No se pudo conectar con el servicio', \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'Data' => 'Ha ocurrido un problema con la url y no se ha podido conectar con el servicio',\n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\t\t\t\t\t\t \t\t\t\t\t\t\t\t])\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t \n\t\t\t\t\t\t // do something with json string...\n\t\t\t\t\t} catch (\\GuzzleHttp\\Exception\\RequestException $ex) {\n\n\t\t\t\t\t \t$body = json_decode(json_encode(['success' => false, \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'type' => 'request', \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'StatusCode' => $ex->getCode(), \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'error' => json_decode($ex->getResponse()),\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'Data' => 'Ha ocurrido un problema al intentar la conexión con el servicio',\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t 'message' => $ex->getCode() . ' Ha ocurrido un problema al intentar realizar la conexión ' \n\n\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t ])\n\t\t\t\t\t \t \t\t\t\t\t);\n\t\t\t\t\t \t\t\n\t\t\t\t\t} \n\n\t\t\t\t\n\n\n\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\treturn $body;\n\n\n\t}", "title": "" }, { "docid": "d83a893c0cffba32a0a5033010cad9af", "score": "0.51573557", "text": "protected abstract function callEndpoint($url, $body, $method);", "title": "" }, { "docid": "0a016a3fbd3b652e88ea85cca44ed717", "score": "0.5157085", "text": "public function getEndpoint(): Endpoint\n {\n return $this->endpoint;\n }", "title": "" }, { "docid": "6cfacc6a92d790ef1083fb0730613936", "score": "0.5136156", "text": "public function recordEndpoint()\n {\n // Configure access controls\n return $this->configureAccessControls('GET');\n }", "title": "" }, { "docid": "fb1799aa156ebd17ca4d07a6dc6b4a60", "score": "0.51321524", "text": "protected function getEndpoint()\n {\n $result = $this->getTarget();\n\n if (!empty($this->getResource())) {\n $result = $this->getResource() . '/' . $result;\n }\n\n return $result;\n }", "title": "" }, { "docid": "32cbcf3ab7a8f07f65cf69a2f2b87a04", "score": "0.51159006", "text": "public abstract function getAccessTokenEndpoint();", "title": "" }, { "docid": "82894604406404b7b3018620634f2fd8", "score": "0.5103514", "text": "private function handleResponse()\n {\n if (curl_error($this->curl)) {\n throw new Exception('Payout error: ' . curl_error($this->curl));\n }\n\n $response = json_decode($this->response);\n\n if (isset($response->errors)) {\n throw new Exception('Payout error: ' . $response->errors);\n }\n\n if (isset($response->token)) {\n $this->token = $response->token;\n }\n\n return $response;\n }", "title": "" }, { "docid": "19afd5b6da92e3fe268730a583bf6b1d", "score": "0.50919616", "text": "public function getResponse () {}", "title": "" }, { "docid": "19afd5b6da92e3fe268730a583bf6b1d", "score": "0.50919616", "text": "public function getResponse () {}", "title": "" }, { "docid": "19afd5b6da92e3fe268730a583bf6b1d", "score": "0.50919616", "text": "public function getResponse () {}", "title": "" }, { "docid": "19afd5b6da92e3fe268730a583bf6b1d", "score": "0.50919616", "text": "public function getResponse () {}", "title": "" }, { "docid": "19afd5b6da92e3fe268730a583bf6b1d", "score": "0.50919616", "text": "public function getResponse () {}", "title": "" }, { "docid": "27690b0be3cd9476ae65d149f8df7797", "score": "0.5088461", "text": "public function get(string $endpoint, array $params = []): array;", "title": "" }, { "docid": "ee21d9081b3889f2a8721732b7a0e207", "score": "0.5065267", "text": "abstract protected function getResponse();", "title": "" }, { "docid": "6ee21e0baf81bda859cd5af9f9114c15", "score": "0.5056398", "text": "public function getEndpoint()\n {\n if (!isset($this->download_id)) {\n throw new Exception('You must define a download id');\n }\n if (!isset($this->secret_key)) {\n throw new Exception('You must pass in a secret key before making a call');\n }\n \n $query_parameters = array();\n $query_parameters['download_id'] = $this->download_id;\n $query_parameters['auth_key'] = $this->create_hash_key($this->download_id);\n \n $domain = $this->getEndpointDomain();\n $query_string = http_build_query($query_parameters);\n \n return \"{$domain}?{$query_string}\";\n }", "title": "" }, { "docid": "1b986d66c9e39fdb00096e61c284e6c0", "score": "0.504956", "text": "private function _get( $endpoint, $extra_headers = array(), $altauth = false ) {\n\t\t\t$headers;\n\t\t\tif ( ! $this->api_key ) {\n\t\t\t\t$headers = array(\n\t\t\t\t\t'Authorization' => 'Basic ' . ( $altauth != false ? base64_encode( $altauth ) : base64_encode( $this->username . ':' . $this->password ) ), // '',// .\n\t\t\t\t\t'Content-Type' => 'application/json',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( $this->api_key != false ) {\n\t\t\t\t$headers = array(\n\t\t\t\t\t'Authorization' => 'Basic ' . base64_encode( $this->username . '/token:' . $this->api_key ),\n\t\t\t\t\t'Content-Type' => 'application/json',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$target_url = trailingslashit( $this->api_url ) . $endpoint;\n\n\t\t\t$result = wp_remote_get(\n\t\t\t\t$target_url,\n\t\t\t\tarray(\n\t\t\t\t\t'headers' => $headers,\n\t\t\t\t\t'sslverify' => false,\n\t\t\t\t\t'user-agent' => ZENDESK_USER_AGENT,\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ( ( defined( 'WP_DEBUG' ) && WP_DEBUG ) && is_wp_error( $result ) ) {\n\t\t\t\t$error_string = 'Zendesk API GET Error (' . $target_url . '): ' . $result->get_error_message();\n\t\t\t\tif ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {\n\t\t\t\t\techo $error_string . '<br />';\n\t\t\t\t}\n\n\t\t\t\tif ( class_exists( 'Zendesk_Wordpress_Logger' ) ) {\n\t\t\t\t\tZendesk_Wordpress_Logger::log( $error_string, true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "7f0891715f5f6635e55adc40d90c6948", "score": "0.5039135", "text": "private function call($endpoint, $extra_options = array() ) {\n $curl = curl_init();\n $curl_options = array(\n CURLOPT_URL => $this->api_base . $endpoint,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => '',\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 10,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => 'GET',\n CURLOPT_HTTPHEADER => array(\n 'key: ' . $this->api_key\n ),\n );\n\n foreach($extra_options as $option => $value) {\n $curl_options[$option] = $value;\n }\n\n curl_setopt_array($curl, $curl_options);\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n curl_close($curl);\n\n $response = json_decode($response, true);\n return $response['rajaongkir'];\n }", "title": "" }, { "docid": "fda1149c9ec4df2d10cc3957cbfce039", "score": "0.50300044", "text": "public function requestApi()\n {\n if (!$this->container->bound('json-api.inbound')) {\n return null;\n }\n\n return $this->container->make('json-api.inbound');\n }", "title": "" }, { "docid": "33714643f319881b8e8b9f7f65ad17a9", "score": "0.49964842", "text": "public function endpoint(string $endpointAnnotation): Endpoint;", "title": "" }, { "docid": "9d2521868ff30734ad397039481ad1b0", "score": "0.49870512", "text": "private function doGet(string $endpoint) : \\GuzzleHttp\\Psr7\\Response\n {\n return $this->client->request('GET', $endpoint, [\n 'auth' => [\n $this->username,\n $this->api_key\n ],\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n ]\n ]);\n }", "title": "" }, { "docid": "69b6ed8ccc72e62dc12674fa838efe52", "score": "0.49753943", "text": "function fetch($method, $resource, $body = '') {\n\t\t\t\n \t\t$params = array('oauth2_access_token' => $this->access_token,\n \t\t 'format' => 'json',\n \t\t );\n \n \t\t// Need to use HTTPS\n\t\t $url = 'https://api.linkedin.com' . $resource . '?' . http_build_query($params);\n\n\t\t $this->url = $url;\n\t\t \n\t\t // Tell streams to make a (GET, POST, PUT, or DELETE) request\n\t\t $context = stream_context_create(\n\t\t array('http' => \n\t\t array('method' => $method,\n\t\t )\n\t\t )\n\t\t );\n \n\t\t // Hocus Pocus\n\t\t $response = file_get_contents($url, false, $context);\n \t\t\t\n\t\t // Native PHP object, please\n\t\t return json_decode($response);\n\t\t}", "title": "" }, { "docid": "0fa7ce24243cbf3cc682b08cb14bba41", "score": "0.4974997", "text": "public function getEndpoint(): string\n {\n return $this->endpoint;\n }", "title": "" }, { "docid": "0fa7ce24243cbf3cc682b08cb14bba41", "score": "0.4974997", "text": "public function getEndpoint(): string\n {\n return $this->endpoint;\n }", "title": "" }, { "docid": "00541a9a5694fab747931b4dedc59ed3", "score": "0.49703613", "text": "private function getData($endpoint) {\n $client = self::sageClient();\n\n\t return $client->execApiRequest( $endpoint, 'GET' );\n }", "title": "" }, { "docid": "9c5d25d1cfab0abeb55bd104d8b8133d", "score": "0.49478465", "text": "public function getEndpoints() {}", "title": "" }, { "docid": "c772a4c8ad7919260bcb5452130333a7", "score": "0.49478257", "text": "function HandleRoute($route, $body)\n{\n global $ENDPOINTS;\n\n try {\n echo $ENDPOINTS[$route]($body);\n } catch (Exception $e) {\n http_response_code(404);\n die();\n }\n}", "title": "" }, { "docid": "bb34c76264032f46d70ee7545389b915", "score": "0.49452057", "text": "protected function handleGET()\n {\n $serviceName = $this->request->getParameter('service');\n if (!empty($serviceName)) {\n /** @type BaseOAuthService $service */\n $service = ServiceManager::getService($serviceName);\n $serviceGroup = $service->getServiceTypeInfo()->getGroup();\n\n if ($serviceGroup !== ServiceTypeGroups::OAUTH) {\n throw new BadRequestException('Invalid login service provided. Please use an OAuth service.');\n }\n\n return $service->handleLogin($this->request->getDriver());\n }\n\n return Session::getPublicInfo();\n }", "title": "" }, { "docid": "49f2772864000313ba544033f2bfeced", "score": "0.4944616", "text": "public static function loadByEndpoint($endpoint) {\n return self::loadByField('endpoint', $endpoint);\n }", "title": "" }, { "docid": "43e0af47d8ef8c329aa49d36912ae33c", "score": "0.49383777", "text": "protected static function endpoint(): mixed\n\t{\n\t\treturn self::$query->endpoint;\n\t}", "title": "" }, { "docid": "89660f50d7a345bd5344e560375330d6", "score": "0.4930038", "text": "public function endpoint()\r\n\t{\r\n\r\n\t\tlog_message('debug', 'controllers.HAuth.endpoint called.');\r\n\t\tlog_message('info', 'controllers.HAuth.endpoint: $_REQUEST: '.print_r($_REQUEST, TRUE));\r\n\r\n\t\tif ($_SERVER['REQUEST_METHOD'] === 'GET')\r\n\t\t{\r\n\t\t\tlog_message('debug', 'controllers.HAuth.endpoint: the request method is GET, copying REQUEST array into GET array.');\r\n\t\t\t$_GET = $_REQUEST;\r\n\t\t}\r\n\r\n\t\tlog_message('debug', 'controllers.HAuth.endpoint: loading the original HybridAuth endpoint script.');\r\n\t\trequire_once APPPATH.'/third_party/hybridauth/index.php';\r\n\r\n\t}", "title": "" }, { "docid": "2a268869dd808f4a75588a86cbdf8bc3", "score": "0.4927393", "text": "function global_exception_handler($exception=null) {\n header(\"Access-Control-Allow-Orgin: *\");\n header(\"Access-Control-Allow-Methods: *\");\n header(\"Content-Type: application/json; charset=UTF-8\");\n header(\"HTTP/1.0 404 Not Found\");\n echo json_encode(array('error'=> $exception->getMessage()));\n}", "title": "" }, { "docid": "ca0d7c3b1d4159843cb4cdf0dfe22100", "score": "0.49256828", "text": "public function getRedirectionEndpoint();", "title": "" }, { "docid": "8a7e33a1ea4d293fefca18da60160428", "score": "0.4924189", "text": "public function get($endpoint, array $getParams = null) {\n $this->call = self::VERSION . $endpoint;\n\n if ($getParams !== null && is_array($getParams)) {\n $this->params = $getParams; // TODO: Pass params rather than stuffing in attribute.\n }\n\n return $this->sendRequest();\n }", "title": "" }, { "docid": "59bafb04c118e8112b3a203690b95b1c", "score": "0.49156535", "text": "public function processApi() {\n if (empty($_REQUEST['rquest'])) {\n $this->response('No endpoint', 404);\n }\n $this->args = explode(\"/\", $_REQUEST['rquest']);\n\n //get the method\n if (count($this->args) < 3) {\n $func = $this->args[0];\n } else\n $func = $this->args[0] . $this->args[2];\n\n if ((int) method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->response('', 404); // If the method not exist with in this class, response would be \"Page not found\".\n\n \n//validate Oauth and get userID\n }", "title": "" }, { "docid": "3b4b3f3530f2085cd1df394c33640831", "score": "0.49019808", "text": "public function getServiceEndpoint()\n {\n return $this->service_endpoint;\n }", "title": "" }, { "docid": "60b1df4350570cd32b785aaf9ea7669e", "score": "0.48926163", "text": "private function call(string $method, string $endpoint, string $parameters = NULL, string $format = 'json') {\n $guzzleClient = new Client([\n 'base_uri' => $this->url\n ]);\n $headers = [\n 'Content-Type' => 'application/json',\n 'X-Metabase-Session' => $this->token,\n ];\n $guzzleRequest = new Request($method, $this->url . $endpoint . $parameters, $headers);\n $request = $guzzleClient->send($guzzleRequest);\n if ($format === 'json') {\n return json_decode($request->getBody(), true, 512, JSON_THROW_ON_ERROR);\n }\n return $request->getBody();\n }", "title": "" }, { "docid": "9c9d0a3c615c6aa6fe0f2b109ebb7644", "score": "0.48919135", "text": "public function getResponse()\n {\n }", "title": "" }, { "docid": "8ed76a35a1c5551469ca03d01514f46b", "score": "0.4880141", "text": "private static function get_verification_endpoint() {\n\t\treturn self::get_api_endpoint( false );\n\t}", "title": "" }, { "docid": "8c3900f0397814977b9cd8b5ccd86d58", "score": "0.48758402", "text": "public function getProductsData($warehouseId){ //dd($warehouseId);\n $stack = HandlerStack::create();\n\n $middleware = new Oauth1([\n 'consumer_key' => '51c9894f766b68c5a93963ec486f0515',\n 'consumer_secret' => '7763de12b0d601e1297300298d68258c',\n 'token' => '9264797bb29fc621757239546e754bb8',\n 'token_secret' => '247d819aa00631b0d0a6cffa3a18c0f5'\n ]);\n $stack->push($middleware);\n\n $client = new Client([\n 'headers' => ['Content-Type' =>'application/json' , 'Accept' => 'application/json'],\n //'base_uri' => 'http://pixel38.hicart.com/',\n 'base_uri' => 'http://pixel38.hicart.com/api/rest/',\n 'handler' => $stack,\n 'auth' => 'oauth'\n ]);\n //dd($middleware);\n// Set the \"auth\" request option to \"oauth\" to sign using oauth\n $res = $client->get('products/?warehouse_id='.$warehouseId, ['auth' => 'oauth']);\n\n $data = $res->getBody();\n $data = json_decode($data);\n dd($data);\n}", "title": "" }, { "docid": "403aca482993b4f224864f750c6a8e43", "score": "0.48607415", "text": "public function fetch($endpoint_name, $tokens = []) {\n /** @var \\Drupal\\vu_rp_api\\Endpoint\\Endpoint $endpoint */\n $endpoint = $this->currentProvider->getEndpoint($endpoint_name);\n if (!$endpoint) {\n throw new Exception(sprintf('Endpoint \"%s\" for provider \"%s\" is not configured', $endpoint_name, $this->currentProvider->getTitle()));\n }\n\n $request = $endpoint->prepareRequest();\n $request->setUri(self::replacePathTokens($request->getUri(), $tokens));\n\n $response = $this->sendRequest($request);\n\n if ($response->getStatus() == RestInterface::HTTP_OK) {\n $this->validateResponseFormat($endpoint->getFormat(), $response->getContent());\n $endpoint->getFieldMapper()->validateResponseSchema($response->getContent());\n\n return $response;\n }\n\n throw new Exception(sprintf('Unable to connect to provider \"%s\" endpoint \"%s\": Status %s, Content %s',\n $this->currentProvider->getTitle(),\n $endpoint->getTitle(),\n $response->getStatus(),\n $response->getContent()\n ));\n }", "title": "" }, { "docid": "5e9a29648639a8bddd5e321a2b0928bd", "score": "0.48598063", "text": "public function getResponse(): GatewayProviderResponseContract;", "title": "" }, { "docid": "51279805fd671cdcf15de00b079744d9", "score": "0.4849474", "text": "public function getEndpoint()\n {\n\n return $this->endpoint ?? $this->newEndpoint();\n\n }", "title": "" }, { "docid": "849902467f956fbff0e32bfc393f05a8", "score": "0.4848858", "text": "protected function doRequest()\n {\n\n try {\n $client = new Client([\n 'verify' => false\n ]);\n\n $response = $client->request($this->method, $this->baseUrl . $this->endPoint, [\n 'headers' => [\n 'Authorization' => $this->token,\n 'Content-Type' => 'application/json',\n 'Accept' => 'application/json',\n ],\n $this->requestOption => $this->params\n ]);\n\n $this->response['data'] = $response->getBody()->getContents();\n\n } catch (ClientException $ex) {\n\n $response = json_decode($ex->getResponse()->getBody()->getContents(),true);\n\n Log::error('Error Client Gateway ', ['data' => $this->params, 'url' => $this->baseUrl . $this->endPoint , 'message' => $response]);\n $this->response['status'] = false;\n $this->response['message'] = $response['message'];\n\n } catch (\\Exception $ex) {\n\n Log::error('Error Gateway ', ['data' => $this->params, 'url' => $this->baseUrl . $this->endPoint , 'message' => $ex->getMessage()]);\n $this->response['status'] = false;\n $this->response['message'] = $ex->getMessage();\n }\n\n return $this;\n }", "title": "" }, { "docid": "042b805d8402e91c28b9ae52fb1c1836", "score": "0.48465535", "text": "public function getEndpoint() \n {\n return $this->_fields['Endpoint']['FieldValue'];\n }", "title": "" }, { "docid": "740f3e3348e1897678cd1681400b87d5", "score": "0.48421603", "text": "public function request()\n {\n try {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->endpoint);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 240);\n $result = curl_exec($ch);\n\n return json_decode($result, true);\n } catch (\\Exception $e) {\n return null;\n }\n }", "title": "" }, { "docid": "ce3ac466e8137f7b47a8b7b6119c658a", "score": "0.48321438", "text": "public function check($endpoint)\n {\n $request = new Request(self::BASE_URL);\n $response = $request->get($endpoint . '?s=' . $this->url);\n return $this->parseResponse($response);\n }", "title": "" }, { "docid": "9222fba89f0dd76ef64205be8406a0bf", "score": "0.48315036", "text": "public function processRequest()\n {\n try {\n\n // Authenticate request with user defined callback\n if ( isset($this->app['api.authentication'])\n && is_callable($this->app['api.authentication'])\n ) {\n $this->app['api.authentication']($this->app, $this->request);\n }\n\n // Controller must exist\n if (empty($this->path)) {\n return array_replace_recursive($this->default_response, array(\n 'meta' => array('message' => $this->app['api.name'])\n ));\n }\n\n // Build controller\n $bits = explode('/', $this->path);\n for ($i = 0, $l = count($bits); $i < $l; $i++) {\n $this->route['controller'].= ($i > 0 ? '' : $this->app['api.namespace']).'\\\\'.Inflector::classify($bits[$i]);\n if (class_exists($this->route['controller'])) {\n $this->args = array_slice($bits, $i + 1, $l);\n $this->route['method'] = array_shift($this->args);\n break;\n }\n }\n\n // Verify that a controller was found\n if (!class_exists($this->route['controller'])) {\n throw new Exception(\"That's an invalid endpoint!\", 403);\n }\n\n $controller = new $this->route['controller']($this->app, $this->request);\n\n // Get an array of valid method names from controller class,\n // removing any methods inherited from the base API class.\n $refl_parent = new ReflectionClass($this);\n $refl_controller = new ReflectionClass($controller);\n $http_methods = array('get', 'post', 'put', 'delete');\n $parent_methods = array_map(function ($v) { return $v->name; }, $refl_parent->getMethods());\n $controller_methods = array_map(function ($v) { return $v->name; }, $refl_controller->getMethods());\n $valid_methods = array_diff($controller_methods, $parent_methods, $http_methods);\n\n // Check for method by name, default to HTTP method if\n // it exists in the controller.\n if (!$this->route['method']) {\n $this->route['method'] = strtolower($this->request->getMethod());\n } else if (!in_array($this->route['method'], $valid_methods)) {\n $original_method = $this->route['method'];\n $this->route['method'] = strtolower($this->request->getMethod()).ucfirst($this->route['method']);\n if (!in_array($this->route['method'], $valid_methods)) {\n array_unshift($this->args, $original_method);\n $this->route['method'] = strtolower($this->request->getMethod());\n }\n }\n\n // Sub-Method\n if (isset($this->args[1])) {\n $http_method = strtolower($this->request->getMethod());\n $sub_method = $http_method.Inflector::classify($this->args[1]);\n\n // Sub-Method must exist\n if (!method_exists($controller, $sub_method)) {\n throw new Exception(\"Invalid Request\", 404);\n }\n\n $this->route['method'] = $sub_method;\n $this->args = array_values(array_diff($this->args, array($this->args[1])));\n }\n\n // Method must exist\n if (!method_exists($controller, $this->route['method'])) {\n throw new Exception('Invalid Request', 404);\n }\n\n // Verify Argument Count\n $reflection = new ReflectionMethod($controller, $this->route['method']);\n if ($reflection->getNumberOfRequiredParameters() > count($this->args)) {\n throw new Exception('missing required arguments', 400);\n }\n\n // Call controller method, pass args\n $data = array('data' => call_user_func_array(\n array($controller, $this->route['method']),\n $this->args\n ));\n\n } catch (Exception $e) {\n $data = array('meta' => array(\n 'error' => true,\n 'message' => $e->getMessage(),\n 'status' => $e->getCode()\n ));\n }\n\n return array_replace_recursive($this->default_response, $data);\n }", "title": "" }, { "docid": "23db2a8b5460c7c23df1909690f7f55f", "score": "0.48289287", "text": "public function __invoke($endpoint, $params, $token = null)\n {\n if ($token) {\n $this->reqHeaders[\"Authorization\"] = \"OAuth {$token}\";\n } else {\n $this->signRequest($endpoint, $params);\n }\n // late bind the baseUrl (useful when using feature during feature validation\n if (!$this->guzzle->getBaseUrl()) {\n $this->guzzle->setBaseUrl($this->config->getItem('capture.captureServer'));\n }\n $resp = $this->guzzle->post($endpoint, $this->reqHeaders, $params)->send()->json();\n if (empty($resp['stat']) || $resp['stat'] == 'error') {\n throw new \\Exception($resp['error_description']);\n }\n return isset($resp['result']) ? $resp['result'] : $resp;\n }", "title": "" }, { "docid": "84f3a766a4acbcd3a6be36dbcfcd3c00", "score": "0.48285607", "text": "public function __invoke($data){\n\t\t\treturn $this->requestor->get( $this->requests['__invoke']['url'] , $data );\n\t\t}", "title": "" }, { "docid": "23d149f08f7f344df142c1ce45c7c71e", "score": "0.48182887", "text": "private function _request(\n string $method,\n array $params = [],\n array $optional = [],\n string $overrideFormat = null\n ): mixed {\n $url = $this->_parseUrl($method, $params + $optional);\n if ($url === '') {\n throw new InvalidRequestException('Could not parse URL!');\n }\n\n $format = $overrideFormat ?? $this->_format;\n\n try {\n $request = new Request('GET', $url);\n $response = $this->_client->sendRequest($request);\n } catch (ClientExceptionInterface $e) {\n // Network error, e.g. timeout or connection refused\n throw new InvalidRequestException($e->getMessage(), $e->getCode(), $e);\n }\n\n $contents = $response->getBody()->getContents();\n\n // Validate if the response was successful\n if ($response->getStatusCode() !== 200) {\n throw new InvalidRequestException($contents,\n $response->getStatusCode());\n }\n\n // Sometimes the response was unsuccessful, but the status code was 200\n if ($format === self::FORMAT_JSON) {\n $valid = $this->_isValidResponse($contents);\n\n if ($valid !== true) {\n throw new InvalidResponseException($valid.' ('.$this->_parseUrl($method, $params)\n .')', 403);\n }\n }\n\n return $this->_parseResponse($contents, $format);\n }", "title": "" }, { "docid": "7483da86a3a173a9a95b65c8ccb21208", "score": "0.4807282", "text": "public function getJsonResponse($request, $e)\n {\n if ($e instanceof ModelNotFoundException) {\n return response()->json([\n 'error' => 'Product not found'\n ], Response::HTTP_NOT_FOUND);\n }\n if($e instanceof AuthenticationException){\n return response()->json([\n 'error' => 'Unauthenticated'\n ], Response::HTTP_UNAUTHORIZED);\n }\n if($e instanceof NotFoundHttpException){\n return response()->json([\n 'error' => 'Incorrect route'\n ], Response::HTTP_NOT_FOUND);\n }\n }", "title": "" }, { "docid": "31f1dce16af1588d8bfe1c56b8bd221b", "score": "0.4800771", "text": "public function getResponseBody();", "title": "" }, { "docid": "14c9221aa954ba08ff335c8a804e80db", "score": "0.47912702", "text": "public function getResponse(): ResponseInterface;", "title": "" }, { "docid": "b72c5e977e191b677a7405d352c2da49", "score": "0.4791028", "text": "public function ingress()\n {\n $json = json_decode($this->json, true);\n\n // Make sure there is no error parsing JSON content, otherwise panic!\n if (json_last_error() !== JSON_ERROR_NONE) {\n throw new \\Exception(\n 'Unable to parse JSON content: ' . json_last_error_msg()\n );\n }\n\n return $json;\n }", "title": "" }, { "docid": "aa72fc264067d4a1dd3ca528872cf6e7", "score": "0.47904146", "text": "public function call_api($endpoint, $params = array()) {\n\t\t\n\t \treturn call_user_func_array(array($this, $endpoint), array($params));\n\t\n\t }", "title": "" }, { "docid": "349be55cc5bd3254ce5efce968afba2a", "score": "0.47802615", "text": "public function get($endpoint, $data = [], $ssl = false, $raw = false)\n {\n // Aqui tenemos un pequeño problema y es que hablan de puntos repetidos y http_build_query\n // no acepta parametros repetidos\n $url = $endpoint . '?' . http_build_query($data);\n $url=$url.\"&key=\".$this->APIKey;\n $url=str_replace(\"?&\", \"?\", $url);\n\n $urlProcessed = preg_replace('/point\\d{1,2}=/', 'point=', $url);\n $urlProcessed = preg_replace('/details\\d{1,2}=/', 'details=', $urlProcessed);\n\n return $this->sentToRestAPI($urlProcessed, 'GET', [], $ssl, $raw);\n }", "title": "" }, { "docid": "296d915f2b0e3e8860161c4daa14e3de", "score": "0.47771522", "text": "function rest($endpoint, $uri, $method, $data, $wildcard_data = false) {\n // get amount of URI elements\n if (!is_array($uri) && is_string($uri))\n $uri = explode('/', $uri);\n $uriCount = is_array($uri) ? count($uri) : 0;\n // get HTTP verb method\n $method = strtoupper($method);\n // respond to invalid URI\n if ($uriCount < 0)\n return [ HTTP_BAD_REQUEST, 'Invalid URI' ];\n // correct endpoint data\n if (!isset($endpoint['__this']) || !is_array($endpoint['__this'])) $endpoint['__this'] = [ ];\n\n // if last endpoint in tree reached, run API procedure\n if ($uriCount == 0) {\n // check if API procedure exists in current endpoint for current HTTP method\n $endpoint_procedure = @$endpoint[\"_$method\"];\n if (!isset($endpoint_procedure) || !is_callable($endpoint_procedure))\n // respond to unimplemented HTTP method request\n return [ HTTP_METHOD_NOT_ALLOWED, \"Endpoint cannot be accessed with $method\" ];\n // run API procedure with HTTP data and current endpoint data, and respond with returned data\n return $endpoint_procedure($data, $endpoint['__this']);\n }\n\n // if there are more endpoints in the tree to traverse, recurse\n else {\n // check if next endpoint in tree exists in current endpoint\n $next_endpoint = @$endpoint[$uri[0]];\n // if next endpoint does not explicitly exist\n if (!isset($next_endpoint) || !is_array($next_endpoint)) {\n // check for wildcard endpoint\n $next_endpoint = @$endpoint['*'];\n if (!isset($next_endpoint) || !is_array($next_endpoint))\n // respond to lack of next endpoint/wildcard endpoint\n return [ HTTP_NOT_FOUND, 'Endpoint not found' ];\n // set wildcard data to URI element\n else $wildcard_data = $uri[0];\n }\n // correct next endoint data\n if (!isset($next_endpoint['__this']) || !is_array($next_endpoint['__this'])) $next_endpoint['__this'] = [ ];\n $next_endpoint['__this']['__parent'] = &$endpoint['__this'];\n // check if next endpoint initialization function exists\n if (isset($next_endpoint['__this']['__init']) && is_callable($next_endpoint['__this']['__init'])) {\n $next_endpoint_init_data = null;\n // run next endpoint initialization function with current endpoint\n if ($wildcard_data === false)\n $next_endpoint_init_data = $next_endpoint['__this']['__init']($next_endpoint['__this']);\n // include wildcard data if it exists\n else $next_endpoint_init_data = $next_endpoint['__this']['__init']($next_endpoint['__this'], $wildcard_data);\n // if initialization fails, respond with failure\n if (is_array($next_endpoint_init_data) && @$next_endpoint_init_data[0] !== true) return $next_endpoint_init_data;\n }\n // recurse, with next endpoint, sliced URI, same method, same data, and same wildcard data\n return rest($next_endpoint, array_slice($uri, 1), $method, $data, $wildcard_data);\n }\n}", "title": "" }, { "docid": "e7454daa67dcc16704486c48888315e2", "score": "0.47738042", "text": "public function handleResponse($operation, ApiRequestInterface $request, EntityInterface $entity = NULL);", "title": "" }, { "docid": "b538a2b6e6c97791381222b0e4a7628d", "score": "0.47712964", "text": "protected function getEndpoint()\n {\n return parent::getEndpoint() . '/payments/payment';\n }", "title": "" }, { "docid": "06b4c4a7761710fb3afdc343e648bf22", "score": "0.47686028", "text": "private function mockEndpoint()\n {\n $endpoints = m::mock('overload:PureClarity\\Api\\Resource\\Endpoints');\n $endpoints->shouldReceive('getDashboardEndpoint')\n ->times(1)\n ->with('1')\n ->andReturn(self::ENDPOINT);\n\n return $endpoints;\n }", "title": "" }, { "docid": "c8578faddc4f091106310e87f50fdc57", "score": "0.47675416", "text": "public function getAndParseJson($uri);", "title": "" }, { "docid": "6680d53161066e6a609b5c304fc761b0", "score": "0.4758506", "text": "public function get($endpoint, $params)\n {\n $url = $this->endpointURL . '/' . ltrim($endpoint, '/');\n $headers = array(\n \"Connection: close\",\n \"Accept: application/json\",\n );\n\n return $this->request($url, 'GET', $headers, $params);\n }", "title": "" }, { "docid": "6169191863e4b93b90247d4a094cfc09", "score": "0.4757519", "text": "public function get()\n {\n $url = $this->buildUri();\n $json = Response::get($url);\n return $json;\n }", "title": "" }, { "docid": "d7297b4d57bb853f42fcc6a780b72fc9", "score": "0.4747653", "text": "public function testStrategyBuildsJsonErrorResponseWhenNoResponseReturned()\n {\n $this->setExpectedException('RuntimeException');\n\n $route = $this->getMock('League\\Route\\Route');\n $callable = function (ServerRequestInterface $request, ResponseInterface $response, array $args = []) {};\n\n $route->expects($this->once())->method('getCallable')->will($this->returnValue($callable));\n\n $strategy = new JsonStrategy;\n $callable = $strategy->getCallable($route, []);\n\n $request = $this->getMock('Psr\\Http\\Message\\ServerRequestInterface');\n $response = $this->getMock('Psr\\Http\\Message\\ResponseInterface');\n\n $next = function ($request, $response) {\n return $response;\n };\n\n $callable($request, $response, $next);\n }", "title": "" } ]
dd2dfe15c193a5ef782c62f6cb543e0c
inserts a new record or updates and existing record into the database
[ { "docid": "01007e48095d5b2f567a9454e8aeac9b", "score": "0.0", "text": "public function save_record() {\n \n }", "title": "" } ]
[ { "docid": "b21fe1726fe3a5aef159ddaa87e2eb49", "score": "0.734709", "text": "public function save()\n {\n $table = $this->table();\n if ($this->exists()) {\n $table->update($this->toRowArray(), $this->where());\n } else {\n $table->insert($this->toRowArray());\n $this->_id = $table->getAdapter()->lastInsertId();\n }\n }", "title": "" }, { "docid": "bf9784c78795a87141a76977df673d8d", "score": "0.7257218", "text": "public function save() {\n\tif ($this->id) {\n\t\t$this->update();\n\t} else {\n\t\t$this->insert();\n\t}\n}", "title": "" }, { "docid": "bbc26b386ddb2bcf78ff3b1f937bd289", "score": "0.7155587", "text": "function insertUpdate($record, $pk = ''){\n\t try{\n\t $success = $this->insert_only($record);\n\t return $success;\n\t }\n\t catch(Exception $e){\n\t $success = $this->update_only($record, $pk);\n\t \treturn $success;\n \t}\n\t}", "title": "" }, { "docid": "fe972acd38b11a084711ca729a00db3e", "score": "0.71330684", "text": "public function save(){\n $sql_text = \"INSERT INTO \".$this->getTable().\" (id,name,age,mark) VALUES(\".(is_null($this->id)?'null':$this->id).\",'\".$this->name.\n \"','\".$this->age.\"','\".$this->mark.\"') ON DUPLICATE KEY UPDATE name = '\".$this->name.\"',age = '\".$this->age.\n \"', mark = '\".$this->mark.\"';\";\n try{\n $this->getConn()->query($sql_text);\n }catch (\\Exception $e){\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "3afd28929f35a323ac429e4eb7c3c6ff", "score": "0.704376", "text": "public function save()\n {\n if (!is_null($this->id)) {\n $this->updateRow($this->id());\n } else {\n $this->insertRow();\n }\n }", "title": "" }, { "docid": "d147e59735edaed5e6d2d8c0cc8a7358", "score": "0.7007677", "text": "public function save() {\n\t\t$this->beforeSave();\n\t\t\n\t\t// Trims out non-fields and serializes data for DB entry.\n\t\t$info = $this->info(true, true);\n\t\t\n\t\tif (!$this->exists) {\n\t\t\t$this->beforeCreate();\n\t\t\t$this->_zendDb->insert($this->tableName(), $info);\n\t\t\tif (!$this->id) {\n\t\t\t\t$this->id = $this->_zendDb->lastInsertId();\n\t\t\t}\n\t\t\t$this->_afterCommand('insert');\n\t\t\t$this->exists = true;\n\t\t\t$this->afterCreate();\n\t\t} else {\n\t\t\t$this->_zendDb->update($this->tableName(), $info, 'id = '.$this->_zendDb->quote($this->id));\n\t\t\t$this->_afterCommand('update');\n\t\t}\n\t\t\n\t\t$this->afterSave();\n\t\t\n\t\t$this->_lastSaveRow = $this->info();\n\t}", "title": "" }, { "docid": "73feb93516d4b51c94f434dd86e0e588", "score": "0.6999552", "text": "public function save() {\n\t\t\tif ($this->id > 99999999999) { //TODO: Si l'ID (timestamp) est supérieur au dernier id d'insert... Peu probable de dépasser mais y a moyen de faire plus propre.\n\t\t\t\t$this->db_create();\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->db_update();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "380fd59663f009b25503b723d353276e", "score": "0.6948024", "text": "public function save()\n\t{\n\t\t//if the primary key has been set use update, otherwise insert.\n\t\tif(isset($this->_data[$this->_primaryKey]))\n\t\t{\n\t\t\t$data = $this->_data;\n\t\t\tunset($data[$this->_primaryKey]);\n\t\t\t$query = Query::update($this->_getTable(), $data, $this->getConnection())\n\t\t\t\t->whereEqual($this->_primaryKey, $this->_data[$this->_primaryKey]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = Query::insert($this->_getTable(), $this->_data, $this->getConnection());\n\t\t}\n\n\t\t//Execute the query and return the result\n\t\t$result = $query->execute();\n\n\t\t//check for a new ID and apply it to the data set.\n\t\t/** @var Insert $query */\n\t\tif($query instanceof Insert)\n\t\t\t$this->_data[$this->_primaryKey] = $query->getInsertId();\n\n\t\t//Return the boolean of success or failure.\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "82c0e9a09b5f1a48b2876749b2818f5c", "score": "0.6909886", "text": "function insert()\n\t\t{\n\n\t\t\t// forzo l'identificativo del record a 0\n\t\t\t$this->id = 0;\n\t\t\t// salvo il record\n\t\t\t$this->save();\n\t\t}", "title": "" }, { "docid": "901d1caa772e8e61fdb4f18f13e6c622", "score": "0.68948877", "text": "public function save()\n {\n self::dbConnect();\n\n if(!empty($this->attributes)){\n if(isset($this->attributes['id'])){\n $this->update($this->attributes['id']);\n } else {\n $this->insert();\n }\n } \n }", "title": "" }, { "docid": "ecbd3fc029d7927e7cac484e3072c08c", "score": "0.6876782", "text": "public function insertRecord()\n {\n }", "title": "" }, { "docid": "cfc396988b1b27a2779e32ee4108a117", "score": "0.6800014", "text": "public function save()\n {\n // Updates the database\n if ($this->update() == 0) {\n // If no object was updated insert a new one\n $this->insert();\n }\n }", "title": "" }, { "docid": "539299faab35bba9d76836ffea1537a1", "score": "0.67835605", "text": "public function save(){\n\t\t//new record won't have id\n\t\treturn isset($this->id) ? $this->update() : $this->create();\n\t}", "title": "" }, { "docid": "794c57856c6ccffd3e1f4bdbc9e67c98", "score": "0.67539036", "text": "public function save(){\n if($this->id){\n $this->update();\n }else{\n $this->insert(); //only insert from registration\n }\n }", "title": "" }, { "docid": "1cb81442cc086e261b3513895c531cf1", "score": "0.6739325", "text": "public function save($record)\r\n {\r\n try\r\n {\r\n // Check that the primary key is not empty\r\n if ($record[$this->primaryKey] == '')\r\n {\r\n // SQL auto-increment triggered to replace an empty string\r\n $record[$this->primaryKey] = null;\r\n }\r\n\r\n $this->insert($record);\r\n }\r\n\r\n catch (PDOException $e)\r\n {\r\n $this->update($record);\r\n }\r\n }", "title": "" }, { "docid": "4281a3ed19f4383578d45ff079e18b3d", "score": "0.66954947", "text": "public function save()\n\t {\n\t // Ensure there are attributes before attempting to save\n\t if (!empty($this->attributes)) {\n\n\t \t// Get column names as an array, create a duplicate for prepared statement placeholders\n\t\t\t\t$columns = array_keys($this->attributes);\n\t\t\t\t$columnsPlaceholders = $columns;\n\n\t\t\t\t// Put a colon on the front of each of the placeholders for use in the query\n\t\t\t\tarray_walk($columnsPlaceholders, function(&$value, $key) {$value = ':' . $value;});\n\n\t \t// Perform the proper action - if the `id` is set, this is an update, if not it is a insert\n\t\t // Attempt to insert, but if a 'duplicate' exception is thrown, attempt to update intead\n\t\t if (!isset($this->id)) {\n\t\t \t$this->insert($columns, $columnsPlaceholders);\n\t\t } else {\n\t\t \t$this->update($columns, $columnsPlaceholders);\n\t\t }\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.6691633", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.6691633", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.6691633", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "abcb216c5b96a292c1c321299b1c7508", "score": "0.66646236", "text": "public function save() {\r\n if($this->new_record()) {\r\n // if yes create record\r\n return $this->_create();\r\n } else {\r\n // else update record\r\n return $this->_update();\r\n\r\n // end if\r\n }\r\n }", "title": "" }, { "docid": "29db0688cec7e69ef78e0b89a21b6f25", "score": "0.662536", "text": "protected function _insert() {\n\t\t$dao = $this->_daoClass;\n\t\t$table = $dao::getTableName();\n\t\t$result = $dao::getAdapter()->insert($table, $this->_truncateToStructure());\n\t\t//odczyt id z sekwencji\n\t\tif ($result && property_exists($this, $this->_pk) && $this->{$this->_pk} === null) {\n\t\t\t$this->{$this->_pk} = $dao::getAdapter()->lastInsertId($dao::getAdapter()->prepareSequenceName($table));\n\t\t}\n\t\t$this->setNew(false);\n\t\t$this->_setSaveStatus(1);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fae22510da811f0eb0016f572b115f9a", "score": "0.66143507", "text": "public function insert($data);", "title": "" }, { "docid": "43ebe6324db189a626eda0b6cb875fae", "score": "0.66017264", "text": "public function insert();", "title": "" }, { "docid": "43ebe6324db189a626eda0b6cb875fae", "score": "0.66017264", "text": "public function insert();", "title": "" }, { "docid": "43ebe6324db189a626eda0b6cb875fae", "score": "0.66017264", "text": "public function insert();", "title": "" }, { "docid": "43ebe6324db189a626eda0b6cb875fae", "score": "0.66017264", "text": "public function insert();", "title": "" }, { "docid": "65a293882b0d7644e69d6d81b619dbc9", "score": "0.6598169", "text": "public function save($record=null)\n {\n $pk = $this->pk;\n $sql = \"\";\n $dataSet = array();\n foreach ($this->fields as $field) \n {\n if (isset($this->$field)) if($field != $this->pk) $dataSet[] = $field . \" = '\" . $this->$field. \"'\"; \n }\n $sql = implode ($dataSet, \", \");\n if (!isset($this->$pk))\n {\n $sql = \"insert into \" .$this->table . \" set \" . $sql;\n }\n else {\n $sql = \"update \" .$this->table .\" set \". $sql . \" where id = '\" . $this->id . \"'\";\n }\n \n $this->db->query($sql); \n \n if (!isset($this->$pk)) $this->$pk = $this->db->insert_id;\n\n }", "title": "" }, { "docid": "ac4eeb05c7bb91480aaa95ebe6aced2a", "score": "0.65905446", "text": "public function save() {\n $fields = array(\n 'name' => $this->ename,\n 'email' => $this->email,\n 'phone' => $this->phone\n );\n db_insert($this->table_name)\n ->fields($fields)\n ->execute();\n }", "title": "" }, { "docid": "8ad26121a2c8704eb2b045e139ccc4b8", "score": "0.6581954", "text": "public function save()\n {\n if ($this->id) {\n $this->update();\n } else {\n $this->id = strval($this->insert());\n }\n }", "title": "" }, { "docid": "c1f4730a796120fd2adf6f38b610ec56", "score": "0.65739936", "text": "public function save() {\r\n return $this->new_record ? $this->insert() : $this->update();\r\n }", "title": "" }, { "docid": "660b0336d681a5710dc53b6a24862114", "score": "0.65656054", "text": "public function saveChanges()\n {\n $db = $this->app->db;\n $db->connect();\n\n $id = $this->app->request->getPost(\"movieId\");\n $title = $this->app->request->getPost(\"movieTitle\");\n $year = $this->app->request->getPost(\"movieYear\");\n $image = $this->app->request->getPost(\"movieImage\");\n\n if ($id == \"new\") {\n $sql = \"INSERT INTO \" . $this->table . \" (title, year, image) VALUES (?, ?, ?);\";\n $db->execute($sql, [$title, $year, $image]);\n } else { \n $sql = \"UPDATE \" . $this->table . \" SET title = ?, year = ?, image = ? WHERE id = ?;\";\n $db->execute($sql, [$title, $year, $image, $id]);\n }\n }", "title": "" }, { "docid": "0293a83ce6c112fa6ba3283d45a07f80", "score": "0.6550312", "text": "public function save(): void\n {\n if ($this->getPrimaryKeyValue() != 0) {\n $values = [];\n $columns = static::$attributes;\n foreach ($columns as $column) {\n if ($column != $this->primaryKey) {\n $values[$column] = $this->{$this->$column};\n }\n }\n $this->update($values);\n }\n $values = [];\n $SQL = \"INSERT INTO \" . static::$table . \" VALUES (\";\n foreach (static::$attributes as $index => $attribut) {\n if ($index + 1 == count(static::$attributes)) {\n $SQL .= \"?)\";\n } else {\n $SQL .= \"?,\";\n }\n $values[] = $this->{$attribut};\n }\n $statement = Singleton::getInstance()->cnx->prepare($SQL);\n $code = $statement->execute($values);\n if ($code) {\n $this->setPrimaryKeyValue($this->cnx->lastInsertId());\n }\n }", "title": "" }, { "docid": "ad898f3e3012230b1b2765944a8a3eea", "score": "0.65168905", "text": "public function save() {\r\n\t\tif (!$this->dirty) return;\r\n\r\n\t\t$data = array_diff_key($this->data, $this->extraCols);\r\n\r\n\t\tif (!$this->id) {\r\n\t\t\t$keys = array();\r\n\t\t\t$fields = array();\r\n\t\t\tforeach ($data as $key => $val) {\r\n\t\t\t\t$keys[]= $key;\r\n\t\t\t\t$fields[]= $this->db->formatQuery('%', $val);\r\n\t\t\t}\r\n\r\n\t\t\t$this->db->query('INSERT INTO '.$this->tableName.' (\"%l\") VALUES (%l)', implode('\",\"', $keys), implode(',', $fields));\r\n\t\t\tif (isset($data['id'])) {\r\n\t\t\t\t$this->id = $data['id'];\r\n\t\t\t} else {\r\n\t\t\t\t$this->id = $this->db->getSerialVal($this->tableName, 'id');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$fields = array();\r\n\t\t\tforeach ($data as $key => $val)\r\n\t\t\t\t$fields[]= $this->db->formatQuery('\"'.$key.'\" = %', $val);\r\n\r\n\t\t\t$this->db->query('UPDATE '.$this->tableName.' SET %l WHERE id=%', implode(',', $fields), $this->id);\r\n\t\t}\r\n\t\t$this->dirty = false;\r\n\t}", "title": "" }, { "docid": "6424228b177e19a769f0b170d4ae1010", "score": "0.6508552", "text": "public function save(){\n $id = static::$db_table_fields[0];\n return !empty($this->$id) ? $this->update() : $this->create();\n }", "title": "" }, { "docid": "3176cd1c8171a4ae57a736e76c4ccbc7", "score": "0.6508182", "text": "public function save() {\n // check current id is set if not create new row\n return isset($this->id) ? $this->update() : $this->create();\n }", "title": "" }, { "docid": "36b7ad891f75083519c9b1d23122fa99", "score": "0.6483228", "text": "public function save(){\n return $this->{static::$primaryKey} === null ? $this->create() : $this->update();\n }", "title": "" }, { "docid": "97558ddd0a1a7fe157f6915effc0e192", "score": "0.6470662", "text": "public function save() {\r\n\t\t\t$intRowsAffected = 0;\r\n\r\n\t\t\t$arrData = array(\r\n\t\t\t\t'name'\t\t => $this->getName(),\r\n\t\t\t\t'created_at' => $this->getCreatedAt(),\r\n\t\t\t);\r\n\r\n\t\t\tif($this->_isNew()) {\r\n\t\t\t\t// New instance. Insert data into TABLE_NAME table\r\n\t\t\t\t$intRowsAffected = $this->_objDb->insert(\r\n\t\t\t\t\tself::TABLE_NAME,\r\n\t\t\t\t\t$arrData\r\n\t\t\t\t);\r\n\r\n\t\t\t\t// Set instance id\r\n\t\t\t\t$this->setId($this->_objDb->lastInsertId());\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// Existing instance. Update data in TABLE_NAME table\r\n\t\t\t\t$intRowsAffected = $this->_objDb->update(\r\n\t\t\t\t\tself::TABLE_NAME,\r\n\t\t\t\t\t$arrData,\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'id = ?' => $this->getId(),\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\t// Check number of rows affected following query execution\r\n\t\t\t$blSaved = ($intRowsAffected > 0) ? true : false;\r\n\r\n\t\t\treturn $blSaved;\r\n\t\t}", "title": "" }, { "docid": "8fa580c346fda121d739bee3e8bb48ba", "score": "0.64699745", "text": "public function save() {\r\n if ($this->id === 0) return $this->insert();\r\n else return $this->update();\r\n }", "title": "" }, { "docid": "fde5a405cb09119ae9aa840231cce53c", "score": "0.64592797", "text": "protected function _insert()\n\t{\n\t\t$this->date_added = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->date_modified = $this->date_added;\n\t}", "title": "" }, { "docid": "48fc9d1503557c68681788793092c935", "score": "0.64533174", "text": "public function store()\n\t{\n\t\t$sql = \"\";\n\t\tif($this->created)\n\t\t{\n\t\t\t$sql = \"INSERT INTO `\".$this->table.\"` (\";\n\t\t\t\n\t\t\treset($this->data);\n\t\t\t\n\t\t\twhile(($col = current($this->data)) !== false)\n\t\t\t{\n\t\t\t\t$sql .= \"`\".key($this->data).\"`, \";\n\t\t\t\tnext($this->data);\n\t\t\t}\n\t\t\t\n\t\t\t$sql = substr($sql, 0, strlen($sql) - 2);\n\t\t\t$sql .= \") VALUES (\";\n\t\t\t\n\t\t\treset($this->data);\n\t\t\t\n\t\t\twhile(($col = current($this->data)) !== false)\n\t\t\t{\n\t\t\t\tif($col == \"\")\n\t\t\t\t{\n\t\t\t\t\t$sql .= \"NULL, \";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$sql .= \"'\".$col.\"', \";\n\t\t\t\t}\n\t\t\t\tnext($this->data);\n\t\t\t}\n\t\t\t\n\t\t\t$sql = substr($sql, 0, strlen($sql) - 2);\n\t\t\t$sql .= \");\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql = \"UPDATE `\".$this->table.\"` SET \";\n\t\t\tforeach($this->data as $key => $value)\n\t\t\t{\n\t\t\t\tif($key == $this->primary)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$sql .= \"`\".$key.\"` = '\".$value.\"', \";\n\t\t\t}\n\t\t\t$sql = substr($sql, 0, strlen($sql) - 2);\n\t\t\t$sql .= \" WHERE `\".$this->primary.\"` = '\".$this->getPri().\"';\";\n\t\t}\n\t\t\n\t\t$this->db->query($sql);\n\t\t\n\t\tif($this->created)\n\t\t{\n\t\t\t$this->data[$this->primary] = $this->db->getInsertId();\n\t\t}\n\t\t\n\t\t$this->created = false;\n\t\t\n\t\treturn $this->db->getErrno() == 0;\n\t}", "title": "" }, { "docid": "7b8410f60bba168f14d858eedb49bf02", "score": "0.6448419", "text": "public function insert_record(){\n\t\t$column_part=array_keys($this->array_attributes);\n\t\t$value_part=array_values($this->array_attributes);\n\n\t\t$column_part=implode(\", \", $column_part);\n\t\t$value_part=implode(\", \", $value_part);\n\n\t\t$query=\"INSERT INTO {$this->table} ($column_part) VALUES ($value_part)\";\n\t\t$result=$this->query($query); \n\t\t\n\t\tif($result) {\n\t\t\techo \"User inserted\";\n\t\t} else {\n\t\t\techo \"user not inserted\";\n\t\t} \n\t}", "title": "" }, { "docid": "654412db576e66f1a39ecb7caa775e3d", "score": "0.6443883", "text": "public function save()\n {\n if( !empty($this->_model) )\n {\n // Extract any joined fields from record\n $this->_fields = array_diff($this->_fields, $this->_joinedFields);\n \n // Check if new record, if so, call create method of model\n if( $this->_new == true )\n {\n $this->_insertId = Iceberg::getModel($this->_model)->create($this); \n if( is_numeric($this->_insertId) && $this->_insertId > 0 )\n {\n $pkField = Iceberg::getModel($this->_model)->getPrimaryKey();\n $this->$pkField = $this->_insertId;\n return true;\n }\n }\n else if( in_array(true, $this->_dirty) )\n {\n return Iceberg::getModel($this->_model)->save($this);\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "b6391bdd895745b8760cbf1fb644e14d", "score": "0.64417195", "text": "protected function _executeInsert(){ }", "title": "" }, { "docid": "e6d015f2e37d5620987d430e9831601d", "score": "0.6438068", "text": "abstract public function insert($obect);", "title": "" }, { "docid": "b1490b15ea14eb23a7329b8cea3343bb", "score": "0.6429602", "text": "function insert_db_record () {\n if ($this->fieldsAllValid()) { // validate user input\n // if valid data, insert record into table\n $pdo = Database::connect();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t$this->password_hashed = MD5($this->password);\n\t\t\t// safe code\n $sql = \"INSERT INTO $this->tableName (name,email,mobile, password_hash) values(?, ?, ?, ?)\";\n\t\t\t// dangerous code\n\t\t\t//$sql = \"INSERT INTO $this->tableName (name,email,mobile) values('$this->name', '$this->email', '$this->mobile')\";\n $q = $pdo->prepare($sql);\n\t\t\t// safe code\n $q->execute(array($this->name, $this->email, $this->mobile, $this->password_hashed));\n\t\t\t// dangerous code\n\t\t\t//$q->execute(array());\n Database::disconnect();\n header(\"Location: $this->tableName.php\"); // go back to \"list\"\n }\n else {\n // if not valid data, go back to \"create\" form, with errors\n // Note: error fields are set in fieldsAllValid ()method\n $this->create_record(); \n }\n }", "title": "" }, { "docid": "48ed6ef6a466a20ab8f257399e4192d8", "score": "0.63955486", "text": "function save(){\n $this->_dsql()->owner->beginTransaction();\n $this->hook('beforeSave');\n\n // decide, insert or modify\n if($this->loaded()){\n $res=$this->modify();\n }else{\n $res=$this->insert();\n }\n\n $res->hook('afterSave');\n $this->_dsql()->owner->commit();\n return $res;\n }", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.63908005", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "14d8f341b26401db81cfd4dd3a64cf2c", "score": "0.6384362", "text": "public function save() {\n\t if ($this->id === null) {\n\t $stmt = Database::getPDOObject()->prepare(\n\t \"INSERT INTO employees (first_name, last_name, active) \".\n\t \" VALUES (:fname, :lname, :active) RETURNING id\");\n\t \n\t $stmt->bindValue(':fname', $this->first_name);\n\t $stmt->bindValue(':lname', $this->last_name);\n\t $stmt->bindValue(':active', ($this->active ? 'TRUE' : 'FALSE'));\n\t $stmt->execute();\n\t \n\t $this->id = $stmt->fetchColumn();\n\t } else {\n\t $stmt = Database::getPDOObject()->prepare(\n\t \"UPDATE employees SET \".\n\t \" first_name = :fname, \".\n\t \" last_name = :lname, \".\n\t \" active = :active \".\n\t \"WHERE id = :id\");\n\t \n\t $stmt->bindValue(':fname', $this->first_name);\n\t $stmt->bindValue(':lname', $this->last_name);\n\t $stmt->bindValue(':active', ($this->active ? 'TRUE' : 'FALSE'));\n\t $stmt->bindValue(':id', $this->id);\n\t $stmt->execute();\n\t }\n\t}", "title": "" }, { "docid": "bc828e54c9c55b2b45dd5dca83f8a506", "score": "0.6383352", "text": "public function upsert() {\r\n if(is_numeric($this->user)) {\r\n $this->user = User::byId($this->user);\r\n }\r\n if(is_numeric($this->book)) {\r\n $this->book = Book::byId($this->book);\r\n }\r\n \r\n if(null == $this->id) {\r\n return self::insert($this);\r\n } else {\r\n// return self::update($this);\r\n }\r\n }", "title": "" }, { "docid": "bdb03580b5437e6460df222345eff424", "score": "0.63799936", "text": "function insert()\n\t{\n\t\t$db = Database::getInstance() ;\n\n\t\t$id = $this->init_default_values() ;\n\n\t\t$set4sql = '' ;\n\t\tforeach( $this->cols as $col ) {\n\t\t\tif( empty( $col['edit_edit'] ) ) continue ;\n\t\t\tif( $col['name'] == $this->primary_key ) continue ;\n\t\t\t$set4sql .= $this->get_set4sql( @$_POST[ $col['name'] ] , $col ) . ',' ;\n\t\t}\n\t\tif( ! empty( $set4sql ) ) {\n\t\t\tif( $id > 0 ) {\n\t\t\t\t// UPDATE\n\t\t\t\t$db->queryF( \"UPDATE $this->table SET \".substr( $set4sql , 0 , -1 ).\" WHERE $this->primary_key='\".addslashes($id).\"'\" ) ;\n\t\t\t\treturn array( $id , 'update' ) ;\n\t\t\t} else {\n\t\t\t\t// INSERT\n\t\t\t\t$db->queryF( \"INSERT INTO $this->table SET \".substr( $set4sql , 0 , -1 ) ) ;\n\t\t\t\treturn array( $db->getInsertId() , 'insert' ) ;\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "cc514b64072615b9b724dd24471c25da", "score": "0.63789743", "text": "public function save() {\r\n if (!$this->exists()) {\r\n $stmt = $this->pdo->prepare(\"INSERT INTO $this->table VALUES (?,?)\");\r\n $stmt->execute(array($this->tag_id, $this->product_id));\r\n }\r\n }", "title": "" }, { "docid": "96e6f8926cacc4fbc66a2d457681f2ff", "score": "0.6363076", "text": "function execute() {\r\n\t\tif(empty($this->new) && empty($this->dirty) && empty($this->delete))\r\n\t\t\treturn false;\r\n\t\tforeach ($this->new as $table) {\r\n\t\t\t$this->mapper->insert($table);\r\n\t\t}\r\n\t\tforeach ($this->dirty as $table) {\r\n\t\t\t$this->mapper->update($table);\r\n\t\t}\r\n\t\tforeach ($this->delete as $table) {\r\n\t\t\t$this->mapper->delete($table);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c97441b3dca4e26f46570f93907bd96b", "score": "0.63600326", "text": "public function insert() {\r\n $fields = $field_markers = $types = $values = array();\r\n if(isset(static::$has_atached_file)) {\r\n $uploaded = FileUploader::upload();\r\n }\r\n\r\n foreach ($this->get_modifiable_fields() as $column => $value) {\r\n $fields[] = $column;\r\n $field_markers[] = '?';\r\n $types[] = $this->get_data_type($value);\r\n if(isset(static::$has_atached_file) && $column === static::$has_atached_file) {\r\n if($uploaded) {\r\n $filename = FileUploader::get_file_name();\r\n $values[] = &$filename;\r\n } else {\r\n $empty = '';\r\n $values[] = &$empty;\r\n }\r\n } else {\r\n $values[] = &$this->{$column};\r\n }\r\n }\r\n\r\n $sql = sprintf(\"INSERT INTO %s (%s) VALUES (%s)\", self::get_table_name(), implode(', ', $fields), implode(', ', $field_markers));\r\n\r\n $stmt = App::get_db()->prepare($sql);\r\n\r\n if(! $stmt) {\r\n throw new \\Exception(App::get_db()->connection()->error.\"\\n\\n\".$sql);\r\n }\r\n call_user_func_array(array($stmt, 'bind_param'), array_merge(array(implode($types)), $values));\r\n $stmt->execute();\r\n\r\n if($stmt->error) {\r\n FileUploader::remove_file(FileUploader::get_file_name());\r\n throw new \\Exception($stmt->error.\"\\n\\n\".$sql);\r\n }\r\n\r\n if($stmt->insert_id) {\r\n $this->id = $stmt->insert_id;\r\n }\r\n $this->new_record = false;\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "a323214afd27f3704e7d4164df476a6b", "score": "0.6342843", "text": "public function save(){\n $db = database::getInstance();\n\n if($this->id==0){ //If the ID does not exist, insert this new field\n $sql = 'INSERT INTO '. static::$table .' ('.implode(',',$this->fields).') VALUES (';\n foreach($this->fields as $field){\n $sql .= ':'.$field.',';\n }\n $sql = rtrim($sql, \",\").');';\n } else { //If the ID does exist, update the existing field\n $sql = 'UPDATE '. static::$table. ' SET ';\n foreach($this->fields as $field){\n $sql .= $field.'=:'.$field.',';\n }\n $sql = rtrim($sql, \",\").' where id='.$this->id.';';\n }\n\n try{\n $stmt = $db->connection->prepare($sql);\n foreach($this->fields as $field){\n $stmt->bindParam($field, $this->$field);\n }\n $stmt->execute();\n if($this->id==0){ //Get the ID of the new object and save it\n $this->id = $db->connection->lastInsertId();\n }\n $this->id;\n }catch (PDOException $e){\n database::logAndDestroy($e);\n }\n\n return true;\n }", "title": "" }, { "docid": "d412f66537bfc6f89a1837a7562b612f", "score": "0.6338059", "text": "public function save()\n {\n if (count($this->_changes) === 0) {\n // No changes\n return;\n }\n $keys = array_keys($this->_changes);\n $values = array_values($this->_changes);\n // Generating statement\n if ($this->getID()->isNew()) {\n $stmtSQL = 'INSERT INTO `' . $this->_tableName . '` ';\n $stmtSQL .= '(`' . implode('`,`', $keys) . '`)';\n $stmtSQL .= ' VALUES (';\n $stmtSQL .= str_repeat('?,', count($this->_changes) - 1);\n $stmtSQL .= '?)';\n } else {\n $stmtSQL = 'UPDATE `' . $this->_tableName . '`';\n $stmtSQL .= ' SET ';\n for ($i=0; $i<count($keys); $i++) {\n if ($i>0) {\n $stmtSQL .= ',';\n }\n $stmtSQL .= '`' . $keys[$i] . '`=?';\n }\n }\n\n $stmt = $this->_db->prepare($stmtSQL);\n if ($stmt===false) {\n throw new \\Exception('Bad schema or id field name');\n }\n // Binding params\n foreach ($values as $k=>$v) {\n if ($v === null) {\n $stmt->bindValue($k+1, null, Provider::PARAM_NULL);\n } elseif (is_int($v)) {\n $stmt->bindParam($k+1, $v, Provider::PARAM_INT);\n } else {\n $stmt->bindValue($k+1, (string) $v, Provider::PARAM_STR);\n }\n }\n // Executing\n if (!$stmt->execute()) {\n $info = $stmt->errorInfo();\n $code = (\n isset($info, $info[1]) && !empty($info[1]) ? $info[1] : 0\n );\n $message = (\n isset($info, $info[2]) && !empty($info[2]) ? $info[2] : 0\n );\n throw new \\Exception($message, $code);\n }\n\n // If inserted\n if ($this->getID()->isNew()) {\n if (isset($this->_changes[$this->_idFieldName])) {\n $this->_id = new ID(\n $this->_changes[$this->_idFieldName]\n );\n } else {\n $this->_id = new ID($this->_db->lastInsertId());\n }\n } else {\n // Id can be changed\n $this->_id = new ID($this->_data[$this->_idFieldName]);\n }\n\n // Erasing changes\n $this->_changes = array();\n }", "title": "" }, { "docid": "bdfb90f36e0f19cf9f81f775e919c817", "score": "0.6337268", "text": "function save(){\n if($this->_new){\n \n // wenn über setID eine ID explizit verlangt wurde, diese auch verwenden\n if(is_int($this->_id) && $this->_id > 0){\n $insertquerry = \"\n INSERT INTO\n \" . XT::getDatabasePrefix() . $this->_table . \"\n (\n id,\n creation_date,\n creation_user\n ) VALUES (\n \" . $this->_id . \",\n \" . time() . \",\n \" . XT::getUserID() . \"\n )\";\n XT::query($insertquerry,__FILE__,__LINE__);\n \n $this->setID($this->_id);\n \n }\n else {\n $insertquerry = \"\n INSERT INTO\n \" . XT::getDatabasePrefix() . $this->_table . \"\n (\n creation_date,\n creation_user\n ) VALUES (\n \" . time() . \",\n \" . XT::getUserID() . \"\n )\";\n XT::query($insertquerry,__FILE__,__LINE__);\n \n \n // Get the new id\n $result = XT::query(\"\n SELECT\n id\n FROM\n \" . XT::getDatabasePrefix() . $this->_table . \"\n ORDER BY\n id DESC\n LIMIT 1\n \",__FILE__,__LINE__);\n \n $data = XT::getQueryData($result);\n $this->setID($data[0]['id']);\n \n }\n \n }\n \n // If there are updated fields, build update query\n if(sizeof($this->_toUpdate) > 0){\n \n $sql = \"\";\n foreach($this->_toUpdate as $field => $value){\n $sql .= $field . \" = '\" . $value . \"',\";\n }\n \n XT::query(\"\n UPDATE\n \" . XT::getDatabasePrefix() . $this->_table . \"\n SET\n \" . $sql .\"\n mod_date = \" . time() . \",\n mod_user = \" . XT::getUserID() . \"\n WHERE\n id = \" . $this->getID() . \"\n \",__FILE__,__LINE__);\n $this->_updated = true;\n } else {\n $this->_updated = false;\n }\n // Search\n $this->index($this->_public);\n }", "title": "" }, { "docid": "7dfd92bae30b9fe8872cc18704584c19", "score": "0.63323885", "text": "public function save()\n {\n $column = array();\n\n // Accepted types\n $acceptedTypes = [\n 'boolean',\n 'integer',\n 'double',\n 'string',\n 'null'\n ];\n\n // Binding column types\n foreach ($this as $k => $v) {\n if (in_array(gettype($v), $acceptedTypes)) {\n $column[$k] = $this->database->Bind($v);\n }\n }\n\n // Check the operation type, insert or update\n if (! $this->config->recordId) {\n // Insert a new record\n $this->database->table($this->config->tableName)\n ->column($column)\n ->insert()\n ->execute();\n\n // Return id\n $this->config->recordId = $this->database->insert_id($this->config->sequence);\n } else {\n // Update existing record\n $this->database->table($this->config->tableName)\n ->column($column)\n ->argument(1, $this->config->primaryKey, $this->config->recordId)\n ->update()\n ->execute();\n }\n\n return $this->config->recordId;\n }", "title": "" }, { "docid": "bb4e250495cd4c338413e152bf481cce", "score": "0.63312066", "text": "public function save(){\n $fields = $this->fields();\n $attributes = get_object_vars($this);\n $params = [];\n foreach ($fields as $field){\n if(array_key_exists($field,$attributes)){\n $params[$field] = $attributes[$field];\n }\n }\n $this->insertRecord($params);\n }", "title": "" }, { "docid": "3c1e11461a8bddad4a05566cbd6b0095", "score": "0.63289064", "text": "public function save() {\n\t\t// A new record won't have an id yet.\n\t\treturn isset($this->id) ? $this->update() : $this->create();\n\t}", "title": "" }, { "docid": "609b108159d8b5fded737a044994f42c", "score": "0.6326128", "text": "public function save()\n {\n // Validate\n if (!$this->validates()) {\n return false;\n }\n\n // Run filter\n $this->runFilters('before', $this->_isNew ? 'create' : 'save');\n\n // Get data\n $data = static::data();\n\n // Create\n if ($this->_isNew) {\n $result = static::connection()\n ->insert($data)\n ->into(static::table())\n ->exec();\n\n $this->id = static::connection()->lastInsertId();\n }\n // Update\n else {\n $result = static::connection()\n ->update(static::table())\n ->set($data)\n ->where(static::$_primaryKey . ' = ?', $data[static::$_primaryKey])\n ->exec();\n }\n\n // Run filters\n $this->runFilters('after', $this->_isNew ? 'create' : 'save');\n\n return $result;\n }", "title": "" }, { "docid": "f8940bd202a2a655d11229012269d50c", "score": "0.632256", "text": "public function save()\n {\n $sql = \"INSERT INTO \";\n $sql .= static::tableName(). \" (\";\n $sql .= $this->fieldsToStr();\n $sql .= \") VALUES (\";\n $sql .= implode(', ', array_keys($this->fieldsToArrSql()));\n $sql .= \");\";\n \n //echo $sql;\n \n $db = new Db();\n $prepare = $db->connection->prepare($sql);\n if (!$prepare) {\n return false;\n }\n $prepare->execute($this->fieldsToArrSql());\n \n $this->id = $db->connection->lastInsertId();\n $prepare = null;\n \n return true;\n }", "title": "" }, { "docid": "22aa3b3a637ff73aa0f6cfe9dae7d22c", "score": "0.63209826", "text": "public function save() {\r\n\t\t\t$intRowsAffected = 0;\r\n\t\t\t\r\n\t\t\t$arrData = array(\r\n\t\t\t\t'question_no'\t => $this->getQuestionNo(),\r\n\t\t\t\t'question_text'\t => $this->getQuestionText(),\r\n 'questionnaire_id' => $this->getQuestionnaireId(),\r\n 'question_type_id' => $this->getQuestionTypeId(),\r\n 'chart_id' => $this->getChartId(),\r\n 'is_mapped' => $this->isMapped(),\r\n 'created_at'\t => $this->getCreatedAt(),\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\tif($this->_isNew()) {\r\n\t\t\t\t// New instance. Insert data into TABLE_NAME table\r\n\t\t\t\t$intRowsAffected = $this->_objDb->insert(\r\n\t\t\t\t\tself::TABLE_NAME,\r\n\t\t\t\t\t$arrData\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\t// Set instance id\r\n\t\t\t\t$this->setId($this->_objDb->lastInsertId());\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t// Existing instance. Update data in TABLE_NAME table\r\n\t\t\t\t$intRowsAffected = $this->_objDb->update(\r\n\t\t\t\t\tself::TABLE_NAME,\r\n\t\t\t\t\t$arrData,\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'id = ?' => $this->getId(),\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Check number of rows affected following query execution\r\n\t\t\t$blSaved = ($intRowsAffected > 0) ? true : false;\r\n\r\n\t\t\treturn $blSaved;\r\n\t\t}", "title": "" }, { "docid": "d19a6f5d5f8e214fe33faad69bef7976", "score": "0.6318683", "text": "public function save() {\n global $DB;\n $result = false;\n if (!$this->id) {\n $this->created = time();\n $data = $this->getdata();\n $result = $DB->insert_record($this->tablename, $data);\n if ($result) {\n $this->id = $result;\n }\n } else {\n $result = $DB->update_record($this->tablename, $this->getdata());\n }\n $this->saved = ($result ? true : false);\n return $result;\n }", "title": "" }, { "docid": "3cb18710cde2717e28d8cb95bb987f07", "score": "0.63151485", "text": "public function save() {\n\t\t$data = array();\n\t\tforeach($this->allFields as $field) {\n\t\t\tif ($field != 'dateCreated') {\n\t\t\t\t//echo($field .\" = \".$this->$field.\"<br />\");\n\t\t\t\t$data = $data + array($field =>$this->$field);\n\t\t\t}\n\t\t} // END foreach\n\t\t\n\t\tif ($this->id != -1) {\n\t\t\t$this->db->where('id', $this->id);\n\t\t\t$this->db->update($this->tblName,$data);\n\t\t} else {\n\t\t\t$this->db->insert($this->tblName,$data);\n\t\t} // END if\n\t\t//echo($this->db->last_query().\"<br />\");\n\t\t//echo($this->db->affected_rows().\"<br />\");\n\t\tif ($this->db->affected_rows() == 0) {\n\t\t\t$this->errorCode = 6;\n\t\t\t$this->statusMess = 'Notice: No rows were affected by this update.';\n\t\t} // END if\n\t\tif ($this->id == -1) {\n\t\t\t$this->id = $this->db->insert_id();\n\t\t\tif ($this->load($this->id)) {\n\t\t\t\treturn TRUE;\n\t\t\t} else {\n\t\t\t\treturn FALSE;\n\t\t\t} // END if\n\t\t} else {\n\t\t\treturn TRUE;\n\t\t} // END if\n\t}", "title": "" }, { "docid": "589bfe5a5c89b7747c096f361b9b7d74", "score": "0.6306335", "text": "public function save() {\n\t\tif (empty($this->fields['id'])) {\n\t\t $query = $this->sql->insertInto($this->entity)->values($this->fields)->execute();\n\t\t}\n\t\telse {\n\t\t $query = $this->sql->update($this->entity)->set($this->fields)->where('id',$this->get('id'))->execute();\n\t\t}\n\t\t\n\t\tif ($query !== false) {\n\t\t\treturn $this->db->lastInsertId();\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t }", "title": "" }, { "docid": "0f0dd74521b8a81a12c38908467b78c9", "score": "0.63062185", "text": "public function updateOrCreate();", "title": "" }, { "docid": "3918a80b9efc3f47831e2430b9910ed5", "score": "0.63056433", "text": "private function _insertRow()\n {\n $fieldNames = array_keys($this->_data);\n $fields = implode(', ', $fieldNames);\n $values = implode(', ', array_map(function ($field){\n return ':'.$field;\n }, $fieldNames));\n $query = \"INSERT INTO $this->_tableName($fields) VALUES($values)\";\n $this->_prepareAndExecute($query);\n $this->_data[$this->_idField] = $this->_connect->lastInsertId();\n }", "title": "" }, { "docid": "e20c7e83e2dfdc74f9827c2b7c3760f8", "score": "0.62978303", "text": "abstract public function insert();", "title": "" }, { "docid": "2d6a74c569e363c559485e38e3133386", "score": "0.6285843", "text": "public function insertToDb() {\r\n try {\r\n $sql = 'INSERT INTO status (title, prior, color)\r\n VALUES (\"' . $this->_title . '\", ' . $this->_prior . ', \"' . $this->_color . '\")';\r\n $this->_db->query($sql);\r\n\r\n $this->_id = $this->_db->getLastInsertId();\r\n } catch (Exception $e) {\r\n simo_exception::registrMsg($e, $this->_debug);\r\n }\r\n }", "title": "" }, { "docid": "1fb038af0a6d709f438b94e0549c7a08", "score": "0.62821156", "text": "protected function addOrUpdateOrRestoreEntries() {\n DB::statement(\n \"INSERT INTO customers(id, first_name, last_name, card_number, created_at, updated_at, deleted_at)\n SELECT u.customer_id, u.first_name, u.last_name, u.card_number, NOW(), NOW(), NULL FROM userdata u\n ON DUPLICATE KEY UPDATE\n first_name = u.first_name, last_name = u.last_name, card_number = u.card_number, updated_at = NOW(), deleted_at = NULL\"\n );\n }", "title": "" }, { "docid": "91394b27dd8acd3971bf237611cb50ed", "score": "0.6275822", "text": "public function save () : bool {\n\n // don't attempt to save if nothing has changed\n if( $this->loadedFromDb && empty($this->get_dirty_columns()) ) {\n return false;\n }\n\n // validate if we can\n if( method_exists( $this, 'presave' ) ) {\n $this->presave();\n }\n\n list($columnNames, $values, $queryParams, $updateColumnValues) =\n $this->get_sql_insert_values();\n\n // build sql statement\n $sql =\n \"INSERT INTO\n \" . static::get_sql_table_name() . \"\n ({$columnNames})\n VALUES\n ({$values})\";\n\n // update values if we are resaving to the db\n if( $this->loadedFromDb ) {\n $sql .= \"\n ON DUPLICATE KEY UPDATE {$updateColumnValues}\";\n }\n\n // execute sql statement\n $result = static::query( $sql, $queryParams );\n\n // log change on success\n if( $result ) {\n\n // get auto incremented id if one was generated\n if( $ID = self::$connection->get_insert_id() ) {\n\n $this->__set( static::AUTO_INCREMENT_COLUMN, $ID );\n\n }\n\n $this->set_loaded_from_database(true);\n }\n\n return true;\n\n }", "title": "" }, { "docid": "4012a19961b7e88c885a906979b930ee", "score": "0.62656295", "text": "function save_record($sql=null){\n //\n //Bind the sql variable.\n $this->bind_arg('sql', $sql);\n //\n //Query the database. I hope that if theer is a problem the query will\n //throw an exception\n $this->query($sql);\n //\n //Assuming success, retun the last id\n return PDO::lastInsertId();\n }", "title": "" }, { "docid": "db07641284b7271940be097b57e1481d", "score": "0.6265265", "text": "protected function _insert()\n\t{\n\t\t$fields = array();\n\t\t$values = array();\n\n\t\tforeach ($this->_fields as $key => $infos) {\n\t\t\tif ($key != 'date_creation' && $key != 'date_update' && isset($infos['value'])) {\n\t\t\t\t$fields[] = $key;\n\t\t\t\t$values[':' . $key] = $infos['value'];\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->_fks as $key => $infos) {\n\t\t\tif (isset($infos['value'])) {\n\t\t\t\t$fields[] = $key;\n\t\t\t\t$values[':' . $key] = $infos['value'];\n\t\t\t}\n\t\t}\n\n\t\t$values[':date_creation'] = date('Y-m-d H:i:s');\n\t\t$fields[] = 'date_creation';\n\t\t$values[':date_update'] = date('Y-m-d H:i:s');\n\t\t$fields[] = 'date_update';\n\n\t\tsort($fields);\n\t\t$valuesKeys = array_keys($values);\n\t\tsort($valuesKeys);\n\n\t\t$sql = 'INSERT INTO ' . $this->_tableName . '\n\t\t(' . implode(', ', $fields) . ')\n\t\tVALUES (' . implode(', ', $valuesKeys) . ')';\n\n\t\t$stmt = static::getDbAdapter()->prepare($sql);\n\t\t$stmt->execute($values);\n\n\t\t//@TODO the sequence must be added for pgsql...\n\t\t$this->{$this->getPkName()} = static::getDbAdapter()->lastInsertId();\n\n\t\tif ($stmt->errorCode() != '00000') {\n\t\t\t$errorInfo = $stmt->errorInfo();\n\t\t\tthrow new Exception('Error : ' . $stmt->errorCode() . ' : ' . $errorInfo[2] . '<br />' . $sql);\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a8bf080c855b3750da1c94c32b576007", "score": "0.6261973", "text": "function add($record)\n {\n // convert object to associative array, if needed\n if (is_object($record))\n {\n $data = get_object_vars($record);\n } else\n {\n $data = $record;\n }\n // update the DB table appropriately\n $key = $data[$this->keyField];\n $object = $this->db->insert($this->tableName, $data);\n }", "title": "" }, { "docid": "4114a3f5643237d3238b73a998fe0ce1", "score": "0.6260759", "text": "function _upsert($record, $query = null) {\n\t\t// Check if the record exists already, using the supplied query\n\t\t$exists = FALSE;\n\t\tif (!is_null($query)) {\n\t\t\t$existingRecord = $this->db->get_where(self::LOG_TABLE, $query, 1, 0);\n\t\t\tif ($existingRecord->num_rows() > 0) {\n\t\t\t\t$exists = TRUE;\n\t\t\t}\n\t\t}\n\n\t\t// Set the update/insert date\n\t\t$upsertTime = date('Y-m-d H:i:s');\n\t\t$record['updated_at'] = $upsertTime;// All inserts/updates set the updated_at time\n\n\t\t// If it exists, then update\n\t\t$retVal = null;\n\t\tif ($exists) {\n\t\t\t$this->db->update(self::LOG_TABLE, $record, $query);\n\t\t}\n\t\t// Otherwise let's insert\n\t\telse{\n\t\t\t$record['created_at'] = $upsertTime;// All inserts need a created_at time too\n\t\t\t$this->db->insert(self::LOG_TABLE, $record);\n\t\t\t$retVal = $this->db->insert_id();\n\t\t}\n\n\t\treturn $retVal;// Return the ID for an insert or null for an update\n\t}", "title": "" }, { "docid": "4705746a918fefbdc2a7e2453e508818", "score": "0.62523574", "text": "public function save() {\n $query = array();\n\n // remove any expression fields as they are already baked into the query\n $values = array_values(array_diff_key($this->_dirty_fields, $this->_expr_fields));\n\n if (!$this->_is_new) { // UPDATE\n // If there are no dirty values, do nothing\n if (empty($values) && empty($this->_expr_fields)) {\n return true;\n }\n $query = $this->_build_update();\n $id = $this->id(true);\n if (is_array($id)) {\n $values = array_merge($values, array_values($id));\n } else {\n $values[] = $id;\n }\n } else { // INSERT\n $query = $this->_build_insert();\n }\n\n $success = self::_execute($query, $values, $this->_connection_name);\n $caching_auto_clear_enabled = self::$_config[$this->_connection_name]['caching_auto_clear'];\n if($caching_auto_clear_enabled){\n self::clear_cache($this->_table_name, $this->_connection_name);\n }\n // If we've just inserted a new record, set the ID of this object\n if ($this->_is_new) {\n $this->_is_new = false;\n if ($this->count_null_id_columns() != 0) {\n $db = self::get_db($this->_connection_name);\n if($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'pgsql') {\n // it may return several columns if a compound primary\n // key is used\n $row = self::get_last_statement()->fetch(PDO::FETCH_ASSOC);\n foreach($row as $key => $value) {\n $this->_data[$key] = $value;\n }\n } else {\n $column = $this->_get_id_column_name();\n // if the primary key is compound, assign the last inserted id\n // to the first column\n if (is_array($column)) {\n $column = array_slice($column, 0, 1);\n }\n $this->_data[$column] = $db->lastInsertId();\n }\n }\n }\n\n $this->_dirty_fields = $this->_expr_fields = array();\n return $success;\n }", "title": "" }, { "docid": "0be01b7b310fd94a7a5878bf30bbf0de", "score": "0.6251695", "text": "public function insertUpdate($data)\n {\n if (isset($data['id']) && $data['id'] != '' && $data['id'] > 0) \n {\n $store = Store::find($data['id']);\n $store->update($data);\n return Store::find($data['id']);\n } else {\n return Store::create($data);\n }\n }", "title": "" }, { "docid": "e13ab0353129614c38e687185e847025", "score": "0.624616", "text": "public function saveFromImport () {\n\n // @todo just call a normal save\n\n // validate if we want\n if( method_exists( $this, 'validate' ) ) {\n $this->validate();\n }\n\n list($columnNames, $values, $queryParams, $updateColumnValues) =\n $this->get_sql_insert_values();\n\n // build sql statement\n $sql =\n \"INSERT INTO\n \" . static::get_sql_table_name() . \"\n ({$columnNames})\n VALUES\n ({$values})\";\n\n // update values if we are resaving to the db\n if( $this->loadedFromDb ) {\n $sql .= \"\n ON DUPLICATE KEY UPDATE {$updateColumnValues}\";\n }\n\n // execute sql statement\n $result = static::query( $sql, $queryParams );\n\n // log change on success\n if( $result ) {\n\n // get auto incremented id if one was generated\n if( $ID = self::$connection->get_insert_id() ) {\n\n $this->__set( static::AUTO_INCREMENT_COLUMN, $ID );\n }\n\n $this->set_loaded_from_database(true);\n }\n\n return true;\n }", "title": "" }, { "docid": "ad2b82a4f42f8b1d93aef54e1f3b8c76", "score": "0.62436", "text": "public function save() {\n $query = ( empty($this->id) ) ? $this->createQuery() : $this->updateQuery();\n mysql_query($query);\n return mysql_insert_id();\n }", "title": "" }, { "docid": "18d437331caef94dc4dc0037a06b6ccb", "score": "0.6241283", "text": "public function save()\n {\n if ($this->getId() === 0) {\n $sql = 'INSERT INTO';\n } else {\n $sql = 'UPDATE';\n }\n \n $sql = $this->prepareQuery($sql);\n \n if ($this->getId() === 0) {\n $this->stmt = self::getSingleton()->prepare($sql);\n $this->bind();\n } else {\n $sql .= ' WHERE id = :id';\n $this->stmt = self::getSingleton()->prepare($sql);\n $this->bind();\n $this->stmt->bindValue(':id', $this->getId(), PDO::PARAM_INT);\n }\n \n if ($this->stmt->execute() === true) {\n if ($this->getId() === 0) {\n $this->setId(self::getSingleton()->lastInsertId());\n }\n return $this;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "e9f3531b1aef09b0cd6f3c91e7fba85c", "score": "0.6222228", "text": "public function upsert() {\n\t\t$sql = \"INSERT INTO \".static::TABLE.\"(\".$this->keys().\") VALUES (\".$this->values().\")\n\t\t\t\tON DUPLICATE KEY UPDATE $this\";\n\t\tself::$pdo->exec($sql);\n\t}", "title": "" }, { "docid": "6e4af86d41946032b7828164b94da7d2", "score": "0.62208724", "text": "function insertOrUpdate($medoo, $table, $record) {\n $id = empty($record[\"id\"]) ? 0 : intval($record[\"id\"]);\n if ($id) {\n if (!$medoo->update($table, $record, [\"id\" => $id])) return 0;\n return $id;\n } else {\n return intval($medoo->insert($table, $record));\n }\n}", "title": "" }, { "docid": "3b329aada3ef8af9f9d7da6a9e6df4aa", "score": "0.622055", "text": "public function insert(): InsertQuery;", "title": "" }, { "docid": "ddf04f17b7b7c74e76bca69f59fe4816", "score": "0.62161815", "text": "public function save()\n {\n $this->buildInsert();\n $this->buildUpdate();\n $this->buildDelete();\n $this->clear();\n \n }", "title": "" }, { "docid": "679b98839b1d379ac05c41425cd04773", "score": "0.62156105", "text": "public function save() {\n if ($this->id) {\n return $this->update();\n } else {\n return $this->insert();\n }\n }", "title": "" }, { "docid": "c54ca4867c92b6ab3f2c088f700ee8d9", "score": "0.62062913", "text": "public function recordObject() {\n // create sql query\n $sql = \"INSERT INTO `table` (`name`) VALUES (?) \";\n // prepare connection with the query\n $stmt = $this->db->prepare($sql);\n // bind parameters to query\n $stmt->bindParam(1, $this->name);\n // execute the statement\n if ($stmt->execute()) {\n // if statement has success, set self id to last insert id\n $this->id = $this->db->lastInsertId();\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "7a4fd8465763e32e37a106796b44689d", "score": "0.61930794", "text": "public function save() {\n\t\tif(isset($this->data[static::$primary])) {\n\t\t\treturn static::where(static::$primary, '=', $this->data[static::$primary])->update($this->data);\n\t\t}\n\n\t\treturn static::insert($this->data);\n\t}", "title": "" }, { "docid": "8385e5b2622dfaecf42425562c6f84cb", "score": "0.6181031", "text": "public function update_db(){\n\t\t$identfacture = $this->checkout['arrayCaddie'][4];\n\n\t\t$this->table = 'drw'; // Work on the drw table\n\t\t\tparent::__construct(); // Refresh the PDO connection\n\n\t\t/* First: retrieve the ID */\n\t\t$drw = $this->findFirst(array(\n\t\t\t'conditions' => array('identfacture' => $identfacture)\n\t\t\t));\n\n\t\tdebug($drw);\n\n\t\t/* Second: Update good data */\n\t\t$drw->email = $this->checkout['arrayCaddie'][7];\n\t\t$drw->mttransaction = $this->checkout['amount'];\n\t\t$drw->dattransaction = $this->checkout['payment_date'];\n\t\t$drw->heuretransaction = $this->checkout['payment_time'];\n\t\t$drw->reftransaction = $this->checkout['transaction_id'];\n\t\t$drw->certiftransaction = $this->checkout['payment_certificate'];\n\n\t\tdebug($drw);\n\n\t\t$this->save($drw);\n\n\t\t/* Third: insert into backup table */\n\t\t$this->table = 'drw_bak'; // Work on the drw table\n\t\t\tparent::__construct(); // Refresh the PDO connection\n\n\t\t$check_entry = $this->findCount(array('identfacture' => $identfacture));\n\t\tdebug($check_entry);\n\t\tif($check_entry == '0'){ // If the entry doesn't exist \n\t\t\t$drw->id_drw = ''; // It's not an update so ID doesn't exist\n\t\t\t$this->save($drw);\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "3038d47627f94ac2c98be09e954dabfd", "score": "0.6180224", "text": "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'type_id' => $this->type_id,\n 'user_id_1' => $this->user_id_1,\n 'user_id_2' => $this->user_id_2,\n 'product_id_1' => $this->product_id_1,\n 'product_id_2' => $this->product_id_2,\n 'new_data' => $this->new_data,\n 'original_data' => $this->original_data,\n 'count' => $this->count\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "title": "" }, { "docid": "7af6869c0b5e69bc95a27c31d8816e44", "score": "0.617842", "text": "protected function insertRow()\n {\n $fieldsSql = implode(',', array_keys($this->fields));\n $valuesSql = implode(\"','\", array_values($this->fields));\n\n $sql = \"INSERT INTO \" . $this->tableName . \" (\" . $fieldsSql . \") VALUES('\" . $valuesSql . \"')\";\n\n $this->id = $this->db->query($sql);\n }", "title": "" }, { "docid": "e347dfc63983b9bc603bc00d6168b639", "score": "0.61777186", "text": "public function dbinsert(){\n\t\tBLog::addtolog('[Items.Item]: Inserting data...');\n\t\t$db=JFactory::GetDBO();\n\t\tif(empty($db)){\n\t\t\treturn false;\n\t\t\t}\n\t\t//Forming query...\n\t\t$this->modified=new DateTime();\n\t\t$this->created=new DateTime();\n\t\t$qr=$this->dbinsertquery();\n\t\t//Running query...\n\t\t$q=$db->query($qr);\n\t\tif(empty($q)){\n\t\t\treturn false;\n\t\t\t}\n\t\t$this->id=$db->insert_id();\n\t\t//Updating cache...\n\t\t$this->updatecache();\n\t\t//Return result\n\t\treturn true;\n\t\t}", "title": "" }, { "docid": "513a7e2c85b4e87603d8b41d72f10d5a", "score": "0.6177065", "text": "function add($record)\n\t{\n\t\t// convert object to associative array, if needed\n\t\tif (is_object($record))\n\t\t{\n\t\t\t$data = get_object_vars($record);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data = $record;\n\t\t}\n\t\t// update the DB table appropriately\n\t\t$key = $data[$this->_keyField];\n\t\t$object = $this->db->insert($this->_tableName, $data);\n\t}", "title": "" }, { "docid": "0f6f83f586666e16ce942224404dc045", "score": "0.61766714", "text": "public function insertData()\n {\n $prepared = $this->preparedData();\n if (!$this->checkIfDataExistsInDatabase()) {\n Employee::insert($prepared->toArray());\n }\n }", "title": "" }, { "docid": "d764f644a7e87183d9da24bace7ed839", "score": "0.61666036", "text": "public function save() {\n\t\tif ($this->getPk() !== null && $this->_new === false) {\n\t\t\treturn $this->_update();\n\t\t}\n\t\treturn $this->_insert();\n\t}", "title": "" }, { "docid": "d6cfaeac4e1992979260158d243209cd", "score": "0.6166463", "text": "public function save()\n {\n if (!$this->beforeSave()) {\n return false;\n }\n\n if (empty($this->id)) {\n if (!$this->beforeInsert()) {\n return false;\n }\n $value_of = $this->getValuesForDb();\n $return = (bool)self::$CONN->insert($this->tableName(), $value_of);\n if (in_array('id', $this->getColumns())) {\n $this->id = self::$CONN->lastInsertId();\n }\n if (!$this->afterInsert()) {\n return false;\n }\n } else {\n if (!$this->beforeUpdate()) {\n return false;\n }\n \n $value_of = $this->getValuesForDb();\n $return = (bool)self::$CONN->update($this->tableName(), $value_of, ['id' => $this->id]);\n\n if (!$this->afterUpdate()) {\n return false;\n }\n }\n if (!$this->afterSave()) {\n return false;\n }\n\n return $return;\n }", "title": "" }, { "docid": "fbf5c6f154223cd2555dd50952e3b515", "score": "0.61616087", "text": "public function save(){\n\t\tif($this->pk == null) {\n\t\t\tthrow new OrmIllegalArgumentException(\"you can't save the entity \".$this->getName().\" because it doesn't have any Primary-Key\");\n\t\t}\n \n $asPkFilled = true;\n $values = $this->getValues();\n\t foreach($this->pk as $pk){\n if(!isset($values[$pk]) || $values[$pk] === \"\"){\n $asPkFilled = false;\n }\n }\n\n\t\tif(!$asPkFilled) {\n\t\t\treturn OrmCore::insertEntity($this);\n\t\t} else {\n\t\t\t//Try to find if it's an update or insert with already an Id\n $ormExample = new OrmExample();\n foreach($this->pk as $pk){\n $ormExample->addCriteria($pk, OrmTypeCriteria::$EQ, array($this->get($pk)));\n }\n $lazymode = true;\n $entity = OrmCore::findByExample($this, $ormExample, null, null, 'AND', $lazymode);\n\t\t\tif(empty($entity)) {\n\t\t\t\treturn OrmCore::insertEntity($this);\n\t\t\t}\n\t\t\t\n\t\t\treturn OrmCore::updateEntity($this);\n\t\t}\n\t}", "title": "" }, { "docid": "9213faf02d4c02bd606345c03f2e527a", "score": "0.6157411", "text": "abstract protected function _insert();", "title": "" }, { "docid": "b04f2622de7ba358263abf215dc0bfd5", "score": "0.6154011", "text": "function save($data)\n {\n if($data[\"$this->idName\"]!=null)\t$this->id = $data[\"$this->idName\"];\n\n\t\tif(empty($data[\"$this->idName\"]))\n\t\t\tunset($data[\"$this->idName\"]);\n\n if($this->id!=null){\n $query = \"UPDATE \" . $this->table .\" SET \";\n $values = \" \";\n $sw = false;\n foreach($data as $field=>$value) {\n if($sw)\n $values.= \", \";\n else\n $sw = true;\n\n htmlentities(trim($values), ENT_COMPAT);\n $values.= $field.'=\"'.$value.'\"';\n }\n\n $values.=\", modified=now()\";\n $query.= $values . ' WHERE ' .$this->idName.'='.$this->id;\n //Debug::pr($query, true);\n $result = $this->_SQL_tool('UPDATE', __METHOD__, $query);\n\n } else {\n $query = \"INSERT INTO \" . $this->table;\n $sw = false;\n\n foreach($data as $field=>$value){\n if($sw){\n $fields.=\", \";\n $values.=\", \";\n } else {\n $fields =\" (\";\n $values =\" (\";\n $sw = true;\n }\n $fields.= $field;\n htmlentities(trim($values), ENT_COMPAT);\n $values.= '\"'.$value.'\"';\n }\n $fields.=\",created,modified)\";\n $values .=\",now(),now())\";\n\n $query.=\" \" . $fields.\" VALUES \".$values;\n $result = $this->_SQL_tool('INSERT', __METHOD__, $query);\n $this->id = $result;\n }\n return $result;\n }", "title": "" }, { "docid": "f45d95bd86947ed58bc6750b14cbcadd", "score": "0.614941", "text": "public function _insert($data)\n {\n $this->insert($data);\n }", "title": "" }, { "docid": "db6b9c51e80324547eedacd6d3602d46", "score": "0.61474365", "text": "public function save() {\n\t\t\tif(!$this->table || $this->table == '') return false;\n\t\t\tif(isset($this->values['id']) && $this->values['id'] != ''){\n\t\t\t\t$vals = $this->values; //copies array\n\t\t\t\tunset($vals['id']);\n\t\t\t\treturn $this->sp->db->lazyUpdate($this->table, 'id = \\''.$this->values['id'].'\\'', $vals);\n\t\t\t} else {\n\t\t\t\t$suc = $this->sp->db->lazyInsert($this->table, $this->$values);\n\t\t\t\tif($suc > 0){\n\t\t\t\t\t$this->values['id'] = $suc;\n\t\t\t\t\treturn true;\n\t\t\t\t} else { \n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "abf675eee326ba6a1ab618d1e6f41794", "score": "0.6139223", "text": "public function commit()\n {\n $data = array(\n \"deviceID\" => $this->deviceID,\n \"deviceToken\" => $this->deviceToken,\n \"name\" => $this->name,\n \"emailAddress\" => $this->emailAddress,\n \"badgeCount\" => $this->badgeCount,\n \"isAdmin\" => $this->isAdmin\n );\n\n $objectID = $this->getID();\n if(isset($objectID))\n {\n //This object has already been inserted to the database. Just update.\n $this->update($data);\n }\n else\n {\n //This object has not been inserted to the database. Insert it.\n parent::insert($data);\n }\n }", "title": "" } ]
bbce3c4d485f81ad58de016c8cde1e9b
Tracer dans des logs specifiques
[ { "docid": "d74acd3a5e7c1e41770f8634af020880", "score": "0.0", "text": "function citrace_post_edition($tableau){\n\t// contourner le cas d'un double appel du pipeline sur la meme table avec la meme action\n\tstatic $actions = array();\n\tif (isset($tableau['args']['table'])){\n\t\t$table = $tableau['args']['table'];\n\t\tif ($actions AND isset($tableau['args']['action']) AND in_array($table.'/'.$tableau['args']['action'],$actions)) \n\t\t\treturn $tableau;\n\t\telse\n\t\t\t$actions[] = $table.'/'.$tableau['args']['action'];\n\t}\n\t\n\t// action sur un article\n\tif (isset($tableau['args']['action']) \n\t AND isset($tableau['args']['table']) AND $tableau['args']['table']=='spip_articles') {\n\t \t$id_article = intval($tableau['args']['id_objet']);\n\t\t if ($id_article>0) {\n\t\t\t\tinclude_spip('inc/texte');\n\t\t\t\t$row = sql_fetsel('*', 'spip_articles', 'id_article='.$id_article);\n\t\t\t\t$id_rubrique = $row['id_rubrique'];\n\t\t\t\t$article_msg = '('.interdire_scripts(supprimer_numero($row['titre'])).')'.\" - id_rubrique:\".$id_rubrique;\n\n\t\t\t\t$citrace = charger_fonction('citrace', 'inc');\n\t\t\t\t\n\t\t\t\t// instituer un article\n\t\t\t\tif ($tableau['args']['action']=='instituer' AND isset($tableau['args']['statut_ancien'])){\n\t\t \t\tif ($row['statut'] != $tableau['args']['statut_ancien']){\n\t\t\t\t\t\t$article_msg .= \" - statut_new:\".$row['statut'].\" - statut_old:\".$tableau['args']['statut_ancien'].\" - date_publication:\".$row['date'].\" (meta post_dates :\".$GLOBALS['meta'][\"post_dates\"].\")\";\n\t\t\t\t\t\t$action = \"changement de statut de l'article\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t// publication d'un article\n\t\t\t \t\tif ($row['statut'] == 'publie')\n\t\t\t\t\t\t\t$action = \"publication article\";\n\t\t\t\t\t\t// depublication d'un article\n\t\t\t \t\telseif ($tableau['args']['statut_ancien'] == 'publie')\n\t\t\t\t\t\t\t$action = \"depublication article\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// mise a la poubelle d'un article\n\t\t\t \t\tif ($row['statut'] == 'poubelle')\n\t\t\t\t\t\t\t$action = \"poubelle article\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$citrace('article', $id_article, $action, $article_msg, $id_rubrique);\n\t\t \t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// modifier un article\n\t\t\t\telseif ($tableau['args']['action']=='modifier'){\n\t\t\t\t\t// uniquement pour les articles publies\n\t\t \t\tif ($row['statut'] == 'publie')\n\t\t\t\t\t\t$citrace('article', $id_article, 'modification article', $article_msg, $id_rubrique);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n }\t\n\n\t// action sur une rubrique\n\tif (isset($tableau['args']['action']) \n\t AND isset($tableau['args']['table']) AND $tableau['args']['table']=='spip_rubriques') {\n\t \t$id_rubrique = intval($tableau['args']['id_objet']);\n\t\t if ($id_rubrique>0) {\n\t\t\t\tinclude_spip('inc/texte');\n\t\t\t\t$row = sql_fetsel('*', 'spip_rubriques', 'id_rubrique='.$id_rubrique);\n\t\t\t\t$rubrique_msg = '('.interdire_scripts(supprimer_numero($row['titre'])).')';\n\t\t\t\t\n\t\t\t\t// modifier un rubrique\n\t\t\t\tif ($tableau['args']['action']=='modifier'){\n\t\t\t\t\t// uniquement pour les rubriques publies\n\t\t \t\tif ($row['statut'] == 'publie'){\n\t\t\t\t\t\t$citrace = charger_fonction('citrace', 'inc');\n\t\t\t\t\t\t$citrace('rubrique', $id_rubrique, 'modification rubrique', $rubrique_msg, $id_rubrique);\n\t\t \t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n }\t\n \n // action sur un document ou une image\n\tif (isset($tableau['args']['operation']) \n\t\tAND ((isset($tableau['args']['table']) AND $tableau['args']['table']=='spip_documents') \n\t\t\tOR (isset($tableau['args']['table_objet']) AND $tableau['args']['table_objet']=='documents'))) {\n\t\t$id_document = intval($tableau['args']['id_objet']);\n\t\tif ($id_document>0) {\n\t\t\t$row = sql_fetsel('*', 'spip_documents', 'id_document='.$id_document);\n\t\t\t$document_msg = '('.$row['fichier'].')';\n\n\t\t // ajout ou remplacement de document ou d'image\n\t\t\tif ($tableau['args']['operation']=='ajouter_document'){\n\t\t\t\t\t\t\t\n\t\t\t\t// le pipeline n'indique pas si c'est un remplacement, aussi il faut indiquer date et maj\n\t\t\t\t$commentaire = $document_msg.\" - champ date:\".$row['date'].\" - champ maj:\".$row['maj'];\n\t\n\t\t\t\t// le pipeline ne passe pas le lien, aussi il faut les indiquer\n\t\t\t\t$commentaire .= \" - liens :\";\n\t\t\t\t$id_rubrique = '';\n\t\t\t\t$res = sql_select('*', 'spip_documents_liens', 'id_document='.$id_document);\n\t\t\t\twhile ($row = sql_fetch($res)){\n\t\t\t\t\t$commentaire .= \" \".$row['objet'].$row['id_objet'];\n\t\t\t\t\tif (!$id_rubrique)\n\t\t\t\t\t\t$id_rubrique = citrace_rubrique_de_objet($row['objet'], $row['id_objet']);\n\t\t\t\t}\n\n\t\t\t\t$citrace = charger_fonction('citrace', 'inc');\n\t\t\t\t$citrace('document', $id_document, 'ajouter document', $commentaire, $id_rubrique);\n\t\t\t}\n\t\t\t\n\t\t // delier un document ou une image\n\t\t\tif ($tableau['args']['operation']=='delier_document'){\n\t\t\t\tif (isset($tableau['args']['objet']) AND isset($tableau['args']['id'])) {\n\t\t\t\t\t$commentaire = $document_msg.\" - lien : \".$tableau['args']['objet'].$tableau['args']['id'];\n\t\t\t\t\t$id_rubrique = citrace_rubrique_de_objet($tableau['args']['objet'], $tableau['args']['id']);\n\t\t\t\t\t$citrace = charger_fonction('citrace', 'inc');\n\t\t\t\t\t$citrace('document', $id_document, 'delier document', $commentaire, $id_rubrique);\n\t\t\t\t}\n\t\t\t}\n\n\t\t // supprimer un document ou une image\n\t\t\tif ($tableau['args']['operation']=='supprimer_document'){\n\t\t\t\t$commentaire = $id_document;\n\t\t\t\t$citrace = charger_fonction('citrace', 'inc');\n\t\t\t\t$citrace('document', $id_document, 'supprimer document', $commentaire);\n\t\t\t}\n\t\t}\n\t}\n\n\t// action sur un forum\n\tif (isset($tableau['args']['action']) AND in_array($tableau['args']['action'], array('instituer','modifier'))\n\t AND isset($tableau['args']['table']) AND $tableau['args']['table']=='spip_forum') {\n\n \t$id_forum = intval($tableau['args']['id_objet']);\n\t if ($id_forum>0) {\n\t\t\t$row = sql_fetsel('*', 'spip_forum', 'id_forum='.$id_forum);\n\n\t\t\t// forum public uniquement\n\t\t\tif (substr($row['statut'],0,3)!='pri') {\t\t\t\t\t\t\t\t\n\t\t\t\t$commentaire = 'statut:'.$row['statut'];\n\t\t\t\t$f_objet = '';\n\t\t\t\t$f_id_objet = '';\n\t\t\t\t\n\t\t\t\tif (spip_version()>=3) {\n\t\t\t\t\t$f_objet = $row['objet'];\n\t\t\t\t\t$f_id_objet = $row['id_objet'];\n\t\t\t\t} else {\n\t\t\t\t\tif (intval($row['id_article'])>0){\n\t\t\t\t\t\t$f_objet = 'article';\n\t\t\t\t\t\t$f_id_objet = $row['id_article'];\n\t\t\t\t\t} elseif (intval($row['id_rubrique'])>0){\n\t\t\t\t\t\t$f_objet = 'rubrique';\n\t\t\t\t\t\t$f_id_objet = $row['id_rubrique'];\n\t\t\t\t\t} elseif (intval($row['id_breve'])>0){\n\t\t\t\t\t\t$f_objet = 'breve';\n\t\t\t\t\t\t$f_id_objet = $row['id_breve'];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$accepter_forum = $GLOBALS['meta'][\"forums_publics\"];\n\t\t\t\tif ($f_objet=='article'){\n\t\t\t\t\t$art_accepter_forum = sql_getfetsel('accepter_forum', 'spip_articles', \"id_article = \". intval($f_id_objet));\n\t\t\t\t\tif ($art_accepter_forum)\n\t\t\t\t\t\t$accepter_forum = $art_accepter_forum;\n\t\t\t\t}\n\n\t\t\t\t$commentaire .= \" - lien: \".$f_objet.$f_id_objet.\" (accepter_forum: \".$accepter_forum.\")\";\n\n\t\t\t\t$id_rubrique = citrace_rubrique_de_objet($f_objet, $f_id_objet);\n\t\t\t\t\n\t\t\t\t$citrace = charger_fonction('citrace', 'inc');\n\t\t\t\t$citrace('forum', $id_forum, ($row['statut']=='publie' ? 'publication ' : 'depublication').'forum', $commentaire, $id_rubrique);\n\t\t\t}\n\t\t}\n }\t\n\t\n\treturn $tableau;\n}", "title": "" } ]
[ { "docid": "b9dd9ceed70a78949cd73bb3623efe03", "score": "0.65726215", "text": "function trace_log()\n {\n $messages = func_get_args();\n\n foreach ($messages as $message) {\n $level = 'info';\n\n if ($message instanceof Exception) {\n $level = 'error';\n }\n elseif (is_array($message) || is_object($message)) {\n $message = print_r($message, true);\n }\n\n Log::$level($message);\n }\n }", "title": "" }, { "docid": "021b074f6ad87d49b973d18357e0053b", "score": "0.62468714", "text": "function traceMe()\n{\n // So basic\n $stdoutHandler = new StreamHandler('php://stdout');\n $errorFileHandler = new StreamHandler(__DIR__ . '/multiple.streams.log', Logger::WARNING);\n $errorFileHandler->pushProcessor(new MemoryUsageProcessor());\n\n $logger = new Logger('phpdx-experiments-multiple.streams');\n $logger->pushHandler($stdoutHandler);\n $logger->pushHandler($errorFileHandler);\n $logger->pushProcessor(new IntrospectionProcessor());\n\n $logger->debug('look context data', ['foo' => 'bar']);\n $logger->info('you will see this in stdout, but not the file');\n $logger->warning('warning goes to stdout and the file');\n $logger->error('error is handled by both handlers as well', ['serious' => 'error']);\n}", "title": "" }, { "docid": "bfe76f5478c032ecb71a973fa1a45180", "score": "0.6219746", "text": "public function testOrgApacheSlingTracerInternalLogTracer()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.sling.tracer.internal.LogTracer';\n\n $crawler = $client->request('POST', $path);\n }", "title": "" }, { "docid": "5edd3562b747b49ff2142d063801aceb", "score": "0.61476016", "text": "public function logTrace()\n {\n $output = new Output(Output::MODE_FILE, $this->getLogPath());\n $output->open();\n \\DebugHelper::dump()->showtrace($output);\n $output->close();\n }", "title": "" }, { "docid": "b034c2d2de8a08feaf62d1257d9ab0a9", "score": "0.60355645", "text": "public function tracer(LoggerInterface $log)\n {\n $this->tracer = $log;\n \n if ($this->matcher instanceof TraceableInterface) {\n $this->matcher->tracer($log);\n }\n \n foreach ($this->controllers as $controller) {\n if ($controller instanceof TraceableInterface) {\n $controller->tracer($log);\n }\n }\n }", "title": "" }, { "docid": "3acd1e6ff4adbbf2cca0e454b61d5fda", "score": "0.60224307", "text": "function _trace($message) {\n if ($trace = TRUE) {\n _log($message);\n } \n}", "title": "" }, { "docid": "4354a2ccd5514265e069c96b8773d2d0", "score": "0.5945792", "text": "public function printTSlog() {}", "title": "" }, { "docid": "4354a2ccd5514265e069c96b8773d2d0", "score": "0.5945792", "text": "public function printTSlog() {}", "title": "" }, { "docid": "2191ef9213d539148a5b89286a9c133a", "score": "0.5928763", "text": "protected function _logTraffic() {\n if ('testing' !== APPLICATION_ENV) {\n $lastRequest = $this->_client->getLastRequest();\n $lastResponse = $this->_client->getLastResponse();\n $filename = date('Y-m-d') . '-gofilex.log';\n $logMessage = \"\\n\";\n $logMessage .= '[REQUEST]' . \"\\n\";\n $logMessage .= $lastRequest . \"\\n\\n\";\n $logMessage .= '[RESPONSE]' . \"\\n\";\n $logMessage .= $lastResponse . \"\\n\\n\";\n\n $logger = Garp_Log::factory($filename);\n $logger->log($logMessage, Garp_Log::INFO);\n }\n }", "title": "" }, { "docid": "adb6de31ee6b1875104a4304cf72522c", "score": "0.591869", "text": "public static function debugTrail() {}", "title": "" }, { "docid": "bfdee121a4092d5f675827c5d6eab614", "score": "0.59010994", "text": "public function trace()\n {\n if (!$this->cfg['collect']) {\n return;\n }\n $args = \\func_get_args();\n $meta = $this->internal->getMetaVals(\n $args,\n array(\n 'caption' => 'trace',\n 'channel' => $this->cfg['channelName'],\n 'columns' => array('file','line','function'),\n )\n );\n $backtrace = $this->errorHandler->backtrace();\n // toss \"internal\" frames\n for ($i = 1, $count = \\count($backtrace)-1; $i < $count; $i++) {\n $frame = $backtrace[$i];\n $function = isset($frame['function']) ? $frame['function'] : '';\n if (!\\preg_match('/^'.\\preg_quote(__CLASS__).'(::|->)/', $function)) {\n break;\n }\n }\n $backtrace = \\array_slice($backtrace, $i-1);\n // keep the calling file & line, but toss ->trace or ::_trace\n unset($backtrace[0]['function']);\n $this->appendLog('trace', array($backtrace), $meta);\n }", "title": "" }, { "docid": "d5be700cfe2087c7d1c14e0a633bda88", "score": "0.58449465", "text": "public function tlog($text);", "title": "" }, { "docid": "98283ab464c9ba97a9770dbdaa68df9a", "score": "0.5810534", "text": "public function logPerformance();", "title": "" }, { "docid": "98283ab464c9ba97a9770dbdaa68df9a", "score": "0.5810534", "text": "public function logPerformance();", "title": "" }, { "docid": "b405cfdec349cd5f1538a3ea0becc295", "score": "0.58001477", "text": "public function withLog($entry);", "title": "" }, { "docid": "bb09c38cc5bf7cca505467d19363729a", "score": "0.579619", "text": "public static function traza() {\n global $config;\n \n if ( ! isset($config['debug_file'])) return;\n\t $texto = date(\"Ymd-H:i:s \") . $_SERVER['REMOTE_ADDR'];\n\t foreach (func_get_args() as $arg) {\n\t\t $texto .= ' - ' . var_export($arg, true);\n\t }\n\t file_put_contents($config['debug_file'], $texto . \"\\n\", FILE_APPEND);\n }", "title": "" }, { "docid": "e44e3f69af361cf1c9e5b53b90b35c81", "score": "0.5741589", "text": "public function getTrace();", "title": "" }, { "docid": "b1ff715548b580b514e48292e9167162", "score": "0.5688559", "text": "final function getTrace();", "title": "" }, { "docid": "0a5ecd8f51245f7afe59b91dd1027b73", "score": "0.565708", "text": "function atkTrace($msg=\"\")\n{\n\tglobal $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_GET_VARS, $HTTP_COOKIE_VARS, $HTTP_POST_VARS;\n\n\t$log = \"\\n\".str_repeat(\"=\", 5).\"\\n\";\n\t$log.= \"Trace triggered: \".$msg.\"\\n\";\n\t$log.= date(\"r\").\"\\n\";\n\t$log.= $HTTP_SERVER_VARS[\"REMOTE_ADDR\"].\"\\n\";\n\t$log.= $HTTP_SERVER_VARS[\"SCRIPT_URL\"].\"\\n\";\n\t$log.= \"\\nSessioninfo: \".\"session_name(): \".session_name().\" session_id(): \".session_id().\" SID: \".SID.\" REQUEST: \".$_REQUEST[session_name()].\" COOKIE: \".$_COOKIE[session_name()].\"\\n\";\n\t$log.= \"\\n\\nHTTP_SERVER_VARS:\\n\";\n\t$log.= var_export($HTTP_SERVER_VARS, true);\n\t$log.= \"\\n\\nHTTP_SESSION_VARS:\\n\";\n\t$log.= var_export($HTTP_SESSION_VARS, true);\n\t$log.= \"\\n\\nHTTP_COOKIE_VARS:\\n\";\n\t$log.= var_export($HTTP_COOKIE_VARS, true);\n\t$log.= \"\\n\\nHTTP_POST_VARS:\\n\";\n\t$log.= var_export($HTTP_POST_VARS, true);\n\t$log.= \"\\n\\nHTTP_GET_VARS:\\n\";\n\t$log.= var_export($HTTP_GET_VARS, true);\n\n\t$log.= \"\\n\\nSession file info:\\n\";\n\t$log.= var_export(stat(session_save_path().\"/sess_\".session_id()), true);\n\n\t$tmpfile = tempnam(\"/tmp\",atkconfig(\"identifier\").\"_trace_\");\n\t$fp = fopen($tmpfile,\"a\");\n\tfwrite($fp, $log);\n\tfclose($fp);\n}", "title": "" }, { "docid": "e01eb3096d4a62f5d9b96488b3f0df1a", "score": "0.56501", "text": "public function log()\n {\n $this->appendLog('log', \\func_get_args());\n }", "title": "" }, { "docid": "7ae2c248da1c97621d99d00dedccb5bb", "score": "0.5623212", "text": "public function log($log);", "title": "" }, { "docid": "fa27ffb5467078a147c538a834af5f03", "score": "0.56202406", "text": "public function trace($message)\n {\n }", "title": "" }, { "docid": "9f59d93631002e4704062d1764dae0b7", "score": "0.56171054", "text": "protected function log() {\n }", "title": "" }, { "docid": "2e1541b5d4f98a692901113924ffc309", "score": "0.55725133", "text": "public static function trace($str) \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::trace($str);\t\t\n\t}", "title": "" }, { "docid": "e465a5d39bf7397a962e37894183eee5", "score": "0.5569398", "text": "public function getLog();", "title": "" }, { "docid": "35b4a9e94c2d7f22cf44b87eee5d9445", "score": "0.5536259", "text": "public function init_trace()\n {\n }", "title": "" }, { "docid": "8005c53b27d07ff023cede055b1a58e4", "score": "0.5526483", "text": "abstract public function load_logger();", "title": "" }, { "docid": "a32f055c5e57e6cc8837469e1faa628c", "score": "0.5516615", "text": "public function log() {\n // data we are going to log\n $variables = func_get_args();\n $trace = debug_backtrace(null, 1);\n Yii::info(VarDumper::dump($this));\n $this->debugInternal($variables, $trace);\n }", "title": "" }, { "docid": "35a4e1227348e21749b27ec3c6c63993", "score": "0.54935724", "text": "public static function getServiceLogEntries() {\n /*\n * EXAMPLE OF LOG OUTPUT:\n\n -- Logs begin at Thu 2018-09-06 22:51:06 CEST. --\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[58]\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: Creating key {00000000-0000-0000-0000-d9b836b4f65b} with creation date 2018-09-08 19:44:51Z, activation date 2018-09-08 19:44:51Z, and expiration date 2018-12-07 19:44:51Z.\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: No XML encryptor configured. Key {00000000-0000-0000-0000-d9b836b4f65b} may be persisted to storage in unencrypted form.\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: info: AppNamespace.AppName.Scheduling.ScheduledServiceHostService[0]\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: Scheduled service AppNamespace.AppName.Services.ScheduledTransactionsHostedService. Next occurence: 09/08/2018 19:45:00 +00:00\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: Hosting environment: Production\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: Content root path: /var/www/vhosts/domain.tld/htdocs\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: Now listening on: http://localhost:5000\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: Application started. Press Ctrl+C to shut down.\n\n */\n\n\n $entry = new stdClass();\n $entry->timestamp = time();\n $entry->type = 'error';\n $entry->message = 'There was an error';\n\n return [ $entry ];\n }", "title": "" }, { "docid": "2c3e08122c4f477e869a7daf584cc1c2", "score": "0.54762053", "text": "public function logAs($type, $target);", "title": "" }, { "docid": "312b445d9acff5b11f8a51051e808512", "score": "0.5449071", "text": "protected function AutoLog(){\r\n \r\n //DEPRECATED for test\r\n \r\n }", "title": "" }, { "docid": "1b6975ac45955d1e162521b2bb08ae2c", "score": "0.5444787", "text": "function lDebug(string $msg):void\n{\n $args = func_get_args();\n\n \\Log::debug(' ######## Start DEBUG ####### ');\n $trace = debug_backtrace();\n \\Log::debug(' FILE : '.$trace[0]['file'].'');\n \\Log::debug(' LINE : '.$trace[0]['line'].'');\n \\Log::debug(' FUNCTION : '.$trace[1]['function'].'');\n \\Log::debug(' CLASS : '.$trace[1]['class'].'');\n if (is_array($args)) {\n foreach ($args as $string) {\n \\Log::debug(' >>>> Start Message <<<< ');\n \\Log::debug($string);\n \\Log::debug(' >>>> END Message <<<< ');\n }\n }\n \\Log::debug('######## End DEBUG #######');\n}", "title": "" }, { "docid": "f644ae03f5c96359fab156a8a82ce41c", "score": "0.543914", "text": "function trace($txt, $isArray=false){\n\t// this is helpful on a remote server if you don't\n\t//have access to the log files\n\t//\n\t$log = new cLOG(\"../tests/upload.txt\", false);\n\t//$log->clear();\n\tif($isArray){\n\t\t$log->printr($txt);\n\t}else{\n\t\t$log->write($txt);\n\t}\n\n\t//echo \"$txt<br>\";\n}", "title": "" }, { "docid": "2ddcebbd976a7d2b2830a89f9f2ab5df", "score": "0.5438663", "text": "function changeLogs() {\n\n }", "title": "" }, { "docid": "c93f51b51a3310ae264f194f6167e0a2", "score": "0.54168725", "text": "function log()\n {\n }", "title": "" }, { "docid": "12ab8f7cc704c5770125c2716ba6eeac", "score": "0.54167676", "text": "private static function _initLog()\n {\n if (!empty(self::$config->log->servers)) {\n $servers = self::$config->log->servers->toArray();\n } else {\n $servers = self::LOG_SERVERS;\n }\n\n if (php_sapi_name() == 'cli') {\n $extra = [\n 'command' => implode(' ', $_SERVER['argv']),\n 'mem' => memory_get_usage(true),\n ];\n } elseif (isset($_REQUEST['udid'])) {\n //for app request\n $extra = [\n 'h' => $_SERVER['HTTP_HOST'] ?? '',\n 'uri' => $_SERVER['REQUEST_URI'] ?? '',\n 'v' => $_REQUEST['v'] ?? '',\n 'd' => $_REQUEST['udid'] ?? '',\n 't' => $_REQUEST['mytoken'] ?? $_REQUEST['mytoken_sid'] ?? '',\n 'os' => $_REQUEST['device_os'] ?? '',\n 'm' => $_REQUEST['device_model'] ?? '',\n 'p' => $_REQUEST['platform'] ?? '',\n 'l' => $_REQUEST['language'] ?? '',\n 'real_ip' => \\Util::getClientIp(),\n ];\n } else {\n //pc or other ?\n $extra = [\n 'h' => $_SERVER['HTTP_HOST'] ?? '',\n 'uri' => $_SERVER['REQUEST_URI'] ?? '',\n 'v' => $_REQUEST['v'] ?? '',\n 't' => $_REQUEST['mytoken'] ?? $_REQUEST['mytoken_sid'] ?? '',\n 'p' => $_REQUEST['platform'] ?? '',\n 'l' => $_REQUEST['language'] ?? '',\n 'ua' => $_SERVER['HTTP_USER_AGENT'] ?? '',\n 'real_ip' => \\Util::getClientIp(),\n ];\n }\n\n if (\\Yaf\\ENVIRON != 'product') {\n \\Log::setLogFile(self::$config->log->path);\n }\n\n LoggerHandler::setServers($servers);\n LoggerHandler::setEnv(\\YAF\\ENVIRON);\n LoggerHandler::setExtra($extra);\n LoggerHandler::setUniqueId($_REQUEST['preRequestId'] ?? self::$request->header('preRequestId'));\n }", "title": "" }, { "docid": "2dd38c0430edf03223604c5a3115ee3e", "score": "0.5407158", "text": "public static function trace()\n\t{\n\t\tob_start();\n\t\tdebug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n\t\t$trace = ob_get_clean();\n\t\t$trace = str_replace('#','<br/><div><b><u>',$trace);\n\t\t$trace = str_replace('called at [','called at : </u></b><ul><li>File : ',$trace);\n\t\t$trace = preg_replace('/:([0-9]*)\\]/','</li><li>Ligne : $1</li></ul></div>',$trace);\n\t\techo $trace;\n\t\treturn $trace;\n\t}", "title": "" }, { "docid": "c30d52c98013bdb5ef9a729a2f7d35ca", "score": "0.54008615", "text": "public function log($log) {\n //$this->log = $log;\n }", "title": "" }, { "docid": "11b54dfeb659fcf93bc5aa7485329c17", "score": "0.53988945", "text": "function trace($level, $message) {\n global $logfile, $loglevel, $timezone;\n \n if ($loglevel < $level) return;\n \n if ($logfile == \"syslog\") {\n syslog($level, $message);\n } else {\n $now = new DateTime();\n $now->setTimezone(new DateTimeZone($timezone));\n $message = $now->format('Y-m-d H:i:s') . \" \" . $message;\n if ($logfile == \"stdout\")\n echo $message;\n else\n file_put_contents($logfile, $message, FILE_APPEND);\n }\n }", "title": "" }, { "docid": "ad3bc0c9ca2ca6be9ec091ef523a36d6", "score": "0.5396071", "text": "function Trace($msg)\r\n{\r\n\tglobal $debug;\r\n\tif ($debug) echo $msg;\r\n}", "title": "" }, { "docid": "2d5c8a4985e4a344fb1627efebf5f2cc", "score": "0.5395551", "text": "protected function addLog() {\n\t\t$oLog = PHP_Beautifier_Common::getLog();\n\t\t$oLogConsole = Log::factory('console', '', 'php_beautifier', array(\n\t\t\t\t'stream' => STDERR,\n\t\t\t), PEAR_LOG_DEBUG);\n\t\t$oLog->addChild($oLogConsole);\n\t}", "title": "" }, { "docid": "532274d8912e70d94eeac533f44c5861", "score": "0.5384076", "text": "function ttp_lms_log( $tag = \"\", $msg = \"\") {\n\tlog( $tag, $msg );\n}", "title": "" }, { "docid": "03b2887d3f18e7f9d588922769eb1cb8", "score": "0.53726447", "text": "protected function printLogMgm() {}", "title": "" }, { "docid": "d7222b90231defd0bc736cf8af891c64", "score": "0.53533506", "text": "function scaffold_log() {\n\t$args = func_get_args();\n\tforeach ($args as $arg) {\n\t\t$msg = print_r($arg, true);\n\t\terror_log($msg);\n\t}\n}", "title": "" }, { "docid": "b6bd6bca4cf7809daea901310c88a8fd", "score": "0.5341861", "text": "public function toLogEntry();", "title": "" }, { "docid": "cea0c873f61c767c9fb33de0cb1826a0", "score": "0.5341364", "text": "protected function _initLog()\n {\n }", "title": "" }, { "docid": "da6d6dc88eb9e229108b427ab60e8014", "score": "0.5340253", "text": "function track_log_entries($type=array()) {\r\n $args = func_get_args();\r\n $mkt_id ='';\r\n //if one of the arguments is marketing ID, then we need to filter by it\r\n foreach($args as $arg){\r\n if(isset($arg['EMAIL_MARKETING_ID_VALUE'])){\r\n $mkt_id = $arg['EMAIL_MARKETING_ID_VALUE'];\r\n }\r\n }\r\n\t\tif (empty($type)) \r\n\t\t\t$type[0]='targeted';\r\n\t\t$this->load_relationship('log_entries');\r\n\t\t$query_array = $this->log_entries->getQuery(true);\r\n\t\t$query_array['select'] =\"SELECT campaign_log.* \";\r\n\t\t$query_array['where'] = $query_array['where']. \" AND activity_type='{$type[0]}' AND archived=0\";\r\n //add filtering by marketing id, if it exists\r\n if (!empty($mkt_id)) $query_array['where'] = $query_array['where']. \" AND marketing_id ='$mkt_id' \";\r\n\t\treturn (implode(\" \",$query_array));\r\n\t}", "title": "" }, { "docid": "8c59e389112f0317a5aacd84a113f2fd", "score": "0.53338", "text": "public static function traceBegin() \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::traceBegin();\t\t\n\t}", "title": "" }, { "docid": "de51929754819a1b56a09acc0ed30671", "score": "0.532196", "text": "public static function trace($s)\n {\n if($_SERVER['SERVER_NAME'] == 'localhost')\n {\n ///NEED TO UPDATE PERMISSIONS TO BE ABLE TO WRITE FILES :(\n // open file\n if(self::$LOG_PATH == '') self::$LOG_PATH = self::$DEFAULT_PATH;\n $filePath = $_SERVER['DOCUMENT_ROOT'].'/utils/loggers/'.self::$LOG_PATH;\n\n $contents = file_get_contents($filePath);\n $mode = (strlen($contents) > self::LOG_LIMIT) ? 'w' : 'a';\n $fd = fopen($filePath, $mode) or die('could not open or create phplog file!');\n\n // write string\n fwrite($fd, $s . \"\\r\\n\");\n// fwrite($fd, 'count: '.strlen($contents) . \"\\r\\n\");\n\n // close file\n fclose($fd);\n }\n }", "title": "" }, { "docid": "41bd89d3bcd79d9ad560d2d8566eb813", "score": "0.5319599", "text": "function trace_sql()\n {\n if (!defined('OCTOBER_NO_EVENT_LOGGING')) {\n define('OCTOBER_NO_EVENT_LOGGING', 1);\n }\n\n if (!defined('OCTOBER_TRACING_SQL')) {\n define('OCTOBER_TRACING_SQL', 1);\n }\n else {\n return;\n }\n\n Event::listen('illuminate.query', function ($query, $bindings, $time, $name) {\n $data = compact('bindings', 'time', 'name');\n\n foreach ($bindings as $i => $binding) {\n if ($binding instanceof \\DateTime) {\n $bindings[$i] = $binding->format('\\'Y-m-d H:i:s\\'');\n } elseif (is_string($binding)) {\n $bindings[$i] = \"'$binding'\";\n }\n }\n\n $query = str_replace(['%', '?'], ['%%', '%s'], $query);\n $query = vsprintf($query, $bindings);\n\n traceLog($query);\n });\n }", "title": "" }, { "docid": "c657368dd3b263d65536193af2c9f7d4", "score": "0.5312583", "text": "public static function tracer(string $method): void\n {\n if (!static::hasNewRelic()) {\n return;\n }\n\n newrelic_add_custom_tracer($method);\n }", "title": "" }, { "docid": "3e9bc225da8b85a8392044143fa3864b", "score": "0.53094584", "text": "public function addLog($data);", "title": "" }, { "docid": "cfa177607b1b87a9795e9f495847a7b0", "score": "0.5307527", "text": "public function debug($var){\n\t\t////$this->core->log($var);\n\t}", "title": "" }, { "docid": "f27eec2ecadc1039247957e2418f5ea4", "score": "0.52802813", "text": "function log($cxn,$class,$id,$folder=NULL)\r\n {\r\n \r\n }", "title": "" }, { "docid": "68a57a560eaf77f53d0e12fcffcb1b09", "score": "0.52723134", "text": "public static function addTracer(string $method): void\n {\n if (!static::hasNewRelic()) {\n return;\n }\n\n newrelic_add_custom_tracer($method);\n }", "title": "" }, { "docid": "0bd0b60bc8b0ae1aaedfbd9ef8e8a909", "score": "0.5272116", "text": "protected function getLogEntries() {}", "title": "" }, { "docid": "d071546756d0c2f2de7e4f4e30d7ec1d", "score": "0.526247", "text": "public function logger(Varien_Event_Observer $observer)\n {\n $controller = $observer->getEvent()->getControllerAction();\n $request = $controller->getRequest();\n\n //Watchdog if off => RETURN;\n //We don't log this extension actions => RETURN;\n if ((Mage::helper('foggyline_watchdog')->isModuleEnabled() == false)\n || ($request->getControllerModule() == 'Foggyline_Watchdog_Adminhtml')\n ) {\n return;\n }\n\n //We are in admin area, but admin logging is off => RETURN;\n if ((Mage::getDesign()->getArea() == 'adminhtml')\n && (Mage::helper('foggyline_watchdog')->isLogBackendActions() == false)\n ) {\n return;\n }\n\n //We are in frontend area, but frontend logging is off => RETURN;\n if ((Mage::getDesign()->getArea() == 'frontend')\n && (Mage::helper('foggyline_watchdog')->isLogFrontendActions() == false)\n ) {\n return;\n }\n\n //If user login detected\n $user = Mage::getSingleton('admin/session')->getUser();\n\n //If customer login detected\n $customer = Mage::getSingleton('customer/session')->getCustomer();\n\n $log = Mage::getModel('foggyline_watchdog/action');\n\n $log->setWebsiteId(Mage::app()->getWebsite()->getId());\n $log->setStoreId(Mage::app()->getStore()->getId());\n\n $log->setTriggeredAt(Mage::getModel('core/date')->timestamp(time()));\n\n if ($user && $user->getId()) {\n $log->setTriggeredByType(Foggyline_Watchdog_Model_Action::TRIGGERED_BY_TYPE_USER);\n $log->setTriggeredById($user->getId());\n } elseif ($customer && $customer->getId()) {\n $log->setTriggeredByType(Foggyline_Watchdog_Model_Action::TRIGGERED_BY_TYPE_CUSTOMER);\n $log->setTriggeredById($customer->getId());\n } else {\n $log->setTriggeredByType(Foggyline_Watchdog_Model_Action::TRIGGERED_BY_TYPE_GUEST);\n $log->setTriggeredById(null);\n }\n\n $log->setControllerModule($request->getControllerModule());\n $log->setFullActionName($request->getControllerModule());\n $log->setClientIp($request->getClientIp());\n $log->setControllerName($request->getControllerName());\n $log->setActionName($request->getActionName());\n $log->setControllerModule($request->getControllerModule());\n $log->setRequestMethod($request->getMethod());\n\n //We are in 'adminhtml' area and \"lbparams\" is ON\n if (Mage::getDesign()->getArea() == 'adminhtml'\n && Mage::helper('foggyline_watchdog')->isLogBackendActions()\n && Mage::helper('foggyline_watchdog')->isLogBackendParams()\n ) {\n $log->setRequestParams(Mage::helper('core')->encrypt(serialize($request->getParams())));\n }\n\n //We are in 'frontend' area and \"lfparams\" is ON\n if (Mage::getDesign()->getArea() == 'frontend'\n && Mage::helper('foggyline_watchdog')->isLogFrontendActions()\n && Mage::helper('foggyline_watchdog')->isLogFrontendParams()\n ) {\n $log->setRequestParams(Mage::helper('core')->encrypt(serialize($request->getParams())));\n }\n\n //In case of other areas, we don't log request params\n\n try {\n $log->save();\n } catch (Exception $e) {\n //If you cant save, die silently, not a big deal\n Mage::logException($e);\n }\n }", "title": "" }, { "docid": "9773a31f792884002ed4ae693937df5f", "score": "0.52613527", "text": "public function __invoke($param)\n {\n $this->addLog($param);\n }", "title": "" }, { "docid": "4e84784424da59666fe84c88a3d0fa59", "score": "0.5256522", "text": "protected static function MergeLogs()\n {\n }", "title": "" }, { "docid": "af4610343b20d94e7d1b52219c3583cc", "score": "0.52560365", "text": "function loginfo($level, $tag, $info){\t$this->tracemsg($level, \"$tag($info)\");\n}", "title": "" }, { "docid": "b003285f6d1ee08a705302d72bd26fff", "score": "0.52448916", "text": "public static function tracerAndIntegrations()\n {\n self::tracerOnce();\n IntegrationsLoader::load();\n }", "title": "" }, { "docid": "3ceba94481fddd47ddc0cbbf54e66abd", "score": "0.52337986", "text": "function d() {\n $variables = func_get_args();\n $trace = debug_backtrace(null, 1);\n \\Yii::$app->logger->debugInternal($variables, $trace);\n }", "title": "" }, { "docid": "f39c8bfaf30d0035b8643e6e27a4fac4", "score": "0.5226264", "text": "public final function withLog ()\n {\n\n $this->withLog = true;\n\n }", "title": "" }, { "docid": "2c617ebf262d5a764ed45ccae3d3ae28", "score": "0.52193034", "text": "private static function initRootSpan(Tracer $tracer)\n {\n $options = ['start_time' => Time::now()];\n if ('cli' === PHP_SAPI) {\n $operationName = isset($_SERVER['argv'][0]) ? basename($_SERVER['argv'][0]) : 'cli.command';\n $span = $tracer->startRootSpan(\n $operationName,\n StartSpanOptions::create($options)\n )->getSpan();\n $span->setTag(Tag::SPAN_TYPE, Type::CLI);\n } else {\n $operationName = 'web.request';\n $span = $tracer->startRootSpan(\n $operationName,\n StartSpanOptionsFactory::createForWebRequest(\n $tracer,\n $options,\n Request::getHeaders()\n )\n )->getSpan();\n $span->setTag(Tag::SPAN_TYPE, Type::WEB_SERVLET);\n if (isset($_SERVER['REQUEST_METHOD'])) {\n $span->setTag(Tag::HTTP_METHOD, $_SERVER['REQUEST_METHOD']);\n }\n if (isset($_SERVER['REQUEST_URI'])) {\n $span->setTag(Tag::HTTP_URL, $_SERVER['REQUEST_URI']);\n }\n // Status code defaults to 200, will be later on changed when http_response_code will be called\n $span->setTag(Tag::HTTP_STATUS_CODE, 200);\n }\n $span->setIntegration(WebIntegration::getInstance());\n $span->setTraceAnalyticsCandidate();\n $span->setTag(Tag::SERVICE_NAME, \\ddtrace_config_app_name($operationName));\n\n dd_trace('header', function () use ($span) {\n $args = func_get_args();\n\n // header ( string $header [, bool $replace = TRUE [, int $http_response_code ]] ) : void\n $argsCount = count($args);\n\n $parsedHttpStatusCode = null;\n if ($argsCount === 1) {\n $result = header($args[0]);\n $parsedHttpStatusCode = Bootstrap::parseStatusCode($args[0]);\n } elseif ($argsCount === 2) {\n $result = header($args[0], $args[1]);\n $parsedHttpStatusCode = Bootstrap::parseStatusCode($args[0]);\n } else {\n $result = header($args[0], $args[1], $args[2]);\n // header() function can override the current status code\n $parsedHttpStatusCode = $args[2] === null ? Bootstrap::parseStatusCode($args[0]) : $args[2];\n }\n\n if (null !== $parsedHttpStatusCode) {\n $span->setTag(Tag::HTTP_STATUS_CODE, $parsedHttpStatusCode);\n }\n\n return $result;\n });\n\n dd_trace('http_response_code', function () use ($span) {\n $args = func_get_args();\n if (isset($args[0])) {\n $httpStatusCode = $args[0];\n\n if (is_numeric($httpStatusCode)) {\n $span->setTag(Tag::HTTP_STATUS_CODE, $httpStatusCode);\n }\n }\n\n return dd_trace_forward_call();\n });\n }", "title": "" }, { "docid": "994039d277c68653cf60e13da20125e3", "score": "0.5219297", "text": "public function log(array $fields = [], $timestamp = null)\n {\n foreach($fields as $field) {\n $this->span->annotate($field, $timestamp);\n }\n }", "title": "" }, { "docid": "938dbf595703661f15fc8975e0b1ba74", "score": "0.5212633", "text": "public function d() {\n // data we are going to log\n $variables = func_get_args();\n $trace = debug_backtrace(null, 1);\n\n $this->debugInternal($variables, $trace);\n }", "title": "" }, { "docid": "9ca77ff829a140323ac1e1857125d586", "score": "0.5212055", "text": "public function trace($msg, $category='application'){\n\t\tif($this->_debug)\n\t\t\t$this->log($msg, 7, $category);\n\t}", "title": "" }, { "docid": "a735daff372f316187a61b4c748fa87f", "score": "0.52057415", "text": "function log()\n\t{\n\t\tcall_user_func_array(array($this->server, 'log'), func_get_args());\n\t}", "title": "" }, { "docid": "2d4aec3b05eb11cb2f1b7a3df63f0efe", "score": "0.5198814", "text": "public function trace($msg, $obj=null) {\n if ($this->logLevel <= Logger::TRACE) {\n $this->log(Logger::TRACE, $msg, $obj);\n }\n }", "title": "" }, { "docid": "b5688ef6596e692b45c590191d7477e2", "score": "0.5191351", "text": "public function log($obj);", "title": "" }, { "docid": "982183b4a6ac18642ef5e7586591b17f", "score": "0.5183431", "text": "private function _logAnalytics($subject) {\n $clientIP = (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ?\n $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];\n $analyticsData = array();\n $principalValues = array_values($subject->getPrincipal());\n if(count($principalValues) > 0)\n $analyticsData['user'] = $principalValues[0]; \n //$subject->getPrincipal(); // Get the user from the principal\n $analyticsData['time'] = time(); \n $analyticsData['session'] = session_id(); \n $analyticsData['page'] = 'login'; \n $analyticsData['UA'] = $_SERVER['HTTP_USER_AGENT'];\n $analyticsData['ip'] = $clientIP;\n $GLOBALS['routeLogger']->info(json_encode($analyticsData));\n }", "title": "" }, { "docid": "39ebce163faa2fe9250b13be4ede9f5b", "score": "0.5179961", "text": "function trace( $message )\n{\n\t$registry = Registry::getInstance();\n\tif ( $registry->keyExists( 'trace_messages' ) )\n\t{\n\t\t$trace_messages = $registry->get( 'trace_messages' );\n\t}\n\t$trace_messages[] = $message;\n\t$registry->set( \"trace_messages\", $trace_messages );\n}", "title": "" }, { "docid": "b9ae9bd1ea3fd39597f3135e5d87da3e", "score": "0.51789165", "text": "public function log($text)\n {\n }", "title": "" }, { "docid": "28bf320d932398bb0ba4e7ca59d0f974", "score": "0.5176524", "text": "public function debugToFile() {\n // data we are going to log\n $variables = func_get_args();\n $logFile = $variables[0];\n $trace = debug_backtrace(null, 1);\n $this->debugInternal(array_slice($variables, 1), $trace, $logFile);\n }", "title": "" }, { "docid": "6ad5b06d08d9403928914094062aeb3d", "score": "0.5173515", "text": "public function logs($id);", "title": "" }, { "docid": "d727e82ac7e84938c821b58e3e066e98", "score": "0.51647377", "text": "public function write_log($operation, $info_to_log){}", "title": "" }, { "docid": "db6be3af039e29113eec50ec9775a821", "score": "0.5161947", "text": "public function beforeLogMethodAdvice()\n {\n }", "title": "" }, { "docid": "f45c2e38ef3b190e0c093c33af6bbc46", "score": "0.5159291", "text": "function mytrace($s)\r\n{\r\n\t// see constants.php for TRACE_ENABLED flag\r\n\t\r\n\t// turn off trace?\r\n\tif (isset($_REQUEST[QS_DEBUG]))\r\n\t{\r\n\t\tif ($_REQUEST[QS_DEBUG]==\"0\") \r\n\t\t{\r\n\t\t\t$_SESSION[QS_DEBUG]=\"\";\r\n\t\t} \r\n\t}\r\n\t\r\n\t// Turn ON trace?\r\n\tif (isset($_REQUEST[QS_DEBUG]))\r\n\t{\r\n\t\tif ($_REQUEST[QS_DEBUG]==\"1\") \r\n\t\t{\r\n\t\t\t$_SESSION[QS_DEBUG]=\"1\";\r\n\t\t\t\r\n\t\t\tOutBR($s);\r\n\t\t\treturn;\r\n\t\t} \r\n\t}\r\n\t\r\n\tif (TRACE_ENABLED) \r\n\t{\r\n\t\t$_SESSION[QS_DEBUG]=\"1\";\r\n\t\t\r\n\t\tOutBR($s);\r\n\t\treturn;\r\n\t} \r\n\t\r\n\tif (isset($_SESSION[QS_DEBUG]))\r\n\t{\r\n\t\tif ($_SESSION[QS_DEBUG]==\"1\") \r\n\t\t{\r\n\t\t\t$_SESSION[QS_DEBUG]=\"1\";\r\n\t\t\t\r\n\t\t\tOutBR($s);\r\n\t\t\treturn;\r\n\t\t} \r\n\t}\r\n\t\r\n}", "title": "" }, { "docid": "34dbe9e5f6ba398efb6a0e4ada85dd26", "score": "0.51541746", "text": "public function timingLog($type, $params=null)\n {\n $type = \"[PID \" . getmypid() .\"] \" . $type;\n $this->log(\\Psr\\Log\\LogLevel::DEBUG,$type,$params);\n }", "title": "" }, { "docid": "2df977a83daf27f165279e47fc33ccbe", "score": "0.5139489", "text": "public function __construct() {\n\t\t$view_event = ( isset( \\REALTY_BLOC_LOG::$option['view_event'] ) ? \\REALTY_BLOC_LOG::$option['view_event'] : array() );\n\n\t\t// Property Page view log\n\t\tif ( isset( $view_event['property'] ) and $view_event['property'] == \"on\" ) {\n\t\t\tadd_action( 'rb_page_view_property_log', array( $this, 'save_property' ), 10, 5 );\n\t\t}\n\n\t\t// building Page View log\n\t\tif ( isset( $view_event['building'] ) and $view_event['building'] == \"on\" ) {\n\t\t\tadd_action( 'rb_page_view_building_log', array( $this, 'save_building' ), 10, 5 );\n\t\t}\n\t}", "title": "" }, { "docid": "610e9231e6ad8c6874e0afbc8613eed4", "score": "0.5136567", "text": "function get_trace(){\n\t\tglobal $database_queries,$database_query_count,$is_connected_to_db,$global_link;\n\t\treturn(\"<div style='width:100%'></div>\".$this->get_shadow(\"<h1>Mysql Trace information</h1>Note: this information s for debug purposes only, and will not be shown in the final product.<br/>Query Count:\".\n\t\t\t'db used:'.$this->dbdatabase.'<br/>Connected to Database:'.(int)$is_connected_to_db.'<br/>Link:'.$global_link.'<br/> Query Count: '.\n\t\t\t$database_query_count.'<br/>'.$database_queries,$this->default_style,'center','80%'));\n\t}", "title": "" }, { "docid": "9da69585e1158ee9afc6541540acc611", "score": "0.51299214", "text": "public static function debug() {\n $args = func_get_args();\n self::log(count($args) === 1 ? current($args) : $args);\n }", "title": "" }, { "docid": "54b3e3fcdc22a6536603dbaecdda160e", "score": "0.5126703", "text": "public static function logging()\n {\n }", "title": "" }, { "docid": "8cebf16d0ce2aec0f7a7663133dcae8e", "score": "0.5124036", "text": "function log_event( $plugin_name, $log_msg, $log_type, $file, $line ) {\t\t$allowed = get_transient( 'ti_log_allowed' );\n\t\tif ( is_array( $allowed ) && in_array( $plugin_name, $allowed ) ) {\n\t\t\t$logs = get_transient( 'ti_log' . $plugin_name );\n\t\t\tif ( ! $logs ) {\n\t\t\t\t$logs = array();\n\t\t\t}\n\t\t\t$logs[] = array(\n\t\t\t\t'type' => $log_type,\n\t\t\t\t'msg' => $log_msg,\n\t\t\t\t'time' => date( 'F j, Y H:i:s', current_time( 'timestamp', true ) ),\n\t\t\t\t'file' => $file,\n\t\t\t\t'line' => $line,\n\t\t\t);\n\t\t\t// keep only the last LOG_LENGTH logs\n\t\t\t$logs = array_slice( $logs, 0 - self::LOG_LENGTH );\n\t\t\tset_transient( 'ti_log' . $plugin_name, $logs, self::LOG_OPTION_EXPIRY_MINS * MINUTE_IN_SECONDS );\n\t\t}\n\t}", "title": "" }, { "docid": "46bca5bfd29d24451f450d011eaee40d", "score": "0.5121732", "text": "final public function getTraceAsString()\n {\n return 'trace';\n }", "title": "" }, { "docid": "fb9cdb2478eeea9e93488e8bcbee2faa", "score": "0.51080924", "text": "public static function log($request, $timestamp = 0, $move_head = false)\n {\n\n }", "title": "" }, { "docid": "cc51c4900016c8f615a41d97bd4febc4", "score": "0.5107095", "text": "function logMe($comment, $status_id = 0, $data = array(), $update_process = 0) {\n\n if (!class_exists('systemToolkit')) {\n return; // not loaded (cache fix)\n }\n $toolkit = systemToolkit::getInstance();\n $centerLogMapper = $toolkit->getMapper('log', 'log');\n\n if(count($data)) {\n ob_start();\n $i = 1;\n foreach($data as $d) {\n var_dump($d);\n if($i < count($data)) {\n echo \"<br />===<br />\";\n }\n $i++;\n }\n $err_content = ob_get_contents();\n ob_end_clean();\n $comment .= \"<br />{$err_content}\";\n }\n\n $log = $centerLogMapper->create();\n $log->setTime(new SQLFunction('UNIX_TIMESTAMP'));\n $log->setModule($toolkit->getRequest()->getModule());\n $log->setAction($toolkit->getRequest()->getAction());\n $log->setComment($comment);\n $log->setStatus($status_id);\n if ($user = systemToolkit::getInstance()->getUser()) {\n $log->setUser($user);\n }\n if ($update_process) {\n $log->setProcessId($update_process);\n }\n $centerLogMapper->save($log);\n}", "title": "" }, { "docid": "4d8241dfc88924e6878ce735e792db6e", "score": "0.50999165", "text": "function getTraceId($span)\n{\n $traceId = $span->getContext()->getTraceId();\n $xrayTraceId = '1-' . substr($traceId, 0, 8) . '-' . substr($traceId, 8);\n echo 'Final trace ID: ' . json_encode(['traceId' => $xrayTraceId]);\n}", "title": "" }, { "docid": "8a2c652cb53bbf65ffac9ddc4fe238ce", "score": "0.50916725", "text": "function &getLog()\r\n\t{\r\n\t\treturn Logger::getLogger('phase.compiler.PhaseParser');\r\n\t}", "title": "" }, { "docid": "c605ce06c8e41cfaedc1b6791011e835", "score": "0.5089587", "text": "public function setTrace($cat) {\n $this->cat= $cat;\n }", "title": "" }, { "docid": "c605ce06c8e41cfaedc1b6791011e835", "score": "0.5089587", "text": "public function setTrace($cat) {\n $this->cat= $cat;\n }", "title": "" }, { "docid": "0e0b4a852d340d918f67c5754b9e1405", "score": "0.5071828", "text": "private static function logging()\n {\n $files = ['Handler', 'Exception', 'Log'];\n $folder = static::$root.'Logging'.'/';\n\n self::call($files, $folder);\n }", "title": "" }, { "docid": "4d9ff7978b1c535e9699117b92d932cc", "score": "0.50689965", "text": "private function _log($msg)\n\t{\n\t\t$this->EE->TMPL->log_item(\"Low Events: {$msg}\");\n\t}", "title": "" }, { "docid": "91eaf421e30573b4573470a002a21764", "score": "0.5068972", "text": "function createLogHelper($className) {\n // TODO: Bring startLogger and pauseLogger static calls to here\n if (strstr($className, '__ref')) {\n return;\n }\n\n // XXX: Expensive call (hell, hasn't stopped me yet)\n if (DEBUG == true) {\n $dbg = debug_backtrace();\n $lineNumber = $dbg[1]['line'];\n $fileName = $dbg[1]['file'];\n debugMsg(\"Intercepting new $className on line $lineNumber of $fileName\");\n }\n\n $destClassName = \"__ref\".$className;\n \n // Get a list of methods to be transplanted from original class\n $srcOriginal = sourceArray($className);\n\n\n // \n injectMethodLogger($className, $srcOriginal);\n\n // Create a '__ref' prefixed class that resembles the old one\n // Possible replacement? class_alias($className, $destClassName);\n //transplantMethods($destClassName, $srcOriginal);\n\n // Bind the logging __call() method to the class with the original name.\n // Each call will be dispatched to the '__ref' prefixed object.\n // Additionally, remove all the original methods so that __call() is invoked.\n //setLoggerMethods($className, $destClassName, $srcOriginal);\n debugMsg(\"Creating new $className object\\n\");\n}", "title": "" }, { "docid": "b08d0c25809ed80801dfa36aa51d6662", "score": "0.5055408", "text": "function log4server($o, $formaterFlag=true){\n if(QA || CLI_LOG_ON) {\n log4task($o, $formaterFlag);\n }\n}", "title": "" }, { "docid": "8951ba27e1f76284d5dfb95ab2b271de", "score": "0.505073", "text": "public function log() {\r\n\t\t$this->resource->log();\r\n\t}", "title": "" }, { "docid": "f0b8dc1e0f54af9790eed611f0544192", "score": "0.50480205", "text": "public function log($msg)\n {\n }", "title": "" }, { "docid": "4b5ee960bf25161a3dc0c0671cc72ef8", "score": "0.5044126", "text": "function acf_dev_log()\n{\n}", "title": "" }, { "docid": "2bd4a70724c92012f62c081980fcc771", "score": "0.5034088", "text": "public function log ($txt)\n\t{\n\t\t$this->addQueryLog (\"/* \" . $txt . \" */\");\n\t}", "title": "" }, { "docid": "2ab6c3998f986e1f6936234d5a610fb1", "score": "0.50207907", "text": "public function test_format_2()\n {\n $SIMPLE_FORMAT =\n \"[%datetime%] %channel%.%level_name% %context% %context.leftover% %context.response% %context.action% \n %context.referer% %context.ip% %context.user% %context.logId% %context.leftover% %context.response% \n %context.payload% %context.controller% %extra% %extra.date% %extra.leftover% %message%\\n\";\n $SIMPLE_DATE = \"Y-m-d H:i:s\";\n\n global $logId;\n $logId = '1565630222-621879';\n\n $config = [\n \"~credit_card\",\n ];\n\n Config::set(\"LToolkit.log.scrubber\", $config);\n\n $date = DateTime::createFromFormat($SIMPLE_DATE, \"2019-08-12 17:17:02\");\n\n $data = [\"date\" => $date];\n $response = \"\";\n for ($i=0; $i < 705; $i++) {\n $response .= $i;\n }\n\n $record = [\n \"message\" => \"Start execution\",\n \"context\" => [\n \"mode\" => CustomLogFormatter::MODE_FULL,\n \"response\" => $response\n ],\n \"level\"=> 200,\n \"level_name\" => \"INFO\",\n \"channel\" => \"local-ernesto\",\n \"datetime\" => $date,\n \"extra\" => $data\n ];\n\n $object = new CustomLogFormatter($SIMPLE_FORMAT, $SIMPLE_DATE, false, true);\n\n $method = self::getMethod(\"format\", CustomLogFormatter::class);\n $result = $method->invokeArgs($object, [$record]);\n\n self::assertIsString($result);\n }", "title": "" }, { "docid": "90a33fa0ba8587c155b5a9e6cc710450", "score": "0.5020645", "text": "function trace(){\n $r = array_map(create_function('$a', 'return (isset($a[\"class\"])?$a[\"class\"].$a[\"type\"]:\"\").$a[\"function\"].\"(\".@join(\",\",$a[\"args\"]).\");, Row: \".@$a[\"line\"];'), debug_backtrace(false));\n array_shift($r);\n return $r;\n}", "title": "" } ]
584a61e843384621374e2d948f796d5d
The SassScript `/` operation.
[ { "docid": "38142ae2215619053bcd00217f71cd91", "score": "0.46969742", "text": "public function dividedBy(Value $other): Value\n {\n return new SassString(sprintf('%s/%s', $this->toCssString(), $other->toCssString()), false);\n }", "title": "" } ]
[ { "docid": "9fe39ee18e297cbe451f4cf3e700597b", "score": "0.670023", "text": "public function unaryDivide(): Value\n {\n return new SassString(sprintf('/%s', $this->toCssString()), false);\n }", "title": "" }, { "docid": "0ba4deda49d9a99091a956482033ae32", "score": "0.509171", "text": "function Division (int $a, int $b){\n\n\n return $a / $b;\n\n\n \n}", "title": "" }, { "docid": "ca5412e935a3f78d282cdf0c1430dcef", "score": "0.4888535", "text": "function div($a,$b) {\nreturn (int) ($a / $b);\n}", "title": "" }, { "docid": "66e2baa0fc632c08b42d69c36ecbdef0", "score": "0.48708594", "text": "function dividir($var1,$var2)\n\t{\n\t\treturn $var1 / $var2;\n\t}", "title": "" }, { "docid": "c25d3c7c842586fa49dcddc2829b9b12", "score": "0.48469713", "text": "public function op_div($other)\n {\n if ($other instanceof SassColour) {\n return $other->op_div($this);\n } elseif (!$other instanceof SassNumber) {\n throw new SassNumberException('Number must be a number', SassScriptParser::$context->node);\n } elseif ($this->inExpression || $other->inExpression) {\n return new SassNumber(($this->value / $other->value).$this->unitString(\n array_merge($this->numeratorUnits, $other->denominatorUnits),\n array_merge($this->denominatorUnits, $other->numeratorUnits)\n ));\n } else {\n return new SassNumber(($this->value / $other->value).$this->unitString(\n array_merge($this->numeratorUnits, $other->denominatorUnits),\n $this->denominatorUnits\n ));\n }\n }", "title": "" }, { "docid": "229e103700f7767e61681127ebecaf8f", "score": "0.48071307", "text": "function div($a,$b) {\n return (int) ($a / $b);\n}", "title": "" }, { "docid": "3940febc85d9fd3f6854d178e5d74994", "score": "0.47269806", "text": "public function divide($x, $y);", "title": "" }, { "docid": "8adf97bbefd728819d683a71a7731b29", "score": "0.4674356", "text": "function divide($a)\n {\n $e = explode('/', $a);\n // prevent division by zero //\n if (!$e[0] || !$e[1]) {\n return 0;\n }\telse{\n return $e[0] / $e[1];\n }\n }", "title": "" }, { "docid": "9cebaa84032e02c3d099191f0b8ae37d", "score": "0.4622896", "text": "public static function division(array $data)\n {\n $result = $data[0];\n\n for ($i = 1; $i < count($data); $i++) {\n $result /= $data[$i];\n }\n\n return $result;\n }", "title": "" }, { "docid": "dad40b14eb427e5a25d3d9491828f910", "score": "0.458362", "text": "function div($a, $b) {\n\treturn ( int ) ($a / $b);\n}", "title": "" }, { "docid": "00975823db948b8210f6568f80787e2e", "score": "0.45166302", "text": "public function div(array $args)\r\n {\r\n return $this->basicMath('/', $args);\r\n }", "title": "" }, { "docid": "ca8f3dfca5553dbd594877a26ef4c62b", "score": "0.44120333", "text": "public function dividir($a, $b){\n return $a / $b;\n }", "title": "" }, { "docid": "dae9f7b88ae4f41532c89482cb86aaf3", "score": "0.4400248", "text": "function preprocessPaths() {\n\tglobal $scripts, $styles;\n\tfor ($i=0; $i<sizeof($scripts); $i++) {\n\t\t$scripts[$i] = checkSlash($scripts[$i]);\n\t}\n\tfor ($i=0; $i<sizeof($styles); $i++) {\n\t\t$styles[$i] = checkSlash($styles[$i]);\n\t}\n\n}", "title": "" }, { "docid": "677b575728c5cd3057a13defbdeb9efb", "score": "0.43823978", "text": "function divide()\r\n {\r\n if ($this->b === 0) {\r\n throw new NulaExcept(\"Nemoguce dijelit sa nulon\");\r\n }\r\n return $this->a / $this->b;\r\n }", "title": "" }, { "docid": "476bcd915e796a39a2d768e48c1ec93d", "score": "0.43724772", "text": "function divi($a,$b){\r\n $c=$a/$b;\r\n return $c;\r\n }", "title": "" }, { "docid": "8946f2a070f0fbd78f7e237cb633acc6", "score": "0.43462744", "text": "function divide_two_numbers ($x, $y)\r\n{\r\n return $x / $y;\r\n}", "title": "" }, { "docid": "009ba3b6f7db1950a11108445813c2f0", "score": "0.43117934", "text": "public static function cleanSassDirectory()\n {\n File::cleanDirectory(resource_path('sass'));\n }", "title": "" }, { "docid": "d046003efb063a0108b4fae50b7475f7", "score": "0.4287902", "text": "private function removeSassImport(Pattern $pattern): void\n {\n $branchRoot = pattern_root($pattern->name);\n $parts = explode('/', slash_path($pattern->name));\n array_shift($parts);\n $include = implode('/', $parts);\n if (File::exists($pattern->rootSassFile)) {\n $import = \"@import \\\"{$include}\\\";\\n\";\n remove_from_file($import, $pattern->rootSassFile);\n } else {\n $import = \"@import \\\"{$branchRoot}/{$branchRoot}\\\";\\n\";\n if (count($parts) === 0) {\n $import = \"@import \\\"{$branchRoot}\\\";\\n\";\n }\n remove_from_file($import, $pattern->mainSassFile);\n }\n }", "title": "" }, { "docid": "4be56421f1b72b158000aa08a905b0c6", "score": "0.42705122", "text": "public function simpleDivide($x, $y) {\n\t\treturn $x/$y;\n\t}", "title": "" }, { "docid": "41d56fdf928587be48a052360d7e0090", "score": "0.42328635", "text": "function doMath()\n{\n\t$x = 1;\n\treturn $x/0;\n}", "title": "" }, { "docid": "a4c1add0ba3caef1ee80a334e37929bf", "score": "0.41720307", "text": "function array_divide($array)\n {\n return Arr::divide($array);\n }", "title": "" }, { "docid": "e9c49d0a4f357b72a8be61024cc67bab", "score": "0.41710708", "text": "public function div($operand) : BigInt;", "title": "" }, { "docid": "3ba22c4b931cf6d8d0b185397589f61c", "score": "0.41706765", "text": "public function divide($divisor)\n {\n return $this->times(1 / $divisor);\n }", "title": "" }, { "docid": "af3c9724f34a47285483d4aaa338ea03", "score": "0.41617453", "text": "public function divideByValue($value)\n\t{\n\t\tif (!is_int($value)) {\n\t\t\tthrow new InvalidArgumentException('Not an int');\n\t\t}\n\t\t\tif (0 === $value) {\n\t\t\t\tthrow new InvalidArgumentException('Division by zero');\n\t\t\t}\n\t\t\t$this->_value = $this->_value / $value;\n\n\t\treturn $this->_value;\n\t}", "title": "" }, { "docid": "ba5acc79a6dcd315350748be381500c4", "score": "0.41531894", "text": "static function Div($numerator, $denominator)\r\n\t{\r\n//\t\tif ($numerator * $denominator < 0) { $remainder = -$remainder; }\r\n//\t\t$quotient = ($numerator - $remainder) / $denominator;\r\n//\t\treturn intVal($quotient);\r\n return ($numerator - $numerator % $denominator) / $denominator;\r\n\t}", "title": "" }, { "docid": "6fd55a91ed3fc20f07235ccf915b36f5", "score": "0.41359386", "text": "function div($dividend, $divisor);", "title": "" }, { "docid": "a326e871cbbeb7115510c833c3f7738a", "score": "0.41337657", "text": "public function test_toJson_slash() {\n $result = SearchHighlight::toJson('/');\n $this->assertEquals('[\"' . '\\/' . '\"]', $result);\n }", "title": "" }, { "docid": "3925cce85469e9248097a406131294b5", "score": "0.41320252", "text": "public function divide($numberOne, $numberTwo)\n\t{\n\t\treturn $numberOne / $numberTwo;\n\t}", "title": "" }, { "docid": "5bf3a18e7b5b64d7b04294e7aa0df471", "score": "0.41314232", "text": "function add_start_slash($str)\n{\n return ltrim($str, '/') . '/';\n}", "title": "" }, { "docid": "79fff5144196ccf2992af4ba937bf8cd", "score": "0.41143978", "text": "function rmSlash($string)\t{\n\t\treturn ereg_replace(\"\\/$\",\"\",$string);\n\t}", "title": "" }, { "docid": "3192622d2bc9ce281f03a1cb836aea09", "score": "0.4096007", "text": "public function divide($a, $b) {\n\t\treturn (float)$a / $b;\n\t}", "title": "" }, { "docid": "62af85d0294a2b8b37f1c4fed9d656a3", "score": "0.4088149", "text": "function str_frac($numerator,$denominator)\r\n{\r\n $numerator = (string)$numerator;\r\n $denominator = (string)$denominator;\r\n $result = \"<sup>\".$numerator.\"</sup><bold><big>/</big></bold><sub>\";\r\n $result = $result.$denominator.\"</sub>\";\r\n return $result;\r\n}", "title": "" }, { "docid": "bd5cd13c91a64b13a73486fd305620c4", "score": "0.40760177", "text": "function segment($__segment)\n {\n if ($__segment > 0) {\n $__uri_segment = explode('/', preg_replace('/^\\//', '', $_SERVER['REQUEST_URI']));\n if ($__uri__segment = $__uri_segment[--$__segment])\n return $__uri__segment;\n } else {\n trigger_error(\"URI segment '$__segment'\", E_USER_WARNING);\n }\n }", "title": "" }, { "docid": "b57e9c807499131dda0e81fc4d43d2a1", "score": "0.40655002", "text": "public function formula($value) {\n return $this->setProperty('formula', $value);\n }", "title": "" }, { "docid": "fca954badce60df7e6c40b7d0527a7e2", "score": "0.40286103", "text": "protected static function updateSass()\n\t{\n\t\t(new Filesystem)->delete(public_path('css/app.css'));\n\t\tcopy(__DIR__.'/tailwindcss-sass-stubs/resources/sass/app.scss', self::getResourcePath('sass/app.scss'));\n\t}", "title": "" }, { "docid": "725bfba9923f7f5c81207620386befa5", "score": "0.40248868", "text": "static function untslash( $path ) {\n\t\treturn rtrim( $path, '/' );\n\t}", "title": "" }, { "docid": "0bdf420fe64eacbdc4694c46b643b8e5", "score": "0.40016073", "text": "static public function run($scss_folder, $css_folder, $format_style = \"scss_formatter\")\n {\n $start = microtime(true);\n $scss_folder = rtrim($scss_folder, '/');\n $css_folder = rtrim($css_folder, '/');\n // scssc will be loaded automatically via Composer\n $scss_compiler = new scssc();\n // set the path where your _mixins are\n $scss_compiler->setImportPaths($scss_folder);\n // set css formatting (normal, nested or minimized), @see http://leafo.net/scssphp/docs/#output_formatting\n $scss_compiler->setFormatter($format_style);\n // get all .scss files from scss folder\n //$filelist = glob($scss_folder . \"[!_]*.scss\");\n\n $dirlist = glob($scss_folder . \"/*\");\n\n $filelist = self::getFileList($scss_folder);\n\n\n foreach ($filelist as $file_path) {\n // get path elements from that file\n $file_path_elements = pathinfo($file_path);\n // get file's name without extension\n $file_name = $file_path_elements['filename'];\n $file_dir = $file_path_elements['dirname'];\n\n $file_destination_dir = str_replace($scss_folder, $css_folder, $file_dir);\n\n $in = $file_dir . '/' . $file_name . \".scss\";\n $out = $file_destination_dir . '/' . $file_name . \".css\";\n\n if (!is_dir($file_destination_dir)) {\n mkdir($file_destination_dir, 0777, true);\n }\n\n\n //if (! is_file($out) || filemtime($in) > filemtime($out)) {\n\n// $depends = self::getImports($in);\n//\n// echo '<br>' .\"All dependencies from \" . $in;\n// echo '<br>';\n// print_r($depends);\n\n $string_sass = file_get_contents($in);\n\n\n\n\n\n\n $string_css = $scss_compiler->compile($string_sass);\n\n\n\n file_put_contents($out,$string_css);\n\n\n //}\n\n }\n\n $end = microtime(true);\n\n //echo '<br>' . round($end - $start,3).'s';\n //die();\n\n /*// step through all .scss files in that folder\n foreach ($filelist as $file_path) {\n // get path elements from that file\n $file_path_elements = pathinfo($file_path);\n // get file's name without extension\n $file_name = $file_path_elements['filename'];\n \n $in = $scss_folder . $file_name . \".scss\";\n $out = $css_folder . $file_name . \".css\";\n \n //if (! is_file($out) || filemtime($in) > filemtime($out)) {\n // get .scss's content, put it into $string_sass\n $string_sass = file_get_contents($in);\n // compile this Sass code to CSS\n $string_css = $scss_compiler->compile($string_sass);\n // write CSS into file with the same filename, but .css extension\n file_put_contents($out,$string_css);\n //}\n \n }*/\n\n }", "title": "" }, { "docid": "db2037acd6729b8fc6d61f264bc147ec", "score": "0.3996549", "text": "function setpath($value, $pre = null) {\n \treturn $pre.preg_replace('/(\\/+)/','/',('/'.$value));\n }", "title": "" }, { "docid": "9e5945d81e10ed96516868d2a4332bd3", "score": "0.3995681", "text": "private function addSassImport(string $pattern): void\n {\n $parts = explode('.', $pattern);\n $parent = array_shift($parts);\n\n if (count($parts) === 0) {\n $import = \"{$parent}\";\n $this->importInMainSassFile($import);\n\n } elseif (count($parts) >= 1) {\n\n $parentSassPath = pattern_path() . \"/{$parent}/{$parent}.scss\";\n $includeFile = implode('/', $parts);\n\n /*\n * Import in parent sass file\n */\n $content = \"@import \\\"{$includeFile}\\\";\\n\";\n if (!File::exists($parentSassPath)) {\n\n $import = \"{$parent}/{$parent}\";\n $this->importInMainSassFile($import);\n }\n\n File::append($parentSassPath, $content);\n }\n }", "title": "" }, { "docid": "6f6c6c5a4b76c01fdc7a5f2cc84b64d4", "score": "0.39877787", "text": "protected function unSlashUri(string $uri)\n {\n $uri = ltrim($uri, \"\\/\");\n return rtrim($uri, \"\\/\");\n }", "title": "" }, { "docid": "2c987f65b954039f350de5e893266c60", "score": "0.39752626", "text": "function slashesFlipForward($path) {\n\treturn preg_replace('#\\\\\\#', '/', $path);\n}", "title": "" }, { "docid": "1c749afbcfa5ab1ba46249a56470bf45", "score": "0.3967744", "text": "public static function normalizeValue($value): \\PhpParser\\Node\\Expr {}", "title": "" }, { "docid": "93c99ff5b3fe79e10b268832b30ae8f3", "score": "0.39456064", "text": "public function div2(){\r\n\r\n $erg=$this->a/$this->b;\r\n round($erg);\r\n return $erg;\r\n }", "title": "" }, { "docid": "064eb950204e4f33ce1ae8d91312c6a2", "score": "0.3944048", "text": "protected static function updateSass()\n {\n copy(__DIR__.'/stubs/scss/app.scss', resource_path('sass/app.scss'));\n }", "title": "" }, { "docid": "803cd71931397f31d2f4fb3006176ebc", "score": "0.39415732", "text": "function yy_r90(){\n $this->_retvalue = '(1 & ' . $this->yystack[$this->yyidx + -2]->minor . ' / ' . $this->yystack[$this->yyidx + 0]->minor . ')';\n }", "title": "" }, { "docid": "d35292f8aa7708aff4ae0e08c517ff9f", "score": "0.39387456", "text": "private function importInMainSassFile(string $import): void\n {\n File::append(pattern_path() . '/patterns.scss',\n \"@import \\\"{$import}\\\";\\n\");\n }", "title": "" }, { "docid": "f5f637a1fb63bd98bdcaed580c2fb57c", "score": "0.3927425", "text": "function oxy_stack_scss($scss)\n{\n $scss .= '@import \"bootstrap/oxygenna-variables\";@import \"compass/css3\";@import \"theme/compass-mixins\";@import \"theme/skin\";';\n return $scss;\n}", "title": "" }, { "docid": "86d9d1b8deb85e394574c71dc24b6723", "score": "0.3926018", "text": "function tslash($path) {\r\n\t\treturn suio::untslash($path).'/';\r\n\t}", "title": "" }, { "docid": "7faedd3718baacf8669e0f1ddbd078e9", "score": "0.39238822", "text": "public function get_stylesheet_root() {}", "title": "" }, { "docid": "c2455b00a16460bfcbe7cd0e12e26adc", "score": "0.3909024", "text": "private function removeEscapingOfAlternationSyntax($regex)\n {\n return str_replace('\\\\\\/', '/', $regex);\n }", "title": "" }, { "docid": "19df2a89abda6f37262feb5835e13d5d", "score": "0.39014503", "text": "function untslash($path) {\r\n\t\treturn rtrim($path, '/');\r\n\t}", "title": "" }, { "docid": "f4d6ddf0006591f9b15739f97c80e3c8", "score": "0.38794878", "text": "public function divide($id)\n {\n $calculator = $this->getCalculator($id);\n $calculator->divide();\n $this->persistCalculator($id, $calculator);\n return $this->response->make($calculator->peek());\n }", "title": "" }, { "docid": "98d745bd25cd3b494e1f6209bd7564e0", "score": "0.3877477", "text": "public static function normalize(string $uri): string\n {\n // TODO: we should not force trailing slash, avoid this in 2.0\n return Str::append(static::make([], $uri), '/');\n }", "title": "" }, { "docid": "6629fa4d88ceee9eba6f4523b39402db", "score": "0.38725775", "text": "protected static function updateSass()\n {\n (new Filesystem())->ensureDirectoryExists(resource_path('sass'));\n\n copy(__DIR__.'/../coreui-stubs/bootstrap/app.scss', resource_path('sass/app.scss'));\n }", "title": "" }, { "docid": "e3ccc1e83853cabc381ae2d64a3e1868", "score": "0.3872404", "text": "function slash_string($string, $start, $end) {\n // Strip existing start/end slash\n $string = trim($string, '/');\n\n // Add start/end slash\n if ($start) {\n $string = '/' . $string;\n }\n if ($end) {\n $string = $string . '/';\n }\n\n // Tada.\n return $string;\n}", "title": "" }, { "docid": "c02caf3a3fd671aa68113a7be238f812", "score": "0.38638166", "text": "static function rmEndSlash(string $str): string\n {\n if (!preg_match('!/$!', $str)) {\n return $str;\n }\n return preg_replace('!/+$!', '', $str);\n }", "title": "" }, { "docid": "d93ac1a8ef065f7413fc0fd28509f633", "score": "0.38486364", "text": "static function tslash( $path ) {\n\t\treturn suio::untslash( $path ) . '/';\n\t}", "title": "" }, { "docid": "e796c2d6cecc671d19f771b47af57a29", "score": "0.38424283", "text": "public function unaryPlus(): Value\n {\n return new SassString(sprintf('+%s', $this->toCssString()), false);\n }", "title": "" }, { "docid": "1300a4db2208d439a0e806345a1be2d2", "score": "0.3832903", "text": "private static function tidy($uri)\n\t{\n\t\treturn ($uri != '/') ? Str::lower(trim($uri, '/')) : '/';\n\t}", "title": "" }, { "docid": "93fc368598dec7bab322e84c415ad11c", "score": "0.38317096", "text": "static function segment($pre_segment)\n {\n return $pre_segment;\n }", "title": "" }, { "docid": "6f73742414d27cd9a716108107d71ff3", "score": "0.38287893", "text": "public function get_stylesheet_root()\n {\n }", "title": "" }, { "docid": "b40cdd0416fe81b264d8863f4ea40598", "score": "0.381858", "text": "function slashesFlipBackward($path) {\n\treturn preg_replace('#/#', '\\\\', $path);\n}", "title": "" }, { "docid": "cc5a5e00956c7f3b8b093884f9eb855e", "score": "0.37940526", "text": "function add_normalize_css() {\n\twp_enqueue_style( 'normalize-styles', \"https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css\");\n}", "title": "" }, { "docid": "bf437c9d3c6f32762f4a626adf59852a", "score": "0.37847567", "text": "function divide($num1, $num2)\n {\n if ($num1 == 0) return 'Error infinity, can not divide zero';\n\n return $num1 / $num2;\n }", "title": "" }, { "docid": "b1407ae2516a4c2e6de1eb514a1a48a3", "score": "0.37797976", "text": "function unleadingslashit( string $input = '' ) : string {\n\tif ( '/' === substr( $input, 0, 1 ) ) {\n\t\treturn substr( $input, 1 );\n\t}\n\n\treturn $input;\n}", "title": "" }, { "docid": "68b2bcb3542f3d3005415f4a5462a7c0", "score": "0.3772468", "text": "function remove_slash ($str)\n {\n $res = ltrim($str, '/'); \n return $res;\n }", "title": "" }, { "docid": "c18a2def98cb1f9ca078b4848ec0c7f6", "score": "0.37568238", "text": "public function fraction(float $value): string\n {\n list($whole, $decimal) = $this->float2parts($value);\n\n return $whole.' '.$this->float2ratio($decimal);\n }", "title": "" }, { "docid": "dc95bbb348d8605df689f064ab8a1ca8", "score": "0.37540543", "text": "public function get_scss()\n {\n if (empty($this->scss)) {\n $this->generate_scss();\n }\n return $this->scss;\n }", "title": "" }, { "docid": "b9f9d74cd308d43d53bbec07d43b7ec9", "score": "0.37499064", "text": "function _safe_divide($x, $y)\n {\n if (MATH_BIGINTEGER_BASE === 26) {\n return (int) ($x / $y);\n }\n\n // MATH_BIGINTEGER_BASE === 31\n return ($x - ($x % $y)) / $y;\n }", "title": "" }, { "docid": "8bd377dbbd850897f8fabed92043dc85", "score": "0.3749086", "text": "public static function div($a, $b)\n {\n if (0 == $b) {\n throw new \\InvalidArgumentException('Division by zero');\n }\n\n return $a / $b;\n }", "title": "" }, { "docid": "aa5267b58e67accc29a301e272c7e7d8", "score": "0.3744093", "text": "public function divide(\n int $roundingMode,\n int $scale,\n NumberInterface $dividend,\n NumberInterface ...$divisors\n ): NumberInterface;", "title": "" }, { "docid": "0bd4a6854d3f1cd695f198d5e57020c9", "score": "0.37369215", "text": "function divide($a, $b) {\n \n if ($b == 0) {\n return 'Sorry!!! Division by 0';\n } else {\n \n return sprintf(\"The values divided are: $a / $b = $ %.3f\", $a / $b);\n }\n }", "title": "" }, { "docid": "eb2e1f36edf846532e1e5c49724047aa", "score": "0.37305823", "text": "function add_normalize_CSS()\n{\n wp_enqueue_style('normalize-styles', \"https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css\");\n}", "title": "" }, { "docid": "a9e046701565369df15f29344a35f60e", "score": "0.37263516", "text": "function baseDir() : string\n{\n return trailingslashit(get_stylesheet_directory());\n}", "title": "" }, { "docid": "941123cbded128e84ebe9df9035c1a17", "score": "0.37108558", "text": "public function percentage();", "title": "" }, { "docid": "bdf0d47af6d2688c7a8862e38ccd36b9", "score": "0.36998075", "text": "function normalize(){\r\n\t}", "title": "" }, { "docid": "848b91d6d92e9fc0d75e0c3c4a5a705a", "score": "0.3695524", "text": "function baseUrl() : string\n{\n return trailingslashit(get_stylesheet_directory_uri());\n}", "title": "" }, { "docid": "2c501ed26098c27603b094b4a7f72efd", "score": "0.36867777", "text": "function trim_leadingslash($route) {\n if ($route[0] == \"/\") {\n return \\substr($route, 1);\n } else {\n return $route;\n }\n}", "title": "" }, { "docid": "c08b6734bebc3cda809039b09322437c", "score": "0.3672566", "text": "static function endSlash(string $str): string\n {\n return (preg_match('!/$!', $str)) ? $str : $str . '/';\n }", "title": "" }, { "docid": "39f41b599158240fda85105b80d6917f", "score": "0.36708277", "text": "function play_stylesheet_uri( $uri, $dir ) {\n\treturn $dir . '/assets/css/style-min.css';\n}", "title": "" }, { "docid": "c3288985a86f3aeafd0dabb708fa18a6", "score": "0.36692947", "text": "function _path2Hash($path)\n {\n return preg_replace('{[\\\\\\\\/:]}', '_', $path);\n }", "title": "" }, { "docid": "ef06753b5ccc494ea82f200a553a1da1", "score": "0.36689672", "text": "public function normalize(string $uri): string\n {\n return normalize($uri);\n }", "title": "" }, { "docid": "e68d03f6a3443f97ac99b1492aae219a", "score": "0.36642337", "text": "public function reduce() {\r\n\t\t/*\r\n\t\t * divide 84 by 18 to get a quotient of 4 and a remainder of 12.\r\n\t\t * Then divide 18 by 12 to get a quotient of 1 and a remainder of 6.\r\n\t\t * Then divide 12 by 6 to get a remainder of 0, which means\r\n\t\t * that 6 is the gcd.\r\n\t\t */\r\n\t\t$gcf = $this->getGcd($this->numerator, $this->denominator);\r\n\t\t$this->numerator = ($this->numerator / $gcf);\r\n\t\t$this->denominator = ($this->denominator / $gcf);\r\n\t}", "title": "" }, { "docid": "bfe6bff10604b4f2f944fcbdbd9efc0b", "score": "0.36607316", "text": "public static function wp_unslash($value) {\n\t\treturn self::stripslashes_deep( $value );\n\t}", "title": "" }, { "docid": "9c48621e687e6a31840d1f44fe4c3d53", "score": "0.36583713", "text": "function pre_process($css)\t{ return $css; }", "title": "" }, { "docid": "3cda0f17dca3791d20a3eaf9ebeca747", "score": "0.36557248", "text": "protected function evaluatePath($__path, $__data)\n {\n $obLevel = ob_get_level();\n\n //\n ob_start();\n\n // Extract the rendering variables.\n foreach ($__data as $__variable => $__value) {\n ${$__variable} = $__value;\n }\n\n // Housekeeping...\n unset($__variable, $__value);\n\n try {\n include $__path;\n\n } catch (\\Exception $e) {\n $this->handleViewException($e, $obLevel);\n } catch (\\Throwable $e) {\n $this->handleViewException($e, $obLevel);\n }\n\n return ltrim(ob_get_clean());\n }", "title": "" }, { "docid": "4f76b5f1860f76da534153f3f6b915aa", "score": "0.36529028", "text": "function colorrub_autoriser(){}", "title": "" }, { "docid": "74f3b84f929a262de077cb9f4a4cbda7", "score": "0.3652133", "text": "function Common_97de3870795ecc1247287ab941d9719br($params){\n\t$stdDiv\t\t= STD_LITERAL_DIVISOR;\n\t$DPar\t\t= explode($stdDiv, $params, STD_MAX_ARRAY_JS);\n\n}", "title": "" }, { "docid": "28056bc9cde90bd80adffded261df242", "score": "0.3649287", "text": "public static function normalize($path) {\n return $path; //TODO\n }", "title": "" }, { "docid": "e331491d4360139aa605ceec9f42afca", "score": "0.36481258", "text": "public function innerhtml(){\nob_start();\n\tprintbr(\"<b>PHamIP.php - (Sass/HamL parser)</b>\");\n\techo \"Before: <br/>\"; \n\techo file_get_contents( dirname(__FILE__ ) . \"/style.scss\");\n\t//$prev = ini_get(\"error_reporting\");\n\t$css = CSASS :: scssFileToString( 'style.scss' );\n\t//error_reporting(0);\n\t//$sass = new SassParser(array('style'=>'nested'));\n\t//$css = $sass->toCss('style.scss');\n\t//error_reporting($prev);\n\t\n\techo \"After: <br />\";\n\techo $css;\n\t\n\t//CSASS :: scssFileToCSSFile( 'style.scss', 'style.css' );\n\t\nreturn ob_end();\n\t}", "title": "" }, { "docid": "228597dbf00e3309b8fefd50f6696a29", "score": "0.3642964", "text": "private static function removeFirstSlash($str): string\n {\n return str_starts_with($str, '/') ? substr($str, 1) : $str;\n }", "title": "" }, { "docid": "7b9a2cad807395c8173671fefae8066f", "score": "0.36400843", "text": "public static function mixin($mixin)\n {\n \\Illuminate\\Database\\Query\\Builder::mixin($mixin);\n }", "title": "" }, { "docid": "25cc7128becac5f3c7a268c783bbc76f", "score": "0.3639955", "text": "public function url($url)\n\t{\n\t\treturn preg_replace(['/{(.*?)}/', '/\\//'], ['([a-zA-Z0-9]+)', '\\/'] ,$url);\n\t}", "title": "" }, { "docid": "1745359663bbecbeefc6f72afbe73726", "score": "0.36392885", "text": "protected function normalizePath($path) {\n $path = '/' . $path . '/';\n return str_replace('//', '/', $path);\n }", "title": "" }, { "docid": "e69e99dd2728e1c22dc604be5c27b2a1", "score": "0.3636586", "text": "public function testAngleBracketScanning() {\n\t\t$content = file_get_contents($this->_jsDir . 'classes' . DS . 'slideshow.js');\n\t\t$result = $this->filter->input('slideshow.js', $content);\n\t\t$expected = <<<TEXT\n/*!\n this comment will stay\n*/\n// this comment should be removed\nfunction test(thing) {\n\t/* this comment will be removed */\n\t// I'm gone\n\tthing.doStuff(); //I get to stay\n\treturn thing;\n}\nvar AnotherClass = Class.extend({\n\n});\nvar Slideshow = new Class({\n\n});\nTEXT;\n\t\t$this->assertTextEquals($expected, $result);\n\t}", "title": "" }, { "docid": "8d6653cfdabe4dbff268afaee0297bfd", "score": "0.36342022", "text": "public static function oneDivXPlusOne($x)\n {\n return 1 / ($x + 1);\n }", "title": "" }, { "docid": "0b37f8c491286fdb5e6002168a1abe48", "score": "0.36333874", "text": "function yy_r85(){\n $this->_retvalue = '!(' . $this->yystack[$this->yyidx + -2]->minor . ' % ' . $this->yystack[$this->yyidx + 0]->minor . ')';\n }", "title": "" }, { "docid": "5ec70cf0156e0fdd20eda945393bf825", "score": "0.36318934", "text": "public static function harmonicNumber($value)\n{\n $num=0;\n for($i=1;$i<=$value;$i++)\n {\n $num=$num+(1.0/$i);\n echo \"1/$i\".\"+\";\n }\n return $num;\n}", "title": "" }, { "docid": "5da330b57423d00b8eb70686075ac7a8", "score": "0.36304858", "text": "public function op_modulo($other)\n {\n if (!$other instanceof SassNumber || !$other->isUnitless()) {\n throw new SassNumberException('Number must be a unitless number', SassScriptParser::$context->node);\n }\n $this->value %= $this->convert($other)->value;\n\n return $this;\n }", "title": "" }, { "docid": "aab9183747ca8e19aaaf9fb6e4667dca", "score": "0.36298048", "text": "public function textReduceSlashes(UnitTester $I)\n {\n $I->wantToTest('Text - reduceSlashes()');\n $expected = 'app/controllers/IndexController';\n $actual = Text::reduceSlashes('app/controllers//IndexController');\n $I->assertEquals($expected, $actual);\n\n $expected = 'http://foo/bar/baz/buz';\n $actual = Text::reduceSlashes('http://foo//bar/baz/buz');\n $I->assertEquals($expected, $actual);\n\n $expected = 'php://memory';\n $actual = Text::reduceSlashes('php://memory');\n $I->assertEquals($expected, $actual);\n\n $expected = 'http/https';\n $actual = Text::reduceSlashes('http//https');\n $I->assertEquals($expected, $actual);\n }", "title": "" } ]
ded8fdb83ae1d201318d18c65efb2871
whereIn for encrypted columns
[ { "docid": "10af618b7b571c7d824ae509b3cae626", "score": "0.6712021", "text": "public function scopeWhereInEncrypted($query, $column, $value)\n {\n /** @var Builder $query */\n if (is_array($value) || $value->count() > 1) {\n for ($i = 0; $i < count($value); $i++) {\n if ($i === 0) {\n $query->whereRaw(db_decrypt_string($column, $value[$i]));\n } else {\n\n $query->orWhereRaw(db_decrypt_string($column, $value[$i]));\n }\n }\n return $query;\n }\n return $query->whereRaw(db_decrypt_string($column, $value));\n }", "title": "" } ]
[ { "docid": "80404390a50206103600d550691e1fac", "score": "0.64968836", "text": "function serendipity_db_in_sql($col, &$search_ids, $type = ' OR ') {\n return $col . \" IN (\" . implode(', ', $search_ids) . \")\";\n}", "title": "" }, { "docid": "74f04f41d0dcb3dc6acdb48fa6716e39", "score": "0.620515", "text": "public function findWhereIn($field, $value, array $columns = ['*']);", "title": "" }, { "docid": "22e930d786682444715309ac7cb1fc4b", "score": "0.62031126", "text": "public function testWhereIn(): void {\r\n\r\n $sql = $this -> builder -> select() -> table('product') -> where('id = 1 OR id IN(2, 3, 4)') -> build();\r\n $this -> assertEquals('SELECT * FROM product WHERE (id = 1 OR id IN(2, 3, 4))', $sql -> getQuery());\r\n\r\n $sql = $this -> builder -> select() -> table('product') -> where('id = 1 OR id IN(?)') -> bind([[2, 3, 4]]) -> build();\r\n $this -> assertEquals('SELECT * FROM product WHERE (id = 1 OR id IN(?,?,?))', $sql -> getQuery());\r\n $this -> assertEquals([2, 3, 4], $sql -> getParameters());\r\n }", "title": "" }, { "docid": "1187233ef7bb803c3b0bc66bdb617e0b", "score": "0.6121047", "text": "public static function whereIn(...$args)\n {\n return static::makeQueryBuilder()->whereIn(...$args);\n }", "title": "" }, { "docid": "c715d05c85834dd73adfaf799767d65f", "score": "0.60963434", "text": "public function filterIn($in);", "title": "" }, { "docid": "9100b57198e9d30cbc602cba8fe14e06", "score": "0.608696", "text": "function where_in($wherein=array()){\n if($wherein){\n foreach($wherein as $k=>$v){\n $this->_database->where_in($k, $v);\n }\n }\n return $this;\n }", "title": "" }, { "docid": "b5c735ff1fc2796f914302595d4c9749", "score": "0.6032381", "text": "public function testWhereIn()\n\t{\n\t\t$query = $this->db->from('test')\n\t\t\t->where_in('id', array(0, 6, 56, 563, 341))\n\t\t\t->get();\n\n\t\t$this->assertIsA($query, 'PDOStatement');\n\t}", "title": "" }, { "docid": "baf94be6d99956e471633512f90619be", "score": "0.59464604", "text": "public function providerInConditions()\n {\n return [\n ['testTable', 'testField', ['bananas', 'test'], Query::IN],\n ['testTable', 'testField', ':placeholder', Query::IN],\n ['testTable', 'testField', ['bananas', 'test'], Query::NOT_IN],\n ['testTable', 'testField', ':placeholder', Query::NOT_IN],\n ];\n }", "title": "" }, { "docid": "537356f34a9ba137070bf162333c2599", "score": "0.5944063", "text": "public function whereIn($column, $values, $boolean = 'and', $not = false);", "title": "" }, { "docid": "fb1a24da92e074c11780b8e605b17801", "score": "0.59262323", "text": "protected function where_in($where)\n\t{\n\t\t$operator = ($where['not']) ? 'NOT IN' : 'IN';\n\n\t\treturn $this->wrap($where['column']).' '.$operator.' ('.$this->parameterize($where['values']).')';\n\t}", "title": "" }, { "docid": "8e3d8763a9a73aba471a91361b6f7e88", "score": "0.5792049", "text": "public function testWhereIn(): void\n {\n $expectedQuery = \"SELECT FIELDS(ALL) FROM {$this->tableName} WHERE field IN ('1')\";\n $builder = new Builder($this->tableName);\n $builder->whereIn('field', '1');\n $this->assertEquals($expectedQuery, $builder->getQuery());\n\n // Test that whereIn works with a multiple values\n $expectedQuery = \"SELECT FIELDS(ALL) FROM {$this->tableName} WHERE field IN ('1', '2', '3')\";\n $builder = new Builder($this->tableName);\n $builder->whereIn('field', ['1', '2', '3']);\n $this->assertEquals($expectedQuery, $builder->getQuery());\n\n // Test that whereIn works with integer values\n $expectedQuery = \"SELECT FIELDS(ALL) FROM {$this->tableName} WHERE field IN (1, 2, 3)\";\n $builder = new Builder($this->tableName);\n $builder->whereIn('field', [1, 2, 3]);\n $this->assertEquals($expectedQuery, $builder->getQuery());\n }", "title": "" }, { "docid": "8fbc353dc2b36c981a8122709bf71551", "score": "0.5693527", "text": "public function whereIn($columnName, $values) {\r\n $columnName = $this->_quoteIdentifier($columnName);\r\n $placeholders = $this->_createPlaceholders($values);\r\n return $this->_addWhere(\"{$columnName} IN ({$placeholders})\", $values);\r\n }", "title": "" }, { "docid": "7b8e9ad4d1347576c8e3e5cd444d2d55", "score": "0.56923026", "text": "function createSQLIn($arrVals, $strTable, $strField, $strIn = \"IN\", $strJoin = \"AND\") {\n\n $str = $strJoin . \" \" . $strTable . \".\" . $strField . \" \" . $strIn . \" (\";\n $strAdd = false;\n\n foreach ($arrVals AS $strVal) {\n\n if ($strAdd) {\n\n $strAdd .= \",\";\n }\n\n if (!is_numeric($strVal)) {\n\n $strAdd .= \"'\" . $strVal . \"'\";\n } else {\n\n $strAdd .= $strVal;\n }\n }\n\n $str = $str . $strAdd . \")\";\n\n return $str;\n }", "title": "" }, { "docid": "7ceef40e529af47e7faec8472994a113", "score": "0.5679931", "text": "public static function getDataBywhereInClause() {\n return User::whereIn('id', [1, 2, 3])->get();\n }", "title": "" }, { "docid": "71f71f9a6c83db2f3ca099e17b023d1f", "score": "0.56718963", "text": "public function scopeWhereInEncrypted(\n Builder $query, string $column, array $values, array $indexes = [],\n $boolean = 'and'\n ): void\n {\n $values = array_map(function (string $value) use ($column) {\n return $this->encrypt($column, $value)[1];\n }, $values);\n\n $available = array_keys($values[0]);\n\n $indexes = empty($indexes) ? $available : $indexes;\n\n $method = $boolean === 'or'\n ? 'orWhere'\n : 'where';\n\n $query->{$method}(function (Builder $query) use ($values, $indexes) {\n foreach ($indexes as $key => $index) {\n (bool) $key\n ? $query->orWhereIn($index, $values)\n : $query->whereIn($index, $values);\n }\n });\n }", "title": "" }, { "docid": "77e000517e14e56cb29044211efdb3d1", "score": "0.56499904", "text": "public function getWhereForSelect(string $key1, string $key2, string $whereColumn, string $whereValue): array;", "title": "" }, { "docid": "b39d74a2854d93b29baab1a318e78068", "score": "0.56341505", "text": "public function orWhereIn($column, $values)\n {\n }", "title": "" }, { "docid": "675d51cdb8231df135114fb6afe7fbaa", "score": "0.5610597", "text": "public function whereIn($column, $values, $boolean = 'and', $not = false)\n {\n }", "title": "" }, { "docid": "17a5307ec11fa4febce8cca103c29d96", "score": "0.5595503", "text": "public function findWhereIn(array $where, $attributes = ['*'])\n {\n }", "title": "" }, { "docid": "af84bdfa59c3bdfa515db85c32ca9105", "score": "0.5562492", "text": "public function whereIn(string $propertyName, array $propertyValues, int $limit = 0);", "title": "" }, { "docid": "d1f44ad70d8274b5ae2eac0cf7e95336", "score": "0.5469334", "text": "protected function getQueryValueForInClause($values) {\n $inValues = [];\n foreach($values as $value) {\n $inValues[] = $this->columnValueConverter->__invoke(parent::convertValue($value));\n }\n return $inValues;\n }", "title": "" }, { "docid": "a1470c670b4742d3283363455991ba53", "score": "0.5459838", "text": "public function orWhereIntegerInRaw($column, $values)\n {\n }", "title": "" }, { "docid": "307eacd8110e2ef242a9c026cfb39815", "score": "0.54590774", "text": "public function whereInModel($table, $id, $key, $value)\n {\n $stmt = self::$pdo->prepare(\"SELECT * FROM {$table} WHERE id={$id} AND WHERE {$key} IN {$value}\");\n $stmt->excute();\n return $stmt->fetch(\\PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "da615552629a7dcc76bb0a8553095515", "score": "0.5427331", "text": "public function where($wheres = []);", "title": "" }, { "docid": "b0c651e76219dcdb135418800a148e43", "score": "0.5420244", "text": "public function scopeWhereEncrypted($query, $column, $value)\n {\n /** @var Builder $query */\n return $query->whereRaw(db_decrypt_string($column, $value));\n }", "title": "" }, { "docid": "1ffc82b18e83d4337a330e8f43e33c87", "score": "0.53875786", "text": "public function whereIn($key, $values, $strict = false)\n {\n $values = $this->getArrayableItems($values);\n\n return $this->filter(function ($item) use ($key, $values, $strict) {\n return in_array($this->data_get($item, $key), $values, $strict);\n });\n }", "title": "" }, { "docid": "a6931b8a7e4e302987a986584cf9099c", "score": "0.5379401", "text": "function where($array) {\n foreach ($array as $key => $value)\n $this->where[$this->__parseTableFieldKey($key)] = $value;\n }", "title": "" }, { "docid": "374dbd38c09fc96535370b82b8ea3fa7", "score": "0.5379392", "text": "abstract protected function getWhereSQL();", "title": "" }, { "docid": "888f80bced1b4a7338be9ca801bb2e2c", "score": "0.52878106", "text": "public function whereIn( $value, $invalues, $not = false ){\n\t\t$s = \"`\" . mysql_real_escape_string($value) . \"`\";\n\t\tif ( $not ) $s .= \" not\";\n\t\t$s .= \" in (\";\n\t\t$first = true;\n\t\tforeach( $invalues as $val ){\n\t\t\tif ( !$first ) $s .= \", \";\n\t\t\telse $first = false;\n\t\t\t$s .= $this->toQuery($val);\n\t\t}\n\t\t$s .= \")\";\n\t\treturn array($s);\n\t}", "title": "" }, { "docid": "bb9ffe0ee855ccac0cd94df0309057a2", "score": "0.5286177", "text": "public function findAllWhereIn($columnName,$array,$relationshipNames=[],$trashed = false){\n return $this-> repository->findAllWhereIn($columnName,$array,$relationshipNames,$trashed);\n }", "title": "" }, { "docid": "f537205bda694ba878fa64bb67f769c7", "score": "0.52688384", "text": "protected function buildInQuery($field, $array){\n\t\t$count = count($array);\n\t\t$placeholders = array_fill(0, $count, '?');\n\t\t$stmt = implode(', ', $placeholders);\n\t\treturn '`' . $field . '` IN (' . $stmt . ')';\n\t}", "title": "" }, { "docid": "9fa97624345d03ce4a963eaefed5b360", "score": "0.52637476", "text": "function db_where($col, $val)\n\t{\n\t\tif (! is_array($val))\n\t\t{\n\t\t\t$this->EE->db->where($col, $val);\n\t\t}\n\t\telseif (count($val) == 1)\n\t\t{\n\t\t\t$this->EE->db->where($col, $val[0]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->EE->db->where_in($col, $val);\n\t\t}\n\t}", "title": "" }, { "docid": "1d06bcea91d3e21a6481c43b13749dee", "score": "0.5241002", "text": "function comma_array_SQL_where($db,$tablein,$column,$searchfield,$searchval)\n{\n $rs = $db->Execute(\"select $column from $tablein where $searchfield='$searchval' order by sortkey\");\n\n if ($rs) {\n while (!$rs->EOF) {\n $tempa[]=$rs->fields[0];\n $rs->MoveNext();\n }\n }\n return join(\",\",$tempa);\n}", "title": "" }, { "docid": "3c942e04bee9f206abc106fc77ed51bc", "score": "0.5215814", "text": "public function getRowsWhereInLike($table, $where = array(), $in_method = \"where_in\", $where_in_column = \"id\", $where_in = array(), $like_column = \"id\", $like_value = \"\", $or_where = array(), $columns = \"*\", $result_type = \"object\") {\n\n\t\t$this->db->select($columns);\n\t\t$this->db->where($where);\n\t\tif (!empty($where_in)) {\n\t\t\t$this->db->$in_method($where_in_column, $where_in);\n\t\t}\n\t\tif (is_array($or_where)) {\n\t\t\t$this->db->or_where($or_where);\n\t\t}\n\t\tif (!empty($like_value)) {\n\t\t\t$this->db->like($like_column, $like_value);\n\t\t}\n\t\t$query = $this->db->get($table);\n\t\tif ($result_type == \"array\") {\n\t\t\treturn $query->result_array();\n\t\t} else {\n\t\t\treturn $query->result();\n\t\t}\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "73ba02f16ce85743b645dca60e69ab43", "score": "0.51880795", "text": "public function testWhereInSelect()\n {\n $subSql = SqlBuilder::make()->from('sub_table', 'sub')->andWhereEquals('type', 1)->select('id');\n\n $sql = $this->sql();\n $sql->andWhereIn('col', $subSql);\n $this->assertEquals(\"SELECT *\\nFROM {$this->table} AS t\\nWHERE col IN (SELECT id\\nFROM sub_table AS sub\\nWHERE type='1')\", $sql->toSql());\n\n $sql = $this->sql();\n $sql->andWhereNotIn('col', $subSql);\n $this->assertEquals(\"SELECT *\\nFROM {$this->table} AS t\\nWHERE col NOT IN (SELECT id\\nFROM sub_table AS sub\\nWHERE type='1')\", $sql->toSql());\n }", "title": "" }, { "docid": "741f72758e65a27bd2e8af73ecbb78f7", "score": "0.51849705", "text": "function get_multiple_where($data) {\n $db = $this->_database;\n $table = $this->get_table();\n $db->where($data);\n $query=$db->get($table);\n return $query;\n }", "title": "" }, { "docid": "8c95c604792ca4e303f7752b687be6c1", "score": "0.51824945", "text": "protected function whereIn(QueryBuilder $query, $where)\n {\n if (!empty($where['values'])) {\n return $this->wrap($where['column']) . ' in (' . $this->parameterize($where['values']) . ')';\n }\n\n return '0 = 1';\n }", "title": "" }, { "docid": "ddb7573be421f489147a1186545b1acc", "score": "0.5180294", "text": "function _returnWhereInList() {\n $list = array();\n if (!empty($this->error))\n return false;\n if (empty($this->queryDetails))\n return false;\n\n // get slice of recordlist\n $offset = $this->limit * $this->page;\n $thisPage = array_slice($this->wholeRecordList, $offset, 10);\n\n // look for records from this timeline\n foreach ($thisPage as $record) {\n $list[$record->timeline][] = $record->recordID;\n }\n\n // build where clause\n if (isset($list['CAN'])) {\n $where['CAN'] = ' WHERE recordID IN (' . implode(',', $list['CAN']) . ') ';\n }\n else {\n $where['CAN'] = ' WHERE 0 '; // !! could be optimized so that this query doesn't even happen\n }\n if (isset($list['WEST'])) {\n $where['WEST'] = ' WHERE recordID IN (' . implode(',', $list['WEST']) . ') ';\n }\n else {\n $where['WEST'] = ' WHERE 0 ';\n }\n\n return $where;\n }", "title": "" }, { "docid": "b1604839ea36ea0358fc2afaef10dba7", "score": "0.5157045", "text": "protected function sqlKeyFilter()\n {\n return \"`id` = @id@\";\n }", "title": "" }, { "docid": "6df8cfd789eca5c387eec0780d80ce9b", "score": "0.51272583", "text": "public function whereIn(string $column, array|Model $value, string $agr = 'AND'): Query\n {\n if (!$this->query && !$this->param) {\n $this->query = 'SELECT * FROM ' . $this->table;\n }\n\n if (!str_contains($this->query ?? '', 'WHERE')) {\n $agr = 'WHERE';\n }\n\n if ($value instanceof Model) {\n $data = [];\n foreach ($value->toArray() as $val) {\n $data[] = array_values($val)[0];\n }\n $value = $data;\n }\n\n $value = count($value) == 0 ? ['\\'\\''] : $value;\n\n $this->query = $this->query . sprintf(' %s %s IN (%s)', $agr, $column, implode(', ', $value));\n\n return $this;\n }", "title": "" }, { "docid": "ed317ff10e605e00084c79226c3d4d95", "score": "0.5123036", "text": "protected function sqlKeyFilter()\n\t{\n\t\treturn \"`id` = @id@\";\n\t}", "title": "" }, { "docid": "4104380a32be128dc95e81defe509e46", "score": "0.51082146", "text": "public function inWhere($expr, $values, $useOrWhere=null){ }", "title": "" }, { "docid": "f98cdbd31cbc2804f5be8c3034af1570", "score": "0.5097116", "text": "public function whereIn($column, $values)\n\t{\n\t\treturn $this->where($column, 'terms', (array)$values);\n\t}", "title": "" }, { "docid": "695ace927ed08c57cbbf7fd28ddb45cf", "score": "0.50912166", "text": "function get_by_multiple($where) {\n \n }", "title": "" }, { "docid": "338640cea4c7fc75238ec0d3b4c89b29", "score": "0.506489", "text": "protected function assetWhere()\n\t{\n\t\t// Make all assetIds arrays so we can use them in foreach and IN\n\t\t$assetIds = (array) $this->assetId;\n\t\t$numerics = $strings = array();\n\n\t\tforeach ($assetIds AS $assetId)\n\t\t{\n\t\t\tif (is_numeric($assetId))\n\t\t\t{\n\t\t\t\t$numerics[] = (int) $assetId;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$strings[] = $this->db->q((string) $assetId);\n\t\t\t}\n\t\t}\n\n\t\t$assetwhere = '';\n\n\t\tif (!empty($numerics))\n\t\t{\n\t\t\t$assetwhere .= 'a.id IN (' . implode(',', $numerics) . ')';\n\t\t}\n\n\t\tif (!empty($strings))\n\t\t{\n\t\t\tif (!empty($assetwhere))\n\t\t\t{\n\t\t\t\t$assetwhere .= ' OR ';\n\t\t\t}\n\n\t\t\t$assetwhere .= 'a.name IN (' . implode(',', $strings) . ')';\n\t\t}\n\n\t\treturn $assetwhere;\n\t}", "title": "" }, { "docid": "6621d97f326c1eb579531a422af6b155", "score": "0.50472224", "text": "private function __where_in($info, $type = 'AND')\n {\n /* $link = self::connection(); */\n $where = $this->where;\n foreach ($info as $row => $value) {\n if (empty($where)) {\n $where = sprintf(\"WHERE `%s` IN (%s)\", $row, $value);\n } else {\n $where .= sprintf(\" %s `%s` IN (%s)\", $type, $row, $value);\n }\n }\n $this->where = $where;\n }", "title": "" }, { "docid": "cc38922f7b65ebd88ea5551c9da5a58f", "score": "0.5043302", "text": "protected function where($object)\n\t{\n\t\t// and OneToMany is due to the way Mongo and our Mock\n\t\t// mapper match criteria with array fields\n\n\t\t// If a value is an array and you provide a scalar\n\t\t// value then we do an in_array() operation\n\t\t// If a value isn't an array we just do a simple\n\t\treturn array($this->foreign() => $object->_id);\n\t}", "title": "" }, { "docid": "ea38bf3715e60fb0efcaf6fd333b0657", "score": "0.501504", "text": "function SqlKeyFilter() {\n\t\treturn \"`phrase_id` = @phrase_id@\";\n\t}", "title": "" }, { "docid": "4bca1fdaabeda6c2f667548d65af3798", "score": "0.50122786", "text": "protected function searchWhereIn(Search $search, array $data, array $jsons): SqlService\n {\n if (!isset($data['in']) || !is_array($data['in'])) {\n return $this;\n }\n\n foreach ($data['in'] as $column => $values) {\n // values should be array\n if (!is_array($values)) {\n $values = [$values];\n }\n\n //this is like if an array has one of items in another array\n // eg. if product_tags has one of these values [foo, bar, etc.]\n if (in_array($column, $jsons)) {\n $or = [];\n $where = [];\n foreach ($values as $value) {\n $where[] = \"JSON_SEARCH(LOWER($column), 'one', %s) IS NOT NULL\";\n $or[] = '%' . strtolower($value) . '%';\n }\n\n array_unshift($or, '(' . implode(' OR ', $where) . ')');\n call_user_func([$search, 'addFilter'], ...$or);\n continue;\n }\n\n //this is the normal\n if (preg_match('/^[a-zA-Z0-9-_]+$/', $column)) {\n $search->addFilter($column . ' IN (\"' . implode('\", \"', $values) . '\")');\n continue;\n }\n\n //by chance is it a json filter?\n if (strpos($column, '.') === false) {\n continue;\n }\n\n //get the name\n $name = substr($column, 0, strpos($column, '.'));\n //name should be a json column type\n if (!in_array($name, $jsons)) {\n continue;\n }\n\n //this is like product_attributes.HDD has\n //one of these values [foo, bar, etc.]\n $path = substr($column, strpos($column, '.'));\n $path = preg_replace('/\\.*([0-9]+)/', '[$1]', $path);\n $path = preg_replace('/([^\\.]+\\s[^\\.]+)/', '\"\"$1\"\"', $path);\n $column = sprintf('JSON_EXTRACT(%s, \"$%s\")', $name, $path);\n\n $or = [];\n $where = [];\n foreach ($values as $value) {\n $where[] = $column . ' = %s';\n $or[] = $value;\n }\n\n array_unshift($or, '(' . implode(' OR ', $where) . ')');\n call_user_func([$search, 'addFilter'], ...$or);\n }\n\n return $this;\n }", "title": "" }, { "docid": "0c27bfb46e0b9ac208960960dd3ebe99", "score": "0.49788773", "text": "public function getAllForMultipleKeys($tn, $KV, $select='*', $operator=\"AND\"){\n$dbh = $this->get();\n\n$q = \"\"; //We built up just the WHERE clause, then prefix the rest of the query\n$params = array();\n\nforeach($KV as $key => $value){\n //if($value instanceof Closure){ //This refuses to work (with php 5.3.2; could be a bug)\n if(is_object($value) && get_class($value)==\"Closure\"){\n //throw new Exception(print_r($value,true)); //TEMP\n $value = $value($tn,$key);\n }\n\n $key = $this->quoteIdentifier($key);\n if($q == \"\")$q = $key;\n else $q.= \" \".$operator.\" \".$key;\n\n if(is_array($value)){\n $cnt = count($value);\n if($cnt < 1)continue; //No matches, skip it\n $q.=' IN (?' . str_repeat(',?',$cnt-1) . ')';\n $params = array_merge($params, $value); //Append the new entries\n }\n else{\n $q.='=?';\n $params[] = (string)$value; //Might throw if an object that cannot be converted\n }\n }\n\n$q = 'SELECT '.$select.' FROM '.$this->quoteIdentifier($tn).' WHERE '.$q;\n$statement = $dbh->prepare($q);\n$statement->execute($params);\n\n\nreturn $statement->fetchAll(\\PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "0b1c9511f5bbb45a6b5145e4b5ae1106", "score": "0.49728158", "text": "protected function authenticateQuery()\n {\n // get select\n $dbQuery = clone $this->getDbSelect();\n $results = $dbQuery->table($this->tableName)\n ->select('*')\n ->where($this->identityColumn, $this->identity)->get();\n\n return $results;\n }", "title": "" }, { "docid": "6a488454805abe07d8113724edd5e1d1", "score": "0.4962487", "text": "public function whereIn($field, array $values): self\n {\n if(! empty($values)) {\n $wheres = array_map(function ($value) use ($field) {\n return \"$field={$this->transform($value)}\";\n }, array_values($values));\n } else {\n $wheres = ['0 = 1'];\n }\n\n $this->wheres[] = $wheres;\n\n return $this;\n }", "title": "" }, { "docid": "4598b288feebfb2457d246703ab65d68", "score": "0.49596632", "text": "public function in(array $args){\r\n $lastVar = $this->lastVar;\r\n $key = $this->lastWhere;\r\n $this->{$lastVar}[$key] = array('$in' => $args);\r\n return $this;\r\n }", "title": "" }, { "docid": "4f0204dcb360fa0dae9788068b4dd4d4", "score": "0.49468613", "text": "public static function sqlInItems($items): array\n {\n if (!is_array($items)) {\n $items = self::stringToArray($items);\n }\n\n $bind = rtrim(str_repeat('?, ', count($items)), ', ');\n $items = array_values($items);\n\n return [$bind, $items];\n }", "title": "" }, { "docid": "22fc65974e5f2e76b495a1845b961a05", "score": "0.49323183", "text": "function get_where_like_array($data) {\n $db = $this->_database;\n $table = $this->get_table();\n $db->like($data);\n $query=$db->get($table);\n return $query;\n }", "title": "" }, { "docid": "a320293992a017ca79ba67680220f9c3", "score": "0.4925282", "text": "public function whereIn( $field, $values = [ ] )\n\t{\n\t\treturn $this->_prepareWhereClauses( $field, $values, 'IN' );\n\t}", "title": "" }, { "docid": "e110531719331bd9b0a5e397c7646bab", "score": "0.49241477", "text": "public function whereIn($key, $values): self\n {\n return $this->whereHandler($key, 'IN', $values);\n }", "title": "" }, { "docid": "ee9ba28b93df799dd658f85ae5633cb2", "score": "0.49164754", "text": "public function whereIntegerInRaw($column, $values, $boolean = 'and', $not = false)\n {\n }", "title": "" }, { "docid": "7e42591058a8e0769f9c96b6f98b6b5e", "score": "0.49131864", "text": "public function whereInStrict($key, $values)\n {\n return $this->whereIn($key, $values, true);\n }", "title": "" }, { "docid": "bca3bee2b79d3776a41a8ed273516cd7", "score": "0.4900864", "text": "public function where_in($key, $values)\n {\n if(!empty($key) && count($values) > 0):\n $this->where_in[] = ($key . ' IN(' .implode(',', $values). ')');\n endif;\n\n return $this;\n }", "title": "" }, { "docid": "a466da92617effdd63f68bc83ec55134", "score": "0.4894336", "text": "public function in(TokenConditionIn $token, TokenBase $previous = null) {\n\t\t$in = \"'\" . implode(\"','\", $token->value) . \"'\";\n\t\treturn \"`{$token->property}` IN ({$in})\";\n\t}", "title": "" }, { "docid": "b70fec434c074e9a549571dfefe832b3", "score": "0.48593417", "text": "public static function queryWhere( ){\n\t}", "title": "" }, { "docid": "e8a3ad14e2701c9271876b1d51ae697c", "score": "0.4858438", "text": "private function select_array($where, $arr, $exclude = array(), $addon = \"\") { \n $what =\"*\"; \n $first = true; \n $query = \"select \".$what.\" from \".$where.\" where \"; \n foreach ($arr as $key => $value) \n { \n if(!in_array($key, $exclude)) \n { \n if(is_array($value)) \n { \n $value = implode(\",\", $value); \n } \n if($first) \n { \n $query = $query.$key.\" = '\".$value.\"'\"; \n $first = false; \n } \n else \n { \n $query = $query.\" and \".$key.\" = '\".$value.\"'\"; \n } \n } \n } \n $result = $this->exec($query.\" \".$addon); \n return $result; \n }", "title": "" }, { "docid": "f20c3d16540bb2ac8e51f666e01ce61b", "score": "0.48539326", "text": "function where_not_in($wherenotin=array()){\n if($wherenotin){\n foreach($wherenotin as $k=>$v){\n $this->_database->where_not_in($k, $v);\n }\n }\n return $this;\n }", "title": "" }, { "docid": "913cfc12833b6160d86af2fedc3dc246", "score": "0.48535636", "text": "private function genWhereClause() {\n $columnCount = 0;\n $sql = 'WHERE ';\n foreach ($this->dbPrimary as $primaryIndexColumn) {\n if (++$columnCount > 1)\n $sql .= ' AND ';\n $sql .= $primaryIndexColumn;\n $sql .= '=';\n $sql .= Db::escape($this->dbFields[$primaryIndexColumn]);\n }\n return $sql;\n }", "title": "" }, { "docid": "d555abf812b47364c9071202fec776e7", "score": "0.4852575", "text": "public function whereIn($field, $values)\n {\n $list = array_map(function ($value) {\n return compact('value');\n }, $values);\n\n $this->condition[] = [\n 'field' => compact('field'),\n 'op' => '=',\n 'value' => compact('list')\n ];\n\n return $this;\n }", "title": "" }, { "docid": "8c18a91472313a9fd0d265a5f6a290bb", "score": "0.48513472", "text": "public function toSqlWhere()\n {\n $where = [];\n $filter = $this->toFilter();\n foreach ($filter as $name => $value) {\n $where[] = $this->getPrefix() . $name . ' = :' . $name;\n }\n\n return implode(' AND ', $where);\n }", "title": "" }, { "docid": "e832ae78d9a5f4e267b710f8121b2724", "score": "0.48505884", "text": "public function whereIn($column, array $values, $boolean = 'and', $not = false) {\n\t\t$in = $not ? 'not in' : 'in';\n\t\t\n\t\treturn $this->on($column, $in, $values, $boolean, true);\n\t}", "title": "" }, { "docid": "4ea251ffa1f2fa8ccb173fc0e21f84df", "score": "0.4846703", "text": "public function listByAllUserFilter($strSql){}", "title": "" }, { "docid": "e051ccba93737e521ad775edd1ff1f55", "score": "0.48234016", "text": "public function addWhereToQuery($query, $value) {\n if(is_array($value)) {\n return $query->whereIn($this->columnName, $this->getQueryValueForInClause($value));\n }\n\n return parent::addWhereToQuery($query, $value);\n }", "title": "" }, { "docid": "3839a45854b96b994e295b444d32e8ef", "score": "0.48141858", "text": "public function inWhere($expr, $values)\n {\n if (count($values) === 0) {\n $this->andWhere('FALSE');\n\n return $this;\n }\n\n $bind = [];\n $bindKeys = [];\n\n foreach ($values as $value) {\n $key = 'ABP' . $this->_hiddenParamNumber++;\n $bindKeys[] = \":$key\";\n $bind[$key] = $value;\n }\n\n $this->andWhere($expr . ' IN (' . implode(', ', $bindKeys) . ')', $bind);\n\n return $this;\n }", "title": "" }, { "docid": "ba835bb2dc563774a400a96d54883638", "score": "0.47916275", "text": "public function and_where_in($field, $equal = null)\n {\n return self::where_in($field, $equal);\n }", "title": "" }, { "docid": "3dac90f164ae7108d863da67871ed53e", "score": "0.47909525", "text": "public function andWhere();", "title": "" }, { "docid": "374c67582a3b4eb687e8299363a6aa28", "score": "0.47905672", "text": "public function scopeOrWhereEncrypted($query, $column, $value)\n {\n /** @var Builder $query */\n return $query->orWhereRaw(db_decrypt_string($column, $value));\n }", "title": "" }, { "docid": "399693ba60942ac9393110521a467045", "score": "0.4782454", "text": "protected function in(Schema $schema, string $key, array $query): string {\n return template($this, $schema, $key, $query, '$key IN ($implode)');\n }", "title": "" }, { "docid": "8c0745eca56ebdc99337430ae37c9507", "score": "0.47773188", "text": "function SqlKeyFilter() {\r\n\t\treturn \"`employee_id` = '@employee_id@'\";\r\n\t}", "title": "" }, { "docid": "9f2cea79edea8936c96bc3526863c060", "score": "0.47571138", "text": "public function getFilterFromRecordKeys()\n\t{\n\t\t$arKeys = $this->getRecordKeys();\n\t\t$keyFilter = \"\";\n\t\tforeach ($arKeys as $key) {\n\t\t\tif ($keyFilter <> \"\") $keyFilter .= \" OR \";\n\t\t\t$this->id->CurrentValue = $key;\n\t\t\t$keyFilter .= \"(\" . $this->getRecordFilter() . \")\";\n\t\t}\n\t\treturn $keyFilter;\n\t}", "title": "" }, { "docid": "c594081bc3c2b0754b956503faff0aa6", "score": "0.47530633", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'role': return \"ur.koderole = '$key'\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "dcf64ea85beac408e452beaf12a03b2f", "score": "0.47452515", "text": "function _getByIDs($ids = [],$params = []){\n\t\t\t$ids = array_filter($ids);\n\t\t\t$ids = array_unique($ids);\n\t\t\t$ids = array_values($ids);\n\t\t\tif( !$ids ){return [];}\n\t\t\t$key = $this->indexBy ? $this->indexBy : '_id';\n\t\t\t$clause = [$key=>['$in'=>$ids]];\n\n\t\t\treturn $this->getWhere($clause,$params);\n\t\t}", "title": "" }, { "docid": "c3bdf795c5d5db1fa135e61ca5b657db", "score": "0.47255647", "text": "protected function add_primary_keys_to_where($query) {\n\t\t$primary_key = static::primary_key ();\n\t\tforeach ( $primary_key as $pk ) {\n\t\t\t$query->where ( $pk, '=', $this->_original [$pk] );\n\t\t}\n\t}", "title": "" }, { "docid": "1eb60beabe96e136cda4c18db2c043c9", "score": "0.47206727", "text": "function get_where_or_like_array($data) {\n $db = $this->_database;\n $table = $this->get_table();\n $db->or_like($data);\n $query=$db->get($table);\n return $query;\n }", "title": "" }, { "docid": "804480a8f335f902b6806d2454ed80fa", "score": "0.4710941", "text": "public function in($field, $inArray) {\r\n foreach ($this->lastresults as $key => $value)\r\n if (array_key_exists($value[$field], $inArray) || in_array($value[$field], $inArray))\r\n $this->resultarray[$key] = $value;\r\n\r\n return new CKDBFinder($this->resultarray, $this->repository);\r\n }", "title": "" }, { "docid": "de659fd9ea96125db2b7d027f20001d9", "score": "0.4710934", "text": "private function _set_where( $params )\n\t{\n\t\tif ( count( $params ) == 1 ) {\n\t\t\tif ( !is_array( $params[0] ) && !strstr( $params[0], \"'\" ) ) {\n\t\t\t\t$this->db->where( $this->primary_key, $params[0] ); // 1.\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->db->where( $params[0] ); // 2.\n\t\t\t}\n\t\t}\n\t\telseif ( count( $params ) == 2 ) {\n\t\t\tif ( is_array( $params[1] ) ) {\n\t\t\t\t$this->db->where_in( $params[0], $params[1] ); // 4.\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->db->where( $params[0], $params[1] ); // 3.\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4b99120d4ba68d5116349fdf9836b0bd", "score": "0.47025156", "text": "protected function whereInMethod(Model $model, $key)\n {\n return 'whereIn';\n }", "title": "" }, { "docid": "1ad630cd6cac5a5351563ca81ddd5dc5", "score": "0.46890518", "text": "function SqlKeyFilter() {\n\t\treturn \"`rm_id` = @rm_id@\";\n\t}", "title": "" }, { "docid": "53efa542653283774c4d583467a851ec", "score": "0.46865314", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(SecurityTableMap::COL_SECURITY_ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "3639e46d7ef622c83f00ad92f370774f", "score": "0.46841958", "text": "public function search_trainee_by_ids($ids) {\n $sql = \"select usr.user_id, first_name, last_name\n from tms_users usr, tms_users_pers pers\n where usr.tenant_id = pers.tenant_id\n AND usr.user_id = pers.user_id\n AND usr.user_id in (\" . implode(\",\", $ids) . \")\";\n return $this->db->query($sql);\n }", "title": "" }, { "docid": "183996d2518718f2de48ea1a5e058eb1", "score": "0.46836188", "text": "protected function sqlKeyFilter()\n {\n return \"`nik` = '@nik@'\";\n }", "title": "" }, { "docid": "f3732d5c0c356630fe40a0c3df0a7c08", "score": "0.46767613", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(AdminCredentialTableMap::COL_ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "0636292f812a3fe316ab2c735eb49ca7", "score": "0.46660045", "text": "public function filters(): array\n {\n return [\n WhereIdIn::make($this),\n ];\n }", "title": "" }, { "docid": "0636292f812a3fe316ab2c735eb49ca7", "score": "0.46660045", "text": "public function filters(): array\n {\n return [\n WhereIdIn::make($this),\n ];\n }", "title": "" }, { "docid": "0636292f812a3fe316ab2c735eb49ca7", "score": "0.46660045", "text": "public function filters(): array\n {\n return [\n WhereIdIn::make($this),\n ];\n }", "title": "" }, { "docid": "574e6b5ad6d21f6b107a528c73382343", "score": "0.46621796", "text": "private function inClause($filter, $criterionid, $column, $isString = true) {\n\t\t// Only build the clause if the criterion is selected\n\t\tif(isset($filter->$criterionid) && count($filter->$criterionid) > 0) {\n\t\t\t$sql = \" and $column in (\";\n\t\t\tforeach($filter->$criterionid as $value) {\n\t\t\t\tif($isString)\n\t\t\t\t\t$sql .= \"'$value',\";\n\t\t\t\telse\n\t\t\t\t\t$sql .= \"$value,\";\n\t\t\t}\n\t\t\t// TODO: clean this up, it is a yucky cheat\n\t\t\t$sql .= \"'_')\";\n\t\t\treturn $sql;\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}", "title": "" }, { "docid": "224d17017d3bf127caf96fecd8110d5f", "score": "0.46550354", "text": "public function getWhere(array $where)\n\t{\n\t\treturn $this->db->where($where)\n\t\t\t\t\t\t\t\t\t\t->join($this->table_infos, $this->table_infos.'.user_id = id', 'left')\n\t\t\t\t\t\t\t\t\t\t->get($this->table, 1, 0)\n\t\t\t\t\t\t\t\t\t\t->row_array();\n\t}", "title": "" }, { "docid": "3de0c2b15cefb7586cd1a95584d5fe9b", "score": "0.46504307", "text": "public function in($field, $values, $not = FALSE) {\n\n if (is_array($values)) {\n\n $escaped_values = array();\n\n foreach ($values as $v) {\n\n if (is_numeric($v)) {\n\n $escaped_values[] = $v;\n\n } else {\n\n $escaped_values[] = \"'\" . $this->driver->escape_str($v) . \"'\";\n\n }\n\n }\n\n $values = implode(\",\", $escaped_values);\n\n }\n\n\n\n $where = $this->driver->escape_column(((strpos($field, '.') !== FALSE) ? $this->config['table_prefix'] : '') . $field) . ' ' . ($not === TRUE ? 'NOT ' : '') . 'IN (' . $values . ')';\n\n $this->where[] = $this->driver->where($where, '', 'AND ', count($this->where), -1);\n\n\n\n return $this;\n\n }", "title": "" }, { "docid": "10b87ceaaa6f69f801505a649e0024a2", "score": "0.46502998", "text": "function where() {\n\t\t$conditions = $this->_getArguments(func_get_args());\n\t\tforeach($conditions as $cond) {\n\t\t\tif(is_string($cond))\n\t\t\t\tif(!in_array($cond,$this->conditions)) $this->conditions[] = $cond;\n\t\t}\n\t}", "title": "" }, { "docid": "40c1b6b95b740b0ea37f699b35bea63f", "score": "0.46466666", "text": "public function findByRaw($data = []);", "title": "" }, { "docid": "8971d16fe8b24ad117bccca03801464a", "score": "0.46463937", "text": "public function where() {\n foreach (Core_Arrays::flatten($args = func_get_args()) as $arg) {\n $this->where[] = (string) $arg;\n }\n return $this;\n }", "title": "" }, { "docid": "1d637f5588533e58c2b36e1f572d579d", "score": "0.46429193", "text": "function SqlKeyFilter() {\n\t\treturn \"`pd_id` = @pd_id@\";\n\t}", "title": "" }, { "docid": "734e2f1b636cd398a86ea815a4fa4579", "score": "0.4625797", "text": "public function scopeOrWhereInEncrypted(\n Builder $query, string $column, array $values, array $indexes = [],\n $boolean = 'or'\n ): void\n {\n $this->scopeWhereInEncrypted(\n $query, $column, $values, $indexes, $boolean\n );\n }", "title": "" } ]
f14c9106ba4614e1108325bc7bf34cb8
Function that sets the module filter in session.
[ { "docid": "ed8e3a954bd80e921cdcbdc40495335d", "score": "0.0", "text": "public static function setCurrentView($moduleName, $viewId)\n\t{\n\t\t$_SESSION['lvs'][$moduleName]['viewname'] = $viewId;\n\t}", "title": "" } ]
[ { "docid": "7067936038c44e48a1ea3baaffe04235", "score": "0.65895057", "text": "public static function setFilterSession($filter) {\n $session = new Zend_Session_Namespace('calendar_filter');\n $session->unsetAll();\n $session->init = TRUE;\n $session->filter = [];\n if (!empty($filter)) {\n foreach ($filter as $type) {\n if(is_numeric($type)) {\n $session->filter['order_status'][$type] = TRUE;\n } else {\n $session->filter[$type] = TRUE;\n }\n \n }\n }\n return TRUE;\n }", "title": "" }, { "docid": "2067cae20b3ecfea24da890b18ea0964", "score": "0.6414127", "text": "private function setFilter(): void\n {\n $this->filter['language'] = $this->getRequest()->query->has('language')\n ? $this->getRequest()->query->get('language')\n : BL::getWorkingLanguage();\n }", "title": "" }, { "docid": "808e6a41e5398e50761d4b84ff95ac1b", "score": "0.6299995", "text": "function beforeFilter(){\n\t\t$this->fetchSettings();\n\t\t$this->checkSession();\n\t\t$this->callHooks('beforeFilter', null, $this, 'admin');\t\n\t}", "title": "" }, { "docid": "897eb8b379cd35f95f2bbb9d8c02bd1e", "score": "0.6206022", "text": "function beforeFilter() {\n\n parent::beforeFilter();\n\n // Set the local user variable to the Session's User\n $this->_user = $this->Session->read('User');\n }", "title": "" }, { "docid": "326055c8b9505d75652796a5220ec12f", "score": "0.6192046", "text": "protected function setFilters()\n\t{\n\t}", "title": "" }, { "docid": "93b0a7a1f63cb66ff354bb2596a2c7a8", "score": "0.61661077", "text": "public function setFilter($field, $value)\n\t{\n\t\tYiiSession::set('waitinglist_searchoptions',$field,$value);\n\t}", "title": "" }, { "docid": "1dd7343ab88d77e645c981becb54f4a0", "score": "0.6138929", "text": "public function setFilter(Request $request) {\n\n if ($request->has('name')) {\n\n $request->session()->put('level_name_filter', $request['name']);\n\n }\n\n \n }", "title": "" }, { "docid": "6cd9934c47595b2cb0cb17f192cfdcdd", "score": "0.60589415", "text": "public function initFilter()\n {\n include_once 'Services/Form/classes/class.ilTextInputGUI.php';\n $gname = new ilTextInputGUI($this->lng->txt('rep_robj_xtov_membership_list_flt_grp_name'), 'flt_grp_name');\n $gname->setSubmitFormOnEnter(true);\n\n $this->addFilterItem($gname);\n $gname->readFromSession();\n $this->filter['flt_grp_name'] = $gname->getValue();\n }", "title": "" }, { "docid": "fa78893860d13bc1c55247f2021965b3", "score": "0.6053825", "text": "public function resetFilters()\n {\n $this->session->set(Configuration::SESSION_PREFIX.'filters', null);\n }", "title": "" }, { "docid": "d2b444bf8fea4f86c58486e7572a8b41", "score": "0.60498977", "text": "function loadFilter(){\n\t\tglobal $config;\n\t}", "title": "" }, { "docid": "07e6bd6ae80fa6864c249598a8012973", "score": "0.60212934", "text": "protected function initFilters(Session $session)\n {\n $session->set('filters', array(\n 'project' => null,\n 'sprint' => null,\n ));\n }", "title": "" }, { "docid": "c5043cf4b5a7ae4c9924e47794eafcb2", "score": "0.6005592", "text": "public function setFilter($filter = NULL);", "title": "" }, { "docid": "c63aa7870e13d2d6900f40aaa3588e3a", "score": "0.59866196", "text": "public function setFilter(Filter $filter);", "title": "" }, { "docid": "ca9763a4c6a4674a2ef8e521ccc549fa", "score": "0.59772325", "text": "public function initFilter(){\n #each filter remembered in session linking to controller.action\n $session_key = '_filter_'.$this->fw->GLOBAL['controller.action'];\n $sfilter = $_SESSION[ $session_key ];\n if (!is_array($sfilter)) $sfilter=array();\n\n $f = req('f');\n if (!is_array($f)) $f=array();\n\n #if not forced filter\n if ( !reqs('dofilter') ){\n $f = array_merge($sfilter, $f);\n }\n\n #paging\n if ( !preg_match(\"/^\\d+$/\", $f['pagenum']) ) $f['pagenum']=0;\n if ( !preg_match(\"/^\\d+$/\", $f['pagesize']) ) $f['pagesize']=$this->fw->config->MAX_PAGE_ITEMS;\n\n #save in session for later use\n $_SESSION[ $session_key ] = $f;\n\n $this->list_filter = $f;\n return $f;\n }", "title": "" }, { "docid": "a6275e8f6d62f1ab00c8be2911a6cd4c", "score": "0.59289193", "text": "function set_search_set($filter) {\n\t\t$this->filter = $filter;\n\t}", "title": "" }, { "docid": "7df2f997296f3afc53b9fd5bdd3660a0", "score": "0.5865448", "text": "function active_item_menu(MainController $controller) \n{\n $request = $controller->getRequest();\n $session = $request->getSession();\n\n $session->set('module_actif', 'accueil');\n}", "title": "" }, { "docid": "720f656c4c3d956baa20730be71783e1", "score": "0.5862231", "text": "public function beforeFilter() {\n // $this->Auth->allow('login');\n\t\t$this->Session->write('id','14');\n $user_id = $this->Session->read(\"id\");\n $this->set('user_id', $user_id);\n if ($this->Session->check('Config.language')) {\n // Configure::write('Config.language', $this->Session->read('Config.language'));\n configure::write('langue', $this->Session->read('Config.language'));\n }\n$langue = $this->Session->read('Config.language');\n $this->set('langue', $langue);\n \n }", "title": "" }, { "docid": "e0154c513e7df345c72bc909f645c623", "score": "0.5828953", "text": "public function setSearchFilterValueFromRequest() {\n\n\t\tif ($this->request->request->has($this->getSearchFilterPostMethodKey())) {\n\n\t\t\t$searchFilterValue = $this->request->get($this->getSearchFilterPostMethodKey());\n\t\t\t$this->request->getSession()->set($this->getSearchFilterSessionKey(), $searchFilterValue);\n\t\t}\n\t}", "title": "" }, { "docid": "faa47072922c30a5b6f3828c43300c22", "score": "0.57618165", "text": "public function setFilter($filter)\n {\n $this->filter = $filter;\n }", "title": "" }, { "docid": "751b7628d1b36a62b23628efa6b02338", "score": "0.5752226", "text": "public function initFilter(): void\n {\n $tname = new ilTextInputGUI($this->lng->txt('rep_robj_xtov_test_list_flt_tst_name'), 'flt_tst_name');\n $tname->setSubmitFormOnEnter(true);\n $this->addFilterItem($tname);\n $tname->readFromSession();\n $this->filter['flt_tst_name'] = $tname->getValue();\n }", "title": "" }, { "docid": "120d30c15ea467133169835e9c3a332c", "score": "0.5744613", "text": "function addFilter($newFilter)\n {\n // override \n }", "title": "" }, { "docid": "fd4c058931f5eb70a64b6b83c8c07122", "score": "0.57380503", "text": "private function setDefaultFiltre()\n {\n isset($this->session->search)\n ?\n $this->session->search\n :\n $this->session->search = 'search_thermique';\n }", "title": "" }, { "docid": "90bc09fa4d9aa48e3170c36747c47924", "score": "0.5723996", "text": "protected function setSession()\n {\n\n }", "title": "" }, { "docid": "ce58913d52f58708515ec691b56e1328", "score": "0.57092154", "text": "public function beforeFilter() {\n\t\t$this->Security->blackHoleCallback = 'blackhole';\n\t\t\n\t\t// Sprache setzen\n\t\tif ($this->Session->check('Config.language')) {\n Configure::write('Config.language', $this->Session->read('Config.language'));\n }else{\n \tConfigure::write('Config.language', 'deu');\n \tCakeSession::write('Config.language', 'deu');\n \t}\n\t}", "title": "" }, { "docid": "d2dee929c5685d2ce18a0bf6dfe507d2", "score": "0.57065487", "text": "public function setFilters()\n\t{\n\t\t$filters =& $this->conf('filters');\n\t\t$filters = (array) @func_get_args();\n\t}", "title": "" }, { "docid": "7d38597a44db7b7465fe78799ca96aad", "score": "0.57044655", "text": "private function _setAccessFilter()\n {\n $user = Core::getHelper('user')->getUserInfo();\n $accessId = 1;\n\n if ($user && $user->getAccessId())\n $accessId = $user->getAccessId();\n\n $this->addFieldToFilter('access_id', array('<=' => $accessId));\n }", "title": "" }, { "docid": "fee7f5942ab082a518307a22206221a2", "score": "0.56878686", "text": "public function beforeFilter() {\n //$this->Session->write(\"selectedDB\".Configure::read(\"session.id\"),\"CASABLANCA_EURO\"); //Recuperacion de variable de session\n $this->Session->write(\"databases\", Configure::read(\"db.edit\"));\n if($this->Session->read(\"selectedDB\")!=null){\n Configure::write('db.read',$this->Session->read(\"selectedDB\"));\n }else{\n $this->Session->write(\"selectedDB\",\"CASABLANCA\");\n Configure::write('db.read',$this->Session->read(\"selectedDB\"));\n }\n }", "title": "" }, { "docid": "3a2c18dc587972b0eca7f1a0a03dd9d8", "score": "0.5683567", "text": "function beforeFilter(){\n\t\t//check session other than admin_login page\n\t\t$includeBeforeFilter = array('admin_index', 'admin_add', 'admin_status','admin_delete',\n\t\t\t'admin_delete_answer','admin_multiplAction','admin_answer_multiplAction',\n\t\t\t'admin_answers','admin_add_answer','admin_answer_status' );\n\t\tif (in_array($this->params['action'],$includeBeforeFilter)){\n\t\t\t// validate admin session\n\t\t\t$this->checkSessionAdmin();\n\t\t\t\n\t\t\t// validate module \n\t\t\t$this->validateAdminModule($this->permission_id);\n\t\t}\n\t}", "title": "" }, { "docid": "0eb2e537c6ec4ea12a6e4e2de9b4b302", "score": "0.56764525", "text": "function add_filters($filter) {\r\n\t\t$this->filterbank->add_filter($filter);\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "a5ccc7c75e6c67599cdfc9e6aebe0da6", "score": "0.5674733", "text": "private function setFilter()\n {\n $this->filter['categories'] = $this->getParameter('categories', 'array');\n $this->filter['value'] = $this->getParameter('value') == null ? '' : $this->getParameter('value');\n }", "title": "" }, { "docid": "cc7ebecc9de06626f583809f0589fe01", "score": "0.5655318", "text": "protected function registerFilter()\n {\n $this->app->bindShared('l4-lock.filter', function($app){\n return new LockFilter(\n $app['l4-lock'],\n $app['redirect'],\n $app['url']\n );\n });\n }", "title": "" }, { "docid": "61587e07ef7e6bb2eeac5aed947b892c", "score": "0.56318784", "text": "protected function _init()\r\n\t{\r\n\t\t$this->_filters = [\r\n\t\t\t'filter' => 'int'\t\t\t\r\n\t\t];\r\n\t}", "title": "" }, { "docid": "e86f21ecbc7044b2f587cf5323e9e424", "score": "0.5610003", "text": "public function setFilter(FilterInterface $filter)\n {\n \t$this->filter = $filter;\n }", "title": "" }, { "docid": "92f3de0111fc9a599dc1b7de4459a948", "score": "0.56078166", "text": "private function filterInit() {\r\n\t\t$this->filterStack = array ();\r\n\t}", "title": "" }, { "docid": "a30abaf9864379f7fc4da70c2881c451", "score": "0.5607141", "text": "protected function setModuleValues():void{\n\t}", "title": "" }, { "docid": "acd20080e643b77f66732ec46a407ace", "score": "0.55986685", "text": "function beforeFilter() { \t \r\n \tif (!$this->Session->check('User') && \r\n \t\tisset($this->params['prefix']) && \r\n \t\t$this->params['prefix']=='admin') {\t \t\t\r\n\t\t\t\t$this->checkAdminSession();\r\n\t\t}\r\n }", "title": "" }, { "docid": "3236390c7daa30bbd548d138dd45f689", "score": "0.55958986", "text": "function beforeFilter() {\n\t\tConfigure::read('Session.start', true);\n\t\t$this->Session->activate('/');\n\t\tif (isset($this->SwissArmy)) {\n\t\t\t$this->SwissArmy->setDefaultPageTitle();\n\t\t\t$this->SwissArmy->handlePostActions();\n\t\t}\n\t\t$this->Auth->authorize = 'controller';\n\t\t$this->Auth->allow('index', 'view');\n\t\t$this->Auth->loginAction = '/users/login';\n\t\t$this->Auth->logoutRedirect = '/';\n\t}", "title": "" }, { "docid": "699a639d525b68992be02356ef69b02d", "score": "0.5558209", "text": "public function beforeFilter() {\n parent::beforeFilter();\n //$this->Auth->allow('login', 'logout'); //allow all access by default\n $this->set('group', 'sampleSets');\n \n $this->Cookie->name = 'User'; //set the User cookie\n $this->Cookie->time = '365 days'; //long expiration time\n //$this->Cookie->key = getenv('COOKIE_KEY'); //set the security key\n $this->Cookie->key = 'qSI232qs*&sXOw!adre@34SAv!@*(XSL#$%)asGb$@11~_+!@#HKis~#^';\n $this->Cookie->type('aes'); //sets the encription type\n \n \n }", "title": "" }, { "docid": "03cb3052d43b773c25ecb83297f81061", "score": "0.5530152", "text": "public function setFilters()\n {\n $this->activeQueryLog()\n ->setFields()\n ->setCriteriaByQueryString()\n ->setCriteria()\n ->setIncludes()\n ->setLimit()\n ->setOrder()\n ->setGroup();\n }", "title": "" }, { "docid": "9813dfd104f72fe2338fd932021f05c7", "score": "0.5528322", "text": "private function _set_filter($filter = NULL)\n\t{\n\t\tif ( ! is_null($filter))\n\t\t\t$this->{$this->db_group}->where('('.$filter.')');\n\t}", "title": "" }, { "docid": "0937c402f0e44136bb4f0c602296b17b", "score": "0.552817", "text": "function register_filters() {\n\t\t// ....\n\t}", "title": "" }, { "docid": "1828e8a172fc229344ba434de72636b9", "score": "0.55265564", "text": "public function permit(){\n Firewall_Core_Controller_Filter::$bLog = $this->bLog;\n Firewall_Core_Controller_Filter::$bIsWhitelisted = true;\n SpamTrawler::$Registry['visitordetails']['filterresult'] = 'whitelisted';\n }", "title": "" }, { "docid": "24e4636cd60fb1569b3d3f0f6f0e515f", "score": "0.55245125", "text": "public function beforeFilter() { \n\t\t//$this->disable_cache();\n\t\t$this->show_tabs(16);\n\t}", "title": "" }, { "docid": "1a5566dea69e243d297c211048a81c3c", "score": "0.55179286", "text": "public function beforeFilter(){ \n\t\t$this->check_session();\n\t\t$this->check_role_access(8);\n\t}", "title": "" }, { "docid": "14c2065ceb6934b556c04fefb03f13ca", "score": "0.5513348", "text": "function setFilter(FilterInterface $filter, $name);", "title": "" }, { "docid": "e6ae59c0d85a44725fe45d9e7226d34b", "score": "0.5500305", "text": "public function updateFilters($newFilters)\n {\n $this->session->set(Configuration::SESSION_PREFIX.'filters', $newFilters);\n }", "title": "" }, { "docid": "639fad16cdbebec731e4869d6a2016e2", "score": "0.54872686", "text": "public function applyFilter()\n {\n\n $ilMyTableGUI = new ilMyTableGUI($this, self::CMD_STANDARD);\n $ilMyTableGUI->writeFilterToSession();\n $ilMyTableGUI->resetOffset();\n $this->ctrl->redirect($this, self::CMD_STANDARD);\n\n }", "title": "" }, { "docid": "a5692c6d0bc3caba912cd35c71d63c70", "score": "0.54776365", "text": "public function filter (){\n\n $this->filter = array();\n\n }", "title": "" }, { "docid": "a1e21342043a0277344ce3e49697b736", "score": "0.54754037", "text": "public function beforeFilter()\n {\n parent::beforeFilter();\n $this->Auth->allow('index', 'add', 'delete', 'clear', 'checkout');\n\n if (!is_array($this->Session->read('Order'))) {\n $this->Session->write('Order', array('Order' => array()));\n }\n\n if (!is_array($this->Session->read('Cart'))) {\n $this->Session->write('Cart', array());\n }\n }", "title": "" }, { "docid": "be57cee0fa39dec6f830f3184997ec19", "score": "0.5474849", "text": "public function add_filters()\n {\n }", "title": "" }, { "docid": "60b68e7a4e9b6f9cfa10dc9e1c39db90", "score": "0.5472579", "text": "public function beforeFilter() {\n // Placeholder for doing something useful\n \n if($this->Session->check('Auth.User')) {\n print \"(Authenticated Mode)\";\n }\n }", "title": "" }, { "docid": "fe8237671ab60f7556d330e1d6b16b89", "score": "0.5468705", "text": "function beforeFilter() {\r\n// first before allowing the user to access\r\n\r\n parent::beforeFilter();\r\n }", "title": "" }, { "docid": "5a3a31d0db764541c02740d407e66c3b", "score": "0.54613554", "text": "public function addModuleFilter($name)\n {\n $this->_moduleName = $name;\n $this->addTargetDir($this->_getBaseDir());\n }", "title": "" }, { "docid": "358e6597b3ba392a10476d885002e8f4", "score": "0.54574984", "text": "public function setFilter($filterName, $value);", "title": "" }, { "docid": "6de51b5a24a31ff4675f4281c90eca6c", "score": "0.54382414", "text": "function SM_sfLoadFilter($fName) {\n \n // if already here, don't reload \n if (class_exists($fName.'Filter',false))\n return true; \n \n // globalize\n global $SM_siteManager;\n\n // find file\n $fName = $SM_siteManager->findSMfile($fName.'Filter', 'sfFilters', 'inc', true);\n\n // load it up\n // include_once will not let duplicate modules be loaded\n include_once($fName); \n \n // all good and loaded, return\n return true;\n\n}", "title": "" }, { "docid": "129cfc05782b9386da64e22dc8bbe521", "score": "0.5414979", "text": "function enableFilterEntity(){\n\t}", "title": "" }, { "docid": "226781f02e94cbd23cef7a13895c6bad", "score": "0.5398788", "text": "public function sessionPrefilterProvider() {\n return [\n [0],\n [1],\n [2],\n ];\n }", "title": "" }, { "docid": "98106eed1e5e71fbf0fdf94b7d47a6f2", "score": "0.53807336", "text": "function beforeFilter() {\n\t}", "title": "" }, { "docid": "7dc43fd3843c7d39ecaa003c87ac4fb1", "score": "0.5374441", "text": "public function init() {\n\t\t$this->_arrParam = $this->_request->getParams();\n\t\t\n\t\t//----- bien session luu toan bo ten cac session khac duoc tao trong qua trinh chay ung dung\n\t\t//----- moi khi co mot session duoc tao ra thi ten cua no se duoc luu vao day\n\t\t$ssAppSessionList = new Zend_Session_Namespace('app-session-list');\n\t\t\n\t\t//----- duong dan cua controller\n\t\t$this->_currentController = '/' . $this->_arrParam['module'] .\n\t\t\t\t\t\t\t\t\t'/' . $this->_arrParam['controller'];\n\t\t\n\t\t//----- duong dan cua Action mac dinh\n\t\t$this->_actionMain = $this->_currentController . '/index';\n\t\t\n\t\t//----- thiet lap trang hien tai cho doi tuong phan trang\n\t\t$this->_paginator['currentPage'] = $this->_request->getParam('page',1);\n\t\t$this->_arrParam['paginator'] = $this->_paginator;\n\t\t\n\t\t//----- lay bien translate tu Registry\n\t\t$this->_translate = Zend_Registry::get('Zend_Translate');\n\t\t\n\t\t//----- tao bien session luu cac du lieu nhu filter, sort...\n\t\t$this->_namespace = $this->_arrParam['module'] .'-' .$this->_arrParam['controller'];\n\t\t$ssFilter = new Zend_Session_Namespace($this->_namespace);\n\t\t$ssAppSessionList->sessionList .= ':' .$this->_namespace;\n\t\t\n\t\tif (empty($ssFilter->col)) {\n\t\t\t//----- tu khoa tim kiem\n\t\t\t$ssFilter->keywords = '';\n\t\t\t//----- cot sap xep\n\t\t\t$ssFilter->col = 'p.id';\n\t\t\t//----- huong sap xep\n\t\t\t$ssFilter->order = 'DESC';\n\t\t}\n\t\t//----- dua cac gia tri trong session ssFilter vao mang tham so _arrParam\n\t\t$this->_arrParam['ssFilter']['keywords'] = $ssFilter->keywords;\n\t\t$this->_arrParam['ssFilter']['col'] = $ssFilter->col;\n\t\t$this->_arrParam['ssFilter']['order'] = $ssFilter->order;\n\t\t\n\t\t//----Set param cho model va truyen ra view\t\n\t\tif(isset( $ssFilter->price)&&!empty( $ssFilter->price)){\t\n\t\t\t$this->_arrParam['ssFilter']['price'] = $ssFilter->price;\n\t\t\t$this->view->priceFilter = $ssFilter->price;\n\t\t\t}\n\n\t\tif(isset( $ssFilter->filter_cate)&&!empty( $ssFilter->filter_cate)){\t\n\t\t\t$this->_arrParam['ssFilter']['filter_cate'] = $ssFilter->filter_cate;\n\t\t\t$this->view->cateFilter = $ssFilter->filter_cate;\n\t\t\t}\t\n\t\t\n\t\n\t\t//----- truyen ra view\n\t\t$this->view->arrParam = $this->_arrParam;\n\t\t$this->view->currentController = $this->_currentController;\n\t\t$this->view->actionMain = $this->_actionMain;\n\t\t\n\t\t$template_path = TEMPLATE_PATH . \"/cnt/system\";\n\t\t$this->loadTemplate($template_path,'template.ini','product');\n\t}", "title": "" }, { "docid": "9f218a794e04b35ac71b81ee2653c1f2", "score": "0.5370099", "text": "function beforeFilter() {\n\t\tparent::beforeFilter();\n\t\t$this->defaultFilter = array(\n\t\t\t'Ticket.filter' => 'pending'\n\t\t);\n\t}", "title": "" }, { "docid": "c6a6b1783236ebbe4340379302662784", "score": "0.5367272", "text": "function beforeFilter() {\n\n\t}", "title": "" }, { "docid": "289322b0e1e75efa874343eb1572fe61", "score": "0.53605145", "text": "function set_col_filter($col_filter) {\n $this->col_filter = $col_filter;\n }", "title": "" }, { "docid": "d59ec6ff6cbb20f6a9eab72834be5bee", "score": "0.5347992", "text": "public function setFilterSet(FilterSet $filterSet);", "title": "" }, { "docid": "b5c2770e77cc0abd5ae091f3daf3f6b8", "score": "0.5330906", "text": "function beforeFilter(){\r\n parent::beforeFilter();\r\n }", "title": "" }, { "docid": "d4988e0e071a978342ae02defd9f57d7", "score": "0.53251165", "text": "protected function register_filters() {}", "title": "" }, { "docid": "67a2d32324eab5880f03ac9a60b5428e", "score": "0.5324433", "text": "function beforeFilter() { $this->LdapAuth->allow('*'); Configure::write('debug', '0'); }", "title": "" }, { "docid": "e7e5e97b9390dafedb9c5b80bc162850", "score": "0.5319441", "text": "public function set_filter($filter, $db_field = '')\n\t{\n\t\t$this->_filters[$filter] = $db_field;\n\t}", "title": "" }, { "docid": "43ce145b5da3fd595f13c83ce2a376f4", "score": "0.53157026", "text": "public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t\t$this->Auth->allow('rnd');\n\t}", "title": "" }, { "docid": "e998ad4bb2c0edb5211db13b9bcbc945", "score": "0.5315666", "text": "function getAllInitFilter($a,$tabRel)\n {\n //$a['FILTER_SET']\n //pr($_SESSION['FILTERS']);\n if(isset($_SESSION['FILTERS'][$a['USE_TAB']][$tabRel['tab']]))\n {\n //pr($_SESSION['FILTERS'][$a['USE_TAB']][$tabRel['tab']]);\n $a['FILTER_SET'][$a['USE_TAB']][$tabRel['tab']]=$_SESSION['FILTERS'][$a['USE_TAB']][$tabRel['tab']];\n }\n \n \n return $a['FILTER_SET'];\n }", "title": "" }, { "docid": "afb807436c48b4b05bb8e2de8e22ffd3", "score": "0.5309753", "text": "public function enableFilters()\n {\n $this->runFilters = true;\n }", "title": "" }, { "docid": "63c5e991a268b00b5cd320fcdb56040f", "score": "0.5301143", "text": "public function setupFilters()\n {\n }", "title": "" }, { "docid": "f93502b17b4e7928e53edf82bb53da81", "score": "0.52961856", "text": "public function useFiltersAsInitialPopulation();", "title": "" }, { "docid": "bf301268762a4240e89d3e5fb2f5ced4", "score": "0.52930886", "text": "public static function setFilterParameters() {\n if(!Route::param('filter')) { return false; }\n $fil = Route::param('filter');\n $fil = explode(\"&\", $fil);\n $filter = Array();\n foreach($fil AS $g) {\n $g = urldecode($g);\n $g = strip_tags($g);\n $g = stripslashes($g);\n $g = trim($g);\n $s = explode(\"=\", $g);\n $filter[$s[0]] = explode(\",\", $s[1]);\n }\n conf::set('filter_array', $filter);\n return true;\n }", "title": "" }, { "docid": "719b59c728d464c0f6a5d4a07af9681f", "score": "0.5286953", "text": "final function _setSession($p,$v) {\n setSessionVar('mod'.$this->_moid.$p,$v);\n }", "title": "" }, { "docid": "463f7d27097164b5f73f5f4f54b2d0df", "score": "0.5284869", "text": "function yy_r56(){\r\n $this->_retvalue = $this->compiler->compileTag('setfilter',array(),array('modifier_list'=>array(array_merge(array($this->yystack[$this->yyidx + -1]->minor),$this->yystack[$this->yyidx + 0]->minor))));\r\n }", "title": "" }, { "docid": "a8efd13f646c81fbc1997f697710765b", "score": "0.52768165", "text": "protected function setFilter()\n {\n $db = $this->getDI()->get('db');\n $sortCriteria = $this->getUrlParam('filter');\n\n $where = '';\n $whereBinds = [];\n $having = '';\n\n foreach ($sortCriteria as $field => $value) {\n $col = $this->getColumn($field);\n if ($col->getType() == \"query\") {\n if ($where != \"\") {\n $where .= ' AND ';\n }\n $where .= $field . ' LIKE :' . $field . ':';\n $whereBinds[$field] = '%' . $value . '%';\n } else {\n if ($having != \"\") {\n $having .= ' AND ';\n }\n $having .= $field . ' LIKE ' . $db->escapeString('%' . $value . '%');\n }\n }\n\n if ($where != '') {\n $this->query->where($where, $whereBinds);\n }\n if ($having != '') {\n $this->query->having($having);\n }\n\n }", "title": "" }, { "docid": "43ade2299697fd051036f3497faea379", "score": "0.527043", "text": "protected function setupFilters()\n {\n //\n }", "title": "" }, { "docid": "43ade2299697fd051036f3497faea379", "score": "0.527043", "text": "protected function setupFilters()\n {\n //\n }", "title": "" }, { "docid": "bd148b547520efd4b78e482367f3449c", "score": "0.52615154", "text": "function beforeFilter() {\n\n parent::beforeFilter();\n\t$this->set('headerTitle', \"Report Management\");\n\t$this->set('activeTab', \"reports\");\n \n //Force SSL on all actions\n $this->Security->blackHoleCallback = 'forceSSL';\n $this->Security->validatePost = false;\n $this->Security->requireSecure();\n }", "title": "" }, { "docid": "d68e493e98a8c3a8283b51a095ab4abb", "score": "0.5257638", "text": "protected function filters(){\n\n }", "title": "" }, { "docid": "8bffd60908c08a6f3ad9684d9c06cb1a", "score": "0.5253396", "text": "public function init(){\n\t\t$this->_arrParam = $this->_request->getParams();\n\t\n\t\t//Duong dan cua Controller\n\t\t$this->_currentController = '/' . $this->_arrParam['module'] . '/' . $this->_arrParam['controller'];\n\t\n\t\t//Duong dan cua Action chinh\n\t\t$this->_actionMain = '/' . $this->_arrParam['module'] . '/'\t. $this->_arrParam['controller'] . '/edit';\t\n\t\n\t\t//Luu cac du lieu filter vaof SESSION\n\t\t//Dat ten SESSION\n\t\t$this->_namespace = $this->_arrParam['module'] . '-' . $this->_arrParam['controller'];\n\t\t$ssFilter = new Zend_Session_Namespace($this->_namespace);\n\t\t\n\t\t//$ssFilter->unsetAll();\n\t\t/* if(empty($ssFilter->col)){\n\t\t\t$ssFilter->keywords = '';\n\t\t} */\n\t\t$this->_arrParam['ssFilter']['keywords'] \t= $ssFilter->keywords;\n\t\t$this->_arrParam['ssFilter']['parents'] \t= $ssFilter->parents;\n\t\tif(empty($ssFilter->lang_code)){\n\t\t\t$language = new Zend_Session_Namespace('language');\n\t\t\t$this->_arrParam['ssFilter']['lang_code'] = $language->lang;\n\t\t}else{\n\t\t\t$this->_arrParam['ssFilter']['lang_code'] \t= $ssFilter->lang_code;\n\t\t}\n\n\t\t//Trang hien tai\n\t\tif(isset($this->_arrParam['type_menu'])){\n\t\t\t$this->_type = '/type_menu/' . $this->_arrParam['type_menu'];\n\t\t}\n\t\n\t\t//Truyen ra ngoai view\n\t\t$this->view->arrParam = $this->_arrParam;\n\t\t$this->view->currentController = $this->_currentController;\n\t\t$this->view->actionMain = $this->_actionMain;\n\t\n\t\t$siteConfig = Zend_Registry::get('siteConfig');\n\t\t$template_path = TEMPLATE_PATH . \"/admin/\" . $siteConfig['template']['admin'];\n\t\t$this->loadTemplate($template_path, 'template.ini', 'template');\n\t}", "title": "" }, { "docid": "3d203a12322741779854868e6b50aab5", "score": "0.52523863", "text": "function yy_r57(){\r\n $this->_retvalue = $this->compiler->compileTag('setfilter',array(),array('modifier_list'=>array_merge(array(array_merge(array($this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -1]->minor)),$this->yystack[$this->yyidx + 0]->minor)));\r\n }", "title": "" }, { "docid": "e1cd671b18bf15523428bf4f25f26fbe", "score": "0.5241092", "text": "public function initFilters() \r\n { \r\n if ($this->config == null) {\r\n return ;\r\n }\r\n \r\n $filters = $this->config->getAsList('filter');\r\n \r\n foreach ($filters as $filter) {\r\n\t\t\t$this->configureFilter($filter);\r\n }\r\n \r\n //$this->out($this->config);\r\n }", "title": "" }, { "docid": "771bce6e73559cda387bbc7ca0939d7b", "score": "0.52336174", "text": "function beforeFilter() {\n\t\tparent::beforeFilter();\n\t}", "title": "" }, { "docid": "e492e22376e77edd8699c04bec071394", "score": "0.5230785", "text": "public function admin_add_filters() {\n\t\t\n\t}", "title": "" }, { "docid": "6a87183c5993e4009dd29723f6882577", "score": "0.5216378", "text": "public function _initModule()\n {\n // Create new cache\n $cache = Cache::getInstance(APPLICATION);\n\n CoreOptions::initOrUpdateCacheOptions();\n\n // Load module\n $registerModules = $cache->get(self::APPLICATION_CACHE_MODULES);\n if($registerModules === null) {\n /**\n * @var \\Phalcon\\Db\\Adapter\\Pdo\\Postgresql $db\n */\n $db = $this->getDI()->get('db');\n $query = 'SELECT base_name, class_name, path FROM core_modules WHERE published = 1';\n $modules = $db->fetchAll($query);\n $registerModules = [];\n foreach($modules as $module) {\n $registerModules[$module['base_name']] = [\n 'className' => $module['class_name'],\n 'path' => APP_PATH . '/modules' . $module['path']\n ];\n }\n $cache->save(self::APPLICATION_CACHE_MODULES, $registerModules);\n }\n $this->registerModules($registerModules);\n }", "title": "" }, { "docid": "6997a4558ca7046f80c6131b8698c7be", "score": "0.5206398", "text": "function bbp_setup_user_option_filters()\n{\n}", "title": "" }, { "docid": "738ed9cc571223d5c1add275705034e5", "score": "0.5201277", "text": "function beforeFilter()\r\n {\r\n $this->checkSession();\r\n $this->set('content_list', $this->Volume->findAllThreaded());\r\n\t\t$user = $this->Session->read(\"User\");\r\n\t\tif(isset($user['profile'])){\r\n\t\t\t$this->set('user_profile', $user['profile']);\r\n\t\t}else{\r\n\t\t\t$this->set('user_profile', \"\");\r\n\t\t}\r\n //no other setting as this should never use the default layout\r\n }", "title": "" }, { "docid": "32453e535675a63209230bbdbb4bd8e1", "score": "0.5192976", "text": "public function beforeFilter() {\r\n\r\n parent::beforeFilter();\r\n \r\n// $this->UserAccessRight->checkAuthorization('isAllowedUserModule', $this->_getCurrentUserId(), 'view');\r\n \r\n $this->_setSidebarActiveItem('users');\r\n \r\n }", "title": "" }, { "docid": "c56d7ed2779adc6c3de71f325fc084cd", "score": "0.51927304", "text": "public function setFilter(AbstractFilter $filter)\n {\n return $this->setParam('filter', $filter);\n }", "title": "" }, { "docid": "a09058cabe7c2cc4167eba2785f70234", "score": "0.51868033", "text": "function beforeFilter() {\t\r\n\t\r\n\t\tparent::beforeFilter();\r\n\t\t$this->Auth->allow('search');\t\r\n\t\r\n\t}", "title": "" }, { "docid": "9cc98134d42913013d5e3b00f4d537a4", "score": "0.5181647", "text": "function filter($filter)\r\n\t{\r\n\t\t$this->filter = $filter;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "0e18770c261552dd018308af03cbc7ff", "score": "0.518087", "text": "private function _set_session() {\n $this->actual = $this->untrusted;\n $this->__data__ = $this->remote_storage->__array__();\n }", "title": "" }, { "docid": "03bb04aaebd278e3e2d633733dc7ba4e", "score": "0.51745", "text": "function beforeFilter() {\n\t\t$allow = array('getCities','title365API','testApi','brokerStartup','investorStartup','investorStep3','registrationStartup','shortAppStartup','registerStep2','registerStep3','shortAppStep2','shortAppStep3','shortAppStep4','shortAppStep5','login','index','social_login','social_endpoint','shortApp','logout','register','thankyou_message','shortApp','short_app_notification','shortapp_message','onlineLoanApplication','successfulHybridauth','fetch_all_users','borrowerLogin','test','investor','investor_login','investor_register','getSavedCommission','forgot_password','create_pdf_document','managerStartup','managerStep3');\n\t\tparent::beforeFilter();\n\t\t$this->checkUserSession($allow);\n\t}", "title": "" }, { "docid": "aeaa0039aaff8216327c4ff1ab0bf654", "score": "0.51743233", "text": "function beforeFilter()\n {\n parent::beforeFilter();\n }", "title": "" }, { "docid": "c7ec92a1d91b5ae07f56d3c1e0746b87", "score": "0.5170739", "text": "public function addFilter($filter)\n\t{\n\t\t$this->filters->addFilter($filter);\n\t}", "title": "" }, { "docid": "2256fcbf35586257ea30aa2bd89ebd8b", "score": "0.5164879", "text": "function beforeFilter() {\n\t\t/*\n\t\t * Production setup.\n\t\t */\n\t\tparent::beforeFilter();\n\n\t\t$this->Auth->allow(array('logout','login','registration','confirm','received'));\n\t\t$this->Auth->userScope = array(\n\t 'User.active' => array(\n\t 'expected' => 1,\n\t 'message' => __(\"Your account is not active yet. Click the Link in our Mail.\", true)\n\t )\n\t );\n\n\t\t/*\n\t\t * End Production setup.\n\t\t */\n\n\t\t//$this->Auth->allow('*');\n\t}", "title": "" }, { "docid": "40f0b54c1ed8eed1f3676ca2a70c59a1", "score": "0.5162818", "text": "function beforeFilter() {\n\t$this->Session->write('Config.language', 'fi');\n\n\t//die(pr($this->Session->read()));\n\t //Configure AuthComponent\n\t$this->Auth->authorize = 'controller';\n\t//$this->Auth->actionPath = 'controllers/';\n\n\t$this->Auth->loginAction = \"/users/login\";\n\n\t$this->Auth->logoutRedirect = \"/\";\n\t$this->Auth->loginRedirect = \"/full_calendar\";\n\t$this->Auth->authError = __('Access denied', true);\n\n\t//die($this->Auth->password('iddqd'));\n\n\n\t//$this->Auth->allow('*');\n\t//$this->Auth->allow('pages');\n\n}", "title": "" }, { "docid": "ba1272618dbe857d5f33766e748f89a0", "score": "0.5142619", "text": "function beforeFilter () {\r\n\t \tparent::beforeFilter();\r\n\t\t\r\n\t\t$this->Auth->allow('*');\r\n\t}", "title": "" }, { "docid": "1632c5d21c092dfc708f75cfa950eb45", "score": "0.5130165", "text": "public function loadModule()\n {\n /**\n * Initial retrieval of the saved cache.\n */\n $this->cache = get_option( 'sprout_logged_errors' );\n\n add_action( 'shutdown', [$this, 'updateCache'], 999 );\n }", "title": "" }, { "docid": "ffb0fa1f2e0fb534b531aa19b48006ca", "score": "0.5125554", "text": "public function init()\n {\n $this->setIpWhiteList($this->ipWhiteList);\n\n $session = new CHttpSession();\n\n if ($this->accessControl()) {\n\n $session['cookie_modelName_user'] = $this->modelNameUser;\n $session['cookie_fieldName_user'] = $this->fieldNameUser;\n $session['cookie_fieldId_user'] = $this->fieldIdUser;\n $session['access'] = true;\n\n $this->viewWidget();\n\n } else {\n\n unset(\n $session['access'],\n $session['cookie_modelName_user'],\n $session['cookie_fieldName_user'],\n $session['cookie_fieldId_user']\n );\n\n }\n }", "title": "" } ]
694a2a01e2301cd7ae4f9d2f2c5e1ac7
Change the autorenew state of the given domain. When autorenew is enabled, the domain will be extended.
[ { "docid": "8cf4cd91fb9d0ebbe69c52f8b641d824", "score": "0.72353804", "text": "function setDomainAutoRenew($domain, $autorenew = true) {\r\n\r\n\t\t$settings = array();\r\n\t\t$settings['auto_renew'] = $autorenew;\r\n\r\n\t\t$response = $this->request('POST', '/domains/'.$domain.'/update', $settings);\r\n\r\n\t\t\tif($response['error'])\r\n\t\t\t{\r\n\t\t\t\t$this->Error[] = $response['error']['message'];\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t}", "title": "" } ]
[ { "docid": "1771f31170c25e066e89fd8d344a3d75", "score": "0.62245965", "text": "public function changeDomain( $domain )\n\t{\n\t\t$this->__construct( $domain );\n\t}", "title": "" }, { "docid": "c91df2bdbb8ef36d43823ffea00d2f4f", "score": "0.5977194", "text": "abstract public function renew_domain($domain, $years);", "title": "" }, { "docid": "01e6ca8b9e0cf8c20fde787a4d2542e3", "score": "0.5935609", "text": "public function renewAllDomain();", "title": "" }, { "docid": "5f5731024facb6f0c00555f04f307a4c", "score": "0.570166", "text": "public function updateDomainConfiguration(pm_Domain $domain) { }", "title": "" }, { "docid": "9e3152b1c4149c3ee14b6be7d139e2f7", "score": "0.5151575", "text": "function extendDomain($domain, $nyears) {\r\n\r\n\t\t$data = array(\r\n\t\t\t'years' => $nyears\r\n\t\t);\r\n\r\n\t\t$response = $this->request('POST', '/domains/'.$domain, $data);\r\n\r\n\t\t\tif($response['error'])\r\n\t\t{\r\n\t\t\t$this->Error[] = $response['error']['message'];\r\n\t\t return false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n \t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "59ea27648bd54e53e947df455c6893c5", "score": "0.50160533", "text": "function editdomain()\n\t{\n\n\t\tglobal $domainname, $_insert, $status;\n\t\t$this->getVariable(array('domainname', '_insert', 'status'));\n\n\t\t$domainname = $this->chooseDomain(__FUNCTION__, $domainname);\n\t\t$domaininfo = $this->getDomainInfo($domainname);\n\t\t$success = True;\n\n\t\tif (!$_insert) {\n\t\t\t$inputparams = array(\n\t\t\t\tarray('status', 'select', 'secenekler' => $this->statusActivePassive, 'default' => $domaininfo['status'], 'lefttext' => 'Status'),\n\t\t\t\tarray('domainname', 'hidden', 'default' => $domainname),\n\t\t\t\tarray('op', 'hidden', 'default' => __FUNCTION__)\n\t\t\t);\n\n\t\t\t$this->output .= inputform5($inputparams);\n\n\t\t} else { # editpaneluser icinde active/passive yapilmasi lazim. kullanici aktiflestirmede, eger tek domaini varsa, paneluser'ini da aktiflestirmek lazim.\n\t\t\t$filt = $this->applyGlobalFilter(\"domainname='$domainname'\");\n\t\t\t$domaininfo = $this->getDomainInfo($domainname);\n\t\t\t$domainpaneluser = $domaininfo['panelusername'];\n\t\t\t$domainsayisi = $this->recordcount(\"domains\", \"panelusername='$domainpaneluser'\"); # bu paneluser'in kac tane domaini var ? howmany domains this paneluser has?\n\n\t\t\t$this->debugtext(\"filter: $filt\");\n\t\t\t$success = $this->executeQuery(\"update \" . $this->conf['domainstable']['tablename'] . \" set status='$status',reseller='\" . $this->activeuser . \"' where $filt\");\n\t\t\tif ($domainsayisi == 1)\n\t\t\t\t$success = $this->executeQuery(\"update panelusers set status='$status' where panelusername='$domainpaneluser' and reseller='\" . $this->activeuser . \"'\");\n\n\t\t\t$success = $success && $this->addDaemonOp(\"syncdomains\", 'xx', $domainname, '', 'sync domains');\n\t\t\treturn $this->ok_err_text($success, 'Domain status was successfully updated.', 'Unable to update domain status.');\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "167d157ee6d89bba7ac44b2987a6d2f4", "score": "0.49790698", "text": "function niclv_RenewDomain($params)\n{\n \n // user defined configuration values\n $userIdentifier = $params['APIUsername'];\n $apiKey = $params['APIKey'];\n $testMode = $params['TestMode'];\n $accountMode = $params['AccountMode'];\n $emailPreference = $params['EmailPreference'];\n\n // registration parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n $registrationPeriod = $params['regperiod'];\n\n // domain addon purchase status\n $enableDnsManagement = (bool) $params['dnsmanagement'];\n $enableEmailForwarding = (bool) $params['emailforwarding'];\n $enableIdProtection = (bool) $params['idprotection'];\n\n /**\n * Premium domain parameters.\n *\n * Premium domains enabled informs you if the admin user has enabled\n * the selling of premium domain names. If this domain is a premium name,\n * `premiumCost` will contain the cost price retrieved at the time of\n * the order being placed. A premium renewal should only be processed\n * if the cost price now matches that previously fetched amount.\n */\n $premiumDomainsEnabled = (bool) $params['premiumEnabled'];\n $premiumDomainsCost = $params['premiumCost'];\n\n // Build post data.\n $postfields = array(\n 'username' => $userIdentifier,\n 'password' => $apiKey,\n 'testmode' => $testMode,\n 'domain' => $sld . '.' . $tld,\n 'years' => $registrationPeriod,\n 'dnsmanagement' => $enableDnsManagement,\n 'emailforwarding' => $enableEmailForwarding,\n 'idprotection' => $enableIdProtection,\n );\n\n try {\n $api = new ApiClient();\n $api->call('Renew', $postfields);\n\n return array(\n 'success' => true,\n );\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "title": "" }, { "docid": "1162875e02615ae4bff73c55ddd2b8c6", "score": "0.49673793", "text": "public function renewDomain(array $params)\n {\n $renew_params = array(\n 'order-id' => $params['orderid'],\n 'years' => $params['years'],\n 'exp-date' => $params['exp-date'],\n 'invoice-option' => 'NoInvoice'\n );\n\n return $this->post('/domains/renew.json', $renew_params);\n }", "title": "" }, { "docid": "1a8f1fe03e32b5f0192b52ae7957f58b", "score": "0.4966375", "text": "public function setDomain($domain, $default = true);", "title": "" }, { "docid": "6d87f2128f6a158d121165c54cc4aba5", "score": "0.49622753", "text": "public function setDomain($domain) {\n\t\t$this->domain = $domain;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6d87f2128f6a158d121165c54cc4aba5", "score": "0.49622753", "text": "public function setDomain($domain) {\n\t\t$this->domain = $domain;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7fc28d69f1dd0b660cb5ffe41398eb0f", "score": "0.49485624", "text": "public function reopen() {\n\t\t$this->date_closed = null;\n\t\t$this->status = 'open';\n\n\t\telgg_trigger_event('reopen', 'object', $this);\n\t}", "title": "" }, { "docid": "f44cb331ee15e353da464789cbcd2ea3", "score": "0.49215594", "text": "public function setRecurringEnabled($RecurringEnabled)\n {\n $this->getOriginalInstance()->RecurringEnabled = $RecurringEnabled;\n $this->notify(); // update observers\n }", "title": "" }, { "docid": "bc11010f479e78efa22f466e813fa569", "score": "0.49194723", "text": "public function setDomain($domain) {\n\t\t$this->domain = $domain;\n\t}", "title": "" }, { "docid": "99f946615a06bd0d17fcb3b89c9021a5", "score": "0.49174875", "text": "public function setDomain ($domain)\n {\n $this->domain = $domain;\n }", "title": "" }, { "docid": "ae85fd49a62ec0244c814821f3b212ba", "score": "0.48497424", "text": "public function Revive(Domain $Domain, $PropertyValue, $Entity);", "title": "" }, { "docid": "2a5ea3da3977e1cc02d77455c3f6401d", "score": "0.48454306", "text": "function updateDomainDefinition ($domain, $domainValues)\n {\n if (!$domain)\n v4b_exit ('Invalid domain passed to DomainUtil::updateDomainDefinition ...');\n\n pnModDBInfoLoad ('v4bEdm', 'v4bEdm');\n\n $dom_id = $domain['id'];\n if ($dom_id)\n DBUtil::updateObject ($domain, 'v4b_edm_domain');\n else\n DBUtil::insertObject ($domain, 'v4b_edm_domain');\n\n return true;\n }", "title": "" }, { "docid": "6775152b9fc20a714197021a51309073", "score": "0.48410738", "text": "public function reactivate($autosave = false) {\n if ($this->is_active()) return true;\n\n // 'd' things are kept just for historical purposes\n if ($this->is_deleted()) return false;\n\n $this->state = 'a';\n $this->expired = null;\n\n if (($autosave) && (! $this->save_i(['expired', 'state'])))\n return false;\n\n return $this->update_state($autosave);\n }", "title": "" }, { "docid": "c36ca5bbd91a4c1a31ce85902bd6a1e9", "score": "0.4840989", "text": "public function setDomain(Domain $domain)\n {\n $this->domain = $domain;\n }", "title": "" }, { "docid": "9ba1be88d98db51afd9109b1cffeb6c8", "score": "0.48367453", "text": "public function setDomain($domain) {\n $this->domain = $domain;\n }", "title": "" }, { "docid": "9ecea448b4ab1edca4d1ac1336433b7c", "score": "0.48360848", "text": "function useDomain($domain) {\n $this->domain = $domain;\n return $this->domain;\n }", "title": "" }, { "docid": "5dafc59fab3d2a90beb85de0392833d7", "score": "0.48323485", "text": "public function reactivate()\n {\n $this->forge->reactivateToServer($this->id);\n }", "title": "" }, { "docid": "14018cc180c24af66c92fdd25944569f", "score": "0.48277324", "text": "public function resecureForNewDomain($oldDomain, $domain)\n {\n if (!$this->files->exists($this->certificatesPath())) {\n return;\n }\n\n $secured = $this->secured();\n\n foreach ($secured as $oldUrl) {\n $newUrl = str_replace('.'.$oldDomain, '.'.$domain, $oldUrl);\n $nginxConf = $this->getNginxConf($oldUrl);\n if ($nginxConf) {\n $nginxConf = str_replace($oldUrl, $newUrl, $nginxConf);\n }\n\n $this->unsecure($oldUrl);\n\n $this->secure(\n $newUrl,\n $nginxConf\n );\n }\n }", "title": "" }, { "docid": "559953252bfe9d60db7f32a9df6987a8", "score": "0.48207298", "text": "public function setDomain($domain)\n {\n $this->domain = $domain;\n }", "title": "" }, { "docid": "02a8b3f2189279ae1a35d32de2d3940b", "score": "0.4819144", "text": "public function apply(DomainEvent $domainEvent): void;", "title": "" }, { "docid": "05b373867f6ac0a4e8eb9601446f071a", "score": "0.48071277", "text": "public function renew(){\n }", "title": "" }, { "docid": "84bb316484186b3cd7153dd8772f325d", "score": "0.47705105", "text": "public function setDomain($domain)\n {\n $this->domain = $domain;\n\n return $this;\n }", "title": "" }, { "docid": "84bb316484186b3cd7153dd8772f325d", "score": "0.47705105", "text": "public function setDomain($domain)\n {\n $this->domain = $domain;\n\n return $this;\n }", "title": "" }, { "docid": "84bb316484186b3cd7153dd8772f325d", "score": "0.47705105", "text": "public function setDomain($domain)\n {\n $this->domain = $domain;\n\n return $this;\n }", "title": "" }, { "docid": "ab7b055b460f4fce29892c293047b2d4", "score": "0.47649872", "text": "public function setLdapDomain($domain);", "title": "" }, { "docid": "31187c49b2f64b757c992280d0fa9821", "score": "0.4725836", "text": "public function setDomain(string $domain)\n {\n $this->domain = $domain;\n return $this;\n }", "title": "" }, { "docid": "061adaaaf061f84f71de9ed9d0ebd92b", "score": "0.4695214", "text": "public function setDomain(string $domain): void\n {\n $this->domain = $domain;\n }", "title": "" }, { "docid": "2248a63753e3986e06b4e53244d2ba68", "score": "0.46608236", "text": "public function reactivate() {\n\n $userid = $this->session->userdata('aileenuser');\n $data = array(\n 'status' => '1',\n 'modified_date' => date('y-m-d h:i:s')\n );\n $data1 = array(\n 'status' => '1',\n 'modify_date' => date('y-m-d h:i:s')\n );\n\n $updatdata = $this->common->update_data($data, 'freelancer_hire_reg', 'user_id', $userid);\n $update = $this->common->update_data($data1, 'freelancer_post', 'user_id', $userid);\n if ($update && $updatdata) {\n\n redirect('freelance-hire/home', refresh);\n } else {\n\n redirect('freelancer_hire/reactivate', refresh);\n }\n }", "title": "" }, { "docid": "fda5fe448a51cdf944ef1fbc4e34f02b", "score": "0.46549675", "text": "public function setAutore($autore)\n {\n \t$this->autore=$autore;\n }", "title": "" }, { "docid": "1447a14035eab19a04f3b3ea76de4ec1", "score": "0.46444967", "text": "public function setDomain(string $domain)\n {\n $this->domain = $domain;\n\n return $this;\n }", "title": "" }, { "docid": "df6a1c7c594aaf821b1a5283c4c9aeb1", "score": "0.46305078", "text": "private function _setFullDomain()\r\n {\r\n $this->full_domain .= $_SERVER['HTTP_HOST'];\r\n }", "title": "" }, { "docid": "3ee47cc9d1994008bcc695e3c7f84655", "score": "0.46277145", "text": "public function setDomainName($domain)\n {\n $domain = strtolower($domain);\n\n $this->domain = $domain;\n }", "title": "" }, { "docid": "df2e24d2007ea34d9fb1167eae16f842", "score": "0.45946023", "text": "public function setResearchdomain($research_domain)\n {\n $this->research_domain = $research_domain;\n }", "title": "" }, { "docid": "2da74d7addbba73683672f238af951fc", "score": "0.45853645", "text": "public function reconfigure()\n {\n }", "title": "" }, { "docid": "72d3d6e7220c0a8990c0fee9680d8914", "score": "0.4553033", "text": "public function changeSettingsForGroup($group, $newSettings, $domain, $realName)\n {\n $cli = Modules_Communigate_Custom_Accounts::ConnectToCG();\n\n $settings = $cli->GetGroup($group);\n \n foreach ($settings as $setting => $enabled) {\n if (is_array($newSettings) && in_array($setting, $newSettings)) {\n $settings[$setting] = 'YES';\n } else {\n $settings[$setting] = 'NO';\n }\n }\n\n $settings['RealName'] = $realName;\n\n $cli->SetGroup($group, $settings);\n\n $cli->Logout();\n }", "title": "" }, { "docid": "1c75eec747cbd99a283e56a5474d3888", "score": "0.45467016", "text": "public function applyIfAccepts(DomainEvent $domainEvent): void;", "title": "" }, { "docid": "18889f918ae4f4ff95e5a8514cecfaa9", "score": "0.45250288", "text": "public function Renew($name, $curexpdate, $period) {\n\t\t// As this is a command, add the element.\n\t\t$this->_command();\n\n\t\t$renew = $this->command->appendChild($this->document->createElement('renew'));\n\n\t\t$domainrenew = $renew->appendChild($this->document->createElementNS(XSCHEMA_DOMAIN, 'domain:renew')); \n\t\t$domainrenew->appendChild($this->setAttribute('xsi:schemaLocation', XSCHEMA_DOMAIN.' domain-1.0.xsd'));\n\n\t\t$domainrenew->appendChild($this->document->createElementNS(XSCHEMA_DOMAIN, 'name', $name));\n\t\t$domainrenew->appendChild($this->document->createElementNS(XSCHEMA_DOMAIN, 'curExpDate', $curexpdate));\n\t\t$period = $domainrenew->appendChild($this->document->createElementNS(XSCHEMA_DOMAIN, 'period', $period));\n\t\t$period->appendChild($this->setAttribute('unit', 'm'));\n\n\t\t// Add transactionId to this frame\n\t\t$this->_transaction();\n\t}", "title": "" }, { "docid": "8ca09540684b715ec2d93931a6120e07", "score": "0.4524725", "text": "function lockDomain($domain, $lock = true) {\r\n\r\n\t\t$settings = array();\r\n\t\t$settings['lock'] = $lock;\r\n\r\n\t\t$response = $this->request('POST', '/domains/'.$domain.'/update', $settings);\r\n\r\n\t\tif($response['error'])\r\n\t\t{\r\n\t\t\t$this->Error[] = $response['error']['message'];\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4c58c12914ec71e19695a538db38cdd0", "score": "0.45234048", "text": "private function markRequestAsRevised(): void\n {\n $this->requestIsRevised = true;\n }", "title": "" }, { "docid": "ff505e35890ad088e63ff67cc4adb888", "score": "0.45197272", "text": "public function setAdditionalDomain(Domain $domain)\n {\n $this->additionalDomains->add($domain);\n }", "title": "" }, { "docid": "ecdacb400032b423b6a48b317beb9c43", "score": "0.4504663", "text": "public function changeActive()\r\n\t{\r\n\t\t$this->active = 1 - $this->active;\r\n\t\t$this->save();\r\n\t}", "title": "" }, { "docid": "366dafa2c5743d89375b1172410aa322", "score": "0.4482632", "text": "function set_anrede ($new_anrede){\n $this->anrede = $new_anrede;\n }", "title": "" }, { "docid": "3204cac2dedca7b37291fefa9cf0af61", "score": "0.44540927", "text": "public function setIsRepay($is_repay)\n {\n $this->is_repay = $is_repay;\n\n return $this;\n }", "title": "" }, { "docid": "4ae5ff3ff75103925392e7d6149d1c04", "score": "0.44376412", "text": "public function setProxyRevalidate($revalidate = true){\n if(!$revalidate){\n $this->removeCacheControl('proxy-revalidate');\n }else{\n $this->addCacheControl('proxy-revalidate');\n }\n }", "title": "" }, { "docid": "07cc61498ecba42bd19b4408735174f7", "score": "0.4420398", "text": "public function setAutomaticRepliesSetting($val)\n {\n $this->_propDict[\"automaticRepliesSetting\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "b9823cb7741f6eb2c5ddb13f7e94e770", "score": "0.4412019", "text": "public function changeDomainAction()\n {\n $this->tag->setTitle('修改个人域名');\n\n $usersId = $this->session->get('identity');\n\n if (!$usersId) {\n $this->response->redirect();\n return;\n }\n\n $user = Users::findFirstById($usersId);\n\n if (!$user) {\n $this->flashSession->error('The user does not exist');\n return $this->response->redirect();\n }\n\n $form = new ChangeDomainForm();\n $change = ChangesLogin::findFirstByUsersId($user->id);\n\n if ($this->request->isPost()) {\n\n if (!$form->isValid($this->request->getPost())) {\n\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $login = $this->request->getPost('login');\n\n $passValidate = true;\n\n // Can't contain non english characters\n if (preg_match(\"/[^a-zA-Z0-9-]/i\", $login)) {\n $this->flash->error('不能使用英文字母、数字和-之外的字符');\n $passValidate = false;\n }\n\n if ($passValidate) {\n $user->login = $login;\n\n if (!$change) {\n $loginChange = new ChangesLogin();\n $loginChange->user = $user;\n $loginChange->ipAddress = $this->request->getClientAddress();\n $loginChange->userAgent = $this->request->getUserAgent();\n $loginChange->modifiedAt = time();\n } else {\n $loginChange = $change;\n $loginChange->user = $user;\n }\n\n if (!$loginChange->save()) {\n $this->flash->error($loginChange->getMessages());\n } else {\n $this->session->set('identity-login', $user->login);\n $this->flashSession->success('域名修改成功');\n return $this->response->redirect('account/changeDomain');\n }\n }\n }\n }\n\n if ($change) {\n $days = HumanTime::diffDays($change->modifiedAt);\n } else {\n $days = -1;\n }\n\n $this->setUserStats($user);\n\n $this->view->setVars([\n 'user' => $user,\n 'days' => $days\n ]);\n\n $this->view->form = $form;\n }", "title": "" }, { "docid": "cc2747676b0eef1fa5fb09d094a014fa", "score": "0.4400474", "text": "function setDefaultAddress($address)\n\t{\n\t\t$data['domain'] = $this->domain;\n\t\t$data['forward'] = $address;\n\t\t$response = $this->HTTP->getData('mail/dosetdef.html', $data);\n\t\tif(strpos($response, 'is now'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "bcbe19dfc2348b8f6415d8b58a027579", "score": "0.4389", "text": "public function setDomainApp($domainApp) {\n $this->domainApp = $domainApp;\n return $this;\n }", "title": "" }, { "docid": "fda9c91eca8a192792fd5dd0e840527c", "score": "0.43878356", "text": "public function testDomainConfigOverriderFromSettings() {\n // Set up overrides.\n $settings = [];\n $settings['config']['domain.config.one_example_com.en.system.site']['name'] = (object) [\n 'value' => 'First',\n 'required' => TRUE,\n ];\n $settings['config']['domain.config.four_example_com.system.site']['name'] = (object) [\n 'value' => 'Four overridden in settings',\n 'required' => TRUE,\n ];\n $this->writeSettings($settings);\n\n // Create five new domains programmatically.\n $this->domainCreateTestDomains(5);\n $domains = \\Drupal::entityTypeManager()->getStorage('domain')->loadMultiple(['one_example_com', 'four_example_com']);\n\n $domain_one = $domains['one_example_com'];\n $this->drupalGet($domain_one->getPath() . 'user/login');\n $this->assertRaw('<title>Log in | First</title>', 'Found overridden slogan for one.example.com.');\n\n $domain_four = $domains['four_example_com'];\n $this->drupalGet($domain_four->getPath() . 'user/login');\n $this->assertRaw('<title>Log in | Four overridden in settings</title>', 'Found overridden slogan for four.example.com.');\n }", "title": "" }, { "docid": "246d6efee9568e16423275f1f2159d70", "score": "0.43860036", "text": "public function reactivate() {\n\n $userid = $this->session->userdata('aileenuser');\n $data = array(\n 'status' => 1,\n 'modified_date' => date('y-m-d h:i:s')\n );\n\n $updatdata = $this->common->update_data($data, 'job_reg', 'user_id', $userid);\n if ($updatdata) {\n\n redirect('job/job_all_post', refresh);\n } else {\n\n redirect('job/reactivate', refresh);\n }\n }", "title": "" }, { "docid": "63b234d07b4e4146b8ed9c2c75011b10", "score": "0.43856096", "text": "public function updateDomain($domainId, $oldName, $newName);", "title": "" }, { "docid": "809c0de9acd81fa758de929ef00f1850", "score": "0.4384493", "text": "public function change_address(){\n\t\t\t\t$this->settings_model->change_address();\n\t\t\t\t//echo 'You have successfully changed your address! You are being redirected to home.';\n\t\t\t\t//header('refresh:3000;url='.$this->go_home()); //redirect to home with delay\n \t\t\t\tredirect('main/welcome','refresh');\t\n\t\t\n\t\t}", "title": "" }, { "docid": "e4a4e938e175a0421d8e63accbeed402", "score": "0.43752447", "text": "public function reassignToAgency(AgencyID $agency_id) {\n $modificated = clone $this;\n $modificated->library_code = (string) $agency_id;\n\n return $modificated;\n }", "title": "" }, { "docid": "782d0c0dc5225badeaec82548b0e2720", "score": "0.43627402", "text": "public function auto_replace($bool) {\n $this->get_auto_replace = $bool;\n return $this;\n }", "title": "" }, { "docid": "c5f586ba112299b88d918c27dc102515", "score": "0.43502173", "text": "public static function setDefaultDomain($sourceid, $domain) {\n self::$authsources[\"$sourceid\"]['defaultdomain'] = $domain;\n }", "title": "" }, { "docid": "815b373ff81ffc76ae9a868118b7e925", "score": "0.43176484", "text": "public function setDomain($domain): void\n {\n if (!is_string($domain) && null !== $domain) {\n trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);\n }\n\n $this->data['Domain'] = null === $domain ? null : (string) $domain;\n }", "title": "" }, { "docid": "c923be780978d9d1ece11199fe9fecc8", "score": "0.43062788", "text": "public function domain( $theDomain = NULL, $getOld = FALSE )\n\t{\n\t\t//\n\t\t// Return current domain.\n\t\t//\n\t\tif( $theDomain === NULL )\n\t\t\treturn $this->mDomain;\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\t\t\n\t\t//\n\t\t// Save current format.\n\t\t//\n\t\t$save = $this->mDomain;\n\t\t\n\t\t//\n\t\t// Cache domain.\n\t\t//\n\t\t$this->cacheTerm(\n\t\t\t$this->mIterator->collection()->dictionary(),\n\t\t\t$this->mCache,\n\t\t\t$theDomain );\n\t\t\n\t\t//\n\t\t// Set data member.\n\t\t//\n\t\t$this->mDomain = & $this->mCache[ Term::kSEQ_NAME ][ $theDomain ];\n\t\n\t\t//\n\t\t// Reset processed flag.\n\t\t//\n\t\t$this->mProcessed = FALSE;\n\t\n\t\t//\n\t\t// Reset serialised data.\n\t\t//\n\t\t$this->mData = Array();\n\t\t\n\t\tif( $getOld\t)\n\t\t\treturn $save;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\t\n\t\treturn $this->mDomain;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\t\n\t}", "title": "" }, { "docid": "60673e221e906a5d4f833c419c8d79ed", "score": "0.43012637", "text": "public function setChangefreq($changefreq) {\n\t\t$this->changefreqDefault =\n\t\t\tin_array($changefreq, ['always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never'])\n\t\t\t? $changefreq\n\t\t\t: 'daily';\n\t\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c5e1a96b4493dcb58c12727ac300250d", "score": "0.42767918", "text": "public function setExactDomain(bool $exact = true)\n {\n $url = $this->url;\n\n // Its a kind of magic from legacy code.\n $host = parse_url(\"http://\" . $url, PHP_URL_HOST);\n\n if ($url == $host && $exact) {\n $url = $url . \"/\";\n } elseif ($url != $host && !$exact) {\n $url = parse_url('http://' . $url, PHP_URL_HOST);\n }\n\n if ($url == $host) {\n $url = parse_url(\"http://\" . $url, PHP_URL_HOST);\n }\n $this->url = $url;\n\n return $this;\n }", "title": "" }, { "docid": "f1dbc4f8fafd1d971059b5a964252567", "score": "0.4274325", "text": "public function setDomain($domainIn) {\n $sessionIdentifier = get_cookie('s');\n $this->db->set('domain', $domainIn);\n $this->db->where(array('session_identifier' => $sessionIdentifier));\n $this->db->update('users');\n }", "title": "" }, { "docid": "bc3c9fc9378bc4b8fb4d522112c36c67", "score": "0.42720482", "text": "public function reActivate($agreementStateDescriptor, $apiContext = null, $restCall = null)\n {\n ArgumentValidator::validate($this->getId(), \"Id\");\n ArgumentValidator::validate($agreementStateDescriptor, 'agreementStateDescriptor');\n $payLoad = $agreementStateDescriptor->toJSON();\n self::executeCall(\n \"/v1/payments/billing-agreements/{$this->getId()}/re-activate\",\n \"POST\",\n $payLoad,\n null,\n $apiContext,\n $restCall\n );\n return true;\n }", "title": "" }, { "docid": "9e45f301b4b22156640b2213d6940b36", "score": "0.42525658", "text": "function updateDomainWhois($domain,$whois){\r\n\t\t$aDomain = explode('.', $domain);\r\n\t\tif($aDomain[1] == 'be')\r\n\t\t{\r\n\t\t\t$this->Error[] = 'Voor een .be domeinnaam moet de EPP code eerst ingevuld zijn. Deze functie wordt momenteel nog niet ondersteund.';\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\r\n\t\t$contactId = $this->createContact($whois);\r\n\r\n\t\t$settings = array();\r\n\t\t$settings['registrant_id'] = $contactId;\r\n\r\n\t\t$response = $this->request('POST', '/domains/'.$domain.'/update', $settings);\r\n\r\n\t\t\tif($response['error'])\r\n\t\t\t{\r\n\t\t\t\t$this->Error[] = $response['error']['message'];\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\r\n\t\t\t\t$this->registrarHandles['owner'] = $response['registrant_id'];\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c97e9d903a939519a2e4eed4cc2f18e5", "score": "0.42384708", "text": "public function rekeyTo(Address $address)\n {\n $this->paymentTransaction->rekeyTo = $address;\n\n return $this;\n }", "title": "" }, { "docid": "57ca041fad3e927f1c4d1ae361d995ac", "score": "0.42374715", "text": "public function createAction(\\Roketi\\Panel\\Domain\\Model\\Domain $newDomain) {\n\t\t$this->domainRepository->add($newDomain);\n\n\t\t$this->addFlashMessage(\n\t\t\t$this->translate('message.created_successfully', 'Domain')\n\t\t);\n\t\t$this->redirect('index');\n\t}", "title": "" }, { "docid": "91170af7d7aec31a427bbc0975020777", "score": "0.42368388", "text": "public function setDomain($domain)\n {\n $this->gettext->setDomain($domain);\n }", "title": "" }, { "docid": "ab9f289253782ec7f569bc6c4b92ac23", "score": "0.42358223", "text": "public function reauthenticate(array &$state)\n {\n\t\t$state['as:Reauth'] = true;\n\t}", "title": "" }, { "docid": "4a38ec73c38dcf01a9e3b5c55630e4a1", "score": "0.42225468", "text": "function set_adresse ($new_adresse){\n $this->adresse = $new_adresse;\n }", "title": "" }, { "docid": "1afed530312c8b78b79ab0cd42c40a3b", "score": "0.4217417", "text": "public function renewItem() {\n \n //Can enter in a different time zone to return date\n $oldDate = $this -> dueBackDate;\n $newDate = date(\"d.m.Y\", strtotime(\"$oldDate +1 week\"));\n $this ->dueBackDate = $newDate;\n echo \"you just renewed this loan and the new due back date is \".$this ->dueBackDate.\"\\n\";\n return $this;\n \n }", "title": "" }, { "docid": "c0143071a644c4828ec04263601633af", "score": "0.4211977", "text": "public static function setDefaultPathAndDomain($path, $domain) {\n \n }", "title": "" }, { "docid": "7bf3031027ae6288db585ae44c7f2d8f", "score": "0.4209088", "text": "public function setExpired()\n {\n $this->attributes['status'] = 'expired';\n self::save();\n }", "title": "" }, { "docid": "7bf3031027ae6288db585ae44c7f2d8f", "score": "0.4209088", "text": "public function setExpired()\n {\n $this->attributes['status'] = 'expired';\n self::save();\n }", "title": "" }, { "docid": "81edc65ef0fd3558095e6bcc334614a0", "score": "0.42090493", "text": "public static function restore(pm_Domain $domain) {\n $prefix = self::_createSettingsPrefixForDomain($domain, 'service');\n $options = [ \n 'name' => null,\n 'user' => null,\n 'entryPoint' => null,\n 'environment' => null,\n 'workingDirectory' => null \n ];\n\n foreach ($options as $key => $value) {\n $options[$key] = pm_Settings::get($prefix . $key);\n }\n\n return new Modules_Dotnetcore_Settings_Service($options);\n }", "title": "" }, { "docid": "6439ebb0f04245a142179c7dc1d4b896", "score": "0.42086715", "text": "function chooseDomainGoNextOp()\n\t{ # sets selected domain, then redirect to new op..\n\t\tglobal $domainname, $nextop;\n\t\t$this->getVariable(array(\"domainname\", \"nextop\"));\n\t\t$this->requireMyDomain($domainname);\n\t\t$this->setselecteddomain($domainname);\n\t\t$this->redirecttourl(\"?op=$nextop\");\n\t}", "title": "" }, { "docid": "8ad8a26340732481b3cea0c1e2511eaf", "score": "0.42054904", "text": "public function testDomainConfigOverrider() {\n // No domains should exist.\n $this->domainTableIsEmpty();\n // Create five new domains programmatically.\n $this->domainCreateTestDomains(5);\n // Get the domain list.\n $domains = \\Drupal::entityTypeManager()->getStorage('domain')->loadMultiple();\n // Except for the default domain, the page title element should match what\n // is in the override files.\n // With a language context, based on how we have our files setup, we\n // expect the following outcomes:\n // - example.com name = 'Drupal' for English, 'Drupal' for Spanish.\n // - one.example.com name = 'One' for English, 'Drupal' for Spanish.\n // - two.example.com name = 'Two' for English, 'Dos' for Spanish.\n // - three.example.com name = 'Drupal' for English, 'Drupal' for Spanish.\n // - four.example.com name = 'Four' for English, 'Four' for Spanish.\n foreach ($domains as $domain) {\n // Test the login page, because our default homepages do not exist.\n foreach ($this->langcodes as $langcode => $language) {\n $path = $domain->getPath() . $langcode . '/user/login';\n $this->drupalGet($path);\n if ($domain->isDefault()) {\n $this->assertRaw('<title>Log in | Drupal</title>', 'Loaded the proper site name.');\n }\n else {\n $this->assertRaw('<title>Log in | ' . $this->expectedName($domain, $langcode) . '</title>', 'Loaded the proper site name.' . '<title>Log in | ' . $this->expectedName($domain, $langcode) . '</title>');\n }\n }\n }\n }", "title": "" }, { "docid": "0e48ea651d7641917af99b1ee09877c8", "score": "0.42018133", "text": "static function reactivate($cardid)\n {\n $card = Dejavu::getObject('Card',$cardid);\n if ($card->status != \"done\")\n return false;\n $card->status = \"active\";\n $card->reactivated=\"true\";\n $task =Dejavu::getObject('Task',$card->tasksid[0]);\n $task->status = \"active\";\n self::deactivateChildren($card);\n }", "title": "" }, { "docid": "1b09557f5dbb5cbe845c22fa41535ca4", "score": "0.4193765", "text": "public static function change_addon_status_overwrite($enabled) {\n\n RevLoader::update_option(\"revslider_maintenance_enabled\", $enabled);\n }", "title": "" }, { "docid": "7ac2a6dbc71c78307156553b7144b999", "score": "0.4192276", "text": "public function set_new_config($config){\n //\n $config = array_merge($this->default, $config);\n parent::reconfigure($config);\n }", "title": "" }, { "docid": "b31de60e45d4d891cfcb152f7a2e9796", "score": "0.41876402", "text": "function ChangeID ($nid) {\n // attempt to resolve all references to this object.\n \n /* $query = \"SELECT * FROM `objects` WHERE `oid` = '$nid'\";\n $sql = mysql_query ($query) or die (mysql_error ());\n if (mysql_num_rows ($sql) == 0) { // target ID does not exist\n $pid = $this->oid;\n $query = \"UPDATE `objects` \n SET `oid` = '$nid' \n WHERE `oid` = '$pid'\";\n $sql = mysql_query ($query) or die (mysql_error ());\n \n $query = \"UPDATE `hierarchy` \n SET `parent_oid` = '$nid' \n WHERE `parent_oid` = '$pid'\";\n $sql = mysql_query ($query) or die (mysql_error ());\n \n $query = \"UPDATE `hierarchy` \n SET `child_oid` = '$nid' \n WHERE `child_oid` = '$pid'\";\n $sql = mysql_query ($query) or die (mysql_error ());\n \n $query = \"UPDATE `properties` \n SET `oid` = '$nid' \n WHERE `oid` = '$pid'\";\n $sql = mysql_query ($query) or die (mysql_error ());\n return true;\n } else {\n die (\"Failed to reallocate object\");\n } */\n }", "title": "" }, { "docid": "6feeb731ee6c8a761cca993ac71b3c7e", "score": "0.41817507", "text": "public function setDomain($var)\n {\n GPBUtil::checkString($var, True);\n $this->domain = $var;\n\n return $this;\n }", "title": "" }, { "docid": "4792dc9a67d2c2a81091abbc382e2f9b", "score": "0.41731876", "text": "public function restore($domain, $pleskVersion, $extVersion, $config, $contentDir) { }", "title": "" }, { "docid": "906458afee4f24cb8dbce5b51c81eec6", "score": "0.41705674", "text": "function ldap_exop_refresh(#[PhpVersionAware(['8.1' => 'LDAP\\Connection'], default: 'resource')] $ldap, string $dn, int $ttl): int|false {}", "title": "" }, { "docid": "a13fe0db0417bb05c4654e461349c6e0", "score": "0.41622022", "text": "public function regenerate($expires)\n\t{\n\t\t$this->expires = $expires;\n\t\t\n\t\t$this->_before_save();\n\t\t\n\t\treturn $this->update();\n\t}", "title": "" }, { "docid": "ffd6c7d67149c87f29e20f6ba0f164c8", "score": "0.41599298", "text": "public static function onReactivate( \\IPS\\nexus\\Purchase $purchase )\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "bedb808fb57b829b5b75f23770385e03", "score": "0.41515338", "text": "protected function onReconfigure()\n {\n parent::onReconfigure();\n $this->client->resetApplication();\n $this->configureClient($this->config);\n $this->client->startApp();\n }", "title": "" }, { "docid": "2745ab7773e69c5764b9f382dc483bae", "score": "0.41503796", "text": "function qb_re_register($qb_id) {\n\t\tglobal $timedate;\n\t\t$seed = new QBEntity();\n\t\tif(! $seed->retrieve($qb_id))\n\t\t\treturn false;\n\t\t$upd = false;\n\t\t$no_account = true;\n\t\t$no_contact = true;\n\t\tif($seed->account_id && $seed->fetch_account() && ! $seed->account->deleted) {\n\t\t\t$no_account = false;\n\t\t\t$seed->name = $seed->account->name;\n\t\t\t$seed->set_update_status_if_modified($seed->account);\n\t\t\t$upd = true;\n\t\t}\n\t\tif($seed->contact_id && $seed->fetch_contact() && ! $seed->contact->deleted) {\n\t\t\t$no_contact = false;\n\t\t}\n\t\tif($no_account && $no_contact) {\n\t\t\t$seed->deleted = 1;\n\t\t\t$upd = true;\n\t\t}\n\t\tif($upd)\n\t\t\t$seed->save();\n\t\treturn true;\n\t}", "title": "" }, { "docid": "965f0e6d0f366c5cdbd678dfd4cecaf4", "score": "0.41490924", "text": "public function setPrimary()\n {\n $this->user->addresses()->update(['is_primary' => false]);\n\n $this->is_primary = true;\n\n $this->save();\n }", "title": "" }, { "docid": "6b001b3d06254d2545c5eb1a15a3390a", "score": "0.4132686", "text": "function set_period($period_new=30)\n\t{\n\t\tif($period_new != 15 && $period_new != 30 &&\n\t\t $period_new != 60 && $period_new != 90)\n\t\t{\n\t\t\t$this->period_new = $period_new;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "6ce3a8fb1f523670e033fe08eaf84610", "score": "0.4130254", "text": "function addDomain()\n\t{\n\n\t\tglobal $domainname, $ftpusername, $ftppassword, $quota, $upload, $download, $panelusername, $paneluserpass, $_insert, $email;\n\t\t$this->getVariable(array(\"domainname\", \"ftpusername\", \"ftppassword\", \"quota\", \"upload\", \"download\", \"panelusername\", \"paneluserpass\", \"_insert\", 'email'));\n\n\t\t# This is a reseller / admin feature only!\n\t\t$this->requireReseller();\n\t\t$success = True;\n\n\t\tif (!$_insert) {\n\t\t\tif (!$this->beforeInputControls(\"adddomain\", array()))\n\t\t\t\treturn false;\n\t\t\t$inputparams = array(\n\t\t\t\tarray('domainname', 'lefttext' => 'Domain Name'),\n\t\t\t\tarray('panelusername', 'lefttext' => 'Panel username'),\n\t\t\t\tarray('paneluserpass', 'password_with_generate', 'lefttext' => 'Paneluser password'),\n\t\t\t\tarray('ftpusername', 'lefttext' => 'Ftp username'),\n\t\t\t\tarray('ftppassword', 'password_with_generate', 'lefttext' => 'Ftp Password'),\n\t\t\t\tarray('quota', 'default' => '200', 'lefttext' => \"Quota (Mb)\"),\n\t\t\t\tarray('upload', 'default' => '200', 'lefttext' => \"Upload bw(kb/s)\"),\n\t\t\t\tarray('download', 'default' => '200', 'lefttext' => \"Download bw(kb/s)\"),\n\t\t\t\tarray('email', 'default' => $this->miscconfig['adminemail']),\n\t\t\t\tarray('op', 'hidden', 'default' => __FUNCTION__)\n\t\t\t);\n\n\t\t\t$this->output .= \"<br>Add domain<br>Please do not include prefixes such as \\\"http://\\\" or \\\"www.\\\":<br>\"\n\t\t\t\t. inputform5($inputparams);\n\n\t\t} else {\n\t\t\t$success = $success && $this->addDomainDirect($domainname, $panelusername, $paneluserpass, $ftpusername, $ftppassword, $this->status_active, $email, $quota);\n\t\t\t$success = $success && $this->setselecteddomain($domainname);\n\t\t\t$this->ok_err_text($success, 'Successfully added domain.', 'Failed to add domain.');\n\t\t}\n\t\t$this->showSimilarFunctions('domain');\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "a6b47d20563557b196cc3a93316a88b9", "score": "0.412724", "text": "public function renew() {\n try {\n $args = array();\n $args['conditions']['SponsorManagerSetting.co_id'] = $this->cur_co['Co']['id'];\n $args['contain'] = false;\n\n $settings = $this->SponsorManagerSetting->find('first', $args);\n \n $result = $this->SponsorManager->renew($settings, \n $this->request->params['named']['copersonroleid'],\n $this->Session->read('Auth.User.co_person_id'));\n \n $this->Flash->set(filter_var($result,FILTER_SANITIZE_SPECIAL_CHARS), array('key' => 'success'));\n }\n catch(Exception $e) {\n $this->Flash->set($e->getMessage(), array('key' => 'error'));\n }\n\n // Redirect to review\n $this->redirect(array(\n 'plugin' => 'sponsor_manager',\n 'controller' => 'sponsors',\n 'action' => 'review',\n 'copersonid' => $this->request->params['named']['copersonid'],\n '?' => array('filter' => $this->request->params['named']['filter'])\n ));\n }", "title": "" }, { "docid": "156a5e6a14d50437d50eb357f0fd6f3d", "score": "0.4123344", "text": "function setDomain($my_domain) {\n\t\t//return;\n\t\t$my_domain = strtolower(trim($my_domain));\n\t\tif ($my_domain === \"\" or $my_domain === 0 ) {\n\t\t\t$a = array(\n\t\t\t\t\"action\" \t\t=> \"set hosted domain info\",\n\t\t\t\t\"status\" \t\t=> \"sucess\",\n\t\t\t\t\"message\" \t\t=> \"libgmailer: Using the default gmail/googlemail domain.\"\n\t\t\t);\n\t\t\tarray_unshift($this->return_status, $a);\n\t\t\treturn;\n\t\t}\n\t\t$success = true;\n\t\tif (preg_match(\"/(^gmail\\.com$)|(^googlemail\\.com$)/i\",$my_domain)) {\n\t\t\t$a = array(\n\t\t\t\t\"action\" \t\t=> \"set hosted domain info\",\n\t\t\t\t\"status\" \t\t=> \"failed\",\n\t\t\t\t\"message\" \t\t=> \"libgmailer: cannot use \\\"$my_domain\\\" as a hosted domain. The default gmail.com or googlemail.com will be used.\"\n\t\t\t);\n\t\t\tarray_unshift($this->return_status, $a);\n\t\t\treturn;\n\t\t}\n\t\t$this->domain = $my_domain;\n\t\t// GFYD urls changed to GAFYD; Neerav; 1 Sept 2006\n\t\t// and finally, GM_LNK_GMAIL and GM_LNK_GMAIL_HTTP changed from hosted/ to a/; Neerav; 15 Mar 2007\n\t\t//$this->GM_LNK_GMAIL \t\t= \"https://mail.google.com/hosted/\".$my_domain.\"/\";\n\t\t$this->GM_LNK_GMAIL \t\t= \"https://mail.google.com/a/\".$my_domain.\"/\";\n\t\t$this->GM_LNK_GMAIL_A \t\t= \"https://mail.google.com/a/\".$my_domain.\"/\";\n\t\t$this->GM_LNK_GMAIL_HTTP \t= \"http://mail.google.com/a/\".$my_domain.\"/\";\n\t\t$this->GM_LNK_LOGIN \t\t= \"https://www.google.com/a/\".$my_domain.\"/LoginAction\";\n\t\t$this->GM_LNK_LOGIN_REFER \t= \"https://www.google.com/a/\".$my_domain.\"/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fhosted%2F\".$my_domain.\"&ltmpl=yj_blanco&ltmplcache=2\";\n\t\t$this->GM_LNK_INVITE_REFER \t= \"\";\n\t\t// Added by Neerav; 19 Jan 2007\n\t\t$this->GM_LNK_GMAIL_MOBILE\t= \"http://mail.google.com/a/\".$my_domain.\"/x/\";\n\n\t\t$a = array(\n\t\t\t\"action\" \t\t=> \"set hosted domain info\",\n\t\t\t\"status\" \t\t=> \"success\",\n\t\t\t\"message\" \t\t=> \"libgmailer: Domain set.\"\n\t\t);\n\t\tarray_unshift($this->return_status, $a);\n\t}", "title": "" }, { "docid": "c079eca3c58a6fdaedd93d0166a5e62b", "score": "0.41186818", "text": "function applyfordomainaccount()\n\t{\n\t\tif ($this->miscconfig['userscansignup'] == '')\n\t\t\t$this->showUnauthorized();\n\n\t\tglobal $domainname, $ftpusername, $ftppassword, $quota, $upload, $download, $panelusername, $paneluserpass, $_insert;\n\t\t$this->getVariable(array(\"domainname\", \"ftpusername\", \"ftppassword\", \"quota\", \"upload\", \"download\", \"panelusername\", \"paneluserpass\", \"_insert\"));\n\n\t\tif (!$_insert) {\n\t\t\t#if(!$this->beforeInputControls(\"adddomain\",array())) return false;\n\t\t\t$inputparams = array(\n\t\t\t\t'domainname',\n\t\t\t\tarray('panelusername', 'lefttext' => 'Panel username:'),\n\t\t\t\tarray('paneluserpass', 'password_with_generate', 'lefttext' => 'Panel user password:'),\n\t\t\t\tarray('ftpusername', 'lefttext' => 'FTP username:'),\n\t\t\t\tarray('ftppassword', 'password_with_generate', 'lefttext' => 'FTP Password:'),\n\t\t\t\tarray('quota', 'lefttext' => 'Quota (MB)', 'default' => 100),\n\t\t\t\tarray('upload', 'lefttext' => 'Upload Bandwidth (KB/s)', 'default' => 1000),\n\t\t\t\tarray('download', 'lefttext' => 'Download Bandwidth (KB/s)', 'default' => 1000),\n\t\t\t\tarray('id', 'hidden', 'default' => $id),\n\t\t\t\tarray('op', 'hidden', 'default' => __FUNCTION__)\n\t\t\t);\n\t\t\t$this->output .= inputform5($inputparams);\n\t\t} else {\n\t\t\t# existcontrol addDomainDirect icinde\n\t\t\tif ($this->addDomainDirect($domainname, $panelusername, $paneluserpass, $ftpusername, $ftppassword, $this->status_passive))\n\t\t\t\t$this->output .= \"Your application is recieved. You will be informed when your domain is activated.\";\n\t\t\t$this->infotoadminemail('A new domain application has been received.', 'New Domain Application');\n\t\t}\n\t}", "title": "" }, { "docid": "92daac7284853bb71fd0fe42a0328155", "score": "0.41139218", "text": "#[API\\Input(type: '?DomainID[]')]\n public function setDomains(?array $domains): void\n {\n if (null === $domains) {\n return;\n }\n\n $this->setEntireCollection($domains, $this->domains, Domain::class);\n }", "title": "" }, { "docid": "15ef128add3839b5307bae384a5396d8", "score": "0.41099828", "text": "public function setDomain($value)\n {\n\n }", "title": "" }, { "docid": "a06cafed3eeac2dcb1dd33b43a8aaef1", "score": "0.4109873", "text": "protected function _addDomain($model, $domain)\n {\n $model->setEmailGroup($domain)\n ->save();\n return ;\n }", "title": "" }, { "docid": "e1d9488711dd36ab4da1534b48485de8", "score": "0.41097578", "text": "public function setNew($new) {\r\n\t\t$this->new = (bool) $new;\r\n\t}", "title": "" } ]
e16cfa9b8e422eefdf0c207ef8268a68
Returns true when the runtime used is PHP with the PHPDBG SAPI.
[ { "docid": "33456cf0c9ded9aad71bb5d4fa13559e", "score": "0.6941459", "text": "public static function isPHPDBG(): bool\n {\n return \\PHP_SAPI === 'phpdbg' && !self::isHHVM();\n }", "title": "" } ]
[ { "docid": "87162d28db4c8068a1bf2fdab07bd215", "score": "0.68200463", "text": "public static function isRealPHP(): bool\n {\n return !self::isHHVM() && !self::isPHPDBG();\n }", "title": "" }, { "docid": "6df8a5d68d4f1acd99504eaf7273a1d9", "score": "0.66213804", "text": "public function isPHP(): bool\n {\n return ! $this->isHHVM();\n }", "title": "" }, { "docid": "f8ccc87e7d69e77be2d9c1c8595dfc4c", "score": "0.626572", "text": "public function isPhp(): bool;", "title": "" }, { "docid": "4c5c509f6974da7d446d9344359b715d", "score": "0.61817306", "text": "public static function hasXdebug(): bool\n {\n return (self::isRealPHP() || self::isHHVM()) && \\extension_loaded('xdebug');\n }", "title": "" }, { "docid": "4284c2caf45f9d2b8566e7a02d6aecf5", "score": "0.6115821", "text": "public function isHHVM(): bool\n {\n return defined('HHVM_VERSION');\n }", "title": "" }, { "docid": "63a759ed82ef27b0538020d8940e8bf6", "score": "0.6100776", "text": "public static function hasPHPDBGCodeCoverage(): bool\n {\n return self::isPHPDBG() && \\function_exists('phpdbg_start_oplog');\n }", "title": "" }, { "docid": "7b28339c5e32d21d98f2409df7e60c67", "score": "0.6056391", "text": "function isCLI()\r\n\t{\r\n\t\t$interface = php_sapi_name();\r\n\t\tif ($interface == 'cli')\r\n\t\t{\r\n\t\t\treturn true; // request var is only created when a browser calls the script via mod_php or CGI\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "90f8f629cb78b943f74632ffc3ceb6ce", "score": "0.6050361", "text": "public function runningInConsole(): bool\n {\n return substr(PHP_SAPI, 0, 3) === 'cgi';\n }", "title": "" }, { "docid": "6349e1fd560f169b8918d538b7346c76", "score": "0.60259545", "text": "protected function isWebRequest(): bool\n {\n return 'cli' !== \\PHP_SAPI && 'phpdbg' !== \\PHP_SAPI;\n }", "title": "" }, { "docid": "d9d63156f60bad2f23b3430b50486b77", "score": "0.60181063", "text": "public function is_supported_php() {\n if ( version_compare( PHP_VERSION, $this->min_php, '<=' ) ) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "d9d63156f60bad2f23b3430b50486b77", "score": "0.60181063", "text": "public function is_supported_php() {\n if ( version_compare( PHP_VERSION, $this->min_php, '<=' ) ) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "c12ecbaeb578e5998c4fd628706286b7", "score": "0.60099024", "text": "public static function isHHVM(): bool\n {\n return \\defined('HHVM_VERSION');\n }", "title": "" }, { "docid": "b9b1f9c3ca173a29872fb67ce29e0738", "score": "0.6007579", "text": "public function isRuntime(): bool\n {\n return $this->isRunning;\n }", "title": "" }, { "docid": "d0cd8e1ac7b09e19cc548a893f8ce92d", "score": "0.6002292", "text": "public function isSupported()\n {\n return php_sapi_name() == 'cli' ? true : false;\n }", "title": "" }, { "docid": "b9e7b2a17b0115faf313668295880b9a", "score": "0.59997666", "text": "public function hasXdebug(): bool\n {\n return $this->isPHP() && extension_loaded('xdebug');\n }", "title": "" }, { "docid": "6b73423f4df1c2769a96f794e9d1d668", "score": "0.5992105", "text": "public static function needPhpRuntime()\n{\n}", "title": "" }, { "docid": "71e4f2add49747624681f9641165673c", "score": "0.5989477", "text": "function isDebug(){\n\treturn getDef('GSDEBUG',true);\n}", "title": "" }, { "docid": "4681dd68d428238699afdf6c6b202c69", "score": "0.597813", "text": "public function isDebugging()/*# : bool */;", "title": "" }, { "docid": "7bfb74884d2a8c807df155f93366959d", "score": "0.5957604", "text": "function is_debug_mode(): bool {\n return isset($_ENV['DEBUG']) && $_ENV['DEBUG'];\n}", "title": "" }, { "docid": "db552687e49e337d9e4e9ee78807e5aa", "score": "0.594776", "text": "function is_pl_debug() {\n\n\tif ( defined( 'PL_DEV' ) && PL_DEV )\n\t\treturn true;\n\tif ( pl_setting( 'enable_debug' ) )\n\t\treturn true;\n}", "title": "" }, { "docid": "e14783ee58d7ae94b7e5f10b7f7d1e2a", "score": "0.5924874", "text": "public function isDev(): bool;", "title": "" }, { "docid": "e14783ee58d7ae94b7e5f10b7f7d1e2a", "score": "0.5924874", "text": "public function isDev(): bool;", "title": "" }, { "docid": "8d4ce040a4a5f4bde2be6d02f363a63b", "score": "0.59059364", "text": "public static function isDebug(): bool\r\n {\r\n return is_string(getenv('DEBUG')) && 'TRUE' === getenv('DEBUG');\r\n }", "title": "" }, { "docid": "18a187e6d85154935c68946acc4745ba", "score": "0.5859214", "text": "private function check_running()\n\t{\n\t\tswitch ( strtolower( PHP_OS ) )\n\t\t{\n\t\t\tcase \"freebsd\":\n\t\t\tcase \"linux\":\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$php_processes = $this->get_php_processes();\n\t\t\t\t}\n\t\t\t\tcatch ( Exception $e )\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tforeach ($php_processes as $proc_id)\n\t\t\t\t{\n\t\t\t\t\t$exec_args = $this->get_php_process_args( $proc_id );\n\t\t\t\t\tif ( strcmp($exec_args, $_SERVER['PHP_SELF']) == 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "759af963e6d523dfcbcf06659e434d53", "score": "0.5840314", "text": "protected function runtime() { return 'php:'.PHP_VERSION; }", "title": "" }, { "docid": "04ced6274ccb15e4dbcc2182a2e56984", "score": "0.5834463", "text": "public function isActualServerDevelopment(): bool\n {\n $mode = $this->configs['development-server']['mode'];\n\n if ($mode === true) {\n return true;\n } elseif ($mode === false) {\n return false;\n } else {\n return ($this->configs['development-server']['domain'] === $_SERVER['SERVER_NAME'])\n || Debugger::detectDebugMode();\n }\n }", "title": "" }, { "docid": "6e5566e64372300f4e94ae68bbde00ac", "score": "0.58244616", "text": "#[Pure]\n#[ExpectedValues(['cli', 'phpdbg', 'embed', 'apache', 'apache2handler', 'cgi-fcgi', 'cli-server', 'fpm-fcgi', 'litespeed'])]\nfunction php_sapi_name(): string|false {}", "title": "" }, { "docid": "adc2fa057cb58fd9d1dbad8285b8c569", "score": "0.5820777", "text": "public static function isDev(): bool \n\t{\n if (in_array(php_sapi_name(), ['cli', 'cli-server'])) {\n return true;\n }\n\n\t\treturn $_SERVER[\"SERVER_ADDR\"] == '127.0.0.1' || $_SERVER[\"HTTP_HOST\"] == 'localhost';\n\t}", "title": "" }, { "docid": "f41c838527ce35322757733170867aa0", "score": "0.57920915", "text": "private function isRunningOS400(): bool\n {\n $checks = [\n \\function_exists('php_uname') ? php_uname('s') : '',\n getenv('OSTYPE'),\n \\PHP_OS,\n ];\n\n return false !== stripos(implode(';', $checks), 'OS400');\n }", "title": "" }, { "docid": "1dd6e38270e1044e806c572a1a660b8e", "score": "0.57462484", "text": "function isdev() {\n\t\treturn true;\n}", "title": "" }, { "docid": "056dc8045cd8cc15c94799f47288c800", "score": "0.5711576", "text": "public function isDebug();", "title": "" }, { "docid": "056dc8045cd8cc15c94799f47288c800", "score": "0.5711576", "text": "public function isDebug();", "title": "" }, { "docid": "1f9fec2b255594b4c34094c724e026d1", "score": "0.57067364", "text": "public static function bugWeb() {\n\t\treturn php_sapi_name() != 'cli';\n\t}", "title": "" }, { "docid": "e1c22f509eba228bbf4aa4ffdd80b856", "score": "0.569742", "text": "public function hasLinkedPhp(): bool\n {\n return $this->files->isLink(BREW_PREFIX.'/bin/php');\n }", "title": "" }, { "docid": "6450391b5341d3e76eb7ad7f8a5c71df", "score": "0.5694907", "text": "public static function isSupported();", "title": "" }, { "docid": "5abe31e873630e1287ff08391cd7c061", "score": "0.56537914", "text": "protected function isRunningPhp7()\n {\n return version_compare(PHP_VERSION, '7.0-dev', '>=');\n }", "title": "" }, { "docid": "bd7d3ba886d5a505c9bc754f8f8316d8", "score": "0.56519914", "text": "public static function DEBUG(): bool\n {\n return true;\n// return $_ENV['DEBUG'];\n }", "title": "" }, { "docid": "ad2236a45e6ba0889f42fedc9f8899e8", "score": "0.56426615", "text": "public function checkForDev()\n {\n // init\n $return = false;\n\n if (function_exists('checkForDev')) {\n $return = checkForDev();\n } else {\n\n // for testing with dev-address\n $noDev = isset($_GET['noDev']) ? (int)$_GET['noDev'] : 0;\n $remoteIpAddress = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : false;\n\n if (\n $noDev != 1\n &&\n (\n $remoteIpAddress === '127.0.0.1'\n ||\n $remoteIpAddress === '::1'\n ||\n PHP_SAPI === 'cli'\n )\n ) {\n $return = true;\n }\n }\n\n return $return;\n }", "title": "" }, { "docid": "dafd49519d8a66de31e4d58cdc480eec", "score": "0.5631893", "text": "public function testThePHPSAPIConstantShouldBeUsed(): void\n {\n // `php_sapi_name()` function.\n\n if (PHP_SAPI !== 'cli') {\n return;\n }\n }", "title": "" }, { "docid": "e18c4793d4fb708d261006943b48324c", "score": "0.5630734", "text": "public static function hasInstalledPhp()\n {\n return static::installed('php70') || static::installed('php56');\n }", "title": "" }, { "docid": "146bc2b6d652df92d00a55818a039f0d", "score": "0.5630256", "text": "static function IfNotCli(){\n if (php_sapi_name() !== \"cli\") {\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "02a7078fc13d9185c81500d4c6b5cd74", "score": "0.56222886", "text": "public function is_debug()\n {\n return AJOY_ENV !== 'production';\n }", "title": "" }, { "docid": "3b6915a036fdcec6d15334f26ebcd80e", "score": "0.5620945", "text": "public static function is_developer() {\n\n /**\n * @see http://code.google.com/p/add-mvc-framework/issues/detail?id=39\n */\n if (php_sapi_name() == \"cli\") {\n return true;\n }\n\n # Fix for issue #6\n if (current_ip_in_network())\n return true;\n\n if (isset(add::config()->developer_ips))\n return in_array(current_user_ip(), (array) add::config()->developer_ips);\n else\n return false;\n }", "title": "" }, { "docid": "1ccf7b5557b834c82554d5e3324b777e", "score": "0.5620327", "text": "function isLive() {\r\n\t\tif(preg_match('/experiments.dev|localhost/', $_SERVER['SERVER_NAME'])) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a4c5f93c9bdd6cb6bed32e094942261b", "score": "0.5615408", "text": "static function apc()\r\n {\r\n return extension_loaded('apc') and ini_get('apc.enabled');\r\n }", "title": "" }, { "docid": "6a3e469ddaa018648c11a161a69692ec", "score": "0.5613979", "text": "function isRunningFromCommandLine(): bool\n{\n return php_sapi_name() == 'cli';\n}", "title": "" }, { "docid": "f576d978929109dd93fe094b0fa64342", "score": "0.56086504", "text": "public function isWebServer();", "title": "" }, { "docid": "f09dd72cd3599d2df300b9e181680e9e", "score": "0.5600586", "text": "function is_debug() : bool\n {\n return app()->isDebug();\n }", "title": "" }, { "docid": "4d87d1d72d863c5d0d4e8195f744c4fc", "score": "0.5598529", "text": "function isLive() {\r\n\t\treturn !preg_match('/experiments.dev|localhost/', $_SERVER['SERVER_NAME']);\r\n\t}", "title": "" }, { "docid": "e8dd768e05db9d5f395b405c24d0b23b", "score": "0.55953866", "text": "public static function isFrameworkEnabled()\n\t{\n\t\treturn JPluginHelper::isEnabled('system', 'regularlabs');\n\t}", "title": "" }, { "docid": "baa540e71e9a095d13e500a01b9d5d3b", "score": "0.55899256", "text": "static function is_debug_mode()\n {\n return s::get('debug');\n }", "title": "" }, { "docid": "b9e356c6f7211fdde879adf84320b422", "score": "0.5584959", "text": "protected function isProduction(){\n //server is development\n if ($_SERVER['SERVER_ADDR'] === $this->getFromConfig('developmentip')){\n return FALSE;\n }\n else{\n return TRUE;\n }\n }", "title": "" }, { "docid": "c50d058e35d2bf5e0148f5969726e5a8", "score": "0.55771935", "text": "public static function checkCli() \n\t\t{\n return ( php_sapi_name() === 'cli' );\n }", "title": "" }, { "docid": "cb24436225e88539f19120aae3dc9bd4", "score": "0.5571382", "text": "public function hasInstalledPhp(): bool\n {\n $installed = $this->installedPhpFormulae()->first(function ($formula) {\n return $this->supportedPhpVersions()->contains($formula);\n });\n\n return ! empty($installed);\n }", "title": "" }, { "docid": "cdbbd3db6e3a903409af1acba4dd4703", "score": "0.5545067", "text": "public function isDebugAllowed();", "title": "" }, { "docid": "778a034e517d4b35951ef66d67da024c", "score": "0.55222964", "text": "public static function isCLI()\n\t{\n\t\tif ( php_sapi_name() == 'cli' ) {\n return true;\n }\n return false;\n\t}", "title": "" }, { "docid": "4c6e406cc84639159c726d51ea6ea747", "score": "0.5521269", "text": "public function isSystem();", "title": "" }, { "docid": "4fda584e145eff565b2298a596442489", "score": "0.5519468", "text": "public function runningInConsole()\n {\n return php_sapi_name() == 'cli';\n }", "title": "" }, { "docid": "4fda584e145eff565b2298a596442489", "score": "0.5519468", "text": "public function runningInConsole()\n {\n return php_sapi_name() == 'cli';\n }", "title": "" }, { "docid": "4fda584e145eff565b2298a596442489", "score": "0.5519468", "text": "public function runningInConsole()\n {\n return php_sapi_name() == 'cli';\n }", "title": "" }, { "docid": "885991c9698d8d9c431d278cd0c33fef", "score": "0.5497751", "text": "public function is_test_server() {\n\t\t\tif ( $this->is_developer_pc() ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_HOST'] ?? '';\n\n\t\t\t$domain = strtolower( $_SERVER['HTTP_HOST'] );\n\n\t\t\treturn in_array( $domain, [\n\t\t\t\t'jobs.satechitcompany.com',\n\t\t\t\t'satechitcompany.com',\n\t\t\t\t'www.satechitcompany.com',\n\t\t\t] );\n\t\t}", "title": "" }, { "docid": "6f152b48ac60d24ee46e68fd4c1f2ca2", "score": "0.54908985", "text": "public function hasDebugOutput();", "title": "" }, { "docid": "9833d606c22c8f65ba06b280cae53489", "score": "0.5486164", "text": "function checkSpipConfig()\r\n {\r\n if (defined('ADHERENT_SPIP_SERVEUR') && defined('ADHERENT_SPIP_USER') && defined('ADHERENT_SPIP_PASS') && defined('ADHERENT_SPIP_DB'))\r\n {\r\n if (ADHERENT_SPIP_SERVEUR != '' && ADHERENT_SPIP_USER != '' && ADHERENT_SPIP_PASS != '' && ADHERENT_SPIP_DB != '')\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "72c6deef5bc818d1be25be75474a7252", "score": "0.5484629", "text": "public static function isDemoApplication()\n {\n return file_exists($_SERVER[\"DOCUMENT_ROOT\"] . \"/../../.bitnamimeta/demo_machine\");\n }", "title": "" }, { "docid": "7f7fc47cbbe94b129817eadbe093bab4", "score": "0.5483435", "text": "function thrive_reporting_dashboard_can_run() {\n\treturn PHP_VERSION_ID >= 70000;\n}", "title": "" }, { "docid": "88fb53c9f52411f04c8f70f99310857d", "score": "0.54702324", "text": "public function enabled() {\n\t\treturn extension_loaded('sybase') || extension_loaded('sybase_ct');\n\t}", "title": "" }, { "docid": "dec00f661146425c230b61397e7fdf47", "score": "0.5464985", "text": "public static function bugMode() {\n\t\t$authorized = self::_get('authorized');\n\t\tif(is_bool($authorized)) {\n\t\t\treturn $authorized;\n\t\t}\n\t\t\n\t\tif(!self::bugWeb())\n\t\t\treturn true;\n\t\t\n\t\t$headers = function_exists('apache_request_headers') ? apache_request_headers() : array();\n\t\t$ip = isset($headers['X-Forwarded-For']) ? $headers['X-Forwarded-For'] : $_SERVER['REMOTE_ADDR'];\n\t\t\n\t\treturn $ip == '127.0.0.1' || preg_match('/^(192\\.168|172\\.16|10)\\./S', $ip);\n\t}", "title": "" }, { "docid": "63b99a2e41dc2de5d1bd2973c20c4f2f", "score": "0.5459011", "text": "public function isDevMode();", "title": "" }, { "docid": "4295e551a94e0092b84ef30843456ec2", "score": "0.5453769", "text": "public static function platformSeenFromHeadquarter()\n {\n return (\n isset(\\Yii::$app->params['seeLoginFormAllowedIps']) &&\n is_array(\\Yii::$app->params['seeLoginFormAllowedIps']) &&\n !empty(\\Yii::$app->params['seeLoginFormAllowedIps']) &&\n in_array($_SERVER['REMOTE_ADDR'], \\Yii::$app->params['seeLoginFormAllowedIps'])\n );\n }", "title": "" }, { "docid": "233fe3340506bb368059c51dd0e8ea67", "score": "0.5448916", "text": "protected function _isEnabled()\n {\n if (array_key_exists('SHELL', $_ENV)) {\n return false;\n }\n\n return extension_loaded('xcache');\n }", "title": "" }, { "docid": "b03a2533002b919f0062aed37e935fd4", "score": "0.5443873", "text": "static function isTheConsoleVeryCrappy()\n {\n // Sublime Text's embedded console.\n if (isset($_SERVER['__COMPAT_LAYER'])) return true;\n return false;\n }", "title": "" }, { "docid": "7bbb9a3f209f59b789937ab7a50b2309", "score": "0.54407024", "text": "function is_cli()\n {\n return php_sapi_name() == 'cli';\n }", "title": "" }, { "docid": "224ad6043a12c84da660dd61e048e654", "score": "0.5438547", "text": "static public function isPhpCliMode()\n\t{\n\t\treturn\tPHP_SAPI == 'cli' ||\n\t\t\t\t(substr(PHP_SAPI, 0, 3) == 'cgi' && @$_SERVER['REMOTE_ADDR'] == '');\n\t}", "title": "" }, { "docid": "92532bdb9fe1abfb657fd950a7bc3c7a", "score": "0.5435477", "text": "public function isConsole()\n {\n return php_sapi_name() == 'cli';\n }", "title": "" }, { "docid": "0e24f256c35dafb645d73198b1bb9ae7", "score": "0.54334456", "text": "function is_available(){\n\t\t//return false;\n\t\treturn function_exists('apc_fetch');\n\t}", "title": "" }, { "docid": "7c244ad4a58617b43113d1fe70c9e3bb", "score": "0.54204345", "text": "public static function exec_enabled(): bool\n {\n # (1) Ensure `exec()` exists\n $function_exists = function_exists('exec');\n\n # (2) Ensure that `exec()` isn't disabled\n # TODO: Handle `ini_get()` being disabled, too\n $not_disabled = !in_array('exec', array_map('trim', explode(', ', ini_get('disable_functions'))));\n\n if ($not_disabled === false && @exec('echo EXEC') == 'EXEC') {\n $not_disabled = true;\n }\n\n # (3) Ensure that safe mode is off\n $no_safe_mode = !(strtolower(ini_get('safe_mode')) != 'off');\n\n $answers = array_filter([\n 'function_exists' => $function_exists,\n 'not_disabled' => $not_disabled,\n 'no_safe_mode' => $no_safe_mode,\n ]);\n\n if (empty($answers)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "5356be416097a8d102690ba55d89434c", "score": "0.54170924", "text": "abstract public function isSupported();", "title": "" }, { "docid": "5356be416097a8d102690ba55d89434c", "score": "0.54170924", "text": "abstract public function isSupported();", "title": "" }, { "docid": "25852b5c5a9837e4eef122c25e3a320f", "score": "0.5413959", "text": "function CheckUnix () {\n \n $server = strtoupper (getenv('SERVER_SOFTWARE'));\n \n if (strstr ($server, 'UNIX')) {\n return (TRUE);\n } // if\n \n return (FALSE);\n }", "title": "" }, { "docid": "a348a8026405e9173d4d52309179e158", "score": "0.5401678", "text": "public static function cli() : bool\n {\n return PHP_SAPI == 'cli';\n }", "title": "" }, { "docid": "dff1c8dbd94dc9ffcdd1146d1f0c9137", "score": "0.53970164", "text": "public function getPlatformServiceMode(): bool;", "title": "" }, { "docid": "2bc198c336d1b4a5994d4eed64ef0477", "score": "0.5395612", "text": "function is_php($version = '5.0.0')\n{\n\tstatic $_is_php;\n\t$version = (string)$version;\n\t\n\tif ( ! isset($_is_php[$version]))\n\t{\n\t\t$_is_php[$version] = (version_compare(PHP_VERSION, $version) < 0) ? FALSE : TRUE;\n\t}\n\n\treturn $_is_php[$version];\n}", "title": "" }, { "docid": "1ce54fc7445caf8e244c4b8225ac2073", "score": "0.53950405", "text": "public function is_extension_installed()\n {\n return function_exists(\"pg_connect\");\n }", "title": "" }, { "docid": "a8d20419e5b1b3d0c83ecad3925756b1", "score": "0.5392718", "text": "function is_php($version)\n\t{\n\t\tstatic $_is_php;\n\t\t$version = (string) $version;\n\n\t\tif ( ! isset($_is_php[$version]))\n\t\t{\n\t\t\t$_is_php[$version] = version_compare(PHP_VERSION, $version, '>=');\n\t\t}\n\n\t\treturn $_is_php[$version];\n\t}", "title": "" }, { "docid": "e7d35c24c69d79562f9223e2b28462fb", "score": "0.5386958", "text": "public static function isSupported() {\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "4f63852d416dd90a275d5f3b488a286f", "score": "0.5386556", "text": "public function is_cli() {\n return php_sapi_name() == \"cli\";\n }", "title": "" }, { "docid": "1521c402b8ec2519eb9fb64df0bfb587", "score": "0.53822553", "text": "public static function isKeePassPHPVersionSupported()\n\t{\n\t\treturn defined(\"\\KeePassPHP\\KeePassPHP::API_VERSION\") &&\n\t\t\t\\KeePassPHP\\KeePassPHP::API_VERSION >= 1;\n\t}", "title": "" }, { "docid": "456860c204767eb4e34fa48ab763af15", "score": "0.5369381", "text": "function win() {\n\treturn (substr(PHP_OS, 0, 3) == 'WIN') ? true : false;\n}", "title": "" }, { "docid": "f676adc09e82c05ba82110a19f8cfe3b", "score": "0.5368627", "text": "private function _isProd() {\n //Josh- Production mode now always loads assests like dev mode.\n //return Configure::read('debug') == 0;\n return false;\n }", "title": "" }, { "docid": "5bb376a89a2a8e4860cfe9a4a2aa8faf", "score": "0.5367062", "text": "function is_php($version = '5.0.0')\n {\n static $_is_php;\n $version = (string)$version;\n\n if (!isset($_is_php[$version])) {\n $_is_php[$version] = (version_compare(PHP_VERSION, $version) < 0) ? FALSE : TRUE;\n }\n\n return $_is_php[$version];\n }", "title": "" }, { "docid": "f22c177d5487c58f0fb35531bd071964", "score": "0.53640735", "text": "private function meets_requirements() {\n\n if ( ! class_exists( 'GamiPress' ) ) {\n return false;\n }\n\n return true;\n\n }", "title": "" }, { "docid": "7258430c58a3b828627a16ee94ef23d1", "score": "0.5363428", "text": "function service_is_a_php_on_this_server($url)\n{\n// print \"<br>service_is_a_php_on_this_server($url)<br>\";\n global $HOST;\n global $PORT;\n global $DOCROOT;\n \n $FILEPATH=null;\n \n if ($PORT<>'') \n $PORTEXPR=\":$PORT\";\n \n $SERVEREXPR=\"http://$HOST$PORTEXPR\";\n \n// print \"<br>Checking Server params\";\n// print \"<br>HOST: $HOST\";\n// print \"<br>PORT: $PORT\";\n// print \"<br>DOCROOT: $DOCROOT\";\n// print \"<br>SERVEREXPR: $SERVEREXPR\";\n// print \"<br>strstr($url,$SERVEREXPR)=\".strstr($url,$SERVEREXPR);\n\n if (strstr($url,$SERVEREXPR))\n {\n // Try to identify if path is on the same machine\n \n $FILEPATH=str_replace($SERVEREXPR,$DOCROOT,$url);\n // cut str from '?' inclusive on\n $pos = strrpos($FILEPATH, '?');\n if (!($pos === false)) {\n $QSPARAMS=substr($FILEPATH,$pos+1); // stuff rights from '?'\n $FILEPATH=substr($FILEPATH,0,$pos-1); // stuff left of '?'\n } \n \n// print \"<br><br>Try to test existence of file ($FILEPATH)\";\n \n if (file_exists($FILEPATH))\n {\n// print \" <b>SUCCESS</b> ($FILEPATH) \";\n }\n else {\n// print \" NOTFOUND ($FILEPATH) \";\n $FILEPATH='';\n } }\n \n// print \"<br>Returning path: $FILEPATH\";\n// print \"<br>Returning qsparams: $QSPARAMS\";\n \n return array($FILEPATH,$QSPARAMS);\n}", "title": "" }, { "docid": "9b1e98d91262e13e66bd7ce4f42aa0ab", "score": "0.5358671", "text": "public function inConsole()\n {\n return PHP_SAPI == 'cli';\n }", "title": "" }, { "docid": "853b1d8df987e79de9ffeb75576dce39", "score": "0.535335", "text": "public function isSupported();", "title": "" }, { "docid": "853b1d8df987e79de9ffeb75576dce39", "score": "0.535335", "text": "public function isSupported();", "title": "" }, { "docid": "af3d76a2ec1f1e225cb91b5e0a2d5f65", "score": "0.5352867", "text": "public function isRunning()\r\r\n {\r\r\n if ($this->running) {\r\r\n return true;\r\r\n }\r\r\n\r\r\n try {\r\r\n $this->client->get('guzzle-server/perf', array(), array('timeout' => 5))->send();\r\r\n $this->running = true;\r\r\n return true;\r\r\n } catch (\\Exception $e) {\r\r\n return false;\r\r\n }\r\r\n }", "title": "" }, { "docid": "a2da57a21cb5046b7d89c2cc21ed0b9d", "score": "0.53333455", "text": "private function reloadEnabled(): bool {\n return getenv('DEVELOPMENT_SETTINGS') ? TRUE : FALSE;\n }", "title": "" }, { "docid": "1bbfb4c24d67e5cd6ed29a5607550fcb", "score": "0.53250396", "text": "private static function canStart()\n {\n return !defined('NO_SESSION') || defined('FORCE_SESSION_START');\n }", "title": "" }, { "docid": "ce1586359ba89b3318b5f5cf80876583", "score": "0.5324963", "text": "public function is_supported()\n {\n return TRUE;\n }", "title": "" }, { "docid": "f786dfb380152c97bbb098e663e9d7c4", "score": "0.5320001", "text": "function isSpipEnabled()\r\n {\r\n if (defined(\"ADHERENT_USE_SPIP\") && (ADHERENT_USE_SPIP == 1))\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "title": "" } ]
fb73d71e05a32ce41ec6ccb45aa80969
Implements hook_preprocess_field(). Places fontawesome icons in front of field collections on jura_subject nodes.
[ { "docid": "91cfbf8a58ac9cf80d545b66bf8774fd", "score": "0.7649992", "text": "function juraport_theme_preprocess_field(&$variables, $hook) {\n $field_name = $variables['element']['#field_name'];\n $field_type = $variables['element']['#field_type'];\n $bundle = $variables['element']['#bundle'];\n\n // Place an info-icon at the information-box title\n if ($field_name == 'field_information_box_title') {\n $variables['items'][0]['#prefix'] = '<i class=\"fa fa-info-circle fa-lg\"></i>';\n }\n\n // Special handling for the field collections on the jura_subject nodes.\n if ($bundle == 'jura_subject' && $field_type == 'field_collection') {\n $prefix = '';\n\n if ($field_name == 'field_jura_subject_laws_rules') {\n $prefix = '<i class=\"fa fa-key fa-2x\"></i>';\n }\n else if ($field_name == 'field_jura_subject_online') {\n $prefix = '<i class=\"fa fa-globe fa-2x\"></i>';\n }\n else if ($field_name == 'field_jura_subject_lawtext_rules') {\n $prefix = '<i class=\"fa fa-institution fa-2x\"></i>';\n }\n else if ($field_name == 'field_jura_subject_loan') {\n $prefix = '<i class=\"fa fa-book fa-2x\"></i>';\n }\n else if ($field_name == 'field_jura_subject_network') {\n $prefix = '<i class=\"fa fa-group fa-2x\"></i>';\n }\n\n $variables['label'] = $prefix . '<h3 class=\"field-label-text\">' . $variables['label'] . '</h3>';\n\n // Add our custom template suggestion.\n $variables['theme_hook_suggestions'][] = 'field__field_collection__jura_subject';\n }\n}", "title": "" } ]
[ { "docid": "db45ee3d842e2ce5579312dafe743edc", "score": "0.6435007", "text": "function pixelgarage_preprocess_field(&$vars) {\n //\n // add icons to category fields\n $element = $vars['element'];\n\n if ($element['#field_name'] === 'field_category' || $element['#field_name'] === 'field_category_multiple') {\n foreach($element['#items'] as $index => $item) {\n $vars['items_classes'][$index] = 'category-' . $element['#items'][$index]['tid'];\n }\n }\n}", "title": "" }, { "docid": "7bb66e61349a100ed575146472ac8ec0", "score": "0.58079934", "text": "function kp_nodes_preprocess_tripal_organism_base(&$variables) {\n\n $variables['organism'] = $variables['node']->organism;\n $variables['organism'] = chado_expand_var($variables['organism'],'field','organism.comment');\n\n // Render the image with link to attribution.\n //-------------------------------------------\n $lang = isset($data->language) ? $data->language : LANGUAGE_NONE;\n\n // Retrieve the field collection details.\n $image_fieldcollection_id = $variables['node']->field_image_with_source[$lang][0]['value'];\n $image_fieldcollection = entity_load('field_collection_item', array($image_fieldcollection_id));\n $image_fieldcollection = $image_fieldcollection[$image_fieldcollection_id];\n\n // Render the image.\n $image_link = image_style_url('large', $image_fieldcollection->field_image[$lang][0]['uri']);\n if (!file_exists($image_link)) {\n $success = image_style_create_derivative('large', $image_fieldcollection->field_image[$lang][0]['uri'], $image_link);\n }\n $image = '<img src=\"'.$image_link.'\">';\n $image = render($image);\n\n // Wrap image in link.\n if (empty($image_fieldcollection->field_image_link)) {\n $variables['rendered_organism_image'] = $image;\n }\n else {\n $variables['rendered_organism_image'] = l(\n $image,\n $image_fieldcollection->field_image_link[$lang][0]['url'],\n array(\n 'html' => TRUE,\n 'attributes' => $image_fieldcollection->field_image_link[$lang][0]['attributes']\n )\n );\n }\n\n\n}", "title": "" }, { "docid": "4f3d342af10a390173abd19440d64b7c", "score": "0.5648096", "text": "public function iconize_taxonomy_add_form_fields() {\n\t\t?>\n\t\t<div class=\"form-field\">\n\t\t\t<label class=\"preview-icon-label\">\n\t\t\t\t<?php _e( 'Icon: ', $this->plugin_slug ); ?><br /><button type=\"button\" class=\"preview-icon button iconized-hover-trigger\"><span class=\"iconized\"></span></button>\n\t\t\t</label>\n\t\t\t<span>\n\t\t\t\t<input type=\"hidden\" id=\"icon_name\" name=\"icon_name\" class=\"iconize-input-name\" value=\"\">\n\t\t\t\t<input type=\"hidden\" id=\"icon_set\" name=\"icon_set\" class=\"iconize-input-set\" value=\"\">\n\t\t\t\t<input type=\"hidden\" id=\"icon_transform\" name=\"icon_transform\" class=\"iconize-input-transform\" value=\"\">\n\t\t\t\t<input type=\"hidden\" id=\"icon_color\" name=\"icon_color\" class=\"iconize-input-color\" value=\"\">\n\t\t\t\t<input type=\"hidden\" id=\"icon_size\" name=\"icon_size\" class=\"iconize-input-size\" value=\"\">\n\t\t\t\t<input type=\"hidden\" id=\"icon_align\" name=\"icon_align\" class=\"iconize-input-align\" value=\"\">\n\t\t\t\t<input type=\"hidden\" id=\"icon_custom_classes\" name=\"icon_custom_classes\" class=\"iconize-input-custom-classes\" value=\"\">\n\t\t\t</span>\n\t\t</div>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "98de7fe905c5e546fcf49cea83e20e92", "score": "0.55978084", "text": "function globallink_insert_fc_item_fields($content_type, $parent_field_name, $field_name) {\n $fc_field_info = field_info_field($field_name);\n $fc_field_instance = field_info_instance('field_collection_item', $field_name, $parent_field_name);\n\n switch ($fc_field_info['type']) {\n case 'list_boolean':\n case 'file':\n case 'taxonomy_term_reference':\n break;\n case 'field_collection':\n db_insert('globallink_field_config')\n ->fields(array(\n 'content_type' => $content_type,\n 'entity_type' => 'field_collection_item',\n 'bundle' => $parent_field_name,\n 'field_name' => $field_name,\n 'field_type' => $fc_field_info['type'],\n 'field_label' => $fc_field_instance['label'],\n 'translatable' => 0,\n ))->execute();\n\n $fc_field_infos = field_info_instances('field_collection_item');\n\n if (isset($fc_field_infos) && isset($fc_field_infos[$field_name]) && is_array($fc_field_infos[$field_name])) {\n $fc_items = array_keys($fc_field_infos[$field_name]);\n\n foreach ($fc_items as $fc_item) {\n globallink_insert_fc_item_fields($content_type, $field_name, $fc_item);\n }\n }\n\n break;\n default:\n $translatable = 1;\n\n db_insert('globallink_field_config')\n ->fields(array(\n 'content_type' => $content_type,\n 'entity_type' => 'field_collection_item',\n 'bundle' => $parent_field_name,\n 'field_name' => $field_name,\n 'field_type' => $fc_field_info['type'],\n 'field_label' => $fc_field_instance['label'],\n 'translatable' => $translatable,\n ))->execute();\n }\n}", "title": "" }, { "docid": "3be270ccc0c6365a33cec654b7b6b313", "score": "0.5588808", "text": "function feed_item_field_attach(&$form, &$form_state) {\r\n $feed = $form_state['#feed'];\r\n \r\n $form['feed_item_field'] = array();\r\n $form['feed_item_field']['#type'] = 'feed_item_field_attach';\r\n $form['feed_item_field']['#tree'] = TRUE;\r\n \r\n if (!empty($feed->fid)) {\r\n $feed_fields = feed_load_fields($feed, TRUE);\r\n feed_field_build_tree($feed_fields);\r\n \r\n foreach ($feed_fields as $feed_field) {\r\n if (!isset($form['feed_item_field']['item-fields'])) {\r\n $form['feed_item_field']['item-fields'] = array('#tree' => TRUE);\r\n }\r\n \r\n $form['feed_item_field']['item-fields'][$feed_field->ffid] = array(\r\n '#tree' => TRUE, \r\n '#depth' => $feed_field->depth,\r\n '#weight' => isset($feed_field->data['weight']) ? $feed_field->data['weight'] : 0,\r\n );\r\n \r\n $form['feed_item_field']['item-fields'][$feed_field->ffid]['id'] = array(\r\n '#type' => 'hidden',\r\n '#value' => !empty($feed_field->ffid) ? $feed_field->ffid : NULL,\r\n '#attributes' => array(\r\n 'class' => array('item-field-id'),\r\n ),\r\n );\r\n $form['feed_item_field']['item-fields'][$feed_field->ffid]['name'] = array(\r\n '#type' => 'markup',\r\n '#markup' => !empty($feed_field->name) ? $feed_field->name : 'No Label',\r\n '#attributes' => array('class' => array('item-field-name')),\r\n '#title_display' => 'invisible',\r\n '#title' => t('Label'),\r\n );\r\n $form['feed_item_field']['item-fields'][$feed_field->ffid]['weight'] = array(\r\n '#type' => 'weight',\r\n '#delta' => 50,\r\n '#default_value' => isset($feed_field->data['weight']) ? $feed_field->data['weight'] : 0,\r\n '#title_display' => 'invisible',\r\n '#title' => t('Weight for field'),\r\n '#attributes' => array('class' => array('item-field-weight')),\r\n );\r\n $form['feed_item_field']['item-fields'][$feed_field->ffid]['parent'] = array(\r\n '#type' => 'hidden',\r\n '#default_value' => !empty($feed_field->pffid) ? $feed_field->pffid : NULL,\r\n '#attributes' => array(\r\n 'class' => array('item-field-parent'),\r\n ),\r\n );\r\n $form['feed_item_field']['item-fields'][$feed_field->ffid]['tag'] = array(\r\n '#type' => 'hidden',\r\n '#prefix' => !empty($feed_field->tag) ? $feed_field->tag : 'No Tag',\r\n '#value' => !empty($feed_field->tag) ? $feed_field->tag : '',\r\n '#attributes' => array('class' => array('item-field-machine-name')),\r\n );\r\n $form['feed_item_field']['item-fields'][$feed_field->ffid]['type'] = array(\r\n '#type' => 'markup',\r\n '#markup' => !empty($feed_field->type) ? $feed_field->type : '',\r\n );\r\n $form['feed_item_field']['item-fields'][$feed_field->ffid]['settings'] = array(\r\n '#type' => 'link',\r\n '#title' => t('Settings'),\r\n '#href' => \"feed/{$feed->fid}/fields/{$feed_field->ffid}\",\r\n '#options' => array('attributes' => array('title' => t('Edit feed field settings.'))),\r\n );\r\n }\r\n }\r\n \r\n // Add New field attribute.\r\n $form['feed_item_field']['add-item-field'] = array('#tree' => TRUE);\r\n $form['feed_item_field']['add-item-field']['name'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('New field label'),\r\n '#title_display' => 'invisible',\r\n '#size' => 15,\r\n '#description' => t('Feed item field label'),\r\n );\r\n $form['feed_item_field']['add-item-field']['weight'] = array(\r\n '#type' => 'weight',\r\n '#delta' => 50,\r\n '#default_value' => 0,\r\n '#title_display' => 'invisible',\r\n '#title' => t('Weight for new field'),\r\n '#description' => t('Weight'),\r\n '#attributes' => array(\r\n 'class' => array('item-field-weight'),\r\n ),\r\n );\r\n $form['feed_item_field']['add-item-field']['parent'] = array(\r\n '#type' => 'hidden',\r\n '#default_value' => '',\r\n '#title_display' => 'invisible',\r\n '#attributes' => array(\r\n 'class' => array('item-field-parent'),\r\n ),\r\n );\r\n $form['feed_item_field']['add-item-field']['tag'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('New field tag name'),\r\n '#title_display' => 'invisible',\r\n '#description' => t('Tag of this field'),\r\n );\r\n $form['feed_item_field']['add-item-field']['type'] = array(\r\n '#type' => 'select',\r\n '#title' => t('Type of new field'),\r\n '#title_display' => 'invisible',\r\n '#options' => feed_field_type_options(),\r\n '#empty_option' => t('- Select a type -'),\r\n '#description' => t('Type of field.'),\r\n '#attributes' => array('class' => array('item-field-type')),\r\n );\r\n}", "title": "" }, { "docid": "2c1a448b8d54310c30a3b1563f2be1a4", "score": "0.5448824", "text": "function dlts_book_preprocess_field(&$vars) {\n\n $language = 'en';\n\n $query_parameters = drupal_get_query_parameters();\n\n if (isset($query_parameters['lang'])) {\n $language = filter_xss($query_parameters['lang']);\n }\n\n // Sadly, translations for field labels was removed from Drupal 7.1, even\n // though the string translations are stored in the database, Drupal core\n // does not render them translated. Thus, we are forced to either install\n // i18n_fields module, or the less performance intensive solution: pass the\n // labels through the t() function in a preprocess function.\n //\n // See http://drupal.org/node/1169798, http://drupal.org/node/1157426,\n // and http://drupal.org/node/1157512 for more information.\n if (!empty($vars['label'])) {\n $vars['label'] = locale($vars['label'], $vars['element']['#field_name'] . ':' . $vars['element']['#bundle'] . ':label', $language);\n }\n\n if ($vars['element']['#field_name'] == 'field_pdf_file') {\n $vars['label'] = t('PDF');\n foreach ($vars['items'] as $key => $value) {\n if (isset( $value['#markup'])) {\n preg_match('/\\/(.*)\\/(.*){1}_(.*).pdf{1}/', $value['#markup'], $matches);\n if (isset($matches) && isset( $matches[3])) {\n if ($matches[3] == 'hi') {\n $pdf_link_text = t('High resolution');\n }\n else {\n $pdf_link_text = t('Low resolution');\n }\n\n $vars['items'][$key]['#markup'] = '<span class=\"field-item pdf-'. $matches[3] .'\">' . l( $pdf_link_text, $value['#markup'], array('attributes' => array('target' => '_blank'))) . '</span>';\n\n }\n }\n }\n }\n\n if ($vars['element']['#field_name'] == 'field_language_code') {\n // Run the language code through dlts_book_language() to get a human readable language type from IA the language code\n // Label is changed in field--field-language-code--dlts-book.tpl.php\n $vars['items']['0']['#markup'] = dlts_book_language($vars['items']['0']['#markup'] );\n }\n\n}", "title": "" }, { "docid": "155f716830ce813539eefa095a509e2f", "score": "0.542188", "text": "private function add_fields_custom_labels() {\n\n $fields = array(\n PTB_Custom_Taxonomy::CL_SEARCH_ITEMS => __('Search Items', 'ptb'),\n PTB_Custom_Taxonomy::CL_POPULAR_ITEMS => __('Popular Items', 'ptb'),\n PTB_Custom_Taxonomy::CL_ALL_ITEMS => __('All Items', 'ptb'),\n PTB_Custom_Taxonomy::CL_PARENT_ITEM => __('Parent Item', 'ptb'),\n PTB_Custom_Taxonomy::CL_PARENT_ITEM_COLON => __('Parent Item Colon', 'ptb'),\n PTB_Custom_Taxonomy::CL_EDIT_ITEM => __('Edit Item', 'ptb'),\n PTB_Custom_Taxonomy::CL_UPDATE_ITEM => __('Update Item', 'ptb'),\n PTB_Custom_Taxonomy::CL_ADD_NEW_ITEM => __('Add New Item', 'ptb'),\n PTB_Custom_Taxonomy::CL_NEW_ITEM_NAME => __('New Item Name', 'ptb'),\n PTB_Custom_Taxonomy::CL_SEPARATE_ITEMS_WITH_COMMAS => __('Separate Items With Commas', 'ptb'),\n PTB_Custom_Taxonomy::CL_ADD_OR_REMOVE_ITEMS => __('Add or Remove Items', 'ptb'),\n PTB_Custom_Taxonomy::CL_CHOOSE_FROM_MOST_USED => __('Choose From Most Used', 'ptb'),\n PTB_Custom_Taxonomy::CL_MENU_NAME => __('Menu Name', 'ptb'),\n );\n\n\n // Set custom labels default values\n $languages = PTB_Utils::get_all_languages();\n\n foreach ($languages as $code => $lng) {\n $this->ctx->search_items[$code] = !empty($this->ctx->search_items[$code]) ? $this->ctx->search_items[$code] : __('Search %s', 'ptb');\n $this->ctx->popular_items[$code] = !empty($this->ctx->popular_items[$code])? $this->ctx->popular_items[$code] : __('Popular %s', 'ptb');\n $this->ctx->all_items[$code] = !empty($this->ctx->all_items[$code])? $this->ctx->all_items[$code] : __('All %s', 'ptb');\n $this->ctx->parent_item[$code] = !empty($this->ctx->parent_item[$code])? $this->ctx->parent_item[$code] : __('Parent %s', 'ptb');\n $this->ctx->parent_item_colon[$code] = !empty($this->ctx->parent_item_colon[$code])? $this->ctx->parent_item_colon[$code] : __('Parent %s:', 'ptb');\n $this->ctx->edit_item[$code] = !empty($this->ctx->edit_item[$code])? $this->ctx->edit_item[$code] : __('Edit %s', 'ptb');\n $this->ctx->update_item[$code] = !empty($this->ctx->update_item[$code]) ? $this->ctx->update_item[$code] : __('Update %s', 'ptb');\n $this->ctx->add_new_item[$code] = !empty($this->ctx->add_new_item[$code])? $this->ctx->add_new_item[$code] : __('Add New %s', 'ptb');\n $this->ctx->new_item_name[$code] = !empty($this->ctx->new_item_name[$code])? $this->ctx->new_item_name[$code] : __('New %s Name', 'ptb');\n $this->ctx->separate_items_with_commas[$code] = !empty($this->ctx->separate_items_with_commas[$code])? $this->ctx->separate_items_with_commas[$code] : __('Separate %s with commas', 'ptb');\n $this->ctx->add_or_remove_items[$code] = !empty($this->ctx->add_or_remove_items[$code])? $this->ctx->add_or_remove_items[$code] : __('Add or remove %s', 'ptb');\n $this->ctx->choose_from_most_used[$code] = !empty($this->ctx->choose_from_most_used[$code])? $this->ctx->choose_from_most_used[$code] : __('Choose from the most used %s', 'ptb');\n $this->ctx->menu_name[$code] = !empty($this->ctx->menu_name[$code])? $this->ctx->menu_name[$code] : __('%s', 'ptb');\n }\n foreach ($fields as $key => $label) {\n\n add_settings_field(\n $this->get_field_id($key), $label, array($this, 'add_fields_custom_labels_cb'), $this->slug_admin_ctx, $this->settings_section_cl, array(\n 'label_for' => $this->get_field_id($key),\n 'referrer' => $key\n )\n );\n }\n }", "title": "" }, { "docid": "41f333d13a8e3b3bfc5825955aa08e83", "score": "0.5418278", "text": "function fusion_element_font_awesome() {\n\n\tglobal $fusion_settings;\n\n\tfusion_builder_map(\n\t\tfusion_builder_frontend_data(\n\t\t\t'FusionSC_FontAwesome',\n\t\t\t[\n\t\t\t\t'name' => esc_attr__( 'Font Awesome Icon', 'fusion-builder' ),\n\t\t\t\t'shortcode' => 'fusion_fontawesome',\n\t\t\t\t'icon' => 'fusiona-flag',\n\t\t\t\t'preview' => FUSION_BUILDER_PLUGIN_DIR . 'inc/templates/previews/fusion-font-awesome-preview.php',\n\t\t\t\t'preview_id' => 'fusion-builder-block-module-font-awesome-preview-template',\n\t\t\t\t'help_url' => 'https://theme-fusion.com/documentation/fusion-builder/elements/font-awesome-icon-element/',\n\t\t\t\t'params' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'iconpicker',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Select Icon', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'icon',\n\t\t\t\t\t\t'value' => 'fa-font-awesome-flag fab',\n\t\t\t\t\t\t'description' => esc_attr__( 'Click an icon to select, click again to deselect.', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Size of Icon', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Set the size of the icon. In pixels (px), ex: 13px.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'size',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Flip Icon', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Choose to flip the icon.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'flip',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'' => esc_attr__( 'None', 'fusion-builder' ),\n\t\t\t\t\t\t\t'horizontal' => esc_attr__( 'Horizontal', 'fusion-builder' ),\n\t\t\t\t\t\t\t'vertical' => esc_attr__( 'Vertical', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Rotate Icon', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Choose to rotate the icon.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'rotate',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'' => esc_attr__( 'None', 'fusion-builder' ),\n\t\t\t\t\t\t\t'90' => '90',\n\t\t\t\t\t\t\t'180' => '180',\n\t\t\t\t\t\t\t'270' => '270',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Spinning Icon', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Choose to let the icon spin.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'spin',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'yes' => esc_attr__( 'Yes', 'fusion-builder' ),\n\t\t\t\t\t\t\t'no' => esc_attr__( 'No', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'dimension',\n\t\t\t\t\t\t'remove_from_atts' => true,\n\t\t\t\t\t\t'heading' => esc_attr__( 'Margin', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => __( 'Spacing around the font awesome icon. In px, em or %, e.g. 10px. <strong>Note:</strong> Leave empty for automatic margin calculation, based on alignment and icon size.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'margin',\n\t\t\t\t\t\t'group' => esc_attr__( 'Design', 'fusion-builder' ),\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'margin_top' => '',\n\t\t\t\t\t\t\t'margin_right' => '',\n\t\t\t\t\t\t\t'margin_bottom' => '',\n\t\t\t\t\t\t\t'margin_left' => '',\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'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Icon in Circle', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Choose to display the icon in a circle.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'circle',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'yes' => esc_attr__( 'Yes', 'fusion-builder' ),\n\t\t\t\t\t\t\t'no' => esc_attr__( 'No', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => 'yes',\n\t\t\t\t\t\t'group' => esc_attr__( 'Design', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'colorpickeralpha',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Icon Color', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Controls the color of the icon. ', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'iconcolor',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'default' => $fusion_settings->get( 'icon_color' ),\n\t\t\t\t\t\t'group' => esc_attr__( 'Design', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'colorpickeralpha',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Icon Circle Background Color', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Controls the color of the circle. ', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'circlecolor',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'default' => $fusion_settings->get( 'icon_circle_color' ),\n\t\t\t\t\t\t'group' => esc_attr__( 'Design', 'fusion-builder' ),\n\t\t\t\t\t\t'dependency' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'circle',\n\t\t\t\t\t\t\t\t'value' => 'yes',\n\t\t\t\t\t\t\t\t'operator' => '==',\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'type' => 'colorpickeralpha',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Icon Circle Border Color', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Controls the color of the circle border. ', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'circlebordercolor',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'default' => $fusion_settings->get( 'icon_border_color' ),\n\t\t\t\t\t\t'group' => esc_attr__( 'Design', 'fusion-builder' ),\n\t\t\t\t\t\t'dependency' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'circle',\n\t\t\t\t\t\t\t\t'value' => 'yes',\n\t\t\t\t\t\t\t\t'operator' => '==',\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'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Alignment', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( \"Select the icon's alignment.\", 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'alignment',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'' => esc_attr__( 'Text Flow', 'fusion-builder' ),\n\t\t\t\t\t\t\t'center' => esc_attr__( 'Center', 'fusion-builder' ),\n\t\t\t\t\t\t\t'left' => esc_attr__( 'Left', 'fusion-builder' ),\n\t\t\t\t\t\t\t'right' => esc_attr__( 'Right', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'checkbox_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Element Visibility', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'hide_on_mobile',\n\t\t\t\t\t\t'value' => fusion_builder_visibility_options( 'full' ),\n\t\t\t\t\t\t'default' => fusion_builder_default_visibility( 'array' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Choose to show or hide the element on small, medium or large screens. You can choose more than one at a time.', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'CSS Class', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'class',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'description' => esc_attr__( 'Add a class to the wrapping HTML element.', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'CSS ID', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'id',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'description' => esc_attr__( 'Add an ID to the wrapping HTML element.', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Animation Type', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Select the type of animation to use on the element.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'animation_type',\n\t\t\t\t\t\t'value' => fusion_builder_available_animations(),\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t'group' => esc_attr__( 'Animation', 'fusion-builder' ),\n\t\t\t\t\t\t'preview' => [\n\t\t\t\t\t\t\t'selector' => '.fontawesome-icon',\n\t\t\t\t\t\t\t'type' => 'animation',\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'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Direction of Animation', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Select the incoming direction for the animation.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'animation_direction',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'down' => esc_attr__( 'Top', 'fusion-builder' ),\n\t\t\t\t\t\t\t'right' => esc_attr__( 'Right', 'fusion-builder' ),\n\t\t\t\t\t\t\t'up' => esc_attr__( 'Bottom', 'fusion-builder' ),\n\t\t\t\t\t\t\t'left' => esc_attr__( 'Left', 'fusion-builder' ),\n\t\t\t\t\t\t\t'static' => esc_attr__( 'Static', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => 'down',\n\t\t\t\t\t\t'group' => esc_attr__( 'Animation', 'fusion-builder' ),\n\t\t\t\t\t\t'dependency' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'animation_type',\n\t\t\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'preview' => [\n\t\t\t\t\t\t\t'selector' => '.fa',\n\t\t\t\t\t\t\t'type' => 'animation',\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'type' => 'range',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Speed of Animation', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Type in speed of animation in seconds (0.1 - 1).', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'animation_speed',\n\t\t\t\t\t\t'min' => '0.1',\n\t\t\t\t\t\t'max' => '1',\n\t\t\t\t\t\t'step' => '0.1',\n\t\t\t\t\t\t'value' => '0.3',\n\t\t\t\t\t\t'group' => esc_attr__( 'Animation', 'fusion-builder' ),\n\t\t\t\t\t\t'dependency' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'animation_type',\n\t\t\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'preview' => [\n\t\t\t\t\t\t\t'selector' => '.fa',\n\t\t\t\t\t\t\t'type' => 'animation',\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'type' => 'select',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Offset of Animation', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Controls when the animation should start.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'animation_offset',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'' => esc_attr__( 'Default', 'fusion-builder' ),\n\t\t\t\t\t\t\t'top-into-view' => esc_attr__( 'Top of element hits bottom of viewport', 'fusion-builder' ),\n\t\t\t\t\t\t\t'top-mid-of-view' => esc_attr__( 'Top of element hits middle of viewport', 'fusion-builder' ),\n\t\t\t\t\t\t\t'bottom-in-view' => esc_attr__( 'Bottom of element enters viewport', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t'group' => esc_attr__( 'Animation', 'fusion-builder' ),\n\t\t\t\t\t\t'dependency' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'animation_type',\n\t\t\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t\t\t'operator' => '!=',\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}", "title": "" }, { "docid": "4bd5bd88dc0da5a831ddb1e924a563dc", "score": "0.53906035", "text": "function bartik_preprocess_node(&$variables) {\n if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {\n $variables['classes_array'][] = 'node-full';\n }\n if($variables['type']=='blog'){\n $variables['content']['comments']['comment_form']['actions']['submit']['#value'] = 'Отправить';\n $variables['content']['comments']['comment_form']['comment_body']['und'][0]['value']['#title'] = 'Добавить комментарий';\n $variables['comments'] = array();\n for($i=1;$i<=$variables['comment_count'];$i++){\n $variables['comments'][$i]['author'] = $variables['content']['comments']['comments'][$i]['#comment']->name;\n $variables['comments'][$i]['date'] = date('h:m d/m/Y', $variables['content']['comments']['comments'][$i]['#comment']->created);\n $variables['comments'][$i]['body'] = $variables['content']['comments']['comments'][$i]['comment_body'][0]['#markup'];\n }\n $variables['label'] = l($variables['title'], 'http://' . $_SERVER['SERVER_NAME'] . $variables['node_url']);\n $variables['clear_label'] = $variables['title'];\n $temp = user_load($variables['uid']);\n $variables['author'] = t('Добавил ' . $temp->field_account_nick['und'][0]['value']);\n }\n drupal_add_js(array('node_type' => $variables['type']), 'setting');\n//////////////////////////////////////////////////////////////////////////////// \n if($variables['type']=='request_defile'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n if(empty($variables['content']['field_request_pers_image'])){\n drupal_add_js(array('defile_photo_pers_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('defile_photo_pers_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_music'])){\n drupal_add_js(array('defile_music_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('defile_music_none' => FALSE), 'setting');\n }\n $flag = false;\n if(!empty($variables['content']['field_request_foto'])){\n $temp = $variables['content']['field_request_foto'];\n foreach($temp as $key => $photo){\n if($key[0]!='#'){\n $variables['content']['field_request_foto'][$key]['#path']['options'] = array('attributes' => array('rel' => 'photo'));\n $flag = true;\n }\n }\n }\n if($flag == false){\n drupal_add_js(array('defile_photo_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('defile_photo_none' => FALSE), 'setting');\n }\n $flag = false;\n if(!empty($variables['content']['field_request_foto_suit'])){\n $temp = $variables['content']['field_request_foto_suit'];\n foreach($temp as $key => $photo){\n if($key[0]!='#'){\n $variables['content']['field_request_foto_suit'][$key]['#path']['options'] = array('attributes' => array('rel' => 'photo_suit'));\n $flag = true;\n }\n }\n }\n if($flag == false){\n drupal_add_js(array('defile_photo_suit_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('defile_photo_suit_none' => FALSE), 'setting');\n }\n }\n//////////////////////////////////////////////////////////////////////////////// \n if($variables['type']=='request_scene'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n if(empty($variables['content']['field_request_scene_print'])){\n drupal_add_js(array('scene_print_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('scene_print_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_scene_sound'])){\n drupal_add_js(array('scene_sound_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('scene_sound_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_scene_video'])){\n drupal_add_js(array('scene_video_none' => TRUE), 'setting');\n if(!empty($variables['content']['field_request_scene_video_link'])){\n drupal_add_js(array('scene_video_link' => $variables['field_request_scene_video_link'][0]['value']), 'setting');\n }else{\n drupal_add_js(array('scene_video_link' => FALSE), 'setting');\n }\n }else{\n drupal_add_js(array('scene_video_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_scene_rep'])){\n drupal_add_js(array('scene_rep_none' => TRUE), 'setting');\n if(!empty($variables['content']['field_request_scene_rep_link'])){\n drupal_add_js(array('scene_rep_link' => $variables['field_request_scene_rep_link'][0]['value']), 'setting');\n }else{\n drupal_add_js(array('scene_rep_link' => FALSE), 'setting');\n }\n }else{\n drupal_add_js(array('scene_rep_none' => FALSE), 'setting');\n }\n }\n//////////////////////////////////////////////////////////////////////////////// \n if($variables['type']=='request_dance'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n \n if(empty($variables['content']['field_request_dance_video_rep'])){\n drupal_add_js(array('dance_rep_none' => TRUE), 'setting');\n if(!empty($variables['content']['field_request_dance_video_r_link'])){\n drupal_add_js(array('dance_rep_link' => $variables['field_request_dance_video_r_link'][0]['value']), 'setting');\n }else{\n drupal_add_js(array('dance_rep_link' => FALSE), 'setting');\n }\n }else{\n drupal_add_js(array('dance_rep_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_dance_video'])){\n drupal_add_js(array('dance_video_none' => TRUE), 'setting');\n if(!empty($variables['content']['field_request_dance_video_link'])){\n drupal_add_js(array('dance_video_link' => $variables['field_request_dance_video_link'][0]['value']), 'setting');\n }else{\n drupal_add_js(array('dance_video_link' => FALSE), 'setting');\n }\n }else{\n drupal_add_js(array('dance_video_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_dance_music'])){\n drupal_add_js(array('dance_music_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('dance_music_none' => FALSE), 'setting');\n }\n $flag = false;\n if(!empty($variables['content']['field_request_dance_foto'])){\n $temp = $variables['content']['field_request_dance_foto'];\n foreach($temp as $key => $photo){\n if($key[0]!='#'){\n $variables['content']['field_request_dance_foto'][$key]['#path']['options'] = array('attributes' => array('rel' => 'photo'));\n $flag = true;\n }\n }\n }\n if($flag == false){\n drupal_add_js(array('dance_foto_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('dance_foto_none' => FALSE), 'setting');\n }\n }\n//////////////////////////////////////////////////////////////////////////////// \n if($variables['type']=='request_karaoke'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n \n if(empty($variables['content']['field_request_karaoke_demo'])){\n drupal_add_js(array('karaoke_demo_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('karaoke_demo_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_karaoke_text'])){\n drupal_add_js(array('karaoke_text_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('karaoke_text_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_karaoke_minus'])){\n drupal_add_js(array('karaoke_minus_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('karaoke_minus_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_karaoke_doc'])){\n drupal_add_js(array('karaoke_doc_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('karaoke_doc_none' => FALSE), 'setting');\n }\n if(empty($variables['content']['field_request_karaoke_video'])){\n drupal_add_js(array('karaoke_video_none' => TRUE), 'setting');\n if(!empty($variables['content']['field_request_karaoke_video_link'])){\n drupal_add_js(array('karaoke_video_link' => $variables['field_request_karaoke_video_link'][0]['value']), 'setting');\n }else{\n drupal_add_js(array('karaoke_video_link' => FALSE), 'setting');\n }\n }else{\n drupal_add_js(array('karaoke_video_none' => FALSE), 'setting');\n }\n }\n////////////////////////////////////////////////////////////////////////////////\n if($variables['type']=='request_amv'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n if(empty($variables['content']['field_request_amv_video'])){\n drupal_add_js(array('amv_video_none' => TRUE), 'setting');\n if(!empty($variables['content']['field_request_amv_video_link'])){\n drupal_add_js(array('amv_video_link' => $variables['field_request_amv_video_link'][0]['value']), 'setting');\n }else{\n drupal_add_js(array('amv_video_link' => FALSE), 'setting');\n }\n }else{\n drupal_add_js(array('amv_video_none' => FALSE), 'setting');\n }\n }\n////////////////////////////////////////////////////////////////////////////////\n if($variables['type']=='request_write'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n if(empty($variables['content']['field_request_fanfic_text'])){\n drupal_add_js(array('fanfic_text_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('fanfic_text_none' => FALSE), 'setting');\n }\n }\n////////////////////////////////////////////////////////////////////////////////\n if($variables['type']=='request_master'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n }\n////////////////////////////////////////////////////////////////////////////////\n if($variables['type']=='request_handmade'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n $flag = false;\n if(!empty($variables['content']['field_request_handmade_foto'])){\n $temp = $variables['content']['field_request_handmade_foto'];\n foreach($temp as $key => $photo){\n if($key[0]!='#'){\n $variables['content']['field_request_handmade_foto'][$key]['#path']['options'] = array('attributes' => array('rel' => 'photo'));\n $flag = true;\n }\n }\n }\n if($flag == false){\n drupal_add_js(array('handmade_foto_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('handmade_foto_none' => FALSE), 'setting');\n }\n }\n////////////////////////////////////////////////////////////////////////////////\n if($variables['type']=='request_foto'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n $flag = false;\n if(!empty($variables['content']['field_request_foto_foto'])){\n $temp = $variables['content']['field_request_foto_foto'];\n foreach($temp as $key => $photo){\n if($key[0]!='#'){\n $variables['content']['field_request_foto_foto'][$key]['#path']['options'] = array('attributes' => array('rel' => 'photo'));\n $flag = true;\n }\n }\n }\n if($flag == false){\n drupal_add_js(array('foto_foto_none' => TRUE), 'setting');\n }else{\n drupal_add_js(array('foto_foto_none' => FALSE), 'setting');\n }\n }\n////////////////////////////////////////////////////////////////////////////////\n if($variables['type']=='request_market'){\n if($variables['field_request_state'][0]['value']==\"На рассмотрении\"){\n drupal_add_js(array('reques_status_color' => '#FADB61'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Отклонена\"){\n drupal_add_js(array('reques_status_color' => '#FE4F58'), 'setting');\n }\n if($variables['field_request_state'][0]['value']==\"Принята\"){\n drupal_add_js(array('reques_status_color' => '#3CEC1B'), 'setting');\n }\n }\n}", "title": "" }, { "docid": "4ca9010351dce1ab642425747f64c635", "score": "0.53566825", "text": "function taxonomy_add_form(){\n\t\t?>\n\t\t<div class=\"form-field term-image-wrap\">\n\t\t\t<label><?php echo $this->labels['fieldTitle']; ?></label>\n\t\t\t<?php $this->taxonomy_term_image_field(); ?>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "737590327098d10d1a65720d85c2fa1d", "score": "0.5356366", "text": "function my_theme_preprocess_node(&$vars) {\n $vars['submitted'] = $vars['date'] . ' — ' . $vars['name'];\n}", "title": "" }, { "docid": "17b2ed6c00c0df6020314d57d0f651e5", "score": "0.5351723", "text": "function gp_homepage_preprocess_node_project(&$vars) {\n\n\t\n //$email_link = drupal_get_form('invite_form');\n // echo \"<pre>\"; print_r($email_link); exit;\n if(!empty($vars['node']->field_proj_datetime[0]['value'])) {\n $vars['proj_datetime'] = $vars['node']->field_proj_datetime[0]['value'];\n\n }\n if(!empty($vars['node']->field_project_budget[0]['value'])) {\n $vars['proj_budget'] = $vars['node']->field_project_budget[0]['value'];\n\n }\n if(!empty($vars['node']->field_proj_directions[0]['value'])) {\n $vars['proj_directions'] = $vars['node']->field_proj_directions[0]['value'];\n }\n if(!empty($vars['node']->field_add_details[0]['value'])) {\n $vars['proj_add_details'] = $vars['node']->field_add_details[0]['value'];\n }\n if(isset($vars['node']->taxonomy)) {\n\n $voc_resultset = db_query(\"select voc.vid as vid, voc.name as voc_name from vocabulary voc\");\n $voc_array = array();\n\n while($row = db_fetch_object($voc_resultset)) {\n $voc_array[$row->voc_name] = $row->vid;\n }\n\n foreach($vars['node']->taxonomy as $taxonomy) {\n $taxonomy_voc_name = array_search($taxonomy->vid, $voc_array);\n\n if(!empty($taxonomy_voc_name)) {\n switch ($taxonomy_voc_name){\n case 'US States': \n $vars['state_id'] = $taxonomy->tid;\n $location = '';\n \n if(!empty($vars['node']->field_proj_address[0]['value'])) {\n $location .= $vars['node']->field_proj_address[0]['value'];\n }\n if(!empty($vars['node']->field_proj_city[0]['value'])) {\n if(!empty($location)) {\n $location .= \"<br />\";\n }\n $location .= $vars['node']->field_proj_city[0]['value'];\n }\n if(!empty($taxonomy->name)) {\n if(!empty($location)) {\n $location .= \",\";\n }\n $location .= $taxonomy->name;\n }\n if(!empty($vars['node']->field_proj_zipcode[0]['value'])) {\n $location .= \" \".$vars['node']->field_proj_zipcode[0]['value'];\n }\n $vars['location'] = $location;\n\n break;\n case 'Project Categories':\n $vars['category_id'] = $taxonomy->tid;\n $vars['category_name'] = $taxonomy->name;\n\n break;\n default:\n break;\n }\n }\n }\n }\n\n $thankyou_letter = get_project_thankyou_letter($vars['node']->nid); \n if(!empty($thankyou_letter)) {\n $vars['thankyou_letter'] = $thankyou_letter;\n } \n $proj_album_node = node_load($vars['node']->field_project_album_nid[0]['nid']);\n $album_config = node_gallery_get_config($proj_album_node->type);\n // $vars['proj_album'] = theme('gallery_images_list', $proj_album_node, $album_config);\n $vars['proj_album'] = _get_project_photos($vars['node']->field_project_album_nid[0]['nid']);\n $start_date = strtotime($vars['node']->field_start_date[0]['value']);\n $end_date = strtotime($vars['node']->field_end_date[0]['value']);\n $amount_needed = get_project_donation_amount_needed($vars['node']->nid);\n $pledge_amount = get_project_pledge_amount($vars['node']->nid);\n $amount_raised = get_total_approved_donations($vars['node']->nid);\n $grants_raised = get_total_approved_grants($vars['node']->nid);\n $total_amount = $amount_raised + $grants_raised;\n $donation_short_by = $amount_needed - $total_amount;\n if($donation_short_by >= 0 ) {\n if(in_array('Giving Pointer',$vars['user']->roles) || in_array('Donor',$vars['user']->roles) || !in_array('Non-Profit Organization',$vars['user']->roles)) {\n $vars['donor_required'] = \"<div class='donate'>\".l('Donate', \"donation/paypal/{$vars['node']->nid}\", array('html'=>true)). \"</div>\";\n }\n// elseif($vars['user']->uid == 0) {\n// $vars['donor_required'] = \"<div class='donate'>\".l('Donate', \"donor/login\", array('html'=>true, 'query'=>array('destination'=>\"donation/paypal/{$vars['node']->nid}\", 'ref'=>'donor' ))).\"</div>\";\n// }\n else {\n $vars['donor_required'] = \"<div class='donate' id ='button-disabled'>Donate</div>\";\n }\n }\n \n $donor_list = get_pledged_project_donors($vars['user']->uid,$vars['node']->nid);\n//print_r($donor_list);\n//echo $vars['user']->uid;\n if($donation_short_by >= 0 ) {\n if(in_array('Donor',$vars['user']->roles) && empty($donor_list) ) {\n $vars['pledge_donate'] = \"<div class='donate'>\".l('Make Pledge', \"node/add/make-a-pledge/{$vars['node']->nid}\", array('html'=>true, 'query'=>array('destination'=>\"node/{$vars['node']->nid}\"))). \"</div>\";\n }elseif(in_array('Donor',$vars['user']->roles) && !empty($donor_list) ) {\n $vars['pledge_donate'] = \"<div class='donate'>\".l('Donate to Pledge', \"donation/paypal/{$vars['node']->nid}\", array('html'=>true)). \"</div>\";\n }\n//&& $vars['node']->field_allow_pledge[0]['value'] == 1\n// elseif($vars['user']->uid == 0) {\n// $vars['donor_required'] = \"<div class='donate'>\".l('Donate', \"donor/login\", array('html'=>true, 'query'=>array('destination'=>\"donation/paypal/{$vars['node']->nid}\", 'ref'=>'donor' ))).\"</div>\";\n// }\n else {\n //$vars['pledge_donate'] = \"<div class='donate' id ='button-disabled'>Make Pledge</div>\";\n }\n }\n \n if(($vars['node']->field_current_volunteers[0]['value'] < $vars['node']->field_volunteers[0]['value']) && ($vars['node']->field_volunteers[0]['value'] != 0) ) {\n $has_member = false;\n\n foreach($vars['user']->og_groups as $key => $val) {\n if($key == $vars['node']->nid) {\n $has_member = true;\n }\n }\n\n if(!$has_member && in_array('Giving Pointer',$vars['user']->roles)) {\n $vars['volunteer_required'] = \"<div class='volunteer'>\".l('Volunteer', \"og/subscribe/{$vars['node']->nid}\", array('html'=>true, 'query'=>array('destination'=>\"node/{$vars['node']->nid}\"))).\"</div>\";\n }\n elseif($has_member && in_array('Giving Pointer',$vars['user']->roles)) {\n $vars['volunteer_required'] = \"<div class='volunteer' id = 'button-disabled'>Volunteer</div>\";\n }\n elseif($vars['user']->uid == 0) {\n $vars['volunteer_required'] = \"<div class='volunteer'>\".l('Volunteer', \"givingpointer/register\", array('html'=>true, 'query'=>array('destination'=>$vars['node']->path, 'ref'=>'teen' ))).\"</div>\";\n }\n else {\n $vars['volunteer_required'] = \"<div class='volunteer' id = 'button-disabled'>Volunteer</div>\";\n }\n }\n\n $donors = module_invoke('gp_project', 'get_donors', $vars['node']->nid);\n $pledges = module_invoke('gp_project', 'get_pledge', $vars['node']->nid);\n $anony_donors = module_invoke('gp_project', 'get_anony_donors', $vars['node']->nid);\n $grants = module_invoke('gp_project', 'get_grants', $vars['node']->nid);\n $volunteers = module_invoke('gp_project', 'get_volunteers', $vars['node']->nid);\n $vars['donor_count'] = count($donors);\n $vars['volunteers_count'] = count($volunteers);\n\n if( count($donors) < 6 ){\n if ($donation_short_by > 0)\n {\n $obj = new stdClass();\n $obj->could_be_you = true;\n $obj->link = \"donation/paypal/{$vars['node']->nid}\";\n $obj->picture = \"sites/all/themes/gptheme/images/could_be_you.png\";\n array_push($donors, $obj);\n }\n }\n\n if( count($volunteers) < 6 ){\n if(($vars['node']->field_current_volunteers[0]['value'] < $vars['node']->field_volunteers[0]['value']) && ($vars['node']->field_volunteers[0]['value'] != 0)) {\n $obj = new stdClass();\n $obj->could_be_you = true;\n $obj->link = \"givingpointer\";\n $obj->ref = 't';\n\n if(in_array('Giving Pointer',$vars['user']->roles)) {\n $obj->link = \"og/subscribe/{$vars['node']->nid}\";\n }elseif($vars['user']->uid){\n $obj->link = \"you-are-already-registered\";\n $obj->ref = 't';\n }\n\n $obj->picture = \"sites/all/themes/gptheme/images/could_be_you.png\";\n array_push($volunteers, $obj);\n }\n }\n// print_r($grants);\n if(is_array($donors) ||is_array($anony_donors)){\n $all_donors = array_merge($donors,$anony_donors); \n $donors_array = array_chunk(array_slice($all_donors, 0, 6), 3);\n }else{\n $donors_array = array();\n }\n if(is_array($pledges)){\n $pledges_array = array_chunk(array_slice($pledges, 0, 6), 3);\n }else{\n $pledges_array = array();\n }\n if(is_array($grants)){\n $grants_array = array_chunk(array_slice($grants, 0, 6), 3);\n }else{\n $grants_array = array();\n }\n if(is_array($volunteers)){\n $volunteers_array = array_chunk(array_slice($volunteers, 0, 6), 3);\n }else{\n $volunteers_array = array();\n }\n \n $vars['start_date'] = $start_date;\n $vars['end_date'] = $end_date;\n $vars['donorsgrid'] = theme('usergrid', $donors_array);\n $vars['pledgesgrid'] = theme('usergrid', $pledges_array);\n $vars['grantsgrid'] = theme('usergrid', $grants_array);\n $vars['volunteersgrid'] = theme('usergrid', $volunteers_array);\n $vars['amount_needed'] = number_format($amount_needed,2);\n $vars['pledge_amount'] = number_format($pledge_amount,2);\n $vars['amount_raised'] = number_format($total_amount,2);\n $vars['grant_raised'] = number_format($grants_raised,2);\n $vars['remaining_funds'] = number_format($donation_short_by,2);\n $vars['remaining_volunteer'] = ((int)$vars['node']->field_volunteers[0]['value'] - (int)$vars['node']->field_current_volunteers[0]['value']);\n}", "title": "" }, { "docid": "ef2421d3670eb40f4c1d3992f652066d", "score": "0.532276", "text": "function feed_item_field_attach_submit($form, &$form_state) {\r\n $feed =& $form_state['#feed'];\r\n \r\n if (isset($feed->fid)) {\r\n $feed_fields = feed_load_fields($feed, TRUE);\r\n $feed_fields_stack = array();\r\n \r\n if (!empty($feed_fields)) {\r\n foreach ($feed_fields as $feed_field) {\r\n if (isset($form_state['values']['feed_item_field']['item-fields'][$feed_field->ffid])) {\r\n $values = $form_state['values']['feed_item_field']['item-fields'][$feed_field->ffid];\r\n \r\n if (isset($values['weight'])) {\r\n $feed_field->data['weight'] = $values['weight'];\r\n }\r\n if (isset($feed_fields[$values['parent']])) {\r\n $feed_field->pffid = $values['parent']; // @todo write validation\r\n }\r\n elseif (empty($values['parent'])) {\r\n $feed_field->pffid = 0;\r\n }\r\n $feed_fields_stack[$feed_field->ffid] = $feed_field;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if (!empty($form_state['values']['feed_item_field']['add-item-field']['tag'])) {\r\n $feed_field_values = $form_state['values']['feed_item_field']['add-item-field'];\r\n $feed_field = feed_field_defaults();\r\n \r\n $info = feed_field_type_info($feed_field_values['type']);\r\n\r\n if (isset($feed_fields[$feed_field_values['parent']])) {\r\n $feed_field->pffid = $feed_field_values['parent']; // @todo write validation\r\n }\r\n $feed_field->name = $feed_field_values['name'];\r\n $feed_field->tag = $feed_field_values['tag'];\r\n $feed_field->type = $feed_field_values['type'];\r\n $feed_field->module = $info['module'];\r\n $feed_field->fid = $feed->fid;\r\n \r\n $feed_fields_stack['add-item-field'] = $feed_field;\r\n }\r\n \r\n if (!empty($feed_fields_stack)) {\r\n $status = feed_fields_save($feed_fields_stack, $feed, TRUE);\r\n \r\n if ($status && !empty($feed_fields_stack['add-item-field'])) {\r\n $form_state['redirect'] = \"feed/{$feed->fid}/fields/feed-items/{$ffid}\";\r\n }\r\n }\r\n}", "title": "" }, { "docid": "6f303f3035d73f3a7b3a61102a7f4da4", "score": "0.5289092", "text": "function juraport_theme_preprocess_node_jura_subject(&$variables, $hook) {\n if (!user_is_logged_in()) {\n $fields = array(\n 'field_jura_subject_laws_rules',\n 'field_jura_subject_online',\n 'field_jura_subject_lawtext_rules',\n 'field_jura_subject_loan',\n 'field_jura_subject_network',\n );\n foreach ($fields as $field) {\n if (isset($variables['content'][$field]['#items']) && empty($variables['content'][$field]['#items'])) {\n unset($variables['content'][$field]);\n }\n }\n }\n}", "title": "" }, { "docid": "bea7d8731d824938e71324c336db5e30", "score": "0.52844864", "text": "function kibble_edit_fields( $taxonomy ) {\n kibble_setup_field_scripts();?>\n <tr class=\"form-field\">\n <th><label for=\"kibble_tax_image\"><?php _e( 'Image' ); ?></label></th>\n <td>\n <?php $image = kibble_get_taxonomy_image_src($taxonomy, 'full'); ?>\n <input type=\"hidden\" name=\"kibble_tax_image\" id=\"kibble_tax_image\" value=\"<?php echo ($image)?$image['src']:''; ?>\" />\n <input type=\"hidden\" name=\"kibble_tax_image_classes\" id=\"kibble_tax_image_classes\" value=\"\" />\n <?php $image = kibble_get_taxonomy_image_src($taxonomy); ?>\n <img src=\"<?php echo ($image)?$image['src']:''; ?>\" id=\"kibble_tax_image_preview\" style=\"max-width: 300px;max-height: 300px;float:left;display: <?php echo($image['src'])?'block':'none'; ?>;padding: 0 10px 5px 0;\" />\n <a href=\"#\" class=\"button\" id=\"kibble_tax_add_image\" style=\"\"><?php _e( 'Add/Change Image' ); ?></a>\n <a href=\"#\" class=\"button\" id=\"kibble_tax_remove_image\" style=\"display: <?php echo ( $image['src'] ) ? 'inline-block' : 'none'; ?>;\"><?php _e( 'Remove Image' ); ?></a>\n </td>\n </tr>\n <?php\n}", "title": "" }, { "docid": "d963ae57ff8296cb79e8238cf7d37ec5", "score": "0.5282446", "text": "function kp_nodes_preprocess_tripal_organism_teaser(&$variables) {\n\n $variables['organism'] = $variables['node']->organism;\n\n // Render the image with link to attribution.\n //-------------------------------------------\n $lang = isset($data->language) ? $data->language : LANGUAGE_NONE;\n\n // Retrieve the field collection details.\n $image_fieldcollection_id = $variables['node']->field_image_with_source[$lang][0]['value'];\n $image_fieldcollection = entity_load('field_collection_item', array($image_fieldcollection_id));\n $image_fieldcollection = $image_fieldcollection[$image_fieldcollection_id];\n\n // Render the image.\n $image_link = image_style_url('medium', $image_fieldcollection->field_image[$lang][0]['uri']);\n if (!file_exists($image_link)) {\n $success = image_style_create_derivative('medium', $image_fieldcollection->field_image[$lang][0]['uri'], $image_link);\n }\n $image = '<img src=\"'.$image_link.'\">';\n $image = render($image);\n\n // Wrap image in link if available.\n if (isset($image_fieldcollection->field_image_link[$lang][0]['url'])) {\n $variables['rendered_organism_image'] = l(\n $image,\n $image_fieldcollection->field_image_link[$lang][0]['url'],\n array(\n 'html' => TRUE,\n 'attributes' => $image_fieldcollection->field_image_link[$lang][0]['attributes']\n )\n );\n }\n else {\n $variables['rendered_organism_image'] = $image;\n }\n}", "title": "" }, { "docid": "0406e71fe7732f45ceb39a0f7b88a09b", "score": "0.5243376", "text": "function acf_render_field_label( $field ) {\n}", "title": "" }, { "docid": "3b88fa6b593c00472aad1d64a5c8947f", "score": "0.52323127", "text": "function ezsteps_preprocess_field($variables, $hook) {\n if ($variables['element']['#field_name'] == 'field_module_objectives') {\n drupal_add_js(drupal_get_path('theme','ezsteps') . '/js/learn-more-hover.js');\t\n }\n if ($variables['element']['#field_name'] == 'field_activity_video_hosted') {\n //drupal_add_js('http://admin.brightcove.com/js/BrightcoveExperiences.js', 'external');\n //drupal_add_js(drupal_get_path('theme','ezsteps') . '/js/ezstepsBrightcove.js', array('type' => 'inline', );\t\n }\n}", "title": "" }, { "docid": "7279f37ee41afdf3cf315c332539aaff", "score": "0.52240074", "text": "function acf_render_field_wrap_label( $field ) {\n}", "title": "" }, { "docid": "ec58b45c6dd35b90195680ed1ca4d72b", "score": "0.521805", "text": "function rapid_form_node_form_alter(&$form, &$form_state, $form_id) {\n // Remove if #1245218 is backported to D7 core.\n foreach (array_keys($form) as $item) {\n if (strpos($item, 'field_') === 0) {\n if (!empty($form[$item]['#attributes']['class'])) {\n foreach ($form[$item]['#attributes']['class'] as &$class) {\n // Core bug: the field-type-text-with-summary class is used as a JS hook.\n if ($class != 'field-type-text-with-summary' && strpos($class, 'field-type-') === 0 || strpos($class, 'field-name-') === 0) {\n // Make the class different from that used in theme_field().\n $class = 'form-' . $class;\n }\n }\n }\n }\n }\n}", "title": "" }, { "docid": "f2366faedfd0f1a4db15a0781fb37686", "score": "0.52012795", "text": "private function add_fields_main() {\n\n add_settings_field(\n $this->get_field_id(PTB_Custom_Taxonomy::SINGULAR_LABEL), __('Singular Label', 'ptb'), array($this, 'ctx_singular_label_cb'), $this->slug_admin_ctx, $this->settings_section_ctx, array('label_for' => $this->get_field_id(PTB_Custom_Taxonomy::SINGULAR_LABEL))\n );\n\n add_settings_field(\n $this->get_field_id(PTB_Custom_Taxonomy::PLURAL_LABEL), __('Plural Label', 'ptb'), array($this, 'ctx_plural_label_cb'), $this->slug_admin_ctx, $this->settings_section_ctx, array('label_for' => $this->get_field_id(PTB_Custom_Taxonomy::PLURAL_LABEL))\n );\n\n add_settings_field(\n $this->get_field_id(PTB_Custom_Taxonomy::SLUG), __('Taxonomy Slug', 'ptb'), array($this, 'ctx_taxonomy_cb'), $this->slug_admin_ctx, $this->settings_section_ctx, array('label_for' => $this->get_field_id(PTB_Custom_Taxonomy::SLUG))\n );\n\n add_settings_field(\n $this->get_field_id(PTB_Custom_Taxonomy::ATTACH_TO), __('Attach to', 'ptb'), array($this, 'ctx_attach_to_cb'), $this->slug_admin_ctx, $this->settings_section_ctx, array('label_for' => $this->get_field_id(PTB_Custom_Taxonomy::ATTACH_TO))\n );\n }", "title": "" }, { "docid": "3ebb2b34e1c54cb9128b43214aef8c2b", "score": "0.5200161", "text": "function filter_ninja_forms_localize_fields( $field ) { \n\tif (!function_exists('pll__') || !is_array($field['settings']) ){\n\t\treturn $field;\n\t}\n\n\t\n \t$field['settings']['label'] = pll__($field['settings']['label']);\n\n\n \tif ($field['settings']['type'] === 'html' && array_key_exists(\"default\", $field['settings'])) {\n \t$field['settings']['default'] = pll__($field['settings']['default']);\n \t}\n\n \tif ($settings['type'] == 'submit'){\n \t$field['settings']['processing_label'] = pll__($field['settings']['processing_label']);\n\t}\n\n \tif (!empty($field['settings']['options'])) {\n \tforeach($field['settings']['options'] as $i => $o){\n \t\t$field['settings']['options'][$i]['label'] = pll__($o['label']);\n \t}\n \t}\n\n \tif ($field['settings']['label'] == 'Lang'){\n \t$field['settings']['default'] = pll_current_language('slug');\n\t} \n\n \treturn $field; \n}", "title": "" }, { "docid": "84faa0df79a36bd86bde0705a949e0b5", "score": "0.51843625", "text": "function funcaptcha_register_gf_actions() {\n\tadd_filter('gform_add_field_buttons', 'funcaptcha_gf_add_button');\n\tadd_filter('gform_field_type_title', 'funcaptcha_gf_add_field_title');\n\tadd_filter('gform_field_validation', 'funcaptcha_gf_validate', 10, 4);\n\tadd_filter(\"gform_field_input\", \"funcaptcha_gf_field\", 10, 5);\n}", "title": "" }, { "docid": "99cf2b6eccca08356411e6ae8d23ae18", "score": "0.51729083", "text": "function elearning_alpha_preprocess_node_newsletter(&$vars) {\n $account = user_load($vars['uid']);\n\n $vars['user_picture'] = theme('user_picture', \n array(\n 'account' => $account, \n 'size' => 'tiny', \n 'show_points' => TRUE,\n 'access' => FALSE,\n )\n );\n\n $name = field_view_field('user', $account, 'field_first_name', array('label' => 'hidden'));\n $surname = field_view_field('user', $account, 'field_surname', array('label' => 'hidden'));\n $vars['author'] = render($name).' '.render($surname);\n $vars['created_formatted'] = date('d/m/Y', $vars['created']);\n}", "title": "" }, { "docid": "6912b6de3f23630cd6fcaa02ccb1e71b", "score": "0.51568717", "text": "function BootstrapBlocks_preprocess_field(&$variables) {\r\n $element = $variables['element'];\r\n\r\n // There's some overhead in calling check_plain() so only call it if the label\r\n // variable is being displayed. Otherwise, set it to NULL to avoid PHP\r\n // warnings if a theme implementation accesses the variable even when it's\r\n // supposed to be hidden. If a theme implementation needs to print a hidden\r\n // label, it needs to supply a preprocess function that sets it to the\r\n // sanitized element title or whatever else is wanted in its place.\r\n $variables['label_hidden'] = ($element['#label_display'] == 'hidden');\r\n $variables['label'] = $variables['label_hidden'] ? NULL : check_plain($element['#title']);\r\n\r\n // We want other preprocess functions and the theme implementation to have\r\n // fast access to the field item render arrays. The item render array keys\r\n // (deltas) should always be a subset of the keys in #items, and looping on\r\n // those keys is faster than calling element_children() or looping on all keys\r\n // within $element, since that requires traversal of all element properties.\r\n $variables['items'] = array();\r\n foreach ($element['#items'] as $delta => $item) {\r\n if (!empty($element[$delta])) {\r\n $variables['items'][$delta] = $element[$delta];\r\n }\r\n }\r\n\r\n // Add default CSS classes. Since there can be many fields rendered on a page,\r\n // save some overhead by calling strtr() directly instead of\r\n // drupal_html_class().\r\n $variables['field_name_css'] = strtr($element['#field_name'], '_', '-');\r\n $variables['field_type_css'] = strtr($element['#field_type'], '_', '-');\r\n $variables['classes_array'] = array(\r\n 'field',\r\n 'fn-' . $variables['field_name_css'],\r\n 'ft-' . $variables['field_type_css'],\r\n 'fl-' . $element['#label_display'],\r\n );\r\n // Add a \"clearfix\" class to the wrapper since we float the label and the\r\n // field items in field.css if the label is inline.\r\n if ($element['#label_display'] == 'inline') {\r\n $variables['classes_array'][] = 'clearfix';\r\n }\r\n\r\n // Add specific suggestions that can override the default implementation.\r\n $variables['theme_hook_suggestions'] = array(\r\n 'field__' . $element['#field_type'],\r\n 'field__' . $element['#field_name'],\r\n 'field__' . $element['#bundle'],\r\n 'field__' . $element['#field_name'] . '__' . $element['#bundle'],\r\n );\r\n}", "title": "" }, { "docid": "100a89818ba8d1f117779ca6ebb0fce4", "score": "0.5151907", "text": "function fontAwesomeIconList($PA, $fObj) \n {\n // \\TYPO3\\CMS\\Extbase\\Utility\\DebuggerUtility::var_dump($PA['row']['icon']);\n $icons = array(\n 'adjust',\n 'ambulance',\n 'archive',\n 'area-chart',\n 'arrows',\n 'arrows-h',\n 'arrows-v',\n 'asterisk',\n 'at',\n 'automobile',\n 'ban',\n 'bank',\n 'bar-chart',\n 'barcode',\n 'bars',\n 'bed',\n 'beer',\n 'bell',\n 'bell-slash',\n 'bicycle',\n 'binoculars',\n 'birthday-cake',\n 'bolt',\n 'bomb',\n 'book',\n 'bookmark',\n 'briefcase',\n 'bug',\n 'building',\n 'bullhorn',\n 'bullseye',\n 'bus',\n 'cab',\n 'calculator',\n 'calendar',\n 'camera',\n 'camera-retro',\n 'car',\n 'cart-arrow-down',\n 'cart-plus',\n 'cc',\n 'certificate',\n 'check',\n 'check-circle',\n 'check-square',\n 'child',\n 'circle',\n 'circle-thin',\n 'close',\n 'cloud',\n 'cloud-download',\n 'cloud-upload',\n 'code',\n 'code-fork',\n 'coffee',\n 'cog',\n 'cogs',\n 'comment',\n 'comments',\n 'compass',\n 'copyright',\n 'credit-card',\n 'crop',\n 'crosshairs',\n 'cube',\n 'cubes',\n 'cutlery',\n 'dashboard',\n 'database',\n 'desktop',\n 'diamond',\n 'download',\n 'edit',\n 'ellipsis-h',\n 'ellipsis-v',\n 'envelope',\n 'envelope-square',\n 'eraser',\n 'exchange',\n 'exclamation',\n 'exclamation-circle',\n 'exclamation-triangle',\n 'external-link',\n 'external-link-square',\n 'eye',\n 'eye-slash',\n 'eyedropper',\n 'fax',\n 'female',\n 'fighter-jet',\n 'file',\n 'file-text',\n 'film',\n 'filter',\n 'fire',\n 'fire-extinguisher',\n 'flag',\n 'flag-checkered',\n 'flash',\n 'flask',\n 'folder-open',\n 'gamepad',\n 'gavel',\n 'gear',\n 'gears',\n 'genderless',\n 'gift',\n 'glass',\n 'globe',\n 'graduation-cap',\n 'group',\n 'headphones',\n 'heart',\n 'heartbeat',\n 'history',\n 'home',\n 'hotel',\n 'image',\n 'inbox',\n 'info',\n 'info-circle',\n 'institution',\n 'key',\n 'language',\n 'laptop',\n 'leaf',\n 'legal',\n 'level-down',\n 'level-up',\n 'life-bouy',\n 'life-buoy',\n 'life-ring',\n 'life-saver',\n 'line-chart',\n 'location-arrow',\n 'lock',\n 'magic',\n 'magnet',\n 'mail-forward',\n 'mail-reply',\n 'mail-reply-all',\n 'male',\n 'map-marker',\n 'microphone',\n 'microphone-slash',\n 'minus',\n 'minus-circle',\n 'minus-square',\n 'mobile',\n 'mobile-phone',\n 'money',\n 'mortar-board',\n 'motorcycle',\n 'music',\n 'navicon',\n 'paint-brush',\n 'paper-plane',\n 'paw',\n 'pencil',\n 'pencil-square',\n 'phone',\n 'phone-square',\n 'photo',\n 'pie-chart',\n 'plane',\n 'plug',\n 'plus',\n 'plus-circle',\n 'plus-square',\n 'power-off',\n 'print',\n 'puzzle-piece',\n 'qrcode',\n 'question',\n 'question-circle',\n 'quote-left',\n 'quote-right',\n 'random',\n 'recycle',\n 'refresh',\n 'remove',\n 'reorder',\n 'reply',\n 'reply-all',\n 'retweet',\n 'road',\n 'rocket',\n 'rss',\n 'rss-square',\n 'search',\n 'search-minus',\n 'search-plus',\n 'send',\n 'server',\n 'share',\n 'share-alt',\n 'share-alt-square',\n 'share-square',\n 'shield',\n 'ship',\n 'shopping-cart',\n 'sign-in',\n 'sign-out',\n 'signal',\n 'sitemap',\n 'sliders',\n 'sort',\n 'sort-alpha-asc',\n 'sort-alpha-desc',\n 'sort-amount-asc',\n 'sort-amount-desc',\n 'sort-asc',\n 'sort-desc',\n 'sort-down',\n 'sort-numeric-asc',\n 'sort-numeric-desc',\n 'sort-up',\n 'space-shuttle',\n 'spinner',\n 'spoon',\n 'square',\n 'star',\n 'star-half',\n 'star-half-empty',\n 'star-half-full',\n 'street-view',\n 'subway',\n 'suitcase',\n 'support',\n 'tablet',\n 'tachometer',\n 'tag',\n 'tags',\n 'tasks',\n 'taxi',\n 'terminal',\n 'thumb-tack',\n 'thumbs-down',\n 'thumbs-up',\n 'ticket',\n 'times',\n 'times-circle',\n 'tint',\n 'toggle-down',\n 'toggle-left',\n 'toggle-off',\n 'toggle-on',\n 'toggle-right',\n 'toggle-up',\n 'train',\n 'trash',\n 'tree',\n 'trophy',\n 'truck',\n 'tty',\n 'umbrella',\n 'university',\n 'unlock',\n 'unlock-alt',\n 'unsorted',\n 'user',\n 'user-plus',\n 'user-secret',\n 'users',\n 'video-camera',\n 'volume-down',\n 'volume-off',\n 'volume-up',\n 'warning',\n 'wheelchair',\n 'wifi',\n 'wrench',\n );\n \n $formField = '<div id=\"n1iconList\" class=\"clearfix\">';\n \n //$formField .= \t\\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate($PA['parameters']['text'], 'nj_internship');\n \n foreach($icons as $icon)\n {\n $formField .= '<div name=\"'.$icon.'\"';\n \n if('fa-'.$icon === $PA['row']['icon'])\n {\n $formField .= ' class=\"selected\"';\n }\n \n $formField .= '><i class=\"fa fa-'.$icon.' fa-3x';\n\n $formField .= '\"></i>'.$icon.'</div>';\n }\n \n $formField .=\t'</div>';\n \n $formField .= '<script>';\n $formField .= '\n (function($) \n {\n $(function() \n {\n $(document).ready(function()\n {\n $(\"#n1iconList > DIV\").click(function()\n {\n if(!$(this).hasClass(\"selected\"))\n {\n $(\"input[name*=icon]\").val(\"fa-\"+$(this).attr(\"name\")); \n\n typo3form.fieldGet(\"data[tx_njinternship_domain_model_direction][1][icon]\",\"trim\",\"\",0,\"\");\n TBE_EDITOR.fieldChanged(\"tx_njinternship_domain_model_direction\",\"1\",\"icon\",\"data[tx_njinternship_domain_model_direction][1][icon]\");\n\n $(\"#n1iconList > DIV\").each(function() {\n $(this).removeClass(\"selected\");\n });\n $(this).addClass(\"selected\");\n }\n });\n\n });\n });\n })(TYPO3.jQuery);\n ';\n $formField .= '</script>';\n \n $formField .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"../typo3conf/ext/nj_internship/Resources/Public/Css/Lib/font-awesome/4.3.0/css/font-awesome.min.css\"></link>';\n $formField .= '<style>'\n . '#n1iconList > DIV { font-size: 10px; float: left; margin-right: 10px; text-align: center; width: 100px; margin-bottom: 10px; padding: 5px; } '\n . '#n1iconList > DIV:hover { background-color: #999999; color:black; cursor: pointer; } '\n . '.selected, .selected:hover { background-color: #222222 !important; color:#efefef !important; } '\n . '.selected, #n1iconList > DIV:hover { -webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px; } '\n . '.selected:hover { cursor:default !important; }'\n . '.fa{display:block; text-align:center; }'\n . '</style>';\n \n return $formField;\n }", "title": "" }, { "docid": "659755de6dce0d2c508e31ceb40978c2", "score": "0.5130235", "text": "function voltron_preprocess_html(&$variables) {\n drupal_add_css('//netdna.bootstrapcdn.com/bootswatch/2.1.0/spacelab/bootstrap.no-icons.min.css', array('type' => 'external'));\n drupal_add_css('//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css', array('type' => 'external'));\n drupal_add_js('//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/js/bootstrap.min.js','external');\n}", "title": "" }, { "docid": "8d10b001a0db0e3a36e124a41de5d4c2", "score": "0.5122145", "text": "function render_field( $field ) {\n\t\t$b = \"acf-flo-stylekit-shop\";\n\n\t\t$promo_slides = Array(\n\t\t\tArray(\n\t\t\t\t\"img\" => \"https://s3-us-west-2.amazonaws.com/flothemes-dashboard-images/evora/promo-banner.jpg\",\n\t\t\t\t\"url\" => \"#\"\n\t\t\t),\n\t\t\tArray(\n\t\t\t\t\"img\" => \"https://s3-us-west-2.amazonaws.com/flothemes-dashboard-images/evora/promo-banner.jpg\",\n\t\t\t\t\"url\" => \"#\"\n\t\t\t),\n\t\t\tArray(\n\t\t\t\t\"img\" => \"https://s3-us-west-2.amazonaws.com/flothemes-dashboard-images/evora/promo-banner.jpg\",\n\t\t\t\t\"url\" => \"#\"\n\t\t\t),\n\t\t);\n\n\t\t$stylekits = Array(\n\t\t\tArray(\n\t\t\t\t\"name\" => \"Evora\",\n\t\t\t\t\"price\" => \"$49\",\n\t\t\t\t\"price_discounted\" => true,\n\t\t\t\t\"description\" => \"Stylish, captivating style kit for lorem, bloggers and influencers who love to set trends.\",\n\t\t\t\t\"top_label\" => false,\n\t\t\t\t\"purchase_link\" => \"#\",\n\t\t\t\t\"thumb\" => \"http://flothemes-dashboard-images.s3.amazonaws.com/evora/Evora-style-1.thumb.jpg\",\n\t\t\t\t\"preview\" => \"https://s3-us-west-2.amazonaws.com/flothemes-dashboard-images/evora/template-home-type-a.preview.jpg\"\n\t\t\t),\n\t\t\tArray(\n\t\t\t\t\"name\" => \"Airy\",\n\t\t\t\t\"price\" => \"$69\",\n\t\t\t\t\"price_discounted\" => false,\n\t\t\t\t\"description\" => \"Stylish, captivating style kit for lorem, bloggers and influencers who love to set trends.\",\n\t\t\t\t\"top_label\" => \"New\",\n\t\t\t\t\"purchase_link\" => \"#\",\n\t\t\t\t\"thumb\" => \"http://flothemes-dashboard-images.s3.amazonaws.com/evora/Evora-style-2.thumb.jpg\",\n\t\t\t\t\"preview\" => \"https://s3-us-west-2.amazonaws.com/flothemes-dashboard-images/evora/template-home-type-a.preview.jpg\"\n\t\t\t),\n\t\t\tArray(\n\t\t\t\t\"name\" => \"Evora\",\n\t\t\t\t\"price\" => \"$49\",\n\t\t\t\t\"price_discounted\" => false,\n\t\t\t\t\"description\" => \"Stylish, captivating style kit for lorem, bloggers and influencers who love to set trends.\",\n\t\t\t\t\"top_label\" => false,\n\t\t\t\t\"purchase_link\" => \"#\",\n\t\t\t\t\"thumb\" => \"http://flothemes-dashboard-images.s3.amazonaws.com/evora/Evora-style-1.thumb.jpg\",\n\t\t\t\t\"preview\" => \"https://s3-us-west-2.amazonaws.com/flothemes-dashboard-images/evora/template-home-type-a.preview.jpg\"\n\t\t\t),\n\t\t\tArray(\n\t\t\t\t\"name\" => \"Airy\",\n\t\t\t\t\"price\" => \"$69\",\n\t\t\t\t\"price_discounted\" => false,\n\t\t\t\t\"description\" => \"Stylish, captivating style kit for lorem, bloggers and influencers who love to set trends.\",\n\t\t\t\t\"top_label\" => false,\n\t\t\t\t\"purchase_url\" => \"#\",\n\t\t\t\t\"thumb\" => \"http://flothemes-dashboard-images.s3.amazonaws.com/evora/Evora-style-2.thumb.jpg\",\n\t\t\t\t\"preview\" => \"https://s3-us-west-2.amazonaws.com/flothemes-dashboard-images/evora/template-home-type-a.preview.jpg\"\n\t\t\t),\n\t\t);\n\t\t?>\n\t\t<div class=\"<?php echo $b ?>\">\n\t\t\t<div class=\"<?php echo $b ?>__promo-slideshow-wrap\">\n\t\t\t\t<?php if ($promo_slides): ?>\n\t\t\t\t\t<div class=\"<?php echo $b ?>__promo-slideshow\">\n\t\t\t\t\t\t<?php foreach ($promo_slides as $promo_slide): ?>\n\t\t\t\t\t\t\t<div class=\"<?php echo $b ?>__promo-slide\">\n\t\t\t\t\t\t\t\t<div class=\"<?php echo $b ?>__promo-slide-content\">\n\t\t\t\t\t\t\t\t\t<img class=\"<?php echo $b ?>__promo-slide-image\" src=\"<?php echo $promo_slide[\"img\"] ?>\" alt=\"\">\n\t\t\t\t\t\t\t\t\t<?php if ($promo_slide[\"url\"]): ?>\n\t\t\t\t\t\t\t\t\t\t<a class=\"<?php echo $b ?>__promo-slide-anchor\" href=\"<?php echo $promo_slide[\"url\"] ?>\"></a>\n\t\t\t\t\t\t\t\t\t<?php endif; ?>\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<?php endforeach; ?>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"<?php echo $b ?>__promo-slideshow-arrow <?php echo $b ?>__promo-slideshow-arrow--prev\">\n\t\t\t\t\t\t<i class=\"flo-admin-icon-angle-left\"></i>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"<?php echo $b ?>__promo-slideshow-arrow <?php echo $b ?>__promo-slideshow-arrow--next\">\n\t\t\t\t\t\t<i class=\"flo-admin-icon-angle-right\"></i>\n\t\t\t\t\t</div>\n\t\t\t\t<?php endif; ?>\n\t\t\t</div>\n\n\t\t\t<div class=\"<?php echo $b ?>__title\">\n\t\t\t\tPremium Style Kits\n\t\t\t</div>\n\n\t\t\t<div class=\"<?php echo $b ?>__subtitle\">\n\t\t\t\tLorem ipsum dolor sit amet, consectetur adipisicing elit\n\t\t\t</div>\n\n\t\t\t<div class=\"<?php echo $b ?>__stylekits-and-preview\">\n\n\t\t\t\t<div class=\"<?php echo $b ?>__stylekits\">\n\t\t\t\t\t<?php foreach ($stylekits as $stylekit): ?>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$stylekit_discounted_class = $stylekit[\"price_discounted\"] ? $b . \"__stylekit--discounted\" : \"\";\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"<?php echo $b ?>__stylekit <?php echo $stylekit_discounted_class ?>\"\n\t\t\t\t\t\t\tdata-preview=\"<?php echo $stylekit[\"preview\"] ?>\"\n\t\t\t\t\t\t\tdata-price=\"<?php echo $stylekit[\"price\"] ?>\"\n\t\t\t\t\t\t\tdata-description=\"<?php echo $stylekit[\"description\"] ?>\"\n\t\t\t\t\t\t\tdata-purchase-url=\"<?php echo $stylekit[\"purchase_url\"] ?>\"\n\t\t\t\t\t\t\tdata-name=\"<?php echo $stylekit[\"name\"] ?>\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div class=\"<?php echo $b ?>__stylekit-thumb-wrap\">\n\t\t\t\t\t\t\t\t<div class=\"<?php echo $b ?>__stylekit-thumb\" style=\"background-image: url(<?php echo $stylekit[\"thumb\"] ?>)\"></div>\n\t\t\t\t\t\t\t\t<?php if ($stylekit[\"top_label\"]): ?>\n\t\t\t\t\t\t\t\t\t<div class=\"<?php echo $b ?>__stylekit-top-label\">\n\t\t\t\t\t\t\t\t\t\t<?php echo $stylekit[\"top_label\"] ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"<?php echo $b ?>__stylekit-name\">\n\t\t\t\t\t\t\t\t<?php echo $stylekit[\"name\"] ?>\n\n\t\t\t\t\t\t\t\t<div class=\"<?php echo $b ?>__stylekit-price\">\n\t\t\t\t\t\t\t\t\t<?php echo $stylekit[\"price\"] ?>\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</div>\n\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"<?php echo $b ?>__right-wrap\">\n\t\t\t\t\t<div class=\"<?php echo $b ?>__right-wrap-title\">\n\t\t\t\t\t\tElegant\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"<?php echo $b ?>__right-wrap-description\">\n\t\t\t\t\t\tStylish, captivating style kit for lorem, bloggers and influencers who love to set trends.\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"<?php echo $b ?>__right-wrap-purchase-area\">\n\t\t\t\t\t\t<div class=\"<?php echo $b ?>__right-wrap-price\">\n\t\t\t\t\t\t\t$69\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<a class=\"<?php echo $b ?>__purchase-button flo-admin-button\" href=\"#\">\n\t\t\t\t\t\t\tPurchase\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<a class=\"<?php echo $b ?>__test-drive-button\" href=\"\">\n\t\t\t\t\t\t\t<i class=\"flo-admin-icon-eye\"></i>\n\t\t\t\t\t\t\tTest Drive*\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"<?php echo $b ?>__preview-wrap\">\n\t\t\t\t\t\t<div class=\"<?php echo $b ?>__preview-loading\">Loading Preview</div>\n\t\t\t\t\t\t<div class=\"<?php echo $b ?>__preview\">\n\t\t\t\t\t\t\t<div class=\"<?php echo $b ?>__preview-navigation-box\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"<?php echo $b ?>__right-wrap-note\">\n\t\t\t\t\t\t*Note: The Test Drive allows you to apply the style kit for 24 hours to test it out with your website\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "b17431517bbee25024aca598f586c893", "score": "0.51000696", "text": "function getCMSFields() \n\t{\n\t $fields = parent::getCMSFields();\n\n\t // -- Rename Title Fields\n $fields->renameField(\"Title\", _t(\"FaqsPageEntry.QUESTIONLABEL\", \"Question\"));\n\t $fields->renameField(\"Content\", _t(\"FaqsPageEntry.ANSWERLABEL\", \"Answer\"));\n \n // -- Counting Faqs Hits\n $fields->addFieldToTab('Root.Behaviour', new NumericField(\n 'hits', _t(\"FaqsPageEntry.HITSLABEL\", 'Hits'), 0)); \t \n\n // -- Related Faqs\n $tablefield = new ManyManyComplexTableField($this,'FaqsRelated', 'FaqsPage', \n array('Title' => 'Question', 'URLSegment' => 'URL'), 'getCMSFields_forPopup');\n\n // --Don't allow FaqsPage edition, only show \n\t\t$tablefield->setPermissions(array('show'));\n \n\t\t$fields->addFieldToTab( 'Root.Content.FaqsRelated', $tablefield );\n \n return $fields;\n\t}", "title": "" }, { "docid": "270dd89035ef68f9e0c82f18aa2c3bb5", "score": "0.50713545", "text": "function ecleds_preprocess_node(&$variables) {\n if (!empty($variables['submitted'])) {\n $variables['submitted'] = '<em><strong>' . t('Author:') . '</strong>' . ' ' . $variables['name'];\n $variables['submitted'] .= ', <strong>' . t('Date revised:') . '</strong>' . ' ' . format_date($variables['changed'], 'short') . '</em>';\n }\n}", "title": "" }, { "docid": "2d5ec776bd5b81051d20aa6f2d327f9d", "score": "0.5051893", "text": "function otopopadmin_preprocess_page(&$vars) {\n // Add theme bootstrap / fontawesome support.\n drupal_add_css(drupal_get_path('theme', 'otopopadmin') . '/font-awesome/css/font-awesome.min.css');\n drupal_add_css(drupal_get_path('theme', 'otopopadmin') . '/bootstrap/css/bootstrap.min.css');\n\n $vars['primary_local_tasks'] = $vars['tabs'];\n unset($vars['primary_local_tasks']['#secondary']);\n $vars['secondary_local_tasks'] = array(\n '#theme' => 'menu_local_tasks',\n '#secondary' => $vars['tabs']['#secondary'],\n );\n}", "title": "" }, { "docid": "a0ddd24342960444d71d7d3c34408733", "score": "0.503826", "text": "function mele_commerce_preprocess_field(&$vars) {\n $element = $vars['element'];\n if (($element['#formatter'] == 'colorbox') && ($element['#field_name'] == 'field_images')) {\n $vars['theme_hook_suggestions'][] = 'field__field_images__product__carousel';\n }\n}", "title": "" }, { "docid": "88703a067db882dffd907ca49b0e98c4", "score": "0.5020662", "text": "function bootstrap_multilect_preprocess_node (&$variables) {\n /*$node = $variables[\"node\"];\n\n if (isset($node->field_age_bracket[\"und\"][0][\"taxonomy_term\"])) {\n foreach ($node->field_age_bracket[\"und\"] as $foo) {\n $term = $foo[\"taxonomy_term\"];\n $variables[\"classes_array\"][] = \"term-\" . str_replace(\" \", \"-\", strtolower($term->name));\n }\n }*/\n if ($variables['node'] == 'article') {\n $field_items = field_get_items('node', $variables['node'], 'field_age_bracket');\n $first_item = array_shift($field_items);\n\n $value = $first_item['value'];\n\n/* If you want to write <div class=\"<?php echo $extra_class; ?>\">... in your template file:\n $vars['extra_class'] = $value;*/\n\n /* Or if you want to add this to the classes on the main node <div>:*/\n $vars['classes_array'][] = $value;\n }\n}", "title": "" }, { "docid": "764a711420feb79c5d214b1eb7c7fdf6", "score": "0.5001528", "text": "function acf_prepare_field_for_import( $field ) {\n}", "title": "" }, { "docid": "3dfeb76fcccd91edef98ac34cb46ef3f", "score": "0.49883917", "text": "protected function process()\n {\n if (empty($this->maskConfiguration['tt_content']['elements'])) {\n return;\n }\n\n $extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['mask_export']);\n if (empty($extensionConfiguration['contentElementIcons'])) {\n return;\n }\n\n $maskConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['mask']);\n $maskIconFolder = PATH_site . $maskConfiguration['preview'];\n\n $elements = $this->maskConfiguration['tt_content']['elements'];\n ksort($elements);\n\n $iconRegistryConfiguration = '';\n foreach ($elements as $element) {\n $key = $element['key'];\n $iconIdentifier = 'tx_mask_' . $key;\n $icon = 'ce_' . $key . '.png';\n if (file_exists($maskIconFolder . $icon)\n || empty($element['icon'])\n ) {\n $iconFileName = file_exists($maskIconFolder . $icon) ? $maskIconFolder . $icon\n : ExtensionManagementUtility::extPath('mask_export') . 'ext_icon.png';\n $iconPath = $this->iconResourceFilePath . $icon;\n $this->addPlainTextFile(\n $iconPath,\n file_get_contents($iconFileName)\n );\n $iconRegistryConfiguration .=\n<<<EOS\n\\$iconRegistry->registerIcon(\n '$iconIdentifier',\n \\TYPO3\\CMS\\Core\\Imaging\\IconProvider\\BitmapIconProvider::class,\n [\n 'source' => 'EXT:mask/$iconPath',\n ]\n);\n\nEOS;\n } else {\n $iconName = substr($element['icon'], 3);\n $iconRegistryConfiguration .=\n<<<EOS\n\\$iconRegistry->registerIcon(\n '$iconIdentifier',\n \\TYPO3\\CMS\\Core\\Imaging\\IconProvider\\FontawesomeIconProvider::class,\n [\n 'name' => '$iconName',\n ]\n);\n\nEOS;\n }\n }\n\n if (!empty($iconRegistryConfiguration)) {\n $this->appendPhpFile(\n 'ext_localconf.php',\n<<<EOS\n// Register content element icons\n\\$iconRegistry = \\\\TYPO3\\\\CMS\\\\Core\\\\Utility\\\\GeneralUtility::makeInstance(\\\\TYPO3\\\\CMS\\\\Core\\\\Imaging\\\\IconRegistry::class);\n$iconRegistryConfiguration\n\nEOS\n );\n }\n }", "title": "" }, { "docid": "6d55f470f3a08ddb09c6e4a8ed972b48", "score": "0.49774796", "text": "function acf_prepare_field( $field ) {\n}", "title": "" }, { "docid": "4226a6918912b20c27a46cbcc86ae46d", "score": "0.49735817", "text": "function wpcf_fields_email() {\n\n return array(\n 'id' => 'wpcf-email',\n 'title' => __( 'Email', 'wpcf' ),\n 'description' => __( 'Email', 'wpcf' ),\n 'validate' => array(\n 'required' => array(\n 'form-settings' =>\n include( dirname( __FILE__ ) . '/patterns/validate/form-settings/required.php' ),\n ),\n 'email' => array(\n 'form-settings' => array_replace_recursive(\n include( dirname( __FILE__ ) . '/patterns/validate/form-settings/default.php' ),\n array(\n 'control' => array(\n '#title' => __('Validation', 'wpcf' ),\n '#label' => 'Email',\n )\n )\n )\n )\n ),\n 'inherited_field_type' => 'textfield',\n 'font-awesome' => 'envelope',\n );\n}", "title": "" }, { "docid": "14175ff8597ebeeab2d2232fe40b5556", "score": "0.49721095", "text": "function material_design_process_field(&$variables) {\n $element = $variables['element'];\n\n // Field type image\n if ($element['#field_type'] == 'image') {\n\n // Reduce number of images in teaser view mode to single image\n if ($element['#view_mode'] == 'teaser') {\n $item = reset($variables['items']);\n $variables['items'] = array($item);\n }\n\n }\n\n}", "title": "" }, { "docid": "85c135341465e69180c802be5919f1a2", "score": "0.49641183", "text": "function pixelgarage_preprocess_page(&$vars) {\n // hide titles on login forms\n pg_login_preprocess_page($vars);\n\n // replace logo with .svg\n //$vars['logo'] = str_replace('.jpg', '.svg', $vars['logo']);\n}", "title": "" }, { "docid": "5de27180e4f1460b9f7353c22623bb99", "score": "0.49606013", "text": "function _name_field_settings_pre_render($form) {\n $form['styled_settings'] = array(\n '#prefix' => '<table>',\n '#suffix' => '</table>',\n '#weight' => 1,\n 'thead' => array(\n '#prefix' => '<thead><tr><th>' . t('Field') . '</th>',\n '#suffix' => '</tr></thead>',\n '#weight' => 0,\n ),\n 'tbody' => array(\n '#prefix' => '<tbody>',\n '#suffix' => '</tbody>',\n '#weight' => 1,\n 'title_display' => array(\n '#prefix' => '<tr><td><strong>' . t('Title display') . '<sup>1</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 1,\n ),\n 'field_type' => array(\n '#prefix' => '<tr><td><strong>' . t('Field type') . '<sup>2</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 2,\n ),\n 'size' => array(\n '#prefix' => '<tr><td><strong>' . t('HTML size') . '<sup>3</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 3,\n ),\n 'inline_css' => array(\n '#prefix' => '<tr><td><strong>' . t('Inline styles') . '<sup>4</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 4,\n ),\n ),\n 'tfoot' => array(\n '#markup' => '<tfoot><tr><td colspan=\"7\"><ol>'\n . '<li>' . t('The title display controls how the label of the name component is displayed in the form. \"%above\" is the standard title; \"%below\" is the standard description; \"%hidden\" removes the label.', array('%above' => t('above'), '%below' => t('below'), '%hidden' => t('hidden'))) . '</li>'\n . '<li>' . t('The Field type controls how the field is rendered. Autocomplete is a text field with autocomplete, and the behaviour of this is controlled by the field settings.') . '</li>'\n . '<li>' . t('The HTML size property tells the browser what the width of the field should be when it is rendered. This gets overriden by the themes CSS properties. This must be between 1 and 255.') . '</li>'\n . '<li>' . t('Additional inline styles for the input element. For example, \"width: 45px; background-color: #f3f3f3\"') . '</li>'\n . '</ol></td></tr></tfoot>',\n '#weight' => 2,\n ),\n 'extra_fields' => array(\n '#weight' => 3,\n ),\n );\n\n $i = 0;\n foreach (_name_translations() as $key => $title) {\n // Adds the table header for the particullar field.\n $form['styled_settings']['thead'][$key]['#markup'] = '<th>' . $title . '</th>';\n $form['styled_settings']['thead'][$key]['#weight'] = ++$i;\n\n // Strip the title & description.\n unset($form['size'][$key]['#description']);\n unset($form['size'][$key]['#title']);\n $form['size'][$key]['#size'] = 5;\n\n unset($form['title_display'][$key]['#description']);\n unset($form['title_display'][$key]['#title']);\n\n unset($form['field_type'][$key]['#description']);\n unset($form['field_type'][$key]['#title']);\n\n unset($form['inline_css'][$key]['#description']);\n unset($form['inline_css'][$key]['#title']);\n\n // Moves the size element into the table.\n $form['styled_settings']['tbody']['size'][$key] = $form['size'][$key];\n $form['styled_settings']['tbody']['size'][$key]['#prefix'] = '<td>';\n $form['styled_settings']['tbody']['size'][$key]['#suffix'] = '</td>';\n $form['styled_settings']['tbody']['size'][$key]['#weight'] = $i;\n\n $form['styled_settings']['tbody']['title_display'][$key] = $form['title_display'][$key];\n $form['styled_settings']['tbody']['title_display'][$key]['#prefix'] = '<td>';\n $form['styled_settings']['tbody']['title_display'][$key]['#suffix'] = '</td>';\n $form['styled_settings']['tbody']['title_display'][$key]['#weight'] = $i;\n\n $form['styled_settings']['tbody']['field_type'][$key] = $form['field_type'][$key];\n $form['styled_settings']['tbody']['field_type'][$key]['#prefix'] = '<td>';\n $form['styled_settings']['tbody']['field_type'][$key]['#suffix'] = '</td>';\n $form['styled_settings']['tbody']['field_type'][$key]['#weight'] = $i;\n\n $form['styled_settings']['tbody']['inline_css'][$key] = $form['inline_css'][$key];\n $form['styled_settings']['tbody']['inline_css'][$key]['#prefix'] = '<td>';\n $form['styled_settings']['tbody']['inline_css'][$key]['#suffix'] = '</td>';\n $form['styled_settings']['tbody']['inline_css'][$key]['#weight'] = $i;\n\n // Clean up the leftovers.\n unset($form['size'][$key]);\n $form['size']['#access'] = FALSE;\n\n unset($form['title_display'][$key]);\n $form['title_display']['#access'] = FALSE;\n\n unset($form['field_type'][$key]);\n $form['field_type']['#access'] = FALSE;\n\n unset($form['inline_css'][$key]);\n $form['inline_css']['#access'] = FALSE;\n }\n\n return $form;\n}", "title": "" }, { "docid": "8eacbc49a4e4c3eb375ac900dfb29b13", "score": "0.49529988", "text": "function bbloomer_display_acf_field_under_images() {\n\techo '<a rel=\"nofollow\" href=';\n\techo get_field('pdf_media_file');\n\techo ' class=\"button product_type_simple add_to_cart_button ajax_add_to_cart\">Τεχνικά χαρακτηριστικά</a>';\n // Note: 'trade' is the slug of the ACF\n}", "title": "" }, { "docid": "11154b4df6b5331a6876ec7c76b57dc4", "score": "0.4952412", "text": "function student_crm_preprocess_node(&$variables) {\n unset($variables['submitted']);\n}", "title": "" }, { "docid": "61910cf02df66957a122bf0b161e499d", "score": "0.49517947", "text": "function acf_head_input()\n\t{\n\t\t\n\t\t?>\n<script type=\"text/javascript\">\n\n// admin url\nacf.admin_url = \"<?php echo admin_url(); ?>\";\n\t\n// messages\nacf.text.validation_error = \"<?php _e(\"Validation Failed. One or more fields below are required.\",'acf'); ?>\";\nacf.text.file_tb_title_add = \"<?php _e(\"Add File to Field\",'acf'); ?>\";\nacf.text.file_tb_title_edit = \"<?php _e(\"Edit File\",'acf'); ?>\";\nacf.text.image_tb_title_add = \"<?php _e(\"Add Image to Field\",'acf'); ?>\";\nacf.text.image_tb_title_edit = \"<?php _e(\"Edit Image\",'acf'); ?>\";\nacf.text.relationship_max_alert = \"<?php _e(\"Maximum values reached ( {max} values )\",'acf'); ?>\";\nacf.text.gallery_tb_title_add = \"<?php _e(\"Add Image to Gallery\",'acf'); ?>\";\nacf.text.gallery_tb_title_edit = \"<?php _e(\"Edit Image\",'acf'); ?>\";\n\n</script>\n\t\t<?php\n\t\t\n\t\tforeach($this->parent->fields as $field)\n\t\t{\n\t\t\t$field->admin_head();\n\t\t}\n\t}", "title": "" }, { "docid": "026a945688c543b718aa612b49276812", "score": "0.49505892", "text": "function elearning_alpha_preprocess_node_open_question(&$vars) {\n $vars['display_submitted'] = FALSE;\n $account = user_load($vars['uid']);\n $vars['user_picture'] = theme('user_picture', \n array(\n 'account' => $account, \n 'size' => 'tiny',\n 'access' => FALSE,\n )\n );\n drupal_add_css(drupal_get_path('theme', 'elearning') . '/widgets/elearning_fivestar/elearning_fivestar_widget.css');\n}", "title": "" }, { "docid": "ee4d4c36b2acc9611c3ccaadbe49c909", "score": "0.4949474", "text": "function globallink_insert_fc_fields($node_type) {\n $field_arr = field_info_instances('node', $node_type);\n\n $keys = array_keys($field_arr);\n\n foreach ($keys as $field_name) {\n $field_info = field_info_field($field_name);\n\n if ($field_info['type'] != 'field_collection') {\n continue;\n }\n\n db_insert('globallink_field_config')\n ->fields(array(\n 'content_type' => $node_type,\n 'entity_type' => 'node',\n 'bundle' => $node_type,\n 'field_name' => $field_name,\n 'field_type' => $field_info['type'],\n 'field_label' => $field_arr[$field_name]['label'],\n 'translatable' => 0,\n ))->execute();\n\n $fc_field_infos = field_info_instances('field_collection_item');\n\n if (isset($fc_field_infos) && isset($fc_field_infos[$field_name]) && is_array($fc_field_infos[$field_name])) {\n $fc_items = array_keys($fc_field_infos[$field_name]);\n\n foreach ($fc_items as $fc_item) {\n globallink_insert_fc_item_fields($node_type, $field_name, $fc_item);\n }\n }\n }\n}", "title": "" }, { "docid": "35b6affa47ae15e8ca8cb812a7940d0b", "score": "0.49462813", "text": "public function add_fields_custom_labels_cb($args) {\n\n $referrer = $args['referrer'];\n\n switch ($referrer) {\n\n case PTB_Custom_Taxonomy::CL_SEARCH_ITEMS :\n\n echo $this->generate_input_text(\n PTB_Custom_Taxonomy::CL_SEARCH_ITEMS, $this->ctx->search_items, false, __(\"The search items text.\", 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::CL_POPULAR_ITEMS :\n\n echo $this->generate_input_text(\n PTB_Custom_Taxonomy::CL_POPULAR_ITEMS, $this->ctx->popular_items, false, __(\"The popular items text. This string is not used on hierarchical taxonomies.\", 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::CL_ALL_ITEMS :\n\n echo $this->generate_input_text(\n PTB_Custom_Taxonomy::CL_ALL_ITEMS, $this->ctx->all_items, false, __(\"The all items text.\", 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::CL_PARENT_ITEM :\n\n echo $this->generate_input_text(\n PTB_Custom_Taxonomy::CL_PARENT_ITEM, $this->ctx->parent_item, false, __(\"The parent item text. This string is not used on non-hierarchical taxonomies such as post tags.\", 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::CL_PARENT_ITEM_COLON :\n\n echo $this->generate_input_text(\n PTB_Custom_Taxonomy::CL_PARENT_ITEM_COLON, $this->ctx->parent_item_colon, false, __(\"The same as parent_item, but with colon : in the end.\", 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::CL_EDIT_ITEM :\n\n echo $this->generate_input_text(\n PTB_Custom_Taxonomy::CL_EDIT_ITEM, $this->ctx->edit_item, false, __(\"The edit item text.\", 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::CL_UPDATE_ITEM :\n\n echo $this->generate_input_text(\n PTB_Custom_Taxonomy::CL_UPDATE_ITEM, $this->ctx->update_item, false, __(\"The update item text.\", 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::CL_ADD_NEW_ITEM :\n\n echo $this->generate_input_text(\n PTB_Custom_Taxonomy::CL_ADD_NEW_ITEM, $this->ctx->add_new_item, false, __(\"The add new item text.\", 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::CL_NEW_ITEM_NAME :\n\n echo $this->generate_input_text(\n PTB_Custom_Taxonomy::CL_NEW_ITEM_NAME, $this->ctx->new_item_name, false, __(\"The new item name text.\", 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::CL_SEPARATE_ITEMS_WITH_COMMAS :\n\n echo $this->generate_input_text(\n PTB_Custom_Taxonomy::CL_SEPARATE_ITEMS_WITH_COMMAS, $this->ctx->separate_items_with_commas, false, __(\"The separate item with commas text used in the taxonomy meta box. This string is not used on hierarchical taxonomies.\", 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::CL_ADD_OR_REMOVE_ITEMS :\n\n echo $this->generate_input_text(\n PTB_Custom_Taxonomy::CL_ADD_OR_REMOVE_ITEMS, $this->ctx->add_or_remove_items, false, __(\"The add or remove items text and used in the meta box when JavaScript is disabled. This string is not used on hierarchical taxonomies.\", 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::CL_CHOOSE_FROM_MOST_USED :\n\n echo $this->generate_input_text(\n PTB_Custom_Taxonomy::CL_CHOOSE_FROM_MOST_USED, $this->ctx->choose_from_most_used, false, __(\"The choose from most used text used in the taxonomy meta box. This string is not used on hierarchical taxonomies.\", 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::CL_MENU_NAME :\n\n echo $this->generate_input_text(\n PTB_Custom_Taxonomy::CL_MENU_NAME, $this->ctx->menu_name, false, __(\"The menu name text. This string is the name to give menu items. If not set, defaults to value of name label.\", 'ptb')\n );\n break;\n }\n }", "title": "" }, { "docid": "f615731de5dc8c6aea49f984d755d10e", "score": "0.493555", "text": "function theme_feed_item_field_attach($variables) {\r\n $elements = $variables['elements'];\r\n \r\n // Headers.\r\n $header = array(\r\n array('data' => 'Label'),\r\n array('data' => 'Weight'),\r\n array('data' => 'Tag'),\r\n array('data' => 'Type'),\r\n array('data' => 'Operations'),\r\n );\r\n \r\n $rows = array();\r\n \r\n // Field Rows. \r\n if (!empty($elements['item-fields'])) {\r\n foreach (element_children($elements['item-fields'], TRUE) as $name) {\r\n $field = $elements['item-fields'][$name];\r\n \r\n $indentation = array(\r\n \t'#type' => 'markup',\r\n \t'#markup' => theme('indentation', array('size' => $field['#depth'])),\r\n );\r\n \r\n $rows[] = array(\r\n 'class' => array('draggable'),\r\n 'data' => array(\r\n array('data' => array($indentation, $field['name'])),\r\n array('data' => array($field['weight'], $field['parent'], $field['id'])),\r\n array('data' => $field['tag']),\r\n array('data' => $field['type']),\r\n array('data' => $field['settings']),\r\n ),\r\n );\r\n }\r\n }\r\n \r\n // New field Rows.\r\n $row = array();\r\n $row[] = array('data' => $elements['add-item-field']['name']);\r\n $row[] = array('data' => array($elements['add-item-field']['weight'], $elements['add-item-field']['parent']));\r\n $row[] = array('data' => $elements['add-item-field']['tag']);\r\n $row[] = array('data' => $elements['add-item-field']['type']);\r\n $row[] = array('data' => '&nbsp;');\r\n \r\n $rows[] = array('data' => $row, 'class' => array('draggable', 'tabledrag-leaf'));\r\n \r\n drupal_add_tabledrag('feed-item-field', 'match', 'parent', 'item-field-parent', 'item-field-parent', 'item-field-id');\r\n drupal_add_tabledrag('feed-item-field', 'order', 'sibling', 'item-field-weight');\r\n \r\n return theme('feed_block', array(\r\n 'attributes' => array('id' => 'feed-item-field-container'),\r\n 'title' => 'Feed Item Fields',\r\n 'content' => array(\r\n '#theme' => 'table',\r\n '#header' => $header,\r\n '#rows' => $rows,\r\n '#attributes' => array(\r\n \t'id' => 'feed-item-field',\r\n ),\r\n ),\r\n ));\r\n}", "title": "" }, { "docid": "350155261730b7ed4f49229700b87734", "score": "0.49301428", "text": "function tapas_field_bases() {\n\n $allowed_ographies = array (\n 'allowed_values' => array(\n 'bibliography' => 'bibliography',\n 'odd_file' => 'odd_file',\n 'orgography' => 'orgography',\n 'otherography' => 'otherography',\n 'personography' => 'personography',\n 'placeography' => 'placeography'\n ),\n );\n\n $allowed_status = array(\n 'allowed_values' => array(\n STATUS_INPROGRESS => \"This record is currently being processed. Please check back later.\",\n STATUS_FAILED => \"Record uploaded failed!\",\n STATUS_SUCCESS => \"Record upload completed successfully\"\n ),\n );\n\n\treturn array(\n\t\tTAPAS_FIELD_PREFIX . 'description' => array(\n\t\t\t'field_name' => TAPAS_FIELD_PREFIX . 'description',\n\t\t\t'entity_types' => array('node'),\n\t\t\t'cardinality' => 1,\n\t\t\t'module' => 'text',\n\t\t\t'type' => 'text_long',\n\t\t),\n\t\tTAPAS_FIELD_PREFIX . 'thumbnail' => array(\n\t\t\t'field_name' => TAPAS_FIELD_PREFIX . 'thumbnail',\n\t\t\t'entity_types' => array('node'),\n\t\t\t'cardinality' => 1,\n\t\t\t'module' => 'image',\n\t\t\t'type' => 'image',\n\t\t),\n\t\tTAPAS_FIELD_PREFIX . 'slug' => array(\n\t\t\t'field_name' => TAPAS_FIELD_PREFIX . 'slug',\n\t\t\t'entity_types' => array('node'),\n\t\t\t'cardinality' => 1,\n\t\t\t'module' => 'text',\n\t\t\t'type' => 'text',\n\t\t),\n\t\tTAPAS_FIELD_PREFIX . 'project' => array(\n\t\t\t'field_name' => TAPAS_FIELD_PREFIX . 'project',\n\t\t\t'entity_types' => array('node'),\n\t\t\t'cardinality' => 1,\n\t\t\t'module' => 'entityreference',\n\t\t\t'type' => 'entityreference',\n\t\t),\n\t\tTAPAS_FIELD_PREFIX . 'links' => array(\n\t\t\t'field_name' => TAPAS_FIELD_PREFIX . 'links',\n\t\t\t'entity_types' => array('node'),\n\t\t\t'cardinality' => -1,\n\t\t\t'module' => 'link',\n\t\t\t'type' => 'link_field',\n\t\t),\n\t\tTAPAS_FIELD_PREFIX . 'tei_file' => array(\n\t\t\t'field_name' => TAPAS_FIELD_PREFIX . 'tei_file',\n\t\t\t'entity_types' => array('node'),\n\t\t\t'cardinality' => -1,\n\t\t\t'module' => 'file',\n\t\t\t'type' => 'file',\n\t\t),\n\t\tTAPAS_FIELD_PREFIX . 'attachments' => array(\n\t\t\t'field_name' => TAPAS_FIELD_PREFIX . 'attachments',\n\t\t\t'entity_types' => array('node'),\n\t\t\t'cardinality' => -1,\n\t\t\t'module' => 'file',\n\t\t\t'type' => 'file',\n\t\t),\n\t\tTAPAS_FIELD_PREFIX . 'display_auth' => array(\n\t\t\t'field_name' => TAPAS_FIELD_PREFIX . 'display_auth',\n\t\t\t'entity_types' => array('node'),\n\t\t\t'cardinality' => -1,\n\t\t\t'module' => 'text',\n\t\t\t'type' => 'text',\n\t\t),\n\t\tTAPAS_FIELD_PREFIX . 'display_contrib' => array(\n\t\t\t'field_name' => TAPAS_FIELD_PREFIX .'display_contrib',\n\t\t\t'entity_types' => array('node'),\n\t\t\t'cardinality' => -1,\n\t\t\t'module' => 'text',\n\t\t\t'type' => 'text',\n\t\t),\n\t\tTAPAS_FIELD_PREFIX . 'display_date' => array(\n\t\t\t'field_name' => TAPAS_FIELD_PREFIX . 'display_date',\n\t\t\t'entity_types' => array('node'),\n\t\t\t'cardinality' => 1,\n\t\t\t'module' => 'date',\n\t\t\t'type' => 'date',\n\t\t),\n\t\tTAPAS_FIELD_PREFIX . 'record_ography_type' => array(\n\t\t\t'field_name' => TAPAS_FIELD_PREFIX . 'record_ography_types',\n\t\t\t'entity_types' => array('node'),\n\t\t\t'cardinality' => -1,\n\t\t\t'module' => 'text',\n\t\t\t'type' => 'list_text',\n\t\t\t'settings' => $allowed_status,\n\t\t),\n\t\tTAPAS_FIELD_PREFIX . 'upload_status' => array(\n\t\t\t'field_name' => TAPAS_FIELD_PREFIX . 'upload_status',\n\t\t\t'entity_types' => array('node'),\n\t\t\t'cardinality' => 1,\n\t\t\t'module' => 'text',\n\t\t\t'type' => 'list_text',\n\t\t\t'settings' => $allowed_status,\n\t\t)\n\t);\n\n}", "title": "" }, { "docid": "e3486c948041bb55a3f5e8979ebefa63", "score": "0.492905", "text": "function student_crm_preprocess_entity(&$variables) {\n if($variables['elements']['#entity_type'] == 'crm_core_activity') {\n $variables['elements']['elements']['#template'] = 'templates/crm_core_activity';\n $activity = $variables['crm_core_activity'];\n $variables['content']['field_activity_participants'] = $variables['field_activity_participants'] = null;\n $variables['content']['field_activity_date'] = $variables['field_activity_date'] = null;\n \n if(isset($variables['content']['status_change'])) {\n $variables['status_change'] = $variables['content']['status_change'];\n unset($variables['content']['status_change']);\n }\n \n $author = user_load($activity->uid);\n $variables['date'] = format_date($activity->created, 'short');\n $variables['name'] = theme('username', array('account' => $author));\n $variables['submitted'] = t('By !username <span class=\"date\">on !datetime</span>', array('!username' => $variables['name'], '!datetime' => $variables['date']));\n \n $picture = field_get_items('user', $author, 'field_user_picture');\n if ($picture[0]['uri']) {\n $variables['picture'] = theme('image_style', array('style_name' => 'history_small',\n 'path' => $picture[0]['uri'],\n 'alt' => strip_tags($variables['name'])));\n }\n $variables['contact_type'] = $variables['content']['field_activity_contact_method'][0]['#title'];\n unset($variables['content']['field_activity_contact_method']);\n $variables['content']['field_activity_notes']['#label_display'] = 'hidden';\n $variables['permalink'] = l(t('permalink'), 'crm/activity/'. $activity->activity_id);\n \n }\n}", "title": "" }, { "docid": "e5ddb6b6c1503d50beb9091b54d48cef", "score": "0.4928487", "text": "function acf_render_field( $field ) {\n}", "title": "" }, { "docid": "b64335f31eb85221d8a23a2068784eaa", "score": "0.49146563", "text": "function kibble_add_fields() {\n global $wp_version;\n kibble_setup_field_scripts();\n\t?>\n <div class=\"form-field\" style=\"overflow: hidden;\">\n <label><?php _e( 'Image' ); ?></label>\n <input type=\"hidden\" name=\"kibble_tax_image\" id=\"kibble_tax_image\" value=\"\" />\n <input type=\"hidden\" name=\"kibble_tax_image_classes\" id=\"kibble_tax_image_classes\" value=\"\" />\n <br/>\n <img src=\"\" id=\"kibble_tax_image_preview\" style=\"max-width:300px;max-height:300px;float:left;display:none;padding:0 10px 5px 0;\" />\n <a href=\"#\" class=\"<?php echo 'button'; ?>\" id=\"kibble_tax_add_image\"><?php _e( 'Add/Change Image' ); ?></a>\n <a href=\"#\" class=\"<?php echo 'button'; ?>\" id=\"kibble_tax_remove_image\" style=\"display: none;\"><?php _e( 'Remove Image' ); ?></a>\n </div>\n <?php\n}", "title": "" }, { "docid": "eeba4126aaedb65bd1ba30b785965f1a", "score": "0.49073184", "text": "function icoomon_field_contents( $field ){\n\n $field['type'] = 'select';\n $field['choices'] = array();\n $field['choices']['false'] = '';\n $field['choices']['icon-instagram'] = 'Instagram';\n $field['choices']['icon-linkedin'] = 'Linkedin';\n $field['choices']['icon-facebook'] = 'Facebook';\n $field['choices']['icon-quote-up'] = 'Quote - Venstre';\n $field['choices']['icon-quote-down'] = 'Quote - Højre';\n $field['choices']['icon-arrow-down'] = 'Pil - Ned';\n $field['choices']['icon-arrow-right'] = 'Pil - Højre';\n $field['choices']['icon-check'] = 'Flueben';\n $field['choices']['icon-coaching'] = 'Coaching';\n $field['choices']['icon-digitalisering'] = 'Digitalisering';\n $field['choices']['icon-forretningsudvikling'] = 'Forretningsudvikling';\n $field['choices']['icon-mail'] = 'Email';\n $field['choices']['icon-telefon'] = 'Telefon';\n $field['choices']['icon-pin'] = 'Lokationsnål';\n $field['choices']['icon-sortsnak'] = 'Sortsnak';\n $field['choices']['icon-sparring'] = 'Sparring';\n $field['choices']['icon-work-life'] = 'Work-Life';\n $field['choices']['icon-businessbuddy'] = 'BusinessBuddy';\n\n\n\n $field['wrapper']['class'] = 'icomoon-select-element';\n $field['ui'] = true;\n\n return $field;\n }", "title": "" }, { "docid": "ac3c897f28225128cf73ff209a1e90d5", "score": "0.49037364", "text": "function lu_status_icons($field) { ?>\n\n\t<span class=\"dashicons dashicons-update lu-update\" data-field=\"<?php echo $field['id']; ?>\" data-type=\"<?php echo $field['type']; ?>\" data-taxonomy=\"<?php echo $field['taxonomy']; ?>\" data-selector=\"<?php echo $field['selector']; ?>\"></span>\n\t<span class=\"dashicons dashicons-yes\" id=\"success-<?php echo $field['id']; ?>\"></span>\n\t<span class=\"loading\" id=\"loading-<?php echo $field['id']; ?>\"><img src=\"<?php echo LU_PLUGIN_URL . '/assets/images/ajax-loader.gif'; ?>\"></span>\n\n<?php }", "title": "" }, { "docid": "ba5a95492ac14b6e215d7c8ac7077296", "score": "0.48805717", "text": "function uds_divi_social_menu_item_fields( $item_id, $item, $depth, $args, $current_object_id ) {\n\n\t// Get the saved value for the custom field\n\t$selected_value = get_post_meta( $item_id, '_menu_item_social_icon', true );\n\n\t?>\n\t\t<p class=\"field-social-icon description description-wide\">\n\t\t<label for=\"field-social-icon-select-<?php echo esc_attr( $item_id ); ?>\">Social Media Icon</label>\n\t\t<select id=\"field-social-icon-select-<?php echo esc_attr( $item_id ); ?>\" name=\"menu-item-social-icon[<?php echo esc_attr( $item_id ); ?>]\">\n\t\t\t<option value=\"\" <?php selected( $selected_value, '' ); ?>>Select an icon</option>\n\t\t\t<option value=\"fa-square-behance\" <?php selected( $selected_value, 'fa-square-behance' ); ?>>Behance</option>\n\t\t\t<option value=\"fa-square-facebook\" <?php selected( $selected_value, 'fa-square-facebook' ); ?>>Facebook</option>\n\t\t\t<option value=\"fa-flickr\" <?php selected( $selected_value, 'fa-flickr' ); ?>>Flickr</option>\n\t\t\t<option value=\"fa-square-github\" <?php selected( $selected_value, 'fa-square-github' ); ?>>GitHub</option>\n\t\t\t<option value=\"fa-square-instagram\" <?php selected( $selected_value, 'fa-square-instagram' ); ?>>Instagram</option>\n\t\t\t<option value=\"fa-linkedin\" <?php selected( $selected_value, 'fa-linkedin' ); ?>>LinkedIn</option>\n\t\t\t<option value=\"fa-square-pinterest\" <?php selected( $selected_value, 'fa-square-pinterest' ); ?>>Pinterest</option>\n\t\t\t<option value=\"fa-researchgate\" <?php selected( $selected_value, 'fa-researchgate' ); ?>>ResearchGate</option>\n\t\t\t<option value=\"fa-tiktok\" <?php selected( $selected_value, 'fa-tiktok' ); ?>>TikTok</option>\n\t\t\t<option value=\"fa-square-tumblr\" <?php selected( $selected_value, 'fa-square-tumblr' ); ?>>Tumblr</option>\n\t\t\t<option value=\"fa-square-twitter\" <?php selected( $selected_value, 'fa-square-twitter' ); ?>>Twitter</option>\n\t\t\t<option value=\"fa-square-vimeo\" <?php selected( $selected_value, 'fa-square-vimeo' ); ?>>Vimeo</option>\n\t\t\t<option value=\"fa-wordpress\" <?php selected( $selected_value, 'fa-wordpress' ); ?>>WordPress</option>\n\t\t\t<option value=\"fa-square-youtube\" <?php selected( $selected_value, 'fa-square-youtube' ); ?>>YouTube</option>\n\t\t</select>\n\t\t</p>\n\t<?php\n}", "title": "" }, { "docid": "3c5b406902a009e52456f41cd5ce44d3", "score": "0.48714992", "text": "function ecleds_preprocess_field(&$vars, $hook) {\n // For the completion date and expected completion date fields, assign labels\n // and classes depending on which fields are present.\n $field_name = $vars['element']['#field_name'];\n if (in_array($field_name, array('field_completion_month', 'field_completion_year', 'field_expected_completion_month', 'field_field_exp_compl_year'))) {\n $node = $vars['element']['#object'];\n $lang = $node->language;\n $vars['label'] = '';\n\n\n switch ($field_name) {\n case 'field_completion_month':\n $vars['label'] = t('Completion Date:&nbsp;');\n break;\n case 'field_expected_completion_month':\n $vars['label'] = t('Expected Completion Date:&nbsp;');\n if (empty($node->field_completion_month[$lang][0]['value']) && empty($node->field_completion_year[$lang][0]['value'])) {\n $vars['classes_array'][] = 'no-completion-date';\n }\n break;\n case 'field_completion_year':\n if (empty($node->field_completion_month[$lang][0]['value'])) {\n $vars['label'] = t('Completion Date:&nbsp;');\n }\n break;\n case 'field_field_exp_compl_year':\n if (empty($node->field_expected_completion_month[$lang][0]['value'])) {\n $vars['label'] = t('Expected Completion Date:&nbsp;');\n $vars['classes_array'][] = 'no-expected-completion-month';\n if (empty($node->field_completion_month[$lang][0]['value']) && empty($node->field_completion_year[$lang][0]['value'])) {\n $vars['classes_array'][] = 'no-completion-date';\n }\n }\n break;\n }\n }\n // For decimal fields, suppress zeros after the decimal point.\n $decimal_fields = array(\n 'field_key_eco_sector_agriculture',\n 'field_key_eco_sector_industry',\n 'field_services',\n 'field_gpd_avg_annual_01_10',\n 'field_ghg_growth_20_year',\n 'field_ghg_growth_5_year',\n 'field_env_eco_forested',\n 'field_contrib_to_electricity',\n );\n if (in_array($field_name, $decimal_fields)) {\n $vars['items'][0]['#markup'] = str_replace(\".0%\", \"%\", str_replace(\"0%\", \"%\", $vars['items'][0]['#markup']));\n }\n}", "title": "" }, { "docid": "da88717b7fe32e47bf752c2e6859229a", "score": "0.48697633", "text": "function phptemplate_preprocess_page(&$variables) {\n /*\n * Provides alternative breadcrumbs for trails for:\n * - biblio nodes (articles in Bulletin of Zoologival Nomenclature)\n * - profile nodes (for Secretariat staff, Trustees & Commissioners)\n */\n\n if ($variables['node']->type == 'biblio') {\n //Set vid to BZN Volume/Issue taxonomy\n $BZN_vid = 14;\n \n $vi_links = array();\n \n\t//Get first term\n\t$terms = taxonomy_node_get_terms_by_vocabulary($variables['node'], $BZN_vid, $key = 'tid');\n\t\n\t//Check for parents (use first value only, there should be no multiple terms)\n\t$parents = taxonomy_get_parents_all($terms[1]->tid, 'tid');\n\t\n\tforeach ($parents as $parent) { //add parent terms to breadcrumb trail\n\t $vi_links[] = l($parent->name, 'taxonomy/term/'.$parent->tid);\n\t}\n\n //Replace existing breadcrumb\n $variables['breadcrumb'] = theme('breadcrumb', array_reverse($vi_links));\n }\n\n if ($variables['node']->type == 'profile') {\n //Get roles for profile and build breadcrumb array\n $role_links = array();\n\t$role_links[] = l('About the ICZN', 'content/about-iczn');\n\t\n\tswitch ($variables['node']->field_iczn_section[0]['value']) {\n\t case \"Trustee\":\n\t $role_links[] = l('Trustees', 'trustees');\n\t\tbreak;\n\t case \"Secretariat\":\n\t $role_links[] = l('Secretariat', 'secretariat');\n\t\tbreak;\n\t case \"Commissioner\":\n\t $role_links[] = l('Commissioners', 'commissioners');\n\t\tbreak;\n\t}\n \n //Replace existing breadcrumb\n $variables['breadcrumb'] = theme('breadcrumb', $role_links);\n }\n}", "title": "" }, { "docid": "6c6e1780c25c91ffebbef9a1c797c035", "score": "0.4865945", "text": "function template_preprocess_brightcove_cck_node_image(&$vars) {\n $vars['template_files'] = array(\n 'brightcove-cck-node-image--' . $vars['image_field'],\n 'brightcove-cck-node-image--' . $vars['field_name'] . '--' . $vars['image_field'],\n 'brightcove-cck-node-image--' . $vars['type_name'] . '--' . $vars['field_name'] . '--' . $vars['image_field'],\n );\n}", "title": "" }, { "docid": "d8d69fc26961e583a499e2a71d4445dc", "score": "0.48526853", "text": "function template_preprocess_megamenu_item_admin(&$variables) {\r\n prepare_subitem_icon($variables['icon_style'], $variables['item']);\r\n}", "title": "" }, { "docid": "6431adbf5d743d04baa2f472ae915c90", "score": "0.4848544", "text": "function renderOnSubmitHandler($field)\n\t{\n\t\tif ($this->parent->isReadOnly($field)) return \"\";\n\t\t\n\t\t$editor = $field.\"_editor\";\n\t\t\n\t\techo \"\\ttheEditors.$editor.prepareForSubmit();\\n\";\n\t}", "title": "" }, { "docid": "7563727f15c1360465c5a37e9b7dde71", "score": "0.48387432", "text": "function mele_commerce_preprocess_html(&$vars) {\n\n $vars['attributes_array']['class'][] = 'mele';\n\n // Add conditional stylesheets for IE\n drupal_add_css(path_to_theme() . '/css/commerce-kickstart-theme-ie-lte-8.css', array('group' => CSS_THEME, 'weight' => 23, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE));\n drupal_add_css(path_to_theme() . '/css/commerce-kickstart-theme-ie-lte-7.css', array('group' => CSS_THEME, 'weight' => 24, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'preprocess' => FALSE));\n \n // Add external libraries.\n drupal_add_css('https://use.fontawesome.com/releases/v5.0.8/css/all.css', array('preprocess' => FALSE));\n drupal_add_library('mele_commerce', 'selectnav'); \n \n // Query the view and add a class\n $view = views_get_page_view();\n if (\n isset($view) &&\n $view->name == 'main_menu'\n ) {\n $vars['attributes_array']['class'][] = 'main-menu';\n }\n\n}", "title": "" }, { "docid": "d16eef2cc42e41deb18311774634660a", "score": "0.48329946", "text": "function gp_homepage_preprocess_node_node_gallery_image(&$vars) {\n //$vars['submitted'] = date('l, F d, Y', );\n $vars['submitted'] = format_date($vars['created'], 'gp1');\n}", "title": "" }, { "docid": "1e6bf216f80fdc368efbd2824b744758", "score": "0.48324263", "text": "function acf_render_field_instructions( $field ) {\n}", "title": "" }, { "docid": "212256d7c74b3e9c952df79c45fa9866", "score": "0.48299667", "text": "function THEME_theme_preprocess_field(&$vars) {\n $element = $vars['element'];\n $vars['classes_array'][] = 'view-mode-' . $element['#view_mode'];\n $vars['image_caption_teaser'] = FALSE;\n $vars['image_caption_full'] = FALSE;\n if (theme_get_setting('image_caption_teaser') == 1) {\n $vars['image_caption_teaser'] = TRUE;\n }\n if (theme_get_setting('image_caption_full') == 1) {\n $vars['image_caption_full'] = TRUE;\n }\n $vars['field_view_mode'] = '';\n $vars['field_view_mode'] = $element['#view_mode'];\n}", "title": "" }, { "docid": "8c0a69bcd6dd53d99563d173d429035b", "score": "0.48109296", "text": "function render_field( $field ) {\n\n\t\t\t/*\n\t\t\t$field = Array (\n\t\t\t [ID] => 752\n\t\t\t [key] => field_57da1c73315f5\n\t\t\t [label] => Stock Featured Photo\n\t\t\t [name] => acf[field_57da1c73315f5]\n\t\t\t [prefix] => acf\n\t\t\t [type] => stock_photo\n\t\t\t [value] =>\n\t\t\t [menu_order] => 1\n\t\t\t [instructions] => This is the image at the top of your article, and is also used on the front page or article listing pages.\n\t\t\t [required] => 1\n\t\t\t [id] => acf-field_57da1c73315f5\n\t\t\t [class] =>\n\t\t\t [conditional_logic] => Array (\n\t\t [0] => Array (\n\t [0] => Array (\n [field] => field_57df8bc97e37f\n [operator] => ==\n [value] => Choose an image from the stock photo library\n )\n\t )\n\t\t )\n\t\t\t [parent] => 730\n\t\t\t [wrapper] => Array (\n\t\t [width] =>\n\t\t [class] =>\n\t\t [id] =>\n\t\t )\n\t\t\t [_name] => eca_featured_photo\n\t\t\t [_input] => acf[field_57da1c73315f5]\n\t\t\t [_valid] => 1\n\t\t\t [font_size] => 14\n\t\t\t)\n\t\t\t*/\n\n\t\t\t$title = \"\";\n\t\t\t$src = \"\";\n\t\t\t$alt = \"\";\n\n\t\t\tif ( (int) $field['value'] ) {\n\t\t\t\t$image = wp_get_attachment_image_src( (int) $field['value'], 'medium' );\n\n\t\t\t\t$title = get_the_title($field['value']);\n\t\t\t\t$src = $image[0];\n\t\t\t\t$alt = get_post_meta( (int) $field['value'], '_wp_attachment_image_alt', true );\n\t\t\t}\n\n\t\t\t// Add an action that will include our stockphoto script at the bottom of the page.\n\t\t\tif ( !has_action( 'wp_footer', 'eca_include_stock_photo_field_scripts' ) ) {\n\t\t\t\tadd_action( 'wp_footer', 'eca_include_stock_photo_field_scripts', 100 ); // see /includes/stock-photos-post-type.php\n\t\t\t}\n\n\t\t\t?>\n\t\t\t<div class=\"acf-stockphoto-preview\">\n\t\t\t\t<img src=\"<?php echo esc_attr($src); ?>\" alt=\"<?php echo esc_attr($alt); ?>\">\n\t\t\t\t<div class=\"acf-stockphoto-details\"><span class=\"acf-stockphoto-title\"><?php echo esc_html($title); ?></span></div>\n\t\t\t</div>\n\n\t\t\t<div class=\"acf-stockphoto-controls\">\n\t\t\t\t<button type=\"button\" class=\"button acf-stockphoto-browse-button\">Browse</button> <span class=\"acf-stockphoto-clear\" <?php if ( !$field['value'] ) echo 'style=\"display: none;\"'; ?>>(<a href=\"#\" class=\"acf-stockphoto-clear-button\">Clear Selection</a>)</span>\n\t\t\t</div>\n\n\t\t\t<input type=\"hidden\" name=\"<?php echo esc_attr($field['name']) ?>\" value=\"<?php echo esc_attr($field['value']) ?>\" class=\"acf-stockphoto-id\" />\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "3bb6d670637fec9aeb6dd737aa349df4", "score": "0.48020527", "text": "function template_preprocess_brightcove_cck_node_link(&$vars) {\n $vars['template_files'] = array(\n 'brightcove-cck-node-link--' . $vars['image_field'],\n 'brightcove-cck-node-link--' . $vars['field_name'] . '--' . $vars['image_field'],\n 'brightcove-cck-node-link--' . $vars['type_name'] . '--' . $vars['field_name'] . '--' . $vars['image_field'],\n );\n}", "title": "" }, { "docid": "d228b145efcff9d2124660b797cb6fea", "score": "0.4796552", "text": "function buildFieldLabels()\r\n\t{\r\n\t\tfor($i = 0; $i < count($this->fieldsList); $i ++) \r\n\t\t{\r\n\t\t\t$order_field = $this->listObject->pSet->GetFieldByIndex( $this->fieldsList[$i]->fieldIndex );\r\n\t\t\t$orderFieldName = GoodFieldName($order_field);\r\n\t\t\t$order_dir = $this->fieldsList[$i]->orderDirection == \"ASC\" ? \"a\" : \"d\";\r\n\t\t\t\t\t\r\n\t\t\tif($this->fieldsList[$i]->userDefined) \r\n\t\t\t\t$this->listObject->xt->assign_section($orderFieldName.\"_fieldheader\", \"\", \r\n\t\t\t\t\"<span data-icon=\\\"\".($order_dir == \"a\" ? \"sortasc\" : \"sortdesc\").\"\\\"></span>\");\r\n\t\t\t\t\t\r\n\t\t\t// default ASC for key fields\t\r\n\t\t\t$orderlinkattrs = $this->listObject->setLinksAttr( $orderFieldName, $order_dir, $this->fieldsList[$i]->userDefined );\t\t\r\n\t\t\t$this->listObject->xt->assign( $orderFieldName.\"_orderlinkattrs\", $orderlinkattrs );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "376e176bd8ef17743f79878b1b77550a", "score": "0.47896272", "text": "public function getCMSFields() {\n\t\t$fields = parent::getCMSFields();\n\n\t\t// Hide these from editing\n\t\t$fields->removeByName('ParentID');\n\t\t$fields->removeByName('Sort');\n\n\t\t//Remove to re-add\n\t\t$fields->removeByName('Type');\n\t\t$fields->removeByName('LinkLabel');\n\n\n $fields->removeByName('Image');\n\n $image = FileAttachmentField::create('Image', 'Image');\n $image->setAcceptedFiles(['.jpg, .jpeg, .png'])\n ->setDescription(\"Format: JPG or PNG <br>Approx dimensions: 400px * 225px\")\n ->setFolderName('Uploads/Small-Images')\n ->setMaxFiles(1)\n ->setMultiple(false)\n ->setTrackFiles(true);\n\n try {\n $image->setView('grid');\n } catch(Exception $e) {}\n\n\n $content = $fields->dataFieldByName('Content');\n $numberToDisplay = $fields->dataFieldByName('NumberToDisplay');\n $projectPage = $fields->dataFieldByName('ProjectPageID');\n $html = $fields->dataFieldByName('HTML');\n $subtitle = $fields->dataFieldByName('SubTitle');\n $link = $fields->dataFieldByName('LinkID');\n $html->setRows(20);\n $html->addExtraClass('no-pagebreak');\n\n $fields->removeByName('Content');\n $fields->removeByName('NumberToDisplay');\n $fields->removeByName('ProjectPageID');\n $fields->removeByName('HTML');\n $fields->removeByName('SubTitle');\n $fields->removeByName('LinkID');\n\n $fields->addFieldsToTab('Root.Main', [\n $subtitleWrapper = DisplayLogicWrapper::create($subtitle),\n $contentWrapper = DisplayLogicWrapper::create($content),\n $numberToDisplayWrapper = DisplayLogicWrapper::create($numberToDisplay),\n $projectPageWrapper = DisplayLogicWrapper::create($projectPage),\n $htmlWrapper = DisplayLogicWrapper::create($html),\n $linkWrapper = DisplayLogicWrapper::create($link),\n ]);\n\n\t\t$fields->insertAfter(\n\t\t\t$type = OptionSetField::create(\n\t\t\t\t\"Type\", \"Type\",\n\t\t\t\t$this->dbObject('Type')->enumValues()\n\t\t\t), \"Colour\"\n\t\t);\n\n\t\t$type->addExtraClass('inline-short-list');\n\n\t\t$fields->insertAfter(\n\t\t\tColorPaletteField::create(\n\t\t\t\t\"Colour\", \"Colour\",\n\t\t\t\tarray(\n\t\t\t\t\t'night'=> '#333333',\n\t\t\t\t\t'air'=> '#009EE2',\n\t\t\t\t\t'earth'=> ' #2e8c6e',\n\t\t\t\t\t'passion'=> '#b02635',\n\t\t\t\t\t'people'=> '#de347f',\n\t\t\t\t\t'inspiration'=> '#783980'\n\t\t\t\t)\n\t\t\t), \"Title\"\n\t\t);\n\n\t\t$fields->insertAfter($linkLabel = new TextField(\"LinkLabel\",\"Link Label\"), \"LinkID\");\n\t\t$fields->insertAfter($imageLogin = DisplayLogicWrapper::create($image), 'LinkLabel');\n\t\t$imageLogin->displayIf(\"Type\")->isEqualTo(\"Content\");\n\n\t\t$htmlWrapper->displayIf(\"Type\")->isEqualTo(\"HTML\");\n\t\t$subtitleWrapper->displayIf(\"Type\")->isEqualTo(\"HTML\");\n\n\t\t$linkWrapper->displayIf(\"Type\")->isEqualTo(\"Content\")->orIf(\"Type\")->isEqualTo(\"Project\");\n\t\t$linkLabel->displayIf(\"LinkID\")->isGreaterThan(0)->andIf(\"Type\")->isEqualTo(\"Content\");\n\n\t\t$numberToDisplayWrapper->hideIf(\"Type\")->isEqualTo(\"Content\")->orIf(\"Type\")->isEqualTo(\"HTML\");\n\t\t$projectPageWrapper->displayIf(\"Type\")->isEqualTo(\"Project\");\n\n\t\t$contentWrapper->displayIf(\"Type\")->isEqualTo(\"Content\");\n\n\n\t\t// Archived\n\t\t$fields->removeByName('Archived');\n\t\t$fields->addFieldToTab('Root.Main', $group = new CompositeField(\n\t\t\t$label = new LabelField(\"LabelArchive\",\"Archive this feature?\"),\n\t\t\tnew CheckboxField('Archived', '')\n\t\t));\n\n\t\t$group->addExtraClass(\"special field\");\n\t\t$label->addExtraClass(\"left\");\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "96dffa31eeda2c294f82bdfebdfd60c8", "score": "0.47895548", "text": "function onDisplayField(&$field, &$item)\r\n\t{\r\n\t\t// execute the code only if the field type match the plugin type\r\n\t\tif ( !in_array($field->field_type, self::$field_types) ) return;\r\n\t\t\r\n\t\t$field->label = JText::_($field->label);\r\n\t\t\r\n\t\t// initialize framework objects and other variables\r\n\t\t$document = JFactory::getDocument();\r\n\t\t\r\n\t\t// some parameter shortcuts\r\n\t\t$default_value_use = $field->parameters->get( 'default_value_use', 0 ) ;\r\n\t\t$default_value = ($item->version == 0 || $default_value_use > 0) ? $field->parameters->get( 'default_value', '' ) : '';\r\n\t\t$maxlength\t= (int)$field->parameters->get( 'maxlength', 0 ) ;\r\n\t\t$size = (int) $field->parameters->get( 'size', 30 ) ;\r\n\t\t$multiple = $field->parameters->get( 'allow_multiple', 1 ) ;\r\n\t\t$max_values = (int) $field->parameters->get( 'max_values', 0 ) ;\r\n\t\t$required = $field->parameters->get( 'required', 0 ) ;\r\n\t\t$required = $required ? ' required' : '';\r\n\t\t\r\n\t // add setMask function on the document.ready event\r\n\t\t$inputmask\t= $field->parameters->get( 'inputmask', false ) ;\r\n\t\t$custommask = $field->parameters->get( 'custommask', false ) ;\r\n\t\tstatic $inputmask_added = false;\r\n\t if ($inputmask && !$inputmask_added) {\r\n\t\t\t$inputmask_added = true;\r\n\t\t\tflexicontent_html::loadFramework('inputmask');\r\n\t\t}\r\n\t\t\r\n\t\t// create extra HTML TAG parameters for the text form field\r\n\t\t$attribs = $field->parameters->get( 'extra_attributes', '' ) ;\r\n\t\tif ($maxlength) $attribs .= ' maxlength=\"'.$maxlength.'\" ';\r\n\t\t\r\n\t\t// Initialise property with default value\r\n\t\tif ( !$field->value ) {\r\n\t\t\t$field->value = array();\r\n\t\t\t$field->value[0] = JText::_($default_value);\r\n\t\t} else {\r\n\t\t\tfor ($n=0; $n<count($field->value); $n++) {\r\n\t\t\t\t$field->value[$n] = htmlspecialchars( $field->value[$n], ENT_QUOTES, 'UTF-8' );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Field name and HTML TAG id\r\n\t\t$fieldname = FLEXI_J16GE ? 'custom['.$field->name.'][]' : $field->name.'[]';\r\n\t\t$elementid = FLEXI_J16GE ? 'custom_'.$field->name : $field->name;\r\n\t\t\r\n\t\t$js = \"\";\r\n\t\t\r\n\t\tif ($multiple) // handle multiple records\r\n\t\t{\r\n\t\t\tif (!FLEXI_J16GE) $document->addScript( JURI::root(true).'/components/com_flexicontent/assets/js/sortables.js' );\r\n\t\t\t\r\n\t\t\t// Add the drag and drop sorting feature\r\n\t\t\t$js .= \"\r\n\t\t\tjQuery(document).ready(function(){\r\n\t\t\t\tjQuery('#sortables_\".$field->id.\"').sortable({\r\n\t\t\t\t\thandle: '.fcfield-drag',\r\n\t\t\t\t\tcontainment: 'parent',\r\n\t\t\t\t\ttolerance: 'pointer'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t\";\r\n\t\t\t\r\n\t\t\tif ($max_values) FLEXI_J16GE ? JText::script(\"FLEXI_FIELD_MAX_ALLOWED_VALUES_REACHED\", true) : fcjsJText::script(\"FLEXI_FIELD_MAX_ALLOWED_VALUES_REACHED\", true);\r\n\t\t\t$js .= \"\r\n\t\t\tvar uniqueRowNum\".$field->id.\"\t= \".count($field->value).\"; // Unique row number incremented only\r\n\t\t\tvar rowCount\".$field->id.\"\t= \".count($field->value).\"; // Counts existing rows to be able to limit a max number of values\r\n\t\t\tvar maxValues\".$field->id.\" = \".$max_values.\";\r\n\r\n\t\t\tfunction addField\".$field->id.\"(el) {\r\n\t\t\t\tif((rowCount\".$field->id.\" >= maxValues\".$field->id.\") && (maxValues\".$field->id.\" != 0)) {\r\n\t\t\t\t\talert(Joomla.JText._('FLEXI_FIELD_MAX_ALLOWED_VALUES_REACHED') + maxValues\".$field->id.\");\r\n\t\t\t\t\treturn 'cancel';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tvar thisField \t = jQuery(el).prev().children().last();\r\n\t\t\t\tvar thisNewField = thisField.clone();\r\n\t\t\t\t\r\n\t\t\t\tjQuery(thisNewField).find('input').first().val(''); /* First element is the value input field, second is e.g remove button */\r\n\r\n\t\t\t\tvar has_inputmask = jQuery(thisNewField).find('input.has_inputmask').length != 0;\r\n\t\t\t\tif (has_inputmask) jQuery(thisNewField).find('input.has_inputmask').inputmask();\r\n\t\t\t\t\r\n\t\t\t\tvar has_select2 = jQuery(thisNewField).find('div.select2-container').length != 0;\r\n\t\t\t\tif (has_select2) {\r\n\t\t\t\t\tjQuery(thisNewField).find('div.select2-container').remove();\r\n\t\t\t\t\tjQuery(thisNewField).find('select.use_select2_lib').select2();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tjQuery(thisNewField).css('display', 'none');\r\n\t\t\t\tjQuery(thisNewField).insertAfter( jQuery(thisField) );\r\n\r\n\t\t\t\tvar input = jQuery(thisNewField).find('input').first();\r\n\t\t\t\tinput.attr('id', '\".$elementid.\"_'+uniqueRowNum\".$field->id.\");\r\n\t\t\t\t\";\r\n\t\t\t\r\n\t\t\tif ($field->field_type=='textselect') $js .= \"\r\n\t\t\t\tthisNewField.parent().find('select.fcfield_textselval').val('');\r\n\t\t\t\t\";\r\n\t\t\t\r\n\t\t\t$js .= \"\r\n\t\t\t\tjQuery('#sortables_\".$field->id.\"').sortable({\r\n\t\t\t\t\thandle: '.fcfield-drag',\r\n\t\t\t\t\tcontainment: 'parent',\r\n\t\t\t\t\ttolerance: 'pointer'\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tjQuery(thisNewField).show('slideDown');\r\n\t\t\t\t\r\n\t\t\t\trowCount\".$field->id.\"++; // incremented / decremented\r\n\t\t\t\tuniqueRowNum\".$field->id.\"++; // incremented only\r\n\t\t\t}\r\n\r\n\t\t\tfunction deleteField\".$field->id.\"(el)\r\n\t\t\t{\r\n\t\t\t\tif(rowCount\".$field->id.\" <= 1) return;\r\n\t\t\t\tvar row = jQuery(el).closest('li');\r\n\t\t\t\tjQuery(row).hide('slideUp', function() { this.remove(); } );\r\n\t\t\t\trowCount\".$field->id.\"--;\r\n\t\t\t}\r\n\t\t\t\";\r\n\t\t\t\r\n\t\t\t$css = '\r\n\t\t\t#sortables_'.$field->id.' { float:left; margin: 0px; padding: 0px; list-style: none; white-space: nowrap; }\r\n\t\t\t#sortables_'.$field->id.' li {\r\n\t\t\t\tclear: both;\r\n\t\t\t\tdisplay: block;\r\n\t\t\t\tlist-style: none;\r\n\t\t\t\theight: auto;\r\n\t\t\t\tposition: relative;\r\n\t\t\t}\r\n\t\t\t#sortables_'.$field->id.' li.sortabledisabled {\r\n\t\t\t\tbackground : transparent url(components/com_flexicontent/assets/images/move3.png) no-repeat 0px 1px;\r\n\t\t\t}\r\n\t\t\t#sortables_'.$field->id.' li input { cursor: text;}\r\n\t\t\t#add'.$field->name.' { margin-top: 5px; clear: both; display:block; }\r\n\t\t\t#sortables_'.$field->id.' li .admintable { text-align: left; }\r\n\t\t\t#sortables_'.$field->id.' li:only-child span.fcfield-drag, #sortables_'.$field->id.' li:only-child input.fcfield-button { display:none; }\r\n\t\t\t';\r\n\t\t\t\r\n\t\t\t$remove_button = '<input class=\"fcfield-button\" type=\"button\" value=\"'.JText::_( 'FLEXI_REMOVE_VALUE' ).'\" onclick=\"deleteField'.$field->id.'(this);\" />';\r\n\t\t\t$move2 \t= '<span class=\"fcfield-drag\">'.JHTML::image( JURI::base().'components/com_flexicontent/assets/images/move2.png', JText::_( 'FLEXI_CLICK_TO_DRAG' ) ) .'</span>';\r\n\t\t} else {\r\n\t\t\t$remove_button = '';\r\n\t\t\t$move2 = '';\r\n\t\t\t$js = '';\r\n\t\t\t$css = '';\r\n\t\t}\r\n\t\t\r\n\t\t// Drop-Down select for textselect field type\r\n\t\tif ($field->field_type=='textselect') {\r\n\t\t\tstatic $select2_added = false;\r\n\t\t if ( !$select2_added )\r\n\t\t {\r\n\t\t\t\t$select2_added = true;\r\n\t\t\t\tflexicontent_html::loadFramework('select2');\r\n\t\t\t}\r\n\t\t\r\n\t\t\t$sel_classes = ' fcfield_textselval use_select2_lib ';\r\n\t\t $sel_onchange = \"this.getParent().getElement('input.fcfield_textval').setProperty('value', this.getProperty('value')); this.setProperty('value', ''); \";\r\n\t\t\t$sel_attribs = ' class=\"'.$sel_classes.'\" onchange=\"'.$sel_onchange.'\"';\r\n\t\t\t\r\n\t\t\t$fieldname_sel = FLEXI_J16GE ? 'custom['.$field->name.'_sel][]' : $field->name.'_sel[]';\r\n\t\t\t$sel_ops = plgFlexicontent_fieldsText::buildSelectOptions($field, $item);\r\n\t\t\t$select_field = JHTML::_('select.genericlist', $sel_ops, $fieldname_sel, $sel_attribs, 'value', 'text', array());\r\n\t\t} else {\r\n\t\t\t$select_field='';\r\n\t\t}\r\n\t\t\r\n\t\tif ($js) $document->addScriptDeclaration($js);\r\n\t\tif ($css) $document->addStyleDeclaration($css);\r\n\t\t\r\n\t\tif ($custommask && $inputmask==\"__custom__\") {\r\n\t\t\t$validate_mask = \" data-inputmask=\\\" \".$custommask.\" \\\" \";\r\n\t\t} else {\r\n\t\t\t$validate_mask = $inputmask ? \" data-inputmask=\\\" 'alias': '\".$inputmask.\"' \\\" \" : \"\";\r\n\t\t}\r\n\t\t\r\n\t\t$classes = 'fcfield_textval inputbox'.$required.($inputmask ? ' has_inputmask' : '');\r\n\t\t\r\n\t\t$field->html = array();\r\n\t\t$n = 0;\r\n\t\tforeach ($field->value as $value)\r\n\t\t{\r\n\t\t\t$elementid_n = $elementid.'_'.$n;\r\n\t\t\t\r\n\t\t\t$text_field = '<input '. $validate_mask .' id=\"'.$elementid_n.'\" name=\"'.$fieldname.'\" class=\"'.$classes.'\" type=\"text\" size=\"'.$size.'\" value=\"'.$value.'\" '.$attribs.' />';\r\n\t\t\t\r\n\t\t\t$field->html[] = '\r\n\t\t\t\t'.$text_field.'\r\n\t\t\t\t'.$select_field.'\r\n\t\t\t\t'.$move2.'\r\n\t\t\t\t'.$remove_button.'\r\n\t\t\t\t';\r\n\t\t\t\r\n\t\t\t$n++;\r\n\t\t\tif (!$multiple) break; // multiple values disabled, break out of the loop, not adding further values even if the exist\r\n\t\t}\r\n\t\t\r\n\t\tif ($multiple) { // handle multiple records\r\n\t\t\t$_list = \"<li>\". implode(\"</li>\\n<li>\", $field->html) .\"</li>\\n\";\r\n\t\t\t$field->html = '\r\n\t\t\t\t<ul class=\"fcfield-sortables\" id=\"sortables_'.$field->id.'\">' .$_list. '</ul>\r\n\t\t\t\t<input type=\"button\" class=\"fcfield-addvalue\" onclick=\"addField'.$field->id.'(this);\" value=\"'.JText::_( 'FLEXI_ADD_VALUE' ).'\" />\r\n\t\t\t';\r\n\t\t} else { // handle single values\r\n\t\t\t$field->html = $field->html[0];\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "892b20cbace4c9382c3f5985a782a668", "score": "0.4788538", "text": "function feed_item_field_settings_attach(&$form, &$form_state) {\r\n $feed = $form_state['#feed'];\r\n $feed_field = $form_state['#feed_field'];\r\n\r\n if ($info = feed_field_type_info($feed_field->type, TRUE)) {\r\n if (isset($info['form_settings'])) {\r\n $settings = !empty($info['settings']) ? $info['settings'] : array();\r\n $instance = array_merge($settings, feed_object_get_data($feed_field, 'instance', array()));\r\n \r\n $function = (string) $info['form_settings'];\r\n \r\n if (function_exists($function)) {\r\n $elements = $function($feed_field, $instance);\r\n \r\n if (is_array($elements) && !empty($elements)) {\r\n if (!isset($form['feed_item_field_settings'])) {\r\n $form['feed_item_field_settings'] = array(\r\n \t'#tree' => TRUE,\r\n '#type' => 'feed_fieldset',\r\n '#title' => t('Feed Item Field Settings'),\r\n );\r\n }\r\n \r\n if (!isset($form['feed_item_field_settings'][$feed_field->fid])) {\r\n $form['feed_item_field_settings'][$feed_field->fid] = array();\r\n }\r\n $form['feed_item_field_settings'][$feed_field->fid] += $elements;\r\n }\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "8ea8445669e69d44a67e07217eed16c9", "score": "0.4788408", "text": "function renderOnSubmitHandler($field)\n\t{\n\t\tif ($this->parent->isReadOnly($field)) return \"\";\n\t\t\n\t\techo \"\\t\\$('{$this->parent->id}_{$field}').value = rawNumber($('{$this->parent->id}_{$field}').value);\\n\";\n\t}", "title": "" }, { "docid": "614129d74722bac6d0c56bf94d302665", "score": "0.4786658", "text": "function render_field( $field ) {\n\n\t\t\t/* do nothing */\n\n\t\t}", "title": "" }, { "docid": "67ae728b157777b5a8560ca5d30bfa36", "score": "0.4786637", "text": "function _acf_do_prepare_local_fields() { }", "title": "" }, { "docid": "9a995026deceee5960a6dd2b0e30c01a", "score": "0.4782175", "text": "function ncsulib_foundation_field__project($variables) {\n // For lightweight label customization\n $field_name = $variables['element']['#field_name'];\n $field_label = $variables['label'];\n\n switch ($field_name) {\n case 'field_assessments':\n $field_label = \"How it Went\";\n break;\n\n case 'field_problem_statement':\n $field_label = \"How it Got Started\";\n break;\n\n case 'field_event_start':\n $field_label = \"Event Date\";\n break;\n\n case 'field_space':\n $field_label = \"Library Spaces\";\n break;\n\n case 'field_non_libraries_space':\n $field_label = \"Other Spaces\";\n }\n\n $output = '';\n\n // Render the label, if it's not hidden and display it as a heading 3\n if (!$variables['label_hidden']) {\n $output .= '<h3' . $variables['title_attributes'] . '>' . $field_label . '</h3>';\n }\n\n // Render the items.\n $output .= '<div class=\"field-items\"' . $variables['content_attributes'] . '>';\n foreach ($variables['items'] as $delta => $item) {\n $classes = 'field-item ' . ($delta % 2 ? 'odd' : 'even');\n $output .= '<div class=\"' . $classes . '\"' . $variables['item_attributes'][$delta] . '>' . drupal_render($item) . '</div>';\n }\n $output .= '</div>';\n\n // Render the top-level DIV.\n $output = '<div class=\"' . $variables['classes'] . '\"' . $variables['attributes'] . '>' . $output . '</div>';\n\n return $output;\n}", "title": "" }, { "docid": "30c7669ba4c7b17020beb2c85933ea32", "score": "0.4780072", "text": "function getCMSFields() {\n\t\t$fields = parent::getCMSFields();\n\t\t$fields->replaceField(\"Title\", new TextField(\"Title\", \"Question\"));\n\t\t$fields->replaceField(\"MenuTitle\", new TextField(\"MenuTitle\", \"Question - short version for menus\"));\n\t\t$fields->replaceField(\"Content\", new HtmlEditorField(\"Content\", \"Answer\", $rows = 7, $cols = 7));\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "5da3b8d8eb3296597d3b58540b0c1723", "score": "0.4777577", "text": "function my_theme_preprocess_html(&$vars) {\n // Toggle fixed or fluid width.\n if (theme_get_setting('my_theme_width') == 'fluid') {\n $vars['classes_array'][] = 'fluid-width';\n }\n\n $title = 'Игра';\n if (isset($vars['page']['content']['system_main']['description'])) {\n $title = $vars['page']['content']['system_main']['description']['#markup'];\n }\n switch($title) {\n case mb_strstr($title, \"<h2 class='result'>Идеально\"): $vars['head_title'] = 'Я идеальный садовник'; break;\n case mb_strstr($title, \"<h2 class='result'>Отличный\"): $vars['head_title'] = 'Я отличный садовник'; break;\n case mb_strstr($title, \"<h2 class='result'>Нормальный\"): $vars['head_title'] = 'Я нормальный садовник'; break;\n case mb_strstr($title, \"<h2 class='result'>Плохой\"): $vars['head_title'] = 'Я плохой садовник'; break;\n case mb_strstr($title, \"<h2 class='result'>Ужасный\"): $vars['head_title'] = 'Я ужасный садовник'; break;\n default: $vars['head_title'] = 'Игра для знатоков законодательства \"Веселый садовник\"'; break;\n }\n\n\n // Add conditional CSS for IE6.\n drupal_add_css(path_to_theme() . '/fix-ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE), 'preprocess' => FALSE));\n\n}", "title": "" }, { "docid": "bdb94325d908229964c24d510915cc73", "score": "0.47736377", "text": "function gp_homepage_preprocess_node_role_model(&$vars) {\n \n $vars['disp_fields'] = array();\n if(!empty($vars['node']->field_first_involved[0]['value'])) {\n $vars['disp_fields'] += array($vars['node']->content['field_first_involved']['field']['#title'] => $vars['node']->field_first_involved[0]['value']);;\n }\n if(!empty($vars['node']->field_passionate_about[0]['value'])) {\n $vars['disp_fields'] += array($vars['node']->content['field_passionate_about']['field']['#title'] => $vars['node']->field_passionate_about[0]['value']);;\n }\n if(!empty($vars['node']->field_sparks_interest[0]['value'])) {\n $vars['disp_fields'] += array($vars['node']->content['field_sparks_interest']['field']['#title'] => $vars['node']->field_sparks_interest[0]['value']);\n\n }\n if(!empty($vars['node']->field_like_nonprofit[0]['value'])) {\n $vars['disp_fields'] += array($vars['node']->content['field_like_nonprofit']['field']['#title'] => $vars['node']->field_like_nonprofit[0]['value']);;\n }\n if(!empty($vars['node']->field_nurtured_personally[0]['value'])) {\n $vars['disp_fields'] += array($vars['node']->content['field_nurtured_personally']['field']['#title'] => $vars['node']->field_nurtured_personally[0]['value']);\n\n }\n if(!empty($vars['node']->field_words_of_advice[0]['value'])) {\n $vars['disp_fields'] += array($vars['node']->content['field_words_of_advice']['field']['#title'] => $vars['node']->field_words_of_advice[0]['value']);;\n }\n if(!empty($vars['node']->field_anyone_else[0]['value'])) {\n $vars['disp_fields'] += array($vars['node']->content['field_anyone_else']['field']['#title'] => $vars['node']->field_anyone_else[0]['value']);;\n }\n\n if(!empty($vars['node']->field_state[0]['value'])) {\n $term_info = taxonomy_get_term($vars['node']->field_state[0]['value']);\n $vars['role_model_state'] = array($vars['node']->content['field_state']['field']['#title'] => $term_info->name);;\n }\n if(!empty($vars['node']->field_city[0]['value'])) {\n $vars['role_model_city'] = array($vars['node']->content['field_city']['field']['#title'] => $vars['node']->field_city[0]['value']);;\n }\n\n}", "title": "" }, { "docid": "79463667ca422243973c6d630323fef6", "score": "0.47697788", "text": "public function item_custom_fields_to_form() {\n // 1. special management for fields equipped with \"free\" checkbox\n // nothing to do: they don't exist in this plugin\n\n // 2. special management for composite fields\n // nothing to do: they don't exist in this plugin\n\n // 3. special management for defaultvalue\n // nothing to do: defaultvalue doesn't need any further care\n\n // 4. special management for autofill contents\n $referencearray = array(''); // <-- take care, the first element is already on board\n for ($i = 1; $i <= SURVEYPROFIELD_AUTOFILL_CONTENTELEMENT_COUNT; $i++) {\n $referencearray[] = constant('SURVEYPROFIELD_AUTOFILL_CONTENTELEMENT'.sprintf('%02d', $i));\n }\n\n $items = array();\n for ($i = 1; $i < 6; $i++) {\n $index = sprintf('%02d', $i);\n $fieldname = 'element'.$index.'_select';\n if (in_array($this->{'element'.$index}, $referencearray)) {\n $this->{$fieldname} = $this->{'element'.$index};\n } else {\n $constantname = 'SURVEYPROFIELD_AUTOFILL_CONTENTELEMENT'.SURVEYPROFIELD_AUTOFILL_CONTENTELEMENT_COUNT;\n $this->{$fieldname} = constant($constantname);\n $fieldname = 'element'.$index.'_text';\n $this->{$fieldname} = $this->{'element'.$index};\n }\n }\n }", "title": "" }, { "docid": "43c921c1780f6755a9c3881441288e1e", "score": "0.4762987", "text": "static function field( $field ){\n foreach( $field as $attribut => $attribut_value ){\n $$attribut = $attribut_value;\n }\n\n if(isset($name_format) && $name_format =='exact_name'){ \n /*we need this for not updatable settings , for example it is used on post Skins settings where we need the color pickers \n to have the exact given name without appending the group name to it\n */\n $name = isset( $single ) ? $topic : $topic ;\n }else{\n /* otherwise the neme is composed from group & topic */\n $name = isset( $single ) ? $topic : $group . '[' . $topic . ']';\n }\n \n $name_id = isset( $single ) ? $topic . '_id' : $group . '[' . $topic . '_id]';\n $iname = isset( $topic ) ? $topic : '';\n $classes = isset( $iclasses ) ? $iclasses : '';\n $field_id = isset( $id ) ? $id : '';\n \n $id = strlen( $field_id ) ? 'id=\"' . $field_id . '\"' : '';\n $result_id = strlen( $field_id ) ? 'id=\"' . $field_id . '_result\"' : '';\n\n $group = isset( $group ) ? $group : '';\n $topic = isset( $topic ) ? $topic : '';\n $index = isset( $index ) ? $index : '';\n \n /* field classes */\n $fclasses = 'generic-' . $group . ' generic-' . $topic . ' ' . $group . '-' . $topic . ' ' . $group . '-' . $topic . '-' . $index;\n\n $action = isset( $action ) ? $action : '';\n\n $result = '';\n \n switch( $type ){\n /* no input type */\n case 'delimiter' : {\n $result .= '<hr>';\n break;\n }\n case 'title' : {\n $result .= '<h3 class=\"generic-record-title ' . $fclasses . '\" >' . $title . '</h3>';\n break;\n }\n case 'hint' : {\n $result .= $value;\n break;\n }\n case 'preview' : {\n $result .= $content;\n break;\n }\n case 'image' : {\n $width .= isset( $width ) ? ' width=\"' . $width . '\" ' : '';\n $heigt .= isset( $heigt ) ? ' height=\"' . $height . '\" ' : '';\n $result .= '<div class=\"generic-record-icon ' . $fclasses . '\" ><img src=\"' . $src . '\" ' . $width . $height . ' class=\"generic-record ' . $fclasses . '\"/></div>';\n break;\n }\n\n case 'color-picker' : {\n $result .= '<input type=\"text\" name=\"' . $name . '\" value=\"' . $value . '\" class=\"generic-record settings-color-field ' . $fclasses . ' ' . $classes . '\" />';\n break;\n }\n\n case 'm-color-picker' : {\n $result .= '<input type=\"text\" name=\"' . $name . '[]\" value=\"' . $value . '\" class=\"generic-record settings-color-field ' . $fclasses . ' ' . $classes . '\" />';\n break;\n }\n\n case 'extra' : {\n $result .= '<div id=\"container_' . $group . '\">' . extra::get( $group ) . '</div>';\n break;\n }\n\n case 'post-upload' : {\n $result .= '<a class=\"thickbox\" href=\"media-upload.php?post_id=' . $post_id . '&type=image&TB_iframe=1&width=640&height=381\">' . $title . '</a>';\n break;\n }\n\n\t\t\t\tcase \"form-upload-init\":\n\t\t\t\t $result.='<div id=\"hidden_inputs_container\" class=\"\">';\n\t\t\t\t $result.='</div>';\n\t\t\t\t $result.='<script type=\"text/javascript\">';\n\t\t\t\t $result.='window.update_hidden_inputs=function(ids,type,urls,feat_vid)';\n\t\t\t\t $result.=\"{\";\n\t\t\t\t\t$result.='jQuery(\"#hidden_inputs_container\").html(\"\");';\n\t\t\t\t\t$result.='jQuery(\"#hidden_inputs_container\").append(\"<input type=\\\\\"hidden\\\\\" name=\\\\\"attachments_type\\\\\" value=\\\\\"\"+type+\"\\\\\">\");';\n\t\t\t\t\t$result.='var i;';\n\t\t\t\t\t$result.='for(i=0;i<ids.length;i++)';\n\t\t\t\t\t $result.=\"{\";\n\t\t\t\t\t\t$result.='jQuery(\"#hidden_inputs_container\").append(\"<input type=\\\\\"hidden\\\\\" name=\\\\\"attachments[]\\\\\" value=\\\\\"\"+ids[i]+\"\\\\\">\");';\n\t\t\t\t\t\t$result.=\"if(urls){\";\n\t\t\t\t\t\t $result.=\"if(urls[ids[i]]){\";\n\t\t\t\t\t\t\t$result.='jQuery(\"#hidden_inputs_container\").append(\"<input type=\\\\\"hidden\\\\\" name=\\\\\"attached_urls[\"+ids[i]+\"]\\\\\" value=\\\\\"\"+urls[ids[i]]+\"\\\\\">\");';\n\t\t\t\t\t\t $result.=\"}\";\n\t\t\t\t\t\t$result.=\"}\";\n\t\t\t\t\t $result.=\"}\";\n\t\t\t\t\t$result.=\"if(feat_vid){\";\n\t\t\t\t\t $result.='jQuery(\"#hidden_inputs_container\").append(\"<input type=\\\\\"hidden\\\\\" name=\\\\\"featured_video\\\\\" value=\\\\\"\"+feat_vid+\"\\\\\">\");';\n\t\t\t\t\t$result.=\"}\";\n\t\t\t\t $result.=\"}\";\n\t\t\t\t $result.='</script>';\n\t\t\t\t break;\n\t\t\t\tcase \"form-upload\" :\n\t\t\t\t $result.='<iframe id=\"'.$format.'_upload_iframe\" class=\"upload_iframe\" src=\"'.get_template_directory_uri().'/upload_iframe.php?isadmin=true&type='.$format.(isset($post_id)?('&post='.$post_id):\"\").'\"></iframe>';\n\t\t\t\tbreak;\n\n case 'link' : {\n $result .= '<a href=\"' . $url . '\">' . $title . '</a>';\n break;\n }\n\n case 'callback' : {\n $result .= '<span ' . $id . '> -- </span>';\n break;\n }\n\n case 'radio' : {\n if( !isset( $ivalue ) && isset( $cvalue ) ){\n $ivalue = $cvalue;\n }\n foreach( $value as $index => $etichet ){\n if( isset( $ivalue ) && $ivalue == $index ){\n $status = ' checked=\"checked\" ' ;\n }else{\n $status = '' ;\n }\n $result .= '<label for=\"' . $name . '_' . $index . '\" class=\"menu_type_' . $index . '\">';\n $result .= '<input name=\"' . $name . '\" type=\"radio\" value=\"' . $index . '\" ' . $status . ' class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'select' ) . '>' . $etichet . '<br>';\n $result .= '</label>';\n }\n break;\n }\n\n case 'slider' :{\n if(isset($min_val)){\n $data_min = $min_val;\n }else{\n $data_min = 1;\n }\n\n if(isset($max_val)){\n $data_max = $max_val;\n }else{\n $data_max = 100;\n }\n\n $result .= '<div class=\"fvisible field\">';\n\n $result .= '<div class=\"input\">';\n $result .= '<input type=\"hidden\" id=\"' . $id . '\" class=\"slider_value '.$classes.'\" name=\"' . $name . '\" value=\"' . stripslashes( $value ) . '\" />';\n $result .= '<div class=\"ui_slider\" data-val=\"'.stripslashes( $value ).'\" data-min=\"'.$data_min.'\" data-max=\"'.$data_max.'\" ></div> <span class=\"slider_val\" >'.stripslashes( $value ).'</span>';\n \n // if(isset($hint)){\n // $result .= '<span class=\"hint\">'.$hint.'</span>'; \n // }\n $result .= '</div>';\n $result .= '<div class=\"clear\"></div>';\n $result .= '</div>';\n $result .= '<script>init_ui_slider(\\'.ui_slider\\');</script>';\n \n break;\n } \n \n case 'header-preview':\n global $is_for_backend;\n $is_for_backend = true;\n wp_enqueue_style( 'header-preview-styles', get_template_directory_uri() . '/lib/css/header.css' );\n $label = __( 'Preview' , 'cosmotheme' );\n $header_types = options::$fields[ 'header' ][ 'header_type' ][ 'images' ];\n $menu_types = options::$fields[ 'header' ][ 'menu_type' ][ 'images' ];\n $result .= '<div class=\"header-preview-wrapper container\">';\n $result .= '<div class=\"header-preview\">';\n $result .= '<div class=\"header-mask\"></div>';\n $result .= \"<h3>$label</h3>\";\n $result .= '<div class=\"header-slider\">';\n foreach( $header_types as $header_type => $whatever ){\n $header = new CustomHeader( $header_type );\n $result .= $header;\n }\n $result .= '</div>';\n $result .= '<div class=\"menus-container\">';\n foreach( $menu_types as $menu_type => $whatever ){\n $menu = new CosmoCustomHeaderMenu( $menu_type );\n $result .= $menu;\n }\n $result .= '</div>';\n $result .= '</div>';\n $result .= '</div>';\n break;\n\n case 'image-select':\n $html = '';\n foreach( $images as $val => $image_url ){\n $full_url = get_template_directory_uri() . '/lib/images/header_thumbs/' . $image_url;\n if( $value == $val ){\n $checked = 'checked=\"checked\"';\n }else{\n $checked = '';\n }\n $label = $labels[ $val ];\n $html .= <<<endhtml\n <a class=\"has-popup\" href=\"javascript:void(0);\">\n <label for=\"${topic}_$val\">\n <img src=\"${full_url}\">\n <input type=\"radio\" value=\"$val\" id=\"${topic}_$val\" name=\"$name\" class=\"$fclasses $classes hidden\" $checked>\n </label>\n <div class=\"popup\">\n <div class=\"maybe-pointer\"></div>\n $label\n </div>\n </a>\nendhtml;\n }\n $result .= $html;\n break;\n\n case 'radio-icon' : {\n if( is_array( $value ) && !empty( $value ) ){\n $path = isset( $path ) ? $path : '';\n $in_row = isset( $in_row ) ? $in_row : 8;\n $i = 0;\n foreach( $value as $index => $icon ){\n if( $i == 0 ){\n $result .= '<div>';\n }\n if( isset( $ivalue ) && $ivalue == get_template_directory_uri() . '/lib/images/' . $path . $icon ){\n $s = 'checked=\"checked\"';\n $sclasses = 'selected';\n }else{\n $s = '';\n $sclasses = '';\n }\n $action['group'] = $group;\n $action['topic'] = $topic;\n $action['index'] = $index;\n\n $result .= '<div class=\"generic-input-radio-icon ' . $index . ' hidden\">';\n $result .= '<input type=\"radio\" value=\"' . get_template_directory_uri() . '/lib/images/' . $path . $icon . '\" name=\"' . $name . '\" class=\"generic-record hidden ' . $fclasses . $index. ' ' . $classes . '\" ' . $id . ' ' . $s . '>';\n $result .= '</div>';\n $result .= '<img ' . self::action( $action , 'radio-icon' ) . ' title=\"' . $icon . '\" class=\"pattern-texture '. $sclasses . ' ' . $fclasses . $index. '\" alt=\"' . $icon . '\" src=\"' . get_template_directory_uri() . '/lib/images/' . $path . $icon . '\" />';\n $i++;\n if( $i % $in_row == 0 ){\n $i = 0;\n $result .='<div class=\"clear\"></div></div>';\n }\n }\n\n if( $i % $in_row != 0){\n $result .='<div class=\"clear\"></div></div>';\n }\n }\n break;\n }\n\n case 'our_themes' :{ \n ob_start(); \n ob_clean();\n get_template_part( '/lib/templates/our_themes' );\n $our_themes = ob_get_clean();\n $result .= $our_themes;\n\n break;\n }\n\n /*case 'layout-builder' :\n $builder = new LBTemplateBuilder( $group );\n $builder -> render();\n break;*/\n\n case 'sidebar-resizer':\n $resizer = new LBSidebarResizer( $templatename );\n $result .= $resizer -> render();\n\n /*we want to output the Bulk update post layout button only for the followinf templates*/\n /*array key is the template name (the name of the tab from layout settings page), and array value is the post type*/\n $templates_to_update_layout = array('single'=>'post', 'portfolio' => 'portfolio', 'gallery' => 'gallery', 'page' => 'page');\n if(array_key_exists($templatename, $templates_to_update_layout) ){\n $result .= '<button class=\"update_post_layout_meta\" data-template=\"'.$templatename.'\" data-post-type=\"'.$templates_to_update_layout[$templatename].'\" >'.__('Update all posts','cosmotheme').'</button>'; \n $result .= '<span class=\"spinner bulk_update_post_layout\" style=\"display: none;\"></span>';\n $result .= '<span class=\"hint error\">'.__('Warning!!! This will update all existing posts of this type with the layout settings defined above. Use this button only if you really need to bulk update the layout for all the existing posts. If you want to affect the future posts as well, use the \"Update settings\" button bellow.','cosmotheme').'</span>'; \n }\n break;\n\n case 'logic-radio' : {\n \n /*for non array meta data we want to ovewrite $value with 'yes' and 'no'*/\n \n if(isset($no_array) && $no_array ){\n if(isset($value) && ($value == 'y' || $value == 'n') ){\n if($value == 'n'){\n $value = 'no'; \n }else if($value == 'y'){\n $value = 'yes'; \n }\n \n }\n \n }\n\n if( $value == 'yes' ){\n $c1 = 'checked=\"checked\"';\n $c2 = '';\n }else{\n if( $value == 'no' ){\n $c1 = '';\n $c2 = 'checked=\"checked\"';\n }else{\n if( isset( $cvalue ) ){\n if( $cvalue == 'yes' ){\n $c1 = 'checked=\"checked\"';\n $c2 = '';\n }else{\n $c1 = '';\n $c2 = 'checked=\"checked\"';\n }\n }else{\n $c1 = '';\n $c2 = 'checked=\"checked\"';\n }\n }\n }\n\n $result = '<input type=\"radio\" value=\"yes\" name=\"' . $name . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . ' yes\" ' . $id . ' ' . $c1 . ' ' . self::action( $action , 'logic-radio' ) . ' /> ' . __( 'Yes' , 'cosmotheme' ) . '&nbsp;&nbsp;&nbsp;';\n $result .= '<input type=\"radio\" value=\"no\" name=\"' . $name . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . ' no\" ' . $id . ' ' . $c2 . ' ' . self::action( $action , 'logic-radio' ) . ' /> ' . __( 'No' , 'cosmotheme' );\n break;\n }\n\n case 'label-logic-radio' : {\n if( $value == 'yes' ){\n $c1 = 'checked=\"checked\"';\n $c2 = '';\n }else{\n if( $value == 'no' ){\n $c1 = '';\n $c2 = 'checked=\"checked\"';\n }else{\n if( isset( $cvalue ) ){\n if( $cvalue == 'yes' ){\n $c1 = 'checked=\"checked\"';\n $c2 = '';\n }else{\n $c1 = '';\n $c2 = 'checked=\"checked\"';\n }\n }else{\n $c1 = '';\n $c2 = 'checked=\"checked\"';\n }\n }\n }\n\n $result = '<input type=\"radio\" value=\"yes\" name=\"' . $name . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . ' yes\" ' . $id . ' ' . $c1 . ' ' . self::action( $action , 'logic-radio' ) . ' /> ' . $rlabel[0] . '&nbsp;&nbsp;&nbsp;';\n $result .= '<input type=\"radio\" value=\"no\" name=\"' . $name . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . ' no\" ' . $id . ' ' . $c2 . ' ' . self::action( $action , 'logic-radio' ) . ' /> ' . $rlabel[1];\n break;\n }\n\n /* single type records */\n case 'hidden' : {\n $result .= '<input type=\"hidden\" name=\"' . $name . '\" value=\"' . $value . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' />';\n break;\n }\n case 'text' : {\n $result .= '<input type=\"text\" name=\"' . $name . '\" value=\"' . $value . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'text' ) . ' />';\n break;\n }\n\n case 'user_defined_text' : {\n\n /*\n 'group' is defined when field is added in the code by the developer\n 'topic' is defined by the user \n */\n $unique_class = $group.'_'.$topic; /*group with topic will create a unique class for our custom meta blocks*/\n \n $result .= '<input type=\"text\" value=\"\" class=\"custom-meta-name generic-record '.$unique_class.'\" /> <input type=\"button\" class=\"button-primary\" value=\"'.__('Add custom field','cosmotheme').'\" onclick=\"add_cosmo_custom_field(\\'custom_cosmo_meta\\',\\''.$group.'\\', \\''.$topic.'\\')\">';\n break;\n }\n\n case 'digit' : {\n if( ( isset( $cvalue) && is_numeric( $cvalue ) ) && ( !isset( $value ) || !is_numeric( $value ) ) ){\n $val = $cvalue;\n }else{\n $val = $value;\n }\n $result .= '<input type=\"text\" name=\"' . $name . '\" value=\"' . $val . '\" class=\"generic-record digit ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'text' ) . ' />';\n break;\n }\n \n case 'digit-like' : {\n $result .= '<input type=\"text\" name=\"' . $name . '\" value=\"' . $value . '\" class=\"generic-record digit like ' . $fclasses . ' ' . $classes . '\" ' . $id . ' />';\n $result .= '<input type=\"button\" name=\"' . $name . '\" value=\"' . __( 'Reset Value' , 'cosmotheme' ) . '\" class=\"generic-record-button button-primary\" ' . self::action( $action , 'digit-like' ) . ' /> <span class=\"digit-btn result\"></span>';\n break;\n }\n \n case 'textarea' : {\n $result .= '<textarea name=\"' . $name . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'textarea' ) . '>' . $value . '</textarea>';\n break;\n }\n\n case 'radio' : {\n if( isset( $iname ) && $iname == $value ){\n $status = ' checked=\"checked\" ' ;\n }else{\n $status = '' ;\n }\n\n $name = isset( $single ) ? $iname : $group . '[' . $iname . ']';\n\n $result .= '<input type=\"radio\" name=\"' . $name . '\" value=\"' . $value . '\" ' . $status . ' class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'radio' ) . ' />';\n break;\n }\n \n case 'search' : {\n if( !empty( $value ) && (int)$value > 0 ){\n $p = get_post( $value );\n $title = $p -> post_title;\n $post_id = $p -> ID;\n }else{\n $title = '';\n $post_id = '';\n }\n \n $result .= '<input type=\"text\" class=\"generic-record-search\" value=\"' . $title . '\" ' . self::action( $action , 'search' ) . '>';\n $result .= '<input type=\"hidden\" name=\"' . $name . '\" class=\"generic-record generic-value ' . $fclasses . ' ' . $classes . '\" ' . $id . ' value=\"' . $post_id . '\" />';\n $result .= '<input type=\"hidden\" class=\"generic-params\" value=\"' . urlencode( json_encode( $query ) ) . '\" />';\n break;\n }\n\n case 'datetimepicker' : { /*outputs a datepicker with timepicker */\n \n $result .= '<input type=\"text\" name=\"' . $name . '\" value=\"'.$value.'\" class=\"DateTimePicker generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'datetimepicker' ) . '>';\n \n break;\n }\n\n case 'select' : {\n $result .= '<select name=\"' . $name . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'select' ) . ' >';\n if( !isset( $ivalue ) && isset( $cvalue ) ){\n $ivalue = $cvalue;\n }\n foreach( $value as $index => $etichet ){\n if( isset( $ivalue ) && $ivalue == $index ){\n $status = ' selected=\"selected\" ' ;\n }else{\n $status = '' ;\n }\n\n $result .= '<option value=\"' . $index . '\" ' . $status . ' >' . $etichet . '</option>';\n }\n $result .= '</select>';\n break;\n }\n\n case 'preview-select' : {\n $result .= '<select name=\"' . $name . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'select' ) . ' >';\n if( !isset( $ivalue ) && isset( $cvalue ) ){\n $ivalue = $cvalue;\n }\n foreach( $value as $index => $etichet ){\n if( isset( $ivalue ) && $ivalue == $index ){\n $status = ' selected=\"selected\" ' ;\n }else{\n $status = '' ;\n }\n\n $result .= '<option value=\"' . $index . '\" ' . $status . ' >' . $etichet . '</option>';\n }\n $result .= '</select>';\n $result .= '<div class=\"preview ' . $ivalue . '\">';\n $result .= '</div>';\n break;\n }\n\n case 'multiple-select' : {\n $result .= '<select name=\"' . $name . '[]\" multiple=\"multiple\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'multiple-select' ) . ' style=\"height:200px !important;\" >';\n foreach( $value as $index => $etichet ){\n if( isset( $ivalue ) && is_array( $ivalue ) && in_array( $index , $ivalue) ){\n $status = ' selected=\"selected\" ' ;\n }else{\n $status = '' ;\n }\n\n $result .= '<option value=\"' . $index . '\" ' . $status . ' >' . $etichet . '</option>';\n }\n $result .= '</select>';\n break;\n }\n\n case 'checkbox' : {\n if( isset( $iname ) && $iname == $ivalue ){\n $status = ' checked=\"checked\" ' ;\n }else{\n $status = '' ;\n }\n\n $result .= '<input type=\"checkbox\" name=\"' . $name . '\" value=\"' . $iname . '\" ' . $status . ' class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'checkbox' ) . ' />';\n break;\n }\n\n case 'button' : {\n $result .= '<input type=\"button\" name=\"' . $name . '\" value=\"' . $value . '\" class=\"generic-record-button button-primary ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'button' ) . ' /> <span class=\"btn result\"></span>';\n break;\n }\n\n case 'attach' : {\n //'action' => \"meta.save_data('presentation','speaker' , extra.val('select#field_attach_presentation'), [ { 'name':'speaker[idrecord][]' , 'value' : extra.val('select#field_attach_presentation') } ] );\"\n $action['res'] = $group;\n $action['group'] = $res;\n $action['post_id'] = $post_id;\n $action['attach_selector'] = $attach_selector;\n if( !isset( $selector ) ){\n $selector = 'div#' . $res . '_' . $group . ' div.inside div#box_' . $res . '_' . $group;\n }\n $action['selector'] = $selector;\n $result .= '<input type=\"button\" name=\"' . $name . '\" value=\"' . $value . '\" class=\"generic-record-button button-primary ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'attach' ) . ' /> <p id=\"attach_' . $res . '_' . $group . '\" class=\"attach_alert hidden\">'.__( ' Attached ' , 'cosmotheme' ).'</sp>';\n break;\n }\n\n case 'meta-save' : {\n $action['res'] = $res;\n $action['group'] = $group;\n $action['post_id'] = $post_id;\n $action['selector'] = $selector;\n $result .= '<input type=\"button\" name=\"' . $name . '\" value=\"' . $value . '\" class=\"generic-record-button button-primary ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'meta-save' ) . ' />';\n break;\n }\n\n case 'upload' : {\n $result .= '<input type=\"text\" name=\"' . $name . '\" value=\"' . $value . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' /><input type=\"button\" class=\"button-primary\" value=\"'.__('Choose File','cosmotheme').'\" ' . self::action( $field_id , 'upload' ) . ' />';\n \n /*Bellow we add support for attachement IDs*/ \n\n \n $hidden_input_name = str_replace(']', '_id]', $name);\n\n if( isset($field['value_id']) ){ /*for general options, not related to a given post*/\n $hidden_input_value = $field['value_id'];\n }else{\n /*get the value of the attachement ID for the hidden input*/\n $hidden_input_value = '';\n if(isset($field) && is_array($field) && isset($field['post_id'])){\n $settings = meta::get_meta( $field['post_id'] , 'settings' );\n\n /*the hidde name is in this form: settings[post_bg_id]\n and we need to use regex to get just the the value we need, in this case it will be 'post_bg_id'*/\n\n \n $pattern = '/\\[.*\\]/'; /* we want to match the text betwee [] */\n preg_match($pattern, $hidden_input_name, $hidden_field_name);\n \n if(isset($hidden_field_name[0])){ /*hidden_field_name is the match*/\n $clean_hidden_field_name = rtrim( ltrim($hidden_field_name[0],'['), ']'); \n\n if(isset($settings[$clean_hidden_field_name])){\n $hidden_input_value = $settings[$clean_hidden_field_name];\n }\n }\n\n }\n }\n\n $result .= '<input type=\"hidden\" name=\"' . $hidden_input_name . '\" value=\"' . $hidden_input_value . '\" id=\"' . $field_id . '_id\" />';\n\n wp_enqueue_media();\n\n break;\n }\n \n case 'generate' : {\n $result .= '<input type=\"text\" name=\"' . $name . '\" value=\"' . $value . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' /><input type=\"button\" class=\"button-primary\" value=\"'.__('Generate Key','cosmotheme').'\" ' . self::action( '?t=' . security::t().'&amp;n=' . security::n() , 'generate' ) . ' />';\n break;\n }\n\n case 'upload-id' :{\n \n $action['group'] = $group;\n $action['topic'] = $topic;\n $action['index'] = $index;\n\n $result .= '<input type=\"text\" name=\"' . $name . '\" value=\"' . $value . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' /><input type=\"button\" class=\"button-primary\" value=\"'.__('Choose File','cosmotheme').'\" ' . self::action( $action , 'upload-id' ) . ' />';\n $result .= '<input type=\"hidden\" name=\"' . $name_id . '\" id=\"' . $field_id . '_id\" class=\"generic-record generic-single-record ' . $fclasses . '\" value=\"' . $value_id . '\"/>';\n break;\n }\n\n /* multiple type records */\n case 'm-hidden' : {\n $result .= '<input type=\"hidden\" name=\"' . $name . '[]\" value=\"' . $value . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' />';\n break;\n }\n case 'm-text' : {\n $result .= '<input type=\"text\" name=\"' . $name . '[]\" value=\"' . $value . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'text' ) . ' />';\n break;\n }\n case 'm-digit' : {\n $result .= '<input type=\"text\" name=\"' . $name . '[]\" value=\"' . $value . '\" class=\"generic-record digit ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'text' ) . ' />';\n break;\n }\n case 'm-textarea' : {\n $result .= '<textarea name=\"' . $name . '[]\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'textarea' ) . '>' . $value . '</textarea>';\n break;\n }\n\n case 'm-radio' : {\n if( isset( $iname ) && $iname == $value ){\n $status = ' checked=\"checked\" ' ;\n }else{\n $status = '' ;\n }\n\n $name = isset( $single ) ? $iname : $group . '[' . $iname . ']';\n\n $result .= '<input type=\"radio\" name=\"' . $name . '[]\" value=\"' . $value . '\" ' . $status . ' class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'radio' ) . ' />';\n break;\n }\n \n case 'm-search' : {\n if( !empty( $value ) && (int)$value > 0 ){\n $p = get_post( $value );\n $title = $p -> post_title;\n $post_id = $p -> ID;\n }else{\n $title = '';\n $post_id = '';\n }\n \n $result .= '<input type=\"text\" class=\"generic-record-search\" value=\"' . $title . '\" ' . self::action( $action , 'search' ) . '>';\n $result .= '<input type=\"hidden\" name=\"' . $name . '[]\" class=\"generic-record generic-value ' . $fclasses . ' ' . $classes . '\" ' . $id . ' value=\"' . $post_id . '\" />';\n $result .= '<input type=\"hidden\" class=\"generic-params\" value=\"' . urlencode( json_encode( $query ) ) . '\" />';\n break;\n }\n\n case 'm-select' : {\n $result .= '<select name=\"' . $name . '[]\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'select' ) . ' >';\n foreach( $value as $index => $etichet ){\n if( isset( $ivalue ) && $ivalue == $index ){\n $status = ' selected=\"selected\" ' ;\n }else{\n $status = '' ;\n }\n\n $result .= '<option value=\"' . $index . '\" ' . $status . ' >' . $etichet . '</option>';\n }\n $result .= '</select>';\n break;\n }\n\n case 'm-multiple-select' : {\n $result = '<select name=\"' . $name . '[]\" multiple=\"multiple\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'multiple-select' ) . ' >';\n foreach( $value as $index => $etichet ){\n if( isset( $ivalue ) && is_array( $ivalue ) && in_array( $index , $ivalue) ){\n $status = ' selected=\"selected\" ' ;\n }else{\n $status = '' ;\n }\n\n $result .= '<option value=\"' . $index . '\" ' . $status . ' >' . $etichet . '</option>';\n }\n $result .= '</select>';\n break;\n }\n\n case 'm-checkbox' : {\n if( isset( $iname ) && $iname == $value ){\n $status = ' checked=\"checked\" ' ;\n }else{\n $status = '' ;\n }\n\n $result .= '<input type=\"checkbox\" name=\"' . $name . '[]\" value=\"' . $value . '\" ' . $status . ' class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' ' . self::action( $action , 'checkbox' ) . ' />';\n break;\n }\n case 'm-upload' : {\n $result .= '<input type=\"text\" name=\"' . $name . '[]\" value=\"' . $value . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' /><input type=\"button\" class=\"button-primary\" value=\"'.__('Choose File','cosmotheme').'\" ' . self::action( $field_id , 'upload' ) . ' />';\n break;\n }\n\n case 'm-upload-id' :{\n\n $action['group'] = $group;\n $action['topic'] = $topic;\n $action['index'] = $index;\n\n $result .= '<input type=\"text\" name=\"' . $name . '[]\" value=\"' . $value . '\" class=\"generic-record ' . $fclasses . ' ' . $classes . '\" ' . $id . ' /><input type=\"button\" class=\"button-primary\" value=\"'.__('Choose File','cosmotheme').'\" ' . self::action( $action , 'upload-id' ) . ' />';\n \n $result .= '<input type=\"hidden\" name=\"' . $name_id . '[]\" id=\"' . $field_id . '_id\" class=\"generic-record ' . $fclasses . '\" />';\n wp_enqueue_media(); \n break;\n }\n }\n \n return $result;\n }", "title": "" }, { "docid": "40a576ad57a2fd4158206d0f07494c3e", "score": "0.47542286", "text": "function pixelgarage_preprocess_page(&$vars) {\n // hide titles on login forms\n pg_login_preprocess_page($vars);\n\n // replace logo with .svg\n $vars['logo'] = str_replace('.jpg', '.svg', $vars['logo']);\n}", "title": "" }, { "docid": "b56f18cbbc6167e54c1d753670fd0186", "score": "0.47390935", "text": "function _study_area_link_field_process($element, $form_state, $complete_form) {\n if ($element['#field_name'] == 'field_fae_resource') {\n $element['title']['#title'] = t('Resource label');\n $element['title']['#description'] = t('Enter the resource label or name.');\n $element['url']['#title'] = t('Resource URI');\n $element['url']['#description'] = t('Enter the resource URL.');\n }\n return $element;\n}", "title": "" }, { "docid": "f969cb0725f212bc4efe4f987b9f06f7", "score": "0.47384933", "text": "function mele_commerce_preprocess_node(&$vars) {\n $vars['submitted'] = $vars['date'] . ' - ' . $vars['name'];\n if ($vars['type'] == 'blog_post') {\n $vars['submitted'] = t('By') . ' ' . $vars['name'] . ', ' . $vars['date'];\n }\n\n//Template suggestion for content loaded with Colorbox (for Quick View)\n \n if($vars['view_mode'] == 'colorbox') {\n\t\t$vars['theme_hook_suggestions'][] = 'node__product__type__colorbox';\n\t}\n\n//Remove comments link from nodes\n\n if (isset($vars['content']['links']['comment'])) {\n\t\t$comment = $vars['content']['links']['comment'];\n\t\tunset($vars['content']['links']['comment']);\n\t\t$vars['content']['links']['comment'] = $comment;\n\t}\n\t\n//Quantity spinner\n\tif ($vars['type'] == 'product_display') {\n \tdrupal_add_js('/sites/all/libraries/nice-number/jquery.nice-number.js');\n drupal_add_css('/sites/all/libraries/nice-number/jquery.nice-number.css', array('group' => CSS_THEME, 'weight' => 115, 'preprocess' => FALSE));\n }\n}", "title": "" }, { "docid": "0d8b58b64b2287a03378859986411e84", "score": "0.4735367", "text": "function uikit_preprocess_fieldset(&$variables) {\n global $theme_key;\n $collapsible = $variables['element']['#collapsible'];\n $group_fieldset = isset($variables['element']['#group_fieldset']) && $variables['element']['#group_fieldset'];\n $format_fieldset = isset($variables['element']['format']);\n\n // Collapsible, non-grouped fieldsets will use UIkit's accordion components.\n if ($group_fieldset) {\n $variables['theme_hook_suggestions'][] = 'fieldset__grouped';\n }\n elseif ($collapsible) {\n $variables['theme_hook_suggestions'][] = 'fieldset__collapsible';\n $variables['element']['#attributes']['class'][] = 'uk-form-row';\n $variables['element']['#attributes']['class'][] = 'uk-accordion';\n $variables['element']['#attributes']['data-uk-accordion'] = '';\n\n foreach ($variables['element']['#attributes']['class'] as $key => $class) {\n if ($class == 'collapsible' || $class == 'collapsed') {\n unset($variables['element']['#attributes']['class'][$key]);\n array_values($variables['element']['#attributes']['class']);\n }\n if ($class == 'collapsed') {\n $variables['element']['#attributes']['data-uk-accordion'] .= '{showfirst: false}';\n }\n }\n\n // Retrieve the accordian component CDN assets.\n $uikit_style = theme_get_setting('base_style', $theme_key);\n $accordian_css = 'accordion.min.css';\n\n switch ($uikit_style) {\n case 'almost-flat':\n $accordian_css = 'accordion.almost-flat.min.css';\n break;\n\n case 'gradient':\n $accordian_css = 'accordion.gradient.min.css';\n break;\n }\n\n drupal_add_css(\"//cdnjs.cloudflare.com/ajax/libs/uikit/2.26.4/css/components/$accordian_css\", array(\n 'type' => 'external',\n 'group' => CSS_THEME,\n 'every_page' => TRUE,\n 'weight' => -10,\n 'version' => '2.26.4',\n ));\n\n drupal_add_js('//cdnjs.cloudflare.com/ajax/libs/uikit/2.26.4/js/components/accordion.min.js', array(\n 'type' => 'external',\n 'group' => JS_THEME,\n 'every_page' => TRUE,\n 'weight' => -10,\n 'version' => '2.26.4',\n ));\n }\n elseif ($format_fieldset) {\n $variables['theme_hook_suggestions'][] = 'fieldset__format';\n }\n else {\n $variables['theme_hook_suggestions'][] = 'fieldset';\n $variables['element']['#attributes']['class'][] = 'uk-form-row';\n }\n}", "title": "" }, { "docid": "f3576d746ca93490c40938c7c997f004", "score": "0.47240552", "text": "function acf_prepare_field_for_export( $field ) {\n}", "title": "" }, { "docid": "a267b1ae7db0b71bd6e1bbbdeba8aa46", "score": "0.47235343", "text": "function _feedback_init() {\n $type_prefix = '_feedback';\n\n global $_feedback_data;\n\n $_feedback_data = array(\n 'prefix' => $type_prefix,\n 'register' => array(\n 'labels' => array(\n 'name' => __('Feedbacks', 'theme'),\n 'singulare_name' => __('Feedback', 'theme'),\n 'menu_name' => __('Feedback', 'theme'),\n 'name_admin_bar' => __('Feedback', 'theme'),\n 'all_items' => __('All Feedbacks', 'theme'),\n 'add_new' => __('New Feedback', 'theme'),\n 'add_new_item' => __('Add New Feedback', 'theme'),\n 'edit_item' => __('Edit Feedback', 'theme'),\n 'new_item' => __('New Feedback', 'theme'),\n 'view_item' => __('View Feedback', 'theme'),\n 'search_items' => __('Search Feedbacks', 'theme'),\n 'not_found' => __('No feedback found.', 'theme'),\n 'not_found_in_trash' => __('No feedback found in trash.', 'theme'),\n 'parent_item_colon' => __('Superior Feedback:', 'theme'),\n ),\n 'rewrite' => array( 'slug' => 'member', 'with_front' => false ),\n 'menu_icon' => 'dashicons-format-chat',\n 'supports' => array( 'title', 'editor'/* , 'author', 'thumbnail', 'page-attributes' */ ),\n 'public' => false,\n 'publicly_queriable' => false,\n 'show_ui' => true,\n 'show_in_nav_menus' => true,\n 'exclude_from_search' => true,\n ),\n /*'taxonomy' => array(\n array(\n 'hierarchical' => true,\n 'labels' => array(\n 'name' => 'Team Groups',\n 'singular_name' => 'Group',\n 'search_items' => 'Search groups',\n 'all_items' => 'All Groups',\n 'parent_item' => 'Parent Group',\n 'parent_item_colon' => 'Parent Group:',\n 'edit_item' => 'Edit Group',\n 'update_item' => 'Update Group',\n 'add_new_item' => 'Add New Group',\n 'new_item_name' => 'New Group',\n 'menu_name' => 'Groups',\n ),\n 'show_ui' => true,\n 'rewrite' => array( 'slug' => 'the-team', 'with_front' => false ),\n 'taxonomy_slug' => 'the-team',\n )\n ),*/\n 'metadata' => array(\n array(\n 'label' => __('Client\\'s Name', 'theme'),\n 'placeholder' => __('Adam Johnson', 'theme'),\n 'id' => $type_prefix . '_name',\n 'type' => 'text',\n ),\n array(\n 'label' => __('Client\\'s Title', 'theme'),\n 'placeholder' => __('CEO', 'theme'),\n 'id' => $type_prefix . '_title',\n 'type' => 'text',\n ),\n array(\n 'label' => __('Client\\'s Company', 'theme'),\n 'placeholder' => __('ROI Land Investments, LTD', 'theme'),\n 'id' => $type_prefix . '_company',\n 'type' => 'text',\n ),\n ),\n 'metaboxes' => array(\n array(\n $type_prefix . '_meta', // $id\n __('Meta', 'theme'), // $title\n $type_prefix . '_meta_show', // $callback\n $type_prefix, // $page\n 'normal', // $context\n 'high' // $priority\n ),\n )\n );\n\n register_post_type($type_prefix, $_feedback_data[ 'register' ]);\n\n if (isset($_feedback_data[ 'taxonomy' ]) && gettype($_feedback_data[ 'taxonomy' ]) === 'array') {\n foreach ($_feedback_data[ 'taxonomy' ] as $taxonomy) {\n register_taxonomy($taxonomy[ 'taxonomy_slug' ], $type_prefix, $taxonomy);\n }\n }\n\n if (isset($_feedback_data[ 'metaboxes' ])) {\n // metaboxes\n add_action('add_meta_boxes', $type_prefix . '_meta_addboxes');\n\n // metas list\n add_action('save_post', $type_prefix . '_meta_save');\n }\n\n add_filter('manage_edit-the-team_columns', '_feedback_role_columns');\n}", "title": "" }, { "docid": "9f8c603a5c8f906e17324d92c42c6a69", "score": "0.47207594", "text": "function funcaptcha_gf_add_field_title($type) {\n\t\n\tif ($type == 'funcaptcha') {\n\t\treturn 'FunCaptcha';\n\t} else {\n\t\treturn $type;\n\t}\n}", "title": "" }, { "docid": "4dc406d9f06b4ad76a3c2bb4ff2cccc3", "score": "0.4715233", "text": "function feed_item_field_settings_attach_submit(&$form, &$form_state) {\r\n $feed_field = $form_state['#feed_field'];\r\n \r\n if (!empty($form_state['values']['feed_item_field_settings'])) {\r\n feed_item_field_settings_apply($feed_field, $form_state['values']['feed_item_field_settings'][$feed_field->fid]);\r\n }\r\n}", "title": "" }, { "docid": "8a666b9b989e0ac4894e24d032141054", "score": "0.4710957", "text": "function mash_node_submitted($node) {\n return t('Submitted by !username on @datetime',\n array(\n '!username' => _mash_userName($node), //theme('username', $node),\n '@datetime' => format_date($node->created),\n ));\n}", "title": "" }, { "docid": "187b0a12a7ee649d5e9e58e9b41906c0", "score": "0.47081202", "text": "function tooltipIcon($e)\n{\n return $this->unbreak($e['term'],\n '<sup class=\"fa fa-comment-o small\" data-title=\"'.$e['content'].'\"></sup>');\n}", "title": "" }, { "docid": "a366a61356622934639dfb6dba168a43", "score": "0.4706178", "text": "function _helper_get_emoticon_chooser($this_ref,$field_name)\n{\n\t$extra=has_specific_permission(get_member(),'use_special_emoticons')?'':' AND e_is_special=0';\n\t$emoticons=$this_ref->connection->query('SELECT * FROM '.$this_ref->connection->get_table_prefix().'f_emoticons WHERE e_relevance_level=0'.$extra);\n\t$em=new ocp_tempcode();\n\tforeach ($emoticons as $emo)\n\t{\n\t\t$code=$emo['e_code'];\n\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($code);\n\n\t\t$em->attach(do_template('EMOTICON_CLICK_CODE',array('_GUID'=>'1a75f914e09f2325ad96ad679bcffe88','FIELD_NAME'=>$field_name,'CODE'=>$code,'IMAGE'=>apply_emoticons($code))));\n\t}\n\n\treturn $em;\n}", "title": "" }, { "docid": "71645ccf5ecc42abf35af3a46c1683a6", "score": "0.47052157", "text": "function bs_case_study_form_save_submit_placeholder($field) {\n\t$field['message'] = str_replace( '<a href=\"mailto:opsi@oecd.org\" title=\"contact OPSI\">opsi@oecd.org</a>', '<a href=\"mailto:opengov@oecd.org\" title=\"contact OPSI\">opengov@oecd.org</a>', $field['message'] );\n\treturn $field;\n}", "title": "" }, { "docid": "01967b73f03fab010a69d97df0e0ed84", "score": "0.4692596", "text": "function material_design_preprocess_node(&$variables, $hook) {\n if ($variables['display_submitted']) {\n $variables['submitted_by'] = t('Written by !username', array('!username' => $variables['name']));\n $variables['submitted_on'] = t('!datetime', array('!datetime' => $variables['pubdate']));\n }\n // Optionally, run node-type-specific preprocess functions, like\n // material_design_preprocess_node_page() or material_design_preprocess_node_story().\n $function = __FUNCTION__ . '_' . $variables['node']->type;\n if (function_exists($function)) {\n $function($variables, $hook);\n }\n}", "title": "" }, { "docid": "1dd39cd86f574b0bbe630b14dd5bc5a8", "score": "0.46920407", "text": "function hook_search_api_dezi_field_mapping_alter(SearchApiIndex $index, array &$fields) {\n if ($index->entity_type == 'node' && isset($fields['body:value'])) {\n $fields['body:value'] = 'text';\n }\n}", "title": "" }, { "docid": "fa977f1eee6cf3b5b399d8d2bb217902", "score": "0.4686283", "text": "function contact_form_field( $atts, $content, $tag ) {\n\tglobal $contact_form_fields, $contact_form_last_id, $grunion_form;\n\t\n\t$field = shortcode_atts( array(\n\t\t'label' => null,\n\t\t'type' => 'text',\n\t\t'required' => false,\n\t\t'options' => array(),\n\t\t'id' => null,\n\t\t'default' => null,\n\t), $atts);\n\t\n\t// special default for subject field\n\tif ( $field['type'] == 'subject' && is_null($field['default']) )\n\t\t$field['default'] = $grunion_form->subject;\n\t\n\t// allow required=1 or required=true\n\tif ( $field['required'] == '1' || strtolower($field['required']) == 'true' )\n\t\t$field['required'] = true;\n\telse\n\t\t$field['required'] = false;\n\t\t\n\t// parse out comma-separated options list\n\tif ( !empty($field['options']) && is_string($field['options']) )\n\t\t$field['options'] = array_map('trim', explode(',', $field['options']));\n\n\t// make a unique field ID based on the label, with an incrementing number if needed to avoid clashes\n\t$id = $field['id'];\n\tif ( empty($id) ) {\n\t\t$id = sanitize_title_with_dashes( $contact_form_last_id . '-' . $field['label'] );\n\t\t$i = 0;\n\t\twhile ( isset( $contact_form_fields[ $id ] ) ) {\n\t\t\t$i++;\n\t\t\t$id = sanitize_title_with_dashes( $contact_form_last_id . '-' . $field['label'] . '-' . $i );\n\t\t}\n\t\t$field['id'] = $id;\n\t}\n\t\n\t$contact_form_fields[ $id ] = $field;\n\t\n\tif ( $_POST )\n\t\tcontact_form_validate_field( $field );\n\t\n\treturn contact_form_render_field( $field );\n}", "title": "" }, { "docid": "560dac6e2d613e8496af5f59e8f1ffd0", "score": "0.46820658", "text": "function discy_custom_fields($item_id,$item) {\n\twp_nonce_field('menu_meta_icon_nonce','_menu_meta_icon_nonce_name');\n\t$menu_meta_icon = get_post_meta($item_id,'_menu_meta_icon',true)?>\n\t<input type=\"hidden\" name=\"menu-meta-icon-nonce\" value=\"<?php echo wp_create_nonce('menu-meta-icon-name')?>\">\n\t<div class=\"field-menu_meta_icon description-wide\" style=\"margin: 5px 0;\">\n\t\t<p class=\"field-menu-meta-icon description description-thin\">\n\t\t\t<label for=\"menu-meta-icon-<?php echo esc_attr($item_id)?>\">\n\t\t\t\t<?php esc_html_e(\"Icon class\",'discy')?><br>\n\t\t\t\t<input type=\"text\" id=\"menu-meta-icon-<?php echo esc_attr($item_id)?>\" class=\"widefat code menu-meta-icon\" name=\"menu_meta_icon[<?php echo esc_attr($item_id)?>]\" value=\"<?php echo esc_attr($menu_meta_icon)?>\">\n\t\t\t</label>\n\t\t</p>\n\t</div>\n<?php }", "title": "" }, { "docid": "4d016ea4a919574228e39c00f43f81a9", "score": "0.46796653", "text": "function _cals_importer_iterate_field_map(&$node, $xml, $map, $op) {\n /*\n variable_set('error_level', 1);\n dpm(ddebug_backtrace(TRUE));\n variable_set('error_level', 1);\n */\n $fc_fields = array(); // container for field collection array\n foreach($map as $k => $v) {\n $type = $v['type'];\n\n if(!empty($v['parser'])) {\n if(!isset($v['parser']['function'])) printAndDie(\"???\", $v);\n $function = $v['parser']['function'];\n if(is_array($function)) {\n foreach($function as $f) {\n $function($xml, $k, $map);\n }\n }\n else{\n if(isset($v['parser']['tags'])) {\n $tags = $v['parser']['tags'];\n $function($xml, $k, $map, $tags);\n }\n else $function($xml, $k, $map);\n\n }\n $node->{$k} = array();\n $key = ($type == 'taxonomy') ? \"tid\" : \"value\";\n if(is_array($map[$k]['values'])) {\n $values = $map[$k]['values'];\n foreach($values as $value) {\n if($type == 'link_field') {\n $node->{$k}[LANGUAGE_NONE][] = $value;\n }\n else{\n if(is_string($value)) $value = trim($value);\n if(!empty($value)) {\n if($k == 'field_contents') {\n $node->{$k}[LANGUAGE_NONE][] = array(\n $key => $value,\n \"format\" => 'filtered_html',\n );\n }\n else //otherwise, just set the value\n $node->{$k}[LANGUAGE_NONE][][$key] = $value;\n }\n\n }\n }\n }\n\n if( ($type != 'field_collection' && $type != 'taxonomy' && $type != 'link_field') || $k == 'field_title_uniform') {\n _cals_importer_normalize_node_field($node, $k); //normalizes various field values\n }\n if( $type == 'field_collection' && $op != 'merge_fc' ) {\n // N.B. Deletes the collection and delegates new creation from\n // MARCXML to\n // _cals_importer_populate_repos_item_fieldcollections\n _cals_importer_delete_field_collection($node, $k);\n $fc_fields[$k] = $map[$k];\n }\n\n }\n }\n if( in_array($op, array('parse', 'reparse') ) )\n _cals_delete_duplicate_oclc_numbers($node);\n //save the populated node\n //$node->status = 1;\n $node->title = $node->title_field[LANGUAGE_NONE][0]['value'];\n node_save($node);\n\n //populate the field collections\n if(count($fc_fields)) _cals_importer_populate_repos_item_fieldcollections($node, $fc_fields);\n}", "title": "" }, { "docid": "3eaf60494ddcad2868e70d45fe68263b", "score": "0.46777046", "text": "function half_preprocess_page(&$variables) {\n\n if (isset($variables['node'])) {\n $node = $variables['node'];\n\n //setting normal page image for nodes\n if (!empty($node->field_page_image)) {\n $imageCount = 0;\n foreach ($node->field_page_image[$node->language] as $file) {\n if (drupal_is_front_page()) {\n $page_image = array(\n 'style_name' => 'homepage_image',\n 'path' => $file['uri'],\n );\n } else {\n $page_image = array(\n 'style_name' => 'page_image',\n 'path' => $file['uri'],\n );\n }\n $imageCount++;\n\n $temp_array['image'] = theme('image_style', $page_image);\n $variables['page_image'][] = $temp_array;\n $variables['count'] = $imageCount;\n }\n }\n }\n\n // //setting normal page image for taxonomy terms\n // if (isset($variables['page']['content']['system_main']['term_heading']['term']['#term']) && !empty($variables['page']['content']['system_main']['term_heading']['term']['#term']->field_page_image)) {\n // $imageCount = 0;\n // foreach ($variables['page']['content']['system_main']['term_heading']['term']['#term']->field_page_image['und'] as $file){\n // $taxonomy_image = array(\n // 'style_name' => 'page_image',\n // 'path' => $file['uri'],\n // );\n // $imageCount++;\n \n // $temp_array['taxImage'] = theme('image_style', $taxonomy_image);\n // $variables['taxonomy_image'][] = $temp_array;\n // $variables['count'] = $imageCount;\n // }\n // }\n\n // if (isset($node) && $node->type == 'project') {\n // $variables['theme_hook_suggestions'][] = 'page__project';\n // }\n \n // if (isset($variables['node'])) {\n // if ($variables['node']->type == 'homepage') {\n\n // $node = node_load($variables['node']->nid);\n // foreach($node->field_homepage_slider['und'] as $idx => $value){\n // $field_collection = entity_load('field_collection_item', array($value['value']));\n // foreach($field_collection as $key => $item){\n // $image_link = image_style_url('homepage_slider', $item->field_slider_image['und'][0]['uri']);\n // $temp_array['image_link'] = $image_link;\n // $temp_array['heading'] = $item->field_slider_title['und'][0]['value'];\n // $temp_array['description'] = $item->field_slider_text['und'][0]['value'];\n // $variables['feature'][] = $temp_array;\n // }\n // }\n\n // }\n // }\n}", "title": "" }, { "docid": "8f2040b354be191c50d406f57d86170f", "score": "0.46743926", "text": "function template_preprocess_webform(array &$variables) {\n template_preprocess_form($variables);\n}", "title": "" }, { "docid": "fa3c5c36e99fac901fcdfca130c9887c", "score": "0.467411", "text": "function agent_field_form($form, &$form_state, $nid, $no_js_use = FALSE) { \n\t$arg=$nid;\n // Because we have many fields with the same values, we have to set\n // #tree to be able to access them.\n $form['#tree'] = TRUE;\n $form['names_fieldset'] = array(\n '#type' => 'fieldset',\n\t'#title'=>'SHARE LISTING WITH',\n '#autocomplete_path' => 'agents/autocomplete/'.$arg,\n\t'#required'=>TRUE,\n '#prefix' => '<div id=\"names-fieldset-wrapper\">',\n '#suffix' => '</div>',\n );\n\n // Build the fieldset with the proper number of names. We'll use\n // $form_state['num_names'] to determine the number of textfields to build.\n if (empty($form_state['num_names'])) {\n $form_state['num_names'] = 1;\n }\n for ($i = 0; $i < $form_state['num_names']; $i++) {\n $form['names_fieldset']['name'][$i] = array(\n '#type' => 'textfield',\n '#autocomplete_path' => 'agents/autocomplete/'.$arg,\n\t '#required'=>TRUE,\n \n );\n }\n $form['names_fieldset']['add_name'] = array(\n '#type' => 'submit',\n '#value' => t('Add another Item'),\n '#submit' => array('agent_field_form_add_more_add_one'),\n '#ajax' => array(\n 'callback' => 'agent_field_form_add_more_callback',\n 'wrapper' => 'names-fieldset-wrapper',\n ),\n\t'#prefix' => '<div id=\"add-more-items\">',\n '#suffix' => '</div>',\n );\n if ($form_state['num_names'] > 1) {\n $form['names_fieldset']['remove_name'] = array(\n '#type' => 'submit',\n '#value' => t('Remove last Item'),\n '#submit' => array('agent_field_form_add_more_remove_one'),\n '#ajax' => array(\n 'callback' => 'agent_field_form_add_more_callback',\n 'wrapper' => 'names-fieldset-wrapper',\n ),\n\t '#prefix' => '<div id=\"remove-more-items\">',\n\t\t'#suffix' => '</div>',\n );\n }\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Add Agents'),\n\t'#prefix' => '<div id=\"agent_submit\">',\n\t'#suffix' => '</div>',\n );\n\n // For demonstration only! You don't need this.\n if ($no_js_use) {\n if (!empty($form['names_fieldset']['remove_name']['#ajax'])) {\n unset($form['names_fieldset']['remove_name']['#ajax']);\n }\n unset($form['names_fieldset']['add_name']['#ajax']);\n }\n return $form;\n}", "title": "" }, { "docid": "8c91afd5f5820225862a63ca118fa122", "score": "0.4673329", "text": "function render_field( $field ) {\n\t\tif(defined('FLICKR_BROWSER_API_KEY')) {\n\t\t\t$field['flickr_api_key'] = FLICKR_BROWSER_API_KEY;\n\t\t}\n\t\tif(defined('FLICKR_BROWSER_USER_ID')) {\n\t\t\t$field['flickr_user_id'] = FLICKR_BROWSER_USER_ID;\n\t\t}\n?>\n\n\t\t<script id=\"SidebarPartial\" type=\"x-tmpl-mustache\">\n\t\t\t{{#children}}\n\t\t\t\t<li class=\"sidebar-item\" {{#id}}data-id=\"{{id}}\"{{/id}}>\n\t\t\t <div class=\"sidebar-link\">\n\t\t\t <svg class=\"sidebar-icon\" aria-hidden=\"true\" role=\"presentation\" title=\"{{title}}\">\n\t\t\t <use xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"#{{icon}}\"></use>\n\t\t\t </svg>\n\t\t\t <p>{{title}}<br><span>3 Photos</span></p>\n\t\t\t </div>\n\t\t <ul>\n\t\t\t\t\t\t{{>recursive_partial}}\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t{{/children}}\n\t\t</script>\n\n\t\t<script id=\"AlbumTemplate\" type=\"x-tmpl-mustache\">\n\t\t\t<div class=\"fb-album\" data-album-id=\"{{albumId}}\">\n\t\t\t{{#photos}}\n\t\t\t\t<div class=\"fb-photo\" data-id=\"{{id}}\"\n\t\t\t\t{{!--SQUARE--}}\n\t\t\t\t\t{{#url_sq}}data-sq=\"{{url_sq}}\"{{/url_sq}}\n\t\t\t\t\t{{#url_q}}data-q=\"{{url_q}}\"{{/url_q}}\n\t\t\t\t\t{{#url_t}}data-t=\"{{url_t}}\"{{/url_t}}\n\t\t\t\t{{!--SMALL--}}\n\t\t\t\t\t{{#url_s}}data-s=\"{{url_s}}\"{{/url_s}}\n\t\t\t\t\t{{#url_n}}data-n=\"{{url_n}}\"{{/url_n}}\n\t\t\t\t{{!--MEDIUM--}}\n\t\t\t\t\t{{#url_m}}data-m=\"{{url_m}}\"{{/url_m}}\n\t\t\t\t\t{{#url_z}}data-z=\"{{url_z}}\"{{/url_z}}\n\t\t\t\t\t{{#url_c}}data-c=\"{{url_c}}\"{{/url_c}}\n\t\t\t\t{{!--LARGE--}}\n\t\t\t\t\t{{#url_l}}data-l=\"{{url_l}}\"{{/url_l}}\n\t\t\t\t\t{{#url_h}}data-h=\"{{url_h}}\"{{/url_h}}\n\t\t\t\t{{!--ORIGINAL--}}\n\t\t\t\t\t{{#url_o}}data-o=\"{{url_o}}\"{{/url_o}}\n\t\t\t\t{{!--EXTRAS--}}\n\t\t\t\t\t{{#description}}data-description=\"{{description._content}}\"{{/description}}\n\t\t\t\t\t{{#license}}data-license=\"{{license}}\"{{/license}}\n\t\t\t\t\t{{#dateupload}}data-dateupload=\"{{dateupload}}\"{{/dateupload}}\n\t\t\t\t\t{{#datetaken}}data-datetaken=\"{{datetaken}}\"{{/datetaken}}\n\t\t\t\t\t{{#ownername}}data-ownername=\"{{ownername}}\"{{/ownername}}\n\t\t\t\t\t{{#originalformat}}data-originalformat=\"{{originalformat}}\"{{/originalformat}}\n\t\t\t\t\t{{#originalwidth}}data-originalwidth=\"{{originalwidth}}\"{{/originalwidth}}\n\t\t\t\t\t{{#originalheight}}data-originalheight=\"{{originalheight}}\"{{/originalheight}}\n\t\t\t\t\t{{#lastupdate}}data-lastupdate=\"{{lastupdate}}\"{{/lastupdate}}\n\t\t\t\t\t{{#geo}}data-geo=\"{{geo}}\"{{/geo}}\n\t\t\t\t\t{{#tags}}data-tags=\"{{tags}}\"{{/tags}}\n\t\t\t\t\t{{#views}}data-views=\"{{views}}\"{{/views}}\n\t\t\t\t\t{{#media}}data-media=\"{{media}}\"{{/media}}\n\n\t\t\t\tstyle=\"background-image:url({{url_sq}})\">\n\t\t\t\t\t<span>{{title}}</span>\n\t\t\t\t</div>\n\t\t\t{{/photos}}\n\t\t\t</div>\n\t\t</script>\n\n\t\t<script id=\"PreviewTemplate\" type=\"x-tmpl-mustache\">\n\t\t\t<div class=\"fb-selected-item\" data-photo-id=\"{{photoId}}\">\n\t\t\t\t<img src=\"{{url_sq}}\" />\n\t\t\t</div>\n\t\t</script>\n\n\t\t<div style=\"height: 0; width: 0; position: absolute; visibility: hidden\">\n\t\t <!-- inject:svg --><svg xmlns=\"http://www.w3.org/2000/svg\"><symbol id=\"archive\" viewBox=\"0 0 20 20\"><path d=\"M13.98 2H6.02s-.996 0-.996 1h9.955c0-1-.996-1-.996-1zm2.988 3c0-1-.995-1-.995-1H4.027s-.995 0-.995 1v1h13.936V5zm1.99 1l-.588-.592V7H1.63V5.408L1.04 6S.03 6.75.268 8c.236 1.246 1.38 8.076 1.55 9 .185 1.014 1.216 1 1.216 1H16.97s1.03.014 1.216-1c.17-.924 1.312-7.754 1.55-9 .234-1.25-.188-1.408-.778-2zM14 11.997C14 12.55 13.55 13 12.997 13H7.003C6.45 13 6 12.55 6 11.997V10h1v2h6v-2h1v1.997z\"/></symbol><symbol id=\"check\" viewBox=\"0 0 24 32\"><path d=\"M20 6L8 18l-4-4-4 4 8 8 16-16-4-4z\"/></symbol><symbol id=\"folder-open\" viewBox=\"0 0 32 32\"><path d=\"M26 30l6-16H6L0 30zM4 12L0 30V4h9l4 4h13v4z\"/></symbol><symbol id=\"folder\" viewBox=\"0 0 32 32\"><path d=\"M14 4l4 4h14v22H0V4z\"/></symbol><symbol id=\"images\" viewBox=\"0 0 20 20\"><path d=\"M17.125 6.17L15.08.535c-.152-.416-.596-.637-.99-.492L.492 5.006C.098 5.15-.1 5.603.052 6.02l2.155 5.94V8.777c0-1.438 1.148-2.607 2.56-2.607H8.36l4.285-3.008 2.48 3.008h2zM19.238 8H4.768a.762.762 0 0 0-.763.777v9.42c0 .444.343.803.762.803h14.47c.42 0 .763-.36.763-.803v-9.42A.761.761 0 0 0 19.238 8zM18 17H6v-2l1.984-4.018 2.768 3.436 2.598-2.662 3.338-1.205L18 14v3z\"/></symbol><symbol id=\"upload\" viewBox=\"0 0 24 24\"><path d=\"M14.016 12.984h3L12 8.015l-5.016 4.969h3v4.031h4.031v-4.031zm5.343-2.953C21.937 10.219 24 12.375 24 15a5.021 5.021 0 0 1-5.016 5.016H6c-3.328 0-6-2.672-6-6 0-3.094 2.344-5.625 5.344-5.953C6.61 5.672 9.094 3.985 12 3.985c3.656 0 6.656 2.578 7.359 6.047z\"/></symbol></svg><!-- endinject -->\n\t\t</div>\n\n\t\t<div class=\"fb-bar\">\n\t\t\t<div class=\"fb-selected\">\n\t\t\t\t<div class=\"fb-selected-control\">\n\t\t\t\t\t<span class=\"fb-counter\">0 Photos Selected</span>\n\t\t\t\t\t<a href=\"\" class=\"fb-deselect\">Deselect All</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"fb-preview\"></div>\n\t\t\t</div>\n\t\t\t<div class=\"fb-buttons\">\n\t\t\t\t<span class=\"fb-notice\">Only 1 image is allowed</span>\n\t\t\t\t<a href=\"https://www.flickr.com/photos/organize\" class=\"fb-button\" target=\"_blank\">\n\t\t\t\t\t<svg aria-hidden=\"true\" role=\"presentation\" title=\"Organize Flickr Photos\">\n\t\t\t\t\t <use xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"#archive\"></use>\n\t\t\t\t\t</svg>\n\t\t\t\t\tOrganize\n\t\t\t\t</a>\n\t\t\t\t<a href=\"https://www.flickr.com/photos/upload/\" class=\"fb-button\" target=\"_blank\">\n\t\t\t\t\t<svg aria-hidden=\"true\" role=\"presentation\" title=\"Organize Flickr Photos\">\n\t\t\t\t\t <use xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"#upload\"></use>\n\t\t\t\t\t</svg>\n\t\t\t\t\tUpload\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"flickr-browser\">\n\t\t\t<div class=\"fb-sidebar\"></div>\n\t\t\t<div class=\"fb-browser\">\n\t\t\t\t<div class=\"fb-loader\">\n\t\t\t\t\t<img src=\"<?php echo \"{$this->settings['url']}assets/images/oval.svg\" ?>\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"photo-browser-welcome\">\n\t\t\t\t\t<h1>Select a collection or album on the left</h1>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<input hidden disabled type=\"text\" id=\"fb-api-key\" value=\"<?php echo esc_attr($field['flickr_api_key']) ?>\" />\n\n\t\t<input hidden disabled type=\"text\" id=\"fb-user-id\" value=\"<?php echo esc_attr($field['flickr_user_id']) ?>\" />\n\n\t\t<?php\n\t\t\tif (is_array($field['flickr_sizes'])) {\n\t\t\t\t$sizes = implode($field['flickr_sizes'], \",\") . \",url_sq\";\n\t\t\t} else { $sizes = 'url_sq'; }\n\t\t\tif (is_array($field['flickr_extras'])) {\n\t\t\t\t$extras = implode($field['flickr_extras'], \",\");\n\t\t\t} else { $extras = ''; }\n\t\t\t$flickr_extras = $sizes . \",\" . $extras;\n\t\t?>\n\n\t\t<input hidden disabled type=\"text\" id=\"fb-extras\" value=\"<?php echo esc_attr($flickr_extras) ?>\" />\n\n\t\t<input hidden disabled type=\"text\" id=\"fb-limit\" value=\"<?php echo esc_attr($field['flickr_limit']) ?>\" />\n\n\t\t<textarea hidden id=\"fb-result-panel\" rows=\"10\" name=\"<?php echo esc_attr($field['name']) ?>\"><?php echo esc_attr($field['value']) ?></textarea>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "f0854dd46f69aa149c3d30e0ea7c7d50", "score": "0.4672731", "text": "static function add_iss_special(): void {\r\n self::add_acf_inner_field(self::issues, self::iss_special, [\r\n 'label' => 'Special name',\r\n 'type' => 'text',\r\n 'instructions' => 'An optional special name for the issue (e.g. April Fool\\'s).',\r\n 'required' => 0,\r\n 'conditional_logic' => [\r\n [\r\n [\r\n 'field' => self::qualify_field(self::iss_is_special),\r\n 'operator' => '==',\r\n 'value' => '1',\r\n ],\r\n ],\r\n ],\r\n 'wrapper' => [\r\n 'width' => '45',\r\n 'class' => '',\r\n 'id' => '',\r\n ],\r\n 'default_value' => '',\r\n 'placeholder' => '',\r\n 'prepend' => '',\r\n 'append' => '',\r\n 'maxlength' => '',\r\n ]);\r\n }", "title": "" } ]
13c560e0a8c0dabe00bcabee685b4184
Turns a filename into an fFile or fImage object
[ { "docid": "ea0e67f14eb446d133d391b82a44d85f", "score": "0.0", "text": "static public function objectify($class, $column, $value)\n\t{\n\t\tif ((!is_string($value) && !is_numeric($value) && !is_object($value)) || !strlen(trim($value))) {\n\t\t\treturn $value;\n\t\t}\n\t\t\n\t\t$path = self::$file_upload_columns[$class][$column]->getPath() . $value;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\treturn fFilesystem::createObject($path);\n\t\t\t \n\t\t// If there was some error creating the file, just return the raw value\n\t\t} catch (fExpectedException $e) {\n\t\t\treturn $value;\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "e19b9c2fb3947a4a3ba661aeca79a6d5", "score": "0.6474899", "text": "abstract public static function fromFile($filename);", "title": "" }, { "docid": "913466bbb33a1766fbe01e9377448606", "score": "0.63224834", "text": "public function fromFile($filename);", "title": "" }, { "docid": "11bf0f66e63e3991d983dadf55de9ccf", "score": "0.6143249", "text": "function _file($name = null)\n {\n $fl = null;\n\n /* Check requested file */\n if (!is_array($name) && isset($_FILES[$name])) {\n $file = $_FILES[$name];\n }\n\n /* Mapping file */\n if (isset($file['name']) && $file['name'] != \"\" && $file['error'] == 0) {\n $xname = explode(\".\", $file['name']);\n $fl = [];\n $fl['filename'] = $file['name'];\n $fl['name'] = str_replace('.' . end($xname), \"\", $file['name']);\n $fl['ext'] = '.' . end($xname);\n $fl['tmp'] = $file['tmp_name'];\n $fl['size'] = round($file['size'] / 1024, 2); //in KB\n $fl['mime'] = mime_content_type($fl['tmp']);\n\n /* Get image dimension */\n $mime = explode(\"/\", $fl['mime'])[0];\n if ($mime == \"image\" || in_array($fl['ext'], ['jpg', 'jpeg', 'png', 'gif', 'webp', 'svg', 'bmp'])) {\n $info = getimagesize($fl['tmp']);\n $fl['width'] = $info[0];\n $fl['height'] = $info[1];\n }\n }\n\n return $fl;\n }", "title": "" }, { "docid": "639c60c220464fe0273acc0f5ac8d5a1", "score": "0.61135584", "text": "function image_parse($file_url, $file_type) {\n switch ($file_type) {\n case \"image/jpeg\":\n return imagecreatefromjpeg($file_url);\n case \"image/png\":\n return imagecreatefrompng($file_url);\n case \"image/gif\":\n return imagecreatefromgif($file_url);\n }\n return null;\n}", "title": "" }, { "docid": "ea597b8ee88bbf4baa5f6f3f2e182334", "score": "0.6082661", "text": "function imagecreatefromfile($image_path) {\n // retrieve the type of the provided image file\n list($width, $height, $image_type) = getimagesize($image_path);\n\n // select the appropriate imagecreatefrom* function based on the determined\n // image type\n switch ($image_type)\n {\n case IMAGETYPE_GIF: return imagecreatefromgif($image_path); break;\n case IMAGETYPE_JPEG: return imagecreatefromjpeg($image_path); break;\n case IMAGETYPE_PNG: return imagecreatefrompng($image_path); break;\n default: return ''; break;\n }\n }", "title": "" }, { "docid": "53eff4139fe4c41e82848b72c02567ad", "score": "0.5897829", "text": "function fileFactory($fileName, $content)\n{\n\t$fullPath = DIRNAME . $fileName;\n\t$file = new stdClass();\n\t$file->name = $fileName;\n\tpreg_match('/\\.(\\w+)$/', $fileName, $matches);\n\t$file->extension = isset($matches[1]) ? $matches[1] : false;\n\t$file->size = filesize($fullPath);\n\t$file->date = filemtime($fullPath);\n\t$file->thumbnail = \"?thumb=$fileName\";\n\tif (in_array(strtolower($file->extension), array('jpg', 'jpeg', 'jpe', 'png', 'gif', 'bmp')) && $params = @getimagesize($fullPath)) {\n\t\t$file->isDimensional = true;\n\t\t$file->width = $params[0];\n\t\t$file->height = $params[1];\n\t\t$userThumbPath = DIRNAME . getThumbName($fileName);\n\t\tif (file_exists($userThumbPath)) {\n\t\t\t$file->thumbnail = getThumbName($fileName);\n\t\t} elseif (mkdirRecursive(DIRNAME . 'thumbs/')) {\n\t\t\t$thumbPath = DIRNAME . 'thumbs/' . getThumbName($fileName);\n\t\t\tif (file_exists($thumbPath)) {\n\t\t\t\t$file->thumbnail = 'thumbs/' . getThumbName($fileName);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$file->isDimensional = false;\n\t}\n\t$flipped = array_flip($content);\n\t$key = $flipped[$fileName];\n\t$file->num = $key + 1;\n\t$file->previousFile = $key > 0 ? $content[$key - 1] : end($content);\n\t$file->nextFile = $key < count($content) - 1 ? $content[$key + 1] : reset($content);\n\treturn $file;\n}", "title": "" }, { "docid": "8f9c858c946aab0ea994290a21b36bb6", "score": "0.58642757", "text": "public function load($filename) {\n $image_info = getimagesize($filename);\n $this->image_type = $image_info[2];\n if ($this->image_type == IMAGETYPE_JPEG) {\n $this->image = imagecreatefromjpeg($filename);\n } elseif ($this->image_type == IMAGETYPE_GIF) {\n $this->image = imagecreatefromgif($filename);\n } elseif ($this->image_type == IMAGETYPE_PNG) {\n $this->image = imagecreatefrompng($filename);\n }\n }", "title": "" }, { "docid": "1d633779c9871001e3831e6c27a7c419", "score": "0.58595103", "text": "public static function typeFromFile($file) {\n \n if ($file == '') return NULL;\n \n switch (exif_imagetype($file)) {\n \n case IMAGETYPE_GIF:\n return 'gif';\n break;\n \n case IMAGETYPE_JPEG:\n return 'jpg';\n break;\n \n case IMAGETYPE_PNG:\n return 'png';\n break;\n \n default:\n return FALSE;\n break;\n \n }\n }", "title": "" }, { "docid": "5b50a9889d964dbdaec7a1e373a749db", "score": "0.58478147", "text": "public function image(): ?ImageFile\n {\n return new ImageFile($this->src, $this->filename);\n }", "title": "" }, { "docid": "1690b5320a3c47e70e9b8b030c2d03a7", "score": "0.5825451", "text": "public static function getFile() {\n\t\tglobal $wgUploadDirectory;\n\t\t$sRawFilePath = RequestContext::getMain()->getRequest()->getVal( 'f' );\n\t\t// Some extensions (e.g. Social Profile) add params with ? to filename\n\t\t$aRawFilePathPcs = preg_split( \"/\\?.*=/\", $sRawFilePath );\n\t\t$sRawFilePath = $aRawFilePathPcs[0];\n\t\t$sUploadDirectory = realpath( $wgUploadDirectory );\n\t\tif ( empty( $sUploadDirectory ) ) throw new MWException( '$wgUploadDirectory is empty. This should never happen!' );\n\n\t\t// Switch between f=File:Foo.png and f=/3/33/Foo.png style requests\n\t\t$aFileNamespaceNames = BsNamespaceHelper::getNamespaceNamesAndAliases( NS_FILE );\n\t\tif ( preg_match( '#^(.*?):(.*)$#', $sRawFilePath, $aMatch ) && in_array( $aMatch[1], $aFileNamespaceNames ) ) {\n\t\t\t$oTitle = Title::newFromText( $aMatch[2], NS_FILE );\n\t\t\t$oImg = wfLocalFile( $oTitle );\n\t\t\tif ( !is_null( $oImg ) ) {\n\t\t\t\t$oImgRepoLocalRef = $oImg->getRepo()->getLocalReference( $oImg->getPath() );\n\t\t\t\tif ( !is_null( $oImgRepoLocalRef ) ) {\n\t\t\t\t\t$sFilePath = realpath( $oImgRepoLocalRef->getPath() );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$sFilePath = realpath( $sUploadDirectory . $sRawFilePath );\n\t\t}\n\n\t\t$aPathParts = pathinfo( $sFilePath );\n\t\t$sFileName = $aPathParts['basename'];\n\t\t$sFileExt = isset( $aPathParts['extension'] )?strtolower( $aPathParts['extension'] ):'';\n\n\t\tif ( strpos( $sFilePath, $sUploadDirectory ) !== 0 // prevent directory traversal\n\t\t\t|| preg_match( '/^\\.ht/', $sFileName ) // don't serve .ht* files\n\t\t\t|| empty( $sFilePath ) // $sFilePath not being set or realpath() returning false indicates that file doesn't exist\n\t\t\t|| !is_file( $sFilePath ) // ignore directories\n\t\t\t|| !is_readable( $sFilePath )\n\t\t\t) {\n\t\t\theader( 'HTTP/1.0 404 Not Found' );\n\t\t\texit;\n\t\t}\n\n\t\t// At this point we have a valid and readable file path in $sFilePath.\n\t\t// Now create a File object to get some properties\n\n\t\tif ( strstr( $sFilePath, 'thumb' ) ) $sFindFileName = preg_replace( \"#(\\d*px-)#\", '', $sFileName );\n\t\telse $sFindFileName = $sFileName;\n\n\t\t$aOptions = array( 'time' => false );\n\t\t//TODO: maybe check for \"/archive\" in $sFilePath, too. But this migth be a config setting, so do not hardcode\n\t\t$isArchive = preg_match('#^\\d{14}!#si', $sFindFileName); //i.e. \"20120724112914!Adobe-reader-x-tco-de.pdf\"\n\t\tif( $isArchive ) {\n\t\t\t$aFilenameParts = explode( '!', $sFindFileName, 2);\n\t\t\t$sFindFileName = $aFilenameParts[1];\n\t\t\t$aOptions['time'] = $aFilenameParts[0];\n\t\t}\n\t\t$oFile = RepoGroup::singleton()->findFile( $sFindFileName, $aOptions );\n\n\t\t// We need to do some additional checks if file extension is not on whitelist\n\t\tif ( !in_array( $sFileExt, BsConfig::get( 'MW::SecureFileStore::FileExtensionWhitelist' ) ) ) {\n\n\t\t\t// Check for MediaWiki right 'viewfiles'\n\t\t\tglobal $wgUser;\n\t\t\tif ( !$wgUser->isAllowed( 'viewfiles' ) ) {\n\t\t\t\theader ( 'HTTP/1.0 403 Forbidden' );\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t// Check if user has access to file's meta page\n\t\t\tif ( $oFile ) {\n\t\t\t\tif ( !$oFile->getTitle()->userCan( 'read' ) ) {\n\t\t\t\t\theader ( 'HTTP/1.0 403 Forbidden' );\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// User is allowed to retrieve file. Get things going.\n\t\t# If file is not in MW's repo try to guess MIME type\n\t\t$sFileMime = ( $oFile ) ? $oFile->getMimeType() : MimeMagic::singleton()->guessMimeType( $sFilePath, false );\n\n\t\t$sFileDispo = BsConfig::get( 'MW::SecureFileStore::DefaultDisposition' );\n\t\tif ( in_array( $sFileExt, BsConfig::get( 'MW::SecureFileStore::DispositionAttachment' ) ) ) $sFileDispo = 'attachment';\n\t\tif ( in_array( $sFileExt, BsConfig::get( 'MW::SecureFileStore::DispositionInline' ) ) ) $sFileDispo = 'inline';\n\n\t\t$aFileStat = stat( $sFilePath );\n\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', $aFileStat['mtime'] ) . ' GMT' );\n\t\theader( \"Content-Type: $sFileMime\" );\n\t\theader( \"Content-Disposition: $sFileDispo; filename=\\\"$sFileName\\\"\" );\n\t\theader( \"Cache-Control: no-cache,must-revalidate\", true ); //Otherwise IE might deliver old version\n\n\t\tif ( !empty( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) ) {\n\t\t\t$sModSince = preg_replace( '/;.*$/', '', $_SERVER['HTTP_IF_MODIFIED_SINCE'] );\n\t\t\t$sSinceTime = strtotime( $sModSince );\n\t\t\tif ( $aFileStat['mtime'] <= $sSinceTime ) {\n\t\t\t\tini_set('zlib.output_compression', 0);\n\t\t\t\theader( \"HTTP/1.0 304 Not Modified\" );\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t// IE6/IE7 cannot handle download of zip-files that are aditionally gzipped by the Apache\n\t\t// just put it in the header and tell apache to immediately flush => and gzip is disabled\n\t\tif ( $sFileMime == 'application/zip' ) {\n\t\t\theader( 'Content-Length: ' . $aFileStat['size'] );\n\t\t\tflush();\n\t\t}\n\n\t\t// Send the file already ;-)\n\t\treadfile( $sFilePath );\n\t\texit;\n\t}", "title": "" }, { "docid": "7eb33ef6fbc6cf2c2f000ed6c24081a4", "score": "0.5819455", "text": "private static function _openImage($file)\n\t{\n\t\t// *** Get extension\n\t\t$extension = strtolower(strrchr($file, '.'));\n\t\tswitch($extension)\n\t\t{\n\t\t\tcase '.jpg':\n\t\t\tcase '.jpeg':\n\t\t\t\t$img = @imagecreatefromjpeg($file);\n\t\t\t\tbreak;\n\t\t\tcase '.gif':\n\t\t\t\t$img = @imagecreatefromgif($file);\n\t\t\t\tbreak;\n\t\t\tcase '.png':\n\t\t\t\t$img = @imagecreatefrompng($file);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$img = false;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $img;\n\t}", "title": "" }, { "docid": "d077f74a75b9fc63a6ece54918e0960f", "score": "0.5792832", "text": "protected function get_file_object($file_name)\n\t{\n\t\t$file_path = $this->getPath_img_upload_folder() . $file_name;\n\t\tif (is_file($file_path) && $file_name[0] !== '.')\n\t\t{\n\n\t\t\t$file = new stdClass();\n\t\t\t$file->name = $file_name;\n\t\t\t$file->size = filesize($file_path);\n\t\t\t//$file->url = $this->getPath_url_img_upload_folder() . rawurlencode($file->name);\n\t\t\t$file->url = $this->getPath_url_img_upload_folder() . rawurlencode($file->name);\n\t\t\t//$file->thumbnail_url = $this->getPath_url_img_thumb_upload_folder() . rawurlencode($file->name);\n\t\t\t$file->thumbnail_url = $this->getPath_url_img_thumb_upload_folder() . rawurlencode($file->name);\n\t\t\t//File name in the url to delete \n\t\t\t$file->delete_url = $this->getDelete_img_url() . rawurlencode($file->name);\n\t\t\t$file->delete_type = 'DELETE';\n\t\t\t\n\t\t\treturn $file;\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "127b2c76b4e82f7ca80880a2cee1eded", "score": "0.5790325", "text": "function createImageFromFile($filename, $use_include_path = false, $context = null, &$info = null)\n{\n // try to detect image informations -> info is false if image was not readable or is no php supported image format (a check for \"is_readable\" or fileextension is no longer needed)\n $info = array(\"image\"=>getimagesize($filename));\n $info[\"image\"] = getimagesize($filename);\n if($info[\"image\"] === false) throw new InvalidArgumentException(\"\\\"\".$filename.\"\\\" is not readable or no php supported format\");\n else\n {\n // fetches fileconten from url and creates an image ressource by string data\n // if file is not readable or not supportet by imagecreate FALSE will be returnes as $imageRes\n $imageRes = imagecreatefromstring(file_get_contents($filename, $use_include_path, $context));\n // export $http_response_header to have this info outside of this function\n if(isset($http_response_header)) $info[\"http\"] = $http_response_header;\n return $imageRes;\n }\n}", "title": "" }, { "docid": "e898ade7f1351fa9c814826e8ef28da5", "score": "0.57885736", "text": "protected function fromFileType($paths)\n {\n // UZANTI JPG\n if( extension($this->file) === 'jpg' )\n {\n return imagecreatefromjpeg($paths);\n }\n // UZANTI JPEG\n elseif( extension($this->file) === 'jpeg' )\n {\n return imagecreatefromjpeg($paths);\n }\n // UZANTI PNG\n elseif( extension($this->file) === 'png' )\n {\n return imagecreatefrompng($paths);\n }\n // UZANTI GIF\n elseif( extension($this->file) === 'gif' )\n {\n return imagecreatefromgif($paths);\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "75b2c19fb0fb1c7d822303c0f16887e8", "score": "0.5771071", "text": "function &loadImage($fileName) {\n list(, , $fileType) = @getimagesize($fileName);\n $result = FALSE;\n switch ($fileType) {\n case IMAGETYPE_GIF :\n $result = @imagecreatefromGIF($fileName);\n break;\n case IMAGETYPE_JPEG :\n $result = @imagecreatefromJPEG($fileName);\n break;\n case IMAGETYPE_PNG :\n $result = @imagecreatefromPNG($fileName);\n imagesavealpha($result, TRUE);\n break;\n }\n return $result;\n }", "title": "" }, { "docid": "a23c22fd0a5db2ef503a7c1df78e2401", "score": "0.56967443", "text": "protected static function getFile($uri) {\n return new ImageFile($uri);\n }", "title": "" }, { "docid": "bc6a2b31ed1006d3ed4540991f07c180", "score": "0.5696711", "text": "function imageCreateFromSWF($swffile) {\n\n die(\"No SWF converter in this library\");\n\n }", "title": "" }, { "docid": "1395b9d2a2c50659b0a5cda37ab605f5", "score": "0.5677628", "text": "public function forFile(File $file);", "title": "" }, { "docid": "b9a340d8e8935c68086d67f0d5f64f1f", "score": "0.5667758", "text": "static function getImageTypeWithFileName($file_name) {\n $ext = self::getFileExt($file_name);\n if ($ext) {\n $types = self::getImageTypes();\n return $types[$ext];\n }\n }", "title": "" }, { "docid": "706c7700327553f1b18a4618e8d60686", "score": "0.5641041", "text": "function CreateFromFile($imgFile)\n\t{\n\t\tif (preg_match('/^(http|ftp)s?:\\/\\//', $imgFile)) {\n\t\t\tif (!ini_get('allow_url_fopen') && !function_exists('curl')) {\n\t\t\t\tthrow new Exception('Unable to access file without curl or allow_url_fopen in PHP ini.');\n\t\t\t} else if (!ini_get('allow_url_fopen')) {\n\t\t\t\t$ch = curl_init();\n\t\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 3);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Content-Type: text/xml\"));\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\t$content = curl_exec($ch);\n\t\t\t\tcurl_close($ch);\n\t\t\t\treturn @ImageCreateFromString($content);\n\t\t\t}\n\t\t}\n\n\t\tlist($width, $height, $type, $attr) = @getimagesize($imgFile);\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 1 :\n\t\t\t\treturn @ImageCreateFromGIF($imgFile);\n\t\t\t\texit;\n\t\t\t\tbreak;\n\t\t\tcase 2 :\n\t\t\t\treturn @ImageCreateFromJPEG($imgFile);\n\t\t\t\texit;\n\t\t\t\tbreak;\n\t\t\tcase 3 :\n\t\t\t\treturn @ImageCreateFromPNG($imgFile);\n\t\t\t\texit;\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\texit;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e2283e6e30710acc0388b5f1f382cf70", "score": "0.5639252", "text": "protected function prepareImageFile($framework_file): ImageFile\n {\n return new UploadedFileImage($framework_file);\n }", "title": "" }, { "docid": "f70edbe6c3ff55fef71a3f1de13ab79d", "score": "0.5628801", "text": "public function getFileInstance()\n\t{\n\t\tif ($this->path && $this->filename)\n\t\t{\n\t\t\treturn new File($this->path.'/'.$this->filename);\n\t\t}\n\t}", "title": "" }, { "docid": "a3a3964985fa1b0147441e8f2a423c66", "score": "0.5620621", "text": "function GetFileType($filename) {\r\n\t\t\t$filename = strtolower($filename); //make lower case\r\n\t\t\t/*\r\n\t\t\t$len = strlen($filename); // get length\r\n\t\t\t$pos = strpos($filename, \".\"); // retrieve position of dot by counting chars upto dot\r\n\t\t\t$type = substr($filename, $pos + 1, $len);\r\n\t\t\t*/\r\n\t\t\t$tmp = explode(\".\",$filename);\r\n\t\t\t$type = $tmp[sizeof($tmp)-1];\r\n\t\t\treturn $type;\r\n\t\t}", "title": "" }, { "docid": "fda76b28f7c77c10201b57aca0efaa09", "score": "0.56125724", "text": "private function _getImageTypeFromFileName($imageFile)\r\n {\r\n $ext = strtolower((string)pathinfo($imageFile, PATHINFO_EXTENSION));\r\n\r\n if ('jpg' == $ext or 'jpeg' == $ext) {\r\n return ImageType::JPEG;\r\n } else if ('gif' == $ext) {\r\n return ImageType::GIF;\r\n } else if ('png' == $ext) {\r\n return ImageType::PNG;\r\n } else {\r\n return ImageType::UNKNOWN;\r\n }\r\n }", "title": "" }, { "docid": "325f38fe544b2af97711e31a918dcd4d", "score": "0.55966145", "text": "public static function createFromFile(string $filename);", "title": "" }, { "docid": "8e5956ff386532d232cd8fd4d65d2a6b", "score": "0.5572257", "text": "private function createResourceOfFile()\n {\n $type = @exif_imagetype($this->source_file);\n if (false === $type || !isset($this->image_type_list[$type])) {\n return;\n }\n\n $this->image_type = $this->image_type_list[$type][0];\n $this->real_extension = $this->image_type_list[$type][1];\n if ($this->isUseImagick() || 'class:imagick' == $this->image_type_function[$this->image_type]) {\n if (!class_exists('Imagick')) {\n trigger_error(\n 'Php Imagick does not exist in server. Please check configuration',\n E_USER_WARNING\n );\n\n return;\n }\n\n /*!\n * Set Property\n */\n $this->resource = new \\Imagick($this->source_file);\n $this->width = $this->resource->getImageWidth();\n $this->height = $this->resource->getImageHeight();\n $this->ready = true;\n\n return;\n }\n\n if (!function_exists($this->image_type_function[$this->image_type])) {\n throw new \\Exception(\n sprintf(\n 'Function %s does not exist in server. Please check configuration',\n $this->image_type_function[$this->image_type]\n ),\n E_USER_WARNING\n );\n }\n\n /*!\n * Set Property\n */\n $this->resource = $this->image_type_function[$this->image_type]($this->source_file);\n\n /*\n * if image type PNG save Alpha Blending\n */\n if ('IMAGETYPE_PNG' == $this->image_type) {\n imagealphablending($this->resource, true); // setting alpha blending on\n imagesavealpha($this->resource, true); // save alpha blending setting (important)\n }\n\n $this->width = imagesx($this->resource);\n $this->height = imagesy($this->resource);\n $this->ready = true;\n }", "title": "" }, { "docid": "e457b630d8a5d646673cc74857316678", "score": "0.5563625", "text": "function loadImage($file, &$imageInfo = array())\n{ \n if(!$imageInfo) $imageInfo = getImageInfo($file);\n \tdebug(\"getimagesize $file\", getimagesize($file));\n// if(!$imageInfo)\treturn false;\n\n\t$imgType = is_array($imageInfo) ? @$imageInfo[\"format\"] : $imageInfo;\n\tif(!$imgType) $imgType = getImageTypeFromExt($file);\n\n \t$funct = \"imagecreatefrom\" . $imgType;\n debug(\"loadImage\", $funct);\n\tif(!$funct || !function_exists($funct))\treturn false;\n\treturn $funct($file);\n}", "title": "" }, { "docid": "29bd6fdea423f494323d262cc0e38b04", "score": "0.55437356", "text": "public function file(string $file): IFile;", "title": "" }, { "docid": "29bd6fdea423f494323d262cc0e38b04", "score": "0.55437356", "text": "public function file(string $file): IFile;", "title": "" }, { "docid": "2002ec17046ef3804145689d9bcf8c76", "score": "0.5530984", "text": "public static function fromFile($file) { }", "title": "" }, { "docid": "b2473df151862e8bd4816c2956780724", "score": "0.55084234", "text": "public abstract function filename( $src_filename, $src_extension );", "title": "" }, { "docid": "e89bc9a50334cb3de317a888bd96809e", "score": "0.549686", "text": "public function load($filename)\n {\n return imagecreatefromjpeg($filename);\n }", "title": "" }, { "docid": "54838da4c3316798a32b430db4dd00a6", "score": "0.548835", "text": "private static function getImage($filename)\n\t{\n\t\t// check the file\n\t\tif(!file_exists($filename))\n\t\t\treturn null;\n\n\t\t// scan the file\n\t\t$getID3 = new getID3;\n\n\t\t// Analyze file and store returned data in $ThisFileInfo\n\t\t$file_info = $getID3->analyze($filename);\n\n\t\t// try to extract the album artwork (if any)\n\t\t// find the artwork in the $file_info structure\n\t\t$artwork = null;\n\n\t\t// try the different places in which I've found artwork\n\t\tif(isset($file_info['comments']['picture'][0]['data']))\n\t\t{\n\t\t\t$artwork = $file_info['comments']['picture'][0]['data'];\n\t\t}\n\t\telse if(isset($file_info['id3v2']['APIC'][0]['data']))\n\t\t{\n\t\t\t$artwork = $file_info['id3v2']['APIC'][0]['data'];\n\t\t}\n\n\t\t// did we find some artwork?\n\t\tif(!$artwork)\n\t\t\treturn null;\n\n\t\t// create the image object and return it\n\t\treturn imagecreatefromstring($artwork);\n\t}", "title": "" }, { "docid": "215ab6fe0dba30fb6f143b21389bfa30", "score": "0.54763573", "text": "private function newFile(string $name)\n {\n return new File(['name' => $name]);\n }", "title": "" }, { "docid": "8221e11420d3db54a2d437475c752d54", "score": "0.5471062", "text": "public static function makeFromFile($fileName): Image\n {\n $image = new static();\n $image->createLayerFromFile($fileName);\n return $image;\n }", "title": "" }, { "docid": "dfcec175614d82cfb4bf812a67c7023a", "score": "0.5431453", "text": "function open_image ($file,$size) {\n \n\t//list($width, $height) = $size;\n\n switch($size[\"mime\"]){\n case \"image/jpeg\":\n $im = imagecreatefromjpeg($file); //jpeg file\n break;\n case \"image/gif\":\n $im = imagecreatefromgif($file); //gif file\n break;\n case \"image/png\":\n\t\t$im = imagecreatefrompng($file);\n\t\t\n\t\t \n break;\n default: \n $im=false;\n break;\n }\n\n return $im;\n}", "title": "" }, { "docid": "932f46ed42bbf6263c20d76f8c17e9c0", "score": "0.543145", "text": "public static function file(string $url): File\n {\n return new File($url);\n\n }", "title": "" }, { "docid": "78ec19f6ea418a6a2a5d63265a091b08", "score": "0.54181963", "text": "function open(LocalFile $image) {\n\t\treturn new Image($this->_instance->open($image->getAbsolutePath()));\n\t}", "title": "" }, { "docid": "9b324388fc7f678d23849d7b16a5fae4", "score": "0.5399715", "text": "public function filename(string $file): string;", "title": "" }, { "docid": "9b324388fc7f678d23849d7b16a5fae4", "score": "0.5399715", "text": "public function filename(string $file): string;", "title": "" }, { "docid": "b202b121f7d481c33c5aaf4096061e0c", "score": "0.53919417", "text": "private function createOriginalResource()\r\n\t{\t\r\n\t\tswitch($this->fileType)\r\n\t\t{\t\r\n\t\t\tcase IMAGETYPE_GIF: $this->originalResource = imagecreatefromgif($this->originalFileName); break;\r\n\t\t\tcase IMAGETYPE_PNG: $this->originalResource = imagecreatefrompng($this->originalFileName); break;\r\n\t\t\tcase IMAGETYPE_BMP: $this->originalResource = imagecreatefromwbmp($this->originalFileName); break;\r\n\t\t\tcase IMAGETYPE_JPEG: $this->originalResource = imagecreatefromjpeg($this->originalFileName); break;\r\n\t\t\tdefault: die('PhotoManip->createOriginalResource(): file was not an image');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ba65d7eca21871fe44b5e19e9d8c0fc5", "score": "0.53762686", "text": "function exif_imagetype ($filename) {}", "title": "" }, { "docid": "1eb390b5473ba8932bbf1f8c175809d4", "score": "0.5374881", "text": "static public function filename($filename) {\n\t\ttry {\n\t\t\t/** @var $resourceFactory ResourceFactory */\n\t\t\t$resourceFactory = GeneralUtility::makeInstance(ResourceFactory::class);\n\t\t\t$file = $resourceFactory->getObjectFromCombinedIdentifier($filename);\n\t\t\t$filename = $file->getForLocalProcessing(FALSE);\n\t\t} catch (\\Exception $e) {\n\t\t}\n\n\t\treturn $filename;\n\t}", "title": "" }, { "docid": "1b558b1c780a911849cb6f5dedc36094", "score": "0.5365681", "text": "public function open_image ($file) {\n $im = @imagecreatefromjpeg($file);\n if ($im != false) { return $im; }\n $im = @imagecreatefromgif($file);\n if ($im != false) { return $im; }\n $im = @imagecreatefrompng($file);\n if ($im != false) { return $im; }\n $im = @imagecreatefromgd($file);\n if ($im != false) { return $im; }\n $im = @imagecreatefromgd2($file);\n if ($im != false) { return $im; }\n $im = @imagecreatefromwbmp($file);\n if ($im != false) { return $im; }\n $im = @imagecreatefromxbm($file);\n if ($im != false) { return $im; }\n $im = @imagecreatefromxpm($file);\n if ($im != false) { return $im; }\n $im = @imagecreatefromstring(file_get_contents($file));\n if ($im != false) { return $im; }\n return false;\n }", "title": "" }, { "docid": "63061555cc695893d5c5810e979f3563", "score": "0.53495365", "text": "static function loadFromFile($uri, $format = null)\n\t\t{\n\t\t\t$mapper = wiFileMapperFactory::selectMapper($uri, $format);\n\t\t\t$handle = $mapper->load($uri);\n\t\t\tif (!self::isValidImageHandle($handle))\n\t\t\t\tthrow new wiInvalidImageSourceException(\"File '{$uri}' appears to be an invalid image source.\");\n\t\t\t\n\t\t\treturn self::loadFromHandle($handle);\n\t\t}", "title": "" }, { "docid": "cf2977ab2f34075392f70dfd82e90f9a", "score": "0.53183246", "text": "public function factory($filename, $type = 'json');", "title": "" }, { "docid": "ccd73085e0ef9b3f99d8fa274270e478", "score": "0.529942", "text": "public function imageByFilename(&$obj, $val, $record)\n {\n $filename = trim(strtolower(Convert::raw2sql($val)));\n $filenamedashes = str_replace(' ', '-', $filename);\n if ($filename\n && $image = Image::get()->whereAny(\n [\n \"LOWER(\\\"FileFilename\\\") LIKE '%$filename%'\",\n \"LOWER(\\\"FileFilename\\\") LIKE '%$filenamedashes%'\"\n ]\n )->first()\n ) { //ignore case\n if ($image instanceof Image && $image->exists()) {\n return $image;\n }\n }\n return null;\n }", "title": "" }, { "docid": "4bb5edd8131a09b4cccba25d30ecc66e", "score": "0.5296085", "text": "function saferFilename($filename, $verbose = false) \n{\n return makeAs($filename, \"filename\", $verbose);\n}", "title": "" }, { "docid": "2378a4e9bf4ff6016e5b55312ad33d4e", "score": "0.52835166", "text": "public function convert($filepath);", "title": "" }, { "docid": "76ba74eae9134f64c3be0647de6f5fa6", "score": "0.5259165", "text": "public function file($fileName): File\n {\n return new File($fileName, $this->url);\n }", "title": "" }, { "docid": "a5ce14f56a73c062f6130bd7c4f204e5", "score": "0.52535594", "text": "function get_imagetype_from_filename($filename)\n{\n\t$ext = get_fileext_from_path($filename);\n\t$imagetypes = get_imagetype_translation_array();\n\tif(array_key_exists($ext,$imagetypes)) {\n\t\treturn $imagetypes[$ext];\n\t} else {\n\t\treturn $imagetypes['unsupported'];\n\t}\n}", "title": "" }, { "docid": "734e42fb10fe13ad110db1d8ad67efa4", "score": "0.5241378", "text": "public static function file($file)\n {\n if($file['name'])\n {\n //if no errors...\n if(!$file['error'])\n {\n //now is the time to modify the future file name and validate the file\n $image_type = explode('/', $file['type']);\n $new_file_name = strtolower(uniqid().\".\".$image_type[1]); //rename file\n\n if($file['size'] > (1024000)) //can't be larger than 1 MB\n {\n return 'File too large';\n }\n \n //move it to where we want it to be\n move_uploaded_file($file['tmp_name'], __PROJECT__.'/application/app/Teams/images/uploads/'.$new_file_name);\n return $new_file_name;\n \n }\n //if there is an error...\n else\n {\n return 'there is an error';\n }\n } else {\n return 'file has no name';\n }\n }", "title": "" }, { "docid": "51b6cd9412160ab556f9f6c1ce263f33", "score": "0.5236163", "text": "public function getImageFile(): ?File \n {\n return $this->imageFile;\n }", "title": "" }, { "docid": "692b207a9119a555f5d58a68e5a7a415", "score": "0.52276003", "text": "protected function open($file) {\n $extension = strtolower(strrchr($file, '.'));\n \n switch($extension) {\n case '.jpg':\n case '.jpeg':\n $image = @imagecreatefromjpeg($file);\n break;\n case '.gif':\n $image = @imagecreatefromgif($file);\n break;\n case '.png':\n $image = @imagecreatefrompng($file);\n break;\n default:\n $image = false;\n break;\n }\n\n if ($image === false) {\n throw new \\Exception('Unable to load image.');\n }\n\n return $image;\n }", "title": "" }, { "docid": "79c0db94a220fa1be652d0c5d6febd0d", "score": "0.52264434", "text": "public function testGetObjectFromFileName()\n {\n $imageRepository = $this->getMockBuilder(ResponsiveImageRepositoryInterface::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $imageRepository->expects($this->any())\n ->method('findImageFromFilename')\n ->will(\n $this->returnCallback(\n function ($filename) {\n $image = new TestImage();\n if ($filename === $image->getPath()) {\n return $image;\n }\n else {\n return null;\n }\n }\n )\n );\n\n // Mock the EntityManager to return the mock of the repository\n $entityManager = $this->getMockBuilder(EntityManager::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $entityManager->expects($this->any())\n ->method('getRepository')\n ->will($this->returnValue($imageRepository));\n\n // The mock the ImageEntityName\n $nameResolver = $this->getMockBuilder(ImageEntityNameResolver::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $nameResolver->expects($this->once())\n ->method('getClassName')\n ->will($this->returnValue('ResponsiveImage'));\n\n $fileToObject = new FileToObject($entityManager, $nameResolver);\n\n // test with non-existing filename.\n $image = $fileToObject->getObjectFromFilename('not-here.jpg');\n $this->assertEmpty($image);\n\n // Test with existing image.\n $image = $fileToObject->getObjectFromFilename('dummy.jpg');\n $this->assertInstanceOf(ResponsiveImageInterface::class, $image);\n }", "title": "" }, { "docid": "e200ef1ea6fec471f3ffc1e3cc119c0c", "score": "0.52111", "text": "function imgsetimg_file( $format = '' )\r\n\t{\r\n\t\treturn $this->getVar( 'imgsetimg_file', $format );\r\n\t}", "title": "" }, { "docid": "8649544f1b59b747589047e8415c0a3c", "score": "0.5205027", "text": "function __construct($filename = \"\", $width = 0, $height = 0) {\r\n\t\tif((empty($filename) || gettype($filename) != \"string\") && ($width == 0 || gettype($width) != \"integer\") && ($height == 0 || gettype($height) != \"integer\")) {\r\n\t\t\tthrow new Exception(\"Parámetro/s incorrectos\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(!empty($filename)) {\r\n\t\t\tif(file_exists($filename)) {\r\n\t\t\t\t$fileExtension = explode(\".\", $filename);\r\n\t\t\t\t$fileExtension = $fileExtension[count($fileExtension) - 1];\r\n\t\t\t\t\r\n\t\t\t\tif(!empty($fileExtension)) {\r\n\t\t\t\t\tswitch($fileExtension) {\r\n\t\t\t\t\t\tcase \"gif\":\r\n\t\t\t\t\t\t\t$this->handler = imagecreatefromgif($filename);\r\n\t\t\t\t\t\t\t$this->mimetype = \"image/gif\";\r\n\t\t\t\t\t\t\tlist($this->width, $this->height) = getimagesize($filename);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"jpeg\":\r\n\t\t\t\t\t\tcase \"jpg\":\r\n\t\t\t\t\t\t\t$this->handler = imagecreatefromjpeg($filename);\r\n\t\t\t\t\t\t\t$this->mimetype = \"image/jpeg\";\r\n\t\t\t\t\t\t\tlist($this->width, $this->height) = getimagesize($filename);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"png\":\r\n\t\t\t\t\t\t\t$this->handler = imagecreatefrompng($filename);\r\n\t\t\t\t\t\t\t$this->mimetype = \"image/png\";\r\n\t\t\t\t\t\t\tlist($this->width, $this->height) = getimagesize($filename);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tunset($this->mimetype);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthrow new ErrorException(\"Tipo de archivo no permitido\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthrow new ErrorException(\"El archivo no existe\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$this->handler = imagecreatetruecolor($width, $height);\r\n\t\t\t$this->widht = $width;\r\n\t\t\t$this->height = $height;\r\n\t\t}\r\n\t\t\r\n\t\tif(!isset($this->handler))\r\n\t\t\tthrow new ErrorException(\"No se pudo crear la imágen, filename: $filename\");\r\n\t}", "title": "" }, { "docid": "60910758835a18f206597af417a17d1a", "score": "0.5200799", "text": "public static function isSupportedFileType($filename)\n\t{\n\t\t// get watermarkfile properties\n\t\tlist($width, $height, $type) = @getimagesize($filename);\n\n\t\t// create image from sourcefile\n\t\tswitch($type)\n\t\t{\n\t\t\t// gif\n\t\t\tcase IMG_GIF:\n\n\t\t\t// jpg\n\t\t\tcase IMG_JPG:\n\n\t\t\t// png\n\t\t\tcase 3:\n\t\t\tcase IMG_PNG:\n\t\t\t\treturn true;\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "0bda00e3a9cdd667dc0dc6b85817d12e", "score": "0.51969343", "text": "public function getImageFile(): ?File\n {\n return $this->imageFile;\n }", "title": "" }, { "docid": "7ea2b66c2a8d0bd9cf858668d2ba9e4d", "score": "0.5186129", "text": "public function __construct($filename) {\n\n # Read the image file to a binary buffer\n $fp = fopen($filename, 'rb') or die(\"Image '$filename' not found!\");\n $buf = '';\n while(!feof($fp))\n $buf .= fgets($fp, 4096);\n\n /*\n Create image and asign it to the image property\n $this is a built in variable that points to the current object. \n It's used to access properties and methods of the current class.\n */\n $this->image = imagecreatefromstring($buf);\n\n # Extract image information storing in the class attributes\n $info = getimagesize($filename);\n $this->width = $info[0];\n $this->height = $info[1];\n $this->mimetype = $info['mime'];\n }", "title": "" }, { "docid": "accef9d9671a9c09cef953bf976a3079", "score": "0.5175108", "text": "public function createPhotoFromFile(UploadedFile $file): Photo;", "title": "" }, { "docid": "15216be75ae184fbd4ac44ede8495715", "score": "0.51634735", "text": "public function withFile($file);", "title": "" }, { "docid": "c6763555368c286b93791b6a2b3612e4", "score": "0.51615554", "text": "public function getMimeTypeHelper(string $mimeType): File\n {\n if ($mimeType === 'jpeg') {\n return new JPEGMimeType();\n }\n }", "title": "" }, { "docid": "1e8517cb86070a06870abc5315576de3", "score": "0.5160412", "text": "protected abstract function extractFromFile(File $f);", "title": "" }, { "docid": "cddf65e4caf6ddf46490ffac1ae4fe16", "score": "0.51603395", "text": "function isImage($file)\n{\n return in_array(pathinfo($file, PATHINFO_EXTENSION), array('jpg', 'JPG'));\n}", "title": "" }, { "docid": "826d86a0df2fe52d1401115c9a086f28", "score": "0.51553065", "text": "function file($name, $value = null, $label = null, $attr = null,\n\t\t$validCode = null, $validMsg = null)\n\t{\n\t\t$xhtml = $this->_input('file', $name, $value, $attr);\n\t\treturn $this->_element($label, $xhtml, $validCode, $validMsg);\n\t}", "title": "" }, { "docid": "f81789a139a3b96394f5ab974eb2f934", "score": "0.5151904", "text": "public static function create($file = null, $filename = null): InputFile\n {\n return new static($file, $filename);\n }", "title": "" }, { "docid": "133095656fd70a79a6928c5d9e00131b", "score": "0.5145159", "text": "function get_filetype_icon($fname) {\n\t$pathinfo = pathinfo($fname);\n\t$extension = (isset($pathinfo['extension'])) ? strtolower($pathinfo['extension']) : '';\n\tif (file_exists(THEME_PATH.'/images/files/'.$extension.'.png')) {\n\t\treturn $extension;\n\t} else {\n\t\treturn 'blank_16';\n\t}\n}", "title": "" }, { "docid": "73b7618c32357c7009574fca78f24054", "score": "0.51436234", "text": "function filename($filename) {\r\n$path_info = pathinfo($filename);\r\nreturn $path_info['filename'];\r\n}", "title": "" }, { "docid": "879235dcb93aaac2254e74a1248f45c1", "score": "0.51312083", "text": "private function getImageMimeType($pFile = '')\n {\n if (File::fileExists($pFile)) {\n if (strpos($pFile, 'zip://') === 0) {\n $pZIPFile = str_replace('zip://', '', $pFile);\n $pZIPFile = substr($pZIPFile, 0, strpos($pZIPFile, '#'));\n $pImgFile = substr($pFile, strpos($pFile, '#') + 1);\n $oArchive = new \\ZipArchive();\n $oArchive->open($pZIPFile);\n if (!function_exists('getimagesizefromstring')) {\n $uri = 'data://application/octet-stream;base64,' . base64_encode($oArchive->getFromName($pImgFile));\n $image = getimagesize($uri);\n } else {\n $image = getimagesizefromstring($oArchive->getFromName($pImgFile));\n }\n } else {\n $image = getimagesize($pFile);\n }\n\n return image_type_to_mime_type($image[2]);\n } else {\n throw new \\Exception(\"File $pFile does not exist\");\n }\n }", "title": "" }, { "docid": "52a5bf7b97dd7c745f9733ad10cb5f2f", "score": "0.51292163", "text": "public function getImage($file_name)\n {\n return $this->bookService->getFile($file_name);\n }", "title": "" }, { "docid": "e8509c361f861899cc3d97d7aaab4dd2", "score": "0.51212007", "text": "public function file($key)\n {\n return new File($this->files->get($key));\n }", "title": "" }, { "docid": "3ef2612e8c18030969130eaaf5ae6af9", "score": "0.51193136", "text": "function get_image_type($name) {\n\t\t$type = FALSE;\n\t\t$bits = explode('.', $name);\n\t\tswitch(array_pop($bits)) {\n\t\t\tcase 'jpg':\n\t\t\t\t$type = 'jpg';\n\t\t\tbreak;\n\t\t\tcase 'png':\n\t\t\t\t$type = 'png';\n\t\t\tbreak;\n\t\t\tcase 'gif':\n\t\t\t\t$type = 'gif';\n\t\t\tbreak;\n\t\t}\n\t\treturn $type;\n\t}", "title": "" }, { "docid": "19a4d1b5940a1ce3fb0a18c060f824c9", "score": "0.51160926", "text": "function get_file_type($file_name,$type=\"extension\")\r\n{\r\n$file_extension = strtolower(substr(strrchr($file_name,\".\"),1));\r\nif($type==\"extension\")\r\n{\r\nreturn $file_extension;\r\n}\r\nelse\r\n{\r\nswitch($file_extension) {\r\ncase \"exe\": $ctype=\"application/octet-stream\"; break;\r\ncase \"zip\": $ctype=\"application/zip\"; break;\r\ncase \"mp3\": $ctype=\"audio/mpeg\"; break;\r\ncase \"mpg\":$ctype=\"video/mpeg\"; break;\r\ncase \"avi\": $ctype=\"video/x-msvideo\"; break;\r\ncase \"jpg\": $ctype=\"image/jpeg\"; break;\r\ncase \"jpeg\": $ctype=\"image/jpeg\"; break;\r\ncase \"gif\": $ctype=\"image/gif\"; break;\r\ncase \"png\": $ctype=\"image/png\"; break;\r\ndefault:\r\n$ctype=\"image/jpeg\"; break;\r\n}\r\nreturn $ctype;\r\n}\r\n}", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.5107774", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.5107774", "text": "public function getFile();", "title": "" }, { "docid": "68b3e1df4581fe1b497e47a35b13db8b", "score": "0.5106764", "text": "public static function createFromResource($filename, $fileHandler)\n {\n $header = new FileHeader();\n\n $data = unpack(\"nmagicNumber/C1compressionMethod/C1flags/LmodificationTime/C1extraFlags/C1os\", fread($fileHandler, 10));\n\n // check magic number and compression method\n if (self::MAGIC_NUMBER !== $data['magicNumber'] ||\n self::COMPRESSION_METHOD_DEFLATE !== $data['compressionMethod']) {\n throw new FileCorruptedException($filename);\n }\n\n $header\n ->setCompressionMethod($data['compressionMethod'])\n ->setFlags($data['flags'])\n ->setExtraFlags($data['extraFlags'])\n ->setModificationTimeFromUnixEpoch($data['modificationTime'])\n ->setOperatingSystem($data['os']);\n\n // if FLG.FEXTRA set\n if (($header->getFlags() & self::FLAGS_EXTRA) === self::FLAGS_EXTRA) {\n $extraFieldData = unpack(\"C2subfield/vlength\", fread($fileHandler, 10));\n\n $header\n ->setExtraSubfields($extraFieldData['subfield1'], $extraFieldData['subfield2'])\n ->setExtraData(fread($fileHandler, $extraFieldData['length']));\n }\n\n // if FLG.FNAME set\n if (($header->getFlags() & self::FLAGS_NAME) === self::FLAGS_NAME) {\n $header->setOriginalFilename(self::readString($fileHandler));\n }\n\n // if FLG.FCOMMENT set\n if (($header->getFlags() & self::FLAGS_COMMENT) === self::FLAGS_COMMENT) {\n $header->setComment(self::readString($fileHandler));\n }\n\n // if FLG.FHCRC set\n if (($header->getFlags() & self::FLAGS_HCRC) === self::FLAGS_HCRC) {\n $crcData = unpack('vcrc', fread($fileHandler, 2));\n $header->setCrc16($crcData['crc']);\n }\n\n return $header;\n }", "title": "" }, { "docid": "27a604096ab73331043691725b1b461a", "score": "0.5096291", "text": "public function file_create(string $filename, string $mimetype = null, string $postname = null): CURLFile\n {\n return curl_file_create($filename, $mimetype, $postname);\n }", "title": "" }, { "docid": "62175fed9d4f67032d0cbadfead9a6d9", "score": "0.5090772", "text": "function determineFileType($decodedImg) : string\n {\n $f = finfo_open();\n $mimeType = finfo_buffer($f, $decodedImg, FILEINFO_MIME_TYPE);\n //$this->adapter->log(MODX_LOG_LEVEL_ERROR,'MIME_Type: '.$mimeType);\n switch($mimeType) {\n case 'image/png':\n $filename = 'uploaded-image.png';\n break;\n case 'image/jpeg':\n $filename = 'uploaded-image.jpg';\n break;\n default:\n $this->commerce->modx->sendRedirect($this->productUrl . '?cim_err=2');\n return false;\n }\n\n return $filename;\n }", "title": "" }, { "docid": "49d84d4b85439a75c7d874d8db1135bf", "score": "0.50828445", "text": "public static function typeFromUpload($file) {\n \n switch ($_FILES['file']['type']) {\n \n case 'image/jpeg':\n case 'image/jpg':\n case 'image/pjpeg':\n return 'jpg';\n break;\n \n case 'image/png':\n case 'image/x-png':\n return 'png';\n break;\n \n case 'image/gif':\n return 'gif';\n break;\n \n default:\n return FALSE;\n break;\n \n }\n }", "title": "" }, { "docid": "575df252885f7f7053247f9d324e47fd", "score": "0.5080941", "text": "public function open(string $image);", "title": "" }, { "docid": "bfa3b02259e3088320dd5fc953b3d15a", "score": "0.5079102", "text": "public static function createFromFile($filename, $mime_type = null)\n\t{\n\t\tif (file_exists($filename)) {\n\t\t\treturn new static(new SymfonyFile($filename, false), $mime_type);\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "da1a70de82312b3dff1a233ef0867fd5", "score": "0.50785995", "text": "public static function convert($fn, $destination, $name) {\n\t\t//if (! (fileTypeConverter::controlIfFileExists($fn))){ return fileTypeConverter::FNE;}\n\t\ttry{\n\t\t\t$imagick = new Imagick();\n\t\t\t// maggiore qualita' immagine\n\t\t\t$imagick->setResolution(150, 150);\n\t\t\t// aggiusta immagine\n\t\t\t//$imagick = $imagick->flattenImages();\n\t\t\t$imagick->readImage($fn);\n\t\t\t$imagick->writeImages($destination . $name . \".jpeg\", false);\n\t\t\t$result = true;\n\t\t}catch(Exception $e){\n\t\t\t$result = $e->getMessage();\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "334c6b3f7340dd11d3942a116a1f5100", "score": "0.5074806", "text": "function filename($filename) {\n\t$path_info = pathinfo($filename);\n\treturn $path_info['filename'];\n}", "title": "" }, { "docid": "e731b14f14fcea6589f2b4a3f4039ba9", "score": "0.50630766", "text": "function setImageFormat($file, $format) {\n\t\t$filename = $_SERVER['DOCUMENT_ROOT'] . $file;\n\t\t$image = new Imagick();\n\t\t$image->readImage(\"$filename\");\n\t\t$image->setImageFormat($format);\n\t\t$new_filename = $filename . \".\" . strtolower($format);\n\t\t$image->setFilename($new_filename);\n\t\t$image->writeImage(\"$new_filename\");\n\t\t$image->destroy();\n\t\treturn $new_filename;\n\t}", "title": "" }, { "docid": "1c99f21f82bc049666298136c41e23fa", "score": "0.50561595", "text": "public static function get_proper_file($filename, $import_type) {\n if ($import_type == 'new') {\n $import_type = 'tmp';\n } else {\n $import_type = 'feed';\n }\n\n return (string)\"{$import_type}/{$filename}\";\n }", "title": "" }, { "docid": "c3ed360bdf3589280ccc1192fcf631cf", "score": "0.5054991", "text": "function LoadImage($image){\n\t$ext = GetFileExtension($image);\n\tif($ext == 'jpg' || $ext == 'jpeg'){$image = imageCreateFromJpeg('images/' . $image);}\n\telseif($ext == 'png'){$image = imageCreateFromPng('images/' . $image);}\n\telseif($ext == 'bmp'){$image = imageCreateFromBmp('images/' . $image);}\n\telse{return null;}\n\treturn $image;\n}", "title": "" }, { "docid": "ed4dcb03bafbef80beeaefe1e1fe01d5", "score": "0.5052745", "text": "private function fileType($image)\n {\n if ($image instanceof UploadedFile) {\n return base64_encode(file_get_contents($image->path()));\n }\n\n return $image;\n }", "title": "" }, { "docid": "14b1febe46529fe435bd1f1ac15275d2", "score": "0.5052465", "text": "private function _getMimeType($filename)\n\t{\n\t\t$extension = pathinfo($filename, PATHINFO_EXTENSION);\n\n\t\tif (isset(self::$_mimeTypes[$extension])) {\n\t\t\treturn self::$_mimeTypes[$extension];\n\n\t\t} else if (function_exists('mime_content_type')) {\n\t\t\treturn mime_content_type($filename);\n\n\t\t} else if (function_exists('finfo_file')) {\n\t\t\t$fh = finfo_open(FILEINFO_MIME);\n\t\t\t$mime = finfo_file($fh, $filename);\n\t\t\tfinfo_close($fh);\n\t\t\treturn $mime;\n\n\t\t} else if ($image = getimagesize($filename)) {\n\t\t\treturn $image[2];\n\n\t\t} else {\n\t\t\treturn 'application/octet-stream';\n\t\t}\n\t}", "title": "" }, { "docid": "773118e6751134ddc45ea105dc3faa45", "score": "0.5047531", "text": "function imageSWF() {\n\n /* parse arguments */\n $numargs = func_num_args();\n $image = func_get_arg(0);\n $swfname = \"\";\n if($numargs > 1) $swfname = func_get_arg(1);\n\n /* image must be in jpeg and\n convert jpeg to SWFBitmap\n can be done by buffering it */\n ob_start();\n imagejpeg($image);\n $buffimg = ob_get_contents();\n ob_end_clean();\n\n $img = new SWFBitmap($buffimg);\n\n $w = $img->getWidth();\n $h = $img->getHeight();\n\n $movie = new SWFMovie();\n $movie->setDimension($w, $h);\n $movie->add($img);\n\n if($swfname)\n $movie->save($swfname);\n else\n $movie->output;\n\n }", "title": "" }, { "docid": "a755a1a8f415cc538f1deb7507f7f848", "score": "0.5044956", "text": "abstract protected function get_file();", "title": "" }, { "docid": "99f679a3306edfb5ea4377a9e6182397", "score": "0.5039361", "text": "function isImage($fileName)\n {\n if ($fileName[0] == \".\" || $fileName[0] == \"..\" ) {return false;}\n $components = explode(\".\", $fileName);\n $length = count($components);\n if ($length == 1) {return false;}\n $suffix = strtolower($components[$length - 1]);\n if ($suffix == 'jpg' || $suffix == 'jpeg') {return true;}\n return false;\n }", "title": "" }, { "docid": "c3802d4f30d057ca1ffd15b9d5dc5f9f", "score": "0.50277454", "text": "public function shortnameToImage($string);", "title": "" }, { "docid": "a075b0d560fea5dee22d469cb4675085", "score": "0.5025545", "text": "public function getFileObjectByUid(int $uid): File\n {\n return $this->resourceFactory->getFileObject($uid);\n }", "title": "" }, { "docid": "15de083b483a847b477851325ba694a1", "score": "0.50217605", "text": "public function getImage() {\n if ( ! $this->image) {\n switch ($this->type) {\n case IMAGETYPE_GIF:\n $this->image = imagecreatefromgif($this->uri);\n break;\n case IMAGETYPE_JPEG:\n $this->image = imagecreatefromjpeg($this->uri);\n break;\n case IMAGETYPE_PNG:\n $this->image = imagecreatefrompng($this->uri);\n break;\n default:\n throw new ImageFileException('Unable to extract the image from the file.');\n break;\n }\n }\n\n return $this->image;\n }", "title": "" }, { "docid": "da5d2ef03039b42301d96e0a1bef69b9", "score": "0.5017231", "text": "function fileTypeMatch ($fdFileInstance) {\r\n\t//BAD FUNCTION\r\n\t//This is not a safe way to check. MIME data is client side and easy to spoof\r\n\t//The PDF, docx etc. is even worse. Security issues MUST be handled. See also Issue 5\r\n\tif ((($fdFileInstance->fdFileExtGet()=='.jpg' || $fdFileInstance->fdFileExtGet() == '.jpeg' ) && ($fdFileInstance->fdFileTypeGet()=='image/jpeg'))||($fdFileInstance->fdFileExtGet()== '.png' && $fdFileInstance->fdFileTypeGet()=='image/png'))\t{\r\n\t\t//echo \"<br/>DEBUG 7\";\r\n\t\treturn 1;\r\n\t}\r\n\telseif ($fdFileInstance->fdFileExtGet()=='.pdf'||$fdFileInstance->fdFileExtGet()=='.docx'||$fdFileInstance->fdFileExtGet()=='.odt'||$fdFileInstance->fdFileExtGet()=='.pptx')\t{\r\n\treturn 1;\r\n\t}\r\n\telse return 0;\r\n}", "title": "" }, { "docid": "2cc0c410707f8513683d7f3456e1d926", "score": "0.5016681", "text": "private function createFileObject($filename)\n {\n if (!is_string($filename)) {\n throw new \\InvalidArgumentException(sprintf(\n '%s: expects a string argument; received \"%s\"',\n __METHOD__,\n (is_object($filename) ? get_class($filename) : gettype($filename))\n ));\n } else if (!file_exists($filename)) {\n throw new FileNotFoundException($filename, 'file does not exist, or symbolic link is pointing to non-existing file.');\n }\n \n $this->fileObject = new SplFileObject($filename);\n }", "title": "" }, { "docid": "f27528914bb4f9b8376919d97c8822cf", "score": "0.5014804", "text": "function image_gd_open($file, $extension) {\n $extension = str_replace('jpg', 'jpeg', $extension);\n $open_func = 'imageCreateFrom'. $extension;\n if (!function_exists($open_func)) {\n return FALSE;\n }\n return $open_func($file);\n}", "title": "" }, { "docid": "2af4633393759a3eda31973095f3f38e", "score": "0.5013897", "text": "protected function convert_fp(mixed $fp): string {\n\t\t$content = '';\n\t\twhile (!feof($fp)) {\n\t\t\t$content .= fread($fp, 1024);\n\t\t}\n\t\treturn $this->convert_raw($content);\n\t}", "title": "" }, { "docid": "f0f8aca1c2a5a58928877ba975d24239", "score": "0.50086504", "text": "public function convert($filepath, $namespace);", "title": "" }, { "docid": "dea593f4651dbcc735f3f8cc85cfa9a9", "score": "0.5007696", "text": "protected function makeImage()\n {\n\n return new Image(['name' => $this->makeFileName()]); // make a name\n\n }", "title": "" } ]
67ebaa4e06b2414943bcef5e9f3bdace
only call call_user_func_array if the decorated object method exists
[ { "docid": "37735d4540e6c52ab82ec38537f53661", "score": "0.62288094", "text": "public function __call( $method, $arguments) {\n // or if the decorated object is itself a decorator. If the object is NOT\n // a decorator, then $this->_decorated->$method will not exist (otherwise\n // the first part of the OR test would have succeeded). This will cause php\n // to fire a warning \"call_user_func_arra() invalid call back\".\n // Instead, in such a case, we will simply fire an exception\n // if the decorated object is itself a decorator, then there is no problem\n // as it will have a __call() method, and call_user_func_array will be happy with\n // that, not firing any warning\n if ( method_exists( $this->_decorated, $method) || $this->_decoratedIsDecorator) {\n return call_user_func_array( array($this->_decorated, $method), $arguments);\n } else {\n // temporary (yeah, right) workaround for http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=27923\n if($method == 'getError' && !empty($this->_decorated) && $this->_decorated instanceof JDatabase) {\n return false;\n }\n throw new ShlException( 'Method ' . $method . ' not defined');\n }\n }", "title": "" } ]
[ { "docid": "b899821016c1b7ae93742e1cdc199ee3", "score": "0.7002208", "text": "function call_user_method_array ($method_name, &$obj, array $params) {}", "title": "" }, { "docid": "9ea25996e4ae9998095a8892a377de1d", "score": "0.64069754", "text": "protected function _ops()\n {\n if (method_exists($this, $this->args[0]))\n call_user_func_array([$this, $this->args[0]], array_slice($this->args, 1));\n }", "title": "" }, { "docid": "6d65b79d502c661117df026dc2f96c10", "score": "0.61560845", "text": "public function __invoke()\n {\n return call_user_func_array($this->callable, func_get_args());\n }", "title": "" }, { "docid": "c7ff591aaed8dcb6d1f90466dd142dca", "score": "0.6075185", "text": "function call_user_method ($method_name, &$obj, $parameter = null, $_ = null) {}", "title": "" }, { "docid": "6c53dc848b031607b34a451e0858c652", "score": "0.59299135", "text": "function call_user_func_array($func, $args) {\n\t\t$argString = '';\n\t\t$comma = '';\n\t\tfor ($i = 0; $i < count($args); $i ++) {\n\t\t\t$argString .= $comma . \"\\$args[$i]\";\n\t\t\t$comma = ', ';\n\t\t}\n\n\t\tif (is_array($func)) {\n\t\t\t$obj = &$func[0];\n\t\t\t$meth = $func[1];\n\t\t\tif (is_string($func[0])) {\n\t\t\t\teval(\"\\$retval = $obj::\\$meth($argString);\");\n\t\t\t} else {\n\t\t\t\teval(\"\\$retval = \\$obj->\\$meth($argString);\");\n\t\t\t}\n\t\t} else {\n\t\t\teval(\"\\$retval = \\$func($argString);\");\n\t\t}\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "6554ebe83c43c0e6152e661c55382458", "score": "0.5909004", "text": "public function __call($method, $args);", "title": "" }, { "docid": "44fa9ce57309410b0dc971d587c4ad3b", "score": "0.59050876", "text": "public function __invoke(): bool;", "title": "" }, { "docid": "ca6d49562ddda5c5b671b11cfa1b9e10", "score": "0.5821487", "text": "public function __invoke(...$args) : bool;", "title": "" }, { "docid": "9e5c729196c87672e510aa1fc3b97294", "score": "0.58085376", "text": "function __call($func,$args){\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "62cc5225bb41801001377bf2403ed87c", "score": "0.57817054", "text": "private static function isCallableArrayObj(array $val, $opts)\n {\n if ($opts & self::IS_CALLABLE_SYNTAX_ONLY) {\n return true;\n }\n if (\\method_exists($val[0], $val[1])) {\n return true;\n }\n return $opts & self::IS_CALLABLE_NO_CALL\n ? false\n : \\method_exists($val[0], '__call');\n }", "title": "" }, { "docid": "fef06503a1999ee3945f3390e56f151a", "score": "0.56889075", "text": "public function __call($method, $params);", "title": "" }, { "docid": "4ade7fbb8419f5693194552b7d8bb496", "score": "0.5653135", "text": "public function __call($method, $parametersArray);", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.56207913", "text": "public function __invoke();", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.56207913", "text": "public function __invoke();", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.56207913", "text": "public function __invoke();", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.56207913", "text": "public function __invoke();", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.56207913", "text": "public function __invoke();", "title": "" }, { "docid": "a01175a4f5de3806d3e332e9bc681246", "score": "0.5615215", "text": "function forward_static_call_array (callable $function, array $parameters) {}", "title": "" }, { "docid": "48db63a32cd85051986d5754fa8ba8a2", "score": "0.56083506", "text": "protected function callRestrictedMethod($object, $method, array $args = []): mixed\n {\n $reflectionMethod = new ReflectionMethod($object, $method);\n $reflectionMethod->setAccessible(true);\n\n return $reflectionMethod->invokeArgs($object, $args);\n }", "title": "" }, { "docid": "2e7da3bfa725d61fea82d4dc1adad404", "score": "0.5607798", "text": "public function __call($method, $parms);", "title": "" }, { "docid": "202fe2f4515fe65b5dcc0ea1467b6517", "score": "0.5606024", "text": "function array_invoke($arr, $method_name)\n{\n $output = array();\n foreach($arr as $key => $obj)\n {\n if(!is_object($obj)) \n\t{\n\t Throw new Exception(\"$key is not an object\");\n\t}\n if(!method_exists($obj, $method_name))\n\t{\n\t Throw new Exception(\"object does not have method $method_name\");\n\t}\n $output[$key] = $obj->$method_name;\n }\n}", "title": "" }, { "docid": "87e2beebe1aeed6fb2d7fbd165d93dc6", "score": "0.5605743", "text": "static function apply(){\n\t\t$args = func_get_args();\n\t\t$method = array_shift($args);\n\t\ttry{\n\t\t\tcall_user_func_array(array('self',$method),$args);\n\t\t\treturn true;\n\t\t}catch(InputException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "9c6c7fe034994b9c04b89db79b094920", "score": "0.55858606", "text": "function __call($method, $args)\n\t{\n\t\treturn call_user_func_array(array($this->criteria, $method), $args);\n\t}", "title": "" }, { "docid": "a80a3d0d013ccf02dc845f427444a30e", "score": "0.5576858", "text": "function call_user_func_array (callable $callback, array $param_arr) {}", "title": "" }, { "docid": "8c3175cb37275bef848e7c0a065e7b4c", "score": "0.5542453", "text": "public function getMethodCalls();", "title": "" }, { "docid": "80bf2ae8f9e41376046e3114113d0b8e", "score": "0.5533681", "text": "public function __call($method, $args) {\r\n\t\tif(method_exists($this, $method)) {\r\n\t\t\tif(!$this->isBound()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn call_user_func_array(array($this, $method), $args);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "fcd9507ec5c9952be5672597b7534bb1", "score": "0.5521622", "text": "public function __call(string $method, array $args);", "title": "" }, { "docid": "e4db6274f9f197634a1d436712abe49a", "score": "0.54864657", "text": "abstract public function __invoke();", "title": "" }, { "docid": "02fe33acec65003bbff6a3660aa9bf43", "score": "0.5484192", "text": "function __call($method, $args){\n if(!($this->manager && method_exists($this->manager, $method))) {\n if(substr($method,0,4)=='set_' && in_array($key = substr($method, 4), $this->_accessibles))\n return $this->__set_accessibles($key, $args[0]);\n return;\n } \n array_unshift($args, $this);\n return call_user_func_array(array($this->manager, $method), $args);\n }", "title": "" }, { "docid": "a153fd1d5371b5f5e7c2f6b6723f4921", "score": "0.5462044", "text": "public function __call($method, $arguments);", "title": "" }, { "docid": "a153fd1d5371b5f5e7c2f6b6723f4921", "score": "0.5462044", "text": "public function __call($method, $arguments);", "title": "" }, { "docid": "bc1d8c472fca34847677551ffa0d4084", "score": "0.5458666", "text": "function call_user_func_array($callback, $param_arr)\n{\n}", "title": "" }, { "docid": "1686ae62a916c3f9261c0e1c19448752", "score": "0.54580843", "text": "function __call($funcName, $tArgs) {\n\t\t foreach($this->extendedClasses as &$object) {\n\t\t if(method_exists($object, $funcName)) return call_user_func_array(array($object, $funcName), $tArgs);\n\t\t }\n\t\t throw new Exception(\"The $funcName method doesn't exist\");\n\t\t}", "title": "" }, { "docid": "ba6f6333766f452aa863e4b48b520003", "score": "0.5447562", "text": "public function __call($method, $args){\n if($method == 'setPhoneNumber'){\n // call_user_func_array takes calleable and arguments here $this is object from that called function\n // setName is a method of that object and $args is the arguments array passed setName function\n // return call_user_func_array([$this , 'setNumber'], $args);\n return call_user_func_array([$this , 'setNumber'],$args);\n }else if($method == 'getNumber'){\n return $this->number;\n }\n echo \"No Method Found Named \\\"$method \\\" \";\n }", "title": "" }, { "docid": "30fa82ceef10f02008df4908e0917456", "score": "0.54327154", "text": "function __call( $method, $args ){\n\t\t\t\t\n\t\t\t\tif( is_array( $this->tools ) ){\n\t\t\t\t\t\n\t\t\t\t\t//Procura em todos os objetos pelo metodo\n\t\t\t\t\tforeach( $this->tools as $tool ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Onde achar o metodo primeiro, executa\n\t\t\t\t\t\tif( method_exists( $tool, $method ) ){\n\t\t\t\t\t\t\treturn call_user_func_array( array( $tool, $method), $args);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n \n\t\t\t\t//Se não foi localizado, retorna um erro de Metodo Não localizado\n\t\t\t\tthrow( new BadMethodCallException() );\n\t\t\t}", "title": "" }, { "docid": "be6e606de5e5e8eb92027e25e5f58794", "score": "0.54269886", "text": "public function __invoke($args = null) {}", "title": "" }, { "docid": "13cb014f69e040131928d4c30b893013", "score": "0.5426471", "text": "public function __invoke(...$params)\n {\n $reflection = $this->getReflection();\n $params = $params ?: $this->getParameters();\n\n $this->verify($reflection, $params);\n\n return call_user_func_array($this->callable, $params);\n }", "title": "" }, { "docid": "39782f86e2929621fad7dca164bf9843", "score": "0.54205334", "text": "public function __call($method, array $arguments);", "title": "" }, { "docid": "6dfb88e8107ac3ae4c86dff901dd03ee", "score": "0.5411985", "text": "protected function callProtectedMethod($obj, $method, array $args=[])\n {\n $reflection = new \\ReflectionClass(get_class($obj));\n $method = $reflection->getMethod($method);\n $method->setAccessible(true);\n \n return $method->invokeArgs($obj, $args);\n }", "title": "" }, { "docid": "16c93fe340777a3e0db231d93f4f9ee3", "score": "0.5397693", "text": "function drush_op($callable) {\n $args_printed = [];\n $args = func_get_args();\n array_shift($args); // Skip function name\n foreach ($args as $arg) {\n $args_printed[] = is_scalar($arg) ? $arg : (is_object($arg) ? get_class($arg) : gettype($arg));\n }\n\n if (!is_array($callable)) {\n $callable_string = $callable;\n }\n else {\n if (is_object($callable[0])) {\n $callable_string = get_class($callable[0]) . '::' . $callable[1];\n }\n else {\n $callable_string = implode('::', $callable);\n }\n }\n\n if (\\Drush\\Drush::verbose() || \\Drush\\Drush::simulate()) {\n Drush::logger()->debug('Calling {method}({args})', ['method' => $callable_string, 'args' => implode(\", \", $args_printed)]);\n }\n\n if (\\Drush\\Drush::simulate()) {\n return TRUE;\n }\n\n return drush_call_user_func_array($callable, $args);\n}", "title": "" }, { "docid": "9cbec407352c65200440529a9e852743", "score": "0.53972274", "text": "public function __call($func, $argv)\n {\n if (!is_callable($func) || substr($func, 0, 6) !== 'array_')\n {\n throw new \\BadMethodCallException(__CLASS__ . '->' . $func);\n }\n return call_user_func_array($func, array_merge(array($this->getArrayCopy()), $argv));\n }", "title": "" }, { "docid": "3b664e0073713819da4966d8ed0791fd", "score": "0.5384755", "text": "final public function __call($method, $args) {\n\t\treturn call_user_func_array(array($this->base, $method), $args);\n\t}", "title": "" }, { "docid": "b3d80ddc1a4c339b5a7f704d72fb4d2f", "score": "0.53827655", "text": "public function isDecorated();", "title": "" }, { "docid": "073edde6a6dcbd052b2cd07ee0c8fcf9", "score": "0.53681636", "text": "public function test_call() {\n $this->called_methods[] = array('test_call' => array());\n }", "title": "" }, { "docid": "7e3a8b05e0c4af0d146758fcde5f7b03", "score": "0.5364632", "text": "function user_callback($func, $obj=null)\n\t{\n\t\tif ($obj){\n\t\t\tif (!method_exists($obj,$func)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->user_callback_obj = $obj;\n\t\t\t$this->user_callback_func = $func;\n\t\t} else {\n\t\t\tif (!function_exists($func)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->user_callback_obj = null;\n\t\t\t$this->user_callback_func = $func;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "91cc95dfd362b98c1a02a19a80248944", "score": "0.53535056", "text": "public function ifDefined($callable)\n {\n }", "title": "" }, { "docid": "8f9ea0cf234c506d22732a1668c4ad3b", "score": "0.53492004", "text": "public function provideInvoke()\n\t{\n\t\treturn array(\n\t\t\tarray($this),\n\t\t\tarray(new \\stdClass),\n\t\t);\n\t}", "title": "" }, { "docid": "460a370b5654b6b587e43eab2c047765", "score": "0.53467774", "text": "public function __call(string $method, $arguments = null) {}", "title": "" }, { "docid": "f56b00c831a9637fc03f6e99b3206036", "score": "0.5335823", "text": "function cbproxy($rq, $rs, $ap, $cb) {\n //Gb_Log::logDebug(\"klein: call\",$cb);\n if (!class_exists($cb[0])) {\n require(\"controllers\" . DIRECTORY_SEPARATOR . $cb[0] . '.php');\n }\n $refl = new ReflectionMethod($cb[0], $cb[1]);\n if ($refl->isStatic()) {\n //echo $cb[0] . \" --- \" . $cb[1] . \"a=\".var_export($rq,true). \"b=\".var_export($rs,true). \"c=\".var_export($ap, true);\n if (is_callable(array($cb[0], \"initialize\"))) {\n call_user_func(array($cb[0], \"initialize\"), $rq, $rs, $ap);\n }\n if (is_callable(array($cb[0], \"before\"))) {\n if (!call_user_func(array($cb[0], \"before\"), $cb[1], $rq, $rs, $ap)) {\n return;\n }\n }\n call_user_func($cb, $rq, $rs, $ap);\n } else {\n $single = null;\n foreach ( array(\"getSingleton\", \"getInstance\") as $meth) {\n $cb2 = array($cb[0], $meth);\n if (is_callable($cb2)) {\n $single = call_user_func($cb2, $rq, $rs, $ap);\n break;\n }\n }\n if (null === $single) {\n $single = new $cb[0]($rq, $rs, $ap); // construct new Object\n }\n if (is_callable(array($single, \"initialize\"))) {\n call_user_func(array($single, \"initialize\"), $rq, $rs, $ap);\n }\n if (is_callable(array($single, \"before\"))) {\n if (!call_user_func(array($single, \"before\"), $cb[1], $rq, $rs, $ap)) {\n return;\n }\n }\n call_user_func(array($single, $cb[1]), $rq, $rs, $ap);\n }\n}", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.53333515", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "c2bafb357ccd8bb158787cf7098f50ca", "score": "0.53310287", "text": "function drush_call_user_func_array($function, $args = []) {\n if (is_array($function)) {\n // $callable is a method so always use CUFA.\n return call_user_func_array($function, $args);\n }\n\n switch (count($args)) {\n case 0: return $function(); break;\n case 1: return $function($args[0]); break;\n case 2: return $function($args[0], $args[1]); break;\n case 3: return $function($args[0], $args[1], $args[2]); break;\n case 4: return $function($args[0], $args[1], $args[2], $args[3]); break;\n case 5: return $function($args[0], $args[1], $args[2], $args[3], $args[4]); break;\n case 6: return $function($args[0], $args[1], $args[2], $args[3], $args[4], $args[5]); break;\n case 7: return $function($args[0], $args[1], $args[2], $args[3], $args[4], $args[5], $args[6]); break;\n case 8: return $function($args[0], $args[1], $args[2], $args[3], $args[4], $args[5], $args[6], $args[7]); break;\n case 9: return $function($args[0], $args[1], $args[2], $args[3], $args[4], $args[5], $args[6], $args[7], $args[8]); break;\n default: return call_user_func_array($function,$args);\n }\n}", "title": "" }, { "docid": "42477d4ecfc29ee801dbc690c7f85a0a", "score": "0.53294665", "text": "function __call($func, $params)\n\t{\n\t\treturn call_user_func_array(array($this->it, $func), $params);\n\t}", "title": "" }, { "docid": "0cdee272cf4cb6e03fc771ea52eec7ab", "score": "0.5305419", "text": "public function isCallable()\n {\n \tif(!empty($this->isCallable)) return $this->isCallable;\n \t\n \tif(!class_exists(str_replace(\" \", \"_\", $this->module), true)) return $this->isCallable=false;\n \t\n \t$refl = new ReflectionClass($this->module);\n \tif(!$refl->hasMethod(str_replace(\" \", \"_\", $this->name))) return $this->isCallable=false;\n \t\n \t$m = $refl->getMethod(str_replace(\" \", \"_\", $this->name));\n \tif(!$m->isPublic() || !$m->isStatic()) return $this->isCallable=false;\n \t\n \t$n = $m->getNumberOfParameters();\n \tif($n!=1 && $n!=3) return $this->isCallable=false;\n \t\n \tif(!strpos($m->getDocComment(), \"* @mr:remote\\n\")) return $this->isCallable=false;\n \t\n \t$params = $m->getParameters();\n \t\n \t/* @var $p ReflectionParameter */\n \t\n \t$p = $params[0];\n \tif(!$p->isArray()) return $this->isCallable=false;\n \t\n \t$this->isCallable = true;\n \t$this->methodReflection = $m;\n \t\n \treturn true;\n }", "title": "" }, { "docid": "5482bb2f88c90664b22b687e1d931b7e", "score": "0.5303777", "text": "final public static function isDynamicMethod($value):bool\n {\n return is_array($value) && array_key_exists(0,$value) && array_key_exists(1,$value) && is_object($value[0]) && is_string($value[1]);\n }", "title": "" }, { "docid": "28988e356e602cc720fa109bcef083cf", "score": "0.53034186", "text": "public function magicallyCall()\n {\n return $this->magicallyCall ?? false;\n }", "title": "" }, { "docid": "c64938ac20f9153bd5ba419272c64435", "score": "0.53017753", "text": "private function callValidatorProtectedMethod($method, $args = null)\n {\n $validator = $this->getMockBuilder(\\Illuminate\\Validation\\Validator::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $parser = $this->getMockBuilder(\\Proengsoft\\JsValidation\\Support\\ValidationRuleParserProxy::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $delegated = $this->getMockBuilder(\\Proengsoft\\JsValidation\\Support\\DelegatedValidator::class)\n ->setConstructorArgs([$validator, $parser])\n ->onlyMethods(['callProtected'])\n ->getMock();\n\n $delegated->expects($this->once())\n ->method('callProtected')\n ->with($this->isInstanceOf(\\Closure::class), $method, $this->isType('array'))\n ->willReturn(true);\n\n if (is_array($args)) {\n $v = call_user_func_array([$delegated,$method],$args);\n } else {\n $v = $delegated->$method($args);\n }\n\n $this->assertTrue($v);\n }", "title": "" }, { "docid": "58f1ce0949846c07e64f4c938f057a9c", "score": "0.5287367", "text": "public function __call( $method, $args ){\n return call_user_func_array( array( $this->core, $method ), $args );\n }", "title": "" }, { "docid": "5cace9df22a3d8829409e569e8569be1", "score": "0.5274403", "text": "public function __invoke()\n {\n echo \"I'm not a function, im above that\\n\";\n }", "title": "" }, { "docid": "df01117caced006bd1ad3b9d8eeb5e17", "score": "0.527049", "text": "public function __call($method, $args)\n {\n if ( ! isset($this) || ! is_object($this) )\n return false;\n if ( method_exists( $this, $method ) )\n return call_user_func_array(array($this, $method), $args);\n }", "title": "" }, { "docid": "2219c9cc3708ae4972fbb234b7aaa27a", "score": "0.5266227", "text": "protected function run_user_method(&$object,$method_name,$args=[],$class_name=null)\n\t{\n\t\tif (!($object instanceof EmulatorObject))\n\t\t{\n\t\t\t$this->error(\"Inconsistency in object oriented emulation. A malformed object detected.\",$object);\n\t\t\treturn null;\n\t\t}\n\t\tif ($class_name===null)\n\t\t\t$class_name=$object->classname;\n\t\t\n\t\t$res=$this->run_user_static_method($class_name,$method_name,$args,$object);\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "4b212f650abba38a5912c6ac47c7ffc0", "score": "0.5265197", "text": "public static function ensure_call($content) {\n if ( is_callable($content) ){\n $content = $content();\n } elseif( is_array($content) ) {\n return $content;\n }\n return $content;\n }", "title": "" }, { "docid": "9569189211d0464d3b9d9f36fcf4c0f5", "score": "0.52488303", "text": "public function __invoke()\r\n {\r\n call_user_func_array($this->callback->bindTo($this), [$this]);\r\n }", "title": "" }, { "docid": "76d94fcea4d592503aff653799681f50", "score": "0.52480257", "text": "public function __invoke($arguments = []);", "title": "" }, { "docid": "61d33003500d8ab05872574af2a2378d", "score": "0.52376735", "text": "public function __call($methodName, $args)\n {\n echo 'No This Method';\n }", "title": "" }, { "docid": "61d33003500d8ab05872574af2a2378d", "score": "0.52376735", "text": "public function __call($methodName, $args)\n {\n echo 'No This Method';\n }", "title": "" }, { "docid": "61d33003500d8ab05872574af2a2378d", "score": "0.52376735", "text": "public function __call($methodName, $args)\n {\n echo 'No This Method';\n }", "title": "" }, { "docid": "d119f2dbc87cd020edb64116180e8a16", "score": "0.5236648", "text": "public static function check_array($array) {\n if (!is_null($array)) {\n if (is_array($array)) {\n if (isset($array[0]) && isset($array[1])) {\n return method_exists($array[0], $array[1]);\n }\n }\n }\n }", "title": "" }, { "docid": "667953fa07c6de1f9dadad5105a19596", "score": "0.5232875", "text": "public function __call($helper, $args);", "title": "" }, { "docid": "d2b7a94c7bd6a9339475d07e7fffb305", "score": "0.5225317", "text": "protected function callCallable()\n {\n $variables = array_values($this->getParametersWithoutDefaults());\n return call_user_func_array($this->getOption('_call'), $variables);\n }", "title": "" }, { "docid": "9be318dbeb578df26e1198072ce9f154", "score": "0.52236116", "text": "public function is_callable($x)\n\t{\n\t\tif (is_string($x))\n\t\t{\n\t\t\tif (strpos($x,\"::\")!==false)\n\t\t\t{\n\t\t\t\tlist($classname,$methodname)=explode(\"::\",$x);\n\t\t\t\treturn ($this->class_exists($classname) and $this->method_exists($classname, $methodname));\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn parent::is_callable($x);\n\t\t}\n\t\telseif (is_array($x) and count($x)==2 and isset($x[0]) and isset($x[1]))\n\t\t{\n\t\t\tif (is_string($x[0]))\n\t\t\t\treturn $this->class_exists($x[0]) and $this->method_exists($x[0], $x[1]);\n\t\t\telse\n\t\t\t\treturn $this->is_object($x[0]) and $this->method_exists($x[0],$x[1]);\n\t\t}\n\t\telse \n\t\t\treturn parent::is_callable($x);\n\t}", "title": "" }, { "docid": "22ac794f336b70f23c28705783513880", "score": "0.5222592", "text": "public static function callMethod()\n {\n $newClass = Injector::resolve(self::$aliasIndex);\n return call_user_func_array(array($newClass, self::$name), self::$arguments);\n }", "title": "" }, { "docid": "7ec8b5028844bf008e9f5cfd886d2653", "score": "0.52224565", "text": "protected function runCallable()\n {\n $callable = $this->action['uses'];\n\n if ($this->isSerializedClosure()) {\n $callable = unserialize($this->action['uses'])->getClosure();\n }\n\n return $callable(...array_values($this->resolveMethodDependencies(\n $this->parametersWithoutNulls(), new ReflectionFunction($callable)\n )));\n }", "title": "" }, { "docid": "71399a662c1688982a2d368b20a06643", "score": "0.5219408", "text": "function extension_invoke() {\n $args = func_get_args();\n $extension = array_shift($args);\n $function = array_shift($args);\n \n if (function_exists($extension . '_' . $function)) {\n log_debug('extension_invoke: ' . $extension . '_' . $function);\n return call_user_func_array($extension . '_' . $function, $args);\n }\n}", "title": "" }, { "docid": "8cc975d3de20744d28923cdfba0f279f", "score": "0.52142876", "text": "public function isMethod()\n {\n return !is_null($this->propertyArgs);\n }", "title": "" }, { "docid": "5a678d717baf6af03fd7e8637a35b638", "score": "0.52093375", "text": "function objects_map(array $objects, $method, array $args = [])\n {\n return array_map(function ($object) use ($method, $args) {\n is_true_or_fail(method_exists($object, $method), sprintf(\n 'Class `%s` does not have a method `%s`',\n get_class($object),\n $method\n ), \\BadMethodCallException::class);\n\n return call_user_func_array([$object, $method], $args);\n }, $objects);\n }", "title": "" }, { "docid": "22a67d1109ae925abc8417e1de9f1506", "score": "0.5202895", "text": "public function test_use_array_callback_as_handlers() {\n\t\t$k = $this->kernel;\n\t\t$k->container->didef('emptyhandler', 'nofw/tests/emptyhandler.txt');\n\t\t$obj = $k->container->make('emptyhandler');\n\t\t_iCanHandle('testphase4', array(&$obj, 'dummyfunc'));\n\t\t$svc = $k->whoCanHandle('testphase4');\n\t\t$this->assertTrue( is_array($svc) );\n\t\t$this->assertTrue( is_object($svc[0]) );\n\t\t$this->assertSame( $obj, $svc[0] );\n\t\t$this->assertEquals( 'dummyfunc', ($svc[1]) );\n\t}", "title": "" }, { "docid": "cf703b5c5eacdbedfcdde1d0f4d4bb5d", "score": "0.5195033", "text": "function __invoke()\n {\n }", "title": "" }, { "docid": "f925fa5ced69b0272fdb4e9d75af0fe9", "score": "0.51944554", "text": "abstract public function invokeAll();", "title": "" }, { "docid": "4e8eb9540053bdf816fdebd84ac43893", "score": "0.5190544", "text": "abstract public function __call($name,$args);", "title": "" }, { "docid": "8659b75609777fc14526112c1fd2f430", "score": "0.51842695", "text": "public function __call( $method, $args )\r\n\t\t{\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif ( is_callable( $this->$method ) ) \r\n\t\t\t{\r\n\t\t\t\t$func = $this->$method;\r\n\t\t\t\treturn call_user_func_array( $func, $args );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tthrow new MemberAccessException( 'Method ' . $method . ' not exists' );\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "e26bc9da5760ad9a326a5e054171c832", "score": "0.5181983", "text": "public function call(array $args)\n {\n if (is_object($this->class) === false && class_exists($this->class) === false) {\n throw new LogicException(\"Controller class '$this->class' not found.\");\n }\n\n if (!method_exists($this->class, $this->name)) {\n throw new LogicException(sprintf(\n \"The method '%s' not exist in controller '%s'.\",\n $this->name,\n is_object($this->class) ? get_class($this->class) : $this->class\n )\n );\n }\n\n //var_dump(array_values($args));exit;\n\n $callable = [\n is_string($this->class) ? new $this->class() : $this->class,\n $this->name\n ];\n\n return call_user_func_array($callable, $args);\n }", "title": "" }, { "docid": "294d661c3374bb6ac34f67fae4855a68", "score": "0.5178323", "text": "public function isCallAllowed($method, Friends_FriendInterface $caller);", "title": "" }, { "docid": "fbafcb1ba425fa4442bca943d04550c6", "score": "0.5178203", "text": "function __call($method, $arguments)\n\t{\n\t\tif( in_array($arguments[0], array('statuses/public_timeline', 'statuses/friends_timeline', 'statuses/user_timeline', 'show', 'replies', 'friends', 'followers')) )\n\t\t{\t\n\t\t\treturn $this->cache->library('twitter', 'call', $arguments, $this->CI->settings->item('twitter_cache') * 60);\n\t\t}\n\t\telse // Run as normal without worrying about a cache\n\t\t{\n\t\t\tif (is_object($this->CI->twitter->$method) && method_exists($this->CI->twitter, $method))\n\t\t\t{\n\t\t\t\treturn call_user_func_array(array($this->CI->twitter, $method), $arguments);\n\t\t\t}\n\t\t\telse // If the method doesn't exist use the call method\n\t\t\t{\n\t\t\t\treturn call_user_func_array(array($this->CI->twitter, 'call'), $arguments);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ec8b8c022a6ec46e8544ef0e96b72061", "score": "0.51566553", "text": "private static function _invokeObject($callback, $args = null, $msg = null)\n { \n $segments = explode('@', $callback);\n $controller = isset($segments[0]) && !empty($segments[0]) ? $segments[0] : DEFAULT_CONTROLLER; \n $action = isset($segments[1]) && !empty($segments[1]) ? $segments[1] : DEFAULT_ACTION;\n $obj = new $controller($msg); \n\n if (method_exists($obj, $action)) { \n $args = !is_array($args) ? array($args) : $args;\n // before\n if(method_exists($obj, 'before')) {\n call_user_func_array(array($obj, 'before'), array_filter($args)); \n }\n // goal\n call_user_func_array(array($obj, $action), array_filter($args)); \n // after\n if(method_exists($controller, 'after')) {\n call_user_func_array(array($obj, 'after'), array_filter($args)); \n }\n return true;\n } else {\n echo 'Action not found : ' . $controller . '->' . $action;\n return false;\n }\n }", "title": "" }, { "docid": "ef20acd46a1a8dbb7a8132fb652e1ede", "score": "0.5151729", "text": "public function run_method(&$object,$method_name,$args=[],$class_name=null)\n\t{\n\t\tif ($object instanceof EmulatorObject)\n\t\t\treturn $this->run_user_method($object,$method_name,$args,$class_name);\n\t\telseif (is_object($object))\n\t\t\treturn $this->run_core_static_method(get_class($object),$method_name,$args,$object);\n\t\t\t// return call_user_func_array(array($object,$method_name), $args);\n\t\telse\n\t\t\t$this->error(\"Can not call method '{$method_name}' on a non-object.\\n\",$object);\n\t}", "title": "" }, { "docid": "04b250d78a0572b8879fc9f856b02c99", "score": "0.51489174", "text": "private static function isCallableArray(array $val, $opts)\n {\n if (\\is_callable($val, true) === false) {\n return false;\n }\n $regexLabel = '/^[a-zA-Z_\\x80-\\xff][a-zA-Z0-9_\\x80-\\xff]*$/';\n if (\\preg_match($regexLabel, $val[1]) !== 1) {\n return false;\n }\n if (\\is_object($val[0])) {\n return self::isCallableArrayObj($val, $opts);\n }\n if ($opts & self::IS_CALLABLE_OBJ_ONLY) {\n return false;\n }\n return self::isCallableArrayString($val, $opts);\n }", "title": "" }, { "docid": "384a7b1dca73c4eae65ef42e3f065336", "score": "0.51414335", "text": "public function __invoke(callable $callable): ReflectionFunctionAbstract;", "title": "" }, { "docid": "4590838f3de8601c5b3f63f78c25d5c3", "score": "0.51400226", "text": "function __call($method, array $args) {\n return call_user_func_array(array($this->client, $method), $args);\n }", "title": "" }, { "docid": "4ded43aeb7dddd028f27bc8a49368066", "score": "0.5130984", "text": "public function testRouteCanDispatchArrayBasedCallableWithNameToCorrectStrategy()\n {\n $route = new Route;\n\n $container = $this->getMock('Interop\\Container\\ContainerInterface');\n $strategy = $this->getMock('League\\Route\\Strategy\\StrategyInterface');\n $request = $this->getMock('Psr\\Http\\Message\\ServerRequestInterface');\n $response = $this->getMock('Psr\\Http\\Message\\ResponseInterface');\n $callable = ['League\\Route\\Test\\Asset\\InvokableController', '__invoke'];\n $instance = new Asset\\InvokableController;\n\n $container->expects($this->once())->method('has')->with('League\\Route\\Test\\Asset\\InvokableController')->will($this->returnValue(true));\n $container->expects($this->once())->method('get')->with('League\\Route\\Test\\Asset\\InvokableController')->will($this->returnValue($instance));\n $strategy->expects($this->once())->method('dispatch')->with([$instance, '__invoke'], [])->will($this->returnValue($response));\n\n $route->setContainer($container);\n $route->setStrategy($strategy);\n $route->setCallable($callable);\n\n $actual = $route->dispatch($request, $response, []);\n\n $this->assertSame($response, $actual);\n }", "title": "" }, { "docid": "b7d1968e3c3b1b5b1e64630160520410", "score": "0.5127858", "text": "public function hook_by_reflection() {\n\t\t$current_class = get_class( $this );\n\t\tif ( ! in_array( $current_class, $this->_classes_hooked, true ) ) {\n\t\t\t$this->_classes_hooked[] = $current_class;\n\n\t\t\t$reflector = new \\ReflectionObject( $this );\n\t\t\tforeach ( $reflector->getMethods() as $method ) {\n\t\t\t\t$doc = $method->getDocComment();\n\t\t\t\t$arg_count = $method->getNumberOfParameters();\n\t\t\t\tif ( preg_match_all( '#\\* @(?P<type>filter|action)\\s+(?P<name>[a-z0-9\\-\\._]+)(?:,\\s+(?P<priority>\\d+))?#', $doc, $matches, PREG_SET_ORDER ) ) {\n\t\t\t\t\tforeach ( $matches as $match ) {\n\t\t\t\t\t\t$type = $match['type'];\n\t\t\t\t\t\t$name = $match['name'];\n\t\t\t\t\t\t$priority = empty( $match['priority'] ) ? 10 : intval( $match['priority'] );\n\t\t\t\t\t\t$callback = array( $this, $method->getName() );\n\t\t\t\t\t\tcall_user_func( 'add_' . $type, $name, $callback, $priority, $arg_count );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4332fc0503e8d96231cd3f432781829e", "score": "0.51260316", "text": "public function hookMethod()\n {\n }", "title": "" }, { "docid": "305994993f60654d5107e6ce38a7a469", "score": "0.51253545", "text": "public function __invoke()\n {\n\n echo \"this is invoke method \";\n }", "title": "" }, { "docid": "369587731f3791e89a05c0ba6296a3db", "score": "0.5122088", "text": "function method($name) {\n $args = array_slice(func_get_args(), 1);\n return function($obj) use($name, $args) {\n return call_user_func_array(array($obj, $name), $args);\n };\n}", "title": "" }, { "docid": "3fe433a0ef941ae3bbd8ecb60fe04060", "score": "0.51209587", "text": "private function callMethod()\n {\n $reflection = new \\ReflectionClass($this->instance);\n $method = $this->getMethod($reflection, $this->callMethod);\n\n return $method->invokeArgs($this->instance, $this->arguments);\n }", "title": "" }, { "docid": "d40ba8bd100cac2e7f61706c0029f74a", "score": "0.5117857", "text": "public function __invoke($value);", "title": "" }, { "docid": "771b8a25276368973a0eb132006a8f20", "score": "0.5104246", "text": "public function usesMethod(string ... $methods): bool;", "title": "" }, { "docid": "307d84c622c8e969751d0192e42daa8a", "score": "0.5102725", "text": "Public function __call($method,$arg)\r\n\t{\r\n\t\t//echo $method,'<br>';\r\n\t\tprint_r($arg);\r\n\t}", "title": "" }, { "docid": "a7b1d653069822c7a9afc1d5a3a90bca", "score": "0.50956327", "text": "private function _callable()\n {\n if ($this->_validObject === true) {\n \n if ($this->_discoveredHandler && \n class_exists($this->_discoveredHandler)) {\n \n unset($this->_regexMatches[0]);\n $this->_handlerInstance = new $this->_discoveredHandler();\n \n if ($this->_request->isAjaxRequest() && \n method_exists($this->_discoveredHandler, $this->_method . '_xhr')) {\n \n $this->_method .= '_xhr';\n }\n \n if (method_exists($this->_handlerInstance, $this->_method)) {\n\n return true;\n }\n }\n }\n \n return false;\n }", "title": "" }, { "docid": "4c662f76efc2aab7e8912f37199b68cc", "score": "0.5093374", "text": "public function __call( $name , $pars ){\n if (function_exists($name))\n {\n call_user_func_array( $name , $pars);\n }\n }", "title": "" }, { "docid": "32f6c00eb0fda4db33669b8e61e0f5ca", "score": "0.5087021", "text": "public function testRouteCanDispatchArrayBasedCallableWithInstanceToCorrectStrategy()\n {\n $route = new Route;\n\n $container = $this->getMock('Interop\\Container\\ContainerInterface');\n $strategy = $this->getMock('League\\Route\\Strategy\\StrategyInterface');\n $request = $this->getMock('Psr\\Http\\Message\\ServerRequestInterface');\n $response = $this->getMock('Psr\\Http\\Message\\ResponseInterface');\n $instance = new Asset\\InvokableController;\n $callable = [$instance, '__invoke'];\n\n $strategy->expects($this->once())->method('dispatch')->with($callable, [])->will($this->returnValue($response));\n\n $route->setContainer($container);\n $route->setStrategy($strategy);\n $route->setCallable($callable);\n\n $actual = $route->dispatch($request, $response, []);\n\n $this->assertSame($response, $actual);\n }", "title": "" } ]
704e6c31956484e643434c8e0bcfe0d9
Implement template methods from PersistableFilter
[ { "docid": "34da7602b1c572042ecd69958dc283ca", "score": "0.0", "text": "function getClassName() {\n\t\treturn 'lib.pkp.plugins.metadata.nlm30.filter.PKPSubmissionNlm30XmlFilter';\n\t}", "title": "" } ]
[ { "docid": "dbd94760cd5397e98f99f144872bd17e", "score": "0.7002605", "text": "public function saveFilter();", "title": "" }, { "docid": "5f49f34df40cbfb129ef0183e802b697", "score": "0.64094454", "text": "abstract protected function applyFilter();", "title": "" }, { "docid": "063366411f0c4c0eb31fbda9b7205ec5", "score": "0.62501854", "text": "public abstract function getFilter();", "title": "" }, { "docid": "16d26e6007523f5e28824048f2b7b313", "score": "0.6187198", "text": "protected function filter()\n {\n //\n }", "title": "" }, { "docid": "17e1867e5fa48b53d74e7916cf37063a", "score": "0.6098216", "text": "protected function filter() {\n\t}", "title": "" }, { "docid": "979c74a5140ea9d0f5bc4793c99e9367", "score": "0.59165984", "text": "public function filters()\n {\n return array( 'accessControl' ); // perform access control for CRUD operations\n }", "title": "" }, { "docid": "6c4adea0ba1aa2ba23d52f97aedff3d6", "score": "0.589274", "text": "public function getFilter();", "title": "" }, { "docid": "5e51efa2b317f5a167c30ba4735e96bd", "score": "0.58801126", "text": "public function applyFilters();", "title": "" }, { "docid": "6745262ce3de647198d1f4e7dac0d598", "score": "0.58448774", "text": "protected function beforeFilter() {\n }", "title": "" }, { "docid": "7205846bd5724e843bb968ac737c0eb5", "score": "0.58431584", "text": "function beforeFilter() {\r\n\r\n\t}", "title": "" }, { "docid": "ddb14101dd0e3530cc97ca6ea813f079", "score": "0.5842178", "text": "public function findByFilter();", "title": "" }, { "docid": "98106eed1e5e71fbf0fdf94b7d47a6f2", "score": "0.5790593", "text": "function beforeFilter() {\n\t}", "title": "" }, { "docid": "98106eed1e5e71fbf0fdf94b7d47a6f2", "score": "0.5790593", "text": "function beforeFilter() {\n\t}", "title": "" }, { "docid": "8c39b812f46f5e14e22c3732f50f295d", "score": "0.5779715", "text": "protected function afterFilter() {\n }", "title": "" }, { "docid": "04b2bedd456bbc09d9b725eca6d20d8c", "score": "0.5769912", "text": "public function filters()\n {\n return CMap::mergeArray(array(\n 'postOnly + delete',\n ), parent::filters());\n }", "title": "" }, { "docid": "6f09cbb1a2b0c907c418f6db4be80c33", "score": "0.5753164", "text": "public function filter()\n {\n $this->metaFilterAndValidate('filter');\n }", "title": "" }, { "docid": "07ee242a78f137082a67639b6410c67d", "score": "0.5748785", "text": "public function filters(){\n\t\treturn array( 'accessControl', 'postOnly + delete' );\n }", "title": "" }, { "docid": "27cadd0a9beda77c8a6f4f983b08b4d0", "score": "0.57282734", "text": "public function beforeFilter()\n\t{\n\n\t}", "title": "" }, { "docid": "805efa3749451bf6b64699bb6699a7cf", "score": "0.5706571", "text": "public function applyFilter(...$args);", "title": "" }, { "docid": "72427b60613b3f82af7bb45b96d515a9", "score": "0.5704012", "text": "public function filters() {\n\t\treturn array(\n\t\t\t'accessControl', // perform access control for CRUD operations\n\t\t);\n\t}", "title": "" }, { "docid": "9d26c608fcb44c6118f6875e4b52ee3c", "score": "0.5681347", "text": "public function afterFilter()\n\t{\n\n\t}", "title": "" }, { "docid": "29ebfc1be11726c36bd2ce15795988b2", "score": "0.5661449", "text": "public function filters()\n\t{\n\t\treturn array('accessControl', 'postOnly + delete');\n\t}", "title": "" }, { "docid": "9cf455383aa7d3643f2d5e9369925f12", "score": "0.565439", "text": "public function beforeFilter()\n\t{\n\t}", "title": "" }, { "docid": "9cf455383aa7d3643f2d5e9369925f12", "score": "0.565439", "text": "public function beforeFilter()\n\t{\n\t}", "title": "" }, { "docid": "41e803c863491e48720752f85fbe657d", "score": "0.5632956", "text": "public function filtroInicial() {\n parent::filtroInicial();\n $this->Persistencia->adicionaFiltro('data',Util::getPrimeiroDiaMes(), Persistencia::LIGACAO_AND, Persistencia::ENTRE,Util::getDataAtual());\n \n }", "title": "" }, { "docid": "f34dcc58e351a6ad03771bde3354966e", "score": "0.5627297", "text": "function beforeFilter()\n\t{\n\n\t}", "title": "" }, { "docid": "5fab2ad3604abd34f3cccfcc101128ca", "score": "0.5620787", "text": "public function filter_method_name() {\n // @TODO: Define your filter hook callback here\n }", "title": "" }, { "docid": "5b0c321c95317b909548c3f1bcfa807f", "score": "0.5615468", "text": "public function getFilter() : Filter;", "title": "" }, { "docid": "310347a1554510ce099887ca7d3a2fe4", "score": "0.5603606", "text": "public function isFilterable();", "title": "" }, { "docid": "f449b6051c85c562a1071fe4b9f5c086", "score": "0.5599449", "text": "public function filters() {\n return array(\n 'accessControl', // perform access control for CRUD operations\n 'postOnly + delete',\n );\n }", "title": "" }, { "docid": "f8b4def78f30baa349987b1cc42f6f46", "score": "0.5594908", "text": "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'accessControl', // perform access control for CRUD operations\n\t\t);\n\t}", "title": "" }, { "docid": "103bf7e523b4093e496e4c57e4997307", "score": "0.5577974", "text": "abstract public function filter();", "title": "" }, { "docid": "103bf7e523b4093e496e4c57e4997307", "score": "0.5577974", "text": "abstract public function filter();", "title": "" }, { "docid": "2e1c30983f5f6dce388348698e1b3427", "score": "0.5551663", "text": "abstract protected function getFilterMapping(): array;", "title": "" }, { "docid": "f6687d9fcad378d86c9f78a85392f29b", "score": "0.55329853", "text": "abstract protected function getFilterManager();", "title": "" }, { "docid": "002afedb7dd08f3435b2f75c4acfc4d4", "score": "0.55265474", "text": "public function beforeFilter() {\t\t\n\t\tparent::beforeFilter();\n\t}", "title": "" }, { "docid": "4f380b3163464bc434c4d273fc072b58", "score": "0.55016476", "text": "protected function createNewFilter() {\n\t\t$groupRepository = $this->getDoctrine()->getRepository(Group::class);\n\t\t$filter = $this->createGroupFilter($groupRepository);\n\t\t\n\t\treturn $filter;\n\t}", "title": "" }, { "docid": "6ae03dfee3dcace0d874b8ed5d628604", "score": "0.54942375", "text": "public function testFilter4()\n {\n // Filter by name.\n $filters = array('name' => 'item1');\n $this->assertCount(2, $this->persister->filter($filters));\n\n // Filter by name and price.\n $filters += array('price' => 54);\n $this->assertCount(1, $this->persister->filter($filters));\n\n $filters = array('price' => 100);\n $products = $this->persister->filter($filters);\n $product = array_pop($products);\n $this->assertEquals('item2', $product->getName());\n\n // No filters - should return entire list of products.\n $this->assertCount(count(self::$repo->findAll()), $this->persister->filter(array()));\n }", "title": "" }, { "docid": "5b255b4eefca8dc603f26a7c5cbaee3b", "score": "0.5493987", "text": "public function filter(Request $request);", "title": "" }, { "docid": "63baacc3618c226a313ce20f19aee1ca", "score": "0.54876053", "text": "public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t\t\n\t}", "title": "" }, { "docid": "fcb86eaec9c05df4dcd99e858afb426d", "score": "0.54818493", "text": "protected function _mapFilterAction() {\n $this->_container->args = [];\n $this->_crud()->mapAction('filter', ['className' => 'AdvancedFilters.MultipleFilters', 'enabled' => false], false);\n\n return $this->_crud()->action('filter');\n }", "title": "" }, { "docid": "94acf831e442cf5809a3eec0c4952e48", "score": "0.54789454", "text": "public function filters()\n {\n return [\n 'from' => new FromDateSearch ,\n 'to' => new ToDateSearch ,\n 'active' => new StatusFilter ,\n 'admin_global_search' => new AdminGlobalSearch(['first_name','last_name','email','phone'])\n ];\n }", "title": "" }, { "docid": "2bee9d04cbd180a26a2b49206c3250f1", "score": "0.5474527", "text": "function afterFilter() {\n\t}", "title": "" }, { "docid": "2bee9d04cbd180a26a2b49206c3250f1", "score": "0.5474527", "text": "function afterFilter() {\n\t}", "title": "" }, { "docid": "24dbf933f336511b07642315cbedfd56", "score": "0.5470406", "text": "public function filters()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "24dbf933f336511b07642315cbedfd56", "score": "0.5470406", "text": "public function filters()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "9df51d479de0ccacdcc83d4fe8781414", "score": "0.54500216", "text": "public function filter($data);", "title": "" }, { "docid": "b7513fdf3897aec9ede8c62fd208e79a", "score": "0.54446834", "text": "function filter_method_name() {\n\t // TODO define your filter method here\n\t}", "title": "" }, { "docid": "5f859378096f7056fcfe67e5df98879d", "score": "0.54445213", "text": "public function filter();", "title": "" }, { "docid": "c2420151aa4e9ae646f7651b63332fe0", "score": "0.5441192", "text": "public function beforeFilter() {\r\n\t\tparent::beforeFilter();\r\n\t\t\t\t\t\r\n\r\n\r\n\t}", "title": "" }, { "docid": "1fcdf6f638e5cc31e213d45492b92f71", "score": "0.5434998", "text": "protected function addFilters() {\n\n\t\t}", "title": "" }, { "docid": "1fcdf6f638e5cc31e213d45492b92f71", "score": "0.5434998", "text": "protected function addFilters() {\n\n\t\t}", "title": "" }, { "docid": "87ef29cb26ddf2717b9e3bb95ed6270e", "score": "0.5429712", "text": "public function getFilterBean() : Filter {\n\t\tif($_SERVER[\"REQUEST_METHOD\"] == \"FILTER\"){\n\t\t\t$_POST = HTTPUtils::parsePost();\n\t\t}\n\t\t\n\t\t$filter = new Filter();\n\t\t$filter->addFilterField(\"mandt\",\"integer\",$_POST[\"filter\"][\"mandt\"]);\n\t\t$filter->addFilterField(\"env\",\"string\",$_POST[\"filter\"][\"env\"]);\n\t\t$filter->addFilterField(\"key\",\"string\",$_POST[\"filter\"][\"key\"]);\n\t\t$filter->addFilterField(\"name\",\"string\",$_POST[\"filter\"][\"name\"]);\n\t\t$filter->addFilterField(\"value\",\"string\",$_POST[\"filter\"][\"value\"]);\n\t\t$filter->addFilterField(\"created\",\"datetime\",$_POST[\"filter\"][\"created\"]);\n\t\t$filter->addFilterField(\"updated\",\"datetime\",$_POST[\"filter\"][\"updated\"]);\n\t\t$filter->addFilterField(\"sequence\",\"integer\",$_POST[\"filter\"][\"sequence\"]);\n\t\t\n\t\t// ordenação\n\t\t$filter->addSort($_POST[\"order\"][\"field\"],$_POST[\"order\"][\"type\"]);\n\t\t\n\t\t// limite\n\t\t$filter->setLimit(intval($_POST[\"limit\"]));\n\t\t\n\t\t// offset\n\t\t$filter->setOffset(intval($_POST[\"offset\"]));\n\t\t\n\t\treturn $filter;\n\t}", "title": "" }, { "docid": "f5ce097e4ee05d36aae6d70d5011dfad", "score": "0.5428193", "text": "public function filters(CrudResource $resource, Request $request);", "title": "" }, { "docid": "b2f5651bb6403daa163f7c906dac66c8", "score": "0.54248387", "text": "public function saveFilter() {\n\t\t$key = '';\n\t\t\t// If a session key has been set and TYPO3 is running in FE mode,\n\t\t\t// save the filter in session\n\t\tif (!empty($this->filterData['session_key']) && TYPO3_MODE == 'FE') {\n\t\t\t\t// Assemble the key for session storage\n\t\t\t\t// It is either a general key name or a key name per page (with page id appended)\n\t\t\tif (empty($this->filterData['key_per_page'])) {\n\t\t\t\t$key = $this->filterData['session_key'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$key = $this->filterData['session_key'] . '_' . $GLOBALS['TSFE']->id;\n\t\t\t}\n\t\t\t\t// NOTE: we save only the parsed part, as it is the only we are interested in keeping in session\n\t\t\t$GLOBALS['TSFE']->fe_user->setKey('ses', $key, $this->filter['parsed']);\n\t\t}\n\t}", "title": "" }, { "docid": "4ac4967d31ac51989f7c4c41cf3b7d89", "score": "0.54219174", "text": "public function getFilterBean() : Filter {\n\t\tif($_SERVER[\"REQUEST_METHOD\"] == \"FILTER\"){\n\t\t\t$_POST = HTTPUtils::parsePost();\n\t\t}\n\t\t\n\t\t$filter = new Filter();\n\t\t$filter->addFilterField(\"mandt\",\"integer\",$_POST[\"filter\"][\"mandt\"]);\n\t\t$filter->addFilterField(\"name\",\"string\",$_POST[\"filter\"][\"name\"]);\n\t\t$filter->addFilterField(\"key\",\"string\",$_POST[\"filter\"][\"key\"]);\n\t\t$filter->addFilterField(\"value\",\"string\",$_POST[\"filter\"][\"value\"]);\n\t\t$filter->addFilterField(\"sequence\",\"integer\",$_POST[\"filter\"][\"sequence\"]);\n\t\t\n\t\t// ordenação\n\t\t$filter->addSort($_POST[\"order\"][\"field\"],$_POST[\"order\"][\"type\"]);\n\t\t\n\t\t// limite\n\t\t$filter->setLimit(intval($_POST[\"limit\"]));\n\t\t\n\t\t// offset\n\t\t$filter->setOffset(intval($_POST[\"offset\"]));\n\t\t\n\t\treturn $filter;\n\t}", "title": "" }, { "docid": "e0bea62993ccf6febe00c6e7aa0f442a", "score": "0.54166704", "text": "function beforeFilter() \r\n {\r\n parent::beforeFilter();\r\n }", "title": "" }, { "docid": "d7b4fd13a90f8be942d2eb9ef35a4a10", "score": "0.54144144", "text": "public function filters()\n {\n $filters = array(\n 'postOnly + delete',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "title": "" }, { "docid": "738f44e21bdb30f1e62859c45667097c", "score": "0.54052484", "text": "public function filter_method_name() {\n\t\t// @TODO: Define your filter hook callback here\n\t}", "title": "" }, { "docid": "1095762a70056e2680e12525ac6e371e", "score": "0.5401474", "text": "public function getFilter(): bool;", "title": "" }, { "docid": "ba16b2886198d1137c6a95b18017694d", "score": "0.5396383", "text": "public function setFilter($filter);", "title": "" }, { "docid": "14d619b9cac7ff9adc3d6d5ba4dab951", "score": "0.5373742", "text": "function getFilter() { return $this->readfilter(); }", "title": "" }, { "docid": "14d619b9cac7ff9adc3d6d5ba4dab951", "score": "0.5373742", "text": "function getFilter() { return $this->readfilter(); }", "title": "" }, { "docid": "14d619b9cac7ff9adc3d6d5ba4dab951", "score": "0.5373742", "text": "function getFilter() { return $this->readfilter(); }", "title": "" }, { "docid": "e1fccb315ac0232dccf3a76b64856d72", "score": "0.53699046", "text": "public function __construct() {\n $this->beforeFilter('member', array('only' => array('store', 'update', 'destroy')));\n }", "title": "" }, { "docid": "58105587c5e852bf560faea7afd0fbd4", "score": "0.5367616", "text": "public function filters()\n {\n return [\n ];\n }", "title": "" }, { "docid": "d189676f7fa4ff029525ba852aa785a9", "score": "0.5366383", "text": "public function canFilter()\n {\n return true;\n }", "title": "" }, { "docid": "19aecad5b067d4d93718bd468dfcc10e", "score": "0.53615075", "text": "public function initFilter() {\n\t}", "title": "" }, { "docid": "b7f00b2e54992e739ac16e773875968a", "score": "0.5361147", "text": "public function created(Filter $filter)\n {\n //\n }", "title": "" }, { "docid": "6afd06234bc275c5fb799ac00e01cee6", "score": "0.53595906", "text": "public function beforeFilter() {\n parent::beforeFilter();\n }", "title": "" }, { "docid": "3760251b828754c0d74c84da28069e88", "score": "0.53526706", "text": "public function filters()\n {\n return array(\n 'accessControl', // perform access control for CRUD operations\n 'postOnly + delete', // we only allow deletion via POST request\n );\n }", "title": "" }, { "docid": "e3da3496e241cb47dd7ffca758f5cbba", "score": "0.534578", "text": "function __construct() {\n parent::__construct('filter');\n }", "title": "" }, { "docid": "66956224bd57bc9e4cc98599179ad8f7", "score": "0.53439456", "text": "public function filters()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9ff1cea2fa3f99af930d70782f4d9626", "score": "0.53404045", "text": "protected function _beforeSave() {}", "title": "" }, { "docid": "2dbe5c6657999b82935df5bcfd287324", "score": "0.5339154", "text": "public function beforeFilter(){\n\t\tparent::beforeFilter();\n\t}", "title": "" }, { "docid": "2dbe5c6657999b82935df5bcfd287324", "score": "0.5339154", "text": "public function beforeFilter(){\n\t\tparent::beforeFilter();\n\t}", "title": "" }, { "docid": "7f0ccf2ed258cc9e4d4866457d7768f0", "score": "0.5328231", "text": "public function filters()\n {\n return null;\n }", "title": "" }, { "docid": "822baea0a8332a01ad42c23e01090690", "score": "0.5324643", "text": "public function userIdFiltering(&$filter)\n {\n // Enter your code here\n }", "title": "" }, { "docid": "522f6c00be5024122614e9b849440735", "score": "0.5324024", "text": "public function register_filters() {\r\n\t\t}", "title": "" }, { "docid": "1f9c572731762473b9c49660659569b1", "score": "0.53172123", "text": "protected function setFilter(){\n $aRequestFilter=$this->oRequest->data('filter');\n $sIdent= MLModul::gi()->getMarketPlaceId().'_'.$this->getIdent();\n $aFilters=array();\n if($aRequestFilter!==null){\n $aFilters[$sIdent]=$aRequestFilter;\n }\n $aSessionFilter=MLSession::gi()->get('PRODUCTLIST__filter.json');\n if(is_array($aSessionFilter)){\n foreach($aSessionFilter as $sController=>$aFilter){\n unset($aFilter['meta']);\n if(substr($sIdent, 0, strlen($sController))==$sController&&!isset($aFilters[$sController])){\n $aFilters[$sController]=$aFilter;\n }\n if(\n (\n $aRequestFilter===null\n ||\n count($aRequestFilter)==1 && isset($aRequestFilter['meta'])\n )\n && $sController==$sIdent\n ){\n if(isset($aRequestFilter['meta'])){\n $aFilter['meta']=$aRequestFilter['meta'];\n }\n $aRequestFilter=$aFilter;\n }\n }\n }\n MLSession::gi()->set('PRODUCTLIST__filter.json',$aFilters);\n $this->getProductList()->setFilters($aRequestFilter);\n return $this;\n }", "title": "" }, { "docid": "8acecf4669660f930c5553eba2980078", "score": "0.53127694", "text": "public function beforeFilter()\n {\n parent::beforeFilter();\n }", "title": "" }, { "docid": "3a8742542865dc782a018147d2b0932a", "score": "0.5309125", "text": "public function filters()\n {\n return [];\n }", "title": "" }, { "docid": "3a8742542865dc782a018147d2b0932a", "score": "0.5309125", "text": "public function filters()\n {\n return [];\n }", "title": "" }, { "docid": "3a8742542865dc782a018147d2b0932a", "score": "0.5309125", "text": "public function filters()\n {\n return [];\n }", "title": "" }, { "docid": "6861e0fadf5658fdc708bc1e69f9787d", "score": "0.5290537", "text": "function beforeFilter() {\n\t\tparent::beforeFilter();\n\n\t}", "title": "" }, { "docid": "861fa3089a54008da057692675a8f78d", "score": "0.52876353", "text": "public abstract function filter($value);", "title": "" }, { "docid": "ef8dc84a3e90de42f72775f86c6491fe", "score": "0.5268988", "text": "function getFilter()\n\t\t{\n\t\treturn $this->filter ;\n\t\t}", "title": "" }, { "docid": "473a56f059ccc072390f8e5f4e447eb5", "score": "0.52689713", "text": "abstract public function filters(): array;", "title": "" }, { "docid": "e9ea0dabd44f02bede4effbfc4dd39ec", "score": "0.5263973", "text": "function beforeFilter() {\n\t\tparent::beforeFilter();\n\n\t\t# Stop AfterFind actions in Review model\n\t\t$this->Review->rankList = false;\n\n\t}", "title": "" }, { "docid": "a22c8595929c2526e5ecc52c0a943fe4", "score": "0.52633023", "text": "public function filters()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'accessControl', // perform access control for CRUD operations\r\n\t\t\t'postOnly + delete', // we only allow deletion via POST request\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "a22c8595929c2526e5ecc52c0a943fe4", "score": "0.52633023", "text": "public function filters()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'accessControl', // perform access control for CRUD operations\r\n\t\t\t'postOnly + delete', // we only allow deletion via POST request\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "463a02bb69340b874d3f2c3c1b1ac3ac", "score": "0.5252146", "text": "public function beforeFilter()\n\t\t{\n\t\t\tparent::beforeFilter();\n\t\t}", "title": "" }, { "docid": "4f32d6070fb445a80ca87679cc3a065c", "score": "0.52409726", "text": "public function register_filters() {\n\t\t}", "title": "" }, { "docid": "4f32d6070fb445a80ca87679cc3a065c", "score": "0.52409726", "text": "public function register_filters() {\n\t\t}", "title": "" }, { "docid": "d384d794e6d059f09ad3e1b48ed1d2c0", "score": "0.5236266", "text": "public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t}", "title": "" }, { "docid": "d384d794e6d059f09ad3e1b48ed1d2c0", "score": "0.5236266", "text": "public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t}", "title": "" }, { "docid": "d384d794e6d059f09ad3e1b48ed1d2c0", "score": "0.5236266", "text": "public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t}", "title": "" }, { "docid": "d384d794e6d059f09ad3e1b48ed1d2c0", "score": "0.5236266", "text": "public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t}", "title": "" }, { "docid": "859bda9987dbff7e003884501092d637", "score": "0.5232862", "text": "public function beforeFilter()\n\t{\n\t\t$this->Account = new Account;\n\t}", "title": "" }, { "docid": "a97bbc7aa3b73a6261602c58bf4e9b8e", "score": "0.5232582", "text": "function getFilter()\n\t{\n\t\treturn $this->filter;\n\t}", "title": "" }, { "docid": "2cf08e41e105222ad0e1383301550680", "score": "0.52219415", "text": "public function createBetFilter ($request);", "title": "" } ]
f7b39d00cf84e915b2dbb847fa34a51e
//////////// Utility // ////////////
[ { "docid": "b2091b2c18654c6e9b4c6e3f9181b7d5", "score": "0.0", "text": "public static function get_credit_types( $credit_types = array() ) {\n\t\tif ( empty( $credit_types ) ) {\n\t\t\t$args = array(\n\t\t\t\t'post_type' => self::POST_TYPE,\n\t\t\t\t'post_status' => 'any',\n\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t'fields' => 'ids',\n\t\t\t);\n\t\t\t$credit_types = get_posts( $args );\n\t\t}\n\t\t$credit_types_options = array();\n\t\tforeach ( $credit_types as $credit_id ) {\n\t\t\t$credit = SI_Credit::get_instance( $credit_id );\n\t\t\tif ( is_a( $credit, 'SI_Credit' ) ) {\n\t\t\t\t$credit_types_options[ $credit_id ] = sprintf( '%s (%s)', $credit->get_title(), $credit->get_id() );\n\t\t\t}\n\t\t}\n\t\treturn $credit_types_options;\n\t}", "title": "" } ]
[ { "docid": "3095c329ad1a5a563597462861d3c4c2", "score": "0.5845574", "text": "public function Helper();", "title": "" }, { "docid": "7ebb07ae43738ae510303c0f7e350487", "score": "0.51918465", "text": "private function Tools() { }", "title": "" }, { "docid": "4671d0a14e64c4e2b1284a37ba3d7600", "score": "0.5078935", "text": "private function foo() {\r\n\t}", "title": "" }, { "docid": "82811dc11ae74061087c44094efb7bef", "score": "0.5054818", "text": "function uopz_get_return(string $function)\n{\n return true;\n}", "title": "" }, { "docid": "31c12b1500b091e434ac1e83d2d6494f", "score": "0.49515823", "text": "function utilmessage($message){\r\n return $message;\r\n }", "title": "" }, { "docid": "7f5ea2a4c4d9653ab30343240d2bc520", "score": "0.49430496", "text": "public function extension();", "title": "" }, { "docid": "521533ba939296ac2bc9e36b9ec68bc0", "score": "0.4938902", "text": "function readableGet();", "title": "" }, { "docid": "7d4a8a73fe70d5ac732bac8d4049ae62", "score": "0.49325886", "text": "public function shit()\n\t{\n\n\t}", "title": "" }, { "docid": "43e6715b46233dd22ca5df1e6435144b", "score": "0.48908934", "text": "protected abstract function extension();", "title": "" }, { "docid": "15d6a304f6f4581602c17eaf545f448d", "score": "0.48147693", "text": "function ob_get_contents()\n{\n}", "title": "" }, { "docid": "ac4d3aa0138c6c0eb95886e414f19338", "score": "0.48044837", "text": "private function deng() {\n }", "title": "" }, { "docid": "ac4d3aa0138c6c0eb95886e414f19338", "score": "0.48044837", "text": "private function deng() {\n }", "title": "" }, { "docid": "9d4da3fbbfe21d5d99e7ccffac0026dc", "score": "0.47880885", "text": "public function testSpaceImagesGetSpaceImage()\n {\n }", "title": "" }, { "docid": "24321451c2dce10d945f90138718dc58", "score": "0.47479418", "text": "#[Pure(true)]\nfunction transliterator_get_error_message(Transliterator $transliterator): string|false {}", "title": "" }, { "docid": "f40371cee663b92d3b5505e735a2c895", "score": "0.47366437", "text": "public function test5069Get()\n {\n }", "title": "" }, { "docid": "5284999c03bd86207f30e73932cd8673", "score": "0.47315285", "text": "abstract protected function getExpectedContent(): string;", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.47110653", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.47110653", "text": "final private function __construct() {}", "title": "" }, { "docid": "b15acfd2314f4441aaaa6a8b6dcff844", "score": "0.47098982", "text": "function getString(){\r\n\t\tdie('Not implemented');\r\n\t}", "title": "" }, { "docid": "09c7c77084c1b85777c8c6eed9265b0f", "score": "0.47053304", "text": "public function testSpaceImagesGetSpaceImageList()\n {\n }", "title": "" }, { "docid": "6b3a714ad78337f07c20d04cf667bf38", "score": "0.4704442", "text": "function file_utils ($path='') {\n if($path==='')\n define('_path', dirname(__FILE__)._slash);\n else{\n //check for '/./' & '//'\n $path = str_replace(_slash.'.'._slash, _slash, $path);\n $path = str_replace(_slash._slash, _slash, $path);\n //check for '/../'\n $buscar = sprintf(\"%s[^%s]+%s..%s\", _slash, _slash, _slash, _slash);\n $buscar = str_replace('.','\\.',$buscar);\n $path = eregi_replace($buscar, _slash, $path);\n //silly patch '/../'\n $path = str_replace(_slash.'..'._slash, _slash, $path);\n if($path==='') $path='/';\n if(is_dir($path))\n define('_path', $path);\n }\n\t\n\t//echo _path;\n }", "title": "" }, { "docid": "944425492312bb6f9998a9753d18b339", "score": "0.46990138", "text": "public function function()\n {\n }", "title": "" }, { "docid": "9604a34b33fa023252fe661711993218", "score": "0.46949598", "text": "private function getSomething() { return 'something'; }", "title": "" }, { "docid": "d20a8c0c727760b318cdd93fc037668b", "score": "0.4693765", "text": "function bitacora()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "204b6ca8a9f0c549ebf1e365cf8e8590", "score": "0.4689834", "text": "private function parse() {\r\n\r\n\t}", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.46895978", "text": "private function __() {\n }", "title": "" }, { "docid": "e8bc5b0340523453690c0652d0420487", "score": "0.46837795", "text": "function generic()\n\t{\n\t\treturn 'OK';\n\t}", "title": "" }, { "docid": "d6b11971bc86f07b8e7b57cee55d9faa", "score": "0.46800217", "text": "#[Pure(true)]\nfunction intl_get_error_message(): string {}", "title": "" }, { "docid": "9778d84ea8e395a4e2521f091d4cc18c", "score": "0.46714333", "text": "abstract public static function package(): string;", "title": "" }, { "docid": "82564b0af983c61abbc538b4bccd6982", "score": "0.46618447", "text": "public function test_getBillOfLadingTags() {\n\n }", "title": "" }, { "docid": "9b54d0a5be09a1b6ee459f0cc262af80", "score": "0.46586534", "text": "function fromme($line) {\n}", "title": "" }, { "docid": "bc4eb203d8cb296e8198a3ce2c8caa8b", "score": "0.4638701", "text": "function\nats2phppre_option_some($arg0)\n{\n//\n $tmpret0 = NULL;\n//\n __patsflab_option_some:\n $tmpret0 = array($arg0);\n return $tmpret0;\n}", "title": "" }, { "docid": "50f9399d4740fbe238fc69e5a8f50ed1", "score": "0.46382412", "text": "public function zwischenspeichern(){\n \t\n }", "title": "" }, { "docid": "df69b23855b2a30f6e0e0acd5f555ead", "score": "0.4633358", "text": "function size_to_url($s)\n{\n if ($s[0]==$s[1])\n {\n return $s[0];\n }\n return $s[0].'x'.$s[1];\n}", "title": "" }, { "docid": "b2d3b5d1e2c5c5eb37f050b1a362ef72", "score": "0.46329722", "text": "final private function __construct() { }", "title": "" }, { "docid": "b9ef6711f038ef9741405c5204855b53", "score": "0.46210834", "text": "public function getUtils(): Utils;", "title": "" }, { "docid": "11217f3e5b3ffe2b77b713180772be78", "score": "0.46116632", "text": "function blah($a, $b) {\n\treturn $a;\n}", "title": "" }, { "docid": "9ea76017cc71fe2659fa82a9e96ad7d9", "score": "0.46072283", "text": "private function FmRegistryHelper()\r\n {\r\n }", "title": "" }, { "docid": "780e11b6585d585e4885ac827e14b8d2", "score": "0.46027824", "text": "function ocicolumntyperaw () {}", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.45983773", "text": "final private function __construct() { }", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.45983773", "text": "final private function __construct() { }", "title": "" }, { "docid": "398b1552d49fd789864629ec277e9bdc", "score": "0.45935872", "text": "function readable_memory_usage() { \n\t$mem_usage = memory_get_usage(true); \n\n\tif ($mem_usage < 1024) \n\t $string = $mem_usage.\" bytes\"; \n\telseif ($mem_usage < 1048576) \n\t $string = round($mem_usage/1024,2).\" kilobytes\"; \n\telse \n\t $string = round($mem_usage/1048576,2).\" megabytes\"; \n\t \n\treturn $string; \n}", "title": "" }, { "docid": "9b2c80b0bb5e66a393ec15c99c40753c", "score": "0.45901817", "text": "function fgetss($handle, $length = NULL, $allowable_tags = NULL)\n{\n}", "title": "" }, { "docid": "220281ebc7f33fc5f521c57758d6adb6", "score": "0.45853952", "text": "public function testToCodeString0()\n{\n\n $actual = $this->fullyQualified->toCodeString();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "77840ae72eb4901998c32d1eaf72bb13", "score": "0.45797107", "text": "function yourls_get_shorturl_charset() {\n\tstatic $charset = null;\n\tif( $charset !== null )\n\t\treturn $charset;\n\n if( defined('YOURLS_URL_CONVERT') && in_array( YOURLS_URL_CONVERT, array( 62, 64 ) ) ) {\n $charset = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n } else {\n // defined to 36, or wrongly defined \n $charset = '0123456789abcdefghijklmnopqrstuvwxyz';\n }\n\n\t$charset = yourls_apply_filter( 'get_shorturl_charset', $charset );\n\treturn $charset;\n}", "title": "" }, { "docid": "52a0f2c1781f91fa579b0df07ffaee4f", "score": "0.45775196", "text": "function wpi_null(){ return null;}", "title": "" }, { "docid": "3dd831740f899ddb498237c9ba9dfa70", "score": "0.4576998", "text": "public function bersuara()\n{\n return \"meowww....meoww..meoww...\";\n}", "title": "" }, { "docid": "26c6eb1a817c3d8d4b9a2cf6af999cf8", "score": "0.4576", "text": "function alr_() {/*{{{*/\n\n}", "title": "" }, { "docid": "ac70182b076cfd28c4792ddaaab56cdc", "score": "0.4575379", "text": "private function sanitize() {}", "title": "" }, { "docid": "b23b48f8040d816fffa63283d65e9d2a", "score": "0.45742014", "text": "function var_src($b)\n{\n return preg_replace(\"/\\\\s+/\", \" \", var_export($b, true)) . \" \";\n}", "title": "" }, { "docid": "53f607151f273166390cb79f3de107a9", "score": "0.45737797", "text": "function get_file_path($arg)\n{\n // Should sanitize this\n return implode(\"/\", $arg) . \".php\";\n}", "title": "" }, { "docid": "12e4d70d818dd418d52efca9998c2a75", "score": "0.45737192", "text": "function url(){\r\n return sprintf(\r\n\t\"%s://%s%s\",\r\n\tisset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http', $_SERVER['SERVER_NAME'], $_SERVER['REQUEST_URI'] );\r\n}", "title": "" }, { "docid": "bbfe5af830760b6cd4a35fb808778019", "score": "0.45721725", "text": "function dbug($string){\n}", "title": "" }, { "docid": "b0b493fbd29220d4ad158d52782d5e2b", "score": "0.45703563", "text": "private function __construct()\n\t{\n\t\t// Marks this class as util\n\t}", "title": "" }, { "docid": "a7a876dd1b7583ae08f3417fcee5ad6e", "score": "0.45661703", "text": "abstract public static function path(): string;", "title": "" }, { "docid": "8f32894aff2dc601e6491155f4136bfc", "score": "0.45644316", "text": "function gl(){\n $r='';\n for ($i = 0; $i < func_num_args(); $i++){\n $r.=(string)func_get_arg($i);\n }\n return $r;\n}", "title": "" }, { "docid": "9d982b02ebf2d93289bf8f24f7081fc8", "score": "0.45597932", "text": "function getBegin();", "title": "" }, { "docid": "20de7cef1c8efab14d5e1f92ad09a669", "score": "0.4550613", "text": "function bytes_to_nice_string($bytes)\n{\n $nice_str = \"\";\n if ($bytes > (1024 * 1024 * 1024)) {\n $nice_str = sprintf (\"%2.1f gb\", $bytes / (1024 * 1024 * 1024));\n } elseif ($bytes > (1024 * 1024)) {\n $nice_str = sprintf (\"%2.1f mb\", $bytes / (1024 * 1024));\n } elseif ($bytes > 1024) {\n $nice_str = sprintf (\"%2.1f k\", $bytes / 1024);\n } else {\n $nice_str = sprintf (\"%d b\", $bytes);\n }\n return ($nice_str);\n}", "title": "" }, { "docid": "604580c5c6bd993f189a84f6ed575cdc", "score": "0.45466495", "text": "public static function base()\n\t{\n\t}", "title": "" }, { "docid": "daeaaafd558bf4fdd49a14b503d471a8", "score": "0.45456693", "text": "public function bgRewriteAOF();", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.45440567", "text": "private function __construct() {}", "title": "" } ]
ac0ab2b038791aaa3b4df9cf79635afa
Send bitcoins to an user
[ { "docid": "ddbfac65f50c2fea07d1a9ebc2623d49", "score": "0.5677275", "text": "public function sendToUser(BitcoinUser $touser, $amount)\n {\n return BitcoinAccounts::sendToUser($this, $touser, $amount);\n }", "title": "" } ]
[ { "docid": "b6a65c7894b504814380e2e62c1d3c3c", "score": "0.59332937", "text": "function send($address,$amount) {\n\tglobal $connect, $error_log, $wallet_pool;\n\t$txid = cmd(\"hdac-cli hdac sendfrom \".$wallet_pool.\" \".$address.\" \".$amount);\n\t$sql = \"insert into payout (address, amount, txid)\tvalues ('\".$address.\"', '\".$amount.\"', '\".$txid.\"') \";\n\t$result = mysqli_query($connect,$sql);\n\t$error_log .= \"\\n\".time().\",\".$wallet_pool.\",\".$address.\",\".$amount;\n}", "title": "" }, { "docid": "6e7c86b9ba57a2d2a5c865f26b25fb0b", "score": "0.5928745", "text": "public function WalletMoney($user_id, $money){\n if ($user_id) {\n $user = User::where('id',$user_id)->first();\n $language = $user->language;\n App::setLocale($language);\n\n return $this->sendPushToUser($user_id, $money.' '.trans('api.push.added_money_to_wallet'));\n }\n }", "title": "" }, { "docid": "bfbaa3e8cb88e2ae70a05d5622b402c6", "score": "0.5865434", "text": "public function WalletMoney($user_id, $money, $type = null, $title = null, $data = null){\n\n $user = User::where('id',$user_id)->first();\n $language = $user->language;\n app('translator')->setLocale($language);\n return $this->sendPushToUser($user_id, $type, $money.' '.trans('api.push.added_money_to_wallet'), $title, $data );\n }", "title": "" }, { "docid": "81cacd43b897c7d12dcc38befcca1f23", "score": "0.58389264", "text": "public function actionSend()\n {\n $model = new Transfer();\n\n if (Yii::$app->request->post()) \n {\n $post_transfer = Yii::$app->request->post('Transfer');\n $model->source_id = Yii::$app->user->id;\n $destination_username = $post_transfer['destination_username'];\n $destination = User::findByUsername($destination_username);\n\n if ( ! empty($destination) && $destination->id == Yii::$app->user->id)\n throw new NotFoundHttpException(\"Why do you send money to yourself?\");\n\n if (empty($destination))\n {\n // create a new user id doesn't exist\n $destination = new User;\n $destination->username = $destination_username;\n $destination->email = 'guest_' . Yii::$app->getSecurity()->generateRandomString(20) . '@example.com'; // email is generated\n $destination->generateAuthKey();\n\n $destination->save();\n }\n\n $model->destination_username = $destination_username;\n $model->destination_id = $destination->id;\n $model->amount = $post_transfer['amount'];\n\n // begin transaction\n $connection = Yii::$app->getDb();\n $transaction = $connection->beginTransaction();\n\n try {\n $model->status = Transfer::STATUS_SUCCESS;\n $model->save();\n\n $destination->balance += $model->amount;\n $destination->save();\n \n $user = User::findOne(Yii::$app->user->id);\n $user->balance -= $model->amount;\n $user->save();\n\n }\n catch (\\Exception $e)\n {\n $transaction->rollBack();\n throw $e;\n }\n catch (\\Throwable $e)\n {\n $transaction->rollBack();\n throw $e;\n }\n\n $transaction->commit();\n\n return $this->redirect('index');\n\n }\n \n return $this->render('send', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "3a25d28c0631196994c09164fd916c7d", "score": "0.58096623", "text": "public function ChargedWalletMoney($user_id, $money, $type = null){\n\n $user = User::where('id',$user_id)->first();\n $language = $user->language;\n app('translator')->setLocale($language);\n\n return $this->sendPushToUser($user_id, $type, $money.' '.trans('api.push.charged_from_wallet') );\n\n }", "title": "" }, { "docid": "ac25daf64c0ea428d1e64b263aa2ce3c", "score": "0.5739571", "text": "public function u_send($user, $message) {\n\t\t$this->send($user, $message);\n\t}", "title": "" }, { "docid": "4dfcbcd01adf6afd165d29b11dfcb69a", "score": "0.57029766", "text": "public function send(User $recipient, Invite $invite);", "title": "" }, { "docid": "f7e1b98ba58a0c1358ab9f9b6f4ecdf4", "score": "0.5668957", "text": "public function sentEmailOtp($user);", "title": "" }, { "docid": "39aa1c57a6f1372884b83527345ffb3b", "score": "0.56610024", "text": "public function sendBitcoins($wallet, $btc_amount)\n {\n $txID = $this->auth()->sendtoaddress($wallet, $btc_amount);\n $test = $this->test_response($txID);\n if ($test->getStatusCode() != 201) {\n return $test;\n }\n return response([\n\n ], 201);\n }", "title": "" }, { "docid": "feaccae3a76fe389ad50a650f782cc4b", "score": "0.5659297", "text": "public function ChargedWalletMoney($user_id, $money){\n if ($user_id) {\n $user = User::where('id',$user_id)->first();\n $language = $user->language;\n App::setLocale($language);\n\n return $this->sendPushToUser($user_id, $money.' '.trans('api.push.charged_from_wallet'));\n }\n }", "title": "" }, { "docid": "b947ad617ce63d72ab1366dc5255d673", "score": "0.5643195", "text": "function updateBonusCash($amount, $username, $is_credit){\n if($is_credit){\n $update_user = \"UPDATE users SET bonus_cash = bonus_cash + $amount WHERE username = '$username' \";\n $this->con->query($update_user); \n }\n else{\n $update_user = \"UPDATE users SET bonus_cash = bonus_cash - $amount WHERE username = '$username' \";\n $this->con->query($update_user);\n }\n }", "title": "" }, { "docid": "b0c6fce3a7868c5ef54e5c8b959c88a6", "score": "0.56073356", "text": "public function buyItem($id, $coins, $item) {\n\t\t\t$quantityOfItem = $this->fetchProduct();\n\t\t\t$cokeqty = $quantityOfItem[0];\n\t\t\t$pepsiqty = $quantityOfItem[1];\n\t\t\t$sodaqty = $quantityOfItem[2];\n\n\t\t\t// - START - switch case for parameter item \n\n\t\t\tswitch ($item) {\n\t\t\t\tcase 'coke':\n\t\t\t\t\t\t$currentQuantity = $_SESSION['coke'];\n\t\t\t\t\t\t$qty = $cokeqty;\n\t\t\t\t\t\t$price = $this->cokeprice;\n\t\t\t\t\t\t$product = $this->item[0];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'pepsi':\n\t\t\t\t\t\t$currentQuantity = $_SESSION['pepsi'];\n\t\t\t\t\t\t$qty = $pepsiqty;\n\t\t\t\t\t\t$price = $this->pepsiprice;\n\t\t\t\t\t\t$product = $this->item[1];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'soda':\n\t\t\t\t\t\t$currentQuantity = $_SESSION['soda'];\n\t\t\t\t\t\t$qty = $sodaqty;\n\t\t\t\t\t\t$price = $this->sodaprice;\n\t\t\t\t\t\t$product = $this->item[2];\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t\techo 'theres an error buying the product';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// - START - Instruction for inserting and updating database \n\n\t\t\t$qry1 = \"SELECT collected_coins FROM products\";\n\t\t\t$stmt = $this->connect()->query($qry1);\n\t\t\t$vendCoin = $stmt->fetch();\n\n\t\t\t$qry2 = \"UPDATE products SET \" . $product . \" = ?, collected_coins = ?\";\n\t\t\t$qry3 = \"UPDATE users SET coins = ? WHERE id = ?\";\n\t\t\t$qry4 = \"UPDATE inventory SET \" . $product . \" = ? WHERE id = ?\";\n\n\t\t\t// - START - computation of how much coins would be left after purchasing the item\n\n\t\t\t$totalCoinsLeft = $coins - $price;\n\t\t\t$totalVendCoin = $vendCoin->collected_coins + $price;\n\n\t\t\t// - START - variable totalCoinsLeft is the predicted left amount after purchasing the item so if\n\t\t\t// the totalCoinsLeft variable value is negative - means users money is insufficient to afford the item\n\n\t\t\tif ($totalCoinsLeft < 0) {\n\t\t\t\techo 'sorry you dont have enough money to buy an item';\n\t\t\t} else {\n\t\t\t\tif ($qty <= 0) {\n\t\t\t\t\techo 'sorry the item you request is not yet refilled';\n\t\t\t\t} else {\n\t\t\t\t\t// - START - updates the quantity of specific item in vending machine database after someone purchase \n\t\t\t\t\t$stmt = $this->connect()->prepare($qry2);\n\t\t\t\t\t$stmt->execute([$qty - 1, $totalVendCoin]);\n\t\t\t\t\tif (!$stmt) {\n\t\t\t\t\t\techo 'Have an error querying query 2';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$_SESSION['coins'] = $totalCoinsLeft;\n\t\t\t\t\t\t// - START - updates the users coin by the totalleftcoin \n\t\t\t\t\t\t$stmt = $this->connect()->prepare($qry3);\n\t\t\t\t\t\t$stmt->execute([$totalCoinsLeft, $id]);\n\t\t\t\t\t\tif (!$stmt) {\n\t\t\t\t\t\t\techo 'Have an error querying query 3';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// - START - return the item to the users inventory\n\t\t\t\t\t\t\t$stmt = $this->connect()->prepare($qry4);\n\t\t\t\t\t\t\t$stmt->execute([$currentQuantity + 1, $id]);\n\t\t\t\t\t\t\tif (!$stmt) {\n\t\t\t\t\t\t\t\techo 'Have an error querying query 4';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\techo \"<h2 style='text-align: center; padding: 10px;'>Successfully bought the item</h2>\";\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}", "title": "" }, { "docid": "60681a6b6a2a3fd9bce20e27ce8efaf5", "score": "0.5603494", "text": "function payUser($email,$amount)\n{\n\t$x=isAdmin();\n\tif($x===false) return error_unauthorized_action();\n\t$r=$gf->query(\"update pc_users set u_balance=u_balance+$amount where u_email='$email'\");\n\treturn true;\n}", "title": "" }, { "docid": "387cb78ac8efec32368628b11414b84c", "score": "0.55759084", "text": "private function updateUserWallet($amount){\n //lets make sure its the same user and they are still logged in\n $userManager = $this->container->get('fos_user.user_manager');\n $auth_checker = $this->get('security.authorization_checker');\n $token = $this->get('security.token_storage')->getToken();\n $user = $token->getUser();\n \n // $user = $userManager->findUserBy(array('id'=>$user));\n $hasCred = $user->getCredit();\n $newCredit = $hasCred - $amount;\n $user->setCredit($newCredit);\n $thedata = $userManager->updateUser($user, true);\n \n return true;\n \n }", "title": "" }, { "docid": "a3e49cbf2b2661bd4c05beb65af3d61b", "score": "0.5546538", "text": "public function sendDataToUser($user_id,$action,$data){\n\t\tforeach($this->connections as $connection_id=>$user_id_l){\n\t\t\techo \"C\".$connection_id;\n\t\t\tif($user_id_l==$user_id){\n\t\t\t\t$this->sendDataToConnection($connection_id,$action,$data);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "53c25d2389c60fcd488822759cdd7c32", "score": "0.5526134", "text": "public function sendDataToUser($user_id,$action,$data){\n\t\tforeach($this->connections as $connection_id=>$user_id_l){\n\t\t\tif($user_id_l==$user_id){\n\t\t\t\t$this->sendDataToConnection($connection_id,$action,$data);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "63d03453d6f2fafe0d180b466377aa63", "score": "0.5482104", "text": "public function actionCommit() {\n\t\t$points = $_GET['points'];\n\t\t$fb_id = FacebookController::getUserID();\n\t\tUserController::addPointsToUser($fb_id,$points);\n\t\tTransactionController::addTransaction($fb_id,\"Purchase \". $points);\n\t\techo \"Purchase done successfully\";\n\t}", "title": "" }, { "docid": "ef3d5d07538e7a74d6b4a4e44a3d6bb5", "score": "0.54364616", "text": "function sendMpesaMoney($Amount,$CommandID,$PartyB, $Remarks)\n{\n return (new \\Manuelgeek\\MpesaB2C\\B2C())->sendMpesaMoney($Amount,$CommandID,$PartyB, $Remarks);\n}", "title": "" }, { "docid": "9cd9b3cfd8bd4ace7d27353cffd72c0d", "score": "0.5414285", "text": "function send_changes_admin($name, $mail, $user,$pass, $id)\n{\n\t$hash = password_hash($pass, PASSWORD_BCRYPT);\n\t$bdd = connect_db(\"localhost\", \"root\", \"root\", \"3306\", \"pool_php_rush\");\n\t$bdd->exec(\"UPDATE users SET username = '$name', email = '$mail', password = '$hash' where id = '$id'\");\n\t\n}", "title": "" }, { "docid": "c9a763b8676617dde50a68b1cc2133f7", "score": "0.5375809", "text": "function sendEthereumTransaction(array $body){\n return $this->ethBroadcast($this->prepareEthereumSignedTransaction($body));\n }", "title": "" }, { "docid": "229572919d663eb4c21cfdd089eaf7c8", "score": "0.53699046", "text": "public function withdraw($coinName, $amount, $address);", "title": "" }, { "docid": "3b7f94a1c75eb2668fd89e57ffc0d6b4", "score": "0.5354771", "text": "function addFunds($db, $username, $amount) {\n $sql = \"UPDATE users SET money = money + $amount WHERE username = '$username'\";\n return mysqli_query($db, $sql);\n}", "title": "" }, { "docid": "04187def42f718c3df1d67f0924ae184", "score": "0.533577", "text": "public function sendBenefitToPlayer(User $User,$Exp,$Crediits)\n\t{\n\t\t$MessageManager= new MessageManager();\n\t\t$Message=new Message(0,SYSTEM_NAME,$User->getName(),\":T_MESSAGE_TRANS_REC: \".$Crediits.\" :T_HEADER_CREDITS:\",\":T_MESSAGE_TRANS_TITLE:\",\"\",0,0,0,0);\t\n\t\t$MessageManager->saveNewMessage($Message);\n\t}", "title": "" }, { "docid": "f5f9c3d9fb4f4b1688577cb2a568cf34", "score": "0.532569", "text": "function _updateTransaction($dealUser)\r\n\t{\r\n\t\t//add amount to wallet\r\n\t\t$data['Transaction']['user_id'] = $dealUser['user_id'];\r\n\t\t$data['Transaction']['foreign_id'] = ConstUserIds::Admin;\r\n\t\t$data['Transaction']['class'] = 'SecondUser';\r\n\t\t$data['Transaction']['amount'] = $dealUser['discount_amount'];\r\n\t\t$data['Transaction']['transaction_type_id'] = ConstTransactionTypes::AddedToWallet;\r\n\t\t$data['Transaction']['payment_gateway_id'] = $dealUser['payment_gateway_id'];\t\t\r\n\t\t$transaction_id = $this->User->Transaction->log($data);\r\n\t\tif (!empty($transaction_id)) {\r\n\t\t\t$this->User->updateAll(array(\r\n\t\t\t\t'User.available_balance_amount' => 'User.available_balance_amount +' . $dealUser['discount_amount']\r\n\t\t\t) , array(\r\n\t\t\t\t'User.id' => $dealUser['user_id']\r\n\t\t\t));\r\n\t\t}\r\n\t\t//Buy deal transaction\r\n\t\t$transaction['Transaction']['user_id'] = $dealUser['user_id'];\r\n\t\t$transaction['Transaction']['foreign_id'] = $dealUser['id'];\r\n\t\t$transaction['Transaction']['class'] = 'DealUser';\r\n\t\t$transaction['Transaction']['amount'] = $dealUser['discount_amount'];\r\n\t\t$transaction['Transaction']['transaction_type_id'] = (!empty($dealUser['is_gift'])) ? ConstTransactionTypes::DealGift : ConstTransactionTypes::BuyDeal;\r\n\t\t$transaction['Transaction']['payment_gateway_id'] = $dealUser['payment_gateway_id'];\r\n\t\tif(!empty($dealUser['rate'])){\r\n\t\t\t$transaction['Transaction']['currency_id'] = $dealUser['currency_id'];\r\n\t\t\t$transaction['Transaction']['converted_currency_id'] = $dealUser['converted_currency_id'];\r\n\t\t\t$transaction['Transaction']['converted_amount'] = $dealUser['authorize_amt'];\r\n\t\t\t$transaction['Transaction']['rate'] = $dealUser['rate'];\r\n\t\t}\r\n\t\t$this->User->Transaction->log($transaction);\r\n\t\t//user update\r\n\t\t$this->User->updateAll(array(\r\n\t\t\t'User.available_balance_amount' => 'User.available_balance_amount -' . $dealUser['discount_amount']\r\n\t\t) , array(\r\n\t\t\t'User.id' => $dealUser['user_id']\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "34587531c3ca4755f1bc133bcd3de8bc", "score": "0.5324451", "text": "function btcGetUTXO(string $hash, int $i){\n return $this->get(\"/{$this->getRoute('BTC')}/utxo/{$hash}/{$i}\");\n}", "title": "" }, { "docid": "abd4a0b3674459b3361662f1c43005c8", "score": "0.5314271", "text": "function updateDepositCash($amount, $username, $is_credit){\n if($is_credit){\n $update_user = \"UPDATE users SET deposit_cash = deposit_cash + $amount WHERE username = '$username' \";\n $this->con->query($update_user); \n }\n else{\n $update_user = \"UPDATE users SET deposit_cash = deposit_cash - $amount WHERE username = '$username' \";\n $this->con->query($update_user);\n }\n }", "title": "" }, { "docid": "737b87a81663b15f49875ae65871a6bc", "score": "0.530706", "text": "function transfer_money($message) {\n return true;\n}", "title": "" }, { "docid": "d276c99d540230c5de38d0d9eecc83c4", "score": "0.5302129", "text": "function SendFriendRequest($user_id, $friend_id) {\n $request_sent = 1;\n $request_read = 0;\n $query = \"INSERT INTO friend_requests VALUES(?,?,?,?)\";\n $stmt = $this->mys->prepare($query);\n $stmt->bind_param( 'iiii', $user_id, $friend_id, $request_sent, $request_read);\n if($result = $stmt->execute()) {\n $stmt->close();\n $retVal = 1;\n } else {\n $retVal = 0;\n }\n return $retVal;\n }", "title": "" }, { "docid": "338b5979853a55d154da137332788439", "score": "0.5299679", "text": "public function sent(User $user)\n {\n return true;\n }", "title": "" }, { "docid": "bbe1eb89791c75617231a7fdc8083026", "score": "0.52909356", "text": "function buyShares(){\n\t\t//connects to ongoing session\n\t\tif(!isset($_SESSION)){session_start();}\n\t\t$_SESSION['buyError']='';\n\t\t$_SESSION['buySuccess']='';\n\n\t\t$amount = $_POST['price'] * $_POST['numbShares'];\n\t\t\n\t\tif($amount > $_SESSION['balance']){\n\t\t\t$_SESSION['buyError'] = 'Not enough money in your brokerage account';\n\t\t}\n\t\telse{\n\t\t\t$_SESSION['balance'] = $_SESSION['balance'] - $amount;\n\t\t\t$_SESSION['buySuccess'] = 'Shares bought successfully';\n\t\t\t$_SESSION['numbShares'] = $_POST['numbShares'];\n\t\t\t\n\t\t\t$this->getmodel('User')->buy($_SESSION['stock_info']->quotes->quote->symbol, $_SESSION['numbShares'], $_SESSION['accountnumber'], $_POST['price'], $amount);\n\t\t}\n\t\t\n\t\t\n\t\t$this->main();\n\t}", "title": "" }, { "docid": "a71b87bee6b6b16531a92c3f755579ba", "score": "0.5289471", "text": "function sendUserDetails($user, $password)\n {\n $merchant_details = MerchantMaster::find()->where(['MERCHANT_ID'=>$user->MERCHANT_ID])->one();\n $cc = '';\n $name = '=?UTF-8?B?' . base64_encode('Partnerpay') . '?=';\n $headers = \"From: $name <\" . \\Yii::$app->params['noreplyEmail'] . \">\\r\\n\" .\n \"Cc: \" . $cc . \"\\r\\n\" .\n // \"Reply-To: \".$model->email.\"\\r\\n\".\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-type:text/html;charset=UTF-8\";\n if($user->USER_TYPE == 'partner') {\n\n $subject = '=?UTF-8?B?' . base64_encode('Start Creating invoices for '. $merchant_details->MERCHANT_NAME) . '?=';\n\n $body = '<div style=\"font-family:arial;font-size:12px;line-height:16px;\">Dear ' . ucfirst(strtolower($user->FIRST_NAME)) . ' ' . ucfirst(strtolower($user->LAST_NAME)) . ',\n <br><br>Your Partner account has been successfully created for Partnerpay. <br><br>\n You can use the following account details to login and start creating your invoices for '. $merchant_details->MERCHANT_NAME . '<br><br>Url : http://' . $merchant_details->DOMAIN_NAME . '.partnerpay.co.in<br>Email Id : ' . $user->EMAIL . '<br>\n\n Password : ' . $user->PASSWORD . '\n <br><br>\n Thank you!<br> Team\n ' . \\Yii::$app->params['Name'] . '</div>';\n }\n \n if($user->USER_TYPE == 'guestuser'){\n $subject = '=?UTF-8?B?' . base64_encode('Start Creating invoices for '. $merchant_details->MERCHANT_NAME) . '?=';\n\n $body = '<div style=\"font-family:arial;font-size:12px;line-height:16px;\">Dear User,\n <br><br>Your guest account has been successfully created for Partnerpay. <br><br>\n You can use the following account details to login and start creating your invoices for '. $merchant_details->MERCHANT_NAME . '<br><br>Url : http://' . $merchant_details->DOMAIN_NAME . '.partnerpay.co.in<br>Email Id : ' . $user->EMAIL . '<br>\n\n Password : ' . $user->OG_PASSWORD . '\n <br><br>\n Thank you!<br> Team\n ' . \\Yii::$app->params['Name'] . '</div>';\n } \n \n \n $result = mail($user->EMAIL, $subject, $body, $headers);\n if($result) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "a5e116f94325c215f87bca7cb3f8056d", "score": "0.52818316", "text": "public static function sendItem_doTransaction\n\t(\n\t\t$senderID\t\t// <int> The UniID sending the item.\n\t,\t$recipientID\t// <int> The UniID receiving the item.\n\t,\t$itemID\t\t\t// <int> The ID of the item that the sender is exchanging.\n\t,\t$desc = \"\"\t\t// <str> The description for the log.\n\t,\t$anon = false\t// <bool> Whether to show it as anonymous or not.\n\t)\t\t\t\t\t// RETURNS <bool> TRUE if the item was sent, FALSE if it failed.\n\t\n\t// AppTrade::sendItem_doTransaction($senderID, $recipientID, $itemID);\n\t{\n\t\t// Check that you own the item\n\t\t$own = AppAvatar::checkOwnItem($senderID, $itemID);\n\t\tif(!$own)\t{ return false; }\n\t\t\n\t\tif(!$anon)\n\t\t{\n\t\t\t$success = Database::query(\"UPDATE user_items SET uni_id=? WHERE uni_id=? and item_id=? LIMIT 1\", array($recipientID, $senderID, $itemID));\n\t\t\tif($success)\n\t\t\t{\n\t\t\t\tAppAvatar::record($senderID, $recipientID, $itemID, ($desc != \"\" ? $desc . \": \" : \"\") . \"Gift or Trade\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$recipient = User::get($recipientID, \"handle\");\n\t\t\t$pass1 = AppAvatar::receiveItem($recipientID, $itemID, ($desc != \"\" ? $desc . \": \" : \"\") . \"Anonymous Gift\");\n\t\t\t$pass2 = AppAvatar::dropItem($senderID, $itemID, ($desc != \"\" ? $desc . \": \" : \"\") . \"Anonymous Gift to \" . $recipient['handle']);\n\t\t\t$success = ($pass1 !== false && $pass2 !== false ? true : false);\n\t\t}\n\t\t\n\t\t// update cached layers\n\t\tCache::delete(\"invLayers:\" . $senderID);\n\t\tCache::delete(\"invLayers:\" . $recipientID);\n\t\t\n\t\t// update avatars if necessary\n\t\tif(!AppAvatar::checkOwnItem($senderID, $itemID))\n\t\t{\n\t\t\tAppOutfit::removeFromAvatar($senderID, $itemID);\n\t\t}\n\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "19c4a63906c929c42e4f83eae1b62242", "score": "0.5254348", "text": "public function sendPinCode($pin, $user)\n {\n $phone = $user->phones->where('type', 'phone')->first();\n if($phone)\n { $nexmo = app('Nexmo\\Client');\n $nexmo->message()->send([\n 'to' => $phone->country->code.''.$phone->number,\n 'from' => '0610256365',\n 'text' => 'Mr '.$user->name.' this is your code to reset password.'.$pin->code\n ]);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "becc0f5f9a0ca26267f5232b6ea67ac6", "score": "0.52410257", "text": "public function run() {\n $user = User::factory()->create();\n $user->wallet()->save(Wallet::factory()->make());\n\n $wallet = Wallet::query()->first();\n\n $coins = Coin::factory(Coin::class)->count(2)->make();\n\n $wallet->coins()->saveMany($coins);\n }", "title": "" }, { "docid": "e9806b3ce65812c36b416b22a34482c4", "score": "0.5212696", "text": "function accountActivation($user_id)\n{\n $user = getFullUserById($user_id);\n return sendActivationMail($user[\"email\"], $user_id, updateCode($user_id));\n}", "title": "" }, { "docid": "0cd93d9d1c635f36b9c70c84ad103bc6", "score": "0.5203485", "text": "public function sendPush(Transaction $transaction, User $user)\n {\n /**\n * We concat user - to AlertAmount (ex. 50, to make -50)\n * Because payments from bank arrive like this float(-51.5),\n * So we have to transform our float(50) to float(-50)\n * And the comparaison symbole \">\" is now \"<\"\n */\n //if (($transaction->getAmount() < (- $user->getOptions()->getAlertAmount())) && $user->getOptions()->getAllowEmail()) {\n if ($transaction->getAmount() && $user->getPushoverToken() && $user->getPushoverUser()) {\n //var_dump($transaction->getAmount()); /* sending mail here ! an eventdispatcher ! */\n curl_setopt_array($ch = curl_init(), array(\n CURLOPT_URL => \"https://api.pushover.net/1/messages.json\",\n CURLOPT_POSTFIELDS => array(\n \"token\" => $user->getPushoverToken(),\n \"user\" => $user->getPushoverUser(),\n \"message\" => $transaction->getAmount() . \"€ from account \" . $transaction->getAccount()->getName() . \"\\n\" .\n \"New solde \" . $transaction->getAccount()->getBalance() . \" (before \" . $transaction->getAccount()->getBalanceHistory()->offsetGet($transaction->getAccount()->getBalanceHistory()->count() - 2)->getBalance() . \")\\n\" .\n $transaction->getLabel() . \"\\n\" .\n $transaction->getLabel2() . \"\\n\",\n ))); /* offsetGet, obtain old balance to add in notification. count all balancehistory and get -2 */\n curl_exec($ch);\n curl_close($ch);\n }\n }", "title": "" }, { "docid": "0fa65b535d35f26030091ab150f3c789", "score": "0.5186351", "text": "public function addUserToWalletAction($id,$type,$credits,$mode)\n{\n $em = $this->getDoctrine()->getManager();\n $wallet = new Wallet();\n if($type==0)\n {\n $wallet->setPrepaid($credits);\n $wallet->setPostpaid(0);\n }\n else\n {\n $wallet->setPostpaid($credits);\n $wallet->setPrepaid(0);\n }\n $wallet->setUser($id);\n $wallet->setRef($id);\n $wallet->setStatus(0);\n $wallet->setDuration(0);\n\n $wallet->setDate(date('d-m-Y'));\n $em->persist($wallet);\n $em->flush();\n $time=date('h-i a');\n $this->addWalletLogsAction($id,0,$credits,date('d-m-Y'),$credits,'Added By MarketBhaav',$type,'0',$time,$mode);\n return $id;\n}", "title": "" }, { "docid": "ef80f0ebd85f0f435956bcd48b428742", "score": "0.51796114", "text": "function sendNotification($profile_id, $uid, $pdo){\n\tif (profileBlocked($uid, $profile_id, $pdo))\n\t\treturn;\n\t$query = \"UPDATE `users` SET num_notifications = num_notifications + 1 WHERE id=$profile_id\";\n\t$stmt = $pdo->prepare($query);\n\t$stmt->execute();\n}", "title": "" }, { "docid": "5d2dab030126cdfe970b3c62db2353ae", "score": "0.5169153", "text": "function block_user($user_id = null)\n{\n\n\tglobal $_TABLES;\n\n\tif (isset($_REQUEST['user_id']) && !empty($_REQUEST['user_id']))\n\t{\n\t\t$user_id = $_REQUEST['user_id'];\n\t}\n\n\tif ($user_id != null)\n\t{\n\t\t$query = \"INSERT INTO {$_TABLES['blocked_users']} (`user_id`, `timestamp`) VALUES ({$user_id}, now() ) \";\n\t\t$result = DB_query($query);\n\t\techo $result;\n\t\tif ($result == true)\n\t\t{\n\t\t\t$query = \"DELETE t.*, v.* FROM {$_TABLES['translations']} as t JOIN {$_TABLES['votes']} as v ON t.id=v.translation_id WHERE t.user_id = {$user_id}\";\n\t\t\t$result = DB_query($query);\n\t\t\t$query = \"DELETE FROM {$_TABLES['awarded_gems']} WHERE `user_id` = {$user_id} \";\n\t\t\t$result = DB_query($query);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "989d488425735b40a052b277a865ef48", "score": "0.5161442", "text": "protected function giveUnits($userId)\n {\n $units = (int)$this->params->get(\"give_units_number\", 0);\n $currencyId = $this->params->get(\"give_units_unit\");\n\n if (!empty($units) and !empty($currencyId)) {\n\n jimport(\"virtualcurrency.currency\");\n $currency = VirtualCurrencyCurrency::getInstance(JFactory::getDbo(), $currencyId);\n\n if ($currency->getId()) {\n\n // Get the id of the sender ( the bank that generates currency )\n $componentParams = JComponentHelper::getParams(\"com_virtualcurrency\");\n /** @var $componentParams Joomla\\Registry\\Registry */\n\n $senderId = $componentParams->get(\"payments_bank_id\");\n\n // Get account ID\n JLoader::register(\n \"VirtualCurrencyHelper\",\n JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . \"components\" . DIRECTORY_SEPARATOR . \"com_virtualcurrency\" .\n DIRECTORY_SEPARATOR . \"helpers\" . DIRECTORY_SEPARATOR . \"virtualcurrency.php\"\n );\n\n $keys = array(\n \"user_id\" => $userId,\n \"currency_id\" => $currency->getId(),\n );\n\n // Add the units to the account\n jimport(\"virtualcurrency.account\");\n $account = new VirtualCurrencyAccount(JFactory::getDbo());\n $account->load($keys);\n $account->increaseAmount($units);\n $account->updateAmount();\n\n // Store transaction\n jimport(\"virtualcurrency.transaction\");\n $transaction = new VirtualCurrencyTransaction(JFactory::getDbo());\n\n $seed = substr(md5(uniqid(time() * rand(), true)), 0, 16);\n\n $data = array(\n \"units\" => $units,\n \"txn_id\" => JString::strtoupper(\"GEN_\" . JString::substr(JApplicationHelper::getHash($seed), 0, 16)),\n \"txn_amount\" => 0,\n \"txn_currency\" => $currency->getCode(),\n \"txn_status\" => \"completed\",\n \"service_provider\" => \"System\",\n \"currency_id\" => $currency->getId(),\n \"sender_id\" => $senderId,\n \"receiver_id\" => $userId\n );\n\n $transaction->bind($data);\n $transaction->store();\n }\n\n // Integrate with notifier\n\n // Notification services\n $nServices = $this->params->get(\"give_units_integrate\");\n if (!empty($nServices)) {\n $message = JText::sprintf(\"PLG_USER_VIRTUALCURRENCYNEWACCOUNT_NOTIFICATION_AFTER_REGISTRATION\", $units, $currency->getTitle());\n $this->notify($nServices, $message, $userId);\n }\n\n }\n\n }", "title": "" }, { "docid": "8d5b6f2f71937b0c0ae5ef60a5aeacbf", "score": "0.51613", "text": "public function send(User $user)\n {\n return true;\n }", "title": "" }, { "docid": "7d7f36017079e5b1cabb535c0b5e7c8f", "score": "0.51544803", "text": "function send( $user_id, $xml, $send_raw = false, $type = \"game\" ) {\r\n\t\tif ( $send_raw ) {\r\n\t\t\tparent::send( $user_id, $xml, true );\r\n\t\t}\r\n\t\telse {\r\n\t\t\tparent::send( $user_id, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><s><t>\" . $type . \"</t>\" . $xml . \"</s>\" );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5aeb279c767b81ea7ecdf63bfbbac407", "score": "0.5137912", "text": "public function childCreateUnderUserAccount_post(){\n // digiebot.com\n // YaAllah\n $usernameSend = md5($this->input->server('PHP_AUTH_USER')); \n $passwordSend = md5($this->input->server('PHP_AUTH_PW'));\n\n if($usernameSend == '1755e99ca881fc22958890d7a41b026b' && $passwordSend == 'fa6b9d534c05016dc660f93daefbf3d0'){\n if( !empty($this->post('_id')) && !empty($this->post('trasectionId')) && !empty($this->post('userid')) && !empty($this->post('purchase_price')) && !empty($this->post('exchange')) ){\n $coin_array = ['XMRBTC','XLMBTC','ETHBTC','XRPBTC', 'NEOBTC', 'QTUMBTC', 'XEMBTC', 'POEBTC', 'TRXBTC', 'ZENBTC', 'ETCBTC', 'EOSBTC', 'LINKBTC', 'DASHBTC', 'ADABTC'];\n \n if($this->post('exchange') == 'binance'){\n exit;\n }\n $purchase_price = (float)$this->post('purchase_price');\n $userid = (string)$this->post('userid');\n $orderId = (string)$this->post('trasectionId');\n $createdDate = $this->post('created_date');\n\n $quantity = (float)$this->post('quantity');\n $symbol = $this->post('symbol');\n $exchange = $this->post('exchange');\n\n $db = $this->mongo_db->customQuery();\n\n $walletCollection = ($exchange == 'binance')? 'user_wallet': 'user_wallet_'.$exchange;\n $buyOrdersColcton = ($exchange == 'binance')? 'buy_orders': 'buy_orders_'.$exchange;\n $tradeHistoryCollection = ($exchange == 'binance')? 'user_trade_history' : 'user_trade_history_'.$exchange;\n\n if($exchange == 'kraken'){\n if(in_array($symbol, $coin_array)){\n\n $getCoinBalance['coin_symbol'] = str_replace('BTC', '' ,$symbol);\n }else{\n $getCoinBalance['coin_symbol'] = str_replace('USDT', '' ,$symbol);\n }\n }elseif($exchange == 'binance'){\n\n $getCoinBalance['coin_symbol'] = $symbol;\n }elseif($exchange == 'bam'){\n\n $getCoinBalance['coin_symbol'] = $symbol;\n }\n $getCoinBalance['user_id'] = $userid;\n\n\n $getCoinBalance = $db->$walletCollection->find($getCoinBalance);\n $getCoinBalanceRes = iterator_to_array($getCoinBalance);\n\n $getOrderLookUp = [\n [\n '$match' => [\n\n 'admin_id' => (string)$userid,\n 'application_mode' => 'live',\n 'status' => ['$nin' => ['credentials_ERROR','canceled_ERROR','error' ,'new', 'new_ERROR', 'canceled', 'pause', 'submitted_buy', 'fraction_submitted_buy']],\n 'parent_status' => ['$ne' => 'parent'],\n 'cost_avg' => ['$ne' => 'completed'],\n 'is_sell_order' => ['$nin' => ['sold', 'resume_pause']],\n 'resume_status' => ['$ne' => 'completed'],\n 'symbol' => $symbol,\n ]\n\n ],\n [\n '$addFields' => [\n\n 'coinBalanceTotalSum' => ['$sum' => ['$quantity']]\n ]\n\n ],\n ];\n\n $getOrders = $db->$buyOrdersColcton->aggregate($getOrderLookUp);\n $getOrdersRes = iterator_to_array($getOrders);\n\n $coin_balance = (float)$getCoinBalanceRes[0]['coin_balance'];\n $coinBalanceTotalSum = (float)$getOrdersRes[0]['coinBalanceTotalSum'];\n\n if( ($coin_balance - $coinBalanceTotalSum) >= $quantity ){\n\n $getUserTradingIp['_id'] = $this->mongo_db->mongoId($userid);\n $getUsers = $db->users->find($getUserTradingIp);\n $getUsersresponse = iterator_to_array($getUsers);\n \n $trading_ip = $getUsersresponse[0]['trading_ip'];\n \n $price_search['coin'] = $symbol;\n $this->mongo_db->where($price_search);\n \n if($this->post('exchange') == 'binance'){\n \n $priceses = $this->mongo_db->get('market_prices');\n $buy_array_collection = 'buy_orders';\n $sell_array_collection = 'orders';\n }elseif($this->post('exchange') == 'bam'){\n \n $priceses = $this->mongo_db->get('market_prices_bam');\n $buy_array_collection = 'buy_orders_bam';\n $sell_array_collection = 'orders_bam';\n }elseif($this->post('exchange') == 'kraken'){\n \n $priceses = $this->mongo_db->get('market_prices_kraken');\n $buy_array_collection = 'buy_orders_kraken';\n $sell_array_collection = 'orders_kraken';\n }\n $market_prices = iterator_to_array($priceses);\n $current_market = $market_prices[0]['price'];\n \n $sell_price = (float)((($purchase_price / 100)* 1.2) + $purchase_price);\n $iniatial_trail_stop = (float)($purchase_price - (($purchase_price / 100)*1.2));\n $current_datetime = $this->mongo_db->converToMongodttime(date('Y-m-d H:i:s'));\n $buy_array = [\n 'price' => $purchase_price,\n 'quantity' => $quantity, \n 'symbol' => $symbol,\n 'trading_ip' => $trading_ip,\n 'admin_id' => $userid,\n 'sell_price' => (float)$sell_price,\n 'lth_functionality' => 'yes',\n 'activate_stop_loss_profit_percentage' => (float)1.2,\n 'lth_profit' => (float)1.2,\n 'stop_loss_rule' => 'custom_stop_loss',\n 'trigger_type' => 'barrier_percentile_trigger',\n 'order_level' => 'level_11',\n 'created_date' => $this->mongo_db->converToMongodttime(date('Y-m-d H:i:s' ,$createdDate)),\n 'modified_date' => $current_datetime,\n 'mapped_date' => $current_datetime, \n 'application_mode' => 'live',\n 'order_mode' => 'live', \n 'created_buy' => 'asimScript',\n 'market_value' => (float)$current_market,\n 'iniatial_trail_stop' => $iniatial_trail_stop,\n 'defined_sell_percentage' => (float)1.2,\n 'sell_profit_percent' => (float)1.2,\n 'is_sell_order' => 'yes', \n 'auto_sell' => 'yes',\n 'purchased_price' => $purchase_price,\n 'status' => 'FILLED',\n 'sell_order_id' => '',\n 'exchange' => $this->post('exchange'),\n 'buy_fraction_filled_order_arr' => [\n 'filledPrice' => $purchase_price,\n 'commission' => '0',\n 'commissionPercentRatio' => '0',\n 'orderFilledId' => $orderId,\n 'filledQty' => $quantity,\n ],\n ];\n if($this->post('exchange') == 'kraken'){\n \n $buy_array['kraken_order_id'] = $orderId;\n $buy_array['tradeId'] = $orderId;\n }elseif($this->post('exchange') == 'binance'){\n \n $buy_array['binance_order_id'] = $orderId;\n $buy_array['tradeId'] = $orderId;\n }\n \n $sell_array = [\n 'symbol' => $symbol,\n 'quantity' => $quantity, \n 'market_value' => (float)$current_market,\n 'sell_price' => (float)$sell_price, \n 'lth_functionality' => 'yes',\n 'lth_profit' => (float)1.2,\n 'activate_stop_loss_profit_percentage' => (float)1.2,\n 'stop_loss_rule' => 'custom_stop_loss',\n 'order_type' => 'market_order',\n 'admin_id' => $userid,\n 'trading_ip' => $trading_ip,\n 'created_date' => $this->mongo_db->converToMongodttime(date('Y-m-d H:i:s',$createdDate)),\n 'mapped_date' => $current_datetime,\n 'modified_date' => $current_datetime,\n 'application_mode' => 'live',\n 'trigger_type' => 'barrier_percentile_trigger',\n 'order_level' => 'level_11',\n 'buy_order_id' => '',\n 'created_buy' => 'asimScript',\n 'iniatial_trail_stop' => $iniatial_trail_stop,\n 'order_mode' => 'live',\n 'sell_profit_percent' => (float)1.2,\n 'status' => 'new',\n 'purchased_price' => $purchase_price,\n 'defined_sell_percentage' => (float)1.2\n ];\n \n $buy_return = $db->$buy_array_collection->insertOne($buy_array); // insert buy array\n $sell_return = $db->$sell_array_collection->insertOne($sell_array); // insert sell array\n $sell_set =[\n 'buy_order_id' =>$buy_return->getInsertedId()\n ];\n $buy_set =[\n 'sell_order_id' => $sell_return->getInsertedId()\n ];\n $where_buy['_id'] = $sell_return->getInsertedId();\n $where_buy['admin_id'] = $userid;\n $res = $db->$sell_array_collection->updateOne($where_buy, ['$set'=> $sell_set]);\n \n $where_sell['_id'] = $buy_return->getInsertedId();\n $where_sell['admin_id'] = $userid;\n $res = $db->$buy_array_collection->updateOne($where_sell, ['$set'=> $buy_set]);\n \n $id = (string)$buy_return->getInsertedId();\n $exchange = $this->post('exchange');\n $date = date('Y-m-d G:i:s');\n \n $insert_log_array = array(\n 'order_id' => $id,\n 'created_date' => $this->mongo_db->converToMongodttime(date('Y-m-d H:i:s')),\n 'log_msg' => 'order map using trade history report',\n 'type' => 'map trade history button',\n 'show_hide_log' => 'yes'\n );\n \n if ($exchange == 'binance') {\n $collection1 = \"orders_history_log_live_\" . date('Y') . \"_\" . date('m', strtotime('-1 month'));\n } elseif($exchange == 'bam') {\n $collection1 = \"orders_history_log_\" . $exchange . \"_live_\" . date('Y') . \"_\" . date('m', strtotime('-1 month'));\n } elseif($exchange == 'kraken') {\n $collection1 = \"orders_history_log_\" . $exchange . \"_live_\" . date('Y') . \"_\" . date('m', strtotime('-1 month'));\n }\n \n if ( !empty($exchange) ) {\n $this->mongo_db->insert($collection1, $insert_log_array);\n }\n \n //update order under trade history collection\n $updateOrder['_id'] = $this->mongo_db->mongoId((string)$this->post('_id'));\n $db->$tradeHistoryCollection->updateOne($updateOrder, ['$set' => ['status' => 'user_map']]);\n //end\n\n $returnResponseArray = [\n 'exhange' => $exchange,\n 'level' => 'level_11',\n 'trading_ip' => $trading_ip,\n 'admin_id' => $userid,\n 'purchased_price' => $purchase_price,\n 'quantity' => $quantity,\n 'symbol' => $symbol,\n 'quantity' => $quantity,\n 'digie commited' => $getOrdersRes[0]['coinBalanceTotalSum'],\n 'Coinbalance' => $getCoinBalanceRes[0]['coin_balance'],\n 'trasection_id' => $orderId,\n 'status' => 'successfully created child under this userid and exchange' \n ];\n $this->set_response($returnResponseArray, REST_Controller::HTTP_CREATED);\n }else{\n $response = array(\n 'response' => 'Balance issue',\n 'quantity' => $quantity,\n 'digie commited'=> $getOrdersRes[0]['coinBalanceTotalSum'],\n 'Coinbalance' => $getCoinBalanceRes[0]['coin_balance'],\n 'type' => '404'\n );\n $this->set_response($response, REST_Controller::HTTP_NOT_FOUND);\n }\n }else{\n $response = array(\n 'response' => 'parameters wrong',\n 'type' => '404'\n );\n $this->set_response($response, REST_Controller::HTTP_NOT_FOUND);\n }\n }else{\n $response = array(\n 'response' => 'Authentication field',\n 'type' => '404'\n );\n $this->set_response($response, REST_Controller::HTTP_NOT_FOUND);\n }\n }", "title": "" }, { "docid": "34c7ccff4a743a96456472687d3410bf", "score": "0.51362205", "text": "public static function transaction ($type,$tData,$user) {\n\n\t\tif(!($user instanceof User)) {\n\t\t\tif(MongoId::isValid($user)){\n\t\t\t\t$user = User::find($user);\n\t\t\t\tif(empty($user)){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$creditObj = [\n\t\t\t\t\t\"type\"=>$type=='credit'?1:0,\n\t\t\t\t\t\"credit\"=>$tData['credit'],\n\t\t\t\t\t\"method\"=>$tData['method'],\n\t\t\t\t\t\"reference\" => $tData['reference'],\n\t\t\t\t\t\"user\" => new mongoId($user->_id)\n\t\t\t\t];\n\n\t\tif(isset($tData['extra'])){\n\t\t\t$creditObj['extra'] = $tData['extra'];\n\t\t}\n\n\t\t$totalInAcc = 0;\n\t\t$recentEarned = 0;\n\n\t\tif(isset($user->credits['total'])){\n\t\t\t$totalInAcc = $user->credits['total'];\n\t\t}\n\n\t\tif(isset($user->credits['recent']['earned'])){\n\t\t\t$recentEarned = $user->credits['recent']['earned'];\n\t\t}\n\n\n\t\tswitch ($type) {\n\n\t\t\tcase 'credit':\n\n\t\t\t\tswitch ($creditObj['method']) {\n\t\t\t\t\tcase 'order':\n\t\t\t\t\t\t$creditObj['shortComment'] = 'Earned from an order';\n\t\t\t\t\t\t$creditObj['comment'] = 'You have earned this credits xxx';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'exchange':\n\t\t\t\t\t\t$creditObj['shortComment'] = 'Earned In loyalty Exchange';\n\t\t\t\t\t\t$creditObj['comment'] = 'You have earned this credits in exchange of loyalty points';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'giftcard':\n\t\t\t\t\t\t$creditObj['shortComment'] = 'Earned As Gift';\n\t\t\t\t\t\t$creditObj['comment'] = 'You have earned this credits as gift';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t# code...\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$user->__set('credits', [\n\n\t\t\t\t\t'total'=> $totalInAcc + $tData['credit'],\n\t\t\t\t\t'recent' => [\n\t\t\t\t\t\t'earned'=>$tData['credit']\n\t\t\t\t\t]\n\n\t\t\t\t]);\n\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tswitch ($creditObj['method']) {\n\t\t\t\t\tcase 'order':\n\t\t\t\t\t\t$creditObj['shortComment'] = 'Used in order';\n\t\t\t\t\t\t$creditObj['comment'] = 'You have used this credits to pay for an order';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t# code...\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$user->__set('credits', [\n\n\t\t\t\t\t'total'=> round($totalInAcc - $tData['credit'],2),\n\t\t\t\t\t'recent' => [\n\t\t\t\t\t\t'earned'=>$recentEarned\n\t\t\t\t\t]\n\n\t\t\t\t]);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif(isset($tData['shortComment']) && !empty($tData['shortComment'])){\n\t\t\t$creditObj['shortComment'] = $tData['shortComment'];\n\t\t}\n\t\tif(isset($tData['comment']) && !empty($tData['comment'])){\n\t\t\t$creditObj['comment'] = $tData['comment'];\n\t\t}\n\t\t\n\t\ttry{\n\n\t\t\t$user->save();\n\t\t\tself::create($creditObj);\n\n\t\t\treturn ['success'=>true];\n\n\t\t}catch(\\Exception $e){\n\n\t\t\tErrorLog::create('emergency',[\n\t\t\t\t\t'error'=>$e,\n\t\t\t\t\t'message'=> 'Insert/Remove credits data:'.json_encode($creditObj)\n\t\t\t\t]);\n\n\t\t}\n\n\t\treturn ['success'=>false];\n\t\t\n\t}", "title": "" }, { "docid": "009a84f504e2458edf303ce8ba49585e", "score": "0.5131318", "text": "function getUserCoins($id)\n {\n $db = $this->connect();\n\n $result = $db->prepare(\"SELECT userCoins\n FROM users\n WHERE userID = :id\");\n $result->execute(['id' => $id]);\n $user = $result->fetch();\n\n return $user;\n }", "title": "" }, { "docid": "fa79075f15c7c390f1e23e51bcdab045", "score": "0.5131051", "text": "public function creditUser(Request $request, User $user, $id)\n {\n $request->validate([\n 'amount' => 'required',\n ]);\n\n /*\n * Get the user account balance form the users Id\n * Add users account balance to the request amount\n */\n $balance = $user->find($id);\n $acctBalance = $balance->account_balance + $request->amount;\n\n /* Update the users account balance */\n $user->Where('id', $id)->update([\n 'account_balance' => $acctBalance,\n ]);\n\n /* Add the transaction to the transaction model */\n $transaction = new Transaction();\n $transaction->amount = $request->amount;\n $transaction->status = 'completed';\n $transaction->balance = $acctBalance;\n\n $user->find($id)->transactions()->save($transaction);\n\n\n return redirect()->route('users.index')->with('status','User Account Credited Successfully');\n }", "title": "" }, { "docid": "c6e1468eb014fdcd1a872b1a1b7472df", "score": "0.51296973", "text": "public function money_can_be_transferred_from_one_account_to_another()\n {\n $this->withoutExceptionHandling();\n\n $dbCount = Transaction::count() + 1;\n\n $this->post('/api/accounts/1/transactions', [\n 'to' => 2,\n 'amount' => 3,\n 'details' => 'simple transaction'\n ]);\n\n $this->assertCount($dbCount,Transaction::all());\n\n }", "title": "" }, { "docid": "3a4282b95fc166cca7cc5b538731082e", "score": "0.51216984", "text": "public function sendEmail(){\n $user = User::find(2);\n\n Mail::to($user->email)->send(new MessageMail('Hallow', $user));\n }", "title": "" }, { "docid": "011fd4a482f43157c65b8447898b225f", "score": "0.5103253", "text": "public function send_credit_admin() {\n\t\tif ( isset( $_POST['store_credit_email_address'] ) ) {\n\n\t\t\t$email = wc_clean( $_POST['store_credit_email_address'] );\n\t\t\t$amount = wc_clean( $_POST['store_credit_amount'] );\n\n\t\t\tif ( ! $email || ! is_email( $email ) ) {\n\t\t\t\techo '<div id=\"message\" class=\"error fade\"><p><strong>' . __( 'Invalid email address.', 'woocommerce-store-credit' ) . '</strong></p></div>';\n\t\t\t} elseif ( ! $amount || !is_numeric( $amount ) ) {\n\t\t\t\techo '<div id=\"message\" class=\"error fade\"><p><strong>' . __( 'Invalid amount.', 'woocommerce-store-credit' ) . '</strong></p></div>';\n\t\t\t} else {\n\n\t\t\t\t$code = $this->generate_store_credit( $email, $amount );\n\n\t\t\t\t$this->email_store_credit( $email, $code, $amount );\n\n\t\t\t\techo '<div id=\"message\" class=\"updated fade\"><p><strong>' . __( 'Store credit sent.', 'woocommerce-store-credit' ) . '</strong></p></div>';\n\t\t\t}\n\t\t}\n\n\t\tinclude( 'views/html-admin-send-credit.php' );\n\t}", "title": "" }, { "docid": "06edd48282bdf0c965a2bd5ba81dc99a", "score": "0.5098597", "text": "protected function btc()\n {\n echo \"Migrating BTC Address...\\n\";\n $rows = (new Query())->select('*')->from('{{%billing_bitcoin_payments}}')->all();\n $collection = \\Yii::$app->mongodb->getCollection('billing_bitcoin_payments');\n $collection->remove();\n foreach ($rows as $row) {\n $collection->insert([\n 'address' => $row['address'],\n 'id_invoice' => $row['id_invoice'],\n 'id_account' => $row['id_account'],\n 'request_balance' => (float)$row['request_balance'],\n 'total_received ' => (float)$row['total_received'],\n 'final_balance' => (float)$row['final_balance'],\n 'tx_id' => $row['tx_id'],\n 'tx_date' => new UTCDateTime($row['tx_date'] * 1000),\n 'tx_confirmed' => (int)$row['tx_confirmed'],\n 'tx_check_date' => new UTCDateTime($row['tx_check_date'] * 1000),\n 'status' => $row['status'],\n 'created_at' => new UTCDateTime($row['created_at'] * 1000),\n 'updated_at' => new UTCDateTime($row['updated_at'] * 1000),\n ]);\n }\n echo \"BTC Address migration completed.\\n\";\n }", "title": "" }, { "docid": "d29ddc62122e9b848d3cfcdcc236da57", "score": "0.5096722", "text": "public function cpay($amount, $coin, $ui, $msg){\n \n return $this->paywithcp($amount, $coin, $ui, $msg);\n \n }", "title": "" }, { "docid": "74a939f2a9d230cab769275c99a4c785", "score": "0.5077842", "text": "function chargeUser($email,$amount)\n{\n\t$x=isAdmin();\n\tif($x===false) return error_unauthorized_action();\n\t$r=$gf->query(\"update pc_users set u_balance=u_balance-$amount where u_email='$email'\");\n\treturn true;\n}", "title": "" }, { "docid": "5df526cd17d182c448c2718a1bacb60f", "score": "0.5073839", "text": "function setStatePaidfromAccepted($id){\n $idHex = $this->String2Hex($id);\n //tomar el numero de caracteres, dividir por 2 para obtener el numero de bytes y pasar ese numero a hex y dezplazarlo\n $leghtIdHex = str_pad(dechex(strlen($idHex )/2), 64, \"0\", STR_PAD_LEFT);\n // bytes desde el id del metodo hasta el argumento, hex de (2*32)=64 = 40\n $argIdPos = str_pad(20, 64, \"0\", STR_PAD_LEFT);\n //keccak-256 de setStatePaidfromAccepted(string) 94bbf62345d3434672a5db3353b10667f708adaa65c4074a2cb653ba0c911c4f\n $call=\"0x94bbf623\".$argIdPos.$leghtIdHex.$idHex;\n\n $data = [\n 'jsonrpc'=>'2.0','method'=>'eth_sendTransaction','params'=>[[\n \"from\"=> self::ACCOUNT, \"to\"=> self::CONTRACT,\"gas\"=>\"0x927c0\",\"data\"=> $call]],'id'=>67\n ];\n $params= json_encode($data);\n $this->unlockAccount();\n $handler = curl_init();\n curl_setopt($handler, CURLOPT_URL, self::URl);\n curl_setopt($handler, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n curl_setopt($handler, CURLOPT_POST,true);\n curl_setopt($handler, CURLOPT_POSTFIELDS, $params);\n curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec ($handler);\n curl_close($handler);\n $json=json_decode($response,true);\n $result=$json['result'];\n\n return \"hash de la transferencia : \".$result;\n\n }", "title": "" }, { "docid": "a518eada5a86f49fa212af34dd794a50", "score": "0.50490725", "text": "public function sendTransaction($identifier, $rawTransaction, $paths, $checkFee = false, $twoFactorToken = null);", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5046046", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5046046", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5046046", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5046046", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5046046", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5046046", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5046046", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5046046", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5046046", "text": "public function send();", "title": "" }, { "docid": "0a3f7e0f936c6914673866f43c15eb52", "score": "0.504595", "text": "public function do_product_transaction($captured = \"\", $deal_id = \"\", $qty = \"\",$transaction = \"\",$userid = \"\")\n\t{\n\t\t$from = CONTACT_EMAIL;\n\t\t$this->products_list = $this->api->get_products_coupons_list($transaction,$deal_id,$userid);\n\t\t\n\t\t$this->product_size = $this->api->get_shipping_product_size();\n\t\t$this->product_color = $this->api->get_shipping_product_color(); \n $this->merchant_id = $this->products_list->current()->merchant_id;\n $this->get_merchant_details = $this->api->get_merchant_details($this->merchant_id); \n $this->merchant_firstneme = $this->get_merchant_details->current()->firstname;\n $this->merchant_lastname = $this->get_merchant_details->current()->lastname; \n $this->merchant_email = $this->get_merchant_details->current()->email; \n \n $message_merchant = new View(\"themes/\".THEME_NAME.\"/payment_mail_product_merchant\");\n \n\t\tif(EMAIL_TYPE==2) {\n\t\t\t\temail::smtp($from,$this->merchant_email, $this->Lang['USER_BUY'] ,$message_merchant);\n\t\t}else{\n\t\t email::sendgrid($from,$this->merchant_email, $this->Lang['USER_BUY'] ,$message_merchant);\n\t\t} \n\t\t$user_details = $this->api->get_purchased_user_details($userid);\n\t\tforeach($user_details as $U){\n\t\t\tif($U->referred_user_id && $U->deal_bought_count == $qty){\n\t\t\t\t$update_reff_amount = $this->api->update_referral_amount($U->referred_user_id);\n\t\t\t}\n\t\t\t$deals_details = $this->api->get_product_details_share($deal_id);\n\t\t\tif($U->facebook_update == 1){\t\t\t\t\n\t\t\t\tforeach($deals_details as $D){\n\t\t\t\t\t$dealURL = PATH.\"product/\".$D->deal_key.'/'.$D->url_title.\".html\";\n\t\t\t\t\t$message = \"I have purchased the product...\".$D->deal_title.\" \".$dealURL.\" limited offer hurry up!\";\n\t\t\t\t\t$post_arg = array(\"access_token\" => $U->fb_session_key, \"message\" => $message, \"id\" => $U->fb_user_id, \"method\" => \"post\");\n\t\t\t\t\tcommon::fb_curl_function(\"https://graph.facebook.com/feed\", \"POST\", $post_arg);\n\t\t\t\t}\n\t\t\t} \n\t\t\t\n\t\t\t/** Send Purchase details to user Email **/\n\t\t/**\tforeach($deals_details as $D){\n\t\t\t $deal_title = $D->deal_title;\n\t\t\t $deal_amount = $D->deal_value;\n\t\t\t}\n $from = CONTACT_EMAIL;\n $this->transaction_mail = array(\"deal_title\" => ucfirst($deal_title), \"item_qty\" => $qty ,\"total\" => ($deal_amount * $qty) ,\"amount\"=> ($deal_amount * $qty),\"value\" =>$deal_amount);\n $this->result_mail = arr::to_object($this->transaction_mail);\n // Mail template \n $message = new View(\"themes/\".THEME_NAME.\"/payment_mail_product\");\n email::sendgrid($from,$U->email, \"Thanks for buying from \". SITENAME ,$message); **/\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "d7cd41d1fc5333f0f4c7f13478e11be1", "score": "0.503968", "text": "function run_credits_coins_manager()\n{\n\n $onlimag = new Credits_Coins_Manager();\n $onlimag->run();\n\n}", "title": "" }, { "docid": "dae4f6a6944775a1c19a017f8e185f11", "score": "0.5029992", "text": "public function transferAmount($amount, $userAccount, $targetAccount)\n {\n // amount is not higher than requesting user's account balance \n $authentication = $this->checkBalance($amount, $userAccount);\n // If checkBalance returns true, run transaction\n if ($authentication)\n { \n try \n {\n $sql = \"SELECT * FROM account WHERE userAccountNumber = $userAccount;\";\n $userAcc = $this->_db->query($sql);\n $newUserBalance;\n\n foreach ($userAcc as $balance) \n {\n $newUserBalance = $balance[\"balance\"] -= $amount;\n }\n // If user account can be found in DB, update user account balance\n if ($this->_db->query($sql))\n {\n $sql = \"SELECT * FROM account WHERE userAccountNumber = $targetAccount;\";\n $targetAcc = $this->_db->query($sql);\n $newTargetBalance;\n \n foreach ($targetAcc as $balance) \n {\n $newTargetBalance = $balance[\"balance\"] += $amount;\n }\n\n // Prepare to execute UPDATE of user balance\n $sqlUser = \"UPDATE account SET balance = :newUserBalance WHERE userAccountNumber = :userAccount;\";\n $statementUser = $this->_db->prepare($sqlUser);\n $statementUser->bindValue(':userAccount', $userAccount, PDO::PARAM_INT);\n $statementUser->bindValue(':newUserBalance', $newUserBalance, PDO::PARAM_INT);\n \n // Prepare to execute UPDATE of target balance\n $sqlTarget = \"UPDATE account SET balance = :newTargetBalance WHERE userAccountNumber = :targetAccount;\";\n $statementTarget = $this->_db->prepare($sqlTarget);\n $statementTarget->bindValue(':newTargetBalance', $newTargetBalance, PDO::PARAM_INT);\n $statementTarget->bindValue(':targetAccount', $targetAccount, PDO::PARAM_INT);\n \n // If user UPDATE executes, execute target UPDATE \n if ($statementUser->execute())\n {\n if ($statementTarget->execute())\n { \n $query = \"INSERT INTO transactions (`from_amount`, `from_account`, `to_amount`, `to_account`, `date`) VALUES (:from_amount, :from_account, :to_amount, :to_account, :date)\";\n $statementTrans = $this->_db->prepare($query);\n $statementTrans->bindValue(':from_amount', $amount, PDO::PARAM_INT);\n $statementTrans->bindValue(':from_account', $userAccount, PDO::PARAM_INT); \n $statementTrans->bindValue(':to_amount', $amount, PDO::PARAM_INT); \n $statementTrans->bindValue(':to_account', $targetAccount, PDO::PARAM_INT); \n $statementTrans->bindValue(':date', date('Y-m-d H:i:s', time()), PDO::PARAM_STR); \n if ($statementTrans->execute())\n {\n header(\"location: /successPage.php\");\n }\n }\n } \n } \n }\n catch (PDOException $e)\n {\n echo \"Error: \" . $e->getMessage() . '<br>\n <div id=\"options\">\n <div class=\"opt\">\n <a href=\"/index.php\">Back to home</a>\n </div>\n </div>';\n die();\n }\n } \n else \n {\n echo \"Balance not high enough for transaction\";\n }\n }", "title": "" }, { "docid": "b46dec155315ad3234f23104172a9374", "score": "0.5023317", "text": "function _sendAuctionNotification($auction, $user_id = null){\n\t\t// Get users\n\t\t$user = $this->User->findById($user_id);\n\t\t\n\t\t$data['template'] = 'payment_gateways/auction_pay';\n\t\t$data['layout'] = 'default';\n\t\t\n\t\t// Send to both user and admin\n\t\t$data['to'] \t = array($user['User']['email'], $this->appConfigurations['email']);\n\t\t\n\t\t$data['subject'] = __('Won Auction Payment', true);\n\t\t$data['User']\t = $user['User'];\n\t\t\n\t\t$this->set('auction', $auction);\n\t\t$this->set('user', $data);\n\t\t\n\t\tif($this->_sendEmail($data)){\n\t\t return true;\n\t\t}else{\n\t\t return false;\n\t\t}\n\t}", "title": "" }, { "docid": "305785695468985b609d50b20a7cacb6", "score": "0.50211143", "text": "public function paycoin(Request $request,$chapter_id){\n if($request->isMethod('post')){\n $chapter = ManhuaChapter::where('chapter_id',$chapter_id)->where('status',1)->get()->toArray();\n if(!empty($chapter)){\n //判断用户是否有足够的积分\n $userInfo = Users::where('uid',session('uid'))->get()->toArray();\n if($userInfo[0]['coin'] < $chapter[0]['coin'])\n {\n $re['status'] = 0;\n $re['msg'] = \"积分不够,请及时充值或者成为VIP\";\n echo json_encode($re);\n exit;\n }\n $result = Users::where('uid',session('uid'))->decrement('coin',$chapter[0]['coin']);\n $datas = array(\n 'uid' => session('uid'),\n 'manhua_id' => $chapter[0]['manhua_id'],\n 'chapter_id' => $chapter[0]['chapter_id']\n );\n $result = PayCoinList::create($datas);\n if($result->id){\n $re['status'] = 1;\n $re['msg'] = \"购买成功\";\n }else{\n $re['status'] = 0;\n $re['msg'] = \"购买失败\";\n }\n echo json_encode($re);\n }\n\n }else{\n echo \"Error!\";exit;\n }\n }", "title": "" }, { "docid": "8b321240bb7eb54ec6b02daef2c9d64b", "score": "0.5007653", "text": "public function buy() {\r\n\r\n // Recuperation de la position du terrassement\r\n $position = $this->_route->get('position');\r\n\r\n // Recuperation de l'identifiant du batiment achete\r\n $idBatiment = $this->_route->get('id');\r\n\r\n // Recupere le user en session\r\n $user = Session::get('user');\r\n\r\n // Recupere le personnage en session\r\n $personnage = Session::get('personnage');\r\n\r\n // Info log\r\n if ($this->_logger->isInfoEnabled()) {\r\n $this->_logger->info(\"Calling buy()\", array('position' => $position, 'batiment.id' => $idBatiment, 'user.id' => $user->getId()));\r\n }\r\n\r\n // Recuperation de la langue\r\n $language = Locale::getLanguage();\r\n\r\n // Achat du batiment\r\n $batiment = $this->_service->buyBatimentForPersonnage($idBatiment, $personnage, $position, $language);\r\n\r\n // S'il y a des erreurs\r\n if ($this->_service->getValidator()->hasErrors()) {\r\n\r\n // Notice logs\r\n foreach ($this->_service->getValidator()->getErrors() as $error) {\r\n $this->_logger->notice($error, array('user.id' => $user->getId()));\r\n }\r\n\r\n // Feedback utilisateur\r\n $flash = Flash::getInstance();\r\n $flash->addErrorList($this->_service->getValidator()->getErrors());\r\n\r\n // Construction de la reponse\r\n $content['feedback'] = $this->_feedbackUtils->createFeedbackFromFlash($flash);\r\n\r\n // Le flash ne doit donc pas etre affiche\r\n $flash->remove();\r\n\r\n // Reponse JSON\r\n return $this->json($content);\r\n }\r\n\r\n // Mise à jour du personnage en session\r\n Session::set(\"personnage\", $personnage);\r\n\r\n // Mise a jour de la map en session\r\n $map = Session::get('map');\r\n $map->setDomaineAndRefresh($personnage->getDomaine());\r\n Session::set('map', $map);\r\n\r\n // Récupération du bandeau pour refresh\r\n $content['bandeau'] = $this->createZone('bandeauPersonnage')->execute()->render();\r\n\r\n // Recupere la case du nouveau batiment\r\n $case = $map->getCaseByPosition($batiment->getPosition());\r\n\r\n $caseBatiment = new stdClass();\r\n $caseBatiment->x = $case->getX();\r\n $caseBatiment->y = $case->getY();\r\n $caseBatiment->image = $this->getApp()->getAppConfiguration()->getWebroot().'/images/domaine/map/' . $case->getBatiment()->getStatefulImage();\r\n\r\n $content['caseBatiment'] = $caseBatiment;\r\n\r\n $returnConstruction = new stdClass();\r\n $returnConstruction->dureeRestante = $batiment->getDureeConstruction();\r\n $returnConstruction->position = $batiment->getPosition();\r\n\r\n $content['construction'] = $returnConstruction;\r\n\r\n return $this->json($content);\r\n }", "title": "" }, { "docid": "b903fc411b625d26a9636fd200511b55", "score": "0.5002336", "text": "public function testSendUserMessage() {\n // the message to every single user, including the\n // sender, we make this as easy to test as sending a\n // broadcast message.\n $message = new SendMessageStruct;\n $message->toUsers = ['sender', 'recipient', 'other', 'doesNotExist'];\n $message->subject = 'subject';\n $message->body = 'body';\n\n $messageId = $this->model->sendMessage(1, $message);\n\n // check that all users except the sender get the message\n $recipients = DB::table('messageReceive')\n ->where('messageId', $messageId)\n ->lists('toUser');\n\n $numUsers = DB::table('user')->count();\n $senderReceipt = DB::table('messageReceive')\n ->where('messageId', $messageId)\n ->where('toUser', 1)\n ->first();\n\n $this->assertEquals($numUsers - 1, count($recipients));\n $this->assertNull($senderReceipt);\n }", "title": "" }, { "docid": "27f3f12f49e31b9f0ec58e06c75674b9", "score": "0.50002146", "text": "public function add_funds_btc_process()\r\n\t{\r\n\t\t$response = $this->coinbase_model->decode_callback();\r\n\r\n\t\tif (!$response)\r\n\t\t{\r\n\t\t\t// Invalid Callback\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\t$order_id = (int) $response->custom;\r\n\t\t$status = $response->status;\r\n\r\n\t\t// Get order details\r\n\t\t$order = $this->get_order($order_id);\r\n\r\n\t\tif (!$order)\r\n\t\t{\r\n\t\t\t// Not a valid order\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\tif ($order->completed)\r\n\t\t{\r\n\t\t\t// Order is already completed\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\tif ($response->total_native->currency_iso != strtoupper($order->currency))\r\n\t\t{\r\n\t\t\t// Currency mismatch\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\tif ($response->total_native->currency_iso == 'BTC')\r\n\t\t{\r\n\t\t\t$compare = number_format($response->total_native->cents / 100000000, 8, '.', '');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$compare = number_format($response->total_native->cents / 100, 8, '.', '');\r\n\t\t}\r\n\r\n\t\t$amount = number_format($order->total, 8, '.', '');\r\n\r\n\t\tif ($amount != $compare)\r\n\t\t{\r\n\t\t\t// Amounts don't match\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\tif ($response->status == 'completed')\r\n\t\t{\r\n\t\t\t$completed = 1;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$completed = 0;\r\n\t\t}\r\n\r\n\t\t$data = array(\r\n\t\t\t'completed' => $completed,\r\n\t\t\t'status' => $status,\r\n\t\t);\r\n\t\t$this->db->where('order_id', $order_id);\r\n\t\t$this->db->update('orders', $data);\r\n\r\n\t\tif ($completed)\r\n\t\t{\r\n\t\t\t// Get the user so we can add the funds\r\n\t\t\t$user = $this->user_model->get_user($order->user_id);\r\n\r\n\t\t\tif (!$user)\r\n\t\t\t{\r\n\t\t\t\t// User not found\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\r\n\t\t\t// Add the funds to the user's account\r\n\t\t\tif ($order->method == 'btc')\r\n\t\t\t{\r\n\t\t\t\t$this->db->set('funds_btc', $user->funds_btc + $order->amount);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->db->set('funds_usd', $user->funds_usd + $order->amount);\r\n\t\t\t}\r\n\r\n\t\t\t// Update the database with new funds\r\n\t\t\t$this->db->where('user_id', $user->user_id);\r\n\t\t\t$this->db->update('users');\r\n\t\t}\r\n\r\n\t\treturn TRUE;\r\n\t}", "title": "" }, { "docid": "1d8158c5b81e03b393f72b099d8bf361", "score": "0.4990531", "text": "function pay_using_wallet($user_master_id, $service_order_id)\n {\n $query = \"SELECT * FROM user_wallet WHERE user_master_id='$user_master_id'\";\n $result = $this\n ->db\n ->query($query);\n if ($result->num_rows() == 0)\n {\n $wallet_amount = '0';\n $response = array(\n \"status\" => \"error\",\n \"msg\" => \"No balance\",\n \"msg_en\" => \"No balance\",\n \"msg_ta\" => \"No balance\"\n );\n }\n else\n {\n foreach ($result->result() as $rows)\n {\n }\n $wallet_amount = $rows->amt_in_wallet;\n if ($wallet_amount == '0.00')\n {\n $response = array(\n \"status\" => \"error\",\n \"msg\" => \"No balance\",\n \"msg_en\" => \"No balance\",\n \"msg_ta\" => \"No balance\"\n );\n }\n else\n {\n $get_payment = \"SELECT * FROM service_payments WHERE service_order_id='$service_order_id'\";\n $res_payment = $this\n ->db\n ->query($get_payment);\n foreach ($res_payment->result() as $rows)\n {\n }\n $payable_amt = $rows->payable_amount;\n\n if ($payable_amt >= $wallet_amount)\n {\n $detected_amt = $wallet_amount;\n $finalamount = $payable_amt - $wallet_amount;\n $payable_balance = $finalamount;\n $update_wallet = \"UPDATE user_wallet SET amt_in_wallet='0',total_amt_used=total_amt_used+'$wallet_amount',updated_at=NOW() where user_master_id='$user_master_id'\";\n\n }\n else\n {\n\n $finalamount = $wallet_amount - $payable_amt;\n $wallet_balance = $finalamount;\n $detected_amt = $payable_amt;\n $update_wallet = \"UPDATE user_wallet SET amt_in_wallet='$wallet_balance',total_amt_used=total_amt_used+'$detected_amt',updated_at=NOW() where user_master_id='$user_master_id'\";\n }\n\n $res_update = $this\n ->db\n ->query($update_wallet);\n $ins_history = \"INSERT INTO wallet_history (user_master_id,transaction_amt,status,notes,created_at) VALUES ('$user_master_id','$detected_amt','Debited','Debited for Service',NOW())\";\n $res = $this\n ->db\n ->query($ins_history);\n $update_service_payment = \"UPDATE service_payments SET wallet_amount='$detected_amt' where service_order_id='$service_order_id'\";\n $res_payment = $this\n ->db\n ->query($update_service_payment);\n if ($res_payment)\n {\n $response = array(\n \"status\" => \"success\",\n \"msg\" => \"Paid from wallet\",\n \"msg_en\" => \"Paid from wallet\",\n \"msg_ta\" => \"Paid from wallet\"\n );\n }\n else\n {\n $response = array(\n \"status\" => \"error\",\n \"msg\" => \"Something went wrong\",\n \"msg_en\" => \"Something went wrong\",\n \"msg_ta\" => \"Something went wrong\"\n );\n }\n\n }\n }\n return $response;\n\n }", "title": "" }, { "docid": "b9ec29ca09005d0f954b74fdafc72311", "score": "0.49841425", "text": "function send_otp($mod, $user = null, $phone = null, $resend_otp = false)\n {\n if($user === null)\n {\n if ( ! user_is_login()) return false;\n $user = user_get_account_info();\n }\n if($phone === null)\n {\n $phone = $user->phone;\n }\n $user_id = $user->id;\n //lay thong tin sms otp cua thanh vien\n $sms_otp_user = model('sms_otp_user')->get_info_rule(array('user_id' => $user_id));\n \n //neu so lan gui otp cua thanh vien nay qua han toi da\n $type = ($resend_otp) ? 'resend_otp' : 'send_otp';\n if(!$this->check_send_otp($sms_otp_user, $type))\n {\n return false;\n }\n \n //tao ma otp va thuc hien gui\n $otp_code = $this->create_otp_code();\n $otp = security_encrypt($otp_code, 'decode');\n $result = '';\n $message = setting_get('config-user_security_sms_otp_message'); \n $message = str_replace('{code}', $otp, $message);\n \n $status = lib('sms_otp')->send($phone, $message, $result);\n \n //cap nhat vao bang sms otp cua thanh vien\n $this->set_last_otp($otp_code, $sms_otp_user, $user_id, $type);\n \n //cap nhat vao bang log\n $data = array();\n $data['mod'] = $mod;\n $data['type'] = $type;\n $data['user_id'] = $user_id;\n $data['phone'] = $phone;\n $data['message'] = $message;\n $data['result'] = $result;\n if($status)\n {\n $data['status'] = config('sms_status_completed', 'main');\n }else{\n $data['status'] = config('sms_status_failed', 'main');\n }\n model('sms_otp_log')->create($data);\n \n return $status;\n }", "title": "" }, { "docid": "5ee7851bac0a2fa5b3c641060e41b800", "score": "0.49746278", "text": "function services_wol_send($ipaddr, $subnet, $mac) {\n\t$bcip = gen_subnet_max($ipaddr, $subnet);\n\t\n\tmwexec(\"/usr/local/bin/wol -i {$bcip} {$mac}\");\n}", "title": "" }, { "docid": "4588dd17d3c02dfaacfe9fe05a16c2c0", "score": "0.49687284", "text": "function twilio_rules_action_send_sms_to_user($account, $message) {\n if (!empty($account->twilio_user['number']) && $account->twilio_user['status'] == 2) {\n twilio_send($account->twilio_user['number'], $message);\n }\n}", "title": "" }, { "docid": "a05a7635d5a5a07ba4eec14dd21c9007", "score": "0.49664444", "text": "function clickRelay($address, $pi, $fp, $time, $relays) {\n $message = $address . $pi . \"23\" . $time . $relays;\n $length = hexLength($message);\n $message = \"2a61\" . $length . $message;\n $message = $message . checksumCalc($message) . \"0d\";\n fwrite($fp, hex2bin($message));\n}", "title": "" }, { "docid": "01039f8621b28c51049cece14ec1f77e", "score": "0.496504", "text": "function gift_money($amount, $sender_id, $receiver)\n\t\t{\n\t\t\t$updateQ = \"UPDATE \".USERS_TABLE.\" SET money = money - '$amount' WHERE id = '$sender_id'\";\n\t\t\t$update1 = $this->conn->query($updateQ);\n\n\t\t\t//subtract money from sender\n\t\t\t$updateQ2 = \"UPDATE \".USERS_TABLE.\" SET money = money + '$amount' WHERE username = '$receiver'\";\n\t\t\t$update2 = $this->conn->query($updateQ2);\n\n\t\t\tif ($update1 && $update2)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "f9e1e62e68e7e6fbc20cb15ede5072ac", "score": "0.49637246", "text": "function transact ($ucid, $account, $amount, $mail){\n\t\tglobal $db;\n\t\t\n\t\t//check accounts exists\n\t\t$sql = \"SELECT *\n\t\t\t\t\tFROM accounts \n\t\t\t\t\tWHERE ucid = '$ucid' and account = '$account'\";\n\t\t(mysqli_query($db, $sql)) or die( mysqli_error($db));\n\t\t\n\t\tif(mysqli_affected_rows($db) > 0) {\n\t\t\t//update account balance\n\t\t\t$sql = \"UPDATE accounts \n\t\t\t\t\t\tSET balance = balance + $amount, recent = NOW()\n\t\t\t\t\t\tWHERE ucid = '$ucid' and account = '$account' and (balance + '$amount'>= 0.0)\";\n\t\t\t(mysqli_query($db, $sql)) or die( mysqli_error($db));\n\t\t\t\n\t\t\t//ensure no overdraft and insert new transaction\n\t\t\tif(mysqli_affected_rows($db) > 0) {\n\t\t\t\t$sql = \"INSERT INTO transactions (ucid, account, amount, timestamp, mail) \n\t\t\t\t\t\t\tVALUES ('$ucid','$account','$amount',NOW(),'$mail')\";\n\t\t\t\t(mysqli_query($db, $sql)) or die( mysqli_error($db));\n\n\t\t\t\treturn \"success\"; //flag successful transact\n\t\t\t}\n\t\t\telse{return \"overdraft\";} //flag unsuccessful transact\n\t\t}\n\t\telse {return \"notaccount\";}\n\t}", "title": "" }, { "docid": "9a685fc1469fb9032bbbcb2360b36c57", "score": "0.49625072", "text": "public function simulateUserWebhook(Request $request) {\n\n try {\n\n $coin = $request->coin;\n $webhookId = $request->webhookId;\n $blockId = $request->blockId;\n\n $bitgo = new BitGoSDK($this->token, $coin, $this->testNet);\n\n $simulation = $bitgo->simulateUserWebhook($webhookId, $blockId);\n\n return response()->json($simulation);\n\n } catch (\\Exception $e) {\n\n $message = $e->getMessage();\n return response()->json($message);\n\n }\n\n }", "title": "" }, { "docid": "26d44023b5babdc2d6cda8f69b5ff7da", "score": "0.49551886", "text": "public static function run() {\n $user_id = \\Auth\\Auth::F()->get_id();\n $token = \\DataMap\\InputDataMap::F()->get_filtered('token',['Strip','Trim','NEString','DefaultNull']);\n \\Helpers\\Helpers::csrf_check_throw('wallet',$token,false);\n $summ = \\DataMap\\InputDataMap::F()->get_filtered(\"summ_amount\", [\"Float\", \"DefaultNull\"]); \n $summ && $summ > 0 ? 0 : $summ = 100.0;\n $builder = \\DB\\SQLTools\\SQLBuilder::F();\n $a = \"@a\" . md5(implode(\"A\", [__METHOD__, $user_id]));\n $builder->push(\"INSERT INTO chill__orders(user_id,amount,status,created,updated) VALUES(:P,:S,'created',NOW(),NOW());SET {$a}=LAST_INSERT_ID();\")\n ->push_params([\":P\" => $user_id, \":S\" => $summ]);\n $order_id = $builder->execute_transact($a);\n $payport_url = \\PresetManager\\PresetManager::F()->get_filtered(\"PAYPORT_URL\", ['Strip', 'Trim', 'NEString', 'DefaultEmptyString']);\n $payment_url = \"{$payport_url}/api/v2/payment\";\n\n $payment_data = [\n \"outlet_id\" => \\PresetManager\\PresetManager::F()->get_filtered(\"PAYPORT_OUTLET\", [\"IntMore0\", 'Default0']),\n \"amount\" => intval($summ * 100),\n \"currency_code\" => \"RUR\",\n \"order_number\" => \"{$order_id}\",\n \"payment_desc\" => \"Пополнение счета в онлайн-кинотеатре Chill\",\n ];\n\n $token = \\PresetManager\\PresetManager::F()->get_filtered(\"PAYPORT_TOKEN\", [\"Strip\", \"Trim\", 'NEString', 'DefaultEmptyString']);\n $encoded_data = json_encode($payment_data);\n\n $curl = curl_init($payment_url);\n curl_setopt_array($curl, [\n CURLOPT_SSL_VERIFYHOST => false,\n CURLOPT_SSL_VERIFYPEER => false,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => $encoded_data,\n CURLOPT_HTTPHEADER => [\n \"Content-Type: application/json; charset=utf-8\",\n \"Content-Length: \" . strlen($encoded_data),\n \"Authorization: Bearer {$token}\",\n ]\n ]);\n $result = curl_exec($curl);\n $result_json = json_decode($result, true);\n $result_clean = \\Filters\\FilterManager::F()->apply_filter_array(is_array($result_json) ? $result_json : [], [\n \"id\" => ['IntMore0'],\n \"status\" => [\"Strip\", 'Trim', 'NEString'], //\"FILLED\",\n \"amount\" => ['IntMore0'],\n \"currency_code\" => ['Strip', 'Trim', 'NEString'],\n \"order_number\" => ['Strip', 'Trim', 'NEString'],\n \"pay_url\" => ['Strip', 'Trim', 'NEString'], //\"https:\\/\\/paytest.payport.pro\\/40c148e9d4c43bb29e5fb5e4752e8157\" \n ]);\n \\Filters\\FilterManager::F()->raise_array_error($result_clean);\n \\DB\\SQLTools\\SQLBuilder::F()->push(\"UPDATE chill__orders SET payport_id=:P,updated=NOW(),status='FILLED' WHERE id=:PP;\")\n ->push_params([\n \":P\" => $result_clean[\"id\"],\n \":PP\" => $order_id])\n ->execute_transact();\n return $result_clean['pay_url'];\n }", "title": "" }, { "docid": "7a60fdb75878ce3a1a1589e24b8adc7f", "score": "0.49542984", "text": "public function payMoney($sourceUsername, $targetUsername, $amount_of_money) {\n\n\t//we have to do the update in a transaction, because otherwise an concurrent moneytransaction could falsify the results\n\t$targetUser = $this->findByUser($targetUsername);\n\t$sourceUser = $this->findByUser($sourceUsername);\n\tif($targetUser == $sourceUser || $targetUser == false || $sourceUser == false || strlen($sourceUser->getBankAccNum()) < 1 || \n (!ctype_digit($amount_of_money) && !is_int($amount_of_money)) || $amount_of_money <= 0) {\n\t\treturn false;\n\t}\n\t//we calculate the updates directly in the database instead on setting them to the users and saving them to cirumvent race conditions\n\t$statement = $this->pdo->prepare(self::MONEY_PAYMENT);\n $statement->execute(array(':amount' => $amount_of_money, ':sourceUser' => $sourceUser->getUsername()));\n $statement = $this->pdo->prepare(self::MONEY_PAYMENT_RECEIVED);\n\t$statement->execute(array(':amount' => $amount_of_money-3, ':targetUser' => $targetUser->getUsername()));\n return true;\n }", "title": "" }, { "docid": "c890219af6e694881ef3095ebbdc4986", "score": "0.49519604", "text": "function btcBroadcast(string $txData, string $signatureId = \"\"){\n if($signatureId != \"\"){\n $data = array('txData' => $txData, 'signatureId' => $signatureId);\n }\n else{\n $data = array('txData' => $txData); \n }\n return $this->post($data, \"/{$this->getRoute(\"BTC\")}/broadcast\"); \n}", "title": "" }, { "docid": "bfa4c14712d2ff7037e471521a11116f", "score": "0.49512118", "text": "public function creditZent($amount,$userId,$r){\n\t\t$credit = false;\n\t\tswitch($r){\n\t\t\tcase 1:\n\t\t\t$reason = \"<br/><br/><p>A user used your referal code to register a <strong>verified</strong> ZenithCard account, we are so proud of you, keep sharing your referal link and get more ZENT.</p>\";\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t$reason = \"Reason 2 for adding $amount ZENT\";\n\t\t\tdefault:\n\t\t\t$reason = \"\";\n\t\t\tbreak;\n\t\t}\n\t\t\n\t$getUser = $this->db->query_object(\"SELECT user_id,first_name,email,zent_token FROM users WHERE user_id = $userId\");\n\tif($getUser->rowCount() == 1){//Confirm recipient existence\n\t\t$r = $getUser->fetch(PDO::FETCH_ASSOC);\n\t\t$id = $r['user_id'];\n\t\t$name = $r['first_name'];\n\t\t$email = $r['email'];\n\t\t$prevZent = $r['zent_token'];\n\t\t$newZent = $prevZent + $amount;\n\t\t\n\t\tif($this->db->query_object(\"UPDATE users SET zent_token = $newZent WHERE user_id = $id \")->rowCount() == 1){\n\t\t\t$mail = new EMAIL($name,$email); //Initaite an email to be sent to the ZENT recipient\n\t\t\t$notificationSubject = $amount.\" ZENT Added to your ZenithCard Account\";\n\t\t\t$notificationBody = \"<div style=\\\"padding: 0px 10px\\\">\n\t\t\t\t\t\t\t\t\tCongratulations $name, your ZenithCard account has been credited with $amount ZENT $reason\n\t\t\t\t\t\t\t\t</div>\";\n\t\t\t$mail->sendNotification($notificationSubject,$notificationBody);\n\t\t\t$credit = true;\n\t\t}\n\t}\n\treturn $credit;\n}", "title": "" }, { "docid": "8d4d933af168ff56c09ff762dbbc7984", "score": "0.49501768", "text": "function transact ($ucid, $account, $mailbox, $amount, $number, &$results, $db, $box)\n {\n $s1 = \"select * from accounts where ucid = '$ucid' and account = '$account' and balance + '$amount' >= 0.00\";\n \n $t = mysqli_query ($db, $s1) or die (mysqli_error($db));\n $num = mysqli_num_rows($t);\n \n if ($num == 0)\n {\n $results.= \"<br>Overdraft<br>\";\n return ;\n }\n $results.= \"No Overdraft\";\n \n //2. insert new transaction into transaction table\n $s2 = \"insert into transactions value ('$ucid', '$account', '$amount', NOW(), '$mailbox')\";\n \n $results.= \"<br>Insert is: $s2\";\n \n $t2 = mysqli_query ($db, $s2) or die (mysqli_error($db));\n \n //3. change balance in account table (for that ucid and that account)\n $s3 = \"update accounts Set balance = balance + '$amount' where ucid='$ucid' and account='$account'\"; \n \n $results.= \"<br>Update is: $s3\";\n $t3 = mysqli_query ($db, $s3) or die (mysqli_error($db));\n \n display ($ucid, $account, $box, $number, $results2 ,$db); \n $results.= $results2;\n \n if(isset ($mailbox))\n {\n mailer(\"arp97@njit.edu\", \"Display Transactions\" ,$results);\n }\n \n }", "title": "" }, { "docid": "847cfeff7405e20d8e7762243f559b7f", "score": "0.49496037", "text": "function updateBlockOwner($blockId, $username) {\n\t\t$this->mdb->query(\"UPDATE gameBlock SET gameUserId = %s WHERE id = %i\", $username, $blockId);\n\t}", "title": "" }, { "docid": "5870433dd1d3be8bd1f33dfcdbf49251", "score": "0.4943819", "text": "public function pay(): void;", "title": "" }, { "docid": "e82d17dff82ee3f71aa93e0ac75c1832", "score": "0.49418122", "text": "private function sendBulkMessage($message) {\n foreach ($this->connectedUsers as $user) {\n $user->send(json_encode($message));\n }\n }", "title": "" }, { "docid": "1371f972031b99a1083287ffa8159ead", "score": "0.49350724", "text": "function buystuff()\n {\n if (!$this->_checkLogin()) // Kick the user if its not logged in.\n return;\n\n // Check if the user is a payed up member:\n $member = Model::getModel('member');\n $themember = $member->getMemberByUserID(Auth::user());\n $this->_set('is_member', $this->_TicketHelp->checkMembership($themember));\n\n // Fetch the order alternatives, so that we can print a list of all the nice things the user can buy\n $tree = $this->_TicketHelp->buildAlternativeTree();\n $this->_set('alternatives_parents', $tree['tree_parents']);\n $this->_set('alternatives_children', $tree['tree_children']);\n }", "title": "" }, { "docid": "610511210dcde11e5347833ca6625a69", "score": "0.4933457", "text": "public function sendToken($userEmail, $userName){\n // Create the random token\n $resetToken = bin2hex(random_bytes(50));\n\n // Add resetToken to the user\n $this->db->query('UPDATE users SET resetToken = :resetToken WHERE email = :userEmail');\n\n // Bind values\n $this->db->bind(':resetToken', $resetToken);\n $this->db->bind(':userEmail', $userEmail);\n\n // Execute query\n if($this->db->execute()){\n // Set mail variables\n $recipient = $userName;\n $recipientMail = $userEmail;\n $subject = 'Password reset token.';\n $body = Mail::tokenMail($recipient, $resetToken);\n $altbody = strip_tags($body);\n\n $mail = new Mail($recipient, $recipientMail, $subject, $body, $altbody);\n $mail->send();\n } else {\n die('Something went wrong.');\n }\n }", "title": "" }, { "docid": "08a202ee6d4a26840af6e6daa8b0f849", "score": "0.49318093", "text": "public function eth_sendRawTransaction($hex){\n\t\t $params = [\n 'module' => \"proxy\",\n 'action' => \"eth_sendRawTransaction\",\n\t\t\t'hex'=> $hex,\n ];\n\t\treturn $this->request($params,'POST');\n\t}", "title": "" }, { "docid": "ceddc90c94947280a5322d9eb78316a1", "score": "0.49200985", "text": "public function sendResetLink($user)\n {\n $token = $this->create($user->email);\n\n $user->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "7a83288d68284ef952f98c23b3b4059e", "score": "0.49186417", "text": "public function sendChangePassword(User $user)\n {\n Mail::send('emails.change', ['user' => $user], function ($message) use ($user) {\n $message->from(env('MAIL_FROM_ADDRESS'), env('MAIL_FROM_NAME'));\n $message->subject(env('MAIL_APP_NAME') . ' - Forgot password code');\n\n $message->to($user->email);\n });\n }", "title": "" }, { "docid": "c02b91101cfb7c8492fb59d2db95fbbb", "score": "0.49172968", "text": "public function sendToBDD($user)\n {\n $database = new bdd();\n $database->deleteBasket($user);\n foreach($this->products as $id => $quantity)\n {\n for($i=0; $i<$quantity; $i++)\n $database->insertBasket($user, $id);\n }\n }", "title": "" }, { "docid": "48d45d1288a1b43f47b080abcdc063a1", "score": "0.49061942", "text": "function send_db($name, $mail, $pass)\n{\n\n\t$hash = password_hash($pass, PASSWORD_BCRYPT);\t\n\t$bdd = connect_db(\"localhost\", \"root\", \"root\", \"3306\", \"pool_php_rush\");\n\t$query = $bdd->exec(\"INSERT INTO users VALUES ('', '$name', '$hash','$mail', FALSE )\");\n}", "title": "" }, { "docid": "b0292b7066da0c39f47d4b1dbbce011f", "score": "0.49055168", "text": "public function transfer($address,$amount,$payment_id,$mixin,$fee = 0.01,$unlock_time = 0)\n {\n return $this->bulk_transfer(array(array('amount' => $amount,'address' => $address)),$payment_id,$mixin,$fee,$unlock_time);\n }", "title": "" }, { "docid": "a2ca64dd14d95454d162684ad5c6c029", "score": "0.49001953", "text": "function send_link() {\n\t $AccountSid = \"AC651584ed25ddcb8f2a6b686b27e2cba3\";\n\t $AuthToken = \"8a1498fad6ad9300b30d94672e25364d\";\n\n\t // Step 3: instantiate a new Twilio Rest Client\n\t $client = new Services_Twilio($AccountSid, $AuthToken);\n\t\n\t // Step 4: make an array of people we know, to send them a message. \n\t // Feel free to change/add your own phone number and name here.\n\t $people = array(\n\t $myphonenumber => \"New User\",\n\t );\n\t\n\t // Step 5: Loop over all our friends. $number is a phone number above, and \n\t // $name is the name next to it\n\t foreach ($people as $number => $name) {\n\t\n\t $sms = $client->account->messages->sendMessage(\n\t\n\t // Step 6: Change the 'From' number below to be a valid Twilio number \n\t // that you've purchased, or the (deprecated) Sandbox number\n\t \"650-900-2030\",\n\t\n\t // the number we are sending to - Any phone number\n\t $number,\n\t\n\t // the sms body\n\t \"Hello $firstname, Verification Code is $randomPassword\"\n\t );\n\t\n\t // Display a confirmation message on the screen\n\t //echo \"Sent message to $name\";\n\t}\n\n }", "title": "" }, { "docid": "ad836d9524e9006f185730b9d5f099c8", "score": "0.4897374", "text": "public function commit ($obj)\n {\n $obj->add_user ($this->_user);\n }", "title": "" }, { "docid": "aba16b89d11a762a4d55495a1ee41aea", "score": "0.48943684", "text": "public function buy() {\n $memberId = $this->_getLoggedInMemberId();\n $member = $this->Member->getMemberSummaryForMember($memberId);\n $this->set('member', $member);\n \n $individualLimit = ($this->Meta->getValueFor($this->individualLimitKey));\n $maxLimit = ($this->Meta->getValueFor($this->maxLimitKey));\n $boxCost = ($this->Meta->getValueFor($this->boxCostKey));\n \n $this->set('boxCost', -$boxCost);\n \n // check member does not all ready have max number of boxes\n $memberBoxCount = $this->MemberBox->boxCountForMember($memberId);\n $canBuyBox = true;\n \n if ($memberBoxCount == $individualLimit) {\n // all ready got to many boxes\n $this->Session->setFlash('Too many boxes already');\n $canBuyBox = false;\n \n }\n \n // check we have not hit max limit of boxes\n $spaceBoxCount = $this->MemberBox->boxCountForSpace();\n if ($spaceBoxCount == $maxLimit) {\n $this->Session->setFlash('Sorry we have no room for any more boxes');\n $canBuyBox = false;\n \n }\n \n if (($member['balance'] + $boxCost) < (-1 *$member['creditLimit'])) {\n $this->Session->setFlash('Sorry you do not have enought credit to buy another box');\n $canBuyBox = false;\n }\n\n $this->set('canBuyBox', $canBuyBox);\n\n // if this is a POST/PUT: and member has no hit limit or max limit\n if ($this->request->is('post') || $this->request->is('put')) {\n if (!$canBuyBox) {\n $this->Session->setFlash('Unable to buy a box');\n return $this->redirect(array('controller' => 'memberBoxes', 'action' => 'listBoxes'));\n }\n \n // charge for box\n if ($this->Transaction->recordTransaction($memberId, $boxCost, Transaction::TYPE_MEMBERBOX, 'Members Box')) {\n // create a new box for member\n $result = $this->MemberBox->newBoxForMember($memberId);\n \n if ($result) {\n // pass redirect to list\n $this->Session->setFlash('Box created');\n return $this->redirect(array('controller' => 'memberBoxes', 'action' => 'listBoxes'));\n } else {\n // TODO: should roll back the payment aswell\n \n // fail set flash and show page again\n $this->Session->setFlash('Unable to buy a box, but you have been charged');\n return $this->redirect(array('controller' => 'memberBoxes', 'action' => 'listBoxes'));\n }\n } else {\n // failed to charge for a box\n $this->Session->setFlash('Unable to buy a box, your account has not been charged');\n return $this->redirect(array('controller' => 'memberBoxes', 'action' => 'listBoxes'));\n }\n }\n }", "title": "" }, { "docid": "528bf2e4c540bfa472b1f26d8286dd10", "score": "0.48912087", "text": "protected function send_message($user, $message)\r\n {\r\n $message = $this->encode_and_mask($message);\r\n if (!$user->disconnected()) {\r\n socket_write($user->get_socket(), $message, strlen($message));\r\n }\r\n\r\n }", "title": "" }, { "docid": "a2b23070bed72ffd1c3c3e9ed8da4647", "score": "0.48886207", "text": "public function sendOtpToUser($data){\n if(isset($data->username)){\n if($data->username){\n $query = \"select * from user where (contact = '$data->username' OR email ='$data->username')\";\n $result = mysql_query($query);\n $userData = mysql_fetch_assoc($result);\n if(mysql_affected_rows() > 0){\n $otp = generateOtp();\n sendOtp($userData['contact'], $otp);\n $response = array(\"status\" => \"1\",\"msg\" => \"OTP sent successfully\");\n }else{\n $response = array(\"status\" => '0',\"msg\" => \"Invalid username\");\n }\n }else {\n $response = array(\"status\" => \"1\",\"msg\" => \"OTP cannot be empty\");\n }\n }else{\n $response = array(\"status\" => \"0\",\"msg\" => \"Invalid input\");\n }\n return $response;\n }", "title": "" } ]
c27185e3f9f9a22e28d5b7ec80b18bd6
The 404 action for the application.
[ { "docid": "ba1981715be2a0a3daa996eeda143200", "score": "0.7776473", "text": "public function action_404()\n\t{\n\t\t$messages = array('Aw, crap!', 'Bloody Hell!', 'Uh Oh!', 'Nope, not here.', 'Huh?');\n\t\t$data['title'] = $messages[array_rand($messages)];\n\n\t\t// Set a HTTP 404 output header\n\t\t$this->response->status = 404;\n\t\t$this->response->body = View::factory('welcome/404', $data);\n\t}", "title": "" } ]
[ { "docid": "db949f94813581f2dfc6a6ab7735724b", "score": "0.8331481", "text": "public function action_404()\n\t{\n\t\treturn Response::forge(Presenter::forge('welcome/404'), 404);\n\t}", "title": "" }, { "docid": "db949f94813581f2dfc6a6ab7735724b", "score": "0.8331481", "text": "public function action_404()\n\t{\n\t\treturn Response::forge(Presenter::forge('welcome/404'), 404);\n\t}", "title": "" }, { "docid": "db949f94813581f2dfc6a6ab7735724b", "score": "0.8331481", "text": "public function action_404()\n\t{\n\t\treturn Response::forge(Presenter::forge('welcome/404'), 404);\n\t}", "title": "" }, { "docid": "db949f94813581f2dfc6a6ab7735724b", "score": "0.8331481", "text": "public function action_404()\n\t{\n\t\treturn Response::forge(Presenter::forge('welcome/404'), 404);\n\t}", "title": "" }, { "docid": "6a4d0a1b23a03000a48c313945c8247c", "score": "0.8273531", "text": "public function action_404()\n\t{\n\t\treturn Response::forge(ViewModel::forge('welcome/404'), 404);\n\t}", "title": "" }, { "docid": "322ea50b4685db6ab79ac7f6fa276d0f", "score": "0.8227202", "text": "public function action404() {\r\n $data['title'] = '404';\r\n $this->view->render('error/404', ['data' => $data]);\r\n }", "title": "" }, { "docid": "63854a98f23e5e2c1cc0fbb428d94e69", "score": "0.8188329", "text": "public function notFoundAction()\n {\n return $this->jumpTo404('Required resource is not found.');\n }", "title": "" }, { "docid": "9f489b749f4d6d2d77299155db58d36e", "score": "0.81004816", "text": "public function NotFound()\n\t{\n\t\t$$this->router->runHttpErrorPage(404);\n\t}", "title": "" }, { "docid": "3534f70d0ecfa06b84b672534e363ab9", "score": "0.8070998", "text": "public function action_404()\n {\n $this->template->meta_description = 'The requested page '.$this->_requested_page.' not found';\n $this->template->meta_keywords = 'not found, 404';\n $this->template->title = 'Page '.$this->_requested_page.' not found';\n \n $this->template->content = View::factory('pages/error/404')\n ->set('error_message', $this->_message)\n ->set('requested_page', $this->_requested_page);\n }", "title": "" }, { "docid": "98b45ec88a6f38121f4e54f3d3480eb5", "score": "0.80199134", "text": "public function notFoundAction()\n {\n\n // set page title\n $this->view->pageTitle = 'Error 404';\n\n // breadcrumb\n $this->pageBreadcrumbs[] = 'Error 404';\n $this->view->pageBreadcrumbs = $this->pageBreadcrumbs;\n\n $this->response->setHeader(404, 'Not Found');\n $this->view->pick('error/404');\n }", "title": "" }, { "docid": "324d3cd649e7cf6fe14b1aaa35e05311", "score": "0.7981757", "text": "public function action_404()\n\t{\n\t\tif (IS_API)\n\t\t{\n\t\t\t$response_body = Site_Controller::supply_response_body($this->response_body, 404);\n\t\t\treturn $this->response($response_body, 404);\n\t\t}\n\n\t\t$this->set_title_and_breadcrumbs('404 Not Found', null, null, null, null, true);\n\t\t$this->template->content = View::forge('error/404');\n\t\t$this->response_status = 404;\n\t}", "title": "" }, { "docid": "5b31350993514562bc31b9d58cd378e8", "score": "0.7884472", "text": "public function action_404()\n\t{\n\t\t$this->response_status = 404;\n\t\t\n\t\t$this->template->page_path = Uri::base(false);\n\t\t$this->template->page_id = ''; //ページ独自にスタイルを指定する場合は入力\n\t\t$this->template->page_title = '404';\n\t\t$this->template->page_title_inner_en = '404 Not Found';\n\t\t$this->template->page_title_inner_jp = '';\n\t\t$this->template->page_description = '';\n\t\t$this->template->page_keyword = '';\n\t\t\n\t\t$this->template->content = View::forge('welcome/404'); // コンテンツ\n\t\t\n\t}", "title": "" }, { "docid": "038d5a4547f2ad9ec513250b2b102153", "score": "0.7881449", "text": "public function notFound() {\n\t\tApp::$request -> setStatus(404);\n\t\texit;\n\t}", "title": "" }, { "docid": "5b814a33caa8b08804ac1463325a964e", "score": "0.78282255", "text": "public function action_404()\n\t{\n\t\t$messages = array('Aw, no! Damn thing', 'Bloody Hell!', 'Uh Oh!', 'Nope, not here.', 'Huh?');\n\t\t$this->title = $messages[array_rand($messages)];\n\n // set a HTTP 404 output header\n $this->response->status = 404;\n\t\t// redifine the view default name\n $this->content = '404';\n\t}", "title": "" }, { "docid": "8c7ac3577e83ebd712db1c7b02df656b", "score": "0.7817967", "text": "public function NotFoundAction() {\n $view = new core\\View();\n $view->generate('NotFound');\n }", "title": "" }, { "docid": "bff8900920937ee6c70ec2a3d019046d", "score": "0.77698594", "text": "public function notFoundAction()\n {\n }", "title": "" }, { "docid": "90272f9a23fdca66edc890601955d3ca", "score": "0.7725916", "text": "public function notFoundAction()\n {\n $this->_view->display('error/notfound.phtml');\n exit(0);\n }", "title": "" }, { "docid": "1011b7ea7e428a4e9c662d31d8d6704f", "score": "0.7687042", "text": "function actionNotFound($actionName = null, $arguments = null)\n {\n $this->response()->withStatus(Status::CODE_NOT_FOUND);\n $this->response()->write(file_get_contents(ES_ROOT . \"/App/Static/404.html\"));\n }", "title": "" }, { "docid": "113a5af11e4fb7b00943341a1a598b46", "score": "0.76827973", "text": "public function show404Action()\n {\n // methods aren't allowed to start with numbers\n // so we have to tell the view engine to use\n // these, because 'show404' looks silly.\n $this->view->pick('error/404');\n }", "title": "" }, { "docid": "558192fd7f21498aa075468626a5b4e9", "score": "0.7666182", "text": "public function error404() {\n\n echo $this->templates->render('main/404');\n }", "title": "" }, { "docid": "8d25954d54af98ceaa2e857ae2fe1998", "score": "0.7653256", "text": "protected function _404()\n {\n return display('errors/error_404');\n }", "title": "" }, { "docid": "46234c3e821358a77404ce72edd14712", "score": "0.76072556", "text": "public static function notFound()\n {\n header('location:'.Application::getAppUrl() . '/' . Application::getErrorRoute(404)['url'], true);\n exit(0);\n }", "title": "" }, { "docid": "80388e5f2bc12f511d956a6a930b110d", "score": "0.7593521", "text": "public function notFound()\n {\n abort(404);\n }", "title": "" }, { "docid": "73da89ebf9ea76fe6c41288e42956cc6", "score": "0.75344735", "text": "function thematic_404() {\n\tdo_action('thematic_404');\n}", "title": "" }, { "docid": "025dc3a28dca23745db20b05a91254d6", "score": "0.750342", "text": "protected function notFound() {\n http_response_code(404);\n }", "title": "" }, { "docid": "f73b019c5e514d94f76d26f5b21b39be", "score": "0.7449417", "text": "public function actionNot_found(): void\n {\n\n header('HTTP/1.1 404 Not Found');\n $data = 'Page not found';\n $this->view->render($data);\n }", "title": "" }, { "docid": "a1282328d9a89721b05628916f509ad8", "score": "0.7434571", "text": "function pageNotFound()\n {\n $this->global['pageTitle'] = 'Birjuflower : 404 - Page Not Found';\n \n $this->loadViews(\"admin/404\", $this->global, NULL, NULL);\n }", "title": "" }, { "docid": "c2136faebf5effb9b06ca8a3fe288571", "score": "0.74064356", "text": "public static function error404 ()\n {\n self::error(404, 'Page not found.');\n }", "title": "" }, { "docid": "e04c4f02298eebe3d373d7615fbfd67b", "score": "0.7392772", "text": "function pageNotFound()\n {\n $this->global['pageTitle'] = 'Topcoder : 404 - Page Not Found';\n\n $this->loadViews(\"404\", $this->global, NULL, NULL);\n }", "title": "" }, { "docid": "51e93eae2e168dd183ca6400e6cf0eca", "score": "0.7381953", "text": "public function notFoundAction()\n {\n Tag::prependTitle('Not Found');\n }", "title": "" }, { "docid": "c5ded7ceaa224e2d1fecdf2561f15867", "score": "0.7374126", "text": "function notFound()\n {\n \t return response()->redirect(\\JanKlod\\Routing\\RouteHandler::getNotFound());\n }", "title": "" }, { "docid": "a5b50df5fc9fd4be072ff14746bcd05c", "score": "0.73667145", "text": "function _404() {\n die();\n }", "title": "" }, { "docid": "5bc749faa266afae99551f21db4b684d", "score": "0.73616403", "text": "function action_index(){\n echo 'Your personal 404 error!';\n }", "title": "" }, { "docid": "8def84b2665fbebe74ec18fb81518ea1", "score": "0.7360557", "text": "public function show404Action()\n {\n //$this->view->setTemplateBefore('error');\n }", "title": "" }, { "docid": "7cae072ce0de302bda0a4d7300cb9997", "score": "0.7294258", "text": "public function render404() {\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\tparent::render('/page_not_found');\n\t}", "title": "" }, { "docid": "014818db3ab2aa8059e7a233653e6649", "score": "0.7277846", "text": "function _404()\n {\n die();\n }", "title": "" }, { "docid": "dba966768297eea130e349b1bdffa5fb", "score": "0.72543716", "text": "public function return404 () {\n require_once (ERROR404);\n exit();\n }", "title": "" }, { "docid": "768cf749eb6880c7a9d4b2e9c1e743fb", "score": "0.7232689", "text": "public static function notFound() {\n header(\"HTTP/1.1 404 Not Found\");\n header(\"Location: /MagicBoulevardCinema/404.html\");\n die;\n }", "title": "" }, { "docid": "2231d11b1605af79fd543bbebb1182be", "score": "0.7230142", "text": "public static function error404() {\n\t\tif (!headers_sent()) {\n\t\t\theader('HTTP/1.0 404 Not Found');\n\t\t}\n\n\t\tnew \\controller\\error\\_404;\n\n\t\t// Shut all other Views down.\n\t\t// Note: This will not stop controller __destruct from rendering, so use disableAutoDraw().\n\t\tself::$draw = FALSE;\n\t\texit;\n\t}", "title": "" }, { "docid": "3db2e16345e6b27e2aebf3bdb39a083e", "score": "0.72085726", "text": "private function notFound()\n {\n $this->response->redirect(RouteObject::getNotFound());\n }", "title": "" }, { "docid": "ef72f14b59474f5b638e9b54c0296a46", "score": "0.71969926", "text": "public function index()\n {\n $this->global['pageTitle'] = APP_NAME.' : 404 - Page Not Found'; \n $this->loadViews(\"404\", $this->global, NULL, NULL);\n }", "title": "" }, { "docid": "eb7d9efc494721d61ff6624dc46bbd19", "score": "0.7193078", "text": "public static function notFound()\n {\n header('HTTP/1.0 404 Not Found');\n header('Location: '.URL.'/views/errors/404.php');\n exit;\n }", "title": "" }, { "docid": "403e813a3eb3b565d8819ed5cc3a5c3e", "score": "0.7166591", "text": "public function msg_404(){\r\n\t\t//going to show message\r\n\t\treturn $this->module_404();\r\n\t \r\n\t \r\n\t}", "title": "" }, { "docid": "b3cbae77bd83295f489a0b57122bb9bb", "score": "0.71567076", "text": "public function e404($msg)\n\t{\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t$this->set('message', $msg);\n\t\t$this->render('404');\n\t\tdie();\n\t}", "title": "" }, { "docid": "79c4ac211d54e48efabe004e661e97af", "score": "0.7143297", "text": "public function notFound(): void {\n header(\"{$_SERVER['SERVER_PROTOCOL']} 404 Not Found\");\n $this->renderer->render('errors.notFound');\n }", "title": "" }, { "docid": "cc6cb4906d2512f6b9d2e38be0d781ac", "score": "0.71315736", "text": "public function missing_action()\n {\n throw HTTP_Exception::factory(404,\n 'The requested URL :uri was not found on this server.',\n array(':uri' => $this->request->uri())\n )->request($this->request);\n }", "title": "" }, { "docid": "fb4d5b6f425543f4c2b67fb1cfe66928", "score": "0.7115736", "text": "public static function handleNotFound()\n {\n http_response_code(404);\n if(Page::exists('404') == true)\n {\n Page::load('404');\n }\n else\n {\n Page::staticResponse(\n 'Not Found',\n '404 Not Found',\n 'The page you were looking for was not found'\n );\n }\n\n exit();\n }", "title": "" }, { "docid": "516b63678e2120b427dd1124fa041216", "score": "0.7090228", "text": "public function index()\r\n\t{\r\n\t\tshow_404();\r\n\t}", "title": "" }, { "docid": "5bfd71061a837618f9fe8ec9bcc54832", "score": "0.70748144", "text": "protected function notFound(){\n \n header('HTTP/1.0 404 Not Found');\n die('Page introuvable');\n }", "title": "" }, { "docid": "3c350610bcca1790614d9495d73216dc", "score": "0.70674235", "text": "function actionNotFound($actionName = null, $arguments = null)\n {\n $this->response()->withStatus(Status::CODE_NOT_FOUND);\n }", "title": "" }, { "docid": "1ef1d6da8a05002b7b4666527eacb118", "score": "0.7051893", "text": "public function pageNotFound()\n {\n http_response_code(404);\n $title = \"404 Page Not Found\";\n $this->constructHead($title);\n $content = <<<EOT\n <div class=\"main_content\">\n <h1 class=\"page-not-found\"> \n 404 Page Not Found! \n </h1>\n </div>\nEOT;\n $this->constructPage($content);\n exit();\n }", "title": "" }, { "docid": "1aec596da17a8b9dd0c837e26f8b0411", "score": "0.7046012", "text": "public function e404($message){\n header(\"HTTP/1.0 404 Not Found\");\n header('Content-Type: text/html; charset=UTF-8');\n $this->set(\"message\",$message);\n $this->render('errors/404',\"error\");\n die();\n }", "title": "" }, { "docid": "73339df32f385129bc6949d9731a83c5", "score": "0.7044733", "text": "public static function error404(): void {\n\t\t$Template = Template\\Factory::build('main');\n\t\t$Template->set('NAME', '404 Not Found');\n\t\t$Template->set('HEAD', ['NAME' => $Template->get('NAME')]);\n\t\t$Template->set('HTML', Template\\Factory::build('404'));\n\t\tself::exit($Template, 404);\n\t}", "title": "" }, { "docid": "d901609ee8d6edef0657c99db8d93167", "score": "0.7044135", "text": "public function not_found()\n\t{\n\t\t$output = load_404();\n\t\tif (is_string($output)) {\n\t\t\techo $output;\n\t\t} else {\n\t\t\t$output->pretend(false)->send();\n\t\t}\n\t}", "title": "" }, { "docid": "2f50fc749c1b1b0db8a4c0b4644dfaa6", "score": "0.7037009", "text": "public function pageNotFound()\n\t{\n\t\t$this->renderHeader();\n\t\tinclude 'view/templates/404.php';\n\t\t$this->renderFooter();\n\t}", "title": "" }, { "docid": "3bc1932b774cb3eed94c88b75c8fb3ac", "score": "0.703533", "text": "public static function force404(){\n\t\thtml::send404();\n\t}", "title": "" }, { "docid": "10d7f2e1aa9ca380e03d2306e4d1e7ed", "score": "0.70163864", "text": "protected function registration404View()\n {\n return '404';\n }", "title": "" }, { "docid": "6ac63c3061b53ab93cc130d428fda039", "score": "0.70105934", "text": "public function errorUrl() {\n\n // header pour document error 404\n header('http/1.0 404 Not Found');\n $this->render($meta = ['file_name' => __FUNCTION__]);\n exit;\n\n }", "title": "" }, { "docid": "db5f90695c75ab5ed9b52eb5fa7f3b24", "score": "0.7005", "text": "public function forwardTo404()\n {\n throw new innoError404Exception('Error: Page Not Found', 1081404);\n }", "title": "" }, { "docid": "22f73b55e4cf95d3afba77d380bbc1dc", "score": "0.69933283", "text": "public function invoke() {\n echo \"<h1>404 not found!</h1>\";\n }", "title": "" }, { "docid": "69295528dd5a0b7ef5f71eb025435801", "score": "0.69762915", "text": "public function missingAction($param) {\n throw new AweException(404);\n }", "title": "" }, { "docid": "5628bce30d247d3655853575ddfe14fe", "score": "0.6928604", "text": "public function index()\n {\n return abort('404');\n }", "title": "" }, { "docid": "71b7de649015ed0462077d814595ed2e", "score": "0.6925424", "text": "private function notFound() {\n // return 404 not found\n header(\"HTTP/1.1 404 Not Found\", true, 404);\n }", "title": "" }, { "docid": "ef187490a98d5bc5439c3d85ce4bd3e3", "score": "0.6914973", "text": "public function notFound()\n\t{\n\t\t$result=array(\n\t\t\t'error'=>'not_found',\n\t\t\t'error_description'=>'The requested page does not exist.',\n\t\t);\n\t\techo CJSON::encode($result);\n\t\t$this->app->stop();\n\t}", "title": "" }, { "docid": "0e88db1b7adfcb29b932ada8646cf5fd", "score": "0.6898594", "text": "public function index()\n\t{\n\t\treturn $this->view('errors/404');\n\t}", "title": "" }, { "docid": "263647d3a2984ca5e410a2498e774f0c", "score": "0.68832964", "text": "private static function sendLayout404(){\n\t\techo \"404\";\n\t\texit();\n\t}", "title": "" }, { "docid": "2a73f2aad3a91ea63e5cf7dc2451fcb1", "score": "0.688168", "text": "public function index(){\n\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\n\t\t$data['title'] = '404';\n\t\t$data['error'] = $this->_alert;\n\t\t\n\t\tView::rendertemplate('header',$data);\n\t\tView::render('error/404',$data);\n\t\tView::rendertemplate('footer',$data);\n\t\t\n\t}", "title": "" }, { "docid": "cb12622305ea514d68aae4dbc3bc7514", "score": "0.6877995", "text": "public function index(){\n $data['error'] = $this->_failure;\n $this->_view->render('error/404',$data);\n }", "title": "" }, { "docid": "5b42a24353a05b73e8743b87c4d34370", "score": "0.68691444", "text": "public function pageNotFound()\n {\n $this->setVar('PAGE_ID', 'pageNotFound');\n $this->setVar('TITLE', 'Page Not Found');\n $this->setLayout('application');\n }", "title": "" }, { "docid": "3cb08094149f6e057dce8ae5dddbd3bd", "score": "0.68671095", "text": "public function actionError() {\n //$this->redirect('http://www.7724.com');\n //$this->redirect('http://www.7724.com/404.htm',true,404);\n if(YII_ENV == 'dev'){\n var_dump(Yii::app()->errorHandler->error);\n die; \n }\n $this->renderPartial(\"404\");\n exit();\n }", "title": "" }, { "docid": "a36d79bc45ef7de5847af105b05f9681", "score": "0.6861144", "text": "function page_not_found()\n{\n\theader(\"HTTP/1.0 404 Not Found\");\n\tinclude __DIR__ . '/../view/404.html';\n\tdie();\n}", "title": "" }, { "docid": "a36d79bc45ef7de5847af105b05f9681", "score": "0.6861144", "text": "function page_not_found()\n{\n\theader(\"HTTP/1.0 404 Not Found\");\n\tinclude __DIR__ . '/../view/404.html';\n\tdie();\n}", "title": "" }, { "docid": "33fa871f73ab9e3434f4bb1727c89c1e", "score": "0.6845509", "text": "function custom_404()\n{\n\t$build_page = new Build_Page_Controller;\n\tdie($build_page->_custom_404());\n}", "title": "" }, { "docid": "2c92dd47dc713c7f7189827ed4ee736d", "score": "0.6837665", "text": "public function redirect404() {\n $this->page = new Page($this->app);\n $this->page->loadHelper();\n $this->page->setContentFile(ERROR_DIR.DS.'404.php');\n\n $this->addHeader('HTTP/1.0 404 Not Found');\n\n $this->send();\n }", "title": "" }, { "docid": "97a9810aa938aff0bf3f49bd8bb1c769", "score": "0.6829926", "text": "function showNotFound(){\n $this->view->showError(NOT_FOUND, NOT_FOUND_MSG);\n }", "title": "" }, { "docid": "5178089d08741238e78176762ee9de8c", "score": "0.6828079", "text": "public function redirect404()\n\t{\n\t\t$this->addCss('styles.css');\n\t\t$this->setLayout(dirname(__DIR__) . '/View/layout.php');\n\t\t$this->renderTemplate(dirname(__DIR__) . '/errors/404.html');\n\t}", "title": "" }, { "docid": "27615932c2a52c2f1cafee3f4e5902ec", "score": "0.6824114", "text": "function _404()\n {\n $this->template->load('template_depan', 'Not_found', array('judul' => 'Halaman tidak ada.'));\n }", "title": "" }, { "docid": "0dfb33ae12145e184c675acaf07577a2", "score": "0.68208617", "text": "public function errorAction()\n\t{\n\t\t// sets the 404 header\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\n\t\t// sets the error to be rendered in the view\n\t\t$this->view->error = $this->_exception->getMessage();\n\t\t\n\t\t// logs the error to the log\n\t\terror_log($this->view->error);\n\t\terror_log($this->_exception->getTraceAsString());\n\t}", "title": "" }, { "docid": "91267c580d75bd48ae3fc47c3a7f7d9d", "score": "0.6809909", "text": "public function index()\n {\n abort(404);\n }", "title": "" }, { "docid": "a1d7513cd34f7fa62442a4b9ab49b8d5", "score": "0.6809167", "text": "public function action403() {\r\n// $data['title'] = '404';\r\n include ROOT . '/views/error/403.php';\r\n }", "title": "" }, { "docid": "c705acd7ecdc765ff8588bbc011b295b", "score": "0.6806862", "text": "public function forward404(): void\n {\n $this->controller->forward404();\n // @codeCoverageIgnoreStart\n }", "title": "" }, { "docid": "3e8732001111042ba6e8955bb0c529fb", "score": "0.6803714", "text": "public function index()\n {\n //\n abort(404);\n }", "title": "" }, { "docid": "f59dd99fcb9a56797d14c7dd5c48476f", "score": "0.68027335", "text": "public function Error()\n\t{\n\n $this->load->view('404');\n\n\t}", "title": "" }, { "docid": "7f9723e8ccf37813722a5c69a7d5dce2", "score": "0.67868495", "text": "public function errorAction()\n {\n // sets the 404 header\n header(\"HTTP/1.0 404 Not Found\");\n\n $this->template = false;\n $this->view->error = $this->_exception->getMessage();\n if (isset($_SESSION['query'])){\n $this->view->query = $_SESSION['query'];\n }\n $this->view->xdebug_message = $this->_exception->xdebug_message;\n\n // logs the error to the log\n error_log($this->view->error);\n error_log($this->_exception->getTraceAsString());\n }", "title": "" }, { "docid": "6151b9ceb0cf913fc335f7b84ca2ec0a", "score": "0.67859656", "text": "public function actionError() {\n $error = Yii::app()->errorHandler->error;\n \n \n\n switch ($error['code']) {\n case 404:\n $this->render('error404', array('error' => $error));\n break;\n\n default:\n $this->render('error', array('error' => $error));\n break;\n }\n }", "title": "" }, { "docid": "23d33443dd78b4e602a2ab602100528d", "score": "0.67824936", "text": "public function actionIndex() {\n throw new CHttpException(404, 'The requested page does not exist.');\n }", "title": "" }, { "docid": "633bd406f28ccbf16f519c3175280c56", "score": "0.6769034", "text": "protected function handleNotFound()\n {\n // cheatsheets array. this will display the a not-found message re: the sheets with\n // a 200 status (i.e. not a 404 page).\n\n $this->setView('Cheatsheets\\Index', [ 'cheatsheets' => '' ]);\n }", "title": "" }, { "docid": "10ecf3894202944d1277103a7a78af9b", "score": "0.67468345", "text": "private function generate404()\n {\n global $objPage;\n /** @var \\PageError404 $objHandler */\n $objHandler = new $GLOBALS['TL_PTY']['error_404']();\n $objHandler->generate($objPage->id);\n exit;\n }", "title": "" }, { "docid": "0c17c2b03ea84212ba6537a94c2930f2", "score": "0.67411757", "text": "protected function noResultFound()\n {\n throw new NotFoundHttpException('Not Found!');\n }", "title": "" }, { "docid": "be2221097b555148e84da7c108b87064", "score": "0.67338485", "text": "function e404() { header(\"HTTP/1.0 404 Not Found\"); }", "title": "" }, { "docid": "d2320f5f39d03654d6e45353aa960661", "score": "0.6714262", "text": "protected function respondWith404()\n\t{\n\t\treturn $this->setCode(404)->respondWithError('Not found');\n\t}", "title": "" }, { "docid": "cbc92e1ec436cc81f45c7d0c85a3ad83", "score": "0.66766125", "text": "function error404(){\n //devuelve la vitsa error404 de los errores\n return view('errores.error404');\n }", "title": "" }, { "docid": "80c0dbd06b8ee7c65d34d0b15f68a412", "score": "0.66755754", "text": "public function pageNotFound($message);", "title": "" }, { "docid": "8add1528e35ce39938054d9b1570f7d0", "score": "0.66650486", "text": "function is_404() {\n\treturn false;\n}", "title": "" }, { "docid": "b6fe1bb26b1ef437c0a9cfadbe099929", "score": "0.66591454", "text": "public function index()\n {\n return abort(404);\n }", "title": "" }, { "docid": "b6fe1bb26b1ef437c0a9cfadbe099929", "score": "0.66591454", "text": "public function index()\n {\n return abort(404);\n }", "title": "" }, { "docid": "8b380b1587288716a47b23a29238c8c0", "score": "0.66564065", "text": "protected function notFound()\n {\n // Set the default not found response\n $this->response->setContent('File not found');\n $this->response->headers->set('content-type', 'text/html');\n $this->response->setStatusCode(Response::HTTP_NOT_FOUND);\n\n // Execute the user defined notFound callback\n if (is_callable($this->notFound)) {\n $this->response = call_user_func($this->notFound, $this->response);\n }\n }", "title": "" }, { "docid": "28e4813a3dde2312c3144b67a87b82ee", "score": "0.664848", "text": "public static function throw404()\n {\n throw new self('Page Not Found', 404);\n }", "title": "" }, { "docid": "16d2cfe06aebf3962d350a091bb9ccd5", "score": "0.66410804", "text": "public function redirect404()\n\t{\n\t\theader('Status : 404 Not Found');\n\t\theader('HTTP/1.0 404 Not Found');\n\t\texit;\n\t}", "title": "" }, { "docid": "1f8f736fb34bb4bdcece894782caca87", "score": "0.66306394", "text": "function error404_action()\n{\n\tglobal $smarty;\n\t$smarty->display('error404.tpl');\n}", "title": "" } ]
8e921c285dd0e28d9575cf04c572912a
Todo: Make less hackish
[ { "docid": "dcdad81a70d2fc8526198ba260614667", "score": "0.0", "text": "function bp_docs_doc_permalink() {\n\tif ( bp_is_active( 'groups' ) && bp_is_group() ) {\n\t\tbp_docs_group_doc_permalink();\n\t} else {\n\t\tthe_permalink();\n\t}\n}", "title": "" } ]
[ { "docid": "4a10101ca61228fdc9c23ca577060189", "score": "0.5844208", "text": "public function abonadoenviajesplus();", "title": "" }, { "docid": "e07f7aa49477ec74cd9c6564ba87de61", "score": "0.576601", "text": "public function viajesplus();", "title": "" }, { "docid": "86555a5ffa99017ec874f7c0dadaeeb1", "score": "0.5748577", "text": "public function bgrewriteaof() {}", "title": "" }, { "docid": "2f97a8d22bdd291a8344ba9c8bffffb2", "score": "0.5624888", "text": "function fix() ;", "title": "" }, { "docid": "3130fa73d1219f68fa83abca854b0762", "score": "0.56187046", "text": "final public function smth() {\n\t}", "title": "" }, { "docid": "c698570472c00d3eec067407ff46ebf1", "score": "0.5461011", "text": "protected function func()\n {\n }", "title": "" }, { "docid": "75121405bd58a5155e99fad7dab2b5c1", "score": "0.5394765", "text": "function cumpleanos() {\n\t}", "title": "" }, { "docid": "af412ec059ff9144dfa7db3424feeb6e", "score": "0.53555036", "text": "function specialop() {\n\n\n\t}", "title": "" }, { "docid": "18cf1e21aa7b89d79e81e63e67d1005a", "score": "0.53470397", "text": "public function nonsupport() {\n\t}", "title": "" }, { "docid": "49408f41d8398b3aeff5a81399e9ac79", "score": "0.5300632", "text": "protected function fixSelf() {}", "title": "" }, { "docid": "49408f41d8398b3aeff5a81399e9ac79", "score": "0.52982366", "text": "protected function fixSelf() {}", "title": "" }, { "docid": "d385a9719f99539bf4bfa45cc945034b", "score": "0.5262896", "text": "public function regest();", "title": "" }, { "docid": "0461fdea626e992d47d4f48516aabbcf", "score": "0.51831394", "text": "private function do_stuff() {\n }", "title": "" }, { "docid": "546aaf60f8fa6a14c246813a41e4935a", "score": "0.5170324", "text": "private function static_things()\n\t{\n\n\t\t# code...\n\t}", "title": "" }, { "docid": "0f773b937522af81605098f9615cbb8d", "score": "0.5164137", "text": "protected function __init () {}", "title": "" }, { "docid": "a32c803134181950479eb420da86d87e", "score": "0.51026785", "text": "abstract protected function doEvil();", "title": "" }, { "docid": "88555db0ebbe01d2bbb0ef537728c109", "score": "0.50965357", "text": "function cargagasto(){\n\n\t}", "title": "" }, { "docid": "813e0aaa9da69b35930d285de1421d6e", "score": "0.5074577", "text": "abstract public function getPasiekimai();", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.507247", "text": "private function __() {\n }", "title": "" }, { "docid": "989d51a5743c084801559951698b407c", "score": "0.50673616", "text": "public function bgrewriteaof()\n {\n }", "title": "" }, { "docid": "daafb433eb278cb5c2d177520cc78eac", "score": "0.50423306", "text": "public function odobri()\n {\n }", "title": "" }, { "docid": "9b9cefc45ab19057d8fff4c4be115505", "score": "0.5029595", "text": "function generalFunctionality () {}", "title": "" }, { "docid": "bc4eb203d8cb296e8198a3ce2c8caa8b", "score": "0.50126785", "text": "function\nats2phppre_option_some($arg0)\n{\n//\n $tmpret0 = NULL;\n//\n __patsflab_option_some:\n $tmpret0 = array($arg0);\n return $tmpret0;\n}", "title": "" }, { "docid": "5fd0a418a2b5063d94878dd9a35b441d", "score": "0.5011955", "text": "function goarch_exc( $param ) {\n\t$param = preg_replace( \"/\\[.*?\\].*?\\[\\/.*?\\]/\", \"\", $param );\n\t$param = preg_replace( \"/<.*?>/\", \"\", $param );\n\treturn $param;\n}", "title": "" }, { "docid": "0fceb40a9dfe67ce4e7a654e632c4ecf", "score": "0.50021297", "text": "abstract protected function _content();", "title": "" }, { "docid": "35f8ff218e4c2a5ffd6533829018fd5f", "score": "0.49909347", "text": "abstract protected function _get();", "title": "" }, { "docid": "20c19b97f4466b4582b2677b300c253a", "score": "0.49869093", "text": "public function refuel()\n {\n }", "title": "" }, { "docid": "86b2d38c8e242d167d4648600f399e4d", "score": "0.4977341", "text": "function postprocess(){return '';}", "title": "" }, { "docid": "b23c9d7ff33e447f77411a3960cf1c87", "score": "0.49748194", "text": "public function fix() {}", "title": "" }, { "docid": "b23c9d7ff33e447f77411a3960cf1c87", "score": "0.49744886", "text": "public function fix() {}", "title": "" }, { "docid": "8d4318570c1336df9e81d9c75b684ec9", "score": "0.4972972", "text": "function _prepare() {}", "title": "" }, { "docid": "efc49e1ce0a7333c96f5521e394bb42d", "score": "0.4964451", "text": "function yy_r66(){ $this->_retvalue = str_replace(array('.\"\".','\"\".','.\"\"'),array('.','',''),'\"'.$this->yystack[$this->yyidx + -1]->minor.'\"'); }", "title": "" }, { "docid": "5c12a75f60f4e37e1f4d2feaba054880", "score": "0.4958908", "text": "abstract function fromexp();", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.49369016", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.49369016", "text": "final private function __construct() {}", "title": "" }, { "docid": "bd69393e8e2296f2ecb9355a0b1c19a0", "score": "0.4887338", "text": "public function __get($_name);", "title": "" }, { "docid": "739bd6402a9a0a24fd7fdcdebd74d962", "score": "0.48867762", "text": "abstract protected function syn();", "title": "" }, { "docid": "4debbf6c288bfb9dbde4f50c5988f024", "score": "0.48778152", "text": "public function _strings_for_pot()\n {\n }", "title": "" }, { "docid": "9699fa0a9ad8da81a8b184b8c119b3f4", "score": "0.48686638", "text": "protected static function helperFunction()\n {\n // because it isn't publicly callable\n }", "title": "" }, { "docid": "84b462eb0827167f17112eec22978ff3", "score": "0.48662645", "text": "abstract protected function content();", "title": "" }, { "docid": "400f4fc20ae032cafd3991688fe5f98e", "score": "0.4852631", "text": "static function m4(){ return NULL; }", "title": "" }, { "docid": "29dd9ff8c439105d436302fd7719be2e", "score": "0.48514432", "text": "function replaceTag($tag, $paramstring) {\n # append a space to possible open tags; trim and strip html tags; \n # replace multiple spaces by one space; change a space between quotes to a tilde\n $paramstring = str_replace(\"<\", \" <\", $paramstring);\n $paramstring = str_replace(\", \", \",\", $paramstring);\n $paramstring = strip_tags(trim($paramstring));\n $paramstring = preg_replace(\"{[ \\t\\n\\r]+}\", ' ', $paramstring );\n\n # harder find-and-replace: find spaces between quotes: change them to tildes \n # the regexp can only change one space at a time: do it 10 times to be \"sure\" \n $pattern = \"/=\\\"([^\\\"]*)[ ]/\";\n $replacement = \"=\\\"$1~\";\n if ( preg_match( $pattern, $paramstring ) > 0 ) {\n for ( $i = 0; $i < 10; $i++ ) {\n $paramstring = preg_replace($pattern, $replacement, $paramstring); \n }\n }\n # echo \"<!-- \" . $paramstring . \"-->\"; \n\n $params = explode(\" \", trim($paramstring));\n $result = keyValueInterpreter($params);\n\n if ($tag == \"showall\") {\n navajoInclude($result);\n }\n if ($tag == \"showmessage\") {\n messageInclude($result);\n }\n if ($tag == \"showmethod\") {\n methodInclude($result);\n } \n if ($tag == \"//\") {\n echo \"<!-- \" . $paramstring . \"-->\";\n }\n if ($tag == \"element\") {\n propertyInclude($result);\n }\n if ($tag == \"label\") {\n descriptionInclude($result);\n }\n if ($tag == \"errors\") {\n errorMessageInclude($result);\n }\n if ($tag == \"table\") {\n tableInclude($result);\n }\n if ($tag == \"submit\") {\n submitInclude($result);\n }\n if ($tag == \"service\") {\n callService($result);\n }\n if ($tag == \"setvalue\") {\n valueInclude($result);\n }\n if ($tag == \"setusername\") {\n usernameInclude($result);\n }\n if ($tag == \"classsuffix\") {\n setClassSuffix($result);\n }\n print \"\\n\";\n}", "title": "" }, { "docid": "e691107ca487824f4b88bd07640a7bc6", "score": "0.48412699", "text": "private function __toString()\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}", "title": "" }, { "docid": "893f8cd54fc31350bd8cccd3dea47240", "score": "0.4839291", "text": "public function rezervisi()\n {\n }", "title": "" }, { "docid": "3b86eecdff92a1cd2673e8fa3dc0f439", "score": "0.48280385", "text": "public function access();", "title": "" }, { "docid": "092cad4f70025faaa3d1b6b791cbeff6", "score": "0.48246822", "text": "abstract protected function getEnpoint(): string;", "title": "" }, { "docid": "ee4b2df06fb2b0d9ab0d77930910f7d9", "score": "0.48227215", "text": "function privSwapBackMagicQuotes()\n {\n }", "title": "" }, { "docid": "096617bd565a24dcbb1e76037dbce5f4", "score": "0.48171943", "text": "public function oops () {\n }", "title": "" }, { "docid": "ef0c97f33a3ad9bce82e36dcc8cda22d", "score": "0.48135296", "text": "protected function _beforeToHtml()\n {\n\n }", "title": "" }, { "docid": "1fa611c3401daaf9de6f7c2007f8bbfe", "score": "0.48017836", "text": "function non_standard_and_non_active()\r\n{\r\n \r\n \r\n \r\n}", "title": "" }, { "docid": "d287342a49b4f7ff5afed92e83576525", "score": "0.4801463", "text": "private static function stcMethod() {\n }", "title": "" }, { "docid": "7ca53971ae75a25f7e4ffda78a65e1d2", "score": "0.47970253", "text": "function mymagictxt($theValue)\n{\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;\t\n\t$theValue= str_replace(\"%<%\",\"&lt;\",$theValue);\n\t$theValue= str_replace(\"%>%\",\"&gt;\",$theValue);\n\treturn $theValue;\n}", "title": "" }, { "docid": "0e59379112512b1f4fc1b3ae6ccaa830", "score": "0.4793997", "text": "private function __construct () {}", "title": "" }, { "docid": "ea0db09f4336a2572e994ff745c2ff4a", "score": "0.47895464", "text": "private function __construct(){\n\t\t\n\t}", "title": "" }, { "docid": "85fe64ac8b6c76e14dd61df4d88a02d2", "score": "0.47826588", "text": "abstract protected function stub(): string;", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.47796527", "text": "final private function __construct() { }", "title": "" }, { "docid": "7e9ba9f5a512b800f973f7813a7eb70f", "score": "0.47721243", "text": "protected function preProcess() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.47682422", "text": "private function __construct() {}", "title": "" } ]
faa132d82a959bbc9325f456b3a3723d
Tests redirection to a current step
[ { "docid": "3fde4b7867ec7e37d189f60fb5aadd69", "score": "0.7887918", "text": "public function testRedirectionToCurrentStep()\n {\n $this->dispatch('/install/index/database');\n $this->assertEquals('install', $this->getRouteMatch()->getParam('module'));\n $this->assertEquals('Install\\Controller\\Index', $this->getRouteMatch()->getParam('controller'));\n $this->assertRedirectTo('/install/index/global-requirements');\n $this->assertResponseStatusCode(302);\n }", "title": "" } ]
[ { "docid": "7c96a0837f8c81c967d8478630b06125", "score": "0.6474845", "text": "public function testRedirectsToSetupIfNotReady()\n {\n $this->startSession();\n // Environment is not ready, but request homepage\n $crawler = $this->call('GET', '/');\n // Assert we're being redirected\n // TODO: If all the setup steps are completed, this should redirect elsewhere (pwd is the only tested setting so far)\n $this->assertRedirectedToRoute('setup::step', 2);\n // Follow the redirects\n $this->followRedirects();\n // Assert that the response is OK\n $this->assertResponseOk();\n }", "title": "" }, { "docid": "e8afe299a632aaec72dfa5ce808ffc92", "score": "0.6266884", "text": "public function testWordsCreateRedirection() {\n $this->call('GET', '/words/create');\n $this->assertRedirectedTo('login');\n }", "title": "" }, { "docid": "213bb1d18874ad78185296bce6398927", "score": "0.6217291", "text": "public function testCaseInsensitiveRedirect() {\n\t\tglobal $safe_redirect_manager;\n\n\t\t$_SERVER['REQUEST_URI'] = '/ONE';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/one/', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\n\t\t$_SERVER['REQUEST_URI'] = '/one';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/ONE/', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\t}", "title": "" }, { "docid": "666b8920c5d455da26b2cddaa80bfda0", "score": "0.61341953", "text": "public function testCaseSensitiveRedirectTo() {\n\t\tglobal $safe_redirect_manager;\n\n\t\t$_SERVER['REQUEST_URI'] = '/ONE';\n\t\t$redirected = false;\n\t\t$redirect_to = '/goHERE';\n\t\t$safe_redirect_manager->create_redirect( '/one/', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\t}", "title": "" }, { "docid": "45423dad6aff5d4adbc44498daf6d99c", "score": "0.6096363", "text": "protected function _getExpectedStep() {\n foreach( $this->steps as $step ) {\n if( !$this->request->session()->check( \"$this->_sessionKey.$step\" ) ) {\n $this->config( 'expectedStep', $step );\n\n return $step;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "953726ba5fab5a9aa978de16ccf9e058", "score": "0.60769653", "text": "public function isSuccessfulAndRedirect()\n {\n $this->isSuccessful(true);\n }", "title": "" }, { "docid": "1465873b8d0d026b415294b22f509e22", "score": "0.6054336", "text": "public function step();", "title": "" }, { "docid": "1465873b8d0d026b415294b22f509e22", "score": "0.6054336", "text": "public function step();", "title": "" }, { "docid": "668605d43186425556260b4861c8e639", "score": "0.60491204", "text": "public function testme()\n\t{\n\t\tif ($this->isTesting()) {\n\t\t$this->redirect('/tests/TestRunner.html?test=/tests/testsuite-app');\n\t\t} else {\n\t\t\t$this->redirect('/');\n\t\t}\n\t}", "title": "" }, { "docid": "8cc0860dc567a3cc5c8a8cde300e9082", "score": "0.60402197", "text": "function nextStep();", "title": "" }, { "docid": "97300210a924af4af3ff5a734433eba3", "score": "0.602385", "text": "public function testRedirectTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(302);\n }", "title": "" }, { "docid": "c3d15814a098a93208083eb4cb79db08", "score": "0.59822077", "text": "public function step() { }", "title": "" }, { "docid": "35fe65417d9caafaa9ab9b55e0b5e1f0", "score": "0.5938937", "text": "public function testRedirectedPages($url)\n {\n $client = static::createClient();\n $client->request('GET', $url);\n $this->assertTrue($client->getResponse()->isRedirection());\n }", "title": "" }, { "docid": "9cd045d7cf20f5223bcb0dbbdd81788c", "score": "0.5938534", "text": "public function testMainPage()\n {\n $response = $this->get('/');\n $response->assertRedirect('/lists');\n $response->assertStatus(301);\n }", "title": "" }, { "docid": "964e7a1fdb1db3fe6bbc9d02027528a9", "score": "0.5938001", "text": "function doStep() {\n\t\t\t$next = $this->data[$this->location];\n\t\t\tif ($this->debug) {\n\t\t\t\tif (isset($this->miscData['pid'])) {\n\t\t\t\t\techo sprintf('[PID: %2s] ', $this->miscData['pid']);\n\t\t\t\t}\n\t\t\t\t$out = '';\n\t\t\t\t$out .= sprintf('(%4s) %-20s', $this->location, static::instrToString($next));\n\t\t\t}\n\t\t\tlist($instr, $data) = $next;\n\t\t\t$ins = $this->getInstr($instr);\n\t\t\t$ret = $ins($this, $data);\n\n\t\t\tif ($this->debug) {\n\t\t\t\t$out .= ' | ';\n\t\t\t\t$out .= $ret;\n\t\t\t\techo trim($out), \"\\n\";\n\t\t\t\tusleep($this->sleep);\n\t\t\t}\n\n\t\t\treturn TRUE;\n\t\t}", "title": "" }, { "docid": "b6aa6ef1acd45fee7d157393664d21c7", "score": "0.59328604", "text": "public function testCaseSensitiveRedirect() {\n\t\tglobal $safe_redirect_manager;\n\n\t\t$_SERVER['REQUEST_URI'] = '/ONE';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/one/', $redirect_to );\n\n\t\tadd_filter( 'srm_case_insensitive_redirects', function( $value ) {\n\t\t\treturn false;\n\t\t}, 10, 1 );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertFalse( $redirected );\n\t}", "title": "" }, { "docid": "7f12896b508c1441e06c3fd4af51c879", "score": "0.59166765", "text": "public function testRedirectionFollowingAuthentication()\n {\n $this->dispatch('/admin/languages/add');\n $this->assertRedirect();\n $this->assertRedirectTo('/login');\n //echo \"\\n\".$_SESSION['Authentication']->redirect_url . \" is our shit here in \".__FUNCTION__.\"...\\n\";\n $this->reset(true);\n $params =\n [\n 'identity' => 'susie',\n 'password' => 'boink',\n 'login_csrf' => $this->getCsrfToken('/login', 'login_csrf'),\n ];\n $this->dispatch('/login', 'POST', $params);\n $this->assertRedirect();\n $this->assertRedirectTo('/admin/languages/add');\n\n $this->dispatch('/logout');\n\n // demote susie to see what happens next time she tries to access an admin page\n $em = FixtureManager::getEntityManager();\n $user = $em->getRepository('InterpretersOffice\\Entity\\User')->findOneBy(['username' => 'susie']);\n $role = $em->getRepository('InterpretersOffice\\Entity\\Role')->findOneBy(['name' => 'submitter']);\n\n $user->setRole($role);\n $em->flush();\n\n $this->dispatch('/admin/languages/add');\n $this->assertRedirect();\n $this->reset(true);\n $params =\n [\n 'identity' => 'susie',\n 'password' => 'boink',\n 'login_csrf' => $this->getCsrfToken('/login', 'login_csrf'),\n ];\n $this->dispatch('/login', 'POST', $params);\n $this->assertRedirect();\n $this->assertRedirectTo('/admin/languages/add');\n\n //echo $this->getResponseHeader('Location'),\"\\n\";\n //$auth = $this->getApplicationServiceLocator()->get('auth');\n //var_dump($auth->hasIdentity());\n //$em->refresh($user);\n //echo \"role: {$user->getRole()}\\n\";\n //printf(\"\\nTO DO: resolve failed \\$this->assertNotRedirectTo('/admin/languages/add') in AuthControllerTest at %d?\\n\", __LINE__);\n // problem\n //$this->assertNotRedirectTo('/admin/languages/add');\n }", "title": "" }, { "docid": "dbf15910ec5f149117ae256e39275b9e", "score": "0.5886105", "text": "public function redirect()\n {\n $code = $this->statusCode();\n return in_array($code, [301,302,303,304,307]); // moved,found,see other,not modified, temp redirect\n }", "title": "" }, { "docid": "525e1f785161f6ef16a3903dff604656", "score": "0.5884883", "text": "public function testSimplePath() {\n\t\tglobal $safe_redirect_manager;\n\n\t\t$_SERVER['REQUEST_URI'] = '/test';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/test', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\n\t\t/**\n\t\t * Test longer path with no trailing slash\n\t\t */\n\n\t\t$_SERVER['REQUEST_URI'] = '/test/this/path';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/test/this/path/', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\n\t\t/**\n\t\t * Test a redirect miss\n\t\t */\n\n\t\t$_SERVER['REQUEST_URI'] = '/test/wrong/path';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/test/right/path/', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( ! $redirected );\n\t}", "title": "" }, { "docid": "63863431cfde6783c3565dd707ef15c2", "score": "0.5827025", "text": "public function assertRedirect($url) {\n\t\t$this->header_test(\"Location: {$url}\");\n\t}", "title": "" }, { "docid": "a14c209bdc87d18653d2859b952dbeb2", "score": "0.58183473", "text": "function redirect(){}", "title": "" }, { "docid": "e9fedebc0ca36eaf8768f06167b3164a", "score": "0.57866335", "text": "public function forward($scenarioAlias, $stepName);", "title": "" }, { "docid": "5735efc0891219ccde5bf980a2d8dbc2", "score": "0.5763384", "text": "public function testHomePageRedirect()\n {\n $response = $this->get('/');\n\n $response->assertStatus(302);\n }", "title": "" }, { "docid": "ab63dee069bc452e23a056ee38e0b798", "score": "0.57572937", "text": "public function testLoginRedirect()\n {\n $response = $this->get('/');\n $response->assertStatus(302); // Checks a redirect has happened.\n $this->assertTrue(strpos($response->getTargetUrl(), 'login') !== false); // Checks the redirect went to the login page.\n }", "title": "" }, { "docid": "ddf451b1680a0ab6123608cee009cfd9", "score": "0.574369", "text": "public function testSwaggerRedirectTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(301)\n ->assertLocation('/swagger');;\n }", "title": "" }, { "docid": "39318b70ec6b0181646e2cdcbf880c21", "score": "0.57239604", "text": "public function redirectedTo()\n {\n return $this->getResponse() && $this->getResponse()->getHeader('Location');\n }", "title": "" }, { "docid": "4a4569ae24c7a53d69030df4d152051f", "score": "0.5723204", "text": "public function doRedirect() {\r\n return;\r\n }", "title": "" }, { "docid": "5c8a64326c2b6ebfbebb6b5b9daf289b", "score": "0.5721201", "text": "public function test81RedirectToLoginPageWhenLoginFailed()\n {\n $this->get($this->getUrlById())\n ->assertRedirect(route('admin.login'));\n }", "title": "" }, { "docid": "a6a20d39e1f321caef101ed1c8282a89", "score": "0.5713278", "text": "public function test41RedirectToLoginPageWhenLoginFailed()\n {\n $this->get($this->getUrlById())\n ->assertRedirect(route('admin.login'));\n }", "title": "" }, { "docid": "6b8ad892824f4986454a52e92c5d027f", "score": "0.5710266", "text": "public function testHomeRedirect(){\n $this->visit('/')->seePageIs('/home');\n }", "title": "" }, { "docid": "ef55f31c6ef69aac7f2ecef908b75bbf", "score": "0.57007897", "text": "function assertNoRedirect()\n{\n global $testRedirectUrl;\n if (!empty($testRedirectUrl)) {\n $tmp = $testRedirectUrl;\n $testRedirectUrl = \"\";\n outputFailedTest(\"Failed asserting that there is no redirect.\\nRedirect URL: '$tmp'.\");\n }\n}", "title": "" }, { "docid": "0342c2848a3d324964527db3bcc1f257", "score": "0.5692562", "text": "public function isRedirect()\n {\n return true;\n }", "title": "" }, { "docid": "0342c2848a3d324964527db3bcc1f257", "score": "0.5692562", "text": "public function isRedirect()\n {\n return true;\n }", "title": "" }, { "docid": "0342c2848a3d324964527db3bcc1f257", "score": "0.5692562", "text": "public function isRedirect()\n {\n return true;\n }", "title": "" }, { "docid": "0342c2848a3d324964527db3bcc1f257", "score": "0.5692562", "text": "public function isRedirect()\n {\n return true;\n }", "title": "" }, { "docid": "64dba99adba97d9c33bfbd39aaa10b6a", "score": "0.56439304", "text": "public function redirect( $step = null, $status = null, $exit = true ) {\n if( $step == null ) {\n $step = $this->_getExpectedStep();\n }\n if( $this->persistUrlParams ) {\n $url = Router::reverseToArray( $this->request );\n $url[ 'action' ] = $this->action;\n $url[ 0 ] = $step;\n } else {\n $url = [\n 'controller' => Inflector::underscore( $this->controller->name ),\n 'action' => $this->action,\n $step,\n ];\n }\n\n return $this->controller->redirect( $url, $status, $exit );\n }", "title": "" }, { "docid": "f4c7383ee696baae4a1ad97b975911ff", "score": "0.56393695", "text": "public function waitForInteraction()\n {\n $this->returnAfterCurrentStep = true;\n }", "title": "" }, { "docid": "8da4f319739d47a3ffb976b181b75f37", "score": "0.5632541", "text": "public function test_supplier_route_wihtout_login()\n {\n $response = $this->get('/supplier')->assertRedirect('/login');\n }", "title": "" }, { "docid": "68c06b2ded7fbbaa8847322dbd5dd8e0", "score": "0.5624375", "text": "public function testRedirectWithCustomStatusCode()\n {\n $this->response->redirect($url = 'http://test.local', $code = 302);\n $this->assertSame($url, $this->response->getHeader(HttpProtocol::HEADER_LOCATION));\n $this->assertSame($code, $this->response->getStatusCode());\n }", "title": "" }, { "docid": "b283f217ba09939df6eec9fbb3dae8da", "score": "0.5622186", "text": "public function isRedirectNeeded()\n {\n return $this->getNeededAction() == self::NEEDED_REDIRECT;\n }", "title": "" }, { "docid": "a67ada53db4787736056b681117f16fd", "score": "0.5607108", "text": "private function progressToNextPage() {\n $this->view('\\location\\setLocationTest')->render();\n }", "title": "" }, { "docid": "126f28bf69c7b425981de9b67b1bdcfa", "score": "0.56023866", "text": "public function test21RedirectToLoginPageWhenLoginFailed()\n {\n $this->get(self::$url)\n ->assertRedirect(route('admin.login'));\n }", "title": "" }, { "docid": "fe9171d6e8bde643105806058de635e9", "score": "0.5583848", "text": "public function redirection()\n {\n if($this->redirection_uri != false)\n return true;\n \n return false;\n }", "title": "" }, { "docid": "f46364a018c8d969ffa4d20fef46604e", "score": "0.5583581", "text": "public function _beforeStep(Step $step)\n {\n }", "title": "" }, { "docid": "6efaf1e348942bdda49a60ff59c06f62", "score": "0.5583332", "text": "public function testStepForm() {\n $wizard = Loader::instance()->wizard('email_to_target', NULL);\n $step = new TargetStep($wizard, $this->createMock(Client::class));\n $wizard->stepHandlers['target'] = $step;\n $page = $wizard->run('target');\n $form = $page[0];\n $this->assertNotEmpty($form);\n $this->assertNotEmpty($form['#attached']['js']);\n }", "title": "" }, { "docid": "38abbbf4e76ad19442fe50eb73a19fd4", "score": "0.55797553", "text": "public function testRedirectBeforeRedirectModifyingUrl(): void\n {\n $Controller = new Controller(new ServerRequest());\n\n $Controller->getEventManager()->on('Controller.beforeRedirect', function (EventInterface $event, $url, Response $response): void {\n $controller = $event->getSubject();\n $controller->setResponse($response->withLocation('https://book.cakephp.org'));\n });\n\n $response = $Controller->redirect('http://cakephp.org', 301);\n $this->assertSame('https://book.cakephp.org', $response->getHeaderLine('Location'));\n $this->assertSame(301, $response->getStatusCode());\n }", "title": "" }, { "docid": "76101ebaf5bdc357b49b69bf14f324bb", "score": "0.55792516", "text": "public function test_not_authenticated_user_is_redirected_to_login()\n {\n $response = $this->get(Route('dashboard'));\n $response->assertStatus(302);\n $response->assertRedirect(Route('login'));\n\n $following = $this->followingRedirects()->get(Route('dashboard'));\n $following->assertViewIs('v200.pages.login');\n }", "title": "" }, { "docid": "fdd6e9a0816d20fc071c13ec34ce325b", "score": "0.5577462", "text": "public function onRun()\n {\n if (!$this->param('step')) {\n $this->sendFirstStep();\n return;\n }\n\n // Build url of next and previous buttons\n $dataExtra = [];\n $wizardData = [];\n $wizardData['stepCurrent'] = $this->param('step');\n $wizardData['stepNext'] = false;\n $wizardData['stepPrev'] = false;\n\n foreach ($this->steps as $key => $step) {\n\n if ($step['step'] == $wizardData['stepCurrent']) {\n\n // Validate if it is allowed to enter the step, according to the data of the previous steps\n $wizardSession = session()->get('wizard_steps', []);\n $stepValid = 0;\n if (count($wizardSession) > 0 && isset($wizardSession['stepCurrent'])) {\n $stepValid = $wizardSession['stepCurrent'];\n }\n\n if ($key > $stepValid) {\n $this->sendToStep($stepValid);\n }\n\n // Validate forms from previous steps\n $validatePrevSteps = false;\n if (isset($step['validatePrevSteps'])) {\n $validatePrevSteps = $step['validatePrevSteps'];\n }\n\n $dataExtra = $validatePrevSteps ? $this->stepValidate() : (isset($wizardSession['validations']) ? $wizardSession['validations'] : []);\n\n $this->stepPos = $key;\n\n $wizardData['stepNext'] = $this->stepNextGet($key);\n\n if (isset($this->steps[$key - 1]) && $this->steps[$key - 1]['step']) {\n $wizardData['stepPrev'] = Page::url($this->page->fileName, ['step' => $this->steps[$key - 1]['step']]);\n }\n break;\n }\n }\n\n $wizardData['steps'] = $this->steps;\n $wizardData['fields'] = session()->get('wizard_steps');\n $wizardData['prevValidationsData'] = $dataExtra;\n\n $this->page['wizard'] = $wizardData;\n\n if (!$wizardData['stepNext']) {\n // If I am in the last step, clear the whole wizard session, to start again\n session(['wizard_steps' => []]);\n } else {\n // If not, clean session fields from steps after the current one\n $this->stepSessionClear($this->stepPos);\n }\n }", "title": "" }, { "docid": "71c1e62d72dc7b2c60e0286950f6f91b", "score": "0.5567934", "text": "public function redirection(){\n $this->tools->sessionOn();\n if(isset($_SESSION['auth'])){\n $userId = $_SESSION['auth']['id'];\n $this->tools->logged_auth_only();\n $this->tools->redirectionAccount($userId);\n }\n }", "title": "" }, { "docid": "610e9c534dc238d4a6c9dccad8bc5f07", "score": "0.5548535", "text": "function beforeRedirect( &$controller, $url, $status=null, $exit=true ) {\n\n\t}", "title": "" }, { "docid": "67c1714d0e518aa8a9599932fbbd3138", "score": "0.5534686", "text": "protected function _setCurrentStep( $step ) {\n if( !in_array( $step, $this->steps ) ) {\n return;\n }\n $this->_currentStep = reset( $this->steps );\n while( current( $this->steps ) != $step ) {\n $this->_currentStep = next( $this->steps );\n }\n }", "title": "" }, { "docid": "0e3164a64b8fb452d130803fb51f4ef2", "score": "0.5528579", "text": "public function testRedirectWithDefaultStatusCode()\n {\n $this->response->redirect($url = 'http://test.local');\n $this->assertSame($url, $this->response->getHeader(HttpProtocol::HEADER_LOCATION));\n $this->assertSame(301, $this->response->getStatusCode());\n }", "title": "" }, { "docid": "6cb2861cd37c2d9ed26a29ab07baea55", "score": "0.5507865", "text": "public function redirect()\n {\n $this->_actions->redirect($this->_getUrlToRedirectTo(), 301);\n }", "title": "" }, { "docid": "72689ccb2679f3f994461121d38332cd", "score": "0.54863805", "text": "public function testRedirectAuthenticated()\n {\n $this->actingAs($this->getAdminUser())\n ->visit(route('login'))\n ->seePageIs(route('home'));\n }", "title": "" }, { "docid": "3a39e1df9fdd4f9440a4f5dacb11cc14", "score": "0.5481751", "text": "function print_successful_redirect( $p_redirect_to ) {\r\n\t\tif ( ON == config_get( 'show_queries_count' ) ) {\r\n\t\t\thtml_meta_redirect( $p_redirect_to );\r\n\t\t\thtml_page_top1();\r\n\t\t\thtml_page_top2();\r\n\t\t\tPRINT '<br /><div class=\"center\">';\r\n\t\t\tPRINT lang_get( 'operation_successful' ) . '<br />';\r\n\t\t\tprint_bracket_link( $p_redirect_to, lang_get( 'proceed' ) );\r\n\t\t\tPRINT '</div>';\r\n\t\t\thtml_page_bottom1();\r\n\t\t} else {\r\n\t\t\tprint_header_redirect( $p_redirect_to );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e6c7360ef3eb26cb1d6e698b47c12ca8", "score": "0.5478621", "text": "function redirectToStudy($error=\"\", $message=\"\") {\n redirectToPage(\"/studies\", $error, $message);\n}", "title": "" }, { "docid": "23ed270b82e9e9ce123d49616e6ba9ef", "score": "0.54719114", "text": "function begin_redirect_into( $path )\n {\n $this->contexts[] = $this->get_current_path($path);\n }", "title": "" }, { "docid": "b462285c3275ff726dbe87ff2f552be8", "score": "0.5461902", "text": "public function testGetRefererBeforeEdit() {\n\t\t// GIVEN we set the referer as /posts/index\n\t\t$request = $this->getMock('CakeRequest');\n\n\t\t$request->expects($this->any())->method('referer')\n\t\t\t->with(false)\n\t\t\t->will($this->returnValue('/posts/index'));\n\n\t\t$this->Controller = new RedirectTestController($request, $this->getMock('CakeResponse'));\n\n\t\t$this->Controller->Components->init($this->Controller);\n\n\t\t// AND we initialize the component with the controller\n\t\t$this->Controller->Redirect->initialize($this->Controller);\n\n\t\t// AND the component is successfully started up\n\t\t$this->assertTrue($this->Controller->Redirect->startup($this->Controller));\n\n\t\t// WHEN we run the getRefererBeforeEdit without first setting any session values\n\t\t$referer = $this->Controller->Redirect->getRefererBeforeEdit();\n\n\t\t// THEN we expect the following values \n\t\t$expected = '/posts/index';\n\t\t$this->assertEquals($expected, $referer);\n\n\t\t// @TODO dunno how to make the $this->Controller->Session correctly get influenced with the same value.\n\t\t// AND we expect the Session to still have that value under the key Redirect.RedirectModels.beforeEdit\n\t}", "title": "" }, { "docid": "8b69964337464856fe453b1972002c4e", "score": "0.54485524", "text": "static function redirected_to() {\n\t\treturn Controller::curr()->redirectedTo();\n\t}", "title": "" }, { "docid": "67cd9c871a683bb6b65f37b8449a0eb8", "score": "0.5444603", "text": "public function test_adding_a_redirect( FunctionalTester $I ) {\n\t\t$I->loginAsAdmin();\n\t\t$I->amOnAdminPage( 'post-new.php?post_type=hm_redirect' );\n\t\t$I->submitForm( '#post', [\n\t\t\t'hm_redirects_from_url' => '/test',\n\t\t\t'hm_redirects_to_url' => '/testing',\n\t\t], 'publish' );\n\n\t\t$id = $I->grabFromCurrentUrl( '/post=(\\\\d+)/' );\n\n\t\t$I->assertNotEmpty( $id, 'A new redirect post is created.' );\n\n\t\t// DB apparently needs time to take its breath.\n\t\t// phpcs:ignore\n\t\tsleep(2);\n\n\t\t$I->seePostInDatabase( [\n\t\t\t'post_type' => 'hm_redirect',\n\t\t\t'ID' => $id,\n\t\t\t'post_title' => '/test',\n\t\t\t'post_excerpt' => '/testing',\n\t\t\t'post_status' => 'publish',\n\t\t] );\n\n\t\t$I->amOnPage( '/test' );\n\t\t$I->seeCurrentUrlMatches( '/\\/testing\\/?$/' );\n\t}", "title": "" }, { "docid": "06002b7758a9723adb8730b41dbe0cae", "score": "0.5438661", "text": "public function isRedirect()\n {\n return isset($this->data->init_point) && $this->data->init_point;\n }", "title": "" }, { "docid": "e781a2553ef5716ef1ee2f1b2fde135e", "score": "0.5430439", "text": "private function getFinalRedirect()\n {\n $count = 0;\n while($this->isRedirect() && $count < self::MAX_REDIRECTS)\n {\n $this->_url = $this->_info['redirect_url'];\n $this->_info = $this->getInfo(true);\n $count ++;\n echo \"Redirecting to \" . $this->_url . \"\\n\";\n }\n }", "title": "" }, { "docid": "abfb864dc831c6ad169ffa9970dcf1c3", "score": "0.54249525", "text": "public function run() {\n $helper = $this->app->getHelperFactory();\n $input = $this->app->getInput();\n $url = $helper->createURL($input->getAction())->run();\n if ($url !== $this->url) {\n $output = new \\Arch\\Output\\HTTP();\n $output->setHeaders(array('Location: '.$this->url));\n $output->send();\n $this->app->getLogger()->log('Redirecting to '.$this->url);\n $this->app->getEvents()->triggerEvent('arch.session.save');\n $this->app->getLogger()->log('Session closed');\n $this->app->getLogger()->dumpMessages();\n $this->app->getLogger()->close();\n exit();\n }\n }", "title": "" }, { "docid": "aa9f18ed5d0ee9f5289d4c8539207803", "score": "0.5419955", "text": "function redirectPresentation (&$obj,&$t) {\n\n\t$e =& ErrorStack::_singleton();\n\tif (DEBUG && $e->count ) {\n\t\techo \"you are being redirected but there are errors.\";\n\t\techo \"\\n<br/>\\n\";\n\n\t\techo \"click to continue:\";\n\t\techo \"\\n<br/>\\n\";\n\t\techo '<a href=\"'.$t['url'].'\">continue</a>';\n\t} else {\n\t\theader(\"Location: \".$t['url']);\n\t}\n}", "title": "" }, { "docid": "38bad9fde9e72fbab2b894796b2e082d", "score": "0.54096305", "text": "public function testGetStepPos()\n {\n $trace = new Backtrace();\n //whithout an attribute, the whole trace step will be returned.\n static::assertInternalType('array', $trace->getStep(0));\n //The first trace step has no file, because it's a reflection\n static::assertNull($trace->getStep(0, 'file'));\n //There is no pos -1.\n static::assertNull($trace->getStep(-1, 'function'));\n //There is no pos after the last.\n static::assertNull($trace->getStep($trace->countSteps(), 'function'));\n }", "title": "" }, { "docid": "b9345394ef8dd74b61a1baa156e23477", "score": "0.5406937", "text": "public function testCustomStep() {\n $this->assertFalse(\\Drupal::isConfigSyncing(), 'Before an import \\Drupal::isConfigSyncing() returns FALSE');\n $context = [];\n $this->configImporter()->doSyncStep([self::class, 'customStep'], $context);\n $this->assertTrue($context['is_syncing'], 'Inside a custom step \\Drupal::isConfigSyncing() returns TRUE');\n $this->assertFalse(\\Drupal::isConfigSyncing(), 'After an valid custom step \\Drupal::isConfigSyncing() returns FALSE');\n }", "title": "" }, { "docid": "a3cce5e3014e9340f5be2b352cc1e7c8", "score": "0.5405498", "text": "public function testCurrent0()\n{\n\n $actual = $this->urlGenerator->current();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "3474f4ff44f279d54a8b87377db9dec3", "score": "0.5404842", "text": "abstract protected function getCurrentStepName();", "title": "" }, { "docid": "f921d052c5c4a95be93980156682b24c", "score": "0.54037136", "text": "public function isRedirect()\r\r\n {\r\r\n return $this->statusCode >= 300 && $this->statusCode < 400;\r\r\n }", "title": "" }, { "docid": "ad08fef1f7a01388310156558873f20c", "score": "0.53844035", "text": "protected function getRedirectUrl()\n {\n if($this->input('step') == 0) {\n $this->redirectRoute = 'race.register';\n } else {\n $this->redirectRoute = 'race.register.step' . $this->input('step', 1);\n }\n\n return parent::getRedirectUrl();\n }", "title": "" }, { "docid": "082523388880e201f1d9383b00dd7676", "score": "0.53670436", "text": "public function after_step_javascript($event) {\n\n // If it doesn't have definition or it fails there is no need to check it.\n if ($event->getResult() != StepEvent::PASSED ||\n !$event->hasDefinition()) {\n return;\n }\n\n // Wait until the page is ready if we are in a new URL.\n $currenturl = $this->getSession()->getCurrentUrl();\n if (is_null($this->lasturl) || $currenturl !== $this->lasturl) {\n $this->lasturl = $currenturl;\n $this->getSession()->wait(self::TIMEOUT, '(document.readyState === \"complete\")');\n }\n }", "title": "" }, { "docid": "f7ad24dbd46b7bba1c64cbcff2f392e7", "score": "0.5360337", "text": "private function redirectFail(){\n if(empty(self::$redirectUrl))\n self::$redirectUrl=url(\"usuario/login\");\n\n redirect(self::$redirectUrl);\n exit;\n }", "title": "" }, { "docid": "e4d879650c15ba9efab5607488d93385", "score": "0.53593755", "text": "public function testGuestUserEntersFrontPage()\n {\n $response = $this->get('/');\n $response->assertRedirect(route('login'));\n $response->assertStatus(302);\n }", "title": "" }, { "docid": "5a0846f8a71b2f61a2d1fe437f774732", "score": "0.5354204", "text": "function followRedirects($value = TRUE)\r\n {\r\n if (is_bool($value))\r\n {\r\n $this->redirect = $value;\r\n } \r\n }", "title": "" }, { "docid": "818670676474fe470b0361bcf1377a4d", "score": "0.5353537", "text": "public function testGuestVisitingHomePage()\n {\n $response = $this->get('/home');\n\n $response->assertStatus(302);\n $response->assertRedirect('/login');\n }", "title": "" }, { "docid": "1df4039c6fd6edd3d12b3142e1718c2d", "score": "0.53491896", "text": "public function getStepSpecial($step, $sourceId = null) {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b6ab30f3797fb95711e75a65160b2730", "score": "0.5348667", "text": "public function testControllerWizard_submitValid() {\n $this->setupWizard('controller');\n\n $this->getRequest()->setMethod('POST')\n ->setPost(array(\n 'submit' => 'submit',\n ));\n\n //run\n $this->dispatch();\n\n $this->assertWizard();\n $this->assertRedirect();\n }", "title": "" }, { "docid": "ad6a006dc38341bd9312fb1a072265db", "score": "0.5346653", "text": "public function testBasicTest()\n {\n $response = $this->get('/admin')->assertRedirect('/admin/login');\n\n \n }", "title": "" }, { "docid": "10dcbf350064255d75f9ccf7b3dc81d1", "score": "0.5342281", "text": "public function testRedirect()\n {\n $response = ActionResponse::create([\n 'redirect' => 'foobar',\n 'redirectParams' => ['foobar' => 123],\n ]);\n\n $this->assertTrue($response->hasRedirect());\n $this->assertEquals(['foobar' => 123], $response->getRedirectParams());\n }", "title": "" }, { "docid": "c1a0a6bc7588cf341ad988f1e4ae5b34", "score": "0.53369576", "text": "public function test_guest_cant_see_page() {\n\t\t$this->get(action('Admin\\WorkplaceController@index'))->assertRedirect(action('Auth\\LoginController@login'));\n\t}", "title": "" }, { "docid": "43989e964a01bca94947a1023d1cebda", "score": "0.53367054", "text": "public function testSectionsNoAuth302()\n {\n $response = $this->get('/sections');\n $response->assertRedirect('/login');\n }", "title": "" }, { "docid": "a3b12aa5a3f47364da7aa15873165993", "score": "0.53328663", "text": "public function forward()\r\n {\r\n $this->test->comment('forward');\r\n\r\n return parent::forward();\r\n }", "title": "" }, { "docid": "25c74c5c6ddf493323d51c66674c3094", "score": "0.5331213", "text": "public function testHomePageRedirectsWithoutBeingLoggedIn(){\n $client = $this->createClient();\n $crawler = $client->request('GET','/');\n $this->assertEquals(200,$client->getResponse()->getStatusCode(),'Redirect failed');\n\n }", "title": "" }, { "docid": "3f37219db5d245420ed16f75976b7107", "score": "0.53310215", "text": "public function testWizard(): void\n {\n if (static::class === self::class) {\n self::assertTrue(true); // @phpstan-ignore-line\n\n return;\n }\n\n $response = $this->getResponseFromRequest(\n 'interactive/wizard.php?demo_wizard=1&' . Callback::URL_QUERY_TRIGGER_PREFIX . 'w_form_submit=ajax&' . Callback::URL_QUERY_TARGET . '=w_form_submit',\n ['form_params' => [\n 'dsn' => 'mysql://root:root@db-host.example.com/atk4',\n ]]\n );\n\n self::assertSame(200, $response->getStatusCode());\n self::assertMatchesRegularExpression($this->regexJson, $response->getBody()->getContents());\n\n $response = $this->getResponseFromRequest('interactive/wizard.php?atk_admin_wizard=2&name=Country');\n self::assertSame(200, $response->getStatusCode());\n self::assertMatchesRegularExpression($this->regexHtml, $response->getBody()->getContents());\n }", "title": "" }, { "docid": "9c48af3fd7935f18b2c4799e51fe4c40", "score": "0.532966", "text": "public function after_process_before_redirect ()\n\t{}", "title": "" }, { "docid": "8fcefc415c61d0f4475a520b97625481", "score": "0.53215647", "text": "function redirectSomewhere($value) {\n\t}", "title": "" }, { "docid": "a8c784d94a333aa2084b4c28b48a60da", "score": "0.53180164", "text": "function intended ($defaultUrl = '', $status = 302);", "title": "" }, { "docid": "1e9078e49819f829e5366553f45225ce", "score": "0.5316202", "text": "function redirectSomewhere($value) {\n }", "title": "" }, { "docid": "46a4e90d29f1b58a42f04ae7448181d9", "score": "0.52997786", "text": "private function _redirect()\n {\n $redirect = Yii::$app->request->absoluteUrl === Yii::$app->request->referrer ? '/' : Yii::$app->request->referrer;\n return Yii::$app->response->redirect($redirect);\n }", "title": "" }, { "docid": "d992e5a0447e91b872ac660bbf9538b8", "score": "0.5299235", "text": "function getCurrentStep() {\n if (!$this->stepDone) {\n return $this->read_class_name(get_called_class());\n } elseif ($this->stepDone == true && is_object($this->next)) {\n return $this->next->getCurrentStep();\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "1e293ddaa4c3538815a6a25b7365fe9b", "score": "0.52893907", "text": "static function RedirectToSetup() {\n header(\"Location: Setup.php\");\n }", "title": "" }, { "docid": "f6841f0dc1d06381eea980cb3d050a81", "score": "0.52884614", "text": "public function testCannotNextStep()\n {\n $this->expectException(\\Exception::class);\n\n $this->instance->nextStep();\n }", "title": "" }, { "docid": "aaa19502e14f8274c3ade47fcbe4754e", "score": "0.5283435", "text": "public function index($step = \"1\")\n {\n if ($step != \"1\") {\n// if (!Session::has('user_id')) {\n// Redirect::to('/accident/step/1');\n// exit;\n// }\n }\n $this->loadViewData($step);\n $this->view->wizard($this->data);\n }", "title": "" }, { "docid": "bcfa7a17ae2a3452547c840f8b269159", "score": "0.5270799", "text": "public function testRedirectBeforeRedirectModifyingStatusCode(): void\n {\n $Controller = new Controller(new ServerRequest());\n\n $Controller->getEventManager()->on('Controller.beforeRedirect', function (EventInterface $event, $url, Response $response): void {\n $controller = $event->getSubject();\n $controller->setResponse($response->withStatus(302));\n });\n\n $response = $Controller->redirect('http://cakephp.org', 301);\n\n $this->assertSame('http://cakephp.org', $response->getHeaderLine('Location'));\n $this->assertSame(302, $response->getStatusCode());\n }", "title": "" }, { "docid": "91b5ec5f5f2c6782fa7262fb0ae9af89", "score": "0.52676827", "text": "function rl_redirect(){\n\tif (!is_user_logged_in()) {\n//\t\tauth_redirect();\n\t}\n}", "title": "" }, { "docid": "0034339a1a4f24bc1ade1dca1cf0e968", "score": "0.52611816", "text": "static function isRedirect(int $status);", "title": "" }, { "docid": "cdcc3fc72187a1b1f8e8ddf881cca9ce", "score": "0.5261127", "text": "function checkLoginThenRedirect($redirect = '/git2log/') {\n if (isLoggedIn()) {\n header('Location: '.$redirect);\n exit;\n }\n }", "title": "" }, { "docid": "e5a73712e36436539160fd21f00a1494", "score": "0.5256916", "text": "public function isRedirect()\n {\n if(isset($this->data['error'])){\n return false;\n }\n \n return true;\n }", "title": "" }, { "docid": "bb06e443d418746af7b44992916a8e75", "score": "0.52526796", "text": "public function checkSuccessfulPageOpening() :void\n {\n $this->successLogIn();\n\n $article = Article::where($this->article_data)->first();\n $response = $this->get(route('crud.article.edit', ['slug' => $article->slug]));\n\n $response->assertOk();\n $response->assertViewIs(\"crud::edit\");\n }", "title": "" }, { "docid": "81650f47a75b0ca8555aa7e8922352c8", "score": "0.5252598", "text": "private function _redirect_karma()\n\t{\n\t\tglobal $context, $topic;\n\n\t\t// Figure out where to go back to.... the topic?\n\t\tif (!empty($topic))\n\t\t{\n\t\t\tredirectexit('topic=' . $topic . '.' . $this->_req->start . '#msg' . $this->_req->get('m', 'intval'));\n\t\t}\n\t\t// Hrm... maybe a personal message?\n\t\telseif (isset($_REQUEST['f']))\n\t\t{\n\t\t\tredirectexit('action=pm;f=' . $_REQUEST['f'] . ';start=' . $this->_req->start . (isset($_REQUEST['l']) ? ';l=' . $this->_req->get('l', 'intval') : '') . (isset($_REQUEST['pm']) ? '#' . $this->_req->get('pm', 'intval') : ''));\n\t\t}\n\t\t// JavaScript as a last resort.\n\t\telse\n\t\t{\n\t\t\techo '<!DOCTYPE html>\n<html ', $context['right_to_left'] ? 'dir=\"rtl\"' : '', '>\n\t<head>\n\t\t<title>...</title>\n\t\t<script>\n\t\t\thistory.go(-1);\n\t\t</script>\n\t</head>\n\t<body>&laquo;</body>\n</html>';\n\n\t\t\tobExit(false);\n\t\t}\n\t}", "title": "" } ]
ca3edb77d7bd3cd8d03e5939da8e9019
Is a typo corrected search
[ { "docid": "094a5290eb2401b66e27f14e876e3d5b", "score": "0.0", "text": "public function buildSearchUrl($queryParam, $parentSearchId);", "title": "" } ]
[ { "docid": "00e54498b585c0dff9a37c29f05fe3c4", "score": "0.865675", "text": "public function isTypoCorrectedSearch();", "title": "" }, { "docid": "0da07363a8b9d30afa40deaccb078a44", "score": "0.71221405", "text": "function checkSpelling($query) {\n return $query;\n}", "title": "" }, { "docid": "7f5811a14340ee60c6cca57ff4094fe2", "score": "0.6406987", "text": "function is_search() {}", "title": "" }, { "docid": "dcd41db90314317ed2227eb960938703", "score": "0.6166229", "text": "public function searchQueryChecker();", "title": "" }, { "docid": "f5314280395593dab5054114bee44033", "score": "0.6041544", "text": "function suggest($word)\n {\n\t\t$word = trim($word);\n\n if (empty($word)) {\n return true;\n }\n $suggestions = $this->service->execute('modules.Spellchecker.suggest',array($word));\n return $suggestions;\n }", "title": "" }, { "docid": "c20f13a2b13735afd215173f81a14928", "score": "0.60389036", "text": "public function is_search() {}", "title": "" }, { "docid": "829a90fe1118aec577be027dfe9ea97b", "score": "0.60221225", "text": "function splchk_correct($message, $words, $offsets, $suggestions, $correct){\n\tif (!is_array($words) || count($words)==0) return $message;\n\t\n\t//build correction tree, with line number as main key\n\t//offset as secondary key\n\twhile (list($num,$word)=each($words)){\n\t\t$correction = $correct[$num];\n\t\t$correction2 = $suggestions[$num];\n\t\tif (empty($correction)) $correction = $correction2;\n\t\t$correction = stripslashes($correction);\n\t\t\n\t\tif ($word!=$correction){\n\t\t\tlist($line_num, $offset) = explode(\":\", $offsets[$num]);\n\t\t\n\t\t\t$corr_a[\"word\"] = $word;\n\t\t\t$corr_a[\"correction\"] = $correction;\n\t\t\t$cq[$line_num][$offset] = $corr_a;\n\t\t\t\n\t\t\techo $word.\" -> \".$correction.\"<br>\\n\";\n\t\t}\n\t}\n\t\n\t//if no corrections, return without changes\n\tif (!is_array($cq)) return $message;\n\t\n\t//chop up message, split leading empty lines from real content\n\t$lines_raw = explode(\"\\n\", $message);\n\t$started = false;\n\twhile ( list($k,$line)=each($lines_raw) ){\n\t\t$line = chop($line);\n\t\tif (!empty($line)) $started = true;\n\t\tif ($started) $lines[] = $line;\n\t\telse $head[] = $line;\n\t}\n\n\t//process correction tree\n\techo \"<!-- Spellchecker debug output\\n \";\n\tksort($cq);\n\treset($cq);\n\twhile ( list($line_num, $a)=each($cq) ){\n\t\t$line = chop($lines[$line_num-1]);\n\t\techo \"line: $line_num\\n\";\n\t\t//handle corrections in line in reverse order so \n\t\t//offsets won't get screwed up by prior corrections\n\t\tkrsort($a);\n\t\treset($a);\n\t\twhile (list($offset, $a2)=each($a)){\n\t\t\t$word = $a2[\"word\"];\n\t\t\t$correction = $a2[\"correction\"];\n\t\t\t\n\t\t\t$before = substr($line, 0, $offset);\n\t\t\t$error = substr($line, $offset, strlen($word));\n\t\t\t$after = substr($line, $offset+strlen($word));\n\t\t\tif (strcmp($error, $word)==0){\n\t\t\t\t$line = $before.$correction.$after; //validate error\n\t\t\t\techo \"\\t$offset\\t$word -> $correction\\n\";\n\t\t\t}else{\n\t\t\t\techo \"\\t$offset\\t$word -> error: found $error instead of $word at offset\\n\";\n\t\t\t}\n\t\t}\n\t\techo \"old line: \\\"\".$lines[$line_num-1].\"\\\"\\n\";\n\t\techo \"new line: \\\"\".$line.\"\\\"\\n\";\n\t\t$lines[$line_num-1] = $line;\n\t}\n\techo \"//-->\\n\";\n\t\n\tif (is_array($head) && count($head)>0){\n\t\t$head_str = implode(\"\\n\", $head).\"\\n\";\n\t}\n\treturn $head_str.implode(\"\\n\", $lines);\n}", "title": "" }, { "docid": "cdfa25f6d1c0db18e330c62b73a2fd5f", "score": "0.59426767", "text": "function is_search()\n {\n }", "title": "" }, { "docid": "65a7bf2189228e22113e8027e3ec2bff", "score": "0.5885173", "text": "function isSearch();", "title": "" }, { "docid": "8369f80dc67fa9ec384d1b4f9dcab78e", "score": "0.5880663", "text": "public function also_match_intervening_words();", "title": "" }, { "docid": "de92adec6d2b3e9dd87e2db38a43cb00", "score": "0.58768153", "text": "function resolve_soundex($keyword)\n {\n # the most commonly used keyword that starts with the same few letters.\n $soundex=sql_value(\"select keyword value from keyword where soundex='\".soundex($keyword).\"' order by hit_count desc limit 1\",false);\n if (($soundex===false) && (strlen($keyword)>=4))\n {\n # No soundex match, suggest words that start with the same first few letters.\n return sql_value(\"select keyword value from keyword where keyword like '\" . substr($keyword,0,4) . \"%' order by hit_count desc limit 1\",false);\n }\n return $soundex;\n }", "title": "" }, { "docid": "a53d0896a770525e1377a941e5c2cb2f", "score": "0.5875431", "text": "function check_text($sText) {\n $this->missed_words = array();\n\n $sText = $this->prepare_text($sText);\n\n if ($this->use_proc_open) {\n $sqspell_output = $this->proc_open_spell($sText);\n } else {\n $sqspell_output = $this->exec_spell($sText);\n }\n\n /**\n * Define some variables to be used during the processing.\n */\n $current_line=0;\n /**\n * Now we process the output of sqspell_command (ispell or aspell in\n * ispell compatibility mode, whichever). I'm going to be scarce on\n * comments here, since you can just look at the ispell/aspell output\n * and figure out what's going on. ;) The best way to describe this is\n * \"Dark Magic\".\n */\n for ($i=0; $i<sizeof($sqspell_output); $i++){\n switch (substr($sqspell_output[$i], 0, 1)){\n /**\n * Line is empty.\n * Ispell adds empty lines when an end of line is reached\n */\n case '':\n $current_line++;\n break;\n /**\n * Line begins with \"&\".\n * This means there's a misspelled word and a few suggestions.\n */\n case '&':\n list($left, $right) = explode(\": \", $sqspell_output[$i]);\n $tmparray = explode(\" \", $left);\n $sqspell_word=$tmparray[1];\n /**\n * Check if the word is in user dictionary.\n */\n if (! in_array($sqspell_word,$this->userdic)){\n $sqspell_symb=intval($tmparray[3])-1;\n // add suggestions\n if (!isset($this->missed_words[$sqspell_word])) {\n foreach(explode(',',$right) as $word) {\n $this->missed_words[$sqspell_word]['suggestions'][] = trim($word);\n }\n }\n // add location\n $this->missed_words[$sqspell_word]['locations'][] = \"$current_line:$sqspell_symb\";\n }\n break;\n /**\n * Line begins with \"#\".\n * This means a misspelled word and no suggestions.\n */\n case '#':\n $tmparray = explode(\" \", $sqspell_output[$i]);\n $sqspell_word=$tmparray[1];\n /**\n *\n * Check if the word is in user dictionary.\n */\n if (!in_array($sqspell_word,$this->userdic)){\n $sqspell_symb=intval($tmparray[2])-1;\n // no suggestions\n $this->missed_words[$sqspell_word]['suggestions'] = array();\n // add location\n $this->missed_words[$sqspell_word]['locations'][] = \"$current_line:$sqspell_symb\";\n }\n break;\n }\n }\n return $this->missed_words;\n }", "title": "" }, { "docid": "57abb3e3a6a547cd2e158fc3df686307", "score": "0.58476084", "text": "function suggest($word){\n if($this->runAspell(\"^$word\",$out,$err)){\n //parse output\n $lines = preg_split(\"|\\n|\",$out);\n foreach ($lines as $line){\n $line = trim($line);\n if(empty($line)) continue; // empty line\n if($line[0] == '@') continue; // comment\n if($line[0] == '*') return true; // no mistakes made\n if($line[0] == '#') return array(); // mistake but no suggestions\n if($line[0] == '&'){\n $line = preg_replace('/&.*?: /','',$line);\n return preg_split('|, |',$line);\n }\n }\n }\n return array();\n }", "title": "" }, { "docid": "4034d7f00a9a7e7eb5f942455f13b736", "score": "0.58282286", "text": "function checkit($str) {\n\n$badWords = array(\"base64\",\"create_function\",\"gzinflate\",\"function\",\"script\",\"include\",\"import\",\"sql\",\"insert\",\"update\",\"replace\",\"kill\",\"lock\",\"del\",\"select\",\"sudo\",\"eval\",\"document\",\"window\",\"getElement\",\"node\",\"create\",\"name\",\"id\",\"drop\",\"add\");\n\n$matches = array();\n$matchFound = preg_match_all(\n \"/\\b(\" . implode($badWords,\"|\") . \")\\b/i\",\n $str,\n $matches\n );\n\n\tif ($matchFound) {\n\t// echo \"<p>Bad Words </p>\";\n\t// $words = array_unique($matches[0]);\n\t// foreach($words as $word) {\n\t// echo \"<li>\" . $word . \"</li>\";\n\t// }\n\t// echo \"</ul>\";\n\t\treturn true;\n\t}\nreturn false;\n}", "title": "" }, { "docid": "d64a57bc4601bb75012a09d8a065608a", "score": "0.57814366", "text": "function match_my_string()\n\t{\n\t\t//else return false;\n\t\t $all_abusive=array();\n\t\t\t$nedel_arr=$this->review_model->getall_abuse();\n\t\t\tif(!empty($nedel_arr))\n\t\t\t{\n\t\t\t\t$k=0;\n\t\t\t\tforeach($nedel_arr as $row)\n\t\t\t\t{\n\t\t\t\t\t$all_abusive[$k]=$row['word'];\n\t\t\t\t\t$k++;\n\t\t\t\t}\n\t\t\t\treturn $all_abusive;\n\t\t\t}\n\t}", "title": "" }, { "docid": "4e360314851802e2de0a2ba1427c9b89", "score": "0.5778263", "text": "function resolve_soundex($keyword)\n {\n # the most commonly used keyword that starts with the same few letters.\n global $soundex_suggest_limit;\n $soundex=sql_value(\"SELECT keyword value FROM keyword WHERE soundex='\".soundex($keyword).\"' AND keyword NOT LIKE '% %' AND hit_count>'\" . $soundex_suggest_limit . \"' ORDER BY hit_count DESC LIMIT 1\",false);\n if (($soundex===false) && (strlen($keyword)>=4))\n {\n # No soundex match, suggest words that start with the same first few letters.\n return sql_value(\"SELECT keyword value FROM keyword WHERE keyword LIKE '\" . substr($keyword,0,4) . \"%' AND keyword NOT LIKE '% %' ORDER BY hit_count DESC LIMIT 1\",false);\n }\n return $soundex;\n }", "title": "" }, { "docid": "933ab9bf02eb253227dffd67458ac9cc", "score": "0.576298", "text": "function isKomoditiMatch($input='',$tipe='nama',$apicon='') {\n\tglobal $thedatabase;\t\n\t// array of words to check against\n\tif($tipe == 'nama') {\n\t\t$sql = \"\n\t\t\tSELECT nama AS komoditi\n\t\t\tFROM \n\t\t\t\t\".$thedatabase.\".komoditi_jenis\n\t\t\tGROUP BY nama\n\t\t\";\n\t} else {\n\t\t$sql = \"\n\t\t\tSELECT jenis AS komoditi\n\t\t\tFROM \n\t\t\t\t\".$thedatabase.\".komoditi_jenis\n\t\t\tGROUP BY jenis\n\t\t\";\n\t}\n\t$query = mysql_query($sql,$apicon);\n\t$words = array();\n\twhile($row = mysql_fetch_assoc($query)) {\n\t $words[] = $row[\"komoditi\"];\n\t}\n\t\n\t//$words = array('apple','pineapple','banana','orange','radish','carrot','pea','bean','potato');\n\n\t// no shortest distance found, yet\n\t$shortest = -1;\n\n\t// loop through words to find the closest\n\tforeach ($words as $word) {\n\n\t // calculate the distance between the input word,\n\t // and the current word\n\t $lev = levenshtein($input, $word);\n\n\t // check for an exact match\n\t if ($lev == 0) {\n\n\t // closest word is this one (exact match)\n\t $closest = $word;\n\t $shortest = 0;\n\n\t // break out of the loop; we've found an exact match\n\t break;\n\t }\n\n\t // if this distance is less than the next found shortest\n\t // distance, OR if a next shortest word has not yet been found\n\t if ($lev <= $shortest || $shortest < 0) {\n\t // set the closest match, and shortest distance\n\t $closest = $word;\n\t $shortest = $lev;\n\t }\n\t}\n\n\t/*\n\techo \"Input word: $input\\n\";\n\tif ($shortest == 0) {\n\t echo \"Exact match found: $closest\\n\";\n\t} else {\n\t echo \"Did you mean: $closest?\\n\";\n\t}\n\t*/\n\treturn $closest;\n}", "title": "" }, { "docid": "bbf8550851ea0f7f77e23879ca9710ab", "score": "0.57316893", "text": "function is_special_word($word)\n\t{\n\t\t$rs = $this->DataBase->select_sql('se_sp_words', array('word'=>$word));\n\t\treturn (!$rs->eof());\n\t}", "title": "" }, { "docid": "301d5d9c583b8dc65fe55dd5a8eee568", "score": "0.57265806", "text": "function field_check_alias($field, $data){\n $err = field_check_unique($field, $data);\n \n //create pattern for good chars\n $patt = 'qwertyuiopasdfghjklzxcvbnm';\n $patt .= strtoupper($patt);\n $patt .= '1234567890_-';\n \n for($i=0; $i<mb_strlen($data, 'utf-8'); $i++){\n $char = mb_substr($data, $i, 1, 'utf-8');\n if (mb_strpos($patt, $char, 0, 'utf-8')===false){\n $err[] = \"Недопустимый символ &quot;{$char}&quot;<br/><a href=\\\"#\\\" title=\\\"$patt\\\" style=\\\"text-decoration:none; border: gray dotted 1px; color: gray;\\\">Можно только эти</a> \";\n break;\n }\n }\n \n return $err;\n}", "title": "" }, { "docid": "92caa2740b9e5191671f31b551361031", "score": "0.5699494", "text": "function finding($text, $query, $var_desc)\n {\n\n if(stripos($var_desc, $query) !== false){return $var_desc.'<br>';}\n else{\n//if not extract the text and try finding a match\n $textopt = $text->plaintext;\n $splitted = preg_split( \"/[.\\n]/\", $textopt );\n\t foreach($splitted as $line)\n {\n if (stripos($line, $query) !== false)\n {\n if(strlen($line) > 100)//length of query must be more than 100\n \t {return $line;}}}}\n return 0;}", "title": "" }, { "docid": "90f2e9690c7f0d0d0621bf8533c32e13", "score": "0.5675225", "text": "function reportingDetails_spellCheck($connid)\r\n\t{\r\n\t\t$reportingStringArr =array();\t\t\r\n\r\n\t\t$query =\"SELECT da_testRequest.testName, da_reportingDetails.reporting_head FROM da_testRequest \r\n\t\t\t\t INNER JOIN da_reportingDetails\r\n\t\t\t\t ON da_testRequest.paper_code=da_reportingDetails.papercode\r\n\t\t\t\t WHERE da_testRequest.id ='\".$this->test_requestid.\"' \";\r\n\t\t$dbqry = new dbquery($query,$connid);\r\n\r\n\t\t$index = 0;\r\n\t\twhile($result = $dbqry->getrowarray()) {\r\n\r\n\t\t\tif($index ==0)\r\n\t\t\t\t$reportingStringArr[] = trim($result[\"testName\"]);\r\n\r\n\t\t\t$reportingStringArr[]=trim($result[\"reporting_head\"]);\r\n\t\t\t$index++;\r\n\t\t}\r\n\r\n\t\tforeach($reportingStringArr as $key => $stringVal) {\r\n\r\n\t\t\t$tokens =\"-,;?:!_^#@%$&*()[]{}+=/\\\"\\t\\r\\n\\'1234567890. \";\r\n\t\t\t$str_token = strtok($stringVal,$tokens);\r\n\r\n\t\t\twhile ($str_token){\r\n\t\t\t\t$word1_query = \"select count(*) from dictionary where word='$str_token'\";\r\n\t\t\t\t$word1_dbqry = new dbquery($word1_query,$connid);\r\n\t\t\t\t$word1_result = $word1_dbqry->getrowarray();\r\n\r\n\t\t\t\tif($word1_result[0] == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$word2_query = \"select count(*) from names where name='$str_token'\";\r\n\t\t\t\t\t$word2_dbqry = new dbquery($word2_query,$connid);\r\n\t\t\t\t\t$word2_result = $word2_dbqry->getrowarray();\r\n\t\t\t\t\tif($word2_result[0] == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$word3_query= \"select count(*) from other_names where word ='$str_token'\";\r\n\t\t\t\t\t\t$word3_dbqry = new dbquery($word3_query,$connid);\r\n\t\t\t\t\t\t$word3_result = $word3_dbqry->getrowarray();\r\n\t\t\t\t\t\tif($word3_result[0] == 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->addDictionaryWordsArr[]=$str_token;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\r\n\t\t\t\t$str_token = strtok($tokens);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "897e1708fdc5924c5a1b79ff790e3b06", "score": "0.56738883", "text": "public function testPlayCorrectWord()\n {\n }", "title": "" }, { "docid": "f235e592b21ba1d3886fbbcf050017bf", "score": "0.5664077", "text": "function suggestSoundexNames(){\n\t\t$len = strlen($this->_q)-1;\n\t\t$names = array();\n\t\tif($len>5){\n\t\t\t$len = 5;\n\t\t}while($len>-1){\n\t\t\t$where = \" and soundex(`name`) like concat(substr(soundex('\".$this->_q.\"'),1,$len),'%')\"; \n\t\t\t$sql = $this->constructNamesSQL($where);\n\t\t\t$names = $this->safeFetchAll($sql);\n\t\t\t//echo \"<br>$this->_q $len \" . sizeof($names);\n\t\t\tif(sizeof($names)){\n\t\t\t\t//echo \"Names found \" . implode(', ',$names);// implode($names,', ');\n\t\t\t\treturn $names;\n\t\t\t}\n\t\t\t$len--;\n\t\t}\n\t\treturn $names;\n\t}", "title": "" }, { "docid": "b07a470cce3547e210f4bf0f30e20f1d", "score": "0.5631999", "text": "private function retrieve_searchphrase()\n {\n }", "title": "" }, { "docid": "187f70f082a3d0c9e3ebe4718dce4f6a", "score": "0.561036", "text": "function anti_injection($input) {\r\n $aforbidden = array (\"insert\", \"select\", \"update\", \"delete\", \"truncate\", \"replace\", \"drop\", \"or\", \";\", \"#\", \"=\", \"<\", \">\", \"/\", \"{\", \"}\", \"'\", \"+\");\r\n \r\n $breturn=true;\r\n foreach($aforbidden as $cforbidden) {\r\n if (strpos($input, $cforbidden) == TRUE || $input == $cforbidden){\r\n $breturn=false;\r\n break;\r\n }\r\n }\r\n return $breturn;\r\n}", "title": "" }, { "docid": "62f624e8755657b705f61635ea037a89", "score": "0.56101614", "text": "private// -- Function Name : arrNearMiss\n\t// -- Params : $word\n\t// -- Purpose :\n\tfunction arrNearMiss( $w ){\n\t\t\n\t\t\n\t\t$results = array();\n\t\t$strTry = \"abcdefghijklmnopqrstuvwxyz 'ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\t\t$words=array();\n\t\t\n\t\t\tif($w !=$this->DeCapitalise($w)){\n\t\t\t$words = array($w, $this->DeCapitalise($w));\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$words = array(($w.\"\"));\n\t\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\n\n\t\t\tforeach($words as $word){\n\t\tfor( $l = 0; $l<strlen( $word ); $l++ ){\n\t\t\t\n\t\t\tfor( $i = 0; $i<strlen( $strTry ); $i++ ){\n\t\t\t\t$letter = $strTry [ $i ];\n\t\t\t\t\n\t\t\t\tif( $l == 0 || $i<28 ){\n\t\t\t\t\t$guess = $word;\n\t\t\t\t\t$guess [ $l ] = $letter;\n\t\t\t\t\t$results [ ] = trim($guess);\n\t\t\t\t\t$guess = substr( $word, 0, $l ) . $letter . substr( $word, $l ) ;\n\t\t\t\t\t$results [ ] = trim( $guess );\n\t\t\t\t\t\n\t\t\t\t\tif( $letter == \" \" && $l>0 ){\n\t\t\t\t\t\tfor( $m = $l+2; $m<strlen( $word )-1; $m++ ){\n\t\t\t\t\t\t\t$results [ ] = trim( substr( $guess, 0, $m ) . \" \" . substr( $guess, $m ) );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tif( $l == 0 && $letter !==\" \" && $letter !==\"'\" ){\n\t\t\t\t\t$guess = $word;\n\t\t\t\t\t$guess = $letter . $guess ;\n\t\t\t\t\t$results [ ] = trim($guess);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\t\t\tif( $l>0 ){\n\t\t\t\t$guess = $word;\n\t\t\t\t$guess2 = $guess;\n\t\t\t\t$guess [ $l ] = $guess2 [ $l-1 ];\n\t\t\t\t$guess [ $l-1 ] = $guess2 [ $l ];\n\t\t\t\t$results [ ] = trim($guess);\n\t\t\t}\n\n\t\t\t//swap\n\t\t\t$guess = $word;\n\t\t\t$guess [ $l ] = \"^\";\n\t\t\t$results [ ] = trim(str_replace( \"^\",\"\", $guess ));\n\t\t\t//delete\n\t\t}}\n\n\t\t$output = array();\n\t\tsort( $results );\n\t\t$results = array_unique( $results );\n\t\tsort( $results );\n\t\t//print_r($results);\n\t\tfor( $l = 0; $l<( count( $results ) ); $l++ ){\n\t\t\t\n\t\t\tif( $this -> SpellCheckAndSpaces( $results [ $l ], false ) ){\n\t\t\t\t$output [ ] = $results [ $l ];\n\t\t\t}\n\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "5b0852dee9f351ea352e39d8efe9c1ec", "score": "0.5593945", "text": "public function EnglishMisspellingsWords() {\r\n\t\t\treturn [\r\n\t\t\t\t'zaffar'=>[\r\n\t\t\t\t\t'zaffer',\r\n\t\t\t\t],\r\n\t\t\t\t'zagged'=>[\r\n\t\t\t\t\t'zaged',\r\n\t\t\t\t],\r\n\t\t\t\t'zagging'=>[\r\n\t\t\t\t\t'zaging',\r\n\t\t\t\t],\r\n\t\t\t\t'zambian-occupied'=>[\r\n\t\t\t\t\t'zambian occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'zamindar'=>[\r\n\t\t\t\t\t'zaminder',\r\n\t\t\t\t],\r\n\t\t\t\t'zapper'=>[\r\n\t\t\t\t\t'zaper',\r\n\t\t\t\t],\r\n\t\t\t\t'zappy'=>[\r\n\t\t\t\t\t'zapy',\r\n\t\t\t\t],\r\n\t\t\t\t'zaptiahs'=>[\r\n\t\t\t\t\t'zaptias',\r\n\t\t\t\t],\r\n\t\t\t\t'zeal'=>[\r\n\t\t\t\t\t'zel',\r\n\t\t\t\t],\r\n\t\t\t\t'zebra'=>[\r\n\t\t\t\t\t'zeebra',\r\n\t\t\t\t],\r\n\t\t\t\t'zecchin'=>[\r\n\t\t\t\t\t'zechin',\r\n\t\t\t\t],\r\n\t\t\t\t'zecchino'=>[\r\n\t\t\t\t\t'zechino',\r\n\t\t\t\t],\r\n\t\t\t\t'zedoary'=>[\r\n\t\t\t\t\t'zedoery',\r\n\t\t\t\t],\r\n\t\t\t\t'zein'=>[\r\n\t\t\t\t\t'zien',\r\n\t\t\t\t],\r\n\t\t\t\t'zeins'=>[\r\n\t\t\t\t\t'ziens',\r\n\t\t\t\t],\r\n\t\t\t\t'zeitgeber'=>[\r\n\t\t\t\t\t'zietgeber',\r\n\t\t\t\t],\r\n\t\t\t\t'zeitgeist'=>[\r\n\t\t\t\t\t'zetgeist',\r\n\t\t\t\t],\r\n\t\t\t\t'zemindar'=>[\r\n\t\t\t\t\t'zeminder',\r\n\t\t\t\t],\r\n\t\t\t\t'zemindary'=>[\r\n\t\t\t\t\t'zemindery',\r\n\t\t\t\t],\r\n\t\t\t\t'zenithal'=>[\r\n\t\t\t\t\t'zenital',\r\n\t\t\t\t],\r\n\t\t\t\t'zeppelin'=>[\r\n\t\t\t\t\t'zepelin',\r\n\t\t\t\t],\r\n\t\t\t\t'zidovudine'=>[\r\n\t\t\t\t\t'zidovudini',\r\n\t\t\t\t],\r\n\t\t\t\t'ziegfeld'=>[\r\n\t\t\t\t\t'ziegfield',\r\n\t\t\t\t],\r\n\t\t\t\t'ziegfeld follies'=>[\r\n\t\t\t\t\t'zeigfeld follies',\r\n\t\t\t\t\t'ziegfield follies',\r\n\t\t\t\t],\r\n\t\t\t\t'ziegfield follies'=>[\r\n\t\t\t\t\t'ziegfeld follies',\r\n\t\t\t\t],\r\n\t\t\t\t'zigged'=>[\r\n\t\t\t\t\t'ziged',\r\n\t\t\t\t],\r\n\t\t\t\t'zigging'=>[\r\n\t\t\t\t\t'ziging',\r\n\t\t\t\t],\r\n\t\t\t\t'ziggurat'=>[\r\n\t\t\t\t\t'zigurat',\r\n\t\t\t\t],\r\n\t\t\t\t'ziggurats'=>[\r\n\t\t\t\t\t'zigurats',\r\n\t\t\t\t],\r\n\t\t\t\t'zigzagged'=>[\r\n\t\t\t\t\t'zigzaged',\r\n\t\t\t\t],\r\n\t\t\t\t'zigzagger'=>[\r\n\t\t\t\t\t'zigzager',\r\n\t\t\t\t],\r\n\t\t\t\t'zigzaggers'=>[\r\n\t\t\t\t\t'zigzagers',\r\n\t\t\t\t],\r\n\t\t\t\t'zigzagging'=>[\r\n\t\t\t\t\t'zigzaging',\r\n\t\t\t\t],\r\n\t\t\t\t'zill'=>[\r\n\t\t\t\t\t'zil',\r\n\t\t\t\t],\r\n\t\t\t\t'zillah'=>[\r\n\t\t\t\t\t'zilla',\r\n\t\t\t\t],\r\n\t\t\t\t'zillionaire'=>[\r\n\t\t\t\t\t'zilionaire',\r\n\t\t\t\t],\r\n\t\t\t\t'zincy'=>[\r\n\t\t\t\t\t'zinsy',\r\n\t\t\t\t],\r\n\t\t\t\t'zineb'=>[\r\n\t\t\t\t\t'zinib',\r\n\t\t\t\t],\r\n\t\t\t\t'zines'=>[\r\n\t\t\t\t\t'zinis',\r\n\t\t\t\t],\r\n\t\t\t\t'zinnia'=>[\r\n\t\t\t\t\t'zinia',\r\n\t\t\t\t],\r\n\t\t\t\t'zionist'=>[\r\n\t\t\t\t\t'sionist',\r\n\t\t\t\t],\r\n\t\t\t\t'zionists'=>[\r\n\t\t\t\t\t'sionists',\r\n\t\t\t\t],\r\n\t\t\t\t'zipper'=>[\r\n\t\t\t\t\t'ziper',\r\n\t\t\t\t],\r\n\t\t\t\t'zippered'=>[\r\n\t\t\t\t\t'zipered',\r\n\t\t\t\t],\r\n\t\t\t\t'zippy'=>[\r\n\t\t\t\t\t'zipy',\r\n\t\t\t\t],\r\n\t\t\t\t'zoantharian'=>[\r\n\t\t\t\t\t'zoantharan',\r\n\t\t\t\t],\r\n\t\t\t\t'zoea'=>[\r\n\t\t\t\t\t'zoe',\r\n\t\t\t\t],\r\n\t\t\t\t'zombie'=>[\r\n\t\t\t\t\t'zombei',\r\n\t\t\t\t\t'zombi',\r\n\t\t\t\t],\r\n\t\t\t\t'zonary'=>[\r\n\t\t\t\t\t'zonery',\r\n\t\t\t\t],\r\n\t\t\t\t'zonular'=>[\r\n\t\t\t\t\t'zonuler',\r\n\t\t\t\t],\r\n\t\t\t\t'zoologist'=>[\r\n\t\t\t\t\t'zoölogist',\r\n\t\t\t\t],\r\n\t\t\t\t'zoomorph'=>[\r\n\t\t\t\t\t'zoomourph',\r\n\t\t\t\t],\r\n\t\t\t\t'zoomorphic'=>[\r\n\t\t\t\t\t'zoomourphic',\r\n\t\t\t\t],\r\n\t\t\t\t'zoomorphs'=>[\r\n\t\t\t\t\t'zoomourphs',\r\n\t\t\t\t],\r\n\t\t\t\t'zooxanthella'=>[\r\n\t\t\t\t\t'zooxenthella',\r\n\t\t\t\t],\r\n\t\t\t\t'zouave'=>[\r\n\t\t\t\t\t'zoauve',\r\n\t\t\t\t],\r\n\t\t\t\t'zowie'=>[\r\n\t\t\t\t\t'zowei',\r\n\t\t\t\t\t'zowi',\r\n\t\t\t\t],\r\n\t\t\t\t'zoë conway'=>[\r\n\t\t\t\t\t'zoe conway',\r\n\t\t\t\t],\r\n\t\t\t\t'zucchetto'=>[\r\n\t\t\t\t\t'zuchetto',\r\n\t\t\t\t],\r\n\t\t\t\t'zucchini'=>[\r\n\t\t\t\t\t'zucchina',\r\n\t\t\t\t\t'zuchini',\r\n\t\t\t\t],\r\n\t\t\t\t'zygomorphic'=>[\r\n\t\t\t\t\t'zygomourphic',\r\n\t\t\t\t],\r\n\t\t\t\t'zygomorphies'=>[\r\n\t\t\t\t\t'zygomourphies',\r\n\t\t\t\t],\r\n\t\t\t\t'zygomorphy'=>[\r\n\t\t\t\t\t'zygomourphy',\r\n\t\t\t\t],\r\n\t\t\t];\r\n\t\t}", "title": "" }, { "docid": "bf755b4c2600d859301630f2230cece4", "score": "0.5582488", "text": "public function getSpellingSuggestions()\n {\n return array();\n }", "title": "" }, { "docid": "b317c6a323551c5a40d5b34067a9fb3d", "score": "0.5561991", "text": "abstract public function soundex($str);", "title": "" }, { "docid": "853a8dd8239b07514bdd76fe0604af1a", "score": "0.5547699", "text": "function check($word){\n if(is_array($this->suggest($word))){\n return false;\n }else{\n return true;\n }\n }", "title": "" }, { "docid": "4ea267efc33f35ddd88d3825675497ed", "score": "0.5546574", "text": "function edit_texts_get_wh_query($currentquery, $currentquerymode, $currentregexmode)\n{\n $wh_query = $currentregexmode . 'LIKE ';\n if ($currentregexmode == '') {\n $wh_query .= convert_string_to_sqlsyntax(\n str_replace(\"*\", \"%\", mb_strtolower($currentquery, 'UTF-8'))\n );\n } else {\n $wh_query .= convert_string_to_sqlsyntax($currentquery);\n }\n\n switch($currentquerymode){\n case 'title,text':\n $wh_query = ' and (TxTitle ' . $wh_query . ' or TxText ' . $wh_query . ')';\n break;\n case 'title':\n $wh_query = ' and (TxTitle ' . $wh_query . ')';\n break;\n case 'text':\n $wh_query = ' and (TxText ' . $wh_query . ')';\n break;\n }\n if ($currentquery!=='') {\n if ($currentregexmode !== '' \n && @mysqli_query(\n $GLOBALS[\"DBCONNECTION\"], \n 'SELECT \"test\" RLIKE ' . convert_string_to_sqlsyntax($currentquery)\n ) === false\n ) {\n $wh_query = '';\n unset($_SESSION['currentwordquery']);\n if (isset($_REQUEST['query'])) { \n echo '<p id=\"hide3\" style=\"color:red;text-align:center;\">' + \n '+++ Warning: Invalid Search +++</p>'; \n }\n }\n } else { \n $wh_query = ''; \n }\n return $wh_query;\n}", "title": "" }, { "docid": "20fbce9a17ee894b63f07f28dabcc88e", "score": "0.5527268", "text": "function psuedolevenshtein( $word, $try ){\n\t\t\t$casemod = ( ( strtolower( $word [ 0 ] ) == $word [ 0 ] ) != ( strtolower( $try [ 0 ] ) == $try [ 0 ] ) );\n\t\t\t$w = strtolower( $word );\n\t\t\t$t = strtolower( $try );\n\n\t\t\tif($w==$t){\n\t\t\t\treturn 0.5;\n\t\t\t}\n\t\t\t$w = $this -> cleanPunctuation( $w );\n\t\t\t$t = $this -> cleanPunctuation( $t );\n\t\t\t\tif($w==$t){\n\t\t\t\t\treturn 0.4;\n\t\t\t\t}\n\n\t\t\t$w = $this -> cleanForeign( $w );\n\t\t\t$t = $this -> cleanForeign( $t );\n\n\n\n\t\t\tif($w==$t){\n\t\t\t\treturn 1;\n\t\t\t}\n\n\n\t\t\t$w_novowel = $this -> stripVowels( $w );\n\t\t\t$t_novowel = $this -> stripVowels( $t );\n\n\n\n\n\n\n\t\t\t$d = levenshtein( $w, $t );\n\n\t\t\t\tif($w_novowel==$t_novowel){\n\t\t\t\t$d-=2;\n\t\t\t\t}\n\n\t\t\tif($w[0]!=$t[0]){$d+=0.5;}\n\t\t\tif($w[strlen($w)-1]==$t[strlen($t)-1]){$d-=0.3;}\n\n\n\n\t\t\tif(strlen($w)>2){\n\t\t\t\t$ws = strtolower($w [strlen($w)-1])===\"s\";\n\n\t\t\t\tif($ws){\n\t\t\t\t\t$wt = strtolower($t [strlen($t)-1])===\"s\";\n\n\t\t\t\t\tif($wt){\n\t\t\t\t\t\t$d-=0.4;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$len = strlen( $t );\n\t\t\n\n\t\t\tif( $casemod ){\n\t\t\t\t\t$d++;\t\n\t\t\t\tif( $len>3 ){\n\t\t\t\t\t$d += 0.15;\n\t\t\t\t}\n\n\n\t\t\t\tif( $len>4 ){\n\t\t\t\t\t$d += 0.25;\n\t\t\t\t}\n\n\n\t\t\t\tif( $len>5 ){\n\t\t\t\t\t$d += 0.25;\n\t\t\t\t}\n\n\n\t\t\t\tif( $len>6 ){\n\t\t\t\t\t$d += 0.1;\n\t\t\t\t}\n\n\t\t\t}\n\n\n\n\n\n\n\n\n\t\t\tif( substr_count( $t, \" \" ) ){\n\t\t\t\t$spacetest = explode( \" \", $t );\n\n\t\t\t\t\t$d += count($spacetest)-1;\n\n\t\t\t\tforeach( $spacetest as $frag ){\n\n\t\t\t\t\tif($this->stripVowels( $frag )==$frag){\n\t\t\t\t\t\t$d+=1.5;\n\t\t\t\t\tif(strlen($frag)==1){\n\t\t\t\t\t\t$d+=1;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\tif(strlen($frag)==1){\n\t\t\t\t\t\t\t$d+=1.5;\t\n\t\t\t\t\t\t}\n\n\n\t\t\t\tif(strlen($frag)<2){\n\t\t\t\t\t$d+=1;\t\n\t\t\t\t}\n\t\t\t\tif(strlen($frag)<3){\n\t\t\t\t\t$d+=0.6;\t\n\t\t\t\t}\n\t\t\t\tif(strlen($frag)<4){\n\t\t\t\t\t$d+=0.4;\t\n\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t}\n\n\t$w = str_replace( \" \",\"\", $w );\n\t$t = str_replace( \" \",\"\", $t );\n\n\t\t\t$w_arrray = str_split( $w );\n\t\t\t$t_arrray = str_split( $t );\n\t\t\tsort( $w_arrray );\n\t\t\tsort( $t_arrray );\n\n\t\t\tif( implode( \"\", $w_arrray ) == implode( \"\", $t_arrray ) ){\n\t\t\t\t$d += -.9;\n\t\t\t}\n\n\t\t\t$w_arrray = array_unique( $w_arrray );\n\t\t\t$t_arrray = array_unique( $t_arrray );\n\t\t\tsort( $w_arrray );\n\t\t\tsort( $t_arrray );\n\n\t\t\tif( implode( \"\", $w_arrray ) == implode( \"\", $t_arrray ) ){\n\t\t\t\t$d += -0.9;\n\t\t\t}\n\n\t\t\t//removeDoubleChars\n\t\t\t$w = str_replace( \"ie\",\"y\", $w );\n\t\t\t$t = str_replace( \"ie\",\"y\", $t );\n\t\t\t$w = str_replace( \"z\",\"s\", $w );\n\t\t\t$t = str_replace( \"z\",\"s\", $t );\n\t\t\t$w = str_replace( \"ph\", \"f\", $w );\n\t\t\t$t = str_replace( \"ph\", \"f\", $t );\n\n\t\t\tif($w==$t){\n\t\t\t\t$d-=1;\n\t\t\t}\n\n\t\t\tif( $t == $t_novowel ){\n\t\t\t\t$d += 0.4;\n\t\t\t}\n\n\t\t\t;\n\n\t\t\tif( $w_novowel == $t_novowel ){\n\t\t\t\t$d -= -0.8;\n\t\t\t}\n\n\t\t\treturn $d;\n\t\t}", "title": "" }, { "docid": "7904bb9bbf1e83396962b5011b1cc0de", "score": "0.55253005", "text": "function checkSearch(&$data)\n{\n if(!isset($data[$this->name])){\n return false;\n }\n\n if ('' != trim($data[$this->name]) ){\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "f856942c76662acc5e18fd236113a86a", "score": "0.55124485", "text": "function suggest()\n\t{\t\t\n\t\t$suggestions = $this->Asset->get_search_suggestions($this->input->post('q'), $this->input->post('limit'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->input->post('search_custom'), !empty($this->input->post('is_deleted')));\n\n\t\techo implode(\"\\n\",$suggestions);\n\t}", "title": "" }, { "docid": "da88efff3f6ffb7aec8b53d974b048f9", "score": "0.55082834", "text": "function own_strpos($kandydat, $podmiana)\n\t{\n\t}", "title": "" }, { "docid": "1e422796b2a116bbe989bb1da01660a9", "score": "0.55024046", "text": "public function isFind();", "title": "" }, { "docid": "d888d3a97a619e4db4ba1d9c7886491f", "score": "0.5487817", "text": "public function search($str)\n {\n\n }", "title": "" }, { "docid": "1c69e7fdde3657165c0f4f0bb2e70911", "score": "0.5478002", "text": "public function did_you_mean() {\n\t\t$suggested_terms = [];\n\t\t$original_search_tokens = Utils::tokenize( $this->partial->get_query()->get_keywords() )->get();\n\n\t\tforeach ( $original_search_tokens as $search_token ) {\n\t\t\t$suggested_term = '';\n\t\t\t$shortest = -1;\n\n\t\t\t// If this is an exact match, put it in place and continue.\n\t\t\tif ( in_array( $search_token, $this->exact_matches, true ) ) {\n\t\t\t\t$suggested_terms[] = $search_token;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Loop through the fuzzy tokens to find the best match.\n\t\t\tforeach ( $this->tokens as $fuzzy_token ) {\n\t\t\t\t$lev = levenshtein( $fuzzy_token, $search_token );\n\n\t\t\t\tif ( $lev <= $shortest || $shortest < 0 ) {\n\t\t\t\t\t$suggested_term = $fuzzy_token;\n\t\t\t\t\t$shortest = $lev;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! empty( $suggested_term ) ) {\n\t\t\t\t$suggested_terms[] = $suggested_term;\n\t\t\t}\n\n\t\t\t$suggested_term = '';\n\t\t\t$shortest = -1;\n\t\t}\n\n\t\t// Tell the Query that we've made a suggestion.\n\t\tif ( ! empty( $suggested_terms ) && ! empty( array_diff( $suggested_terms, $original_search_tokens ) ) ) {\n\t\t\t$this->partial->get_query()->set_suggested_search( new Tokens( implode( ' ', $suggested_terms ) ) );\n\t\t}\n\n\t\treturn $suggested_terms;\n\t}", "title": "" }, { "docid": "10f3a93f06e71c1bf4d668f3b07897ef", "score": "0.5459675", "text": "function COM_checkWords( $Message )\n{\n global $_CONF;\n\n $EditedMessage = $Message;\n\n if( $_CONF['censormode'] != 0 )\n {\n if( is_array( $_CONF['censorlist'] ))\n {\n $Replacement = $_CONF['censorreplace'];\n\n switch( $_CONF['censormode'])\n {\n case 1: # Exact match\n $RegExPrefix = '(\\s*)';\n $RegExSuffix = '(\\W*)';\n break;\n\n case 2: # Word beginning\n $RegExPrefix = '(\\s*)';\n $RegExSuffix = '(\\w*)';\n break;\n\n case 3: # Word fragment\n $RegExPrefix = '(\\w*)';\n $RegExSuffix = '(\\w*)';\n break;\n }\n\n foreach ($_CONF['censorlist'] as $c) {\n if (!empty($c)) {\n $EditedMessage = MBYTE_eregi_replace($RegExPrefix . $c\n . $RegExSuffix, \"\\\\1$Replacement\\\\2\", $EditedMessage);\n }\n }\n }\n }\n\n return $EditedMessage;\n}", "title": "" }, { "docid": "f0a84339f5b2ee61e5417dcbf185eba7", "score": "0.5458908", "text": "function refine_searchstring($search)\n {\n # it eliminates duplicate terms, helps the field content to carry values over into advanced search correctly, fixes a searchbar bug where separators (such as in a pasted filename) cause an initial search to fail, separates terms for searchcrumbs.\n \n global $use_refine_searchstring, $dynamic_keyword_and;\n \n if (!$use_refine_searchstring){return $search;}\n \n if (substr($search,0,1)==\"\\\"\" && substr($search,-1,1)==\"\\\"\") {return $search;} // preserve string search functionality.\n \n global $noadd;\n $search=str_replace(\",-\",\", -\",$search);\n $search=str_replace (\"\\xe2\\x80\\x8b\",\"\",$search);// remove any zero width spaces.\n \n $keywords=split_keywords($search, false, false, false, false, true);\n\n $orfields=get_OR_fields(); // leave checkbox type fields alone\n $dynamic_keyword_fields=sql_array(\"SELECT name value FROM resource_type_field where type=9\");\n \n $fixedkeywords=array();\n foreach ($keywords as $keyword)\n {\n if (strpos($keyword,\"startdate\")!==false || strpos($keyword,\"enddate\")!==false)\n {\n $keyword=str_replace(\" \",\"-\",$keyword);\n }\n \n if(strpos($keyword,\"!collection\") === 0)\n {\n $collection=intval(substr($search,11));\n $keyword = \"!collection\" . $collection;\n }\n \n if (strpos($keyword,\":\")>0)\n {\n $keywordar=explode(\":\",$keyword,2);\n $keyname=$keywordar[0];\n if (substr($keyname,0,1)!=\"!\")\n {\n if(substr($keywordar[1],0,5)==\"range\"){$keywordar[1]=str_replace(\" \",\"-\",$keywordar[1]);}\n if (!in_array($keyname,$orfields) && (!$dynamic_keyword_and || ($dynamic_keyword_and && !in_array($keyname, $dynamic_keyword_fields))))\n {\n $keyvalues=explode(\" \",str_replace($keywordar[0].\":\",\"\",$keywordar[1]));\n }\n else\n {\n $keyvalues=array($keywordar[1]);\n }\n foreach ($keyvalues as $keyvalue)\n {\n if (!in_array($keyvalue,$noadd))\n { \n $fixedkeywords[]=$keyname.\":\".$keyvalue;\n }\n }\n }\n else if (!in_array($keyword,$noadd))\n {\n $keywords=explode(\" \",$keyword);\n $fixedkeywords[]=$keywords[0];\n } // for searches such as !list\n }\n else\n {\n if (!in_array($keyword,$noadd))\n { \n $fixedkeywords[]=$keyword;\n }\n }\n }\n $keywords=$fixedkeywords;\n $keywords=array_unique($keywords);\n $search=implode(\", \",$keywords);\n $search=str_replace(\",-\",\" -\",$search); // support the omission search\n return $search;\n }", "title": "" }, { "docid": "beed395e093e75d7096e8ded22ebdf6a", "score": "0.5450112", "text": "public static function existsStrTerm ($suspect, $search) : bool {\n\n return strpos ($suspect, $search) > -1;\n\n }", "title": "" }, { "docid": "9b7513f993b71990b5f9dc436ae8bf6b", "score": "0.5432248", "text": "public function is_search()\n {\n }", "title": "" }, { "docid": "b38baf01d65967e862924c083068a2d4", "score": "0.5428876", "text": "private function searchWords( $srt, $upFirstLetter = false ) {\n $srt = PATH_TO_SRT . $srt;\n\t\t$file = file_get_contents($srt);\n\n\t\tif ( !$file ) {\n\t\t\tthrow new Exception(\"Don't finded file in server\");\n\t\t}\n\n\t\t$array = array();\n\n\t\tif ( $upFirstLetter === true ) {\n\t\t\tpreg_match_all('![a-zA-Z]{4,}!', $file, $array);\n\t\t} else {\n\t\t\tpreg_match_all('!(\\b[^A-Z][a-z]{4,})!', $file, $array);\n\t\t}\n\n\t\t$result = array_count_values($array[0]);\n arsort($result);\n $result = array_keys($result);\n\n $result = array_map('trim', $result); // delete space\n\n return $result;\n\t}", "title": "" }, { "docid": "367655574e04f4fc697cdd01a1da09e3", "score": "0.5425955", "text": "public function valid_match($phrase, $wordsmatched, $wordtotry, $phraseleveloptions);", "title": "" }, { "docid": "5a27ee77e726c636385bd8c604f409bc", "score": "0.5418835", "text": "function search()\n \t{\n \t\t\n \t}", "title": "" }, { "docid": "66d4ffa9a05f18d853be4ccdfdeb2495", "score": "0.5398054", "text": "public function testTextVariations(){\r\n\t\t$variations = array('Michael Jackson', 'MiCHAEL jackson', 'MICHAEL JACKSON', 'michael jackson');\r\n\t\t$tree = $this->retriever->getRelevancyTree('Michael Jackson', \"6,2\", 2);\r\n\t\tforeach($variations as $article)\r\n\t\t{\r\n\t\t\t$this->assertEquals(0, strcasecmp($tree, $this->retriever->getRelevancyTree($article, \"6,2\", 2)));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5b5681e4a8ac921182aa3535843b5e57", "score": "0.5390407", "text": "function isDataIllegal()\n\n{\n $words = array();\n\n $words[] = \"add\";\n\n $words[] = \"count\";\n\n $words[] = \"create\";\n\n $words[] = \"delete\";\n\n $words[] = \"drop\";\n\n $words[] = \"from\";\n\n $words[] = \"grant\";\n\n $words[] = \"insert\";\n\n $words[] = \"select\";\n\n $words[] = \"truncate\";\n\n $words[] = \"update\";\n\n $words[] = \"use\";\n\n $words[] = \"--\";\n\n \n\n \n\n foreach($_REQUEST as $str) {\n\n $str= strtolower($str); \n\n foreach($words as $word) {\n\n if (strstr($str, $word)) {\n\n \n\n return FALSE;\n\n }\n\n }\n return TRUE;\n\n }\n}", "title": "" }, { "docid": "9f43b8198c3b7f42e78484794e8266dc", "score": "0.53867435", "text": "function contains_bad_str($str_to_test) {\r\n \t\t\t$bad_strings = array (\r\n \"content-type:\"\r\n ,\"mime-version:\"\r\n ,\"multipart/mixed\"\r\n\t\t\t\t,\"Content-Transfer-Encoding:\"\r\n ,\"bcc:\"\r\n\t\t\t\t,\"cc:\"\r\n\t\t\t\t,\"to:\"\r\n \t\t\t);\r\n\t\t foreach($bad_strings as $bad_string) {\r\n\t\t\tif(eregi($bad_string, strtolower($str_to_test))) {\r\n\t\t\t echo \"$bad_string found. Suspected injection attempt - form not submitted.\";\r\n\t\t\t exit;\r\n\t\t\t}\r\n\t\t }\r\n\t\t}", "title": "" }, { "docid": "d82e0edea059b97cbb562c56620c9a5b", "score": "0.53840613", "text": "public function testRespondsForCorrectlySpelledWord()\n {\n $word = 'test';\n $this->initializeSpellCheckEvent($word);\n $response = $this->nick . ': The word \"' . $word\n . '\" seems to be spelled correctly.';\n $this->checkForSpellCheckResponse($word, $response);\n }", "title": "" }, { "docid": "faa565313bdd121d67d662b4557dff92", "score": "0.53837043", "text": "function search() {\n $term = $_POST['term'];\n $author_search = $_POST['author_search'];\n $pattern = \"/'/\" ;\n $replacement = \"\\\\'\";\n $author_search = preg_replace($pattern, $replacement, $author_search);\n if ($term == \"\" & $author_search == \"\") {\n print \"empty search\";\n exit();\n } else if($term == \"\"){\n search_author($author_search);\n } else if($author_search == \"\") {\n search_term($term);\n } else {\n search_both($author_search,$term);\n }\n}", "title": "" }, { "docid": "73fdde201e86d26acc9654e97d46b0e0", "score": "0.5377625", "text": "function validateName($name) {\n\t$valid = true;\n\n\t$name = addslashes($name);\n\t$name = ltrim(rtrim($name));\n\t$aStringArray = split(\" \",$name);\n\tfor ($i=0;$i<count($aStringArray);$i++) {\n\t\t$tempString = $aStringArray[$i];\n\t\t$tempString = stripslashes($tempString);\n\t\t$tempString = ltrim(rtrim($tempString));\n\t\t$bannedQuery = \"SELECT word\n\t\t\t\t\t\tFROM bannedWords\" ; \n\t\t$bannedResult = dbQuery($bannedQuery) ;\n\t\twhile ($bannedRow = dbFetchObject($bannedResult)) {\n\t\t\t$badWord = $bannedRow->word;\n\t\t\tif (strstr(strtolower($tempString),strtolower($badWord))) {\n\t\t\t\t$valid = false ;\n\t\t\t\t$approvedQuery = \"SELECT word FROM approvedWords\n\t\t\t\t\t\t\t\t WHERE upper(word) = upper('$tempString')\" ; \n\t\t\t\t$approvedResult = dbQuery($approvedQuery);\n\t\t\t\tif ( dbNumRows($approvedResult) >0 ) {\n\t\t\t\t\t$valid = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//** check that length is greater than 0\n\tif (strlen($name) < 2) {\n\t\t$valid = false ;\n\t}\n\t\n\t//must contain at least one letter\n\tif (!eregi(\"[A-Z]{1,}\", $name)) {\n\t\t$valid = false;\n\t}\n\t\n\t// must not contain 2 or more dots in an order\n\tif (eregi(\"[\\.]{2,}\", $name)) {\n\t\t$valid = false;\n\t}\n\t\n\t// check if only alpha characters\n\t$addOn = '';\n\tif (!eregi(\"^[-$addOn A-Z[:space:]'\\.]*$\", $name)) {\n\t\t$valid = false;\n\t}\n\t\n\t//** check four vowels or five consentant in row\n\tif ( eregi(\"[aeiouy]{4,}\", $name) || eregi(\"[^aeiouy\\.']{6,}\", $name)) {\n\t\t$valid = false;\n\t}\n\t\n\t// must not contain 2 or more single quores in an order\n\tif ( eregi(\"[']{2,}\", $name) ) {\t\t\n\t\t$valid = false;\n\t}\n\t\n\t// check if any sequence of 2 chars more than 2 times or sequence of 3 chars more than 2 times in name\n\t// function to check any 2 char or 3 char sequence repeating more than 2 times in a string\n\t// returns false if string is not valid containing any sequence in it\n\t$j=0;\n\tfor ($i=$j;$i<strlen($name);$i++) {\n\t\t$sSubStr1 = substr($name,$i,2); \n\t\t$sSubStr2 = substr($name,$i+2,2); \n\t\t$sSubStr3 = substr($name,$i+4,2); \n\t\tif ($sSubStr1 == $sSubStr2 && $sSubStr2 == $sSubStr3 && trim($sSubStr1) != '' && trim($sSubStr2) != '') {\n\t\t\t$valid = false;\n\t\t\tbreak;\n\t\t}\t\n\t\t\n\t\t$sSubStr1 = substr($name,$i,3); \n\t\t$sSubStr2 = substr($name,$i+3,3); \n\t\t$sSubStr3 = substr($name,$i+6,3);\n\t\tif ($sSubStr1 == $sSubStr2 && $sSubStr2 == $sSubStr3 && trim($sSubStr1) != '' && trim($sSubStr2) != '') {\n\t\t\t$valid = false;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn $valid;\n}", "title": "" }, { "docid": "f568e3a464122554d5c63a12a241ca3a", "score": "0.5377263", "text": "function check($word)\n {\n\t\t$word = trim($word);\n\n if (empty($word)) {\n return true;\n }\n\t\tif( $this->service->execute('modules.Spellchecker.check',array($word))){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n }", "title": "" }, { "docid": "84b8988893c09e1c1699bf42e5316a0f", "score": "0.5372328", "text": "public function match_word($word, $wordleveloptions);", "title": "" }, { "docid": "27a289a4a66aa022c98dc473398b55ef", "score": "0.53722584", "text": "public static function ObsahujeNevhodnyText($txt) {\n\t\tforeach(self::$badwords as $word) {\n\t\t\tif(!(strpos($txt, $word) === FALSE)) return true;\n\t\t}\n\t\treturn false;\n }", "title": "" }, { "docid": "9946f1fc86ce083fbba0af6057a80523", "score": "0.5365024", "text": "public function testQuerySuggestionsNameGet()\n {\n }", "title": "" }, { "docid": "f4c9e2f57ebe44a1ab75e325df88898c", "score": "0.5357312", "text": "function friendly_load_code_conditionally($text_to_search=\"\")\n\t{\n\n\t\tglobal $post;\n\t\t$found = false;\n\n\t\tif ( stripos($post->post_content, $text_to_search) !== false )\n\t\t\t$found = true;\n\n\t\treturn $found;\n\n\t}", "title": "" }, { "docid": "dfe54ba98fb7bf6be8a57207b7cf04dd", "score": "0.5356208", "text": "public function testRespondsWithSuggestions()\n {\n $word = 'teh';\n $this->initializeSpellCheckEvent($word);\n $response = $this->nick . ': Suggestions for \"'\n . $word . '\": the, Te, tech, Th, eh.';\n $this->checkForSpellCheckResponse($word, $response);\n }", "title": "" }, { "docid": "d6f30ba48f06e2c87eba687f31451644", "score": "0.5355121", "text": "function batchCheck($wordArr, $board) { // автоматизируем проверку\n for($i = 0; $i < count($wordArr); $i++) {\n echo \"$wordArr[$i] \" . searchWord($board, $wordArr[$i]) . \"<br>\";\n echo $wordArr[$i] . \" \" . searchWord($board, $wordArr[$i]) . \"<br><br>\";\n }\n}", "title": "" }, { "docid": "5ea96a0e75db0e82229693fc80a26779", "score": "0.53518534", "text": "function verifierFiltre ($s){\n return (strcmp($s,\"Reference\")!=0 &&strcmp($s,\"Grantie\")!=0 && strcmp($s,\"Connecteurs\")!=0 && strcmp($s,\"stock\")!=0 &&strcmp($s,\"Garantie\")!=0 &&strcmp($s,\"Dimension\")!=0 && strcmp($s,\"type\")!=0 );\n }", "title": "" }, { "docid": "cacb55b5bc3d4586572f5ec4e8022805", "score": "0.53419703", "text": "function searchArticles($words) {\n if (!empty($words)) {\n require('db.php');\n $articlesValid = [];\n $articles = getArticles(\"desc\");\n\n foreach ($articles as $article):\n if (is_numeric(strpos(strtolower($article->titre),$words)) || is_numeric(strpos(strtolower($article->contenu),$words))) { // verifie la presence d'un mots dans une chaine de caractere \n array_push($articlesValid, $article);\n }\n \n endforeach;\n return $articlesValid;\n }\n else \n return \"Pas d'articles trouvées\";\n\n}", "title": "" }, { "docid": "50b9c7804a067f7bae961771d2d7c607", "score": "0.53408", "text": "function contains($cs, $en, $str) {\r\n\r\n if (!empty($str)) {\r\n\r\n $csRes = strpos($cs, $str);\r\n $enRes = strpos($en, $str);\r\n\r\n if ($csRes !== false && $enRes !== false) {\r\n return lang($cs, $en);\r\n } else if ($csRes !== false) {\r\n return $cs;\r\n } else {\r\n return $en;\r\n }\r\n\r\n } else {\r\n return lang($cs, $en);\r\n }\r\n\r\n}", "title": "" }, { "docid": "29820d45c79f9fd4281920396365f606", "score": "0.53347206", "text": "protected function quickSearch()\n {\n }", "title": "" }, { "docid": "0677f5269473fa95757c705614014426", "score": "0.5329155", "text": "function urlex_mark_results($text){\r\n\tif(is_search()){\r\n\t\t$keys = implode('|', explode(' ', get_search_query()));\r\n\t\t$text = preg_replace('/(' . $keys .')/iu', '<mark>\\0</mark>', $text);\r\n\t}\r\n\treturn $text;\r\n}", "title": "" }, { "docid": "3a1b78b9f879fb445d6c8e97c6a0c363", "score": "0.53192693", "text": "public function test_compare_string_with_wildcard() {\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Frog', 'Frog', false));\n $this->assertFalse(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Frog', 'frog', false));\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n ' Frog ', 'Frog', false));\n $this->assertFalse(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Frogs', 'Frog', false));\n\n // Test case insensitive literal matches.\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Frog', 'frog', true));\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n ' FROG ', 'Frog', true));\n $this->assertFalse(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Frogs', 'Frog', true));\n\n // Test case sensitive wildcard matches.\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Frog', 'F*og', false));\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Fog', 'F*og', false));\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n ' Fat dog ', 'F*og', false));\n $this->assertFalse(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Frogs', 'F*og', false));\n $this->assertFalse(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Fg', 'F*og', false));\n $this->assertFalse(qtype_fixthetext_question::compare_string_with_wildcard(\n 'frog', 'F*og', false));\n $this->assertFalse(qtype_fixthetext_question::compare_string_with_wildcard(\n ' fat dog ', 'F*og', false));\n\n // Test case insensitive wildcard matches.\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Frog', 'F*og', true));\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Fog', 'F*og', true));\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n ' Fat dog ', 'F*og', true));\n $this->assertFalse(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Frogs', 'F*og', true));\n $this->assertFalse(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Fg', 'F*og', true));\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n 'frog', 'F*og', true));\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n ' fat dog ', 'F*og', true));\n\n // Test match using regexp special chars.\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n ' * ', '\\*', false));\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n '*', '\\*', false));\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n 'Frog*toad', 'Frog\\*toad', false));\n $this->assertFalse(qtype_fixthetext_question::compare_string_with_wildcard(\n 'a', '[a-z]', false));\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n '[a-z]', '[a-z]', false));\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n '\\{}/', '\\{}/', true));\n\n // See http://moodle.org/mod/forum/discuss.php?d=120557\n $this->assertTrue(qtype_fixthetext_question::compare_string_with_wildcard(\n 'ITÁLIE', 'Itálie', true));\n }", "title": "" }, { "docid": "a1cdaadb3d768b274a120b0661edf295", "score": "0.5317588", "text": "static public function search($s) {\n $db = MDB2::singleton();\n /* Ermittelt die Anzahl der gültigen Aliase und Personen\n $max = $db->extended->getOne('SELECT COUNT(*) FROM p_namen WHERE del = FALSE;', 'integer');\n IsDbError($max); */\n\n $s = \"%\" . $s . \"%\"; // Suche nach Teilstring\n $data = $db->extended->getAll(self::SQL_SEARCH_NAME, ['integer', 'text'], [$s, $s]);\n IsDbError($data);\n // [id] wird schlüssel\n $list = [];\n foreach($data as $val) : $list[intval($val['id'])] = $val['bereich']; endforeach;\n $data = array_diff_key($list, self::getUnusedAliasNameList());\n if ($data) return $data; else return 102;\n }", "title": "" }, { "docid": "db2e6ac4dec600ccc082affa39c5839b", "score": "0.53169644", "text": "function fixSearch() {\n $count = 0;\n $sql = \"SELECT entry_id, entry_text\n FROM %s\n WHERE entry_strip = ''\n OR entry_strip IS NULL\";\n $params = array($this->tableEntries);\n if ($res = $this->databaseQueryFmt($sql, $params)) {\n $entries = array();\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $entries[$row['entry_id']] = strip_tags($row['entry_text']);\n }\n foreach ($entries as $entryId => $entryText) {\n $updated = FALSE !== $this->databaseUpdateRecord(\n $this->tableEntries,\n array(\n 'entry_strip' => $entryText\n ),\n 'entry_id',\n $entryId\n );\n if ($updated) {\n $count++;\n }\n }\n }\n return $count;\n }", "title": "" }, { "docid": "6e41ca1a99e39f10e5fd30353be59968", "score": "0.5291036", "text": "function suggest_refinement($refs,$search)\n {\n # search query ($search), produce a list of suggested search refinements to \n # reduce the result set intelligently.\n $in=join(\",\",$refs);\n $suggest=array();\n # find common keywords\n $refine=sql_query(\"SELECT k.keyword,count(*) c FROM resource_keyword r join keyword k on r.keyword=k.ref AND r.resource IN ($in) AND length(k.keyword)>=3 AND length(k.keyword)<=15 AND k.keyword NOT LIKE '%0%' AND k.keyword NOT LIKE '%1%' AND k.keyword NOT LIKE '%2%' AND k.keyword NOT LIKE '%3%' AND k.keyword NOT LIKE '%4%' AND k.keyword NOT LIKE '%5%' AND k.keyword NOT LIKE '%6%' AND k.keyword NOT LIKE '%7%' AND k.keyword NOT LIKE '%8%' AND k.keyword NOT LIKE '%9%' GROUP BY k.keyword ORDER BY c DESC LIMIT 5\");\n for ($n=0;$n<count($refine);$n++)\n {\n if (strpos($search,$refine[$n][\"keyword\"])===false)\n {\n $suggest[]=$search . \" \" . $refine[$n][\"keyword\"];\n }\n }\n return $suggest;\n }", "title": "" }, { "docid": "b347573bf3168da9fda39213e7e86401", "score": "0.5290364", "text": "function isBannedWord($aString) {\n\t$isBadWord = false;\n\t$sFunction = \"isBannedWord\";\n\t\n\t$aString = addslashes($aString);\n\t$aString = ltrim(rtrim($aString));\n\t$aStringArray = split(\" \",$aString);\n\tfor ($i=0;$i<count($aStringArray);$i++) {\n\t\t\n\t\t$tempString = $aStringArray[$i];\n\t\t$tempString = stripslashes($tempString);\n\t\t$tempString = ltrim(rtrim($tempString));\n\n\t\t$bannedQuery = \"SELECT word\n\t\t\t\t\t\tFROM bannedWords\" ; \n\t\t\n\t\t$bannedResult = dbQuery($bannedQuery) ;\n\t\t//echo $bannedQuery. mysql_error();\n\t\t\n\t\t\n\t\twhile ($bannedRow = dbFetchObject($bannedResult)) {\n\t\t\t$badWord = $bannedRow->word;\n\t\t\t\n\t\t\tif (strstr(strtolower($tempString),strtolower($badWord)))\n\t\t\t{\n\t\t\t\t/*if ($aString == '1234 pass') {\n\t\t\t\t\techo \"<BR>1 \".$badWord.\" aaa \".$tempString.\" aaa\";\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t\t$isBadWord = true;\n\t\t\t\t$approvedQuery = \"SELECT word\n\t\t\t\t\t\t\t\t FROM approvedWords\n\t\t\t\t\t\t\t\t WHERE upper(word) = upper('$tempString')\" ; \n\t\t\t\t\n\t\t\t\t$approvedResult = dbQuery($approvedQuery) ;\n\t\t\t\tif ( dbNumRows($approvedResult) >0 ) {\n\t\t\t\t\t$isBadWord = false;\n\t\t\t\t\t/*if ($aString == '1234 pass') {\n\t\t\t\t\t\techo \"<BR>approved \".$badWord.\" \".$tempString;\n\t\t\t\t\t}*/\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\t\n\t\n\tif ($isBadWord == true) {\n\t\t$sErrorLogQuery = \"INSERT INTO errorLog(errorDateTime, valueInvalidated, function, ipAddress, sourceCode, pageId)\n\t\t\t\t\t\t VALUES(now(), '$aString', '$sFunction', '\".$_SESSION[\"sSesRemoteIp\"].\"',\\\"\".$_SESSION[\"sSesSourceCode\"].\"\\\",\\\"\".$_SESSION[\"iSesPageId\"].\"\\\")\";\n\t\t$rErrorLogResult = dbQuery($sErrorLogQuery);\n\t\t\n\t}\n\t\n\tif ($bannedResult) {\n\t\tdbFreeResult($bannedResult);\n\t}\n\t\n\treturn $isBadWord;\n}", "title": "" }, { "docid": "69e5b9f848fe7ea3fb0778bbafb4ec7f", "score": "0.5286926", "text": "private function step3()\n {\n // lig ig els\n // delete\n if ( ($position = $this->searchIfInR1(array('lig', 'ig', 'els'))) !== false) {\n $this->word = UTF8::substr($this->word, 0, $position);\n return true;\n }\n\n // löst\n // replace with lös\n if ( ($this->searchIfInR1(array('löst'))) !== false) {\n $this->word = UTF8::substr($this->word, 0, -1);\n return true;\n }\n\n // fullt\n // replace with full\n if ( ($this->searchIfInR1(array('fullt'))) !== false) {\n $this->word = UTF8::substr($this->word, 0, -1);\n return true;\n }\n }", "title": "" }, { "docid": "42a7aed935d75fccd12570915762140d", "score": "0.5286652", "text": "function contain($word){\n if (strpos($a, word) !== false) {\n echo 'true';\n }\n else\n echo 'false';\n}", "title": "" }, { "docid": "d29f35cb243f27853df9bcef67221045", "score": "0.52803904", "text": "function x_check($facet_category,$facet)\n\t{\n\t\t//$DB3 = $this->_load_db();\n\n\t\t// add fulltext index to search column\n\t\t$query = mysql_query(\"\n\t\t\tALTER TABLE tbl\".$facet_category.\"\n\t\t\tADD FULLTEXT (\".$facet_category.\"_name)\n\t\t\");\n\t\t\n\t\t$this->db->select($facet_category.'_name');\n\t\t$this->db->from('tbl'.$facet_category);\n\t\t\n\t\t$where_match = \"MATCH(\".$facet_category.\"_name) AGAINST('\".$facet.\"')\";\n\t\t$this->db->where($where_match);\n\t\t//$this->db->where('u','p'); // ----> for debugging purposes\n\t\t\n\t\t$query = $this->db->get();\n\t\t\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\t$row = $query->row_array();\n\t\t\t\n\t\t\t// remove fulltext index to search column\n\t\t\t$query = mysql_query(\"\n\t\t\t\tALTER TABLE tbl\".$facet_category.\"\n\t\t\t\tDROP INDEX (\".$facet_category.\"_name)\n\t\t\t\");\n\t\t\t\n\t\t\tif (empty($row[$facet_category.'_name']) OR $row[$facet_category.'_name'] == NULL) return FALSE;\n\t\t\telse return TRUE;\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// remove fulltext index to search column\n\t\t\t$query = mysql_query(\"\n\t\t\t\tALTER TABLE tbl\".$facet_category.\"\n\t\t\t\tDROP INDEX (\".$facet_category.\"_name)\n\t\t\t\");\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "7d87871782d9a8e27dfb1f979a3da819", "score": "0.52803653", "text": "function doCheck($searchIn, $searchFor, $ingore=false) {\r\n\t\t\tif ($ingore) {\r\n\t\t\t\t$searchIn = strtolower($searchIn);\r\n\t\t\t\t$searchFor = strtolower($searchFor);\r\n\t\t\t}\r\n\r\n\t\t\t$len = strlen($searchFor);\r\n\t\t\t$start = substr($searchIn, 0, $len);\r\n\t\t\tif ($searchFor == $start)\r\n\t\t\t\treturn true;\r\n\t\t\treturn false;\r\n\t\t}", "title": "" }, { "docid": "11ba3da6fe9813a56e950dbc4b17b84f", "score": "0.5271046", "text": "public function is_fulltext()\n {\n // Loop through each word in the search term\n foreach (explode(' ', $this->clean) as $word) {\n // Check word length\n if (ee()->pro_multibyte->strlen($word) < ee()->pro_search_settings->get('min_word_length')) {\n return false;\n }\n\n // Check stop words\n if (in_array($word, ee()->pro_search_settings->stop_words())) {\n return false;\n }\n }\n\n // Otherwise, we're OK\n return true;\n }", "title": "" }, { "docid": "521478ec9aed5be3d493d4ee3de34fb2", "score": "0.5260865", "text": "function suggest_refinement($refs,$search)\n {\n # search query ($search), produce a list of suggested search refinements to \n # reduce the result set intelligently.\n $in=join(\",\",$refs);\n $suggest=array();\n # find common keywords\n $refine=sql_query(\"select k.keyword,count(*) c from resource_keyword r join keyword k on r.keyword=k.ref and r.resource in ($in) and length(k.keyword)>=3 and length(k.keyword)<=15 and k.keyword not like '%0%' and k.keyword not like '%1%' and k.keyword not like '%2%' and k.keyword not like '%3%' and k.keyword not like '%4%' and k.keyword not like '%5%' and k.keyword not like '%6%' and k.keyword not like '%7%' and k.keyword not like '%8%' and k.keyword not like '%9%' group by k.keyword order by c desc limit 5\");\n for ($n=0;$n<count($refine);$n++)\n {\n if (strpos($search,$refine[$n][\"keyword\"])===false)\n {\n $suggest[]=$search . \" \" . $refine[$n][\"keyword\"];\n }\n }\n return $suggest;\n }", "title": "" }, { "docid": "48ca5283e3447a3049ee378ed192949b", "score": "0.5259922", "text": "function _admin_search_query() {}", "title": "" }, { "docid": "2b06bc64a079ea2f8cc46ea5115bb3e6", "score": "0.5255527", "text": "function checkword($w){\n\tinclude '../koneksi.php';\n\tif($w !=''){\n\t\t$q = mysqli_query($link,\"SELECT * FROM stopwords\");\n\t\t$d = array();\n\t\t$words = array();\n\t\twhile($word = mysqli_fetch_array($q)){\n\t\t\t$words[] = $word;\n\t\t}\n\t\tfor($i = 0; $i < count($words); $i++){\n\t\t\t$w = str_replace($words[$i][0] . \" \", \"\",$w);\n\t\t}\n\t\treturn $w;\n\t}\n}", "title": "" }, { "docid": "ef93e125b4271b73226497fa7296f8db", "score": "0.52495563", "text": "function matched_content( $post ) {\n global $wp_query;\n\n $search_terms = $wp_query->query_vars['search_terms'];\n foreach( $search_terms as $search_term ) {\n if( stripos( $post->title, $search_term ) ) {\n return FALSE;\n }\n\n if( stripos( $post->post_content, $search_term ) ) {\n return find_sentence_with_needle( $post->post_content, $search_term );\n }\n }\n return FALSE;\n}", "title": "" }, { "docid": "dde309076ba2304b4479a46df4c40e31", "score": "0.5247485", "text": "abstract public function search();", "title": "" }, { "docid": "81057cefa2add3b96f9024a79dc55689", "score": "0.5246596", "text": "public function hasFoundTextSearch()\n {\n return null !== $this->strArraySearch;\n }", "title": "" }, { "docid": "2dc487d9b8d632f9b99724d138d8f36c", "score": "0.5246554", "text": "function strpos_arr($haystack, $needles) { \n\t// Allow the function to be called with a string/int needle as the default strpos allows\n if( !is_array($needles) ) $needles = array($needles); \n \n\t// Iterate the array calling repeated strpos, returning upon a hit\n\tforeach ($needles as $needle) { \n if ( ( $pos = strpos( $haystack, $needle ) ) !== false ) {\n\t\t\tif ( defined( 'DRY_RUN' ) ) { \n\t\t\t\techo 'Found the word <strong>' . $needle . '</strong>';\n\t\t\t}\n\t\t\treturn $pos; \n\t\t}\n } \n\t// Default to the false boolean for not found.\n return false; \n}", "title": "" }, { "docid": "efad065987a71e5f2a9e1ca4c68f6cef", "score": "0.5244863", "text": "public function hasSalience(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "37edfef8687466786839d7406e6b15ef", "score": "0.52411824", "text": "function determinarNombreYApellido($nombre){\r\n //CUENTO CUANTAS PALABRAS INGRESAN\r\n $palabras = str_word_count($nombre);\r\n if ($palabras <= 2) {\r\n return true;\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "5ce8b0629ac5a1c6adfd76098213eb7b", "score": "0.52392143", "text": "private function step2()\n {\n // iveness iviti: replace by ive\n if ( ($position = $this->search(array('iveness', 'iviti'))) !== false) {\n if ($this->inR1($position)) {\n $this->word = preg_replace('#(iveness|iviti)$#u', 'ive', $this->word);\n }\n return true;\n }\n // ousli ousness: replace by ous\n if ( ($position = $this->search(array('ousli', 'ousness'))) !== false) {\n if ($this->inR1($position)) {\n $this->word = preg_replace('#(ousli|ousness)$#u', 'ous', $this->word);\n }\n return true;\n }\n // izer ization: replace by ize\n if ( ($position = $this->search(array('izer', 'ization'))) !== false) {\n if ($this->inR1($position)) {\n $this->word = preg_replace('#(izer|ization)$#u', 'ize', $this->word);\n }\n return true;\n }\n // ational ation ator: replace by ate\n if ( ($position = $this->search(array('ational', 'ation', 'ator'))) !== false) {\n if ($this->inR1($position)) {\n $this->word = preg_replace('#(ational|ation|ator)$#u', 'ate', $this->word);\n }\n return true;\n }\n // biliti bli+: replace by ble\n if ( ($position = $this->search(array('biliti', 'bli'))) !== false) {\n if ($this->inR1($position)) {\n $this->word = preg_replace('#(biliti|bli)$#u', 'ble', $this->word);\n }\n return true;\n }\n // lessli+: replace by less\n if ( ($position = $this->search(array('lessli'))) !== false) {\n if ($this->inR1($position)) {\n $this->word = preg_replace('#(lessli)$#u', 'less', $this->word);\n }\n return true;\n }\n // fulness: replace by ful\n if ( ($position = $this->search(array('fulness', 'fulli'))) !== false) {\n if ($this->inR1($position)) {\n $this->word = preg_replace('#(fulness|fulli)$#u', 'ful', $this->word);\n }\n return true;\n }\n // tional: replace by tion\n if ( ($position = $this->search(array('tional'))) !== false) {\n if ($this->inR1($position)) {\n $this->word = preg_replace('#(tional)$#u', 'tion', $this->word);\n }\n return true;\n }\n // alism aliti alli: replace by al\n if ( ($position = $this->search(array('alism', 'aliti', 'alli'))) !== false) {\n if ($this->inR1($position)) {\n $this->word = preg_replace('#(alism|aliti|alli)$#u', 'al', $this->word);\n }\n return true;\n }\n // enci: replace by ence\n if ( ($position = $this->search(array('enci'))) !== false) {\n if ($this->inR1($position)) {\n $this->word = preg_replace('#(enci)$#u', 'ence', $this->word);\n }\n return true;\n }\n // anci: replace by ance\n if ( ($position = $this->search(array('anci'))) !== false) {\n if ($this->inR1($position)) {\n $this->word = preg_replace('#(anci)$#u', 'ance', $this->word);\n }\n return true;\n }\n // abli: replace by able\n if ( ($position = $this->search(array('abli'))) !== false) {\n if ($this->inR1($position)) {\n $this->word = preg_replace('#(abli)$#u', 'able', $this->word);\n }\n return true;\n }\n // entli: replace by ent\n if ( ($position = $this->search(array('entli'))) !== false) {\n if ($this->inR1($position)) {\n $this->word = preg_replace('#(entli)$#u', 'ent', $this->word);\n }\n return true;\n }\n // ogi+: replace by og if preceded by l\n if ( ($position = $this->search(array('ogi'))) !== false) {\n if ($this->inR1($position)) {\n $before = $position - 1;\n $letter = Utf8::substr($this->word, $before, 1);\n if ($letter == 'l') {\n $this->word = preg_replace('#(ogi)$#u', 'og', $this->word);\n }\n }\n return true;\n }\n // li+: delete if preceded by a valid li-ending\n if ( ($position = $this->search(array('li'))) !== false) {\n if ($this->inR1($position)) {\n // a letter for you\n $letter = Utf8::substr($this->word, ($position-1), 1);\n if (in_array($letter, self::$liEnding)) {\n $this->word = Utf8::substr($this->word, 0, $position);\n }\n }\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "0dbaffb8bd4b4380df48a799f496ca0c", "score": "0.5237109", "text": "public function testContains() {\n $this->assertTrue(String::contains($this->string, 'Titon'));\n $this->assertFalse(String::contains($this->string, 'Zend'));\n\n // case-insensitive\n $this->assertTrue(String::contains($this->string, 'TITON', false));\n\n // offset\n $this->assertFalse(String::contains($this->string, 'Titon', true, 5));\n }", "title": "" }, { "docid": "bda857e93b0d437c1bb804d7ea4e0d7e", "score": "0.5234888", "text": "function the_search_query() {}", "title": "" }, { "docid": "03ca773eeb78398f46605834bb6a67ca", "score": "0.5226167", "text": "function findMalware($input,$database){\n\t\t$check = false;\n\t\t$lengthInput = strlen($input);\n\t\t$lengthDatabase = strlen($database);\n\t\tif($lengthInput < $lengthDatabase)\n\t\t\treturn false;\n\t\t$arrInput = str_split($input);\n\t\t$arrDatabase = str_split($database);\n\t\t$j = 0;\t\n\t\tfor($i = 0; $i < $lengthInput; $i++){\t\t\t\n\t\t\tif($arrInput[$i]==$arrDatabase[$j]){\n\t\t\t\tif($j==$lengthDatabase-1){\n\t\t\t\t\treturn true;\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\t$j++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$j=0;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b2508e567bdac819383e92412475e3ef", "score": "0.52217925", "text": "public function isCorrect();", "title": "" }, { "docid": "90a27b31c8e7394dd61cec39f3486965", "score": "0.5221213", "text": "function censorWords($text){\n\t/*liste des mots a filtrer ou expression aussi longue que tu veux*/\n\t$find = array(\n\t'/[caca|pipi|prout]\\s/i',\n\t'/censuré\\s/i',\n\t'/censuré\\s/i',\n\t'/censuré\\s/i',\n\t'/censuré\\s/i',\n\t);\n\t$replace = ' **** ';\n\treturn preg_replace($find,$replace,$text);\n}", "title": "" }, { "docid": "9675c5d5467565c0eb887999cc633f08", "score": "0.52149904", "text": "public function step3()\n {\n // ational+: replace by ate\n if ($this->searchIfInR1(array('ational')) !== false) {\n $this->word = preg_replace('#(ational)$#u', 'ate', $this->word);\n return true;\n }\n // tional+: replace by tion\n if ($this->searchIfInR1(array('tional')) !== false) {\n $this->word = preg_replace('#(tional)$#u', 'tion', $this->word);\n return true;\n }\n // alize: replace by al\n if ($this->searchIfInR1(array('alize')) !== false) {\n $this->word = preg_replace('#(alize)$#u', 'al', $this->word);\n return true;\n }\n // icate iciti ical: replace by ic\n if ($this->searchIfInR1(array('icate', 'iciti', 'ical')) !== false) {\n $this->word = preg_replace('#(icate|iciti|ical)$#u', 'ic', $this->word);\n return true;\n }\n // ful ness: delete\n if ( ($position = $this->searchIfInR1(array('ful', 'ness'))) !== false) {\n $this->word = Utf8::substr($this->word, 0, $position);\n return true;\n }\n // ative*: delete if in R2\n if ( (($position = $this->searchIfInR1(array('ative'))) !== false) && ($this->inR2($position)) ) {\n $this->word = Utf8::substr($this->word, 0, $position);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "bea7f70c80c8d917c954477561d632b2", "score": "0.5210416", "text": "function search_the_db($term,$can_do_stop,$db_to_search,$search_page,$field_in_db){\n\tglobal $db_name,$user;\n\n\t//split the entered terms into seperate components\n\t$alpha_1231 = preg_split (\"/\\s/\", trim($term));\n\t$beta_4543 = count($alpha_1231);\n\t$new_search = trim($term);\n\n\t//remove stopwords unless otherwise specified\n\tif(!$can_do_stop && $beta_4543 > 1) {\n\n\t\t//dump the stoplist into an array.\n\t\t$stoplist = array('a','b','by','c','d','e','e.g.','eg','f','for','from','g','h','h.','had','has','have','i','ie','i.e.','if','in','is','it','it\\'d','it\\'ll','it\\'s','its','j','k','l','m','my','n','no','o','of','oh','ok','okay','or','p','q','r','s','see','so','t','that','the','these','they','this','those','to','too','u','v','w','which','who','why','will','with','would','x','y','you','your','z');\n\n\t\t//remove stopwords from entered text\n\t\t$amount = count($stoplist);\n\t\t$stop_count = 0;\n\t\t$stop_words_removed=0;\n\n\t\t//while loop that does searching for stopwords\n\t\twhile ($stop_count < $amount){\n\t\t\tif(preg_match(\"/^\".preg_quote($stoplist[$stop_count]).\"\\s/\",$new_search) || preg_match(\"/(?i)\\s\".preg_quote($stoplist[$stop_count]).\"$/\",$new_search) || preg_match(\"/(?i)\\s\".preg_quote($stoplist[$stop_count]).\"\\s/\",$new_search)){\n\t\t\t\t$new_search = preg_replace(\"/(?i)^\".preg_quote($stoplist[$stop_count]).\"\\s/\",\"\",$new_search);\n\t\t\t\t$new_search = preg_replace(\"/(?i)\\s\".preg_quote($stoplist[$stop_count]).\"$/\",\"\",$new_search);\n\t\t\t\t$new_search = preg_replace(\"/(?i)\\s\".preg_quote($stoplist[$stop_count]).\"\\s/\",\" \",$new_search);\n\t\t\t\t$stop_list_list[$stop_words_removed] = $stoplist[$stop_count];\n\t\t\t\t$stop_words_removed++; //stopwords removed from entered term.\n\t\t\t}\n\t\t\t$stop_count++; //total stopwords in stopword list;\n\t\t}\n\t\t//puts commas in list of removed stopwords\n\t\t$count = 0;\n\n\t\twhile($count < $stop_words_removed){\n\t\t\tif($count != $stop_words_removed-1){\n\t\t\t\t$stop_str .= $stop_list_list[$count].\", \";\n\t\t\t} else {\n\t\t\t\t$stop_str .= $stop_list_list[$count];\n\t\t\t} //end if\n\t\t\t$count++;\n\t\t} //end while\n\t} //end stopword removal\n\n\t//Split the remaining search into seperate terms\n\t$keywords = preg_split (\"/\\s/\", $new_search);\n\t$num_terms = count($keywords);\n\n\t//if a user enters only stop words\n\tif($num_terms < 1){\n\t\t$stop_count = 0;\n\t\t$stop_words_removed=0;\n\t\t$new_search = trim($term);\n\t}\n\n\t//create the sql query\n\t$sql_query = \"\"; //clear query text\n\t$c1 = 0; //clear counter\n\tforeach($keywords as $value){\n\t\t//used to create a lowercase set of search terms.\n\t\t$keywords_2[$c1] = strtolower($value);\n\n\t\t//add to sql_query text.\n\t\tif($c1 > 0){ //determine if already got an entry in query. If so, then need an ||.\n\t\t\t$sql_query .= \"|| ${field_in_db} REGEXP '$value'\";\n\t\t} else {\n\t\t\t$sql_query .= \" ${field_in_db} REGEXP '$value'\";\n\t\t}\n\t\tif($db_to_search == \"diary\"){\n\t\t\t$sql_query .= \"&& login_id = '$user[login_id]'\";\n\t\t}\n\n\t\t$c1++;\n\t} //end foreach of search terms\n\n\t//the mysql query which finds the results\n\tdb(\"select timestamp,${field_in_db} from ${db_name}_${db_to_search} where\".$sql_query.\" order by timestamp desc\");\n\t$news = dbr();\n\n\t$primary_counter = 0; //used to ensure goes around for each keyword;\n\n\t//loop through all results found\n\twhile($news){\n\t\t//ensure array entry is clear, and enter initial data.\n\t\t$search_results_text[$primary_counter] = $news[$field_in_db];\n\t\t$search_results_timestamp[$primary_counter] = $news['timestamp'];\n\t\t$search_results_finds[$primary_counter] = 0;\n\t\t$search_results_score[$primary_counter] = 0;\n\n\t\t//loop through the lowercase search terms (as substr_count is case dependent).\n\t\tforeach($keywords_2 as $value){\n\t\t\tif(preg_match(\"/\".preg_quote($value).\"/i\",$search_results_text[$primary_counter])) {\n\t\t\t\t$search_results_finds[$primary_counter]++;\n\t\t\t\t$search_results_score[$primary_counter] += (substr_count(strtolower($search_results_text[$primary_counter]), $value) -1) * 2;\n\t\t\t\t$search_results_text[$primary_counter] = eregi_replace(\"$value\",\"<font color=lime>$value</font>\",$search_results_text[$primary_counter]);\n\t\t\t}\n\t\t}\n\n\t\t$primary_counter++;\n\t\t$news = dbr();\n\t} //end term list while\n\n\n\t//determine if any results were found.\n\tif (!empty($search_results_text)) { //results found\n\t\t//nifty little function allows many arrays to be sorted together, and keeps information in them in the same place in relation to each other. Excellent for search tech.\n\t\tarray_multisort($search_results_finds, SORT_DESC, SORT_NUMERIC, $search_results_score, SORT_DESC, SORT_NUMERIC, $search_results_timestamp, SORT_DESC, SORT_NUMERIC, $search_results_text);\n\n\t\t$ret_str = \"<FORM method=POST action='$filename' name=search_form>\";\n\t\t$ret_str .= \"New Search: <input type=text name=term size=20 value='$term'>\";\n\t\t$ret_str .= \" - <INPUT type=submit value=Search></form><p>\";\n\t\t$ret_str .= \"<br>Shown below are the results for your search using terms (<b class=b1>$term</b>) in ranked, then chronological order:<br><br>\";\n\n\t\t//stopwords where removed\n\t\tif ($stop_words_removed > 0){\n\t\t\t$stop_search_txt = urlencode($term);\n\t\t\t$ret_str .= \"<i>Stop-words</i> were removed from your search. These consisted of: <b>\".$stop_str.\"</b>.<br>Click <a href=${search_page}.php?term=$stop_search_txt&can_do_stop=1>here</a> to run a search with the stop-words included.<p>\";\n\t\t}\n\t\t$num = 0; //keep track of where in the arrays the system is.\n\n\t\t//make table for output\n\t\t$ret_str .= make_table(array(\"\",\"\"));\n\n\t\t//cycle through the results for the final output.\n\t\twhile($var = each($search_results_text)) {\n\t\t\tif($num == 0){//first result, determine how many of the keywords where found.\n\t\t\t\t$keep_track = $search_results_finds[$num];\n\t\t\t\t$k_temp_tracker = count($keywords);\n\n\t\t\t\tif($k_temp_tracker > $keep_track){ //only some of the words where found.\n\t\t\t\t\t$follow_through = 2;\n\t\t\t\t} else { //all keywords make an appearance in result.\n\t\t\t\t\t$follow_through = 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//if all keywords are found, then cycle through only results that have all keywords in them, otherwise cycle through all results.\n\t\t\tif($follow_through == 1 && $search_results_finds[$num] != $keep_track){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$ret_str .= quick_row(\"<b>\".date(\"M d - H:i\",$search_results_timestamp[$num]),$var[1]);\n\t\t\t$num++;\n\t\t}\n\t\t//end table, then return results.\n\t\t$ret_str .= \"</table><br>\";\n\t\treturn $ret_str;\n\n\t} else { //no results found\n\t\treturn \"<br>No entries of <b class=b1>$term</b> were found. Please broaden your search.<br><br>\";\n\t}\n\n}", "title": "" }, { "docid": "d3584d42eae9a26ea71a8b83e74754ff", "score": "0.5207171", "text": "function nombreYApellido($nombre){\r\n $permitidos = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ áéíóúÁÉÍÓÚñÑ'\";\r\n for ($i=0; $i<strlen($nombre); $i++){\r\n if (strpos($permitidos, substr($nombre,$i,1)) === false){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "326b462ebf8ac262dd2a1df9dd99ff89", "score": "0.52042747", "text": "function filter_sq($words) {\r\n // stin anazitisi\r\n // global $stop_words;\r\n $final_words = array();\r\n\r\n foreach($words as $w) {\r\n if (strlen($w) < SEARCH_WORD_MIN_LENGTH)\r\n continue;\r\n // an thewreite common i leksi tote den tin eisagoume\r\n \r\n // if(in_array($w, $stop_words))\r\n // continue;\r\n\r\n // an exei eisaxthei hdh\r\n if (count($final_words) > 0) {\r\n if(in_array($w, $final_words))\r\n continue;\r\n }\r\n array_push($final_words, $w);\r\n }\r\n return $final_words;\r\n }", "title": "" }, { "docid": "bcb4fd0a26bab133cd680ba99e5e2a39", "score": "0.5203526", "text": "function search_craigs($needle, $haystack){\r\n\tif (stripos($haystack, $needle) !== false) {\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "title": "" }, { "docid": "0aa8895831c015ae30343cfe6cc1f860", "score": "0.520281", "text": "public function testLikeQuery() {\n }", "title": "" }, { "docid": "c39693ae14279cd9c78e1ab9f4957433", "score": "0.51990414", "text": "public function fuzzy(): int;", "title": "" }, { "docid": "3fe18c35ec55f7a3a0cec7c93d1ea2b9", "score": "0.51789224", "text": "function posts_search_example_type($search, $query) {\n global $wpdb;\n \n if ($query->is_main_query() && !empty($query->query['s'])) {\n $sql = \"\n or exists (\n select * from {$wpdb->postmeta} where post_id={$wpdb->posts}.ID\n and meta_key in ('title','designation','client_specialities','address')\n and meta_value like %s\n )\n \";\n $like = '%' . $wpdb->esc_like($query->query['s']) . '%';\n $search = preg_replace(\"#\\({$wpdb->posts}.post_title LIKE [^)]+\\)\\K#\",\n $wpdb->prepare($sql, $like), $search);\n }\n \n return $search;\n}", "title": "" }, { "docid": "e51bdbfa834245e055078c86df983fed", "score": "0.5174849", "text": "public function getSpellCheck($term = null)\n\t{\n\t\tif (!empty($term)) {\n\t\t\t$query = $term;\n\t\t}\n\t\telse {\n\t\t\t$query = Input::get('term');\n\t\t\t$query = urldecode($query);\n\t\t}\n\t\t\n\t\t$client = $this->getSolrClient();\n\n\t\t$data = new SolrQuery();\n\t\t$resultset = $data->spellCheck($client, $query);\n\t\treturn $resultset;\n\t}", "title": "" }, { "docid": "239ccf1fef299f26f6e6afa946540315", "score": "0.5170696", "text": "public function appellationsromesv3() {\n\t\t\t$this->index( 'Appellationromev3' );\n\t\t}", "title": "" }, { "docid": "982f6d0bcd570b883243b38bcdb90331", "score": "0.516506", "text": "function search($word)\n {\n $word =strtolower($word);\n $candidates = array();\n if($this->inList($word))\n {\n return array($word);\n }\n else{\n $edits = $this->edits($word); \n foreach($edits as $word)\n {\n if($this->inList($word))\n {\n $candidates[$this->get($word)] = \"\";\n }\n }\n return $candidates;\n }\n }", "title": "" }, { "docid": "154b931574bebfc96b46a88ff8acd09c", "score": "0.51589024", "text": "static function searchUtenteByNome() : string\n {\n return \"SELECT *\n FROM Utente\n WHERE LOCATE( :Nome , Nome ) > 0;\";\n }", "title": "" }, { "docid": "2d59e78b34de6a18058e729df0c8c32f", "score": "0.51577795", "text": "function part1 ($file)\n{\n $count = 0;\n $line = fgets($file);\n $array = str_split($line, 1);\n $size = sizeof($array);\n while ($size - 1 >= $count) {\n if (strcasecmp($array[$count], $array[$count + 1]) == 0) {\n if (ctype_lower($array[$count]) == ctype_upper($array[$count + 1]) || (ctype_upper($array[$count]) == ctype_lower($array[$count + 1]))) {\n echo \"Found: \" . $array[$count] . \" \" . $array[$count + 1] . \"\\n\";\n unset($array[$count]);\n unset($array[$count + 1]);\n $size = $size - 2;\n $array = array_values($array);\n $count = 0;\n }\n }\n $count++;\n }\n\n echo \"Answer Found:\\n\";\n foreach ($array as $item) {\n echo $item;\n }\n echo \"\\n\";\n echo \"Alchemical Reduction: \" . ($size)-2;\n}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "5e054e04806058744c30ec37e4d8935d", "score": "0.0", "text": "public function index()\n {\n $archivos = null;\n $galerias = Galeria::with('archivos')->get();\n $jardines = Jardin::with('archivos')->get();\n $niveles = Nivel::with('archivos')->get();\n $parvulos = Parvulo::with('archivos')->get();\n return view('cms.admin.archivos.list', compact('archivos', 'galerias', 'jardines', 'niveles', 'parvulos'));\n }", "title": "" } ]
[ { "docid": "1d35b0b22ac44c3da96756e129561d1e", "score": "0.7596523", "text": "protected function listAction()\n {\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->config['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n return $this->render('@EasyAdmin/list.html.twig', array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'view' => 'list',\n ));\n }", "title": "" }, { "docid": "0da19d65b0ae22a9a9aea8c7d8f9691e", "score": "0.7418999", "text": "public function listAction()\n { $resources = $this->fetchResourcesAndIiifUrls();\n if (!count($resources)) {\n return $this->jsonError(new NotFoundException, \\Laminas\\Http\\Response::STATUS_CODE_404);\n }\n\n $query = $this->params()->fromQuery();\n $version = $this->requestedVersion();\n $currentUrl = $this->url()->fromRoute(null, [], ['query' => $query, 'force_canonical' => true], true);\n\n $iiifCollectionList = $this->viewHelpers()->get('iiifCollectionList');\n try {\n $manifest = $iiifCollectionList($resources, $version, $currentUrl);\n } catch (\\IiifServer\\Iiif\\Exception\\RuntimeException $e) {\n return $this->jsonError($e, \\Laminas\\Http\\Response::STATUS_CODE_400);\n }\n\n return $this->iiifJsonLd($manifest, $version);\n }", "title": "" }, { "docid": "7f885ee63d7fde5e395eeff7eff36f82", "score": "0.7408263", "text": "public function indexAction()\r\n {\r\n $limit = $this->Request()->getParam('limit', 1000);\r\n $offset = $this->Request()->getParam('start', 0);\r\n $sort = $this->Request()->getParam('sort', []);\r\n $filter = $this->Request()->getParam('filter', []);\r\n\r\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\r\n\r\n $this->View()->assign(['success' => true, 'data' => $result]);\r\n }", "title": "" }, { "docid": "5312faff5fa7125f9c939e21e4cc3413", "score": "0.72896063", "text": "public function listAction() {\n // Handle saving of a create/edit first, so it will reflect in the list\n $this->handleSave();\n\n // Process list now\n $this->headings = $this->getListHeadings();\n\n $rows = array();\n if ($this->module) {\n $res = $this->_getApi()->getList($this->module);\n $rows = $this->getListRows($res);\n }\n\n $this->rows = $rows;\n }", "title": "" }, { "docid": "db3decb51890b80d45fe4f716c97523a", "score": "0.7119994", "text": "public function list() {\n\t\t$this->protectIt( 'read' ); \n\t\tsetTitle( 'Listagem' );\n\t\t\n\t\t// Carrega o grid\n\t\tview( 'grid/grid' );\n\t}", "title": "" }, { "docid": "da70bb19a6c8e0562a0e54373a840197", "score": "0.71189886", "text": "public function index()\n {\n $list = $this->resouce->listResource();\n $tree = Helper::menuTree($list, true);\n $list = Helper::multiArrayToOne($tree);\n $this->setResponse($list);\n return $this->response();\n }", "title": "" }, { "docid": "3ebc7b4fb8651186fc87d5fb5cb8b455", "score": "0.7118039", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('VMBResourceBundle:Resource')->findAllByDate();\n\n return $this->render('VMBResourceBundle:Resource:index.html.twig', array(\n 'mainTitle' => $this->get('translator')->trans('resource.browse'),\n\t\t\t'addButtonUrl' => $this->generateUrl('resource_new'),\n 'entities' => $entities\n ));\n }", "title": "" }, { "docid": "405b6604e6bba890cbf7539c671390f5", "score": "0.70984906", "text": "public function list() {\n return $this->render(\"/sandwich/list.html.twig\");\n }", "title": "" }, { "docid": "8abbd6fc2b8eb9c6981a14c1d833bc3f", "score": "0.70859194", "text": "function list() {\n $data = $this->handler->handleList();\n\n $page = new Page(\"Applicants\", \"Applicants\");\n $page->top();\n\n listView($data);\n\n $page->bottom();\n }", "title": "" }, { "docid": "05a3a1abee5cdb637e4ecb2bed78f793", "score": "0.70451564", "text": "public function index() {\n ${$this->resources} = $this->model->orderBy('created_at', 'DESC')\n ->paginate(Variables::get('items_per_page'));\n\n return view($this->view_path . '.index', compact($this->resources));\n }", "title": "" }, { "docid": "abe6de6ae60572e5912b850a19d1d680", "score": "0.703898", "text": "public function actionIndex()\r\n {\r\n $searchModel = new ResourceSearch();\r\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\r\n\r\n return $this->render('index', [\r\n 'searchModel' => $searchModel,\r\n 'dataProvider' => $dataProvider,\r\n ]);\r\n }", "title": "" }, { "docid": "6151a50f557e88b87eb8f70be8393002", "score": "0.70284206", "text": "public function index()\n\t{\n\t\t$resources = Resource::latest()->get();\n\t\treturn view('admin.resources.index', compact('resources'));\n\t}", "title": "" }, { "docid": "6bcdfec0867dafc8b42448cdcf9d2175", "score": "0.7027432", "text": "public function index(){\n $this->show_list();\n }", "title": "" }, { "docid": "6ebebdc63fae4da7ebeb3b9b7f417cd2", "score": "0.7013327", "text": "public function list()\n\t\t{\n\t\t\tglobal $app;\n\t\t\t$sth = $this->PDO->prepare(\"SELECT * FROM cars\");\n\t\t\t$sth->execute();\n\t\t\t$result = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t$app->render('default.php',[\"data\"=>$result],200); \n\t\t}", "title": "" }, { "docid": "f92d52acde121c57bdf5619d33199871", "score": "0.6999621", "text": "public function index()\n {\n $resources = Resource::all();\n return view('resource.index', compact('resources'));\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.698912", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "613162e5b8bb35685ca245a33b184f09", "score": "0.6918746", "text": "public function index()\n {\n $is_paginated = $this->request->query(\\Config::get('resource.type','resource-type'),'paginated') != 'collection';\n $result = $is_paginated ? $this->_indexPaginate() : $this->_indexCollection() ;\n\n $meta = $this->getMeta($this->resource,$result);\n\n return response()->resource($result,$this->getTransformer(),[ 'message' => $this->getMessage('index'), 'meta' => $meta ]);\n }", "title": "" }, { "docid": "adb2cfce1206f7acf8cb4580fd08df71", "score": "0.69092494", "text": "public function index()\n {\n return DishResource::collection(Dish::paginate());\n }", "title": "" }, { "docid": "79739617940af1c1c53e8d6ecec053f2", "score": "0.6908913", "text": "public function listAction()\n {\n $this->view->pageTitle = \"Document List\";\n \n $service = new App_Service_DocumentService();\n $this->view->docs = $service->getDocuments();\n \n $this->setPartial();\n }", "title": "" }, { "docid": "ce9698986cea138f641a36279605e7e0", "score": "0.6898306", "text": "public function index()\n {\n return InfoResource::collection(Resource::paginate(30));\n }", "title": "" }, { "docid": "35b022b0a4b421fcb5624635dcd9fe8f", "score": "0.6868236", "text": "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\n\t\t$oDocModel = new model_doc();\n\t\t$tDocs = $oDocModel->findAll();\n\n\t\t$oView = new _view('docs::list');\n\t\t$oView->tDocs = $tDocs;\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "title": "" }, { "docid": "30eced964887c2aef75a368b0de6cca4", "score": "0.6837255", "text": "public function index()\n\t{\n // Set the sistema locale configuration.\n $this->set_locale();\n \n\t\t$this->_template(\"{$this->_controller}/list\", $this->_get_assets('list', $this->data));\n }", "title": "" }, { "docid": "f29709817ec3db2d44ad77fdc0a55269", "score": "0.68279153", "text": "public function _index()\n\t{\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "a050363540859438f2bfba3e253e49b6", "score": "0.68264943", "text": "public function index()\n {\n //\n $resources = Resource::all();\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "2e1081176934c84955413f91a6d6b5aa", "score": "0.68214476", "text": "public function index()\n\t{\n\t\t$listings = $this->listing->all();\n\n\t\treturn View::make('listings.index', compact('listings'));\n\t}", "title": "" }, { "docid": "e39e490f9dd6d2633e939500f416862a", "score": "0.68191457", "text": "protected function listAction()\n {\n return $this->renderForm('list');\n }", "title": "" }, { "docid": "06d2b70f0a929084bcd3d1ce8021741e", "score": "0.6812902", "text": "public function index()\n {\n $resource = Resource::leftjoin('categories', 'resources.resource_category_id', '=', 'categories.category_id')\n ->leftjoin('sub_categories', 'resources.resource_sub_category_id', '=', 'sub_categories.sub_category_id')\n ->leftjoin('sources', 'resources.resource_source_id', '=', 'sources.source_id')\n ->leftjoin('authors', 'resources.resource_author_id', '=', 'authors.author_id')\n ->orderBy('resources.created_at', 'desc')->get();\n\n $view_data = [\n 'resource' => $resource,\n ];\n\n return view('resource.index', $view_data);\n }", "title": "" }, { "docid": "a07e724e196f9b0fd9d1230bd447f5bf", "score": "0.6810471", "text": "public function index()\n {\n return view('backend.resource.index');\n }", "title": "" }, { "docid": "620b35ada66373ffe1f703e36235dc33", "score": "0.6803154", "text": "public function listAction() {\n\t\t$all = $this->users->findAll();\n\t\t$this->views->add('users/list-all', [\n\t\t\t\t'users' => $all, \n\t\t\t\t'title' => \"Visa alla användare\"\n\t\t\t]);\n\t}", "title": "" }, { "docid": "aa8d3c35a6d3df3c02417b793ad19e32", "score": "0.67996716", "text": "public function actionList() {\r\n\t\t$model = $this->model;\r\n\t\t$items = $model->doList($this->paramsArray);\r\n\t\t$fields = true;\r\n\t\tif (isset($this->paramsArray['fields'])) {\r\n\t\t\t$fields = $this->paramsArray['fields'];\r\n\t\t}\r\n\t\t$itemsAr = ActiveRecord::makeArray($items, $fields);\r\n\t\t$this->respond(200, array(\"result\"=>$itemsAr, \"timestamp\"=>time()));\r\n\t}", "title": "" }, { "docid": "796201f21ca0c2d35a132ef98fbfa143", "score": "0.67937386", "text": "public function listAction()\n {\n $this->init(); // TODO: create a controller listener to call it automatically\n\n $polls = $this->pollEntityRepository->findBy(\n array('published' => true, 'closed' => false),\n array('createdAt' => 'DESC')\n );\n\n return $this->render('PrismPollBundle:Frontend\\Poll:list.html.twig', array(\n 'polls' => $polls\n ));\n }", "title": "" }, { "docid": "09027ea66bbe9d5f56484038f519de35", "score": "0.67874783", "text": "public function index()\n {\n return view('visitor.resources.index', [\n 'resources' => $this->resourceService->all()\n ]);\n }", "title": "" }, { "docid": "1b9b93c758b801d7f44b3b35dcb70a84", "score": "0.67775524", "text": "public function index()\n {\n return RedResponse::success(Todo::getListWithPage($this->requestObj));\n }", "title": "" }, { "docid": "06886aeb949a8582132f62e7cd3ac34f", "score": "0.6776288", "text": "public function actionList()\n {\n $data=array();\n $looks = new Looks('search');\n $looks->unsetAttributes();\n if ( isset($_GET['Looks']) ) {\n $looks->attributes = $_GET['Looks'];\n }\n \n \t\t$users_all = Users::model()->findAll(\"status=:status\", array(':status'=>Users::STATUS_PUBLISH));\n \t\t$data['users'] = CHtml::listData($users_all, 'id', 'fullNameWithId');\n\n \n $this->render('list', array(\n 'model' => $looks,\n 'data'=>$data,\n )); \n }", "title": "" }, { "docid": "f8555ba3dc23008cd0a0c16a4559a6f8", "score": "0.6776143", "text": "public function showAll() {\n echo json_encode([\"MSG\" => $this->rest->showAll(), \"CODE\" => 200]);\n }", "title": "" }, { "docid": "989e888f453ad4e6aca439789fa4e466", "score": "0.6765163", "text": "public function actionList()\n {\n\t\t//$client->connect();\n\t\t\n\t $request = Yii::$app->request;\n\n\t $page = (!empty($request->get('page'))) ? $request->get('page') : 1;\n\n\t $blogService = new BlogService();\n\t $result = $blogService->getList($page);\n\n\t $pages = new Pagination(['totalCount' => $result['total']]);\n\n return $this->render('list', [\n 'models' => $result['blogs'],\n 'pages' => $pages,\n ]);\n }", "title": "" }, { "docid": "39872964f7d5564e8285c3a9fe12f919", "score": "0.67492306", "text": "function index() {\n $this->addBreadcrumb(lang('List'));\n \n $per_page = 10;\n $page = $this->getPaginationPage();\n \n if (!$this->active_category->isNew()) {\n list($files, $pagination) = Files::paginateByCategory($this->active_category, $page, $per_page, STATE_VISIBLE, $this->logged_user->getVisibility());\n } else {\n list($files, $pagination) = Files::paginateByProject($this->active_project, $page, $per_page, STATE_VISIBLE, $this->logged_user->getVisibility());\n } // if\n \n $this->smarty->assign(array(\n 'files' => $files,\n 'pagination' => $pagination,\n 'categories' => Categories::findByModuleSection($this->active_project, 'files', 'files'),\n 'pagination_url' => assemble_url('mobile_access_view_files', array('project_id' => $this->active_project->getId())),\n 'page_back_url' => assemble_url('mobile_access_view_project', array('project_id' => $this->active_project->getId())),\n ));\n }", "title": "" }, { "docid": "92aaa491ca5099382123536e546b9aa3", "score": "0.674686", "text": "public function listAction()\n {\n $article_manager = $this->getDI()->get(\n 'core_article_manager'\n );\n \n // Sisipkan hasil query/find ke dalam variabel articles\n // Secara default, view yang dipanggil adalah Views/Default/article/list.volt\n $this->view->articles = $article_manager->find();\n }", "title": "" }, { "docid": "782e995121f434d308103646571fa51f", "score": "0.6745038", "text": "public function index()\n {\n return Resource::with('location')\n ->orderBy('name')\n ->get();\n }", "title": "" }, { "docid": "b9bc7c6f98f5ba96d276b3ad631acd74", "score": "0.67304873", "text": "public function index()\n {\n $statuses = Status::paginate(10);\n return StatusResource::collection($statuses);\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.6723516", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "244a81dd1c2b337ec541d21216bf2674", "score": "0.67231476", "text": "public function index(Request $request)\n {\n $this->authorize('list', $this->resourceType);\n\n $search = $request->get('q');\n $order = $request->get('order');\n\n $resources = $this->getRepository()->index($search, $order);\n\n return $this->view('index')\n ->with('type', $this->resourceType)\n ->with('instance', $this->instance)\n ->with('resources', $resources);\n }", "title": "" }, { "docid": "df0d6207611fb7003570319e39a4393e", "score": "0.6721086", "text": "public function index()\n {\n $data = Product::paginate(10);\n\t\treturn ProductResource::Collection($data);\n }", "title": "" }, { "docid": "0d8a9aedf606052ab1459ef7661d1186", "score": "0.6716623", "text": "public function index()\n {\n return ItemResource::collection($this->item->list());\n }", "title": "" }, { "docid": "0d159b9b5426dcb31868b3e360075031", "score": "0.6713858", "text": "public function indexAction() {\n\t\t$perpage = $this->perpage;\n\t\t$page = intval($this->getInput('page'));\n\t\t$title = $this->getInput('title');\n\t\t$status = intval($this->getInput('status'));\n\t\tif ($page < 1) $page = 1;\n\t\t\n\t\t$params = array();\n\t\t$search = array();\n\t\tif($title) {\n\t\t\t$search['title'] = $title;\n\t\t\t$params['title'] = array('LIKE', $title);\n\t\t}\n\t\tif($status) {\n\t\t\t$search['status'] = $status;\n\t\t\t$params['status'] = $status - 1;\n\t\t}\n\t\t$params['ad_type'] = $this->ad_type;\n\t list($total, $ads) = Client_Service_Ad::getCanUseAds($page, $perpage, $params);\n\t\t$this->assign('search', $search);\n\t\t$this->assign('ads', $ads);\n\t\t$this->assign('postion', $this->postion);\n\t\t$this->assign('ad_ptype', $this->ad_ptype);\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t\t$this->assign(\"total\", $total);\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "1c447ea38f47ee196c9862f06d62be13", "score": "0.66991603", "text": "public function index() {\n // Get all records\n $inventories = Inventory::all();\n // Return a list of inventories as a resource\n return InventoryResource::collection($inventories);\n }", "title": "" }, { "docid": "8232f091751d390d26007fa44c243d15", "score": "0.6695602", "text": "public function ListView()\r\n\t{\r\n\t\t$this->Render();\r\n\t}", "title": "" }, { "docid": "b4a4bae274dd96e096b8b4dd55f07244", "score": "0.66906387", "text": "public function index()\n {\n $listInventory = DB::table('inventory')\n ->join('loker', function ($join) {\n $join->on('inventory.id', '=', 'loker.inventory_id')\n ->where('inventory.status_id', 1);\n })->select('*')->get();\n\n // $listInventory = Inventory::all();\n\n return $this->sendResponse(InventoryResource::collection($listInventory), 'List inventory retrieved successfully.');\n\n // return response(['listInventory' => InventoryResource::collection($listInventory), 'message' => 'Retrieved successfully'], 200);\n\n // return response()->json([\n // 'success' => true,\n // 'message' => 'Inventory List',\n // 'data' => $listInventory\n // ]);\n }", "title": "" }, { "docid": "d22f89e9d6b27f65524503cb66269ec3", "score": "0.66849416", "text": "public function index()\n {\n return StudentResource::collection(Student::paginate());\n }", "title": "" }, { "docid": "d6319a190b91d60006c656ee0a40d758", "score": "0.6684913", "text": "public function index()\n {\n $recipes = Recipe::all();\n return RecipeResource::collection($recipes);\n }", "title": "" }, { "docid": "8c7eaa14947e3fc2a24fd3541c974e98", "score": "0.66804516", "text": "function Index()\r\n\t\t{\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data[num_rows] = $parameters[num_rows];\r\n\t\t}", "title": "" }, { "docid": "dc37386e4ee63037decda6f08247fdd5", "score": "0.66712457", "text": "public function listAction() {\n $id = $this->_getParam('id', null);\n \n $this->view->listname = $id;\n $this->view->tasks = $this->service->getTasksFromList($id);\n }", "title": "" }, { "docid": "145c8599914d7576e7404163ccf8b519", "score": "0.6656833", "text": "public function index()\n {\n $this->data['action_name'] = 'List';\n $this->data['rows'] = $this->crud_model::all();\n return view($this->crud_view . '.index', $this->data);\n }", "title": "" }, { "docid": "e3a22916f65a2ec228b5e3965c154843", "score": "0.66490173", "text": "public function index()\n {\n return ClientResource::collection(Client::paginate(20));\n }", "title": "" }, { "docid": "0fb116b141476b8f916bb11b2f5f58d7", "score": "0.66487056", "text": "public function index()\n {\n $items = Item::paginate();\n\n return $this->sendResponse(new ItemsCollection($items), 'Items retrieved successfully.');\n }", "title": "" }, { "docid": "8d187ee99e2e1fd8633cee90820af4b0", "score": "0.6645784", "text": "protected function run_list() {\n\t\treturn $this->render_template($this->get_template(), ['objects' => $this->get_model()->get()]);\n\t}", "title": "" }, { "docid": "076caa2f864fc2268b0d4d47a19486ab", "score": "0.664311", "text": "public function index()\n {\n return ProductResource::collection(\n Product::paginate(10)\n );\n }", "title": "" }, { "docid": "de506437ae33a70184040846dd276c78", "score": "0.6642667", "text": "public function index(Request $request)\n {\n $this->authorize('viewList', $this->getResourceModel());\n\n $paginatorData = [];\n $perPage = (int) $request->input('per_page', '');\n $perPage = (is_numeric($perPage) && $perPage > 0 && $perPage <= 100) ? $perPage : 15;\n if ($perPage != 15) {\n $paginatorData['per_page'] = $perPage;\n }\n $search = trim($request->input('search', ''));\n if (! empty($search)) {\n $paginatorData['search'] = $search;\n }\n $records = $this->getSearchRecords($request, $perPage, $search);\n $records->appends($paginatorData);\n\n return view($this->filterIndexView('_resources.index'), $this->filterSearchViewData($request, [\n 'records' => $records,\n 'search' => $search,\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n 'perPage' => $perPage,\n ]));\n }", "title": "" }, { "docid": "22d91bbe1074dab71958a7841af08295", "score": "0.66420954", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Sparepart - '.APP_NAME;\n $this->global['pageMenu'] = 'List Sparepart';\n $this->global['contentHeader'] = 'List Sparepart';\n $this->global['contentTitle'] = 'List Sparepart';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['readonly'] = $this->readonly;\n $data['classname'] = $this->cname;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "30e45406c5ee243e6ad94d1aa4cbe67f", "score": "0.6628535", "text": "public function listAction()\n {\n $this->_helper->viewRenderer->setViewSuffix('txt');\n\n $model = new Default_Model_Action();\n $this->view->actions = $model->getAll();\n }", "title": "" }, { "docid": "d0295a3d33fcd89a347becc0a34dbe5c", "score": "0.6627775", "text": "public function index()\n {\n $specializations = Specialization::latest()->paginate(25);\n\n return SpecializationResource::collection($specializations);\n }", "title": "" }, { "docid": "25325ea5baf58fda0bdae7e51324bdd3", "score": "0.66259503", "text": "public function index()\n {\n //get tasks\n $tasks = Task::orderBy('id', 'asc')->paginate(100);\n\n //return the collection of tasks as a resource\n return TaskResource::collection($tasks);\n\n }", "title": "" }, { "docid": "0b40c32743cbb461753992a4b05fa545", "score": "0.66182065", "text": "public function showlist()\n \t{\n \t\t$items = Item::all();\n \t\treturn view('item.list',array('items'=>$items,'page'=>'list'));\n \t}", "title": "" }, { "docid": "8e7a175a1d69fc1e276dbd290552b522", "score": "0.65991837", "text": "public function list(){\n\t\t$this->current->list();\n\t}", "title": "" }, { "docid": "5071a61b8379d3dbc27c9379480e9a8c", "score": "0.65990263", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int)$this->param($this->view->translate('page'), 1);\n $propertyId = (int)$this->param($this->view->translate('propertyId'));\n $properties =$this->service\n ->retrieveAllPicturesByPropertyId($propertyId, $page);\n $this->view->pictures = $properties;\n $this->view->paginator = $this->service->getPaginator($page);\n $this->view->propertyId = $propertyId;\n }", "title": "" }, { "docid": "8aabf1b98b72ec9ef7738f5deae5172d", "score": "0.6596813", "text": "public function index()\n {\n return EntryResource::collection(Entry::all());\n //return AnswersResource::collection(Answer::all());\n }", "title": "" }, { "docid": "726d3e7e355e4d0b3bbadd1f2237a742", "score": "0.659275", "text": "public function overviewAction()\n\t{\n\t\t$subSiteKey = '*';\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$subSiteKey = Site::getCurrentSite()->getRootDocument()->getKey();\n\t\t}\n\t\t$language = $this->language;\n\n\t\t// Retrieve items from object list\n\t\t$newsList = new Object_Vacancy_List();\n\t\t$newsList->setOrderKey(\"date\");\n\t\t$newsList->setOrder(\"desc\");\n\t\t$newsList->setLocale($language);\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$newsList->setCondition('subsites LIKE ? AND title != \"\"', '%' . $subSiteKey . '%');\n\t\t}\n\n\t\t$paginator = Zend_Paginator::factory($newsList);\n\t\t$paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\t\t$paginator->setItemCountPerPage(10);\n\t\t$this->view->paginator = $paginator;\n\t}", "title": "" }, { "docid": "110b54105de1a0ec45cec206dbc35c67", "score": "0.65853333", "text": "public function index()\n {\n // needs to return multiple articles\n // so we use the collection method\n return TaskListResource::collection(Task::all());\n }", "title": "" }, { "docid": "b81dd94e271b0c84cd548a81ec7d984f", "score": "0.65751404", "text": "public function listAction()\n {\n if ($this->settings['listtype'] === 'x') {\n $projects = $this->projectRepostitory->findAll();\n } else {\n $projects = $this->projectRepostitory->findByStatus($this->settings['listtype']);\n }\n\n $this->view->assign('projects', $projects);\n }", "title": "" }, { "docid": "8668ccc17814e06acdd730ecc3fa0dd2", "score": "0.65750146", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $result) = Activity_Service_Fanli::getList($page, $perpage);\r\n\t\t\r\n\t\t$this->assign('result', $result);\r\n\t\t$this->cookieParams();\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl']));\r\n\t}", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.6563124", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.6563124", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "bf0537679d083764e7d496b7e9f333b7", "score": "0.6550742", "text": "public function index(): View\n {\n $items = QueryBuilder::for(Resource::class)\n ->allowedFilters([\n 'name',\n 'is_facility',\n 'categories.id',\n 'groups.id',\n AllowedFilter::scope('flags', 'currentStatus'),\n ])\n ->defaultSort('name')\n ->allowedSorts(['name', 'description', 'is_facility'])\n ->paginate(15);\n\n $filterCategories = Category::orderBy('name')->pluck('name', 'id');\n $filterGroups = Group::orderBy('name')->pluck('name', 'id');\n $filterFlags = Flag::pluck('name', 'abbr');\n\n return view('resources.index')->with(compact([\n 'items',\n 'filterCategories',\n 'filterGroups',\n 'filterFlags',\n ]));\n }", "title": "" }, { "docid": "ed961c9f0fcb9ad07a48b882d9df24ad", "score": "0.6540003", "text": "public function index()\n\t{\n\t\t$subResourceDetailLikes = $this->subResourceDetailLikeRepository->paginate(10);\n\n\t\treturn view('subResourceDetailLikes.index')\n\t\t\t->with('subResourceDetailLikes', $subResourceDetailLikes);\n\t}", "title": "" }, { "docid": "3cf2644fce763701f59cab74b93915e2", "score": "0.6538733", "text": "public function indexAction() {\n\t\t$request = $this->getRequest();\n\t\t$params = $request->getParams();\n\n\t\t$list = new List8D_Model_List;\n\t\t$list = $list->getById(1);\n\t\t\n\t\t$acl = new List8D_ACL;\n\t\t$this->view->list = $list;\n\t\t$this->view->aclresult = $acl->checkListACL($list);\n\n\t}", "title": "" }, { "docid": "f1ecf3ea6ca691d8230bfd5de1a0c2bc", "score": "0.6536342", "text": "public function index()\n\t{\n\t\t$view = $this->start_view($this->section_url.'/be/list');\n\t\t\n\t\t// Type\n\t\tif($this->input->get('type') !== false && array_key_exists($this->input->get('type'),Kohana::config('example_3.types'))){\n\t\t\t$type = $this->input->get('type');\n\t\t} else {\n\t\t\t$type = 1;\n\t\t}\n\t\t\n\t\tlist($pagination, $data) = $this->list_data($type);\n\t\t\n\t\t$view->set_global('data', $data);\n\t\t$view->set_global('pagination', $pagination);\n\t\t\n\t\t// Set general info\n\t\t$view->set_global($this->section_details());\n\t\t\n\t\t// Type tab override\n\t\t$view->set_global('active_tab',$type);\n\t\t\n\t\t// Set Breadcrumb items\n\t\t$view->breadcrumbs = array(\n\t\t\t$this->section_url => $this->section_name,\n\t\t\t'' => 'Listing'\n\t\t);\n\t\t\n\t\t$this->render_view($view);\n\t}", "title": "" }, { "docid": "f1673a17c984cf24b6d574aa7a325e35", "score": "0.6533108", "text": "public function index()\n {\n return FlightResource::collection(Flight::paginate(15));\n }", "title": "" }, { "docid": "14cbe87d366063edc7062faf79058bc0", "score": "0.6532565", "text": "public function index()\n {\n return $this->response->paginator(Viewer::orderBy('id', 'desc')->paginate(10), new ViewerTransformer);\n }", "title": "" }, { "docid": "a29a971d51fcb42465841db6bd2a38ad", "score": "0.65312624", "text": "public function viewList() {\n\n\t\t$context = (isset($this->options['list_type'])) ? $this->options['list_type'] : 'list';\n\n\t\telgg_push_context($context);\n\n\t\t$items = $this->getItems();\n\t\t$options = $this->getOptions();\n\t\t$count = $this->getCount();\n\n\t\t$offset = elgg_extract('offset', $options);\n\t\t$limit = elgg_extract('limit', $options);\n\t\t$base_url = elgg_extract('base_url', $options, '');\n\t\t$pagination = elgg_extract('pagination', $options, true);\n\t\t$offset_key = elgg_extract('offset_key', $options, 'offset');\n\t\t$position = elgg_extract('position', $options, 'after');\n\n\t\tif ($pagination && $count) {\n\t\t\t$nav = elgg_view('navigation/pagination', array(\n\t\t\t\t'base_url' => $base_url,\n\t\t\t\t'offset' => $offset,\n\t\t\t\t'count' => $count,\n\t\t\t\t'limit' => $limit,\n\t\t\t\t'offset_key' => $offset_key,\n\t\t\t));\n\t\t}\n\n\t\t$html .= '<div class=\"elgg-list-container\">';\n\n\t\tif ($position == 'before' || $position == 'both') {\n\t\t\t$html .= $nav;\n\t\t}\n\n\t\t$list_attrs = elgg_format_attributes($this->getListAttributes());\n\n\t\t$html .= \"<ul $list_attrs>\";\n\n\t\tforeach ($items as $item) {\n\n\t\t\t$view = elgg_view_list_item($item, $options);\n\n\t\t\tif (!$view) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$has_items = true;\n\n\t\t\t$item_attrs = elgg_format_attributes($this->getItemAttributes($item));\n\n\t\t\t$html .= \"<li $item_attrs>$view</li>\";\n\t\t}\n\n\t\tif (!$has_items) {\n\t\t\t$html .= '<li class=\"elgg-list-placeholder\">' . elgg_echo('list:empty') . '</li>';\n\t\t}\n\n\t\t$html .= '</ul>';\n\n\t\tif ($position == 'after' || $position == 'both') {\n\t\t\t$html .= $nav;\n\t\t}\n\n\t\t$html .= '</div>';\n\n\t\telgg_pop_context();\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "eb4bc3428c5096a035b8d71351d4f9c3", "score": "0.6530049", "text": "public function index()\n {\n //\n $units = Unit::paginate(10);\n return UnitResource::collection($units);\n }", "title": "" }, { "docid": "1e991a3059ff8a7aa8b4543e6d5ec071", "score": "0.65265703", "text": "public function index()\n {\n $data['resources'] = CarModel::paginate($this->paginate_by);\n return view($this->base_view_path.'index', $data);\n }", "title": "" }, { "docid": "f504aa8b0d4e26dbe40f10d29efd07da", "score": "0.65209836", "text": "public function index()\n {\n return $this->collection(\n $this->repository->all()\n );\n }", "title": "" }, { "docid": "0aefb1879ed86536b4b0301bdcb431fb", "score": "0.6520495", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$ad_type = $this->getInput('ad_type');\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\t$search = array();\r\n\t\tif ($ad_type) $search['ad_type'] = $ad_type;\r\n\t\tlist($total, $ads) = Gou_Service_Ad::getList($page, $perpage, $search);\r\n\t\t$this->assign('ad_types', $this->ad_types);\r\n\t\t\r\n\t\t$this->assign('search', $search);\r\n\t\t$this->assign('ads', $ads);\r\n\t\t$this->cookieParams();\r\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\r\n\t}", "title": "" }, { "docid": "84219766af32e7ff206e88dffca57430", "score": "0.6515992", "text": "public function index()\n {\n try {\n return $this->resp->ok(eRespCode::CAT_LISTED_200_00, new CategoryResourceCollection($this->categoryService->getAll()));\n } catch (Throwable $th) {\n Log::info($th);\n return $this->resp->guessResponse(eRespCode::_500_INTERNAL_ERROR);\n }\n }", "title": "" }, { "docid": "5439447ac88f8cc98dc7832990b07305", "score": "0.6512933", "text": "public function indexAction()\n {\n $this->display();\n\n }", "title": "" }, { "docid": "93a7ba35330c263ce449589f25157263", "score": "0.6512549", "text": "public function index()\n {\n $todos = Todo::latest()->get();\n return (new TodoResourceCollection($todos));\n }", "title": "" }, { "docid": "2277c0665c4148cb55e2e8ca37774962", "score": "0.65113294", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate(20));\n }", "title": "" }, { "docid": "e1183ebde99a8d3c589ddd34164e88f0", "score": "0.6510991", "text": "public function index() {\n\t\t$this->all();\n\t}", "title": "" }, { "docid": "b04a0cb3fd073d7067244a0fe69ce396", "score": "0.6509714", "text": "public function index()\n {\n //get movies\n $movies = MoviesModel::paginate(10);\n\n //return collection of article as a resource\n return MoviesResource::collection($movies);\n }", "title": "" }, { "docid": "021eb06ebdab9fb37e6b65a67751a381", "score": "0.64969635", "text": "public function listData()\n {\n $catalog = DB::table($this->screen)->where('IsActive', '1')->paginate(15);\n\n $data['catalog'] = $catalog;\n return view('catalog.index', $data);\n }", "title": "" }, { "docid": "cbfc279e9e82aba8cb2814815737b9eb", "score": "0.6495653", "text": "public function listAction() {\n $users = $this->userRepository->findAll();\n $this->view->assign('users', $users);\n $this->view->render();\n }", "title": "" }, { "docid": "c0ac6b16fca466eabec5fae9f571583e", "score": "0.64926547", "text": "public function actionList() {\n\t\t$id = isset($_GET['id'])? $_GET['id'] : 'all';\n\n\t\tif(is_numeric($id))\n\t\t\t$list = CActiveRecord::model('X2List')->findByPk($id);\n\t\t\t\n\t\tif(isset($list)) {\n\t\t\t$model = new Contacts('search');\n\t\t\t$model->setRememberScenario('contacts-list-'.$id);\n\t\t\t//set this as the list we are viewing, for use by vcr controls\n\t\t\tYii::app()->user->setState('contacts-list', $id);\n\t\t\t$dataProvider = $model->searchList($id);\n\t\t\t$list->count = $dataProvider->totalItemCount;\n\t\t\t$list->save();\n\t\t\t\n\t\t\t$this->render('list',array(\n\t\t\t\t'listModel'=>$list,\n\t\t\t\t// 'listName'=>$list->name,\n\t\t\t\t// 'listId'=>$id,\n\t\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t\t'model'=>$model,\n\t\t\t));\n\t\t\t\n\t\t} else {\n\t\t\tif($id == 'my')\n\t\t\t\t$this->redirect(array('/contacts/myContacts'));\n\t\t\t\t// $dataProvider = CActiveRecord::model('Contacts')->searchAll();\n\t\t\telseif($id == 'new')\n\t\t\t\t$this->redirect(array('/contacts/newContacts'));\n\t\t\t\t// $dataProvider = CActiveRecord::model('Contacts')->searchAll();\n\t\t\telse\n\t\t\t\t$this->redirect(array('/contacts/allContacts'));\n\t\t}\n\t}", "title": "" }, { "docid": "005629388e14797f6fdbc0ea8785e7ac", "score": "0.6487256", "text": "public function index()\n {\n $Products = products::orderby('created_at','desc')->paginate(40);\n return ProductsResource::collection($Products);\n }", "title": "" }, { "docid": "3e2e5ecfe76abe9cd2482096fab1fab6", "score": "0.648447", "text": "public function index()\n {\n //\n $response = $this->rest->all();\n return $this->response(\n \"Menus Successfully Fetched.\",\n $response,\n Response::HTTP_OK\n );\n }", "title": "" }, { "docid": "54386e6f93fa46cdb232c28e7cfdf6fe", "score": "0.64841735", "text": "public function listResources() {\n // Get the list of enabled and disabled resources.\n $config = $this->resourceConfigStorage->loadMultiple();\n\n // Strip out the nested method configuration, we are only interested in the\n // plugin IDs of the resources.\n $enabled_resources = array_combine(array_keys($config), array_keys($config));\n $available_resources = ['enabled' => [], 'disabled' => []];\n $resources = $this->resourcePluginManager->getDefinitions();\n foreach ($resources as $id => $resource) {\n $key = $this->getResourceKey($id);\n $status = (in_array($key, $enabled_resources) && $config[$key]->status()) ? 'enabled' : 'disabled';\n $available_resources[$status][$id] = $resource;\n }\n\n // Sort the list of resources by label.\n $sort_resources = function ($resource_a, $resource_b) {\n return strcmp($resource_a['label'], $resource_b['label']);\n };\n if (!empty($available_resources['enabled'])) {\n uasort($available_resources['enabled'], $sort_resources);\n }\n if (!empty($available_resources['disabled'])) {\n uasort($available_resources['disabled'], $sort_resources);\n }\n\n // Heading.\n $list['resources_title'] = [\n '#markup' => '<h2>' . $this->t('REST resources') . '</h2>',\n ];\n $list['resources_help'] = [\n '#markup' => '<p>' . $this->t('Here you can enable and disable available resources. Once a resource has been enabled, you can restrict its formats and authentication by clicking on its \"Edit\" link.') . '</p>',\n ];\n $list['enabled']['heading']['#markup'] = '<h2>' . $this->t('Enabled') . '</h2>';\n $list['disabled']['heading']['#markup'] = '<h2>' . $this->t('Disabled') . '</h2>';\n\n // List of resources.\n foreach (['enabled', 'disabled'] as $status) {\n $list[$status]['#type'] = 'container';\n $list[$status]['#attributes'] = ['class' => ['rest-ui-list-section', $status]];\n $list[$status]['table'] = [\n '#theme' => 'table',\n '#header' => [\n 'resource_name' => [\n 'data' => $this->t('Resource name'),\n 'class' => ['rest-ui-name'],\n ],\n 'path' => [\n 'data' => $this->t('Path'),\n 'class' => ['views-ui-path'],\n ],\n 'description' => [\n 'data' => $this->t('Description'),\n 'class' => ['rest-ui-description'],\n ],\n 'operations' => [\n 'data' => $this->t('Operations'),\n 'class' => ['rest-ui-operations'],\n ],\n ],\n '#rows' => [],\n ];\n foreach ($available_resources[$status] as $id => $resource) {\n $canonical_uri_path = !empty($resource['uri_paths']['canonical'])\n ? $resource['uri_paths']['canonical']\n : FALSE;\n\n // @see https://www.drupal.org/node/2737401\n // @todo Remove this in Drupal 9.0.0.\n $old_create_uri_path = !empty($resource['uri_paths']['https://www.drupal.org/link-relations/create'])\n ? $resource['uri_paths']['https://www.drupal.org/link-relations/create']\n : FALSE;\n $new_create_uri_path = !empty($resource['uri_paths']['create'])\n ? $resource['uri_paths']['create']\n : FALSE;\n $create_uri_path = $new_create_uri_path ?: $old_create_uri_path;\n\n $available_methods = array_intersect(array_map('strtoupper', get_class_methods($resource['class'])), [\n 'HEAD',\n 'GET',\n 'POST',\n 'PUT',\n 'DELETE',\n 'TRACE',\n 'OPTIONS',\n 'CONNECT',\n 'PATCH',\n ]);\n\n // @todo Remove this when https://www.drupal.org/node/2300677 is fixed.\n $is_config_entity = isset($resource['serialization_class']) && is_subclass_of($resource['serialization_class'], ConfigEntityInterface::class, TRUE);\n if ($is_config_entity) {\n $available_methods = array_diff($available_methods, ['POST', 'PATCH', 'DELETE']);\n $create_uri_path = FALSE;\n }\n\n // Now calculate the configured methods: if a RestResourceConfig entity\n // exists for this @RestResource plugin, then regardless of whether that\n // configuration is enabled or not, inspect its enabled methods. Strike\n // through all disabled methods, so that it's clearly conveyed in the UI\n // which methods are supported on which URL, but may be disabled.\n if (isset($config[$this->getResourceKey($id)])) {\n $enabled_methods = $config[$this->getResourceKey($id)]->getMethods();\n $disabled_methods = array_diff($available_methods, $enabled_methods);\n $configured_methods = array_merge(\n array_intersect($available_methods, $enabled_methods),\n array_map(function ($method) {\n return \"<del>$method</del>\";\n }, $disabled_methods)\n );\n }\n else {\n $configured_methods = $available_methods;\n }\n\n // All necessary information is collected, now generate some HTML.\n $canonical_methods = implode(', ', array_diff($configured_methods, ['POST']));\n if ($canonical_uri_path && $create_uri_path) {\n $uri_paths = \"<code>$canonical_uri_path</code>: $canonical_methods\";\n $uri_paths .= \"</br><code>$create_uri_path</code>: POST\";\n }\n else {\n if ($canonical_uri_path) {\n $uri_paths = \"<code>$canonical_uri_path</code>: $canonical_methods\";\n }\n else {\n $uri_paths = \"<code>$create_uri_path</code>: POST\";\n }\n }\n\n $list[$status]['table']['#rows'][$id] = [\n 'data' => [\n 'name' => !$is_config_entity ? $resource['label'] : $this->t('@label <sup>(read-only)</sup>', ['@label' => $resource['label']]),\n 'path' => [\n 'data' => [\n '#type' => 'inline_template',\n '#template' => $uri_paths,\n ],\n ],\n 'description' => [],\n 'operations' => [],\n ],\n ];\n\n if ($status == 'disabled') {\n $list[$status]['table']['#rows'][$id]['data']['operations']['data'] = [\n '#type' => 'operations',\n '#links' => [\n 'enable' => [\n 'title' => $this->t('Enable'),\n 'url' => Url::fromRoute('restui.edit', ['resource_id' => $id]),\n ],\n ],\n ];\n }\n else {\n $list[$status]['table']['#rows'][$id]['data']['operations']['data'] = [\n '#type' => 'operations',\n '#links' => [\n 'edit' => [\n 'title' => $this->t('Edit'),\n 'url' => Url::fromRoute('restui.edit', ['resource_id' => $id]),\n\n ],\n 'disable' => [\n 'title' => $this->t('Disable'),\n 'url' => Url::fromRoute('restui.disable', ['resource_id' => $id]),\n ],\n 'permissions' => [\n 'title' => $this->t('Permissions'),\n 'url' => Url::fromRoute('user.admin_permissions', [], ['fragment' => 'module-rest']),\n ],\n ],\n ];\n\n $list[$status]['table']['#rows'][$id]['data']['description']['data'] = [\n '#theme' => 'restui_resource_info',\n '#granularity' => $config[$this->getResourceKey($id)]->get('granularity'),\n '#configuration' => $config[$this->getResourceKey($id)]->get('configuration'),\n ];\n }\n }\n }\n\n $list['enabled']['table']['#empty'] = $this->t('There are no enabled resources.');\n $list['disabled']['table']['#empty'] = $this->t('There are no disabled resources.');\n $list['#title'] = $this->t('REST resources');\n return $list;\n }", "title": "" } ]
681607df7f9748bd53aebb02681f68d2
Converts data into YAML string.
[ { "docid": "719dbdf619c5b1c63536c3ae89b00caa", "score": "0.6757762", "text": "protected static function cacheYaml($data)\r\n {\r\n if (is_string($data)) { $data = json_decode($data); }\r\n \r\n if (is_array($data)) { $data = Yaml::dump($data); }\r\n if (is_object($data)) { $data = Yaml::dump($data, 2, 4, Yaml::DUMP_OBJECT); }\r\n \r\n return $data;\r\n }", "title": "" } ]
[ { "docid": "58042c210c3942554fbce0a143354e06", "score": "0.7677666", "text": "public static function encode($data): string\n {\n // fetch the current locale setting for numbers\n $locale = setlocale(LC_NUMERIC, 0);\n\n // change to english numerics to avoid issues with floats\n setlocale(LC_NUMERIC, 'C');\n\n // $data, $indent, $wordwrap, $no_opening_dashes\n $yaml = Spyc::YAMLDump($data, false, false, true);\n\n // restore the previous locale settings\n setlocale(LC_NUMERIC, $locale);\n\n return $yaml;\n }", "title": "" }, { "docid": "caf85258ab6e5debf45a28ce19579110", "score": "0.73249507", "text": "public function arrayToYaml($data) {\n $dumper = new Dumper();\n $dumper->setIndentation(2);\n return trim($dumper->dump($data, PHP_INT_MAX));\n }", "title": "" }, { "docid": "2ffca49538acc7736e28005f851e1905", "score": "0.719566", "text": "public function toYaml(): string {\n return yaml_emit($this->toArray());\n }", "title": "" }, { "docid": "6c771b4cb5acb9cd4528ef3b097d361d", "score": "0.7126769", "text": "public function yaml($data)\n {\n return $this->buildResponse(\n (new Yaml())->serialise($data), 'yml'\n );\n }", "title": "" }, { "docid": "ae8875278a52a4802dd1ffaff9096665", "score": "0.7005811", "text": "public static function dumpYaml($data=array(),$yamlPath=null){\n if(is_array($data)){\n $yaml = Yaml::dump($data);\n return file_put_contents($yamlPath, $yaml);\n }\n\n }", "title": "" }, { "docid": "2b3bc71d59ece1b5b90efe3d1916e333", "score": "0.6609636", "text": "public function dumpYaml() {\n $chip = $this->getChip();\n foreach($chip['packages'] AS $package => $pinMap) {\n $chip['packages'][$package] = $this->pinMapToArrayIfPossible($pinMap);\n }\n $yamlData = StringUtil::utf8ToAsciiHtmlRecursive($chip);\n return Yaml::dump($yamlData, 4, 2);\n }", "title": "" }, { "docid": "b31273c7dcd7558bbbb8fe56aca58430", "score": "0.6472419", "text": "public function yamlInline($data)\n {\n return $this->buildResponse(\n (new YamlInline())->serialise($data), 'yml'\n );\n }", "title": "" }, { "docid": "7ebb0e7a235b965745c6dd9e3d45f505", "score": "0.6169087", "text": "public function yamlDecodeFilter($data)\n {\n return Yaml::parse($data);\n }", "title": "" }, { "docid": "879b0c14c1c1b8566969f90562ab733b", "score": "0.60167176", "text": "public function yamlDump(array $data, $level = 0)\n {\n $dumper = new Dumper();\n\n return $dumper->dump($data, $level);\n }", "title": "" }, { "docid": "3676aa5c00f7386e08dfe120157f71d7", "score": "0.59414107", "text": "protected static function parseYaml(string $data)\r\n {\r\n return Yaml::parse($data);\r\n }", "title": "" }, { "docid": "6f5194f7f2d207fce61d54acbc93b87a", "score": "0.5904146", "text": "public function serializeData($data)\n {\n return VarDumper::serialize($data);\n }", "title": "" }, { "docid": "26aa3a7c3cc3d93d777b2c9a76cab962", "score": "0.5902419", "text": "public function yamlEncodeFilter($data, $inline = 10)\n {\n if (!is_array($data)) {\n if ($data instanceof JsonSerializable) {\n $data = $data->jsonSerialize();\n } elseif (method_exists($data, 'toArray')) {\n $data = $data->toArray();\n } else {\n $data = json_decode(json_encode($data), true);\n }\n }\n\n return Yaml::dump($data, $inline);\n }", "title": "" }, { "docid": "77e46cae9fd9128301e350dc2cfeb652", "score": "0.58340263", "text": "public static function dumpData($data) {\n\t\treturn var_export($data, true);\n\t}", "title": "" }, { "docid": "41643d58f823a3a3b624d1c44e33c904", "score": "0.5827813", "text": "public static function toString($data)\n {\n return self::toStringRecursive($data);\n }", "title": "" }, { "docid": "794083cb66159a5e1fcc773fdbfdfc2e", "score": "0.57949674", "text": "public function publicConvertToString($data): string\n {\n return $this->convertToString($data);\n }", "title": "" }, { "docid": "9bfe6d34d83e1353dacdea72fa4c5547", "score": "0.56830335", "text": "public static function serialize($data) {\n return Output::serialize($data);\n }", "title": "" }, { "docid": "4f3785190e306e372edc6468807a7358", "score": "0.5666555", "text": "private\n function messageTranslationForYaml()\n {\n $msg = DB::table('rainlab_translate_messages')->get();\n\n foreach ($msg as $key => $item)\n {\n\n echo $item->code . \": '\";\n $mdata = json_decode($item->message_data);\n\n\n if (isset($mdata->en))\n {\n echo $mdata->en;\n }\n else\n {\n echo $mdata->x;\n\n }\n\n echo \"'<br>\";\n }\n }", "title": "" }, { "docid": "fe24c9d892f77f8d419ecc7b47694d6e", "score": "0.5660085", "text": "protected function convertToString($data)\n {\n if (null === $data || is_bool($data)) {\n return var_export($data, true);\n }\n\n if (is_scalar($data)) {\n return (string) $data;\n }\n\n if (version_compare(PHP_VERSION, '5.4.0', '>=')) {\n return $this->toJson($data, true);\n }\n\n return str_replace('\\\\/', '/', @json_encode($data));\n }", "title": "" }, { "docid": "b56dcec2c4fa0e10dd691eae70dcac56", "score": "0.56167895", "text": "public function format(&$data) {\n\t\t$data = $this->normalize($data);\n\t\t$data = $this->convertToString($data);\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "a3bce8463d68311c638c2afe395ac5e4", "score": "0.5611123", "text": "public function serialize($data)\n {\n return serialize($data);\n }", "title": "" }, { "docid": "6a3d26434848f3280851e0329834b16f", "score": "0.5597965", "text": "protected function serialize($data) {\n return serialize($data);\n }", "title": "" }, { "docid": "40825f37e7651e614883d6051243e598", "score": "0.555572", "text": "protected function writeYamlFile(array $data, $filename)\n {\n $dumper = new Dumper();\n $yamlData = $dumper->dump($data, 5, 0, true, true);\n\n file_put_contents($filename, $yamlData);\n }", "title": "" }, { "docid": "d70d721c8828fbb7866dfe0125075227", "score": "0.55483574", "text": "public function serialize($data): string;", "title": "" }, { "docid": "746fe02a51b4add1e99b8c661a6a0d84", "score": "0.5522162", "text": "public function serialize($data): string\n {\n $xml = $this->serializer()->serialize($data, 'xml');\n\n return $this->normalizeXml($xml);\n }", "title": "" }, { "docid": "7a73f8a1dfd4df2d2d063653af11d711", "score": "0.548175", "text": "public function toString(array $yaml): string\n {\n $saveFlags = \n ($this->config->save->asObject ? Yaml::DUMP_OBJECT : 0) + \n ($this->config->save->asYamlMap ? Yaml::DUMP_OBJECT_AS_MAP : 0) + \n ($this->config->save->asMultilineLiteral ? Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK : 0) + \n ($this->config->save->base64BinaryData ? Yaml::DUMP_BASE64_BINARY_DATA : 0) +\n ($this->config->save->nullAsTilde ? Yaml::DUMP_NULL_AS_TILDE : 0) + \n Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE + \n Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE;\n\n return Yaml::dump(\n $yaml, \n $this->config->save->inlineFromLevel ?? 10, \n $this->config->save->indentation ?? 2,\n $saveFlags\n );\n }", "title": "" }, { "docid": "3faaf528c5e4ff09da60c6cc0a2a5ff4", "score": "0.5466592", "text": "public function dump($data){\n $html = '<pre style=\"margin-bottom: 18px;\n border: 1px solid #e1e1e8;\n border-radius: 4px;\n -moz-border-radius: 4px;\n -webkit-border radius: 4px;\n display: block;\n font-size: 14px;\n white-space: pre-wrap;\n word-wrap: break-word;\n border-radius: 3px; font-weight: bold; \n padding: 20px; \n background: #263238; \n color: #ECEFF1; \n box-shadow: 5px 10px inset;\n font-family: Menlo,Monaco,Consolas,\\'Courier New\\',monospace;\">';\n \n echo $html;\n\n if (is_string($data)) {\n echo $data;\n } else {\n print_r($data);\n }\n echo \"</pre>\";\n }", "title": "" }, { "docid": "4a83ebc534adde7cbe792381b8630734", "score": "0.54420674", "text": "public function convert( array $data ): string;", "title": "" }, { "docid": "f056544a036e8fb699c0c14dbd23b926", "score": "0.54389596", "text": "protected function write($data)\n {\n $dumper = new Dumper();\n $dumper->setIndentation(2);\n $yaml = $dumper->dump($data, 9999);\n $file = $this->app['resources']->getPath('config/extensions/passwordprotect.bolt.yml');\n try {\n $response = @file_put_contents($file, $yaml);\n } catch (\\Exception $e) {\n $response = null;\n }\n return $response;\n }", "title": "" }, { "docid": "d9e07e188d18dca44348c9ab87c1f5b2", "score": "0.5398336", "text": "public static function dataToString($data) {\n $s = \"\";\n if ($data !== self::NO_DATA) {\n ob_start();\n var_dump($data);\n $s = ob_get_clean();\n }\n return trim($s);\n }", "title": "" }, { "docid": "35bcc2a6eac7b009bd64369469ba706e", "score": "0.5372992", "text": "protected function transform($data)\n {\n if ($this->debug) {\n $content['raw_data'] = $data;\n }\n return $content;\n }", "title": "" }, { "docid": "9f917df634121fe8634dd223f35b46f6", "score": "0.5349383", "text": "static function create_data_string($data = array())\n\t\t{\n\t\t\t$data_string = \"\";\n\t\t\t\n\t\t\tforeach($data as $key=>$value)\n\t\t\t{\n\t\t\t\tif(is_array($value)) $value = implode(\", \",$value);\n\t\t\t\t$data_string .= \" data-$key='$value' \";\n\t\t\t}\n\t\t\n\t\t\treturn $data_string;\n\t\t}", "title": "" }, { "docid": "c1c97e40c2f609a894d9a171968cc507", "score": "0.5261352", "text": "public static function drushRender($data): string\n {\n if (is_array($data)) {\n $data = \\Drupal::service('renderer')->renderRoot($data);\n }\n\n $data = MailFormatHelper::htmlToText($data);\n return $data;\n }", "title": "" }, { "docid": "77602d84fe558861a5d21f374843fa27", "score": "0.52560997", "text": "protected function printData(&$data)\n {\n // Code taken from Function taken from https://stackoverflow.com/a/5965940\n $xml_data = new SimpleXMLElement('<?xml version=\"1.0\"?><data></data>');\n $this->array_to_xml($data, $xml_data);\n echo $xml_data->asXML();\n }", "title": "" }, { "docid": "7708d41f281bdefcb0198566c38d4fe7", "score": "0.5247839", "text": "public static function compose($data)\n {\n if (empty($data)) {\n return '';\n }\n\n if (!static::isArray($data)) {\n throw new \\InvalidArgumentException(sprintf(\n \"Data is not an array, specified type is '%s'\",\n gettype($data)\n ));\n }\n\n $lines = array();\n foreach ($data as $key => $value) {\n if (!is_scalar($value)) {\n throw new \\InvalidArgumentException(\"Data value to be composed as text should be a scalar.\");\n }\n\n $lines[] = sprintf('%s %s %s', $key, static::TEXT_DELIMITER, $value);\n }\n $text = implode(PHP_EOL, $lines);\n\n return $text;\n }", "title": "" }, { "docid": "290edefc96994a9f9d8785f49da9bd10", "score": "0.5185586", "text": "protected function transformData(&$data)\n {\n foreach ($data as $key => &$value) {\n if (is_array($value)) {\n $this->transformData($value);\n }\n\n if (is_subclass_of($value, App\\Interfaces\\Unit::class)) {\n $data[$key] = $value->__toString();\n }\n\n if ($value instanceof DateTimeImmutable) {\n $data[$key] = $value->format(DATE_ATOM);\n } elseif ($value instanceof Carbon) {\n $data[$key] = $value->toIso8601ZuluString();\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "3ccabe7e85adaf826cc75fac5908dbd6", "score": "0.5180199", "text": "public function serialise($data)\n {\n return \"serialised\";\n }", "title": "" }, { "docid": "0f98fbad821283085416c122e4c7fad0", "score": "0.5173382", "text": "private function slackify($data)\n {\n $fields = array();\n\n foreach ($data as $key => $value) {\n $obj = new \\stdClass();\n $obj->title = $key;\n $obj->value = $value;\n $obj->short = true;\n\n $fields[] = $obj;\n }\n\n return array('text' => sprintf('%s - %s (%s)', $data['projectname'], $data['task'], $data['step']), 'fields' => $fields);\n }", "title": "" }, { "docid": "f8aee31b217953ced87557b6aa901f29", "score": "0.51661575", "text": "function _serialize($data)\n\t{\n\t\tif (is_array($data))\n\t\t{\n\t\t\tforeach ($data as $key => $val)\n\t\t\t{\n\t\t\t\tif (is_string($val))\n\t\t\t\t{\n\t\t\t\t\t$data[$key] = str_replace('\\\\', '{{slash}}', $val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (is_string($data))\n\t\t\t{\n\t\t\t\t$data = str_replace('\\\\', '{{slash}}', $data);\n\t\t\t}\n\t\t}\n\n\t\treturn serialize($data);\n\t}", "title": "" }, { "docid": "6f28e56558f2bebb45cd41f240929b0b", "score": "0.5123534", "text": "function config_data($data = array())\n\t{\n\t\t$return = '';\n\t\tforeach ($data as $key)\n\t\t{\n\n\t\t\tif (is_array($key)) {\n\t\t\t\t$return .= \"[\";\n\t\t\t\tforeach ($key as $string) {\n\t\t\t\t\t$return .= \"'\" . $string . \"'\";\n\t\t\t\t\t$values = array_values($key);\n\t\t\t\t\t$end = end($values);\n\t\t\t\t\tif ($string != $end) {\n $return .= \",\";\n }\n\t\t\t\t}\n\t\t\t\t$return .= \"]\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$return .= \"'\".$key.\"'\";\n\t\t\t}\n\t\t\t$keys = array_values($data);\n\t\t\tif ($key != end($keys)) $return .= \",\";\n\t\n\t\t}\n\n\n\t\treturn $return;\n\n\t}", "title": "" }, { "docid": "415f14312b21c5696c47ed99e716439f", "score": "0.5117083", "text": "function _serialize($data)\n\t{\n\t\tif (is_array($data))\n\t\t{\n\t\t\tforeach ($data as $key => $val)\n\t\t\t{\n\t\t\t\t$data[$key] = str_replace('\\\\', '{{slash}}', $val);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data = str_replace('\\\\', '{{slash}}', $data);\n\t\t}\n\n\t\treturn serialize($data);\n\t}", "title": "" }, { "docid": "7e5606fb7a2db056cc675b1a677b7d12", "score": "0.511073", "text": "protected function normalize( $data ) {\n if ( null === $data || is_scalar( $data ) ) {\n return $data;\n }\n\n if ( is_array( $data ) || $data instanceof \\Traversable ) {\n $normalized = array();\n\n $count = 1;\n foreach ( $data as $key => $value ) {\n if ( $count++ >= 1000 ) {\n $normalized['...'] = 'Over 1000 items, aborting normalization';\n break;\n }\n $normalized[ $key ] = $this->normalize( $value );\n }\n\n return $normalized;\n }\n\n if ( $data instanceof \\DateTime ) {\n return $data->format( $this->date_format );\n }\n\n if ( is_object( $data ) ) {\n if ( $data instanceof Exception ) {\n return $this->normalize_exception( $data );\n }\n\n return sprintf( '[object] (%s: %s)', get_class( $data ), $this->to_json( $data, true ) );\n }\n\n if ( is_resource( $data ) ) {\n return '[resource]';\n }\n\n return '[unknown(' . gettype( $data ) . ')]';\n }", "title": "" }, { "docid": "ec863b5901f96c4fe85f701b149d55b6", "score": "0.50817144", "text": "function tags_format($data, $options=array()) {\n global $tags_format_options_default;\n $ret=array();\n\n // default values\n $options=array_merge($tags_format_options_default, $options);\n\n // build array in form array(array(k=>k1, v=>v1, op=>=), ...)\n $data=_tags_format_parse($data);\n\n // if array than iterate through str and join as string\n foreach($data as $s)\n $ret[]=_tags_format_single($s, $options);\n\n return implode($options['str_join'], $ret);\n}", "title": "" }, { "docid": "572f6f38b849b3b701dc9d40d36c767d", "score": "0.5065579", "text": "public static function dump(array $data)\n {\n $buffer = [];\n\n foreach ($data as $var => $val) {\n // JSON strings loose their wrapping quotes in the process, need to put them back afterward\n // @see https://github.com/yannoff/composer-dotenv-handler/issues/6\n if (self::isJsonValue($val)) {\n $val = sprintf(\"'%s'\", $val);\n }\n $buffer[] = sprintf('%s=%s', $var, $val);\n }\n\n return implode(\"\\n\", $buffer);\n }", "title": "" }, { "docid": "f065c6cc49687f06ad5a8e29bc9b6c38", "score": "0.5063924", "text": "public function serialize(array $data, array $options = []): string;", "title": "" }, { "docid": "bbe7015b18258ef855550ec74ce96936", "score": "0.5050251", "text": "public static function serialize($data): string{\n SerializableClosure::enterContext();\n SerializableClosure::wrapClosures($data);\n $data = \\serialize($data);\n SerializableClosure::exitContext();\n return $data;\n }", "title": "" }, { "docid": "499d93c830418a7b456f8cb952747f8e", "score": "0.5036105", "text": "private function getArrayAsString(array $data)\n {\n $output = \"[\\n\\r\";\n array_walk_recursive($data, function($value, $key) use (&$output) {\n $output.= \"\\t'$key' => '$value',\\n\\r\";\n });\n return $output . \"]\";\n }", "title": "" }, { "docid": "61006381441e799d599fac3cb9c49f14", "score": "0.50288755", "text": "public static function build_title($data = array()){\n\n\t\tif(empty(static::$title_separator)){\n\t\t\t\n\t\t\tstatic::$title_separator = Template::where('type', '=', 'title_separator')->only('value');\n\t\t}\n\n\t\t$title = '';\n\n\t\tend($data);\n\t\t$last_key = key($data);\n\n\t\tforeach ($data as $key => &$value) {\n\n\t\t\tif(Lang::has($value)){\n\n\t\t\t\t$line = ucfirst(e(__($value)));\n\t\t\t\n\t\t\t}else{\n\n\t\t\t\t$line = ucfirst(e($value));\n\t\t\t}\n\n\t\t\tif($key != $last_key){\n\n\t\t\t\t$title .= $line.' '.static::$title_separator.' ';\n\n\t\t\t}else{\n\n\t\t\t\t$title .= $line;\n\t\t\t}\n\n\t\t\tunset($key, $value);\n\t\t}\n\n\t\treturn $title;\n\t}", "title": "" }, { "docid": "ea7c9b7b404b2e4dda87572f993a2ace", "score": "0.5023597", "text": "protected function createYaml(array $config)\n {\n $nested = [];\n\n array_walk(array_dot($config), function ($value, $key) use (&$nested) {\n array_set($nested, $key, $value);\n });\n\n return $this->yaml->dump($nested, 4);\n }", "title": "" }, { "docid": "980be88b10f72b21c64b1cf4bd999590", "score": "0.5020928", "text": "public function generate($data) {\n\t\tvar_dump($data);\n\t}", "title": "" }, { "docid": "c1f1a76402ca8b28b511509280fefa33", "score": "0.501502", "text": "private function formatData(array $data): Collection\n {\n $defaults = [\n 'enabled' => true,\n 'cooldown' => 30,\n 'admin_only' => false,\n ];\n\n if (! count($data)) {\n return Collection::make([$defaults]);\n }\n\n $data = Arr::isAssoc($data) ? [$data] : $data;\n\n return Collection::make($data)->mapWithKeys(\n fn (array $value, int $key) => [$key => array_merge($defaults, $value)]\n )->reject(\n fn (array $value, int $key) => $this->handler->unique && $key > 0\n );\n }", "title": "" }, { "docid": "5d6272a84bf55da0ab04c84b625c9ef3", "score": "0.49861225", "text": "public function getString($data) {\n $output = '';\n if (is_object($data)) {\n throw new \\Exception('Object values not supported in settings.php generation.');\n }\n else if (is_array($data)) {\n $array = $data;\n $output = '';\n PHPGenerator::arrayExport($array, $output);\n }\n else if (is_numeric($data)) {\n $output = $data;\n }\n else {\n $output = '\\'' . \\addslashes($data) . '\\'';\n }\n return $output;\n }", "title": "" }, { "docid": "4b4a1652e4ee9f55b89ab212d4572cba", "score": "0.4981208", "text": "public function to_php($data = null)\n\t{\n\t\tif ($data == null)\n\t\t{\n\t\t\t$data = $this->_data;\n\t\t}\n\n\t\treturn var_export($data, true);\n\t}", "title": "" }, { "docid": "2c8918e1001c74002a97c851777e0575", "score": "0.49754477", "text": "public function to_php($data = null) {\n\t\tif ($data === null) {\n\t\t\t$data = $this->_data;\n\t\t}\n\t\t\n\t\treturn var_export ( $data, true );\n\t}", "title": "" }, { "docid": "7412b71e75b18794d3597c8f11016600", "score": "0.49432185", "text": "protected function prepareData($data)\n {\n if (!is_array($data)) {\n $data = [$data];\n }\n\n $data = array_map('chr', $data);\n $string = implode('', $data);\n\n return $string;\n }", "title": "" }, { "docid": "6976348fdca58aff4997ab9b2ef125ab", "score": "0.49412614", "text": "protected function debug($data) {\n $string = var_export($data, TRUE);\n $string = preg_replace('/=>\\s*array\\s*\\(/', '=> array(', $string);\n $this->htmlOutput('<pre>' . htmlentities($string) . '</pre>');\n }", "title": "" }, { "docid": "b0a313814206cc13034b4995a4119a15", "score": "0.49361488", "text": "function yaml($title='registration'){\n\n //load the Parsecontrols library\n $this->load->library('parsecontrols');\n //load YAML parser\n $this->load->library('spyc');\n //load all the yaml info into an array variable\n $array = $this->spyc->YAMLLoad('../CodeIgniter/data/'.$title.'.yaml');\n //echo '<pre><a href=\"../CodeIgniter/data/'.$title.'\">spyc.yaml</a> loaded into PHP:<br/>';\n //first check what type of component it is!\n $s='';\n\n //parse outer for name, buttons and text\n foreach ($array as $outer_key=>$outer_value){\n\n foreach ($array['form'] as $key=>$value){\n\n //if is array it goes deeper\n\n if (is_array($value)){\n foreach($array['form'][$key] as $k=>$v){\n //v is an array\n //checks type\n\n //only one level so slightly different from fields\n //so we call it only on dts\n if ( $key =='datasource' && $v=='dts'){\n //calls the datasource for the table. If table does not exist it will\n //created automatically\n //need to be set after fields are parsed;\n\n //$msg=$this->__datasource($value);\n }\n\n if (isset($v['type']) && $v['type'] =='text'){\n //pr($v['type']);\n //echo_array($array['form'][$key][$k]);\n $s.=$this->__input($v);\n }\n\n if (isset($v['type']) && $v['type'] =='checkbox'){\n $s.=$this->__input($v);\n }\n\n if (isset($v['type']) && $v['type'] =='radio'){\n //pr($v['type']);\n //echo_array($array['form'][$key][$k]);\n $s.=$this->__input($v);\n }\n if (isset($v['type']) && ($v['type'] =='submit'||$v['type'] =='reset')){\n //pr($v['type']);\n //echo_array($array['form'][$key][$k]);\n $s.=$this->__button($v);\n }\n if (isset($v['type']) && $v['type'] =='button'){\n //pr($v['type']);\n //echo_array($array['form'][$key][$k]);\n $s.=$this->__button2($v);\n }\n if (isset($v['type']) && $v['type'] =='textarea'){\n //pr($v['type']);\n //echo_array($array['form'][$key][$k]);\n $s.=$this->__textarea($v);\n }\n if (isset($v['type']) && $v['type'] =='select'){\n //pr($v['type']);\n //echo_array($array['form'][$key][$k]);\n $s.=$this->__select($v);\n }\n\n }\n }\n\n\n }\n\n\n $this->parsecontrols->html_text[]=\"The final form <br />\";\n $this->parsecontrols->html_text[]=$s;\n //$this->parsecontrols->render();\n $data['title']='View of Yaml File '.$title.' as a PHP array';\n $data['feature']='Yaml and more yaml!';\n $data['content']=$array;\n //place into $data all the form details\n //at this point we should use tidy maybe as fragment\n $data['form']=$s;\n //print_r($array);\n //echo '</pre>';\n $this->load->view('yaml_view',$data);\n\n }\n }", "title": "" }, { "docid": "2a163e468ed09db85da6b1c5596110f5", "score": "0.4921436", "text": "private function format_raw_data($data) {\n $lang_ident = $data['learning_language'];\n\n $profile['username'] = $data['username'];\n $profile['bio'] = $data['bio'];\n $profile['avatar'] = $data['avatar'];\n $profile['learning'] = $data['learning_language_string'];\n $profile['level'] = $data['language_data'][$lang_ident]['level'];\n $profile['streak'] = $data['site_streak'];\n $profile['followers'] = $data['num_followers'];\n\n //last exercised\n $calendar = array_reverse($data['calendar']);\n $profile['last_practice'] = date('d M Y H:i:s', $calendar['0']['datetime'] / 1000);\n\n return $profile;\n\n}", "title": "" }, { "docid": "5c7bb4016df525ad8c4ab9f7563cc16a", "score": "0.4907679", "text": "public function getOutputContent(&$data) : string\n {\n $outputLines = [];\n $this->iterativelyAddOutputLines($outputLines, $data, '');\n return \\implode(\\PHP_EOL, $outputLines);\n }", "title": "" }, { "docid": "a45bb080ad34b1e537c6ad1574d16fdf", "score": "0.49007797", "text": "public function serialize($data);", "title": "" }, { "docid": "a45bb080ad34b1e537c6ad1574d16fdf", "score": "0.49007797", "text": "public function serialize($data);", "title": "" }, { "docid": "a45bb080ad34b1e537c6ad1574d16fdf", "score": "0.49007797", "text": "public function serialize($data);", "title": "" }, { "docid": "80a46f20cafeae36f175235c7135f991", "score": "0.48964933", "text": "public function fromYaml(string $data): object {\n return $this->fromArray(yaml_parse($data));\n }", "title": "" }, { "docid": "09c9732b6547174793086c2bbfe55b0d", "score": "0.48831394", "text": "private function generatePayload(array $data): ?string\n {\n $ruleKeys = [\n 'match',\n 'cooldown',\n 'admin_only',\n 'enabled',\n 'triggers',\n 'triggers.*',\n ];\n\n $payload = Collection::make($data)\n ->reject(fn ($value, $key) => in_array($key, $ruleKeys))\n ->toArray();\n\n if (count($payload)) {\n return $this->handler->serializePayload($payload);\n }\n\n return null;\n }", "title": "" }, { "docid": "ef95c8ec1f1f7f3ff315489d106c96fc", "score": "0.4880232", "text": "private function _formatOutputData(&$data){\n \t\n \t//parse publishdate from db datetime - begin\n \tif($data['publishdate']){\n \t\t$temp = explode(' ', $data['publishdate']);\n \t\t$date = explode('-', $temp[0]);\n \t\t$time = explode(':', $temp[1]);\n \t\t\n \t\t$data['publishdate'] = $date[2] . '/' . $date[1] . '/' . $date[0] . ' ' . $time[0] . ':' . $time[1];\n \t\t\n \t}\n \t\n \t//parse publishdate from db datetime - begin\n \tif($data['regdate']){\n \t\t$temp = explode(' ', $data['regdate']);\n \t\t$date = explode('-', $temp[0]);\n \t\t$data['regdate'] = $date[2].'/'.$date[1].'/'.$date[0];\n \t}\n }", "title": "" }, { "docid": "4bd0590d2d76c3d4f1a757ae9163731a", "score": "0.4869352", "text": "protected function transform(Collection $data): array\n {\n if ($this->group !== null) {\n return $data->groupBy($this->group)->map(function (Collection $rows, string $label) {\n return [\n 'text' => $label ?: __('None'),\n 'children' => $this->collapse($rows),\n ];\n })->values()->toArray();\n }\n\n return $this->collapse($data)->toArray();\n }", "title": "" }, { "docid": "f81436bbdd50c44ac56668e2a98fbb2e", "score": "0.48581597", "text": "function serialize($data, $options = array()) {\n\t\t$options += array('attributes' => false, 'format' => 'attributes');\n\t\t$data =& new Xml($data, $options);\n\t\treturn $data->toString($options + array('header' => false));\n\t}", "title": "" }, { "docid": "e32a85cebbb19bdae48439fbc1d518bc", "score": "0.4844272", "text": "public function yaml($payload, $container = 'data')\n {\n return $this->generate($payload, new YAML(), $container);\n }", "title": "" }, { "docid": "578eca55d3daafe68f87ba583d562e5a", "score": "0.48322177", "text": "public function saveConfig( $data )\n\t{\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "34fa42868892111bffb7c1ae50026ebc", "score": "0.48305547", "text": "public static function to_html ($data) {\n $result = new rgx();\n $result->data = [];\n array_walk($data, function ($v, $k, $res) use ($has_spec) {\n if (count($v) > 1) {\n $res->data[] = &$v;\n }\n if (!empty($v['nodes'])) {\n $res->data = array_merge($res->data, self::_to_simple($v['nodes'], $has_spec));\n unset($v['nodes']);\n }\n else {\n $v['last'] = true;\n }\n }, $result);\n return $result->data;\n }", "title": "" }, { "docid": "384dbaee753c66f2c2bc186f619d1731", "score": "0.48159018", "text": "public function render($data = null)\n\t{\n\t\t$output = PHP_EOL;\n\n\t\tif ($data === null) {\n\t\t\t$output = '';\n\t\t\t$data = $this->data;\n\t\t}\n\n\t\t// Cycle through children\n\t\tif (!empty($data)) {\n\t\t\tforeach ($data as $index => $entry) {\n\t\t\t\t$module = $this->getModule($entry['ref']);\n\t\t\t\tif ($module && isset($entry['content'])) {\n\n\t\t\t\t\t$content = '';\n\n\t\t\t\t\t// Container\n\t\t\t\t\tif (is_array($entry['content']) && $module->type == 'container') {\n\t\t\t\t\t\t$content = $this->render($entry['content']);\n\n\t\t\t\t\t// Content\n\t\t\t\t\t} elseif ($module->type == 'content') {\n\t\t\t\t\t\t$content = stripslashes($entry['content']);\n\t\t\t\t\t\tswitch ($module->mode) {\n\t\t\t\t\t\t\tcase 'markdown':\n\t\t\t\t\t\t\t\t$pd = new Parsedown();\n\t\t\t\t\t\t\t\t$content = $pd->text($content);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'code':\n\t\t\t\t\t\t\t\t$content = trim($content);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$content = nl2br(htmlentities($content));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= $module->before . $content . $module->after . PHP_EOL;\n\n\t\t\t\t} elseif ($module->type == 'static') {\n\t\t\t\t\t$output .= $module->before . $module->after . PHP_EOL;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "7461a8a83db7ef1f90f6a961aa38b980", "score": "0.48096293", "text": "public function transform($data)\n {\n return $data;\n }", "title": "" }, { "docid": "a148190d32427e7b4648e453d37e13c4", "score": "0.48084688", "text": "protected function unserialize($data) {\n return unserialize($data);\n }", "title": "" }, { "docid": "baf384392b2f737a3fb7226d4cf5ad36", "score": "0.4792235", "text": "public function dataPreparation($data){\n\n // Add \"colon\" (:) in the before the name of each key in the array.\n foreach ($data as $key => $item){\n $data[':'.$key] = $data[$key];\n unset($data[$key]);\n }\n return $data;\n }", "title": "" }, { "docid": "5270ae2b9847bd28b2ba32397b7a7095", "score": "0.47919604", "text": "public function render()\n {\n // Get keys only from the default language.\n $data = array_filter(array_keys($this->data), function ($name) {\n return (bool) preg_match('/^[a-zA-z_]*$/', $name);\n });\n\n $tags = $this->renderMetatags($data);\n\n // Allow hooks to modify any data before transforming to the final output.\n $tags = $this->seoMaestro->renderMetatags($tags, $this->group);\n\n return count($tags) ? implode(\"\\n\", $tags) : '';\n }", "title": "" }, { "docid": "9326b193cb601c9b49facae02b684d21", "score": "0.4789319", "text": "public function preProcessData( $data )\n\t\t{\n\t\t\treturn thb_text_toDB( $data );\n\t\t}", "title": "" }, { "docid": "8bcb4c63de9735d403f3dca661ad3412", "score": "0.47887692", "text": "protected function contents($data = [])\n {\n $contents = '';\n\n foreach ($this->groups as $group => $options) {\n $contents .= $this->group($group)->getTabsData('view', $data);\n }\n\n return new HtmlString($contents);\n }", "title": "" }, { "docid": "ac7035154ed018a8002788afb216ad11", "score": "0.47796273", "text": "function array_to_xml( $data, &$xml_data ) {\n foreach( $data as $key => $value ) {\n if( is_numeric($key) ){\n $key = 'data';\n }\n if( is_array($value) ) {\n $subnode = $xml_data->addChild($key);\n array_to_xml($value, $subnode);\n } else {\n $xml_data->addChild(\"$key\",htmlspecialchars(\"$value\"));\n }\n }\n}", "title": "" }, { "docid": "e581ef342795756a06b2ef05f9b29a0c", "score": "0.4772803", "text": "protected function arrToXml( $data, &$xmlData )\n\t{\n\t\tforeach( $data as $key => $value )\n\t\t{\n\t\t\tif( is_numeric($key) )\n\t\t\t\t$key = 'Key' . $key;\n\n\t\t\tif( is_array($value) )\n\t\t\t{\n\t\t\t\t$subnode = $xmlData->addChild($key);\n\t\t\t\tself::arrToXml($value, $subnode);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$xmlData->addChild(\"$key\",htmlspecialchars(\"$value\"));\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "8b9fa098caebcce2d77848ef5291549b", "score": "0.47590506", "text": "protected function getBody($data)\n {\n unset($data[self::EMAIL_KEY]);\n unset($data[self::RECEIVE_COPY_KEY]);\n\n $body = '';\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n $value = implode(', ', array_filter($value, function ($i) {\n return $i !== '';\n }));\n }\n\n $body .= ucfirst($key).': '.$value.\"\\n\\n\";\n }\n\n return $body;\n }", "title": "" }, { "docid": "8435d08fe1067de6b3cc8104659f2c2c", "score": "0.47576678", "text": "static function toHtml($data)\n\t{\n header(\"Content-Type:text/html\");\n\n ob_start();\n ?>\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n <title>Array in HTML</title>\n </head>\n <body>\n <h1>Array contains:</h1>\n <?php\n foreach ($data as $key => $value)\n {\n if ( is_array($value) )\n {\n $arr = $value;\n $value = 'Array:<br>';\n foreach ($arr as $k => $v)\n {\n if (is_array($v))\n {\n $value .= '<br>[' .$k. '] => Array:<br><br>';\n $value .= self::arrToHtml($v);\n }\n else\n $value .= '[' .$k. '] => ' .$v. '<br>';\n }\n }\n ?>\n <p>['<?=$key?>'] => <?=$value?></p>\n <?php\n }\n ?>\n </body>\n </html>\n <?php\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "002f5f78e1bb719ab06f8c526627baa9", "score": "0.47556657", "text": "private function formatArrayData($data)\n {\n $defaults = [\n 'to_name' => null,\n 'to_email' => null,\n 'from_name' => null,\n 'from_email' => 'no-reply@maxliving.com',\n 'cc_records' => array(),\n 'bcc_records' => array(),\n 'reply_to' => null,\n 'email_subject' => 'Max Living Contact Form',\n 'form_name' => null,\n 'content_type' => 'text/html',\n 'content' => '<span></span>',\n 'template_id' => null,\n 'substitutions' => [],\n 'vanity_website_id' => null,\n 'affiliate_id' => null\n ];\n\n $formattedArray = array_replace_recursive(\n $defaults,\n array_intersect_key($data, $defaults)\n );\n\n return (array) $formattedArray;\n }", "title": "" }, { "docid": "f1714f86f2548dbbf71cce02321211c0", "score": "0.47460872", "text": "public function transform(array &$data)\n {\n // Adjust the response format data label\n $named = request()->route()->getName();\n switch ($named) {\n /* Admin */\n /* data list */\n case 'games.lottery.admin.setting.game.list':\n // 不顯示的欄位\n $data['data'] = collect($data['data'])->map(function ($info) {\n return collect($info)->forget([\n 'general_data_json',\n 'general_digits',\n 'general_repeat',\n 'special_data_json',\n 'special_digits',\n 'special_repeat',\n 'reservation',\n 'created_at',\n 'updated_at',\n ])->all();\n })->all();\n break;\n /* data */\n case 'games.lottery.admin.setting.game.create':\n case 'games.lottery.admin.setting.game.show':\n // 不顯示的欄位\n $data = collect($data['data'])->forget([\n 'general_data_json',\n 'general_digits',\n 'general_repeat',\n 'special_data_json',\n 'special_digits',\n 'special_repeat',\n 'reservation',\n 'created_at',\n 'updated_at',\n ])->all();\n break;\n /* User */\n case 'games.lottery.query.game.list':\n // 不顯示的欄位\n $data['data'] = collect($data['data'])->map(function ($info) {\n return collect($info)->forget([\n 'general_data_json',\n 'general_digits',\n 'general_repeat',\n 'special_data_json',\n 'special_digits',\n 'special_repeat',\n 'reservation',\n 'win_rate',\n 'created_at',\n 'updated_at',\n ])->all();\n })->all();\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "4691cc338e4d861f299aa379ed09339f", "score": "0.47446772", "text": "private function formatDataNoticia(array $data)\n {\n unset($data['_token']);\n unset($data['action']);\n unset($data['ds_imagem']);\n unset($data['ds_giz']);\n\n foreach ($data as $key => $value) {\n for ($i = 0; $i < count($value); $i++) {\n $noticias[$i]['ds_categoria'] = isset($data['ds_categoria'][$i]) ? $data['ds_categoria'][$i] : '';\n $noticias[$i]['ds_titulo'] = isset($data['ds_titulo'][$i]) ? $data['ds_titulo'][$i] : '';\n $noticias[$i]['ds_link'] = isset($data['ds_link'][$i]) ? $data['ds_link'][$i] : '';\n $noticias[$i]['ds_texto_noticia'] = isset($data['ds_texto_noticia'][$i]) ? $data['ds_texto_noticia'][$i] : '';\n }\n }\n\n return $noticias;\n }", "title": "" }, { "docid": "b8a6553ccbf1f5cfddec2f8193588161", "score": "0.47361127", "text": "public function convertToString($data) {\n\t\tif (!is_string($data)) {\n\t\t\t$data = @json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);\n\t\t\t// Removing null byte and double slashes from object properties\n\t\t\t$data = str_replace(['\\\\u0000', '\\\\\\\\'], [\"\", \"\\\\\"], $data);\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "7059fa7d7fd2c2e3f825452ba966e289", "score": "0.47321278", "text": "public static function loopEncode($data, array $parent = array())\n {\n $resultString = '';\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n //subsection case\n //merge all the sections into one array...\n $sec = array_merge((array) $parent, (array) $key);\n //add section information to the output\n $resultString .= PHP_EOL . '[' . join('.', $sec) . ']' . PHP_EOL;\n //recursively traverse deeper\n $resultString .= self::loopEncode($value, $sec);\n } else {\n $resultString .= \"$key = $value\" . PHP_EOL;\n }\n }\n\n return $resultString;\n }", "title": "" }, { "docid": "de4aa673de4d109a40bba082c3f7c049", "score": "0.47288603", "text": "function toUtf8($data)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (is_array($data))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach ($data as $k => $v)\n\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\t\t\t$data[$k]=toUtf8($v);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn $data;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn utf8_encode($data);\n\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\t\n\t\t\t\t\t\t}", "title": "" }, { "docid": "b635f0184f3568dbafc681ee01da49b8", "score": "0.4720631", "text": "public function output($data) {\n\t\treturn implode(' ', $data);\n\t}", "title": "" }, { "docid": "e68b4a3c3f35f0a9cdf85df9f8e46391", "score": "0.47133362", "text": "protected function array_to_xml($data, &$xml_data) {\n foreach( $data as $key => $value ) {\n if( is_numeric($key) ){\n $key = 'item'.$key; //dealing with <0/>..<n/> issues\n }\n if( is_array($value) ) {\n $subnode = $xml_data->addChild($key);\n $this->array_to_xml($value, $subnode);\n } else {\n $xml_data->addChild(\"$key\",htmlspecialchars(\"$value\"));\n }\n }\n }", "title": "" }, { "docid": "f421e443e35098391d4be8fc8723cefe", "score": "0.47131947", "text": "static function dateTimeToString ($data) {\n if ($data != '') {\n $data = explode(\" \", $data);\n return $data[1].\" \".Util::dateToString($data[0]);\n }\n else {\n return '';\n }\n }", "title": "" }, { "docid": "c4933a95442b67e6a5ae1cd226623055", "score": "0.47083473", "text": "public function data($data){\n\t\techo 'data: '.str_replace(\"\\n\",\"\\ndata: \",$data).\"\\n\";\n\t}", "title": "" }, { "docid": "3fd2942758e18f09311cf27d214553a2", "score": "0.4690766", "text": "public function formatData()\n {\n $content = '<?php' . \"\\n\\n\"\n .'return array(' .\"\\n\";\n\n sort($this->items);\n foreach ($this->items as $c) {\n $content .= \" '{$c}',\\n\";\n }\n\n $content .= ');' .\"\\n\";\n\n return $content;\n }", "title": "" }, { "docid": "43fd86538831d927fdc7f5bbe0546a7e", "score": "0.4687244", "text": "function arr_to_str($data)\n{\n\tforeach ($data as $key => $val) {\n\t\t$ret .= \"$key : $val <br>\";\n\t}\n\treturn $ret;\n}", "title": "" }, { "docid": "d8f5bb5afcb4a7e854788dddfb114b20", "score": "0.4685387", "text": "private function get_children($data){\n\t\n\t\t$store = '';\n\t\tforeach($data as $value){\n\t\t\tif(!empty($value['children'])){\n\t\t\t\t$store .= $value['id'].',';\n\t\t\t\t$store .= $this->get_children($value['children']);\n\t\t\t\t$this->store_children[$value['id']] = $this->get_children($value['children']);\n\t\t\t}else{\n\t\t\t\t$store = $value['id'];\n\t\t\t}\n\t\t}\n\t\treturn $store;\n\t}", "title": "" }, { "docid": "a0bf49bb20931277023386f6eb10ef8e", "score": "0.46832466", "text": "public static function maybe_serialize( $data ) {\n if ( is_array( $data ) || is_object( $data ) )\n return serialize( $data );\n\n return $data;\n }", "title": "" }, { "docid": "806d3d7bee35ff396c65d0efff64e848", "score": "0.46756572", "text": "protected function formatJson($data) {\n return str_replace(\"\\u0000*\\u0000_\", \"\", Mage::helper('core')->jsonEncode((array) $data));\n }", "title": "" }, { "docid": "cda243bd51a53da2335dd2f78bb559cf", "score": "0.46742833", "text": "protected function loadData()\n {\n return Yaml::parse(\n file_get_contents(\n realpath(__DIR__ . '/../fixtures/bible_versions.yaml')\n )\n );\n }", "title": "" }, { "docid": "76635f3d58c95dd45375fc19db9adeb1", "score": "0.46666953", "text": "function vd($data)\n {\n \\Stem\\Utilities\\Debug\\VarDumper::dump($data);\n }", "title": "" }, { "docid": "af8103fef658be081ee92df066436498", "score": "0.46666533", "text": "public function toJson($data):string\n {\n\n $encoders = [new JsonEncoder()];\n $normalizers = [new DateTimeNormalizer(), new ObjectNormalizer()];\n $serializer = new SerializerComponent($normalizers, $encoders);\n\n return $serializer->serialize($data, self::JSON_FORMAT);\n }", "title": "" }, { "docid": "691bfad3115a8e11384c5103b842c881", "score": "0.46535143", "text": "protected function _encode($data) {\n return XML::build($data);\n }", "title": "" }, { "docid": "7069bd71bad7fac3a10e02026982271e", "score": "0.4651187", "text": "public static function serialize($data, array $options = []): string\n {\n $result = '';\n foreach ($data as $row) {\n if (empty($row)) {\n $result .= \"{}\\n\";\n continue;\n }\n $result .= JsonSerializer::serialize($row, $options) . \"\\n\";\n }\n return $result;\n }", "title": "" } ]
dfc2e5d917a632b49dab1050309b9cfb
Wszystkie nazwy drugich kategorii
[ { "docid": "b89775f203482ed45c01ca665208f337", "score": "0.0", "text": "function category2_next_name() {\n \t$category=current($this->category2);\n \treturn $category['name'];\n }", "title": "" } ]
[ { "docid": "9b2582d956d6bc1eca9f2ed51fb3e1f4", "score": "0.7194309", "text": "public function categories();", "title": "" }, { "docid": "33a56e593ce369bed6218d09951a750d", "score": "0.70981413", "text": "public function category()\n {\n echo \"<h1>PAGE CATEGORIE DU CONTROLEUR</h1>\";\n }", "title": "" }, { "docid": "4915dda2bf94468f24a6cf4db2d853a1", "score": "0.676271", "text": "public function category();", "title": "" }, { "docid": "5060e02b239e6443048c106b66752cf2", "score": "0.66613513", "text": "public function kategoriler(){\n\t\t$sonuc = $this->dtbs->listele('kategoriler');\n\t\t$data['bilgi'] = $sonuc;\n\t\t$this->load->view('back/kategoriler/anasayfa',$data);\n\t}", "title": "" }, { "docid": "99be7d2ac5a7eaa66ee599602207529f", "score": "0.6660548", "text": "function categoria(){\n $this->_viewOutPut('categoriaCrud');\n }", "title": "" }, { "docid": "9446fcd52d8db9f696ab2e2384655c52", "score": "0.66261697", "text": "public function getObjCategoria()\n {\n return $this->objCategoria;\n }", "title": "" }, { "docid": "189f3cf70d65e067ddc22029c2f603e7", "score": "0.6619787", "text": "public function getKategoriePole() {\n\n $kategorie = $this->getKategorie();\n\n $kat = array();\n\n foreach ($kategorie as $k) {\n $kat[$k['id_kategorie']] = $k['nazev'];\n }\n\n return $kat;\n }", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.65847987", "text": "public function getCategories();", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.65847987", "text": "public function getCategories();", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.65847987", "text": "public function getCategories();", "title": "" }, { "docid": "aa2181471ef173046bfbb0545a3159db", "score": "0.6572831", "text": "function categoriaAction()\n {\n $categoria = new Application_Model_DbTable_Categoria();\n $this->view->categoria = $categoria->fetchAll();\n }", "title": "" }, { "docid": "11ec1691ff4d7195be6b092183c13a61", "score": "0.6550485", "text": "protected function getAllKategorien()\n {\n /*\n * 0 => ohne\n * 1 => \"Schöne Literatur\",\n * 2 => \"Philosophie und Theologie\",\n * 3 => \"Mathematik und Naturwissenschaften\",\n * 4 => \"Künste und Handwerke\",\n * 5 => \"Bereits übernommene Patenschaften\"\n * 6 => \"Geschichte\",\n * 7 => \"Geographie und Reisebeschreibungen\",\n * 8 => \"Naturwissenschaften und Medizin\"\n */\n $kategorien = [];\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n 'uid, catname ',\n $this->kattabelle,\n ' deleted=0 AND hidden=0',\n '',\n 'uid ASC',\n ''\n );\n while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n $kategorien[] = $row;\n }\n return $kategorien;\n }", "title": "" }, { "docid": "7e227562a467bd8275268e2f123d6ad0", "score": "0.65496707", "text": "public function display_list_Categorie()\n {\n //Enregistrement du résultat dans la variable $rslt\n $rslt = $this->db_model->getCategorie();\n //Si il y a au moins une ligne\n if ($rslt->num_rows > 0) {\n //Variable $i enregistre le numero de la ligne à afficher\n $i = 0;\n //La fonction fetch_assoc() permet de lire ligne par ligne le résultat de la requete sql\n while($row = $rslt->fetch_assoc())\n {\n $this->display_ligne_Categorie($i,$row[\"libelle\"],$row[\"description\"]);\n $i = $i + 1;\n }\n if ($i%3!=2)\n {\n echo '</div>';\n }\n }\n else\n {\n echo \"0 results\";\n }\n }", "title": "" }, { "docid": "794c2b8da60451cbed277a3a14f7c47f", "score": "0.6546414", "text": "public function afficheCategorie($Categories){\n\n }", "title": "" }, { "docid": "741ea1825835818f15fe8da090e7484a", "score": "0.6524783", "text": "public function categoriesList();", "title": "" }, { "docid": "523ebe09a54dafce347cc03e522b9cfc", "score": "0.64998204", "text": "public function getCategorie()\n {\n return $this->categorie;\n }", "title": "" }, { "docid": "523ebe09a54dafce347cc03e522b9cfc", "score": "0.64998204", "text": "public function getCategorie()\n {\n return $this->categorie;\n }", "title": "" }, { "docid": "fc90d95a731508005bb32e8eb6e18bc4", "score": "0.64930236", "text": "public function getCategorie()\n {\n return $this->categorie;\n }", "title": "" }, { "docid": "d738178efb78343a2b3756aeb42ff6bf", "score": "0.64839554", "text": "public function getCategoria()\n {\n return $this->categoria;\n }", "title": "" }, { "docid": "02727309356a6b8835c352dddfed4793", "score": "0.6450389", "text": "public function categorie($categorie)\n\t{\n\t\t// On recupere la valeur du parametre de la route [:id] dans le parametre de la methode\n\t\t//debug\n\t\t//echo \"Il faut afficher les détails de $id\";\n\t\t// il faut transmettre l'ID pour récuperer les infos\n\t\t$this->show('page/categorie-santons', [\"categorie\" => $categorie]);\n\t}", "title": "" }, { "docid": "8056a4fd1ec6adee07e90853d97c06f5", "score": "0.6432229", "text": "public function getCategory(){ return CategoryData::getById($this->CATEGORIA_ID);}", "title": "" }, { "docid": "0bb1916ce92419f164a41be152df56c1", "score": "0.6417068", "text": "public function getCategory()\n {\n }", "title": "" }, { "docid": "d22563b9dd66cd0230b04f1f0a3a28a8", "score": "0.6409426", "text": "public function fetchCategories();", "title": "" }, { "docid": "2f3ccf1bb6548325a06ec439d3146ed6", "score": "0.6405172", "text": "function createcat($nom) \n\t{\n\t\t/** @type JTableCategory $category */\n\t\t$category = JTable::getInstance('Category');\n\n\t\t// Check if the Uncategorised category exists before adding it\n\t\tif (!$category->load(array('extension' => 'com_gmapfp', 'title' => $nom)))\n\t\t{\n\t\t\t$category->extension = 'com_gmapfp';\n\t\t\t$category->title = $nom;\n\t\t\t$category->description = '';\n\t\t\t$category->published = 1;\n\t\t\t$category->access = 1;\n\t\t\t$category->params = '{\"category_layout\":\"\",\"image\":\"\"}';\n\t\t\t$category->metadata = '{\"author\":\"\",\"robots\":\"\"}';\n\t\t\t$category->metadesc = '';\n\t\t\t$category->metakey = '';\n\t\t\t$category->language = '*';\n\t\t\t$category->checked_out_time = JFactory::getDbo()->getNullDate();\n\t\t\t$category->version = 1;\n\t\t\t$category->hits = 0;\n\t\t\t$category->modified_user_id = 0;\n\t\t\t$category->checked_out = 0;\n\n\t\t\t// Set the location in the tree\n\t\t\t$category->setLocation(1, 'last-child');\n\n\t\t\t// Check to make sure our data is valid\n\t\t\tif (!$category->check())\n\t\t\t{\n\t\t\t\tJFactory::getApplication()->enqueueMessage(JText::sprintf('COM_GMAPFP_ERROR_INSTALL_CATEGORY', $category->getError()));\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Now store the category\n\t\t\tif (!$category->store(true))\n\t\t\t{\n\t\t\t\tJFactory::getApplication()->enqueueMessage(JText::sprintf('COM_GMAPFP_ERROR_INSTALL_CATEGORY', $category->getError()));\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Build the path for our category\n\t\t\t$category->rebuildPath($category->id);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "363add6306865ca627c46cb0f416ab65", "score": "0.64027876", "text": "public function getCategoria_id()\n {\n return $this->categoria_id;\n }", "title": "" }, { "docid": "b8bb02b7c118336c807599168fed31d7", "score": "0.6393887", "text": "public function categories()\n {\n\n $tpl['ALPHA_CLICK'] = $this->rolodex->alpha_click();\n $tpl['CATLIST'] = Categories::getCategoryList('rolodex');\n\n $this->rolodex->title = sprintf(dgettext('rolodex', '%s Categories'), PHPWS_Settings::get('rolodex', 'module_title'));\n $this->rolodex->content = PHPWS_Template::process($tpl, 'rolodex', 'categories.tpl');\n }", "title": "" }, { "docid": "049b9df1795eb151a61f7609c2a100ee", "score": "0.6376156", "text": "public function create()\n\t{\n\t\t//Zobraz formular na pridanie kategorie\n\t}", "title": "" }, { "docid": "75c064809fec38bcecffc1a2ce946d90", "score": "0.6369722", "text": "public function getCategoriesAction()\n {\n # Guardamos los datos dentro de la entidad del ORM Doctrine\n # NOTA: hasta la v3.0.0 usar getEntityManager() / v3.0.6 o superior usar getManager()\n $em = $this -> getDoctrine() -> getManager(); # Hacemos uso del Manejador de Entidades de Doctrine\n $categoryRepository = $em -> getRepository( 'BlogBundle:Category' ); # Accedemos al repositorio\n $categories = $categoryRepository -> findAll(); # Obtenemos todos los cursos\n\n # Listamos desde el controlador cada una de las entradas sin usar una vista\n foreach ( $categories as $category ) {\n echo $category -> getName() .'<blockquote>'; # Obtenemos el nombre de la categoria\n # NOTA: Las relaciones ManyToOne en la configuración de las entidades facilitan extraer estos valores.\n # Si no usaramos un ORM para poder extraer estos valores tendríamos que hacer otras consultas.\n\n # Obtenemos todas las entradas que tiene la entidad Categorias\n $entries = $category -> getEntries();\n # Listamos cada una de las tags obtenidas\n foreach ( $entries as $entry ) {\n echo $entry -> getTitle(). '<br/> ';\n }\n echo '</blockquote><hr />';\n }\n\n\n # Matamos la aplicación para que finalice su ejecución y permita ver los mensajes desde este controlador\n die();\n\n return $this->render('BlogBundle:Default:index.html.twig');\n }", "title": "" }, { "docid": "77c632258b0c7700a5bb3bbcb7ed864f", "score": "0.63513684", "text": "public function get_categories() {\n //return ['extencion-de-elementor-playful'];\n return ['extencion-de-elementor-playful'];\n }", "title": "" }, { "docid": "226f1564c65202900c0456a8b0202314", "score": "0.63440675", "text": "public function getListeCategorie()\n {\n $categories= [];\n $query = $this->db->query('SELECT id, libelle FROM categorie');\n\n while ($donnees = $query->fetch(PDO::FETCH_ASSOC))\n {\n $categories[] = new Categorie($donnees);\n }\n return $categories;\n }", "title": "" }, { "docid": "fe57d02dd06ddedbe925dc51ca779685", "score": "0.63285434", "text": "public function getCategoria_id()\n\t{\n\t\treturn $this->categoria_id;\n\t}", "title": "" }, { "docid": "7d99db804e20c93ea551820124bbe0d1", "score": "0.63215643", "text": "public function getCategorias()\r\n {\r\n return $this->categorias;\r\n }", "title": "" }, { "docid": "91ed1a2c68c6c16a4ccf9d83803616f1", "score": "0.6316017", "text": "public function countV_categorie(){\n\t\t\t\t\t return count($this->listeV_categorie());\n\t\t\t\t\t }", "title": "" }, { "docid": "13446f7a5dc2ac564f98b275a18c4d3c", "score": "0.63091975", "text": "public function getCategorie()\n\t{\n\t\treturn $this->_categorie;\n\t}", "title": "" }, { "docid": "2a7bea1cddae9ea483bd61c565dddae7", "score": "0.6306513", "text": "public function getNomeCategoria()\n {\n return $this->nomeCategoria;\n }", "title": "" }, { "docid": "216787809adb3cef5d0d04037eb48e10", "score": "0.63028395", "text": "public function getIdCategoria()\n {\n return $this->id_categoria;\n }", "title": "" }, { "docid": "d6952f70f5a6ccbcb26880b35abb1225", "score": "0.63006914", "text": "function last(){\n\t\t$limit = $GLOBALS['currentPage'] * 20 - 20;\n\t\t$rows = category_getCategories(false,true,$limit.',20');\n\t\t$rows = category_helper_parseCategoriesByLang($rows,$GLOBALS['LANGCODE']);\n\t\techo T,T,T,'<div class=\\'block\\'><h2>Últimas categorías</h2>',N,\n\t\tT,T,T,'<p>Este listado incluye algunas de las últimas categorías añadidas al gestor.</p>',N,\n\t\tT,T,T,'<table><thead><tr><td style=\\'width:1px;\\'></td><td style=\\'width:1px;\\'><span>id</span></td><td>Título de la categoría</td><td style=\\'width:100px;\\'></td><td style=\\'width:1px;\\'></td><td style=\\'width:1px;\\'></td></tr></thead><tbody>',N;\n\t\tforeach($rows as $row){\n\t\t\t$row['clientURL'] = $GLOBALS['baseURL'];\n\t\t\techo T,T,T,T,'<tr id=\\'row_',$row['id'],'\\'>',\n\t\t\t'<td><input type=\\'checkbox\\' class=\\'checkbox\\' value=\\'',$row['id'],'\\' onclick=\\'assis.helper_checkThis(this);\\' autocomplete=\"off\"/></td>',\n\t\t\t'<td><a href=\\'#\\'>',$row['id'],'</a></td><td><a href=\\'',common_replaceInTemplate($GLOBALS['blueCommerce']['categoryLink'],$row),'\\'>',$row['categoryTitle'],'</a></td>',\n\t\t\t'<td><a href=\\'',$GLOBALS['baseURL_ASSIS'],'products_manage/searchByCategory/',$row['categoryTitleFixed'],'\\'>ver productos</a></td>',N,\n\t\t\t'<td><a href=\\'',$GLOBALS['baseURL_currentASSIS'],'add/',$row['id'],'\\'>editar</a></td>',\n\t\t\t'<td><a href=\\'',$GLOBALS['baseURL_currentASSIS'],'remove/',$row['id'],'\\' onclick=\\'link.confirm(this,event);\\'>eliminar</a></td>',\n\t\t\t'</tr>',N;\n\t\t}\n\t\techo T,T,T,'</tbody></table>',N,\n\t\tT,T,T,'<div class=\\'tableOptions\\'>';\n\t\thelper_paintBaseCategoryOptions();\n\t\techo T,T,T,'</div>',N,\n\t\t'<ul class=\\'pager\\'><li><a href=\\'',$GLOBALS['baseURL_currentASSIS'],'last/page/',($GLOBALS['currentPage']-1),'/\\'>prev</a></li><li>',$GLOBALS['currentPage'],'</li><li><a href=\\'',$GLOBALS['baseURL_currentASSIS'],'last/page/',($GLOBALS['currentPage']+1),'/\\'>next</a></li></ul>',\n\t\tT,T,T,'</div>',N;\n\t}", "title": "" }, { "docid": "757d28da50527cb93f70889d8d363b73", "score": "0.6300466", "text": "public function getCategorias() {\n $this->data = array(\n \"sitio_id\" => ApiCommunication::$sitio_id\n );\n $this->uri = $this->global_config['URL_USER_CONTENT_OBTENER_CATEGORIAS'];\n return $this->callRestService();\n }", "title": "" }, { "docid": "0748daed56e8669ae67253406e509c8f", "score": "0.62937164", "text": "public function getCategoria()\n{\nreturn $this->categoria;\n}", "title": "" }, { "docid": "82cb015bbfc5d5411a301f46321be0c6", "score": "0.62909526", "text": "public function getcategoria(){\n\t\t\tparent::Conectar();\n\t\t\t$consulta = sprintf(\n\t\t\t\t\t\t\t\"select idcategoria, nombre_categoria from categoria;\"\n\t\t\t\t\t\t);\n\t\t\t$result = mysql_query($consulta);\n\t\t\t\n\t\t\twhile ($reg = mysql_fetch_assoc($result)) {\n\t\t\t\t$this->categoria[] = $reg;\n\t\t\t}\n\t\t\t\n\t\t\treturn $this->categoria;\n\t\t}", "title": "" }, { "docid": "271216a18c24935dd829318e4bfb6254", "score": "0.6282687", "text": "public static function showCategorias(){\n \n require_once 'models/categoria.php';\n $categoria = new Categoria();\n $categorias = $categoria->getAll();\n \n return $categorias;\n }", "title": "" }, { "docid": "03f998865286f72666b95e1e99065467", "score": "0.6280689", "text": "public static function MostraCategoria(){\n\t\t\t$sql = \"select * from categoria_aluno\";\n\t\t}", "title": "" }, { "docid": "dece67b624871756b251ae301c9137f6", "score": "0.62666273", "text": "public function getId_categorie()\n {\n return $this->id_categorie;\n }", "title": "" }, { "docid": "f6264cb2cfd62d0c9c1eed1e1b2de640", "score": "0.6261575", "text": "public function menuCategorieAction()\n {\n $list = $this->getDoctrine()\n ->getManager()\n ->getRepository('SiteFrontBundle:Category')\n ->findAll();\n \n return $this->render('SiteFrontBundle:Front:list_categories.html.twig', \n array(\n 'list_categories' => $list\n )\n );\n }", "title": "" }, { "docid": "d8aedb8016fa6569b10c4fba02e47943", "score": "0.6250801", "text": "public static function label()\n {\n return 'Kategorijas';\n }", "title": "" }, { "docid": "fb9b8cc3eb3c48fb265a512214ab3a77", "score": "0.62503904", "text": "public function getAfitipocategoria() {\n return $this->afitipocategoria;\n }", "title": "" }, { "docid": "9be4ccc06694d25eab06563d04b0cab2", "score": "0.6239831", "text": "static public function mostrarCategorias(){\n $categorias = CategoriasMdl::mostrarCategorias($_SESSION[\"userKey\"],\"categorias\");\n $cont = 1;\n foreach ($categorias as $key => $categoria) {\n echo '<tr>\n <th scope=\"row\">'.$cont.'</th>\n <td>'.$categoria[\"nom_categoria\"].'</td>\n <td>'.$categoria[\"descripcion_categoria\"].'</td>\n <td>'.$categoria[\"fecha_categoria\"].'</td>\n <td>'.$categoria[\"tipo_categoria\"].'</td>\n <td>\n <div class=\"btn-group\" role=\"group\">\n <button type=\"button\" class=\"btn btn-secondary btnEditarCategoria\" kyCategoria=\"'.ControlGastosAppCtrl::openCypher(\"encrypt\",$categoria[\"id_categoria\"]).'\">Editar</button>\n <button type=\"button\" class=\"btn btn-secondary btnEliminarCategoria\" keyCategoria=\"'.ControlGastosAppCtrl::openCypher(\"encrypt\",$categoria[\"id_categoria\"]).'\">Eliminar</button>\n </div>\n </td>\n </tr>';\n $cont++;\n }\n }", "title": "" }, { "docid": "e1592cfe7137fb2249aee3016cd65471", "score": "0.6221496", "text": "public function showCategory()\n\t{\n\t\techo \"男性用户偏好的分类!\\n\";\n\t}", "title": "" }, { "docid": "dbf53ca4b5029b98ab3039824186302d", "score": "0.62001973", "text": "function _ver_pregunta_categoria($id_pregunta_categoria){\n $this->load->model('pregunta_model');\n $data['pregunta_categoria'] = $this->pregunta_model->dar_pregunta_categoria($id_pregunta_categoria);\n return $data;\n }", "title": "" }, { "docid": "78c8dc6b0fb5a3cd8ba803b77e237ac9", "score": "0.61978364", "text": "function getCategoryList(){\n }", "title": "" }, { "docid": "63580a52f9cc03966cafa78751d2d8bc", "score": "0.6183575", "text": "public function createListOfCategory(){\r\n\r\n\t}", "title": "" }, { "docid": "08e3a9da3ce98edaa3770452c12b8c12", "score": "0.61816764", "text": "function getCategory() {\r\n $Model = new Model();\r\n return $Model->query(\"select * from wp_terms where wp_terms.slug <> 'uncategorized'\");\r\n }", "title": "" }, { "docid": "7d7f6fc1cb941334d231e502e5f7b84c", "score": "0.61520916", "text": "function set_categorie($categorie){\r\n if($categorie == \"vin\" || $categorie == \"eau\" || $categorie == \"jus\"){\r\n $this->categorie = $categorie;\r\n }else{\r\n $this->erreur(\"cela doit être soit : vin, eau ou jus. Or c'est : \".$categorie.\"<br>\");\r\n }\r\n }", "title": "" }, { "docid": "b9abca39f7ab0b0b253dcbab21338841", "score": "0.6149474", "text": "public function getAllCategories();", "title": "" }, { "docid": "0632c9bb37fcb9bfa6247e3d296d217e", "score": "0.6141084", "text": "public function formcategoriaAction()\r\n {\r\n }", "title": "" }, { "docid": "1cc357b09ae2e0ccad0bc5885e975293", "score": "0.61382914", "text": "public function __construct() {\n// foreach (Category::all() as $categoria) {\n// $this->categories[$categoria->id] = $categoria->nom;\n// }\n }", "title": "" }, { "docid": "e798b64abf4323d7479b745fe6a30089", "score": "0.6133182", "text": "public function getCategoriasAction() {\r\n $this->_helper->layout->disableLayout();\r\n $ModelCategorias = new Admin_Model_Categorias();\r\n\r\n $consulta = $ModelCategorias->GetAll();\r\n\r\n if ($consulta) {\r\n $resposta = $consulta;\r\n $resposta['total'] = count($consulta);\r\n //$resposta['result'] = 'ok';\r\n } else {\r\n $resposta['result'] = 'failed';\r\n }\r\n\r\n $this->_helper->json($resposta);\r\n }", "title": "" }, { "docid": "f0d33a60d1904cc061fbb4fd8fd03234", "score": "0.6131073", "text": "public function recorrecategorias()\n {\n return;\n }", "title": "" }, { "docid": "93fed49c6ece65fd9667bcc19c885738", "score": "0.6126116", "text": "function constructionCategorieEnfant($categorieEnfant){\n\techo '<ul>';\n\techo '<li><a href=\"catalogue_page.php?idCategorie='.$categorieEnfant->getCategorieId().'&nomCategorie='.$categorieEnfant->getCategorieNom().'\">'.$categorieEnfant->getCategorieNom().'</a></li>';\n\techo '</ul>';\n}", "title": "" }, { "docid": "31db2bef00a326012d47a8f162c68e12", "score": "0.61254483", "text": "public function getKategorie() {\n return $this->db->table('kategorie_oleju');\n }", "title": "" }, { "docid": "9067af5898243021f285dbb4a357074a", "score": "0.6123628", "text": "public function getIdCategoria()\n {\n return $this->id_categoria;\n }", "title": "" }, { "docid": "db0d4f6565f2e4f75b8319b7e1b7c2ab", "score": "0.6118842", "text": "function filtraCat(){\n\t\tif (! isset ( $_SESSION )) {\n\t\t\tsession_start ();\n\t\t}\n\t\t$id_sede=$_SESSION['id_sede'];\n\t\t$bd=new bd();\t\t\n\t\t$clasificado=new clasificados($_POST[\"id\"]);\n\t\t$palabra=$_POST[\"palabra\"]!=\"\"?\" and titulo like '%{$_POST[\"palabra\"]}%'\":\"\";\n\t\tif($_POST[\"estado\"]!=\"\"){\n\t\t\t$strEstado=\" and usuarios_id in (select id from usuarios where estados_id={$_POST[\"estado\"]})\";\n\t\t}else{\n\t\t\t$strEstado=\"\";\n\t\t}\n\t\tif($_POST[\"condicion\"]!=\"\"){\n\t\t\t$strCondicion=\" and condiciones_publicaciones_id={$_POST[\"condicion\"]}\";\n\t\t}else{\n\t\t\t$strCondicion=\"\";\n\t\t}\n\t\t$ruta=$clasificado->getAdressWithLinks($_POST[\"palabra\"]);\n\t\t/*?>\n\t\t<div class=\"col-xs-12 col-sm-12 col-md-2 col-lg-2 resultados\" > <!-- ocultar cuando no hay resultados -->\n\t\t\t<div class=\"marL5 marT5 marB5 contenedor\">\n\t\t\t\t<div class=\"marL10\">\n\t\t\t\t\t<div id=\"izquierda\">\n\t\t<?php\t\t*/\n\t\t/********************INICIO DE LA BUSQUEDA DE CATEGORIAS********************/\n\t\t$hijos=$clasificado->buscarHijos();\n\t\t \n\t\t if(!$hijos){\n\t\t \t$hijos[0]['id']=$clasificado->getID();\n\t\t\t$hijos[0]['nombre']=$clasificado->getNombre();\n\t\t }\n\t\t \n\t\t ob_start();\n\t\t \n\t\tif($hijos):\n\t\t\t\n\t\t\t\n\t\t\t?>\t\t\t\n\t\t\t \n\t\t\t\t<h5 class=\"negro\"><b>Categoria</b></h5>\n\t\t\t\t<hr class=\"marR5\">\n\t\t\t\t<ul class=\"nav marR5 t11 marT10 marB20 \">\n\t\t\t\t\t<?php\n\t\t\t\t\tforeach($hijos as $h=>$valor):\n\t\t\t\t\t\t$criterio=\"I\" . $valor[\"id\"] . \"F\";\n\t\t\t\t\t\t$condicion =\" and usuarios_id in (select id from usuarios where id_sede=$id_sede) \";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$consulta=\"select count(id) as totaC from publicaciones where id in\n\t\t\t\t\t\t(select publicaciones_id from publicacionesxstatus where status_publicaciones_id=1 and fecha_fin is null) $strEstado $strCondicion\n\t\t\t\t\t\tand clasificados_id in (select id from clasificados where ruta like '%$criterio%') $condicion $palabra\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$result=$bd->query($consulta);\n\t\t\t\t\t\t$row=$result->fetch();\n\t\t\t\t\t\tif($row[\"totaC\"]>0):\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<li class='marB10 t11'><div class='h-gris'><span ><a class='blue-vin filtrocat' href='#' data-id=\"<?php echo $valor[\"id\"];?>\" data-cantidad=\"<?php echo $row[\"totaC\"];?>\" ><?php echo ($valor[\"nombre\"]) .\" ({$row[\"totaC\"]})\";?></a></span></div></li> \n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\t \n\t\t\t\t\tendforeach;\n\t\t\t\t\t?>\n\t\t\t\t</ul>\t\t\t\n\t\t\t \n\t\t\t<?php\n\t\tendif;\n\t\t\n\t\t$categorias = ob_get_clean();\n \tob_end_clean();\n\t\t \n\t\techo (json_encode ( array('categoria'=> $categorias,'paginacion'=> paginator($_POST['cantidad']), 'ruta'=>$ruta) ));\n\t\t\n\t\t/******************FIN DE LA BUSQUEDA DE CATEGORIAS********************/\n\t\t/******************INICIO DE LA BUSQUEDA DE UBICACION******************/\n\t\t/*if($_POST[\"estado\"]!=\"\"){\n\t\t\tif($_POST[\"estado\"]<100){\n\t\t\t\t$estados=$bd->doFullSelect(\"estados\",\"id={$_POST[\"estado\"]}\");\n\t\t\t\t$ruta.=\" En {$estados[0][\"nombre\"]}\";\n\t\t\t}else{\n\t\t\t\t$estados=$bd->doFullSelect(\"estados\");\n\t\t\t}\n\t\t}else{\n\t\t\t$estados=$bd->doFullSelect(\"estados\");\n\t\t}\n\t\t$estado=$_POST[\"estado\"]!=\"\"?\"data-estado={$_POST[\"estado\"]}\":\"\";\n\t\t?>\n\t\t\t<div id=\"ubicacion\" <?php echo $estado;?>\n\t\t\t\t<h5 class=\"negro\" ><b>Ubicaci&oacute;n</b></h5>\t\t\t\t\t\t\t\n\t\t\t\t\t<hr class=\"marR5\">\n\t\t\t\t\t\t<ul class=\"nav marR5 t11 marT10 marB20 \">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tforeach($estados as $e=>$valor):\n\t\t\t\t\t\t\t\t$criterio=\"I\" . $_POST[\"id\"] . \"F\";\n\t\t\t\t\t\t\t\t$condicion=\" and clasificados_id in (select id from clasificados where ruta like '%$criterio%') and \";\n\t\t\t\t\t\t\t\t$condicion.=\"id in (select publicaciones_id from publicacionesxstatus where status_publicaciones_id=1 and fecha_fin is null) $palabra $strCondicion\";\t\t\t\t\t\n\t\t\t\t\t\t\t\t$consulta=\"select count(id) as totaP from publicaciones where usuarios_id in (select id from usuarios where estados_id={$valor[\"id\"]}) $condicion\";\n\t\t\t\t\t\t\t\t$result=$bd->query($consulta);\n\t\t\t\t\t\t\t\t$row=$result->fetch();\n\t\t\t\t\t\t\t\tif($row[\"totaP\"]>0):\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<li class='marB10 t11'><div class='h-gris'><span ><a class='blue-vin filtroest' href='#' data-id=\"<?php echo $valor[\"id\"];?>\"><?php echo ($valor[\"nombre\"]) . \" ({$row[\"totaP\"]})\";?></a></span></div></li>\n<!--\t\t\t\t\t\t\t\t<li class='marB10 t11'><div class='h-gris'><span ><a class='blue-vin filtroest' href='#' data-id=\"<?php echo $valor[\"id\"];?>\"><?php echo ($valor[\"nombre\"]) . \" (0)\";?></a></span></li>-->\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</ul>\n\t\t\t</div>\n\t\t<?php*/\t\n\t\t/******************FIN DE LA BUSQUEDA DE UBICACION*********************/\n\t\t/******************INICIO DE LA BUSQUEDA DE CONDICION******************/\n\t\t/*\n\t\t$criterio=\"I\" . $_POST[\"id\"] . \"F\";\t\t\n\t\t$condicion=\" and clasificados_id in (select id from clasificados where ruta like '%$criterio%') and \";\n\t\t$condicion.=\"id in (select publicaciones_id from publicacionesxstatus where status_publicaciones_id=1 and fecha_fin is null) $palabra $strCondicion\";\n\t\t$condicion.=$strEstado;\n\t\t$consulta=\"select \n\t\t(select count(id) from publicaciones where condiciones_publicaciones_id=1 $condicion) as tota1,\n\t\t(select count(id) from publicaciones where condiciones_publicaciones_id=2 $condicion) as tota2,\n\t\t(select count(id) from publicaciones where condiciones_publicaciones_id=3 $condicion) as tota3\";\n\t\t$result=$bd->query($consulta);\n\t\t$condiciones=$result->fetch();\n\t\t$con=\"\";\t\t\n\t\tswitch($_POST[\"condicion\"]){\n\t\t\tcase 1:\n\t\t\t\t$con=\"data-condicion={$_POST[\"condicion\"]}\";\n\t\t\t\t$ruta .=\" <span class='f-condicion'>Nuevo</span>\";\t\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$con=\"data-condicion={$_POST[\"condicion\"]}\";\n\t\t\t\t$ruta .=\" <span class='f-condicion'>Usado</span>\";\t\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$con=\"data-condicion={$_POST[\"condicion\"]}\";\n\t\t\t\t$ruta .=\" <span class='f-condicion'>Servicio</span>\";\t\n\t\t\t\tbreak;\n\t\t}\n\t\t\t$total=$condiciones[\"tota1\"] + $condiciones[\"tota2\"] + $condiciones[\"tota3\"];\t\t\n\t\t?>\n\t\t\t<div id=\"condicion\" data-ruta=\"<?php echo ($ruta);?>\" <?php echo $con; ?> style=\"display:<?php if($total==0){ echo \"none\"; } else{ echo \"block\"; }?>\">\n\t\t\t\t<h5 class=\"negro\" ><b>Condici&oacute;n</b></h5>\n\t\t\t\t<hr class=\"marR5\">\n\t\t\t</div>\n\t\t\t<ul class=\"nav marR5 marT10 marB20 t11\">\n\t\t\t\t<?php\n\t\t\t\tif($condiciones[\"tota1\"]>0):\n\t\t\t\t\t?>\n\t\t\t\t<li class='marB10 t11'><div class='h-gris'><div style='padding:2px; '><a class='grisO filtrocon' href='#' data-id='1'>\n\t\t\t\t<span class='blue-vin'>Nuevo (<?php echo $condiciones[\"tota1\"];?>)</a></div></div></li>\n\t\t\t\t\t<?php\n\t\t\t\tendif;\t\t\t\n\t\t\t\tif($condiciones[\"tota2\"]>0):\n\t\t\t\t\t?>\t\t\t\n\t\t\t\t<li class='marB10 t11'><div class='h-gris'><div style='padding:2px; '><a class='grisO filtrocon' href='#' data-id='2'>\n\t\t\t\t<span class='blue-vin'>Usado (<?php echo $condiciones[\"tota2\"];?>)</a></div></div></li>\n\t\t\t\t<?php\n\t\t\t\tendif;\n\t\t\t\tif($condiciones[\"tota3\"]>0):\n\t\t\t\t?>\t\n\t\t\t\t<li class='marB10 t11'><div class='h-gris'><div style='padding:2px; '><a class='grisO filtrocon' href='#' data-id='3'>\n\t\t\t\t<span class='blue-vin'>Servicios (<?php echo $condiciones[\"tota3\"];?>)</a></div></div></li>\n\t\t\t\t<?php\n\t\t\t\tendif;\n\t\t\t\t ?>\n\t\t\t</ul> \n\t\t /******************FIN DE LA BUSQUEDA DE CONDICION (NUEVO, USADO, SERVICIO)********************/\n\t\t/* ?>\n\t\t\t</div> <!--Cierre de Izquierda-->\n\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php \n\t\t \n\t\t\t$condicion=substr($condicion,5,strlen($condicion));\n\t\t\t$consulta=\"select id from publicaciones where $condicion limit 25 OFFSET 0\";\n\t\t\t$result=$bd->query($consulta);\n\t\t\t//$total=$result->rowCount();\n\t\t\t$totalPaginas=ceil($total/25);\n\t\t?>\n\t\t<!-- Listado -->\n\t\t<div class=\"col-xs-12 col-sm-12 col-md-10 col-lg-10 resultados\" > <!-- ocultar si no hay resultados -->\n\t\t\t<div class=\"mar5 contenedor row\">\n\t\t\t\t<div class=\"col-xs-12 col-sm-12 col-md-10 col-lg-10 text-left vin-blue \">\n\t\t\t\t<!-- mostrar la busqueda o donde esta segun lo q selecciono y almaceno en la variable de busqueda 2 y contar seria la cantidad de resultados obtenidos segun la busqueda -->\n\t\t\t\t\t<div class=\"marL20 t14\"><p style=\"margin-top:15px;\"> \n\t\t\t\t\t\t<span id=\"inicio\" name=\"inicio\" class=\"grisC\"> 1</span> - <span id=\"final\" name=\"final\" class=\"grisC\"><?php if($total>=25){ echo \"25\"; }else{ echo $total;}?> de </span> <span class=\"grisC\">\n\t\t\t\t\t\t<?php echo $total;?></span> <span class=\"marR5 grisC\"> resultados</span>\n\t\t\t\t\t\t<a href=\"index.php\" style=\"color:#000\" class=\"marL5\">Inicio </a> \n\t\t\t\t\t\t<i class=\"fa fa-caret-right negro marR5 marL5\"></i>\n\t\t\t\t\t\t<span id=\"ruta\" name=\"ruta\">\n\t\t\t\t\t\t\t<?php echo ($ruta);?>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"col-xs-12 col-sm-12 col-md-2 col-lg-2 \">\n\t\t\t\t\t<div class=\" marR20\" style=\"margin-top:10px;\" id=\"orden\">\n\t\t\t\t\t\t<select id=\"filtro\" class=\"form-control input-sm \" style=\"width:auto;\" >\n\t\t\t\t\t\t\t<option value='id_desc' selected>Mas Recientes</option>\n\t\t\t\t\t\t\t<option value='id_asc'>Menos Recientes</option>\n\t\t\t\t\t\t\t<option value='monto_desc'>Mayor Precio</option>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<option value='monto_asc'>Menor Precio</option>\t\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"col-xs-12 col-sm-12 col-md-12 col-lg-12\">\n\t\t\t\t\t<hr class=\"marL10 marR10\">\n\t\t\t\t\t<br>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"ajaxContainer\" border=\"3\" > <!-- ESTE DIV SE UTILIZARA SI SE DECIDI APLICARLE AJAX, POR EL MOMENTO NO SE UTILIZA -->\n\t\t\t\t\t<!--Usuario-->\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$i=0;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tforeach($result as $p=>$valor):\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t$publi=new publicaciones($valor[\"id\"]);\n\t\t\t\t\t\t\t$usua=new usuario($publi->usuarios_id);\n\t\t\t\t\t\t\t$miTitulo=$publi->titulo;\n\t\t\t\t\t\t\tif($_POST[\"palabra\"]!=\"\"){\n\t\t\t\t\t\t\t\t$miTitulo=str_ireplace($_POST[\"palabra\"], \"<span style='background:#ccc'><b>\" . $_POST[\"palabra\"] . \"</b></span>\", $miTitulo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t <!--publicacion-->\n\t\t\t\t\t\t\t<div class=' col-xs-12 col-sm-6 col-md-2 col-lg-2'>\n\t\t\t\t\t\t \t<div class='marco-foto-conf point marL20 ' style='height:130px; width: 130px;' >\n\t\t\t\t\t\t \t\t<div style='position:absolute; left:40px; top:10px; ' class='f-condicion'><?php echo $publi->getCondicion();?> </div>\t\t\t \n\t\t\t\t\t\t\t \t\t<img src='<?php echo $publi->getFotoPrincipal();?>' class='img img-responsive center-block img-apdp imagen' style='width:100%;height:100%;'\n\t\t\t\t\t\t\t \t\tdata-id='<?php echo $publi->id;?>' data-tipo='P'>\t\t\t\t\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=' col-xs-12 col-sm-6 col-md-7 col-lg-7'><p class='t16 marL10 marT5'>\n\t\t\t\t\t\t\t \t<span class=' t15'><a class='negro' href='detalle.php?id=<?php echo $publi->id;?>' class='grisO'><b> <?php echo ($miTitulo);?></b></a></span>\n\t\t\t\t\t\t\t\t\t<br><span class=' vin-blue t14'><a href='perfil.php?id=<?php echo $usua->id;?>' class=''><b> <?php echo $usua->a_seudonimo;?></b></a></span>\n\t\t\t\t\t\t\t\t\t<br><span class='t14 grisO '><?php echo ($usua->getNombre());?></span><br>\n\t\t\t\t\t\t\t\t\t<span class='t12 grisO '><i class='glyphicon glyphicon-time t14 opacity'></i><?php echo $publi->getTiempoPublicacion();?></span><br>\n\t\t\t\t\t\t\t\t\t<span class='t11 grisO'> <span> <i class='fa fa-eye negro opacity'></i></span><span class='marL5'><?php echo $publi->getVisitas();?> Visitas</span><i class='fa fa-heart negro marL5 opacity'>\n\t\t\t\t\t\t\t\t\t</i><span class=' point h-under marL5'><?php echo $publi->getFavoritos();?> Me gusta</span><i class='fa fa-share-alt negro marL15 opacity hidden'></i> <span class=' point h-under marL5 hidden'> <?php echo $publi->getCompartidos(3);?> Veces compartido</span> </span></p>\n\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t <div class=' col-xs-12 col-sm-12 col-md-3 col-lg-3 text-right'>\n\t\t\t\t\t\t\t \t<div class='marR20'><span class='red t20'><b> <?php echo $publi->getMonto();?></b></span >\n\t\t\t\t\t\t\t\t\t\t<br><span class=' t12'> <?php echo $usua->getEstado();?> </span><br><span class='vin-blue t16'><a href='detalle.php?id=<?php echo $publi->id;?>' style='text-decoration:underline;'>Ver Mas</a></span >\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class='col-xs-12 col-sm-12 col-md-12 col-lg-2'><br></div><div class='col-xs-12 col-sm-12 col-md-12 col-lg-10'><hr class='marR10'><br></div>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"paginacion\" name=\"paginacion\" class='col-xs-12 col-sm-12 col-md-12 col-lg-12 ' data-paginaactual='1' data-total=\"<?php echo $total;?>\"><center><nav><ul class='pagination'>\n\t\t\t\t\t<li id=\"anterior2\" name=\"anterior2\" class=\"hidden\"><a href='#' aria-label='Previous' class='navegador' data-funcion='anterior2'><i class='fa fa-angle-double-left'></i> </a>\n\t\t\t\t\t<li id=\"anterior1\" name=\"anterior1\" class=\"hidden\"><a href='#' aria-label='Previous' class='navegador' data-funcion='anterior1'><i class='fa fa-angle-left'></i> </a>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$activo=\"active\";\n\t\t\t\t\t\t$oculto=\"\";\n\t\t\t\t\t\tfor($i=1;$i<=$totalPaginas;$i++):\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<li class=\"<?php echo $activo; echo $oculto;?>\"><a class=\"botonPagina\" href='#' data-pagina=\"<?php echo $i;?>\"><?php echo $i;?></a></li>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tif($i==10)\n\t\t\t\t\t\t\t$oculto=\" hidden\";\n\t\t\t\t\t\t\t$activo=\"\";\n\t\t\t\t\t\tendfor;\n\t\t\t\t\t?>\n\t\t\t\t\t<?php\n\t\t\t\t\t\tif($totalPaginas>1):\n\t\t\t\t\t\t?>\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<li id=\"siguiente1\" name=\"siguiente1\"><a href='#' class=\"navegador\" aria-label='Next' data-funcion='siguiente1'><i class='fa fa-angle-right'></i> </a>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tendif;\n\t\t\t\t\t?>\n\t\t\t\t\t<?php\n\t\t\t\t\t\tif($totalPaginas>10):\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<li id=\"siguiente2\" name=\"siguiente2\"><a href='#' class=\"navegador\" aria-label='Next' data-funcion='siguiente2'><i class='fa fa-angle-double-right'></i> </a>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\tendif;\n\t\t\t\t\t?>\n\t\t\t\t\t</li></ul>\n\t\t\t\t\t</nav></center></div>\n\t\t\t\t\t</div></div></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php */\n\t\t\t\t\t \n\t}", "title": "" }, { "docid": "5843562789afa616bd8f275bf37e24a3", "score": "0.6099597", "text": "function getCategoria(){\n \n $sentencia = $this->bbdd->prepare( \" SELECT * FROM categoria\");\n $sentencia->execute();\n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "e8b404bc4a8029283ada0913f9c91eea", "score": "0.609087", "text": "public function actionCategory($id=null) {\n $postersInCategoryCount = 0;\n if($id) {\n $model = Catalog::find()->where(['parent' => $id])->orderby(['name'=>SORT_ASC])->all();\n $category = Catalog::findOne(['id' => $id]);\n $postersInCategoryCount = CatalogPosters::find()->where(['catalog_id' => $id])->count();\n $this->view->title = 'Категория ' . $category->name . ' (' . count($model) . ', ' . $postersInCategoryCount . ')';\n } else {\n $model = Catalog::find()->orderby(['name'=>SORT_ASC])->all();\n $postersInCategoryCount = Posters::find()->count();\n $this->view->title = 'Все категории' . ' (' . count($model) . ', ' . $postersInCategoryCount . ')';\n }\n return $this->render('category',[\n 'model' => $model\n ]); \n }", "title": "" }, { "docid": "d80f4d09228680d42753dcb2454f2258", "score": "0.6084393", "text": "public function index(){\n $categories = DB::table('blog_category')\n ->select('*')\n ->where('is_deleted',0)\n ->paginate(10);\n foreach ($categories as $key => $value) {\n $categories[$key]->sub = 'Danh mục gốc';\n if($value->parent_id !=0){\n $sub = BlogCategory::find($value->parent_id);\n $categories[$key]->sub = $sub->title;\n }\n }\n return view('admin/blog-category/index', ['categories' => $categories]);\n }", "title": "" }, { "docid": "fc6b8507bf58686b2bb64fa1bbfdf69d", "score": "0.60830027", "text": "public function getCategoryUrl()\n {\n return \"/category/categories\" ;\n }", "title": "" }, { "docid": "3e0354cb5cea7470af3604065347f125", "score": "0.6082591", "text": "public function visualizarCategoria($nombreCategoria)\r\n {\r\n $resultado[]=null;\r\n require_once __DIR__ . '/../../core/conexionBd.php';\r\n $conexionBD = (new ConexionBd())->getConexion();\r\n try{\r\n /* Iniciar una transacción, desactivando 'autocommit' */\r\n $conexionBD->beginTransaction();\r\n $sql = \"SELECT Id FROM dbo.articulo WHERE nombre LIKE '$nombreCategoria'\r\n OR nombre LIKE '%$nombreCategoria' OR nombre LIKE '$nombreCategoria%';\";\r\n foreach ($conexionBD->query($sql) as $row) {\r\n $sqlCategoria = \"SELECT id,nombreCorto,nombre,descripcion,PVP, idFamilia,foto FROM dbo.articulo WHERE id LIKE '$row';\";\r\n foreach ($conexionBD->query($sqlCategoria) as $rowCategoria) {\r\n $resultado[] = $rowCategoria;\r\n }\r\n }\r\n /* Consignar los cambios */\r\n $conexionBD->commit();\r\n }catch(PDOException $e ){\r\n echo \"Error: \".$e;\r\n /* Reconocer el error y revertir los cambios */\r\n $conexionBD->rollBack();\r\n }finally {\r\n if($conexionBD !=null){\r\n $conexionBD !=null;\r\n }\r\n }\r\n\r\n\r\n return $resultado;\r\n }", "title": "" }, { "docid": "a7047cadb325d908b4937fc80dd8e3c6", "score": "0.6076935", "text": "public function home()\n {\n $categorieModel = new Categorie();\n $categories = $categorieModel->getCategories();\n print_r($categories);\n\n echo \"<h1>PAGE D'ACCUEIL DU CONTROLEUR</h1>\";\n }", "title": "" }, { "docid": "38ac3e65dc5707365194a03499e582fe", "score": "0.6073592", "text": "function Categoria($params = null)\n {\n if (isset($params[':nombreCategoria'])) {\n $nombre = $params[':nombreCategoria'];\n $categoria = $this->categoriaModel->getCategoriaByNombre($nombre);\n\n if ($categoria && isset($categoria->id)) {\n $paginaActual = (!empty($params) && isset($params[':pagina'])) ? $params[':pagina'] : 1;\n $productosPorPagina = 5;\n $cantidadProductosDB = $this->productoModel->countProductos($categoria->id);\n $cantidadPaginas = ceil($cantidadProductosDB / $productosPorPagina);\n $productoInicial = ($paginaActual - 1) * $productosPorPagina;\n\n $productos = $this->productoModel->getProductosByCategoria($nombre, $productoInicial, $productosPorPagina);\n $categorias = $this->categoriaModel->getCategorias();\n $isUserLogged = $this->helper->isLogged();\n $isAdmin = $this->helper->isAdmin();\n $url = 'categoria/' . $nombre . '/';\n $this->categoriaView->showCategoria($productos, $categorias, $categoria, $isUserLogged, $isAdmin, $cantidadPaginas, $paginaActual, $url);\n\n } else {\n $this->view->ShowLocation('home');\n }\n } else {\n $this->view->ShowLocation('home');\n }\n }", "title": "" }, { "docid": "165f3338df7336c8acd4aa681697a477", "score": "0.6067741", "text": "public function get_categories() {\n return [ 'super-cat' ];\n }", "title": "" }, { "docid": "d64d088b42e32b2478686506d4968e33", "score": "0.6061578", "text": "public function view($id_categoria){\n $stmt = $this->db->prepare(\"SELECT * FROM categoria WHERE id_categoria=?\");\n $stmt->execute(array($id_categoria));\n $categoria = $stmt->fetch(PDO::FETCH_ASSOC);\n\n if($categoria != null) {\n return new Category(\n $categoria[\"id_categoria\"],\n $categoria[\"nombre\"]\n );\n } else {\n return new Category();\n }\n }", "title": "" }, { "docid": "d5a2ffeb4d8ee4ed0cdce9ba7ad0411e", "score": "0.6053571", "text": "public function Categoria(){\n return $this->belongTo(Categoria::Class);\n }", "title": "" }, { "docid": "efe57f1d43adf59baef85b778a265bce", "score": "0.60525614", "text": "public function categoryAction() {\n $currentCatId = $this->model->getCatId($this->route['id']);\n $currentCatName = $this->model->getCatName($this->route['id']);\n $adminModel = new Admin;\n \n $vars = [\n 'list' => $this->model->listCatPosts($currentCatId),\n 'categories' => $adminModel->listCategories($this->route),\n 'catID' => $currentCatId,\n 'catNAME' => $currentCatName,\n ];\n\n $this->view->render('Category:', $vars);\n }", "title": "" }, { "docid": "2a3691114a2550a3aa22425fd2c054b7", "score": "0.60496956", "text": "public function findHelpCat(){\n\t $model = HelpCategories::model()->findAllByAttributes(array(\"sub_id\" => 0));\n\n foreach ($model as $key => $value) {\n\n if($value->title == \"Alıcıyım\"){\n $cssclass = \"fa-user\";\n }else if($value->title == \"Satıcıyım\"){\n $cssclass = \"fa-users\";\n }else if($value->title == \"Üyelik İşlemleri\"){\n $cssclass = \"fa-gears\";\n }else if($value->title == \"Rapor Et\"){\n $cssclass = \"fa-exclamation\";\n }\n\n echo \"<li>\n <a class='menuitem1' href=''><i class='fa $cssclass fa-2x'></i><br>\".Func::xssClear($value->title).\"</a>\n <div class='content-menu'>\";\n $this->findSubs($value->category_id);\n echo \"</div>\n </li>\";\n }\n }", "title": "" }, { "docid": "91313db5d08e19db54d71b6884dbd14f", "score": "0.60449296", "text": "public function getCategorie($id)\n {\n $id = (int) $id;\n $query = $this->db->query('SELECT id, libelle FROM categorie WHERE id = '.$id);\n $donnees = $query->fetch(PDO::FETCH_ASSOC);\n return new Categorie($donnees);\n }", "title": "" }, { "docid": "8cc99ed35d5dd3d2409085e34ffaca83", "score": "0.6044255", "text": "function Categorias(){\n\t $conexion = conectar();\n\t $buscarCategorias = $conexion->prepare(\"SELECT * FROM categorias ORDER BY ID\");\n\t $buscarCategorias->execute();\n\t $Categorias = $buscarCategorias->fetchAll();\n\n\t foreach($Categorias as list($id, $titulo, $subtitulo, $contenido, $profesor, $imagen)){\n\n\t\t $buscarUsuarios = $conexion->prepare(\"SELECT * FROM usuarios WHERE ID=:ID\");\n\t\t $buscarUsuarios->bindParam(':ID', $profesor, PDO::PARAM_STR);\n\t\t $buscarUsuarios->execute();\n\t\t $Usuarios = $buscarUsuarios->fetchAll();\n\t\t\tif($buscarUsuarios->rowCount()>=1){\n\t\t\t\tforeach($Usuarios as list($id2, $usuario2, $pass2, $nombre2, $apellido2, $edad2, $cargo2, $estado2)){ $profesor = $nombre2 . \" \" . $apellido2; }\n\t\t\t}\n\t\t else $profesor = \"Categoría sin profesor asignado\";\n\n\t\t $imagen==\"\"?$imagen=\"default.png\":$imagen;\n\t\t if( strlen($contenido) >=300 ){\n\t\t\t $contenido = substr($contenido, 0, 200); $contenido .= \"...\";\n\t\t }\n\n\t\t echo\" \n <tr>\n <td>$id</td>\n <td>$titulo</td>\n <td>$subtitulo</td>\n <td>$contenido</td>\n <td>$profesor</td>\n <td><img class='card-img-top' src='../assets/img/EduSoccer/$imagen' alt='Card image cap' style='height:150px!important;width:200px!important;'></td> \n <td class='btn-actions'>\n <a href='editar-categoria.php?id=$id' class='btn btn-warning btn-icon-split btn-block justify-content-start'><span class='icon text-white-50'><i class='fas fa-edit'></i></span><span class='text'>Editar</span></a><div class='my-2'></div>\n <a style='color:white' class='btn btn-danger btn-icon-split btn-block justify-content-start' onclick='del($id)'><span class='icon text-white-50'><i class='fas fa-trash'></i></span><span class='text'>Borrar</span></a>\n </td>\n </tr>\n \";\n\t }\n }", "title": "" }, { "docid": "1f064505e4bb024d47146efa16056c59", "score": "0.60402894", "text": "public function listarcategorias() {\r\n $this->db->order_by('titulo', 'ASC'); //ORDENAR OS RESULTADOS EM ORDEM ALFABÉTICA DO CAMPO TITULO EM SQL \"ORDER BY 'titulo' ASC \"\r\n $resultado = $this->db->get('categoria');\r\n if ($resultado->num_rows() > 0) {\r\n return $resultado->result();\r\n }\r\n return;\r\n }", "title": "" }, { "docid": "8a428c7c58428ec2edbe27f2d6f0fd8e", "score": "0.6040071", "text": "public function getcategorias()\n {\n return Categoria::all();\n }", "title": "" }, { "docid": "b3b6ea2ca9066480d021ac2cafffb352", "score": "0.6039733", "text": "public function testUpdateCategories()\n {\n }", "title": "" }, { "docid": "2a945e5c56683b1eae9c6b0fa5db61c7", "score": "0.6027136", "text": "function categories() {\n $categories = Categories::findByModuleSection($this->active_project, $this->active_module, $this->getControllerName());\n \n if($this->request->isApiCall()) {\n $this->serveData($categories, 'categories');\n } else {\n $this->setTemplate(array(\n 'module' => RESOURCES_MODULE, \n 'controller' => 'categories', \n 'template' => 'list'\n ));\n $this->smarty->assign(array(\n 'categories' => $categories,\n 'can_add_category' => Category::canAdd($this->logged_user, $this->active_project)\n ));\t\n } // if\n }", "title": "" }, { "docid": "09d30215a74045d10b797c45a5222eb4", "score": "0.6024921", "text": "public function schemacategory(){\n\t\t$pageno = $this->input->get('pageno');\n\t\t$pageno = !empty($pageno) ? $pageno : 1;\n\t\t$categorylist = $this->model('schema_model')->categorylist($pageno);\n\t\t$categorylist['pageno'] = $pageno;\n\t\t$categorylist['pagetotal'] = ceil($categorylist['total']/PAGESIZE);\n\t\t$this->display('schemacategory',$categorylist);\n\t}", "title": "" }, { "docid": "a1e7639fcced18cfdb9de9df129e3379", "score": "0.6021976", "text": "protected function set_categories_map() {\n $this->partial(\"Generating categories map ... \");\n $categories = get_terms([\n 'taxonomy' => 'travel-dir-category',\n 'hide_empty'=> false,\n ]);\n foreach ($categories as $category) {\n $this->categories[$category->term_id] = $category->name;\n }\n $this->success(\"OK\");\n }", "title": "" }, { "docid": "58dd326f3142e95093dfd2cb35108613", "score": "0.60213596", "text": "public function categoria($id){\n\t\t$this->load->model('categoria');\n\t\tif($this->categoria->apagar($id))\n\t\t\tredirect(\"pagina/admin/categorias\");\n\t\telse{\n\t\t\t$data['msg'] = \"Não foi possível apagar o registro.\";\n\t\t\t$data['registro'] = $this->categoria->get()->result();\n\t\t\t$data['title'] = \"Administração - Categorias\";\n\t\t\t$data['page'] = \"pages/admin/categorias\";\n\t\t\t$this->load->view('template',$data);\n\t\t}\n\t}", "title": "" }, { "docid": "e8db59d0d45416516392c095e3fde9bd", "score": "0.60185933", "text": "public function categoryAction() {\n\n //Validate Heder params\n $headersParams = $this->validateHeaderParams();\n\n $userAgent = $headersParams['userAgent'];\n $chapId = $headersParams['chapId'];\n\n //Get all categories\n $ApiModel = new Nexva_Api_NexApi();\n $allCategories = $ApiModel->categoryAction($chapId);\n //$cat_list = array();\n //$cat_list[\"category\"]=$allCategories;\n if (count($allCategories) > 0) \n {\n $this->getResponse()\n ->setHeader('Content-type', 'application/json');\n \n echo str_replace('\\/','/',json_encode($allCategories));\n $this->loggerInstance->log('Response ::' . json_encode($allCategories),Zend_Log::INFO);\n \n\t \n } \n else \n {\n $this->__dataNotFound();\n }\n }", "title": "" }, { "docid": "77fcaf4cb4100227ac527e96c25f332e", "score": "0.60156494", "text": "public function mostrarCategorias()\n {\n return $categorias = Categoria::all();\n }", "title": "" }, { "docid": "c90443db471356a6f4f2daf8f0599650", "score": "0.60151345", "text": "function selectKat2stelle($kategorie) {\n\t\t$kat2stelle = array();\n\t\t$this->debug->write('<br>file:metadaten.php class:notiz function selectKat2Stelle <br>Abfragen der Rechte pro Stelle für eine Kategorie<br>PostGIS', 4);\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\t*\n\t\t\tFROM\n\t\t\t\tq_notiz_kategorie2stelle\n\t\t\tWHERE\n\t\t\t\tkat_id = '\" . $kategorie . \"'\n\t\t\";\n\t\t$ret = $this->database->execSQL($sql, 4, 0);\n\t\twhile ($rs = pg_fetch_array($ret[1])) {\n\t\t\t$kat2stelle[] = $rs;\n\t\t}\n\t\treturn $kat2stelle;\n\t}", "title": "" }, { "docid": "93066defc640611617121cdeb830ee0f", "score": "0.600958", "text": "function getCategories() {\n $db = JFactory::getDbo();\n // create our SQL query\n $query = \"select category.*, custom.icon_url from #__ars_categories as category left join #__akeeba_category_custom as custom on category.id = custom.category_id\";\n // query the database\n $db->setQuery( $query );\n // return our result\n return $db->loadObjectList();\n }", "title": "" }, { "docid": "9810039a19dffc3dcff0d86183b49ceb", "score": "0.6004336", "text": "public function ModelReadDropDownCategory(){\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc hien truy van\n\t\t\t$query = $conn->query(\"select * from categories where parent_id = 0 order by id desc\");\n\t\t\t//lay tat cac ket qua tra ve\n\t\t\t$result = $query->fetchAll();\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "71473b8f21aef80fad5e5f00f46cbfe4", "score": "0.60017157", "text": "function category() {\n $category = $this->jsonData->entry->category[1]->{'label'};\n return $category;\n }", "title": "" }, { "docid": "3315d34421b843d765e6dc76108110ee", "score": "0.59793127", "text": "public function __construct()\n {\n $this->categorieList = [];\n }", "title": "" }, { "docid": "c0f0a2d55e1daad9349bd1639d357755", "score": "0.5975111", "text": "public static function getCategories()\n\t{\n\t\tglobal $okt;\n\n\t\tif (!$okt->news->config->categories['enable']) {\n\t\t\treturn null;\n\t\t}\n\n\t\t# on récupèrent l'éventuel identifiant de la catégorie en cours\n\t\t$iCurrentCat = null;\n\t\tif (isset($okt->page->module) && $okt->page->module == 'news' && isset($okt->page->action))\n\t\t{\n\t\t\t$aVars = $okt->tpl->getAssignedVars();\n\n\t\t\tif ($okt->page->action == 'category' && isset($aVars['rsCategory'])) {\n\t\t\t\t$iCurrentCat = $aVars['rsCategory']->id;\n\t\t\t}\n\t\t\telseif ($okt->page->action == 'item' && isset($aVars['rsPost'])) {\n\t\t\t\t$iCurrentCat = $aVars['rsPost']->category_id;\n\t\t\t}\n\n\t\t\tunset($aVars);\n\t\t}\n\n\t\t$rsCategories = $okt->news->categories->getCategories(array(\n\t\t\t'active' => 1,\n\t\t\t'language' => $okt->user->language,\n\t\t\t'with_count' => false\n\t\t));\n\n\t\t$iRefLevel = $iLevel = $rsCategories->level-1;\n\n\t\t$return = '';\n\n\t\twhile ($rsCategories->fetch())\n\t\t{\n\t\t\t# ouverture niveau\n\t\t\tif ($rsCategories->level > $iLevel) {\n\t\t\t\t$return .= str_repeat('<ul><li id=\"cat-'.$rsCategories->id.'\">', $rsCategories->level - $iLevel);\n\t\t\t}\n\t\t\t# fermeture niveau\n\t\t\telseif ($rsCategories->level < $iLevel) {\n\t\t\t\t$return .= str_repeat('</li></ul>', -($rsCategories->level - $iLevel));\n\t\t\t}\n\n\t\t\t# nouvelle ligne\n\t\t\tif ($rsCategories->level <= $iLevel) {\n\t\t\t\t$return .= '</li><li id=\"rub'.$rsCategories->id.'\">';\n\t\t\t}\n\n\t\t\t$return .= '<a href=\"'.html::escapeHTML(self::getCategoryUrl($rsCategories->slug)).'\">';\n\n\t\t\tif ($iCurrentCat == $rsCategories->id) {\n\t\t\t\t$return .= '<strong>'.html::escapeHTML($rsCategories->title).'</strong>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$return .= html::escapeHTML($rsCategories->title);\n\t\t\t}\n\n\n\t\t\t$return .= '</a>';\n\n\t\t\t$iLevel = $rsCategories->level;\n\t\t}\n\n\t\tif ($iRefLevel - $iLevel < 0) {\n\t\t\t$return .= str_repeat('</li></ul>', -($iRefLevel - $iLevel));\n\t\t}\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "781122c465ac7666637cfdec7430ee20", "score": "0.5972693", "text": "function ordCategoria(){\n $product=new product_model();\n $subCatId = $_GET['ID'];\n $product=get_Category($subCatId);\n\n require_once(\"views/product_views.phtml\");\n }", "title": "" }, { "docid": "a06be744de36b8ff8450437aba084597", "score": "0.5959859", "text": "public function get_categories()\n {\n return ['general'];\n }", "title": "" }, { "docid": "9c900424e5793607de8378fb3869de74", "score": "0.59588826", "text": "public function getCategory(){\n echo $this->category;\n }", "title": "" }, { "docid": "ba556bdfedd327a07fdc1684c05acb36", "score": "0.59581083", "text": "public function createCategory();", "title": "" }, { "docid": "77b988dd462e23f08c3b0bb526da36db", "score": "0.5953801", "text": "function osc_get_categories() {\n if ( !View::newInstance()->_exists('categories') ) {\n osc_export_categories(Category::newInstance()->toTree());\n }\n return View::newInstance()->_get('categories');\n }", "title": "" }, { "docid": "cbdbedbf04f7168bdb4f0e8933df0e1b", "score": "0.59340316", "text": "public function ListarCategorias() {\n $arreglo_resultado = array();\n $cont = 0;\n\n //Categorias Padres\n $categorias_padres = $this->getDoctrine()->getRepository('IcanBundle:Categoria')->ListarPadresActivos();\n foreach ($categorias_padres as $categoria) {\n $categoria_id = $categoria->getCategoriaId();\n\n $arreglo_resultado[$cont]['categoria_id'] = $categoria_id;\n $arreglo_resultado[$cont]['nombre'] = $categoria->getNombre();\n $arreglo_resultado[$cont]['url'] = $categoria->getUrl();\n //Subcategorias\n $subcategorias = array();\n $cont_sub = 0;\n $lista_sub = $this->getDoctrine()->getRepository('IcanBundle:Categoria')->ListarCategoriasDelPadreOrdenadas($categoria_id);\n foreach ($lista_sub as $subcategoria) {\n $subcategorias[$cont_sub]['categoria_id'] = $subcategoria->getCategoriaId();\n $subcategorias[$cont_sub]['nombre'] = $subcategoria->getNombre();\n $subcategorias[$cont_sub]['url'] = $subcategoria->getUrl();\n $cont_sub++;\n }\n $arreglo_resultado[$cont]['subcategorias'] = $subcategorias;\n $cont++;\n }\n return $arreglo_resultado;\n }", "title": "" }, { "docid": "b7cb9d1487eeb00bfbf1f97e1ee0ac73", "score": "0.593381", "text": "static public function contarCategorias($tipo){\n $contar = CategoriasMdl::contarCategorias($tipo,$_SESSION[\"userKey\"],\"categorias\");\n echo $contar[0];\n }", "title": "" }, { "docid": "42ed1a07ea944b930281263a055bdef1", "score": "0.59253436", "text": "public function updateCategoria(){\n $categoria = new Categoria($this->conexion);\n $categoria->setNombre($_POST['nombre']);\n $categoria->setId($_POST['id']);\n $categoria->update();\n header(\"Location: index.php?controller=admin&action=catalogo&c=true\");/*Falta hacer en\n producto controller el metodo para cargar la pagina de catalogo de administrador y\n poner aqui el action correspondiente, por motivos de desarrollo, se queda asi*/\n }", "title": "" }, { "docid": "69062ad4096158fc3184a4d7c003e0a7", "score": "0.59246516", "text": "public function getCategory()\n\t\t{\n\t\t\t$this->layout = \"index\";\n\t\t\t$this->set('title', 'Category (Linnworks API)');\n\t\t}", "title": "" }, { "docid": "71c6a5c5598b70c36d1c23619d469e92", "score": "0.5923723", "text": "function show_blog_categories()\n{\n\t$Blog = new Blog;\n\t$categories = getXML(BLOGCATEGORYFILE);\n\t$url = $Blog->get_blog_url('category');\n\tforeach($categories as $category)\n\t{\n\t\techo '<li><a href=\"'.$url.$category.'\">'.$category.'</a></li>';\n\t}\n\techo '<li><a href=\"'.$url.'\">';\n\ti18n(BLOGFILE.'/ALL_CATEOGIRES');\n\techo '</a></li>';\n}", "title": "" } ]
e9a4523c8fc64e24b020072a82052158
End function get_settings() Get hook use Used to see what extensions are installed for each hook in our module
[ { "docid": "7f16d3bb02b94315c4e0487ffdf7950e", "score": "0.6060752", "text": "public function get_hook_use($hook = NULL)\n\t{\n\t\treturn $this->_EE->db->group_by('class')\n\t\t ->get_where('extensions',array('hook' => $hook));\n\t}", "title": "" } ]
[ { "docid": "f3975e5345470885b885a76ae3f1b02b", "score": "0.74569476", "text": "public function get_settings()\n\t{\n\t\treturn $this->_EE->db->select('settings')\n\t\t ->where('enabled', 'y')\n\t\t ->where('class', 'Deployment_hooks_ext')\n\t\t ->limit(1)\n\t\t ->get('extensions');\n\t}", "title": "" }, { "docid": "0f56278b51d6c0ffbd8f9fbcd85c0e10", "score": "0.70265055", "text": "public function get_extensions();", "title": "" }, { "docid": "e4e31a9e4e74e9a6c2751be5468f4556", "score": "0.6677598", "text": "function egw_settings($hook_data);", "title": "" }, { "docid": "3ea1a611879a471d645a559dee70a430", "score": "0.658848", "text": "function get_extension_funcs($module_name)\n{\n}", "title": "" }, { "docid": "0e1739ff9e08f26d9ace776a89b6e98a", "score": "0.65241045", "text": "public static function updateExtensionList() {\n\t\t$extensionManager = self::createInstance();\n\t\t$result = $extensionManager->fetchMetaData('extensions');\n\t\treturn strip_tags($result);\n\t}", "title": "" }, { "docid": "03c5fe897cfe816469e8e39e253a9f49", "score": "0.649955", "text": "function wmf_install_get_installed_extensions() {\n return [\n 'org.wikimedia.omnimail',\n 'au.org.greens.extendedmailingstats',\n 'org.wikimedia.contacteditor',\n 'org.civicrm.afform',\n 'deduper',\n 'org.wikimedia.geocoder',\n 'nz.co.fuzion.civitoken',\n 'nz.co.fuzion.extendedreport',\n 'org.wikimedia.smashpig',\n 'org.wikimedia.wmffraud',\n 'org.wikimedia.rip',\n 'org.wikimedia.unsubscribeemail',\n 'org.wikimedia.datachecks',\n 'org.wikimedia.forgetme',\n 'org.wikimedia.relationshipblock',\n 'org.civicrm.shoreditch',\n 'org.civicrm.angularprofiles',\n 'org.civicrm.contactlayout',\n 'org.wikimedia.thethe',\n 'uk.org.futurefirst.networks.emailamender',\n ];\n}", "title": "" }, { "docid": "bf3ffa09c3831ee7d29ab6df8bb69e45", "score": "0.6431568", "text": "public function settings()\n\t\t {\n\t\t\n\t\t\t // Get settings.\n\t\t\t // Be certain channel_id is array.\n\t\t\t $query\t= ee()->db\n\t\t\t\t\t->select('settings')\n\t\t\t\t\t->where('class',$this->package_name.'_ext')\n\t\t\t\t\t->limit(1)\n\t\t\t\t\t->get('extensions');\n\t\t\t\t\t\n\t\t\t\t\tif($query->num_rows()>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->settings = unserialize($query->row()->settings);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( isset($this->settings['channel_id']) && ! is_array($this->settings['channel_id']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->settings['channel_id'] = array();\n\t\t\t\t\t\t} \n\t\t\t\t\t\t\n\t\t\t\t\t} \n\t\t\n\t\t\treturn $this->settings;\n\t\t\t\n\t\t }", "title": "" }, { "docid": "1bb5050eb72b8b47b11e0bdd9bfffdb9", "score": "0.6407972", "text": "function getSettings();", "title": "" }, { "docid": "94cb1c7b4f4c3e4797c3f83f94313557", "score": "0.63917667", "text": "protected function getExtConf() {\n\t\treturn unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);\n\t}", "title": "" }, { "docid": "c187f34af140079d3fa5147812f647ea", "score": "0.63646317", "text": "protected function extauthSettings()\n\t{\n\t\tglobal $txt;\n\n\t\t// Are the dependency's here\n\t\t$can_enable = function_exists('curl_init') && function_exists('json_decode');\n\t\t$subtext = $can_enable ? '' : $txt['extauth_missing_requirements'];\n\n\t\t// These are all we have enabled\n\t\t$providers = extauth_discover_providers();\n\n\t\t$config_vars[] = array('check', 'extauth_master', 'disabled' => !$can_enable, 'subtext' => $subtext);\n\t\t$config_vars[] = array('check', 'extauth_loginbar');\n\t\t$config_vars[] = array('check', 'extauth_noemail');\n\n\t\t$config_vars[] = array('desc', 'provider_services_settings_desc');\n\t\tforeach ($providers as $id)\n\t\t{\n\t\t\t$config_vars[] = array(\n\t\t\t\t'check', 'ext_enable_' . $id,\n\t\t\t\t'postinput' => $txt['ext_api_url_' . $id],\n\t\t\t\t'onchange' => 'showhideOptions(\\'' . $id . '\\');',\n\t\t\t\t'helptext' => $txt['ext_api_url_' . $id . '_help'],\n\t\t\t\t'help' => $txt['ext_api_url_' . $id . '_help']\n\t\t\t);\n\t\t\t$config_vars[] = array('text', 'ext_key_' . $id, 60);\n\t\t\t$config_vars[] = array('text', 'ext_secret_' . $id, 60);\n\t\t\t$config_vars[] = '';\n\t\t}\n\n\t\t// Show hide code tied to checkbox\n\t\taddInlineJavascript('\n\t\tfunction showhideOptions(id) {\n\t\t\tvar enabled = document.getElementById(\"ext_enable_\" + id).checked;\n\n\t\t\tif (enabled) {\n\t\t\t\t$(\"#ext_key_\" + id).parent().slideDown();\n\t\t\t\t$(\"#ext_secret_\" + id).parent().slideDown();\n\t\t\t\t$(\"#setting_ext_key_\" + id).parent().slideDown();\n\t\t\t\t$(\"#setting_ext_secret_\" + id).parent().slideDown();\n\t\t\t}\t\n\t\t\telse {\n\t\t\t\t$(\"#ext_key_\" + id).parent().slideUp();\n\t\t\t\t$(\"#ext_secret_\" + id).parent().slideUp();\n\t\t\t\t$(\"#setting_ext_key_\" + id).parent().slideUp();\n\t\t\t\t$(\"#setting_ext_secret_\" + id).parent().slideUp();\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction showhideInit() {\n\t\t\tvar providers = ' . json_encode($providers) . ';\n\t\t\t\n\t\t\tproviders.forEach(function(name) {\n\t\t\t showhideOptions(name);\n\t\t\t});\n\t\t}\n\t\t\n\t\tshowhideInit();', true);\n\n\t\treturn $config_vars;\n\t}", "title": "" }, { "docid": "08afbc4e603f5e9445b13c708384051b", "score": "0.6351513", "text": "public function getExtensionStatus()\n {\n return Mage::getStoreConfig('special_price/form/status');\n }", "title": "" }, { "docid": "dff8140b72cbcfa3e40f838d185a1514", "score": "0.63502264", "text": "protected function getExtensionsConfigArray()\n\t{\n\t\t$configArray = array();\n\t\t$extensions = $this->getServer()->apiCall('configurationExtensionsList');\n\t\t$configArray['extension'] = array();\n\t\tforeach ($extensions as $extension){\n\t\t\tif ($extension->isBuiltIn() ) continue;\n\t\t\t$configArray['extension'][$extension->getName()] = $extension->getLoaded();\n\t\t}\n\t\treturn $configArray;\n\t}", "title": "" }, { "docid": "68688a5dfdb02eda185cd37d29bb0b34", "score": "0.6317999", "text": "public function getExtensionConfigs()\n {\n return $this->extensionConfigs;\n }", "title": "" }, { "docid": "4984d5f78000c1d174e5881d30abdfe4", "score": "0.631394", "text": "public function getExtensions() {\n $developer_modules = array(\n 'ipsum' => dt('Development utility to generate fake content.'),\n 'testmodule' => dt('Internal test module.'),\n // Examples module.\n 'block_example' => dt('Development examples.'),\n 'cache_example' => dt('Development examples.'),\n 'config_entity_example' => dt('Development examples.'),\n 'content_entity_example' => dt('Development examples.'),\n 'dbtng_example' => dt('Development examples.'),\n 'email_example' => dt('Development examples.'),\n 'examples' => dt('Development examples.'),\n 'field_example' => dt('Development examples.'),\n 'field_permission_example' => dt('Development examples.'),\n 'file_example' => dt('Development examples.'),\n 'js_example' => dt('Development examples.'),\n 'node_type_example' => dt('Development examples.'),\n 'page_example' => dt('Development examples.'),\n 'phpunit_example' => dt('Development examples.'),\n 'simpletest_example' => dt('Development examples.'),\n 'tablesort_example' => dt('Development examples.'),\n 'tour_example' => dt('Development examples.'),\n );\n\n // From http://drupal.org/project/admin_menu admin_menu.inc in function\n // _admin_menu_developer_modules().\n $admin_menu_developer_modules = array(\n 'admin_devel' => dt('Debugging utility; degrades performance.'),\n 'cache_disable' => dt('Development utility and performance drain; degrades performance.'),\n 'coder' => dt('Debugging utility; potential security risk and unnecessary performance hit.'),\n 'content_copy' => dt('Development utility; unnecessary overhead.'),\n 'context_ui' => dt('Development user interface; unnecessary overhead.'),\n 'debug' => dt('Debugging utility; potential security risk, unnecessary overhead.'),\n 'delete_all' => dt('Development utility; potentially dangerous.'),\n 'demo' => dt('Development utility for sandboxing.'),\n 'devel' => dt('Debugging utility; degrades performance and potential security risk.'),\n 'devel_node_access' => dt('Development utility; degrades performance and potential security risk.'),\n 'devel_themer' => dt('Development utility; degrades performance and potential security risk.'),\n 'field_ui' => dt('Development user interface; allows privileged users to change site structure which can lead to data inconsistencies. Best practice is to store Content Types in code and deploy changes instead of allowing editing in live environments.'),\n 'fontyourface_ui' => dt('Development user interface; unnecessary overhead.'),\n 'form_controller' => dt('Development utility; unnecessary overhead.'),\n 'imagecache_ui' => dt('Development user interface; unnecessary overhead.'),\n 'journal' => dt('Development utility; unnecessary overhead.'),\n 'l10n_client' => dt('Development utility; unnecessary overhead.'),\n 'l10n_update' => dt('Development utility; unnecessary overhead.'),\n 'macro' => dt('Development utility; unnecessary overhead.'),\n 'rules_admin' => dt('Development user interface; unnecessary overhead.'),\n 'stringoverrides' => dt('Development utility.'),\n 'trace' => dt('Debugging utility; degrades performance and potential security risk.'),\n 'upgrade_status' => dt('Development utility for performing a major Drupal core update; should removed after use.'),\n 'user_display_ui' => dt('Development user interface; unnecessary overhead.'),\n 'util' => dt('Development utility; unnecessary overhead, potential security risk.'),\n 'views_ui' => dt('Development UI; allows privileged users to change site structure which can lead to performance problems or inconsistent behavior. Best practice is to store Views in code and deploy changes instead of allowing editing in live environments.'),\n 'views_theme_wizard' => dt('Development utility; unnecessary overhead, potential security risk.'),\n );\n\n return array_merge($admin_menu_developer_modules, $developer_modules);\n }", "title": "" }, { "docid": "b940b7881e72f4771fa95c15bf62dc30", "score": "0.63076496", "text": "public function extensions_menu() {}", "title": "" }, { "docid": "fbd8854d4b3e8d75712539197dcad0d6", "score": "0.6283052", "text": "public function get_plugin_info($_ext='') {\r\n\t\tif ( ! function_exists( 'get_plugin_data' ) )\r\n\t\t\trequire_once( ABSPATH . 'wp-admin/includes/plugin.php' );\r\n\t\t$plugin_name=$this->paths['name'].'.php';\r\n\t\t$this->plugin_data = get_plugin_data( $this->paths['dir'].$plugin_name );\r\n\t\tif ($_ext != '' && file_exists($this->paths['ext'].$_ext)) {\t\r\n\t\t\t$this->plugin_ext_data = get_plugin_data( $this->paths['ext'].$_ext );\r\n\t\t} else {\t\r\n\t\t\t$this->plugin_ext_data = array('Version'=>'0.0.0','Description'=>'Ext file not found');\r\n\t\t}\r\n\r\n\t\treturn; \r\n\t}", "title": "" }, { "docid": "576e21d9da2fcdbc9010e563c46cf130", "score": "0.6259076", "text": "public function getExtensions(): array;", "title": "" }, { "docid": "f6c865934936ddd9dde9e5f06c7ae2fa", "score": "0.622083", "text": "abstract public function getExtensions();", "title": "" }, { "docid": "32077bf8ba35a544c9aa9087edbeb7d2", "score": "0.6207033", "text": "public function getExtensions();", "title": "" }, { "docid": "32077bf8ba35a544c9aa9087edbeb7d2", "score": "0.6207033", "text": "public function getExtensions();", "title": "" }, { "docid": "32077bf8ba35a544c9aa9087edbeb7d2", "score": "0.6207033", "text": "public function getExtensions();", "title": "" }, { "docid": "fc6842d71c78a98df401569322b5c0cd", "score": "0.6180348", "text": "public function getExtensions()\n {\n if (array_key_exists(\"extensions\", $this->_propDict)) {\n return $this->_propDict[\"extensions\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "dd2ec33742794c738f22ee2b55982767", "score": "0.61501175", "text": "function show_extensions() \n\t{\n\t\t$this->ext_string = implode(' ', $this->extensions);\n\t}", "title": "" }, { "docid": "6a662be6f87b8d4f364d52b8ae3d4834", "score": "0.61485416", "text": "public static function getExtensions() {\n return self::$extensions;\n }", "title": "" }, { "docid": "1cbe97c4afa6fee6320058c1b700c7fd", "score": "0.61373514", "text": "function opalservice_get_settings() {\n\n\t$settings = get_option( 'opalservice_settings' );\n\n\treturn (array) apply_filters( 'opalservice_get_settings', $settings );\n\n}", "title": "" }, { "docid": "276fe9a45f44b6f8d802e702b2030043", "score": "0.6136995", "text": "function hookRegisterSettings() {\n\t\tforeach(fsCalendar::$plugin_options as $k => $v) {\n\t\t\tregister_setting('fse', $k);\n\t\t}\n\t\t/*register_setting('fse_global', 'fse_number');\n\t\tregister_setting('fse_global', 'fse_df_wp');\n\t\tregister_setting('fse_global', 'fse_df');\n\t\tregister_setting('fse_global', 'fse_tf_wp');\n\t\tregister_setting('fse_global', 'fse_tf');\n\t\tregister_setting('fse_global', 'fse_ws_wp');\n\t\tregister_setting('fse_global', 'fse_ws');\n\t\tregister_setting('fse_global', 'fse_df_admin');\n\t\tregister_setting('fse_global', 'fse_df_admin_sep');\n\t\tregister_setting('fse_global', 'fse_template');\n\t\tregister_setting('fse_global', 'fse_template_lst');\n\t\tregister_setting('fse_global', 'fse_show_enddate');\n\t\tregister_setting('fse_global', 'fse_groupby');\n\t\tregister_setting('fse_global', 'fse_groupby_header');\n\t\tregister_setting('fse_global', 'fse_page_create_notice');\n\t\t\n\t\tregister_setting('fse_sp', 'fse_page');\n\t\tregister_setting('fse_sp', 'fse_page_mark');\n\t\tregister_setting('fse_sp', 'fse_page_hide');\n\t\t\n\t\tregister_setting('fse_admin', 'fse_adm_gc_enabled');\n\t\tregister_setting('fse_admin', 'fse_adm_gc_mode');\n\t\tregister_setting('fse_admin', 'fse_adm_gc_show_week');\n\t\tregister_setting('fse_admin', 'fse_adm_gc_show_sel');\n\t\t\n\t\tregister_setting('fse_fc', 'fse_fc_tit_week_fmt');\n\t\tregister_setting('fse_fc', 'fse_fc_tit_month_fmt');\n\t\tregister_setting('fse_fc', 'fse_fc_tit_day_fmt');\n\t\tregister_setting('fse_fc', 'fse_fc_col_week_fmt');\n\t\tregister_setting('fse_fc', 'fse_fc_col_month_fmt');\n\t\tregister_setting('fse_fc', 'fse_fc_col_day_fmt');\n\t\tregister_setting('fse', 'fse_load_jquery');\n\t\tregister_setting('fse', 'fse_load_jqueryui');*/\n\t\t\n\t\t// add_settings_section($id, $title, $callback, $pagename\n\t\t\n\t\t// We do not need sections. We need different pages!\n\t\tadd_settings_section('fse_global', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array($this, 'hookSettingHeader_Global1'), \n\t\t\t\t\t\t\t 'fse_global');\n\t\t{\n\t\t\t// add_settings_field($id, $title, $callback, $pagename, $section);\n\t\t\tadd_settings_field('fse_number', \n\t\t\t\t\t\t\t __('Number of events<br /><small>Number of events to display by default.</small>', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_number'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global');\n\t\t\tadd_settings_field('fse_df', \n\t\t\t\t\t\t\t __('Date Format', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_df'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global');\n\t\t\tadd_settings_field('fse_tf', \n\t\t\t\t\t\t\t __('Time Format', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_tf'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global');\n\t\t\tadd_settings_field('fse_ws', \n\t\t\t\t\t\t\t __('Weeks starts on', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_ws'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global');\n\t\t\tadd_settings_field('fse_show_enddate', \n\t\t\t\t\t\t\t __('Show end date', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_show_enddate'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global');\n\t\t\tadd_settings_field('fse_allday_hide_time', \n\t\t\t\t\t\t\t __('Show time for all-day events', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_allday_hide_time'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_global5', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingHeader_Global5'), \n\t\t\t\t\t\t\t 'fse_global');\n\t\t{\n\n\t\t}\n\t\t\t\t\t\n\t\tadd_settings_section('fse_global2', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingHeader_Global2'), \n\t\t\t\t\t\t\t 'fse_global');\n\t\t{\n\t\t\tadd_settings_field('fse_template', \n\t\t\t\t\t\t\t __('Template', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_template'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global2');\n\t\t\t\t\t\t\t \n\t\t\tadd_settings_field('fse_template_lst', \n\t\t\t\t\t\t\t __('Template for Listoutput', fsCalendar::$plugin_textdom).'<br /><small>'.__('The whole template is automatically surrounded by the &lt;li&gt; tag when a grouped list of events is created.', fsCalendar::$plugin_textdom).'</small>', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_template_lst'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global2');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_global3', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingHeader_Global3'), \n\t\t\t\t\t\t\t 'fse_global');\n\t\t{\n\t\t\tadd_settings_field('fse_groupby', \n\t\t\t\t\t\t\t __('Group by', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_groupby'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global3');\n\t\t\tadd_settings_field('fse_groupby_header', \n\t\t\t\t\t\t\t __('Header Format', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_groupby_header'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global3');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_global4', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingHeader_Global4'), \n\t\t\t\t\t\t\t 'fse_global');\n\t\t{\n\t\t\tadd_settings_field('fse_load_jquery', \n\t\t\t\t\t\t\t __('Loading of jQuery library', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_load_jquery'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global4');\n\t\t\tadd_settings_field('fse_load_jqueryui', \n\t\t\t\t\t\t\t __('Loading of jQuery UI library', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_load_jqueryui'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global4');\n\t\t\tadd_settings_field('fse_load_fc_libs', \n\t\t\t\t\t\t\t __('Loading of FullCalendar files', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_load_fc_libs'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global4');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_pagination', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingVoid'), \n\t\t\t\t\t\t\t 'fse_pagination');\n\t\t{\n\t\t\tadd_settings_field('fse_pagination', \n\t\t\t\t\t\t\t __('Enable pagination by default', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_pagination'), \n\t\t\t\t\t\t\t 'fse_pagination', 'fse_pagination');\n\t\t\tadd_settings_field('fse_pagination_prev_text', \n\t\t\t\t\t\t\t __('Text for prev link', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_pagination_prev_text'), \n\t\t\t\t\t\t\t 'fse_pagination', 'fse_pagination');\n\t\t\tadd_settings_field('fse_pagination_next_text', \n\t\t\t\t\t\t\t __('Text for next link', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_pagination_next_text'), \n\t\t\t\t\t\t\t 'fse_pagination', 'fse_pagination');\n\t\t\tadd_settings_field('fse_pagination_usedots', \n\t\t\t\t\t\t\t __('Appearance', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_pagination_usedots'), \n\t\t\t\t\t\t\t 'fse_pagination', 'fse_pagination');\n\t\t\tadd_settings_field('fse_pagination_end_size', \n\t\t\t\t\t\t\t __('Number of pages at the beginning/end', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_pagination_end_size'), \n\t\t\t\t\t\t\t 'fse_pagination', 'fse_pagination');\n\t\t\tadd_settings_field('fse_pagination_mid_size', \n\t\t\t\t\t\t\t __('Number of pages before/after current page', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_pagination_mid_size'), \n\t\t\t\t\t\t\t 'fse_pagination', 'fse_pagination');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_admin', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingVoid'), \n\t\t\t\t\t\t\t 'fse_admin');\n\t\t{\n\t\t\tadd_settings_field('fse_df_admin', \n\t\t\t\t\t\t\t __('Date Format for Admin Interface', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_df_admin'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t\tadd_settings_field('fse_adm_gc_enabled', \n\t\t\t\t\t\t\t __('Date chooser', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_adm_gc_enabled'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t\tadd_settings_field('fse_adm_default_start_time', \n\t\t\t\t\t\t\t __('Default start time', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_adm_default_start_time'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t\tadd_settings_field('fse_adm_default_end_time', \n\t\t\t\t\t\t\t __('Default end time', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_adm_default_end_time'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t\tadd_settings_field('fse_adm_gc_mode', \n\t\t\t\t\t\t\t __('Mode', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_adm_gc_mode'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t\tadd_settings_field('fse_adm_gc_show_week', \n\t\t\t\t\t\t\t __('Week number', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_adm_gc_show_week'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t\tadd_settings_field('fse_adm_gc_show_sel', \n\t\t\t\t\t\t\t __('Month/Year Selector', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_adm_gc_show_sel'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_sp', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingHeader_SinglePage'), \n\t\t\t\t\t\t\t 'fse_sp');\n\t\t{\n\t\t\tadd_settings_field('fse_sp', \n\t\t\t\t\t\t\t __('Single view page', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_page'), \n\t\t\t\t\t\t\t 'fse_sp', 'fse_sp');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_fc', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingHeader_Fc'), \n\t\t\t\t\t\t\t 'fse_fc');\n\t\t{\n\t\t\tadd_settings_field('fse_fc_tit_month_fmt', \n\t\t\t\t\t\t\t __('Title format month view', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_fc_tit_month_fmt'), \n\t\t\t\t\t\t\t 'fse_fc', 'fse_fc');\n\t\t\tadd_settings_field('fse_fc_tit_week_fmt', \n\t\t\t\t\t\t\t __('Title format week view', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_fc_tit_week_fmt'), \n\t\t\t\t\t\t\t 'fse_fc', 'fse_fc');\n\t\t\tadd_settings_field('fse_fc_tit_day_fmt', \n\t\t\t\t\t\t\t __('Title format day view', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_fc_tit_day_fmt'), \n\t\t\t\t\t\t\t 'fse_fc', 'fse_fc');\n\t\t\tadd_settings_field('fse_fc_col_month_fmt', \n\t\t\t\t\t\t\t __('Colum header format month view', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_fc_col_month_fmt'), \n\t\t\t\t\t\t\t 'fse_fc', 'fse_fc');\n\t\t\tadd_settings_field('fse_fc_col_week_fmt', \n\t\t\t\t\t\t\t __('Colum format week view', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_fc_col_week_fmt'), \n\t\t\t\t\t\t\t 'fse_fc', 'fse_fc');\n\t\t\tadd_settings_field('fse_fc_col_day_fmt', \n\t\t\t\t\t\t\t __('Colum format day view', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_fc_col_day_fmt'), \n\t\t\t\t\t\t\t 'fse_fc', 'fse_fc');\n\t\t}\n\t}", "title": "" }, { "docid": "fdbbe838950034a5df18dca2d614b7fb", "score": "0.6134655", "text": "public function getAvailableSettings() {\n\t\treturn WLPlugInformationServiceIconclass::$s_settings;\n\t}", "title": "" }, { "docid": "37accf85c0a341583cfddf2a6e150a52", "score": "0.6129421", "text": "function extension_installed($ext_name)\n\t{\n\t\tstatic $_installed = array();\n\n\t\tif ( ! isset($_installed[$ext_name]))\n\t\t{\n\t\t\t$this->db->from(\"extensions\");\n\t\t\t$this->db->where(\"class\", ucfirst(strtolower($ext_name.'_ext')));\n\t\t\t$_installed[$ext_name] = ($this->db->count_all_results() > 0) ? TRUE : FALSE;\n\t\t}\n\n\t\treturn $_installed[$ext_name];\n\t}", "title": "" }, { "docid": "678943435e02d8c8df2c67b18c3209bb", "score": "0.61182153", "text": "function wpwhpro_load_extension(){\n\t\tnew WP_Webhooks_Pro_Extensions();\n\t}", "title": "" }, { "docid": "abbb62aeb5bacbf12c7c927e6168473c", "score": "0.6115461", "text": "public function getExtensions() {\n $unrecommended_modules = array(\n 'bad_judgement' => dt('Joke module, framework for anarchy.'),\n 'php' => dt('Executable code should never be stored in the database.'),\n );\n if (drush_get_option('vendor') == 'pantheon') {\n // Unsupported or redundant.\n $pantheon_unrecommended_modules = array(\n 'memcache' => dt('Pantheon does not provide memcache; instead, redis is provided as a service to all customers; see http://helpdesk.getpantheon.com/customer/portal/articles/401317'),\n 'memcache_storage' => dt('Pantheon does not provide memcache; instead, redis is provided as a service to all customers; see http://helpdesk.getpantheon.com/customer/portal/articles/401317'),\n );\n $unrecommended_modules = array_merge($unrecommended_modules, $pantheon_unrecommended_modules);\n }\n return $unrecommended_modules;\n }", "title": "" }, { "docid": "90d37b46e9d1b2f016c48dc7c8049fd8", "score": "0.6099074", "text": "function _voipextension_extension_listed_definition() {\n return array (\n 'field_name' => VOIPEXTENSION_EXTENSION_LISTED,\n 'type_name' => 'page',\n 'display_settings' =>\n array (\n 'label' =>\n array (\n 'format' => 'above',\n 'exclude' => 0,\n ),\n 'teaser' =>\n array (\n 'format' => 'default',\n 'exclude' => 0,\n ),\n 'full' =>\n array (\n 'format' => 'default',\n 'exclude' => 0,\n ),\n 4 =>\n array (\n 'format' => 'default',\n 'exclude' => 0,\n ),\n 'token' =>\n array (\n 'format' => 'default',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'number_integer',\n 'required' => '1',\n 'multiple' => '0',\n 'db_storage' => '1',\n 'module' => 'number',\n 'active' => '1',\n 'locked' => '0',\n 'columns' =>\n array (\n 'value' =>\n array (\n 'type' => 'int',\n 'not null' => false,\n 'sortable' => true,\n ),\n ),\n 'prefix' => '',\n 'suffix' => '',\n 'min' => '0',\n 'max' => '1',\n 'allowed_values' => '0|No\n 1|Yes',\n 'allowed_values_php' => '',\n 'widget' =>\n array (\n 'default_value' =>\n array (\n 0 =>\n array (\n 'value' => '1',\n ),\n ),\n 'default_value_php' => NULL,\n 'label' => 'List extension in phone directory?',\n 'weight' => '3',\n 'description' => '',\n 'type' => 'optionwidgets_buttons',\n 'module' => 'optionwidgets',\n ),\n );\n}", "title": "" }, { "docid": "c4b568a7824e6aaa5be110c091d31c49", "score": "0.60965043", "text": "function find_installed_addons($just_non_bundled = false, $get_info = true, $get_dependencies = false)\n{\n $addons_installed = array();\n\n $hooks = find_all_hooks('systems', 'addon_registry');\n\n if (!$just_non_bundled) {\n // Find installed addons- file system method (for coded addons). Coded addons don't need to be in the DB, although they will be if they are (re)installed after the original Composr installation finished.\n foreach ($hooks as $addon => $hook_dir) {\n if (substr($addon, 0, 4) != 'core') {\n $hook_path = get_file_base() . '/' . $hook_dir . '/hooks/systems/addon_registry/' . filter_naughty_harsh($addon) . '.php';\n $addons_installed[$addon] = $get_info ? read_addon_info($addon, $get_dependencies, null, null, $hook_path) : null;\n }\n }\n }\n\n // Find installed addons- database registration method\n $_rows = $GLOBALS['SITE_DB']->query_select('addons', array('*'));\n foreach ($_rows as $row) {\n $addon = $row['addon_name'];\n\n if (($just_non_bundled) && (isset($hooks[$addon])) && ($hooks[$addon] == 'sources')) {\n continue;\n }\n\n if (!isset($addons_installed[$addon])) {\n $addons_installed[$addon] = $get_info ? read_addon_info($addon, $get_dependencies) : null;\n }\n }\n\n return $addons_installed;\n}", "title": "" }, { "docid": "e0588e9f32b381a76c4e58d23e01b6c4", "score": "0.6093421", "text": "function show_extensions() {\n\t\t$this->ext_string = implode(\" \", $this->extensions);\n\t}", "title": "" }, { "docid": "e0ea0d25f7c4e76d64d8762c967393d2", "score": "0.6087849", "text": "public function getExtensions()\n {\n return isset($this->_aModule['extend']) ? $this->_aModule['extend'] : array();\n }", "title": "" }, { "docid": "fa7a79b2963ff5f8fd60af72f64fa597", "score": "0.6079138", "text": "public static function getExtensions() : array {\n\n\t\t\treturn self::$extensions;\n\t\t}", "title": "" }, { "docid": "e3ba0287a88679c977ade168e03ef684", "score": "0.6073821", "text": "abstract public function get_settings();", "title": "" }, { "docid": "526a7eefa539599d229d8f14ffdae073", "score": "0.60719436", "text": "protected function _getExtensions() {\n\t\tif ($this->_overrideExtType) {\n\t\t\t$this->_overrideExtType = false;\n\t\t\treturn array('.cml');\n\t\t}\n\t\treturn parent::_getExtensions();\n\t}", "title": "" }, { "docid": "3e8c3cd47284671c68828e1d0edbf4c3", "score": "0.606318", "text": "public function getExtensionMap()\n\t{\n\t\treturn $this->extensionMap;\n\t}", "title": "" }, { "docid": "823ed6078a91100201198e2032ca1798", "score": "0.60511607", "text": "public function getExtension()\n {\n return static::$extension;\n }", "title": "" }, { "docid": "eaa7356c32e46019c70bf914e6b8240d", "score": "0.6047116", "text": "function cot_getextplugins($hook, $checkExistence = true, $permission = 'R')\n{\n global $cot_plugins, $cot_hooks_fired;\n\n static $applicationDir = null;\n if ($applicationDir === null) {\n $applicationDir = realpath(dirname(__DIR__)) . '/';\n }\n\n if (Cot::$cfg['debug_mode']) {\n $cot_hooks_fired[] = $hook;\n }\n\n $extPlugins = [];\n if (isset($cot_plugins[$hook]) && is_array($cot_plugins[$hook])) {\n foreach ($cot_plugins[$hook] as $handler) {\n if ($handler['pl_module']) {\n $dir = Cot::$cfg['modules_dir'];\n $cat = $handler['pl_code'];\n $opt = 'a';\n } else {\n $dir = Cot::$cfg['plugins_dir'];\n $cat = 'plug';\n $opt = $handler['pl_code'];\n }\n\n if (!cot_auth($cat, $opt, $permission)) {\n continue;\n }\n\n $fileName = $dir . '/' . $handler['pl_file'];\n $fullFileName = $applicationDir . $fileName;\n if (\n $checkExistence\n && (!isset(Cot::$cfg['checkHookFileExistence']) || Cot::$cfg['checkHookFileExistence'])\n && !is_readable($fullFileName)\n ) {\n $extType = $handler['pl_module'] ? 'mod' : 'pl';\n $extUrl = cot_url('admin', ['m' => 'extensions', 'a' => 'details', $extType => $handler['pl_code']]);\n $message = cot_rc(\n Cot::$L['hookFileNotFound'],\n ['title' => $handler['pl_title'], 'hook' => $hook, 'fileName' => $fileName, 'url' => $extUrl]\n );\n // @todo log one file missing only once. May be use memory cache?\n cot_log($message, $handler['pl_code'], 'hook-include', 'error');\n if (!empty(Cot::$usr['isadmin'])) {\n cot_message($message, 'warning');\n }\n continue;\n }\n $extPlugins[] = $fullFileName;\n }\n }\n\n // Trigger cache handlers\n Cot::$cache && Cot::$cache->trigger($hook);\n\n return $extPlugins;\n}", "title": "" }, { "docid": "a41924ace819a20a2329a5ecec87c3b5", "score": "0.6041161", "text": "function showextensions() {\n\t\t$this->extstring = implode(\" \", $this->extensions);\n\t}", "title": "" }, { "docid": "220dda73c8ffb787a4c65feadb45c8cc", "score": "0.6031039", "text": "private function _getExtensions() {\n\t\t$extensions = array(\n\t\t\t'installed' => array(),\n\t\t\t'other' => array()\n\t\t);\n\n\t\t$installed = $this->model_extension_extension->getInstalled('module');\n\n\t\t$files_path_23 = DIR_APPLICATION . 'controller/extension/module';\n\t\t$files_path_pre23 = DIR_APPLICATION . 'controller/module';\n\n\t\t$files = array_merge(glob($files_path_23 . '/*.php'), glob($files_path_pre23 . '/*.php'));\n\n\t\tif ($files) {\n\t\t\tforeach ($files as $file) {\n\t\t\t\t$extension = basename($file, '.php');\n\n\t\t\t\t$this->load->language((defined('VERSION') && VERSION >= '2.3.0.0' ? 'extension/' : '') . 'module/' . $extension);\n\n\t\t\t\t$version = '';\n\t\t\t\tif (strpos($extension, 'multimerch_') !== FALSE) {\n\t\t\t\t\t$f = file($file);\n\t\t\t\t\tforeach ($f as $line) {\n\t\t\t\t\t\tif (strpos($line, 'version') !== false) {\n\t\t\t\t\t\t\tif (preg_match(\"/['\\\"](.*?)['\\\"]/\", $line, $matches)) $version = $matches[1];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$key = in_array($extension, $installed) ? 'installed' : 'other';\n\t\t\t\t$extensions[$key][strtolower(strip_tags($this->language->get('heading_title')))] = array(\n\t\t\t\t\t'name' => $this->language->get('heading_title'),\n\t\t\t\t\t'version' => $version\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tksort($extensions['installed']);\n\t\tksort($extensions['other']);\n\t\treturn $extensions;\n\t}", "title": "" }, { "docid": "74684b4c0d78c2e20392e5674e7e7a0a", "score": "0.6016179", "text": "public function getExtensions()\n {\n $extensions = new ExtensionsHelper($this->getOption('extension'));\n\n return $extensions->getExtensions();\n }", "title": "" }, { "docid": "1e5cf613dc16fdd4a8b834b50c4d620d", "score": "0.60083437", "text": "protected function get_extension_dependencies() {\n\n\t\tSV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_php_extensions()' );\n\n\t\treturn $this->get_dependency_handler()->get_php_extensions();\n\t}", "title": "" }, { "docid": "b35db548d981dbc7d05a4b2d91b63136", "score": "0.60069615", "text": "public static function all()\n\t{\n\t\treturn static::$extensions;\n\t}", "title": "" }, { "docid": "c8c55ed72fe4ecd9cd9688a888e0486b", "score": "0.5999755", "text": "public function get_phpbb_extensions()\n\t{\n\t\treturn ($this->extension_manager) ? $this->extension_manager->all_enabled() : array();\n\t}", "title": "" }, { "docid": "8777a4cc1e972730a01e69ea2d078484", "score": "0.5987351", "text": "public function getExtension();", "title": "" }, { "docid": "8777a4cc1e972730a01e69ea2d078484", "score": "0.5987351", "text": "public function getExtension();", "title": "" }, { "docid": "7ccfb9fd182456c9e9f1fad7a094418e", "score": "0.5973659", "text": "abstract public function getExtension();", "title": "" }, { "docid": "2a60409c236ed644a82cf6bf6a27c272", "score": "0.5973512", "text": "function get_settings()\n\t{\n\t\t// if settings are already in session cache, use those\n\t\tif (isset($this->helper->cache['settings'])) return;\n\n\t\t// Get settings with help of our extension\n\t\tif ( ! class_exists('flickr_ext'))\n\t\t{\n\t\t\trequire_once(PATH_THIRD . 'flickr/ext.flickr.php');\n\t\t}\n\n\t\t$this->ext = new flickr_ext();\n\t\t$this->cache['settings'] = $this->ext->get_settings();\n\t}", "title": "" }, { "docid": "0f590a00f320de2f3b83f5173cabb57b", "score": "0.596202", "text": "public static function init() {\n self::$extensions = get_loaded_extensions();\n\n }", "title": "" }, { "docid": "548243b4b3e52bd15a7c6040ea922006", "score": "0.5945368", "text": "protected static function define_extensions()\n\t{\n\t}", "title": "" }, { "docid": "7da00349cb3905c3d0199877d2291d39", "score": "0.5944829", "text": "public function getExtensionsCallback()\n {\n return array();\n }", "title": "" }, { "docid": "4f12cb818da25cfa06304100d8590776", "score": "0.59437853", "text": "public function extensions()\n {\n return $this->send('/api/extensions');\n }", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.5925463", "text": "public function getSettings();", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.5925463", "text": "public function getSettings();", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.5925463", "text": "public function getSettings();", "title": "" }, { "docid": "9f71c0eace640d2097a3364353f6b944", "score": "0.591996", "text": "function fn_settings_wizard_get_addons()\n{\n $addons_list = array();\n $exclude_addons = func_get_args();\n\n $addons = fn_get_dir_contents(Registry::get('config.dir.addons'), true, false);\n $addons = array_diff($addons, $exclude_addons);\n\n foreach ($addons as $addon_id) {\n $addon_scheme = SchemesManager::getScheme($addon_id);\n if ($addon_scheme != false && !$addon_scheme->getUnmanaged()) {\n $addon = array(\n 'name' => $addon_scheme->getName(),\n 'addon_name' => $addon_id,\n 'description' => $addon_scheme->getDescription(),\n 'has_icon' => $addon_scheme->hasIcon()\n );\n\n $addons_list[$addon_id] = $addon;\n }\n }\n\n return $addons_list;\n}", "title": "" }, { "docid": "c70f1cf29910cbe85a4c680bd1604c48", "score": "0.5912482", "text": "public function menuExtList() {\n\t\t// search extensions\n\t\t$tmpExtList = [];\n\t\ttry {\n\t\t\t// local extensions\n\t\t\tif ($this->extConfig['viewLocalExt']) {\n\t\t\t\tif (count(\n\t\t\t\t\t$content = Functions::searchExtensions(\n\t\t\t\t\t\tPATH_site . Typo3Lib::pathLocalExt, $this->extConfig['viewStateExt'],\n\t\t\t\t\t\t$this->extConfig['extIgnore']\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t$tmpExtList[LocalizationUtility::translate('ext.local', 'lfeditor')] = $content;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// global extensions\n\t\t\tif ($this->extConfig['viewGlobalExt'] && is_dir(Typo3Lib::pathGlobalExt)) {\n\t\t\t\tif (count(\n\t\t\t\t\t$content = Functions::searchExtensions(\n\t\t\t\t\t\tPATH_site . Typo3Lib::pathGlobalExt, $this->extConfig['viewStateExt'],\n\t\t\t\t\t\t$this->extConfig['extIgnore']\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t$tmpExtList[LocalizationUtility::translate('ext.global', 'lfeditor')] = $content;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// system extensions\n\t\t\tif ($this->extConfig['viewSysExt']) {\n\t\t\t\tif (count(\n\t\t\t\t\t$content = Functions::searchExtensions(\n\t\t\t\t\t\tPATH_site . Typo3Lib::pathSysExt, $this->extConfig['viewStateExt'],\n\t\t\t\t\t\t$this->extConfig['extIgnore']\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t$tmpExtList[LocalizationUtility::translate('ext.system', 'lfeditor')] = $content;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\tthrow new LFException('failure.failure', 0, '(' . $e->getMessage() . ')');\n\t\t}\n\n\t\t// check extension array\n\t\tif (!count($tmpExtList)) {\n\t\t\tthrow new LFException('failure.search.noExtension');\n\t\t}\n\n\t\t// create list\n\t\t/** @var array $extList */\n\t\t$extList = Functions::prepareExtList($tmpExtList);\n\t\t$extList = array_merge([PATH_site . 'fileadmin' => 'fileadmin/', ''], $extList);\n\n\t\tforeach ($extList as $extAddress => $extLabel) {\n\t\t\tunset ($extList[$extAddress]);\n\t\t\t$fixedExtAddress = Typo3Lib::fixFilePath($extAddress);\n\t\t\t$extList[$fixedExtAddress] = $extLabel;\n\t\t}\n\t\treturn $extList;\n\t}", "title": "" }, { "docid": "8df4d16b5ab9538a2206e69fb9306d35", "score": "0.5911681", "text": "static protected function setup_extensions()\r\n\t{\r\n\t\treturn array('anavaro/birthdaycontrol');\r\n\t}", "title": "" }, { "docid": "26c242db1ee503570ac0dd9835587e31", "score": "0.59095037", "text": "protected function initExt() {\n\t\t$this->setHook('BeforePageDisplay');\n\t\t$this->setHook('LinkEnd');\n\t\t$this->setHook('ThumbnailBeforeProduceHTML');\n\n\t\tBsConfig::registerVar( 'MW::ContextMenu::Modus', 'ctrl', BsConfig::LEVEL_USER|BsConfig::TYPE_STRING|BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-contextmenu-pref-modus', 'radio' );\n\t}", "title": "" }, { "docid": "1dc217654b72b2b7eff0756d4a2bc92f", "score": "0.5906878", "text": "public static function hooks() {\n // Register settings\n \n\t\t\tadd_filter( 'fktr_plugins_updater_args', array(__CLASS__, 'add_updater'), 10, 1);\n \n }", "title": "" }, { "docid": "923901ae9a94a8c1505d688068af7acd", "score": "0.5900681", "text": "public function getRegisteredExtensionNames()\n\t{\n\t\treturn array_keys(static::$bindings);\n\t}", "title": "" }, { "docid": "58cf160582f8569fecc15b1bee2e55d3", "score": "0.58989716", "text": "public function getExtensions(): array\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "58cf160582f8569fecc15b1bee2e55d3", "score": "0.58989716", "text": "public function getExtensions(): array\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "10caab7750ee83016b190cdee7ed8105", "score": "0.5897522", "text": "function PLG_getFeedElementExtensions($contentType, $contentID, $feedType, $feedVersion, $topic, $fid)\n{\n global $_PLUGINS;\n\n $extensions = array();\n foreach( $_PLUGINS as $plugin )\n {\n $function = 'plugin_feedElementExtensions_'.$plugin;\n if (function_exists($function))\n {\n $extensions = array_merge($extensions, $function($contentType, $contentID, $feedType, $feedVersion, $topic, $fid));\n }\n }\n\n $function = 'CUSTOM_feedElementExtensions';\n if (function_exists($function))\n {\n $extensions = array_merge($extensions, $function($contentType, $contentID, $feedType, $feedVersion, $topic, $fid));\n }\n\n return $extensions;\n}", "title": "" }, { "docid": "ffa9756c084c6b60207b9276ef2fbd6b", "score": "0.5896577", "text": "function clpp_get_options($settings){\r\n\treturn get_option($settings);\r\n}", "title": "" }, { "docid": "29cd1f800a6e3bbdd5fe2ba150561084", "score": "0.5894671", "text": "function getsettings() {\r\n global $lib;\r\n\r\n return $lib->db->get_row(\"com_qrecycle_setting\");\r\n}", "title": "" }, { "docid": "fb40aba16227d2de4e6726a73b315df4", "score": "0.58837134", "text": "function fn_get_settings_feedback($mode, $company_id = null)\n{\n $exclude_options = array(\n 'company_state',\n 'company_city',\n 'company_address',\n 'company_phone',\n 'company_phone_2',\n 'company_fax',\n 'company_name',\n 'company_website',\n 'company_zipcode',\n 'company_country',\n 'company_users_department',\n 'company_site_administrator',\n 'company_orders_department',\n 'company_support_department',\n 'company_newsletter_email',\n 'company_start_year',\n 'google_host',\n 'google_login',\n 'google_pass',\n 'mailer_smtp_host',\n 'mailer_smtp_auth',\n 'mailer_smtp_username',\n 'mailer_smtp_password',\n 'proxy_host',\n 'proxy_port',\n 'proxy_user',\n 'proxy_password',\n 'store_access_key',\n 'cron_password',\n 'ftp_password',\n 'ftp_username',\n 'ftp_directory',\n 'ftp_hostname',\n 'license_number'\n );\n $settings = Settings::instance()->getList(0, 0, false, $company_id);\n $result = array();\n\n if (!empty($settings)) {\n foreach ($settings as $section_id => $subsections) {\n\n $section_info = Settings::instance()->getSectionByName($section_id, Settings::ADDON_SECTION);\n if (!empty($section_info)) {\n continue;\n }\n\n foreach ($subsections as $subsection_id => $options) {\n $section_title = $section_id . '.' . (!empty($subsection_id) ? $subsection_id . '.' : '');\n foreach ($options as $option_info) {\n if ($option_info['type'] == 'H' || $option_info['type'] == 'D') {\n continue;\n }\n\n if (in_array($option_info['name'], $exclude_options)) {\n continue;\n }\n\n if ($mode == 'prepare' && is_array($option_info['value'])) {\n $option_info['value'] = json_encode($option_info['value']);\n }\n\n $result[] = array (\n 'name' => $section_title . $option_info['name'],\n 'value' => fn_check_feedback_value($option_info['value']),\n );\n }\n }\n\n }\n }\n\n return $result;\n}", "title": "" }, { "docid": "11cff22e852d206a50654db847ae7d1e", "score": "0.58832264", "text": "final public static function all():array\n {\n return get_loaded_extensions();\n }", "title": "" }, { "docid": "0ff9be7fde2342640beb0b2af1a76a71", "score": "0.58822805", "text": "public function getExtension() {\n\t\t\t$this->blnInitialized || $this->init();\n\t\t\treturn $this->strExtension;\n\t\t}", "title": "" }, { "docid": "6d5de02c2869395ed749e8d2dd43110b", "score": "0.58794147", "text": "function show_extensions_form($defaults = array()) {\n ?>\n<form method=\"post\" action=\"\">\n <?php echo get_hidden_inputs();?>\n <input type=\"hidden\" name=\"action\" value=\"feat_extensions_real\" />\n <?php\n echo get_hidden_cfg();\n show_config_form(array(\n array('GD 2 is available', 'GD2Available', 'Whether you have GD 2 or newer installed', array('auto', 'yes', 'no')),\n ),\n 'Configure extensions',\n 'phpMyAdmin can use several extensions, however here are configured only those that didn\\'t fit elsewhere. MySQL extension is configured within server, charset conversion one on separate charsets page.',\n $defaults);\n ?>\n</form>\n <?php\n}", "title": "" }, { "docid": "b48c939947524f3581ef4efd531c3de5", "score": "0.5874393", "text": "public function getExtensions()\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "b48c939947524f3581ef4efd531c3de5", "score": "0.5874393", "text": "public function getExtensions()\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "b48c939947524f3581ef4efd531c3de5", "score": "0.5874393", "text": "public function getExtensions()\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "aab36304c3be8dcb941517723553bbb2", "score": "0.586227", "text": "public function getExtensionCallback()\n {\n return;\n }", "title": "" }, { "docid": "c91c840ad78f38feffe46c4be7687885", "score": "0.5852783", "text": "function plugin_settings(){\n\t\t}", "title": "" }, { "docid": "d7288c5b672e31d4d4d78db9c5a9f132", "score": "0.584052", "text": "public function getExtensionConfiguration() {\n\t\treturn $this->extensionConfiguration;\n\t}", "title": "" }, { "docid": "b4b4bf40f83a8f1fcf6bd6f929f9ff99", "score": "0.58398", "text": "public function get()\n {\n return $this->client->send('/api/extensions');\n }", "title": "" }, { "docid": "d80945824cf251380664a39b132e9838", "score": "0.5822925", "text": "public static function getAllExtensions() {\n \n\t$coreExt = new UICoreExtension();\n\t$coreExt->setBuilders(array(\n\t\t\"ui.html\" => \"YsHTML\",\n\t\t\"ui.jqueryCore\" => \"YsJQuery\",\n\t\t\"ui.dialog\" => \"YsUIDialog\",\n\t\t\"ui.tabs\" => \"YsUITabs\",\n\t\t\"ui.accordion\" => \"YsUIAccordion\",\n\t\t\"ui.progressbar\" => \"YsUIProgressbar\",\n\t\t\"ui.slider\" => \"YsUISlider\",\n\t\t\"ui.autocomplete\" => \"YsUIAutocomplete\",\n\t\t\"ui.datepicker\" => \"YsUIDatepicker\",\n\t\t\"ui.datetimepicker\" => \"YsUIDateTimepicker\",\n\t\t\"ui.button\" => \"YsUIButton\",\n\t\t\"ui.multiselect\" => \"YsUIMultiSelect\",\n\t\t\"ui.picklist\" => \"YsUIPickList\",\n\t\t\"ui.popup\" => \"YsUIPopUp\",\n\t\t\"ui.selectmenu\" => \"YsUISelectMenu\",\n\t\t\"ui.expander\" => \"YsUIExpander\",\n\t\t\"ui.splitter\" => \"YsUISplitter\",\n\t\t\"ui.dynaselect\" => \"YsUIDynamicSelect\",\n\t\t\"ui.menu\" => \"YsUIMenu\",\n\t\t\"ui.panel\" => \"YsUIPanel\",\n\t\t\"ui.tooltip\" => \"YsUITooltip\",\n\t\t\"ui.draggable\" => \"YsUIDraggable\",\n\t\t\"ui.droppable\" => \"YsUIDroppable\",\n \"ui.sortable\" => \"YsUISortable\",\n \"ui.selectable\" => \"YsUISelectable\",\n\t\t\"ui.resizable\" => \"YsUIResizable\",\n\t\t\"ui.effect\" => \"YsUIEffect\",\n\t\t\"ui.video\" => \"YsUIVideo\"\n\t));\n\n\t$uiAddonsExt = new UIAddonsExtension();\n\t$uiAddonsExt->setBuilders(array(\n\t\t\"ui.block\" => \"YsBlockUI\",\n\t\t\"ui.box\" => \"YsJQBox\",\n\t\t\"ui.colorpicker\" => \"YsJQColorPicker\",\n\t\t\"ui.notify\" => \"YsPNotify\",\n\t\t\"ui.hotkey\" => \"YsKeys\",\n\t\t\"ui.monitor\" => \"YsJQMonitor\",\n\t\t\"ui.keypad\" => \"YsJQKeypad\",\n\t\t\"ui.calculator\" => \"YsJQCalculator\",\n\t\t\"ui.layout\" => \"YsJLayout\",\n\t\t\"ui.mask\" => \"YsJQMask\",\n\t\t\"ui.formWizard\" => \"YsFormWizard\",\n\t\t\"ui.ajaxForm\" => \"YsJQForm\",\n\t\t\"ui.validation\" => \"YsJQValidate\",\n\t\t\"ui.booklet\" => \"YsJQBooklet\",\n\t\t\"ui.cycle\" => \"YsJQCycle\",\n\t\t\"ui.ring\" => \"YsJQRing\",\n\t\t\"ui.upload\" => \"YsUpload\",\n\t));\n\n\treturn array(\n\t\tnew HTMLExtension(),\n\t\tnew JsSintaxExtension(),\n\t\tnew JQueryCoreExtension(),\n\t\tnew UIWidgetExtension(),\n\t\t$coreExt,\n\t\t$uiAddonsExt\n\t);\n }", "title": "" }, { "docid": "76cf617720d50c5534916c28dcab5667", "score": "0.5809505", "text": "function get_config() : array {\n\treturn Altis\\get_config()['modules']['cms']['network-ui'];\n}", "title": "" }, { "docid": "426a64ee093206e08aecb52aa8289a8a", "score": "0.5807061", "text": "function entity_settings_get_info($type = NULL, $setting = NULL, $reset = FALSE) {\n /** @var string $cid */\n $cid = 'entity_settings_info';\n /** @var string $hook */\n $hook = 'entity_setting_info';\n\n // Cached since used very often.\n static $drupal_static_fast;\n if (!isset($drupal_static_fast)) {\n $drupal_static_fast[$cid] = &drupal_static(__FUNCTION__);\n }\n $entity_settings_info = &$drupal_static_fast[$cid];\n if ($reset) {\n $entity_settings_info = array();\n entity_toolbox_cache_clear($cid);\n }\n if (empty($entity_settings_info)) {\n if ($cache = entity_toolbox_cache_get($cid)) {\n $entity_settings_info = $cache->data;\n }\n else {\n // Invokes and alters hook_entity_settings_info.\n $invoke = invoke_and_alter($hook);\n $buffer = array();\n foreach ($invoke as $entity_type => $settings) {\n $r_buffer = !empty($settings['regexp']) ? $settings['regexp'] : NULL;\n if (isset($r_buffer)) {\n unset($settings['regexp']);\n }\n foreach ($settings as $sid => $s_info) {\n $s_info += array(\n 'model' => concat($sid, '%entity_type%'),\n 'label' => machine_name2sentence($sid),\n 'description' => '',\n 'group' => 'global',\n );\n $buffer[$entity_type][$sid] = $s_info;\n }\n if ($entity_type == '*') {\n $buffer[$entity_type]['regexp'] = TRUE;\n }\n else {\n $buffer[$entity_type]['regexp'] = isset($r_buffer) ? $r_buffer : FALSE;\n }\n }\n\n $entity_settings_info = $buffer;\n entity_toolbox_cache_set($cid, $entity_settings_info);\n }\n }\n\n if (isset($type)) {\n $type_settings_info = !empty($entity_settings_info[$type]) ? $entity_settings_info[$type] + $entity_settings_info['*'] : $entity_settings_info['*'];\n\n return isset($setting) ? $type_settings_info[$setting] : $type_settings_info;\n }\n else {\n return $entity_settings_info;\n }\n}", "title": "" }, { "docid": "6321bf40d37fdae708d5dff2a0995d23", "score": "0.5801234", "text": "static function get_settings($hook_data)\n\t{\n\t\tif (!isset($hook_data['setup']))\n\t\t{\n\t\t\ttranslation::add_app('infolog');\n\t\t\t$infolog = new infolog_bo();\n\t\t\t$types = $infolog->enums['type'];\n\t\t}\n\t\tif (!isset($types))\n\t\t{\n\t\t\t$types = array(\n\t\t\t\t'task' => 'Tasks',\n\t\t\t);\n\t\t}\n\t\t$settings = array();\n\t\t$settings['infolog-types'] = array(\n\t\t\t'type' => 'multiselect',\n\t\t\t'label' => 'InfoLog types to sync',\n\t\t\t'name' => 'infolog-types',\n\t\t\t'help' => 'Which InfoLog types should be synced with the device, default only tasks.',\n\t\t\t'values' => $types,\n\t\t\t'default' => 'task',\n\t\t\t'xmlrpc' => True,\n\t\t\t'admin' => False,\n\t\t);\n\t\t$settings['infolog-cat-action'] = array(\n\t\t\t'type' => 'select',\n\t\t\t'label' => 'Action when category is an EMail address',\n\t\t\t'name' => 'infolog-cat-action',\n\t\t\t'help' => 'Allows to modify responsible users from devices not supporting them, by setting EMail address of a user as category.',\n\t\t\t'values' => array(\n\t\t\t\t'none' => lang('none'),\n\t\t\t\t'add' => lang('add user to responsibles'),\n\t\t\t\t'replace' => lang('add user to responsibles, removing evtl. previous category user'),\n\t\t\t\t'set' => lang('set user as only responsible, removing all existing responsibles'),\n\t\t\t\t'set-user' => lang('set user as only responsible user, but keeping groups'),\n\t\t\t),\n\t\t\t'default' => 'none',\n\t\t\t'xmlrpc' => True,\n\t\t\t'admin' => False,\n\t\t);\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "4de6f740d6f91e97f2751b2f4cc6f757", "score": "0.5799157", "text": "function getAllAddOnTools(){\n\t\treturn;\n\t}", "title": "" }, { "docid": "173fdbd47e2b0abb156e5bbcb92ef79c", "score": "0.57881093", "text": "public function get_active_hook_info($hook)\n\t{\n\t\tif ( ! $this->active_hook($hook))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $this->extensions[$hook];\n\t}", "title": "" }, { "docid": "554fec9b4012dbc3c8e9fb73df02a5b3", "score": "0.5788056", "text": "function register_settings(){\r\n\t\tregister_setting('bpmod_options', 'bp_moderation_options');\r\n\r\n\t}", "title": "" }, { "docid": "c522e9ee6116bccb59856d180d616597", "score": "0.57876635", "text": "protected function get_php_settings_dependencies() {\n\n\t\tSV_WC_Plugin_Compatibility::wc_deprecated_function( __METHOD__, '5.2.0', get_class( $this->get_dependency_handler() ) . '::get_php_settings()' );\n\n\t\treturn $this->get_dependency_handler()->get_php_settings();\n\t}", "title": "" }, { "docid": "119b339f824b614f56853141a4adba9a", "score": "0.57808435", "text": "function enabledLanguagesList(){\n return getOption('enabled_languages');\n}", "title": "" }, { "docid": "bf34560a11bc8c4a6d7a393a5003771f", "score": "0.57806194", "text": "function register_myself( $extensions ) {\r\n\t\t\t$extensions[] = __FILE__;\r\n\t\t\treturn $extensions;\r\n\t\t}", "title": "" }, { "docid": "b17906485bb172798dfb82d6144d81ce", "score": "0.57750535", "text": "function simplehooks_get_option( $hook = null, $field = null, $all = false ) {\r\n\r\n\tstatic $options = array();\r\n\r\n\t$options = $options ? $options : get_option( Genesis_Simple_Hooks()->settings_field );\r\n\r\n\tif ( $all ) {\r\n\t\treturn $options;\r\n\t}\r\n\r\n\tif ( ! array_key_exists( $hook, (array) $options ) )\r\n\t\treturn '';\r\n\r\n\t$option = isset( $options[$hook][$field] ) ? $options[$hook][$field] : '';\r\n\r\n\treturn wp_kses_stripslashes( wp_kses_decode_entities( $option ) );\r\n\r\n}", "title": "" }, { "docid": "f381d1a076c3f1eae95c5cd8e3ac128e", "score": "0.5765183", "text": "function get_config_settings()\n {\n\t\tci()->config->load('product_'.ENVIRONMENT, TRUE);\t\t\n\t\treturn ci()->config->item('product_'.ENVIRONMENT); \n }", "title": "" }, { "docid": "6153dee9dd8834aa4b2156c0f97c5790", "score": "0.57608134", "text": "public function update_extension()\n\t{\n\n\t}", "title": "" }, { "docid": "28b5dde17f0ce4ab3348c94fc52eb38a", "score": "0.5750819", "text": "public function addon_setting()\n {\n $i = 0;\n $addons = [];\n\n\n if (! class_exists('WCGC_Auto_Send')) {\n $addons[$i][\"title\"] = __('Auto Send Card', 'woocommerce-gift-cards');\n $addons[$i][\"image\"] = \"\";\n $addons[$i][\"excerpt\"] = __('Save time creating gift cards by using this plugin. Enable it and customers will have their gift card sent out directly upon purchase or payment.', 'woocommerce-gift-cards');\n $addons[$i][\"link\"] = \"https://wp-ronin.com/downloads/auto-send-email-woocommerce-gift-cards/\";\n $i++;\n }\n\n foreach ($addons as $addon) {\n echo '<li class=\"product\" style=\"float:left; margin:0 1em 1em 0 !important; padding:0; vertical-align:top; width:300px;\">';\n echo '<a href=\"' . $addon['link'] . '\">';\n if (! empty($addon['image'])) {\n echo '<img src=\"' . $addon['image'] . '\"/>';\n } else {\n echo '<h3>' . $addon['title'] . '</h3>';\n }\n echo '<p>' . $addon['excerpt'] . '</p>';\n echo '</a>';\n echo '</li>';\n } ?>\n\t\t</ul>\n\t\t</div>\n\t\t<?php\n }", "title": "" }, { "docid": "4ae1cad686edcb195f768639b23a0c8e", "score": "0.57469386", "text": "public static function getExtensions()\n\t{\n\t\treturn array_keys(self::$typeMap);\n\t}", "title": "" }, { "docid": "bad5586058cc1c54524ce9bc0f1a24a3", "score": "0.57436", "text": "function getInstalledPackages()\r\n {\r\n }", "title": "" }, { "docid": "fdd2ead277f2239dd84d141f0aceff3c", "score": "0.57416147", "text": "public function getExtensions() {\n return [];\n }", "title": "" }, { "docid": "1668d49f0b95426ac708b5872d84ae41", "score": "0.57373595", "text": "public function getCampaignExtensionSetting()\n {\n return $this->campaign_extension_setting;\n }", "title": "" }, { "docid": "eb5a61199fde6605fd650f5877c36c8b", "score": "0.57300633", "text": "function _getExtensions() {\n\t\t$exts = array($this->ext);\n\t\tif ($this->ext !== '.ctp') {\n\t\t\tarray_push($exts, '.ctp');\n\t\t}\n\t\treturn $exts;\n\t}", "title": "" }, { "docid": "0d24efd327dc271837c71f6478516ab9", "score": "0.57270694", "text": "function settings()\n\t{\n\t\t$settings = array();\n\n\t\t$settings['available_languages'] = BBR_LS_default_settings;\n\t\t$settings['default_language']\t = BBR_LS_default_language;\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "072e1a3cea6208196b66297b90340cd6", "score": "0.5724861", "text": "public static function load_hooks() {\n\n\t\t\t/* Save settings */\n\t\t\tadd_action('admin_init', array(__CLASS__, 'load_save_settings'), 10);\n\n\t\t\t/* Save settings */\n\t\t\tadd_action('admin_init', array(__CLASS__, 'load_oauth_connector'), 11);\n\n\t\t\t/* Oauth confirm listeners */\n\t\t\tadd_action('admin_init', array(__CLASS__, 'load_oauth_listeners'), 12);\n\n\t\t\t/* Add sub-menu to Leads admin menu */\n\t\t\tadd_action('admin_menu', array(__CLASS__, 'prepare_admin_menu'));\n\n\t\t\t/* Add css & inline js */\n\t\t\tadd_action('admin_footer', array(__CLASS__, 'load_inline_css'));\n\t\t\tadd_action('admin_footer', array(__CLASS__, 'load_inline_js'));\n\n\t\t\t/* Enqueue JS * CSS */\n\t\t\tadd_action('admin_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));\n\n\t\t\t/* add ajax listener for setting saves */\n\t\t\tadd_action('wp_ajax_inbound_ga_toggle_insert', array(__CLASS__, 'toggle_insert_mode'));\n\n\t\t\t/* Add settings to inbound pro */\n\t\t\tadd_filter('inbound_settings/extend', array(__CLASS__, 'define_pro_settings'));\n\n\n\t\t\tadd_filter(\"inbound-ananlytics/quick-view\", array(__CLASS__, 'switch_quick_view_template'), 50, 1);\n\n\n\t\t}", "title": "" } ]
b80a8bb8e98ab970fcf5879540ed3e57
Invokes the method $alias, with the provided arguments. Implementers must be sure that all exceptions that are propagated subclass from RuntimeException. Exceptions caused in the Dispatch implementation itself should subclass RuntimeException (and implement ResponseExceptionInterface if they need to be reported to clients), and exceptions sent from the invoked functions should be wrapped in a RuntimeException. If the wrapped exception implements ResponseExceptionInterface it wll also be exposed.
[ { "docid": "aed056515f734d6ed5af161027147653", "score": "0.7589882", "text": "public function invoke($alias, $arguments);", "title": "" } ]
[ { "docid": "15b206d75bb1e015b74de8392800226c", "score": "0.6020662", "text": "public function __call($called, $args = array())\n {\n // Iterate through methods\n foreach (self::$__aliases as $method => $shortcuts) {\n\n // Check against known aliases\n if (in_array($called, $shortcuts)) {\n\n // Dynamic method (alias) call with arbitrary arguments\n return call_user_func_array([__CLASS__, $method], $args);\n }\n }\n\n // Class or method could not be found in aliases or methods\n throw new \\Exception(__CLASS__.'->'.$called.'() could not be resolved.');\n }", "title": "" }, { "docid": "19c2ede4cc55618c1f945da0b0b43058", "score": "0.59402823", "text": "public function __invoke(mixed ...$parameters): mixed;", "title": "" }, { "docid": "7790eb8d41479aa113cb9652c3f924e4", "score": "0.59029484", "text": "public function __call($name, $arguments)\n {\n if (isset($this->methodAliases[$name])) {\n return $this->{$this->methodAliases[$name]}(...$arguments);\n }\n\n throw new RuntimeException(\"The {$name} function is not defined!\");\n }", "title": "" }, { "docid": "501986923264b7f2413a064d6c8eacdb", "score": "0.5722113", "text": "public function __call($method, $parameters);", "title": "" }, { "docid": "501986923264b7f2413a064d6c8eacdb", "score": "0.5722113", "text": "public function __call($method, $parameters);", "title": "" }, { "docid": "7b6e747f1b2a9e416128ca301984c724", "score": "0.5704915", "text": "public function __invoke(/* $arguments */)\n {\n return $this->call(func_get_args());\n }", "title": "" }, { "docid": "a153fd1d5371b5f5e7c2f6b6723f4921", "score": "0.5664718", "text": "public function __call($method, $arguments);", "title": "" }, { "docid": "bffad63e35ca73dd97870f1aa74dff2a", "score": "0.5599908", "text": "public function __invoke($arguments = [])\n {\n $callable = $this->callable;\n $callable($arguments);\n }", "title": "" }, { "docid": "4a29881be55bd86e9da4b5e73ad8151f", "score": "0.55872226", "text": "function __call($methodName, $args)\n {\n return $this->_forward('notfound','error','default');\n }", "title": "" }, { "docid": "6946d4f32887b7596bc047e74b5f701a", "score": "0.55685157", "text": "public function __call($method, $parameters)\n\t{\n\t\tthrow new Exception('Unknown Action.');\n\t}", "title": "" }, { "docid": "c2bb6f959a0ef9035dac032d7343a657", "score": "0.55462974", "text": "public function __call(string $method, array $arguments);", "title": "" }, { "docid": "a31f5c3b7ae7dde7729548993e187894", "score": "0.54704005", "text": "public function __call($name, $arguments) {\n throw new MethodNotFoundException(sprintf( 'method \"%s\" does not exist in class \"%s\"', $name, __CLASS__));\n }", "title": "" }, { "docid": "b8c836a04c6e7726629000b1d2ce43d1", "score": "0.54576576", "text": "public function __invoke(array $parameters = array());", "title": "" }, { "docid": "b5527bae3cb38645c8fe6c6f00230efb", "score": "0.5452604", "text": "public function __call($method, $arguments=null) {}", "title": "" }, { "docid": "16f3d406eeecabf2417f6b63aa521494", "score": "0.5449053", "text": "private function dispatch(){\n $args = func_get_args()[0];\n $end = count($args) - 1;\n if(is_assoc_array($args[$end])){\n $kwargs = $args[$end];\n unset($args[$end]);\n }\n else{\n $kwargs = array();\n }\n $method = debug_backtrace()[1]['function'];\n $tocall = Concourse\\Dispatcher::send($method, $args, $kwargs);\n $callback = array($this->client, array_keys($tocall)[0]);\n $params = array_values($tocall)[0];\n $params[] = $this->creds;\n $params[] = $this->transaction;\n $params[] = $this->environment;\n return call_user_func_array($callback, $params);\n }", "title": "" }, { "docid": "026b352a8278c2ff512ad416da5f8c21", "score": "0.54367757", "text": "public function __call($name, $arguments) \n {\n if(!method_exists('ILibrary', $name))\n throw new Exception(\"Unknown method `$name` in ILibrary interface.\");\n \n return $this->proxy('callMethod', $name, $arguments);\n }", "title": "" }, { "docid": "2483d52e7adf5f9f2d0cebf460ee23b5", "score": "0.5412634", "text": "public function perform(...$args);", "title": "" }, { "docid": "45fe97aa7dc5692a9b5fa95e8254157e", "score": "0.5392032", "text": "public function callAction($method, $parameters)\n {\n if ($method === '__invoke') {\n return call_user_func_array([$this, $method], $parameters);\n }\n throw new BadMethodCallException('Only __invoke method can be called on handler.');\n }", "title": "" }, { "docid": "24e0dc707cd6a99e42fc63f378e5e4d4", "score": "0.53887624", "text": "final function __call($name, $arguments) {\n\t\t$classDescriptor = self::getClassDescriptor($this);\n\t\t\n\t\t$attachedMethod = $classDescriptor->getAttachedMethod($name);\n\t\tif($attachedMethod !== false) {\n\t\t\t$object = $attachedMethod->object;\n\t\t\t$method = $attachedMethod->method;\n\t\t\tarray_unshift($arguments, $this);\n\t\t\t$reflectedMethod = new ReflectionMethod($object, $method);\n\t\t\treturn $reflectedMethod->invokeArgs($object, $arguments);\n\t\t\t// return call_user_func_array($method, $object, $arguments);\n\t\t} else {\n\t\t\tthrow new RecessException('\"' . get_class($this) . '\" class does not contain a method or an attached method named \"' . $name . '\".', get_defined_vars());\n\t\t}\n\t}", "title": "" }, { "docid": "928e463971cd633ed2fe6ef5ee60a343", "score": "0.5359764", "text": "public function execute(array $arguments) {\n\t\tif (empty($arguments)) throw new \\BadFunctionCallException('MethodInvoke: No parameters found.');\n\t\t\n\t\tif (is_null($this->method)) {\n\t\t\tif (!isset($arguments[1])) throw new \\BadFunctionCallException('MethodInvoke: No instance defined.');\n\t\t\t//check method type\n\t\t\tif (!is_string($arguments[0]))\n\t\t\t\tthrow new \\InvalidArgumentException(sprintf(\"MethodInvoke: A value of type string was expected as first argument but %s found instead.\", gettype($arguments[0])));\n\t\t\t//check istance type\n\t\t\tif (!is_object($arguments[1]))\n\t\t\t\tthrow new \\InvalidArgumentException(sprintf(\"MethodInvoke: A value of type object was expected but %s found instead.\", gettype($arguments[1])));\n\t\t\t$method = $arguments[0];\n\t\t\t$instance = $arguments[1];\n\t\t\t$parameters = array_slice($arguments, 2);\n\t\t}\n\t\telse {\n\t\t\tif (!is_object($arguments[0]))\n\t\t\t\tthrow new \\InvalidArgumentException(sprintf(\"MethodInvoke: A value of type object was expected but %s found instead.\", gettype($arguments[0])));\n\t\t\t$method = $this->method;\n\t\t\t$instance = $arguments[0];\n\t\t\t$parameters = array_slice($arguments, 1);\n\t\t}\n\n\t\t//check method existence\n\t\tif (!method_exists($instance, $method)) {\n\t\t\tif (!method_exists($instance, '__call')) throw new \\InvalidArgumentException(sprintf(\"MethodInvoke: Method '$method' was not found on instance of '%s'.\", get_class($instance)));\n\t\t\treturn call_user_func([$instance, '__call'], $method, $parameters);\n\t\t}\n\t\t\n\t\t//check method access and required parameters\n\t\t$rm = new \\ReflectionMethod($instance, $method);\n\t\tif (!$rm->isPublic()) throw new \\BadMethodCallException(sprintf(\"Method '%s' does not have public access.\", $method));\n\t\tif ($rm->getNumberOfRequiredParameters() > count($parameters))\n\t\t\tthrow new \\BadMethodCallException(sprintf(\"Method '%s' expects at least %d argument(s).\", $method, $rm->getNumberOfRequiredParameters()));\n\t\treturn call_user_func_array(array($instance, $method), $parameters);\n\t}", "title": "" }, { "docid": "a60deeb6f31dac4851e702ff32a1780b", "score": "0.5356037", "text": "public function __call($method, $parameters)\n\t{\n\t\tif( ! in_array($method, $this->proxy) )\n\t\t{\n\t\t\tthrow new \\BadFunctionCallException(get_class($this->target) . \"::\" . $method . ' is undefined or private, cannot used for proxy');\n\t\t}\n\n\t\treturn $this\n\t\t\t->target\n\t\t\t->then($this->then)\n\t\t\t->{$method}(... $parameters);\n\t}", "title": "" }, { "docid": "9888a5a0d182a8159e64f278ff968d36", "score": "0.5345035", "text": "abstract public function __invoke(Request $req, Response $res, array $args);", "title": "" }, { "docid": "c194c2bef788adbb8f65c84a42a51489", "score": "0.5341399", "text": "public function __call($method, array $params);", "title": "" }, { "docid": "79b5c1024ae61a224c675bd4ac35527f", "score": "0.5327304", "text": "public function __call($name, $args) {\n if ($this->response->getReflection()->hasMethod($name)) {\n return call_user_func_array(array($this->response, $name), $args);\n } else {\n return parent::__call($name, $args);\n }\n\t}", "title": "" }, { "docid": "24a96abef1c85bcf4e5bed53d5055279", "score": "0.53266835", "text": "public static function __callStatic($called, $args = array())\n {\n // Iterate through methods\n foreach (self::$__aliases as $method => $shortcuts) {\n\n // Check against known aliases\n if (in_array($called, $shortcuts)) {\n\n // Dynamic method (alias) call with arbitrary arguments\n return call_user_func_array([__CLASS__, $method], $args);\n }\n }\n\n // Class or method could not be found in aliases or methods\n throw new \\Exception(__CLASS__.'::'.$called.'() could not be resolved.');\n }", "title": "" }, { "docid": "e83ba62338187f36367682f5949fc3ba", "score": "0.53114074", "text": "public function handleInvocation($method, $args);", "title": "" }, { "docid": "ae75c5c1a042264aa7073309fed615f6", "score": "0.52950084", "text": "public function run(string $query, iterable $parameters = [], ?string $alias = null);", "title": "" }, { "docid": "336fea56a37f5117b889ca66cdb2a2d9", "score": "0.52728724", "text": "public function __invoke(...$arguments)\n {\n $trace = last(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 2));\n $parameters = Arr::get($trace, 'args.1');\n\n return $this->handleRequest($parameters);\n }", "title": "" }, { "docid": "92124c6935f8f1d95e7a7bdce50fb661", "score": "0.52696747", "text": "public function invoke(array $params);", "title": "" }, { "docid": "9f4d787d2eb57b7574355f67cb073ff7", "score": "0.5267756", "text": "public function __call($name, $arguments)\n {\n /**\n * Extract the magic method call and the index used for the magic method.\n */\n $functionName = substr($name, 0, 3);\n $index = substr($name, 3);\n\n /**\n * Put the index at the beginning of the argument list,\n * and call the requested magic method for the given arguments.\n */\n array_unshift($arguments, lcfirst($index));\n if (in_array($functionName, $this->magicMethods)) {\n /**\n * Return the result of the magic function.\n */\n return call_user_func_array(array($this, $functionName), (array) $arguments);\n }\n\n /**\n * TODO: rename this function.\n */\n $addonResult = $this->checkAddonsForFunctions($name, $arguments);\n if ($addonResult) {\n return $addonResult;\n }\n\n throw new \\Exception(\n sprintf(self::ERROR_MAGIC_METHOD_UNDEFINED, $name),\n self::ERROR_MAGIC_METHOD_UNDEFINED_CODE\n );\n }", "title": "" }, { "docid": "d2cad36db7e8818aaa8d82855d35fc16", "score": "0.5266279", "text": "public static function __callStatic($name, array $arguments)\n {\n $dispatcher = static::get();\n if (method_exists($dispatcher, $name)) {\n return call_user_func_array([$dispatcher, $name], $arguments);\n }\n\n throw new Exception\\BadMethodCallException(\n Message::get(\n Message::METHOD_NOT_FOUND,\n get_called_class(),\n $name\n ),\n Message::METHOD_NOT_FOUND\n );\n }", "title": "" }, { "docid": "cd926e05e4531d3926d37c35b39a517b", "score": "0.52602535", "text": "public function __call($name, $args)\n {\n if (!$this->_isSending) {\n throw new Exception('Application helpers may not be called through the response object.');\n }\n \n array_unshift($args, $this->_application);\n\n return call_user_func_array(array($this->_application->getHelper($name), 'help'), $args);\n }", "title": "" }, { "docid": "dc2e4926f960b14d898d164362125c78", "score": "0.5253148", "text": "public function __call($methodName, array $arguments)\n {\n }", "title": "" }, { "docid": "271883cb539e43b757496f179cf7c308", "score": "0.5235623", "text": "abstract protected function doExecute(array $arguments);", "title": "" }, { "docid": "4fded5bac9119e5a09a62a3905964c71", "score": "0.5210859", "text": "function __call($methodName, array $args)\n {\n if (!$this->hasMethod($methodName))\n throw new \\RunTimeException('There is no method with the given name to call');\n\n $methodCallable = $this->_t__methods[$methodName];\n ## bind it into latest bind object\n $methodCallable = \\Closure::bind(\n $methodCallable\n , $this->getBindTo()\n , get_class($this->getBindTo())\n );\n\n return call_user_func_array($methodCallable, $args);\n }", "title": "" }, { "docid": "9195a17c4cabd40fbfd5f5910b7e128d", "score": "0.5205792", "text": "public function __invoke($request, $response, $args) {\n \t}", "title": "" }, { "docid": "9195a17c4cabd40fbfd5f5910b7e128d", "score": "0.5205792", "text": "public function __invoke($request, $response, $args) {\n \t}", "title": "" }, { "docid": "9195a17c4cabd40fbfd5f5910b7e128d", "score": "0.5205792", "text": "public function __invoke($request, $response, $args) {\n \t}", "title": "" }, { "docid": "8722524da4f01548f6ed927a2edad8ea", "score": "0.52020335", "text": "function __call($method, $arguments)\n {\n if($this->isWrapped() &&\n method_exists($this->wrapper, $method)) {\n return call_user_func_array([$this->wrapper, $method], $arguments);\n }\n \n throw new \\BadMethodCallException;\n }", "title": "" }, { "docid": "54fac2db051017e58220e19ccfeb7b2c", "score": "0.5186205", "text": "public function __call($methodName, $args) {\n $method = null;\n if (preg_match('/^(.*?)Action$/', $methodName, $method)) {\n try {\n $this->returnedValue = MethodInvoker::invoke($this, $method[1], $args);\n } catch (BadMethodCallException $exc) {\n parent::__call($methodName, $args);\n } catch (UnAuthorizedException $e) {\n $this->unAuthorizedExceptionHandler($e);\n }\n } else {\n parent::__call($methodName, $args);\n }\n }", "title": "" }, { "docid": "7d337a4e42e36fafe61c9207532b12a5", "score": "0.51727587", "text": "public function delegateCall($name, $arguments)\n {\n return call_user_func_array([$this->legacy_handler, $name], $arguments);\n }", "title": "" }, { "docid": "383a4da0904ee6c7c83d49f5c94951fb", "score": "0.51714283", "text": "public function __call($methodName, array $arguments) {\n\t}", "title": "" }, { "docid": "a747edb47fa810d36f05cf9c7a013ff9", "score": "0.51355183", "text": "public function __call($name, array $arguments) {\n\t\tswitch ($name) {\n\t\t\tcase 'renderFlashMessages':\n\t\t\t\treturn $this->renderFlashMessages();\n\t\t\t\tbreak;\n\t\t\tcase 'getAllMessagesAndFlush':\n\t\t\t\treturn $this->getAllMessagesAndFlush();\n\t\t\t\tbreak;\n\t\t\tcase 'getAllMessages':\n\t\t\t\treturn $this->getAllMessages();\n\t\t\t\tbreak;\n\t\t\tcase 'addMessage':\n\t\t\t\t$this->enqueue(current($arguments));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new RuntimeException('The requested method \"' . $name . '\" cannot be called via __call.', 1363300072);\n\t\t}\n\t}", "title": "" }, { "docid": "6897591f1fd136b7287e6bcd6af5e93f", "score": "0.5134601", "text": "public function invoke( array $arguments = [] ) // : mixed\n {\n if (( $type = $this->getType() )=== Types::TYPE_UNKNOWN ) {\n // TODO: Throw\n }\n\n // Handle constructor edge case\n if ( $type === Types::_CONSTRUCT ) {\n $arguments = [$arguments];\n }\n\n // Let's go!\n return ($this->callable)( ...$arguments );\n }", "title": "" }, { "docid": "477701438e744e7f7d13c37de305c1b0", "score": "0.5121786", "text": "public function __call($method, $parameters)\n {\n }", "title": "" }, { "docid": "7176a79b1dfdcfd202eb7e9c88743984", "score": "0.5117886", "text": "public function __invoke(...$args)\n {\n }", "title": "" }, { "docid": "3beaa66659244d1cb25627a3644d7a3e", "score": "0.5108474", "text": "public function __call($name, $arguments)\n\t{\n\t\t$method = \"action\".$name;\n\n\t\tif (method_exists($this, $method)) {\n\t\t\tif ($this->before() !== false) {\n\t\t\t\tcall_user_func_array([$this, $method], $arguments);\n\t\t\t}\n\t\t} else {\n\t\t\theader('Location: /404');\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "b76ddb0b700dffc5a01e6b325b077fcd", "score": "0.51016945", "text": "public function __call($name, $arguments) {\n\t\tif (!method_exists($this->optionHandler, $name)) {\n\t\t\tthrow new SystemException(\"unknown method '\".$name.\"'\");\n\t\t}\n\n\t\treturn call_user_func_array(array($this->optionHandler, $name), $arguments);\n\t}", "title": "" }, { "docid": "ef99b3255b6a7421a3b40baa7c35de4b", "score": "0.5096074", "text": "public function __call($method, $parameters)\n {\n if (method_exists($this->original, $method) === true)\n {\n $class = array($this->original, $method);\n\n return call_user_func_array($class, $parameters);\n }\n\n if (method_exists($this->application, $method))\n {\n $class = array($this->application, $method);\n\n return call_user_func_array($class, $parameters);\n }\n\n $message = 'Method \"' . $method . '\" is undefined!';\n\n throw new \\BadMethodCallException((string) $message);\n }", "title": "" }, { "docid": "65869225c513a062724b2f952b0fcc41", "score": "0.50901276", "text": "public function call(array $args = null);", "title": "" }, { "docid": "9765e17bd2d68dc874080286ef248a74", "score": "0.50713086", "text": "public function __call($name, array $arguments)\n\t{\n\t\t$e = new InvalidMethodCallException(\"Method '$name' is not callable.\");\n\t\tif (strlen($name) < 4) {\n\t\t\tthrow $e;\n\t\t}\n\t\tif (substr($name, 0, 3) === 'get') {\n\t\t\treturn $this->__get(lcfirst(substr($name, 3)), $arguments);\n\t\t} elseif (substr($name, 0, 3) === 'set') {\n\t\t\t$this->__set(lcfirst(substr($name, 3)), $arguments);\n\t\t} elseif (substr($name, 0, 5) === 'addTo' and strlen($name) > 5) {\n\t\t\t$this->addTo(lcfirst(substr($name, 5)), array_shift($arguments));\n\t\t} elseif (substr($name, 0, 10) === 'removeFrom' and strlen($name) > 10) {\n\t\t\t$this->removeFrom(lcfirst(substr($name, 10)), array_shift($arguments));\n\t\t} else if (substr($name, 0, 2) === 'on' and strlen($name) > 2) { // Podpora událostí...\t\t\t\n\t\t\treturn ObjectMixin::call($this, $name, $arguments);\n\t\t} else {\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "9cad868d23688a85f958303fc01f01fa", "score": "0.50677055", "text": "public function __invoke()\n {\n return $this->call(func_get_args());\n }", "title": "" }, { "docid": "c34ad7af3cf774c6e0f763293b53ee8a", "score": "0.506269", "text": "public function __call($name, $arguments) {\n throw new \\BadMethodCallException('There is no method named \"' . $name . '\" in this object!');\n }", "title": "" }, { "docid": "df2f4989ac7543cf94b6527fd4ef365b", "score": "0.5049362", "text": "function __call($methodName, $args)\n {\n return $this->_redirect($this->_baseUrl . '/mobile/error/notfound');\n }", "title": "" }, { "docid": "df2f4989ac7543cf94b6527fd4ef365b", "score": "0.5049362", "text": "function __call($methodName, $args)\n {\n return $this->_redirect($this->_baseUrl . '/mobile/error/notfound');\n }", "title": "" }, { "docid": "e52a297c5a819b2134266c567b97fa12", "score": "0.5031478", "text": "public function __call($func, $params) {\n\n\t\tif (isset($this->$func) && is_callable($this->$func)) {\n\n\t\t\t$call = $this->$func;\n\n\t\t\tswitch(count($params)) {\n\t\t\t\tcase 0 :\n\t\t\t\t\treturn $call();\n\t\t\t\tcase 1 :\n\t\t\t\t\treturn $call($params[0]);\n\t\t\t\tcase 2 :\n\t\t\t\t\treturn $call($params[0], $params[1]);\n\t\t\t\tcase 3 :\n\t\t\t\t\treturn $call($params[0], $params[1], $params[2]);\n\t\t\t\tcase 4 :\n\t\t\t\t\treturn $call($params[0], $params[1], $params[2], $params[3]);\n\t\t\t\tdefault :\n\t\t\t\t\treturn call_user_func_array($call, $params);\n\t\t\t}\n\t\t}\n\n\t\tthrow new \\BadMethodCallException(\"Unknown method '$func'.\");\n\t}", "title": "" }, { "docid": "2d0c1daa71089cf28f47f275f92b8a5e", "score": "0.50244427", "text": "public function __call(string $name, array $args): void {\n // 404\n if ($name == \"not_found\") {\n // $args[0] == method in this case\n $this->not_found = $args[0];\n return;\n }\n\n // push a null at end to prevent undefined offset error\n $args[] = null;\n\n // destructure arguments\n list($route, $method, $content_type) = $args;\n\n // check if method is supported\n if(!in_array(strtoupper($name), $this->supportedHttpMethods)) {\n $this->invalidMethodHandler();\n }\n\n // assign method[route] = function\n $this->{strtolower($name)}[$this->formatRoute($route, true)] = array($method, $content_type);\n }", "title": "" }, { "docid": "35b15fc71730ed0f00c9861dd00eeecd", "score": "0.50220686", "text": "public function __call($name, $args);", "title": "" }, { "docid": "35b15fc71730ed0f00c9861dd00eeecd", "score": "0.50220686", "text": "public function __call($name, $args);", "title": "" }, { "docid": "29bc580f27a553f9358a4bb9f9fbbbaa", "score": "0.5011829", "text": "public function __call($name, $parameters)\n\t{\n\t\tif(is_callable(array($this->pbx,$name))) {\n\t\t\t\n\t\t\t$ret = call_user_func_array(array($this->pbx,$name),$parameters);\n\t\t\t\n\t\n\t\t\tswitch (strtolower($name)) {\n\t\t\t\tcase \"dial\":\n\t\t\t\t\t$this->addHistory(\"Originate\", $parameters[0], $ret);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn $ret;\n\t\t\t\n\t\t}\n\t\t\n\t\tthrow new BadMethodCallException();\n\t\t\n\t}", "title": "" }, { "docid": "edb57252c72b61a7b6556f7be63291b3", "score": "0.500655", "text": "public function __call($name, $arguments) {\r\n\t\tif ($this->actions) {\r\n\t\t\t$actionName = ucfirst($name);\r\n\t\t\t$actions = array_keys($this->actions);\r\n\t\t\tif (in_array($actionName, $actions)) {\r\n\t\t\t\t$class = $actionName;\r\n\t\t\t\tif (isset($this->actions[$actionName])) {\r\n\t\t\t\t\t$class = $this->actions[$actionName];\r\n\t\t\t\t}\r\n\t\t\t\tif (!class_exists($class)) {\r\n\t\t\t\t\t//look in framework\r\n\t\t\t\t\t$class = '\\\\k\\\\app\\\\action\\\\' . $class;\r\n\t\t\t\t\tif (!class_exists($class)) {\r\n\t\t\t\t\t\tthrow new RuntimeException(\"Action '$actionName' does not exist\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$o = new $class($this);\r\n\t\t\t\t$r = call_user_func_array(array($o, 'run'), $arguments);\r\n\t\t\t\treturn $r;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "79ea1f74aa87cbfe6cbfed8c378c5221", "score": "0.50028396", "text": "final public function __call($name, array $arguments){\n\t\t\tif(isset($this->data[$name]) === false){\n\t\t\t\tthrow new BadMethodCallException('The requested method does not exist');\n\t\t\t}else if(is_callable($this->data[$name]) === false){\n\t\t\t\tthrow new BadMethodCallException('A value was found with the specified name, but it was not callable.');\n\t\t\t}\n\t\t\treturn call_user_func_array($this->data[$name], $arguments);\n\t\t}", "title": "" }, { "docid": "edaec68bd599ec354d0a112878733fdd", "score": "0.49985912", "text": "public function __call($name, $arguments)\n {\n if (empty($arguments)) {\n return $this->exchange->$name();\n } else {\n $count = count($arguments);\n if ($count == 1) {\n return $this->exchange->$name($arguments[0]);\n } else if ($count == 2) {\n return $this->exchange->$name($arguments[0], $arguments[1]);\n } else if ($count == 3) {\n return $this->exchange->$name($arguments[0], $arguments[1], $arguments[2]);\n } elseif ($count == 4) {\n return $this->exchange->$name($arguments[0], $arguments[1], $arguments[2], $arguments[3]);\n } elseif ($count == 5) {\n return $this->exchange->$name($arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4]);\n } else {\n throw new \\Exception('too many parm');\n }\n }\n }", "title": "" }, { "docid": "a868e819d20f69e1dbcf75d1dbb58fb3", "score": "0.4993779", "text": "public function __call($name, $arguments) {\r\n return call_user_func_array([$this->handler,$name],$arguments);\r\n }", "title": "" }, { "docid": "53df71df4ef6105df0e277ca2fa0ca7e", "score": "0.49928007", "text": "function sms_service_client_invoke($method) {\n $args = func_get_args();\n // Lose the method.\n array_shift($args);\n $client = sms_service_client();\n\n try {\n $result = call_user_func_array(array($client, $method), $args);\n } catch (Exception $e) {\n watchdog('alma', '@method error: “@message”', array('@method' => $method, '@message' => $e->getMessage()), WATCHDOG_ERROR);\n throw $e;\n }\n\n return $result;\n}", "title": "" }, { "docid": "b09130f8e9d06737f788fe319f2acadf", "score": "0.4987152", "text": "public function __call($name, $arguments) {\n // Note: value of $name is case sensitive.\n $message = \"Calling method '$name' caused errors. Route does not exist.\";\n $this->error($message);\n return;\n }", "title": "" }, { "docid": "d7d7e185738b5f8777f655068ef45050", "score": "0.498235", "text": "public function dispatch(): void;", "title": "" }, { "docid": "c41c226c38d45e0411c786ff47e5eb11", "score": "0.49781352", "text": "public function __call($method, $parameters)\n {\n if (isset($this->macros[$method])) {\n array_unshift($parameters, $this);\n\n return call_user_func_array($this->macros[$method], $parameters);\n }\n\n if (in_array($method, $this->blacklist)) {\n throw new Exception(\"Method $method doesn't exist\");\n }\n\n $result = call_user_func_array([$this->query, $method], $parameters);\n\n return in_array($method, $this->passthru) ? $result : $this;\n }", "title": "" }, { "docid": "7b603b3e271fb3ed893daf41715082ce", "score": "0.49756083", "text": "function __call($method, $args) {\n \t/* convert everything to lower case,\n \t * so people can use what they prefer */\n $method = strtolower($method);\n\n \t/* aliases */\n \tswitch ($method) {\n \t\tcase \"sethandler\":\n \t\t\t$method = \"sethandle\";\n \t\t\tbreak;\n \t\tcase \"handler\":\n \t\t\t$method = \"handle\";\n \t\t\tbreak;\n \t}\n\n \t/* check if maybe a method of this class was meant\n \t * (and a not lowercase method was called, or an alias) */ \t\n if (method_exists($this, $method)) {\n return call_user_func_array(array($this, $method), $args);\n }\n \n\t\t/* check if php gd function exists */\n if (!function_exists(\"image\".$method)) {\n throw new ImageException(\"Function 'image\".$method.\n\t\t\t\t\t\"' doesn't exist.\");\n }\n\n\t\t/* php gd functions want an image handle as first parameter */\n if ($this->handle())\n $args = array_merge(array($this->handle()), $args);\n\n $ret = call_user_func_array(\"image\".$method, $args);\n\n\t\t/* some php functions return an image handle; we always change\n\t\t * our own image, because it is not common to edit multiple images\n * at the same time, so most times this is wanted; if not, user has\n * to create a copy of this image before */\n if (is_resource($ret))\n $this->sethandle($ret);\n\n return $ret;\n }", "title": "" }, { "docid": "85c93a6e2a3c19f8bbab14cf43267229", "score": "0.49753237", "text": "public function __call($name, $arguments)\n\t{\n\t\tif ( method_exists($this, $name) )\n\t\t{\n\t\t\treturn call_user_func_array(array($this, $name), $arguments);\n\t\t}\n\t\telse if ( is_object($this->driver)\n\t\t && is_callable(array($this->driver, $name)) )\n\t\t{\n\t\t\treturn call_user_func_array(array($this->driver, $name), $arguments);\n\t\t}\n\t\tthrow new BadMethodCallException('Undefined method called ' . get_class($this) . '::' . $name . '.');\n\t}", "title": "" }, { "docid": "962d9db6968a1248a8572f7b8dfa1d76", "score": "0.49611503", "text": "public function __invoke(...$parameters)\n\t{\n\t\treturn call_user_func_array($this->getCallable($this->callback), $parameters);\n\t}", "title": "" }, { "docid": "7c79d320ebfccd073e3297f65dce2a69", "score": "0.4960583", "text": "public function __call($method, $arguments)\n {\n $variables = get_object_vars($this);\n if (isset($variables[$method]) && is_callable($variables[$method])) {\n return call_user_func_array($variables[$method], $arguments);\n }\n throw new RuntimeException(\"Method {$method} does not exist\");\n }", "title": "" }, { "docid": "e7ffdf4823198148bdf9340a2c9369d6", "score": "0.49596772", "text": "public function invoke($paramArgs = null){\n if($paramArgs == null && $this->signatureParamCount > 0)\n throw new IllegalArgumentException(\"Can't invoke the functions, arguments missing.\");\n $backtrace = debug_backtrace();\n if(!isset($backtrace[1]['class']))\n throw new Exception(\"Can't invoke an event outside a class!\");\n if($this->invoker != $backtrace[1]['class'])\n throw new Exception(\"Can't invoke the event from a different class than the class where it was initted.\");\n $fixedArgs = array();\n if($paramArgs != null){\n $c = 0;\n foreach($paramArgs as $arg){\n if($c >= $this->signatureParamCount) break;\n $fixedArgs[$c] = $arg;\n $c++;\n }\n }\n foreach($this->functions as $function){\n if(($function instanceof Closure) == false) continue;\n call_user_func_array($function, $fixedArgs);\n }\n foreach($this->methods as $method){\n call_user_method_array($method[0], $method[1], $fixedArgs);\n }\n }", "title": "" }, { "docid": "2820afc4757445a87d2114f838f7e07f", "score": "0.4959601", "text": "public function __call($name, $arguments)\n {\n if (strpos($name, 'do') !== false) {\n $start = microtime(true);\n $result = $this->client->$name($arguments[0], $arguments[1]);\n $this->logCall($start, $name, $arguments, $result);\n } elseif (count($arguments) == 1) {\n $result = $this->client->$name($arguments[0]);\n } elseif (count($arguments) > 1) {\n $result = $this->client->$name($arguments);\n } else {\n $result = $this->client->$name();\n }\n\n return $result;\n }", "title": "" }, { "docid": "d95ad8fdede5b1e70ac46843e5e4af70", "score": "0.49515858", "text": "public function dispatch();", "title": "" }, { "docid": "d95ad8fdede5b1e70ac46843e5e4af70", "score": "0.49515858", "text": "public function dispatch();", "title": "" }, { "docid": "d95ad8fdede5b1e70ac46843e5e4af70", "score": "0.49515858", "text": "public function dispatch();", "title": "" }, { "docid": "7c28a23b1a6219cf58ad3a45253ef9ac", "score": "0.49459955", "text": "public function __call($name, $arguments) {\n if (method_exists($this->driver, $name)) {\n return call_user_func_array(array($this->driver, $name), $arguments);\n } else {\n throw new Exception(\"Tried to call nonexistent method $name with arguments:\\n\" . print_r($arguments, true));\n }\n }", "title": "" }, { "docid": "db59b73392d466b6a197908d18923288", "score": "0.4939881", "text": "function __call($name, $arguments)\n {\n if (method_exists($this->peer, $name)) {\n return call_user_func_array([$this->peer, $name], $arguments);\n }\n throw new \\BadMethodCallException();\n }", "title": "" }, { "docid": "a8540a39a3b42837ff09baec04560f98", "score": "0.49356428", "text": "public function __call($FunctionName, $arguments){\n if(!$p=$this->FunctionExist($FunctionName))\n throw new Exception('Unbekannte Funktion '.$FunctionName.' !!!');\n return $this->CallService($p,$FunctionName, $arguments);\n }", "title": "" }, { "docid": "47f3fed9acda5f5227fbcbe996118594", "score": "0.49349347", "text": "function execute($callableOrMethodArr, array $invocationArgs = array(), $makeAccessible = FALSE);", "title": "" }, { "docid": "14d6b6cae00de7a9345ff85143b05b14", "score": "0.4932809", "text": "private function _invoke(array $parameters)\n {\n $actionName = $parameters[\"Action\"];\n $response = array();\n $responseBody = null;\n $statusCode = 200;\n\n /* Submit the request and read response body */\n try {\n\n /* Add required request parameters */\n $parameters = $this->_addRequiredParameters($parameters);\n\n $shouldRetry = true;\n $retries = 0;\n do {\n try {\n $response = $this->_httpPost($parameters);\n if ($response['Status'] === 200) {\n $shouldRetry = false;\n } else {\n if ($response['Status'] === 500 || $response['Status'] === 503) {\n $shouldRetry = true;\n $this->_pauseOnRetry(++$retries, $response['Status']);\n } else {\n throw $this->_reportAnyErrors($response['ResponseBody'], $response['Status']);\n }\n }\n /* Rethrow on deserializer error */\n } catch (Exception $e) {\n require_once ('Amazon/EC2/Exception.php');\n if ($e instanceof Amazon_EC2_Exception) {\n throw $e;\n } else {\n require_once ('Amazon/EC2/Exception.php');\n throw new Amazon_EC2_Exception(array('Exception' => $e, 'Message' => $e->getMessage()));\n }\n }\n\n } while ($shouldRetry);\n\n } catch (Amazon_EC2_Exception $se) {\n throw $se;\n } catch (Exception $t) {\n throw new Amazon_EC2_Exception(array('Exception' => $t, 'Message' => $t->getMessage()));\n }\n\n return $response['ResponseBody'];\n }", "title": "" }, { "docid": "68b9f68776ac6a4e65f0d742ce028feb", "score": "0.49212557", "text": "protected function doInvoke()\n {\n $result = \\call_user_func_array($this->errorController, \\func_get_args());\n if (!($result instanceof Response)) {\n return $result;\n }\n\n $result->setContent($this->grumpifier->filterString($result->getContent()));\n\n return $result;\n }", "title": "" }, { "docid": "a9093575b098c819363b469bf15eb6f4", "score": "0.4917704", "text": "public function dispatch() {\n\t\t$method = $this->action . \"Action\";\n\t\tif(method_exists($this, $method)) {\n\t\t\t$this->$method();\n\t\t} else {\n\t\t\tredirect_to(SITENAME);\n\t\t\tthrow new \\Exception(\"You have to implement a method called\" . $method);\n\t\t}\n\t}", "title": "" }, { "docid": "b0a1f44c923df5ef333a8855d44c5975", "score": "0.49173898", "text": "public static function __callstatic($container_item_name, $args)\n {\n try {\n $container_item_name;\n\n // find alias if the first parameter is not exists in container:\n if (!static::getContainer()->has($container_item_name) && static::hasAlias($container_item_name)) {\n $original_name = static::getAlias($container_item_name);\n $container_item_name = $original_name;\n }\n\n $item = static::getContainer()->get($container_item_name);\n if (is_object($item)) {\n if (method_exists($item, '__invoke') && ( count($args) == 0 || !method_exists($item, reset($args)) ) ) {\n return $item(...$args);\n }\n $item_method_name = array_shift($args);\n $reflection_method = new \\ReflectionMethod($item, $item_method_name);\n return $reflection_method->invokeArgs($item, $args);\n } elseif (is_callable($item)){\n return call_user_func_array($item, $args);\n } else {\n return $item;\n }\n } catch (\\Throwable $e) {\n $throwable_handler = static::getThrowableHandler();\n if ($throwable_handler) {\n return $throwable_handler($e);\n }\n }\n\n throw new \\InvalidArgumentException('not found scalar or callable value: ' . $container_item_name);\n }", "title": "" }, { "docid": "c06695a8e3a818b2a20a70b51974617f", "score": "0.4903433", "text": "public final function __call($method, $args){\n $classname = get_class($this);\n $args = array_merge(array($classname => $this), $args);\n if(isset($this->{$method}) && is_callable($this->{$method})){\n return call_user_func($this->{$method}, $args);\n }else{\n throw new UnknownMethodCallException(\n \"$classname error: call to undefined method $classname::{$method}()\");\n }\n }", "title": "" }, { "docid": "e3fcbd3ea48d25d9ac1333387f713262", "score": "0.49024105", "text": "function __call($methodName, $args)\n {\n return $this->_redirect($this->_baseUrl . '/mobile/parking/error');\n }", "title": "" }, { "docid": "54b807e1b82cc18ebc12d7a2fd9478e2", "score": "0.4900838", "text": "public function request($alias) {\n\t\t$params = func_get_args() ;\n\t\tarray_shift($params) ;\n\t\treturn $this->_new('Request\\\\' . $this->_class($alias), $params) ;\n\t}", "title": "" }, { "docid": "040889562ce71f3941f679cfae48db90", "score": "0.48989102", "text": "function __call( $methodName, $arguments ) {\r\n\t\tcall_user_func(array($this, \"_$methodName\"), $arguments);\r\n\t}", "title": "" }, { "docid": "0759a95eddfe2853a84d60ebc170099b", "score": "0.48969376", "text": "public function __call($name, $arguments) {\n\n }", "title": "" }, { "docid": "63469e58f1a47c55b8219ede8d465076", "score": "0.48962578", "text": "function __call($methodName, $arguments) {\r\n\t\tcall_user_func ( array (\r\n\t\t\t\t$this,\r\n\t\t\t\t\"_$methodName\" \r\n\t\t), $arguments );\r\n\t}", "title": "" }, { "docid": "451d7494714ba075b1fa030730100a9b", "score": "0.48929292", "text": "public function __call($method, $arguments)\n {\n if (in_array($method, array('get', 'post', 'put', 'delete', 'del'))) {\n array_unshift($arguments, strtoupper($method));\n return call_user_func_array(array($this, 'rest'), $arguments);\n }\n\n throw new \\Exception(\"Method $method does not exist.\");\n }", "title": "" }, { "docid": "fbcf02715c35de3e766f762a737ba298", "score": "0.48906952", "text": "public function __call(string $name, array $args)\n\t{\n\t\t$class = method_exists($this, $name) ? 'parent' : get_class($this);\n\t\t$items = (new \\ReflectionClass($this))->getMethods(\\ReflectionMethod::IS_PUBLIC);\n\t\t$hint = ($t = Helpers::getSuggestion($items, $name)) ? \", did you mean $t()?\" : '.';\n\t\tthrow new LogicException(\"Call to undefined method $class::$name()$hint\");\n\t}", "title": "" }, { "docid": "1bbf2487bf0d19e826c7efd8f81d3227", "score": "0.4889633", "text": "public function __call($name, $arguments) {\r\n\t\ttry {\r\n\t\t\t$this->_logger->$name($arguments[0]);\r\n\t\t} catch(Zend_Exception $e) {\r\n\t\t\t// There was an error logging this error, so log that instead! :)\r\n\t\t\t$this->direct($e->getMessage() . \": $name\", Zend_Log::ERR);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "645843b5d0ede38f548098a2a6dbb709", "score": "0.48896188", "text": "public function __call($name, $args)\r\n {\r\n $this->middleware->setAction($name);\r\n\r\n if ($this->middleware->go()) {\r\n $method = $name . 'Action';\r\n if (method_exists($this, $method)) {\r\n if ($this->before() !== false) {\r\n call_user_func_array([$this, $method], $args);\r\n $this->after();\r\n }\r\n } else {\r\n throw new \\Exception(\"Method $method not found in controller \" . get_class($this));\r\n }\r\n return;\r\n }\r\n\r\n return $this->response->setContent([\r\n 'error' => ['message' => $this->language->errors->notPermission],\r\n 'code' => 200\r\n ]);\r\n }", "title": "" }, { "docid": "e53cad30aca4b88ba49e04edf9f51e83", "score": "0.48895043", "text": "public function __call($method, $parameters)\n\t{\n\t\tthrow new \\BadMethodCallException(\"Method [$method] does not exist.\");\n\t}", "title": "" }, { "docid": "2064a4a336db45aaad78f77db5c630b3", "score": "0.48854584", "text": "public function __call(string $name, array $args);", "title": "" }, { "docid": "45aa4e0cf450a2ad493e31e680810012", "score": "0.48826796", "text": "public function __call($method, $parameters)\n {\n return call_user_func_array([$this->response, $method], $parameters);\n }", "title": "" }, { "docid": "97e1498718d30ee7111af55576ade478", "score": "0.48820192", "text": "public function __call($name, $arguments)\n {\n // check that the name starts with get or set\n if (strpos($name, \"get\") === 0) {\n $property = $this->camelToSnake(lcfirst(substr($name, 3)));\n return $this->__get($property);\n }\n\n if (strpos($name, \"set\") === 0) {\n $property = $this->camelToSnake(lcfirst(substr($name, 3)));\n return $this->__set($property, $arguments[0]);\n }\n\n throw new \\BadMethodCallException(\"No such method called \" . $name);\n }", "title": "" }, { "docid": "2066d06bdeddba99061118b79967dd05", "score": "0.48814797", "text": "public function __call($name, $arguments)\n {\n try {\n $this->_logger->$name($arguments[0]);\n } catch (Zend_Exception $e) {\n // There was an error logging this error, so log that instead! :)\n $this->direct($e->getMessage() . \": $name\", Zend_Log::ERR);\n }\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "739bddb63016809e46410ff9402a5f03", "score": "0.0", "text": "public function run()\n {\n DB::table( 'duration_dropdowns')->insert([\n // ['duration' => 900],\n [ 'duration' => 1800],\n // [ 'duration' => 2700],\n [ 'duration' => 3600],\n /* [ 'duration' => 4500],\n [ 'duration' => 5400],\n [ 'duration' => 6300],\n [ 'duration' => 7200],\n [ 'duration' => 8100],\n [ 'duration' => 9000],\n [ 'duration' => 9900],\n [ 'duration' => 10800],*/\n ]);\n }", "title": "" } ]
[ { "docid": "74adb703f4d2ee8eeea828c6234b41f3", "score": "0.81044954", "text": "public function run()\n {\n Eloquent::unguard();\n\n $this->seed('Categories');\n\n // Illustration\n $this->seed('Supports');\n $this->seed('Illustrations');\n\n // Photography\n $this->seed('Photosets');\n $this->seed('Collections');\n $this->seed('Photos');\n\n $this->seed('Articles');\n $this->seed('Repositories');\n $this->seed('Services');\n $this->seed('Stories');\n $this->seed('Tableaux');\n $this->seed('Tracks');\n }", "title": "" }, { "docid": "1dcddd9fc4f2fbc62e484166f7f3332c", "score": "0.802869", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate();\n DB::table('posts')->truncate();\n DB::table('roles')->truncate();\n DB::table('role_user')->truncate();\n\n // SEEDS\n $this->call(RolesTableSeeder::class);\n\n // FACTORIES\n /*\n factory(App\\User::class, 10)->create()->each(function ($user) {\n $user->posts()->save(factory(App\\Post:class)->make());\n });*/\n\n //$roles = factory(App\\Role::class, 3)->create();\n\n $users = factory(User::class, 10)->create()->each(function ($user) {\n $user->posts()->save(factory(Post::class)->make());\n $user->roles()->attach(Role::findOrFail(rand(1, 3)));\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n\n }", "title": "" }, { "docid": "0874a499bef2a647494554309f6aa0cd", "score": "0.80049884", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('ouse')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('ouse')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'fonte' => $faker->sentence,\n 'layout' => 'content-'.$i,\n 'indicadores' => json_encode([$i]),\n 'regras' => json_encode([$faker->words(3)]),\n 'types' => json_encode([$faker->words(2)]),\n 'categorias' => json_encode([$faker->words(4)]),\n 'tags' => json_encode([$faker->words(5)]),\n 'active' => true,\n 'status' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "6d65d81db98c4e3d10f6aa402d6393d9", "score": "0.79774004", "text": "public function run()\n {\n if (App::environment() == 'production') {\n exit(\"You shouldn't run seeds on production databases\");\n }\n\n DB::table('roles')->truncate();\n\n Role::create([\n 'id' => 3,\n 'name' => 'Root',\n 'description' => 'God user. Access to everything.'\n ]);\n\n Role::create([\n 'id' => 2,\n 'name' => 'Administrator',\n 'description' => 'Administrator user. Many privileges.'\n ]);\n\n Role::create([\n 'id' => 1,\n 'name' => 'Guest',\n 'description' => 'Basic user.'\n ]);\n\n }", "title": "" }, { "docid": "17a49f970cd10e5cfdebd0f59e100f60", "score": "0.79215413", "text": "public function run()\n {\n User::create([\n 'first_name' => 'Administrator',\n 'last_name' => 'One',\n 'email' => 'admin@gmail.com',\n 'role_id' => 81,\n 'password' => bcrypt('mmmm')\n ]);\n User::create([\n 'first_name' => 'User',\n 'last_name' => 'One',\n 'email' => 'user@gmail.com',\n 'role_id' => 3,\n 'password' => bcrypt('mmmm')\n ]);\n\n Role::create(\n ['name' => 'Contributor', 'id' => 3]\n );\n Role::create(\n ['name' => 'Administrator', 'id' => 81]\n );\n\n factory(User::class, 5)->create()->each(function ($user) {\n $user->posts()->saveMany(factory(Post::class, rand(2, 3))->make());\n });\n }", "title": "" }, { "docid": "6fd37af4061bceb7c3ed860b1db5b07b", "score": "0.7916311", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 1)->create([\n 'role' => 'admin'\n ]);\n factory(App\\Question::class, 1)->create(['user_id' => 1])->each(function ($question) {\n $question->hashtags()->save(factory(App\\Hashtag::class)->make());\n });\n factory(App\\Comment::class, 1)->create([\n 'question_id' => 1\n ]);\n }", "title": "" }, { "docid": "2806867c15ca7bd71920629767c01dd4", "score": "0.7899936", "text": "public function run()\n {\n Model::unguard();\n\n $faker=Faker\\Factory::create();\n App\\category::create(['title'=>'Public']);\n App\\category::create(['title'=>'Private']);\n App\\category::create(['title'=>'Family']);\n\n\n\n // $this->call(UserTableSeeder::class);\n foreach(range(1,100) as $index) {\n App\\Post::create([\n 'title'=>$faker->realText(30,2),\n 'content'=>$faker->realText(200,2),\n 'category_id'=>App\\category::all()->random()->id\n\n ]);\n }\n Model::reguard();\n }", "title": "" }, { "docid": "96081f5559e3c4bb80f4e56c33d545f5", "score": "0.7897222", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Type::insert(array(\n ['type' => 'Checkbox'], \n ['type' => 'Rango'], \n ['type' => 'Radio'], \n ['type' => 'Select']\n ));\n factory(App\\Survey::class, 5)->create()->each(function ($u){\n for ($i=0; $i <rand(1,10) ; $i++) { \n $u->questions()->save(factory(App\\Question::class)->make());\n }\n });\n }", "title": "" }, { "docid": "b993bdb17f6322a43f700f6d1f5b1006", "score": "0.7882899", "text": "public function run()\n {\n // Trunkate the databse so we don;t repeat the seed\n DB::table('roles')->delete();\n\n Role::create(['name' => 'root']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'supervisor']);\n Role::create(['name' => 'officer']);\n Role::create(['name' => 'user']);\n }", "title": "" }, { "docid": "71daf483f301960f0f88e0c893f58c36", "score": "0.7881348", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n \n\n factory(App\\Article::class,50)\n ->create();\n \n factory(App\\Comment::class,50)\n ->create();\n\n factory(App\\Reply::class,50)\n ->create();\n\n factory(App\\Like::class,50)\n ->create();\n \n $articles = App\\Article::all();\n\n factory(App\\Tag::class,5)->create()\n ->each(function($tag) use ($articles){\n $tag->articles()->attach(\n $articles->random(6,1)->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "0b109c2cad785f4ff36ecf7d46b132de", "score": "0.78785", "text": "public function run()\n\t{\n\t\tModel::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n\n Ruta::create([\n 'descripcion'=>'Cochan',\n 'observacion'=>'-'\n ]);\n Anexo::create([\n 'descripcion'=>'Santa Aurelia',\n 'observacion'=>'-',\n 'ruta_id'=>1\n ]);\n\n Proveedor::create([\n 'name'=>'Evhanz',\n 'apellidoP'=>'Hernandez',\n 'apellidoM'=>'Salazar',\n 'dni'=>'47085011',\n 'celular'=>'990212662',\n 'estado'=>true,\n 'anexo_id'=>1\n ]);\n\n Recurso::create([\n 'descripcion'=>'casa toro',\n 'tipo'=>'interno'\n ]);\n\n\n\n\n\n\n\n\t}", "title": "" }, { "docid": "3c219ba37518a110e693986f93eb9e5e", "score": "0.7877671", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('roles')->insert([\n 'name' => 'prof',\n 'display_name' => 'professor',\n 'description' => 'Perfil professor',\n 'created_at' => Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'Marcos André',\n 'email' => 'macs@ifpe.edu.br',\n 'password' => bcrypt('marcos123'),\n 'first_login' => 0,\n 'created_at' => Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n DB::table('professores')->insert([\n 'nome' => 'Marcos André',\n 'matricula' => '12.3456-7',\n 'data_nascimento' => '1969-11-30',\n 'user_id' => 1,\n 'created_at' => Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n DB::table('role_user')->insert([\n 'user_id' => 1,\n 'role_id' => 1,\n ]);\n }", "title": "" }, { "docid": "0c456002637a63e2342e712744fc57f7", "score": "0.78721434", "text": "public function run()\n {\n \n // $categories = factory(Category::class, 10)->create();\n // $categories->each( function($category) {\n // $category->categories()->saveMany( \n // factory(Category::class, rand(0,5))->make()\n // );\n // });\n\n // $categories->each( function($category) {\n // $category->posts()->saveMany(\n // factory(Post::class, rand(0, 4) )->make()\n // );\n // });\n $this->call(LaratrustSeeder::class);\n }", "title": "" }, { "docid": "ace435808d0bbff7fbf10bb7260d46e1", "score": "0.78685874", "text": "public function run()\n {\n // factory(Author::class, 50)->create();\n Author::factory()->count(50)->create();\n\n // for ($i=0; $i<50; $i++) {\n\n // $name = \"Vardenis\".($i+1);\n // $surname = \"Pavardenis\".($i+1);\n // $username = \"Slapyvardis\".($i+1);\n\n // DB::table(\"authors\")->insert([\n // 'name'=> $name ,\n // 'surname'=> $surname ,\n // 'username'=> $username ,\n // ]);\n // }\n\n // DB::table(\"authors\")->insert([\n\n // 'name'=> 'Vardenis' ,\n // 'surname'=> 'Pavardenis',\n // 'username'=> 'Slapyvardis',\n // ]);\n }", "title": "" }, { "docid": "d7bb625a9812b9cb6a9362070a5950ee", "score": "0.7852421", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // Add Company\n $company = Company::create([\n 'name' => 'IAPP',\n 'employee_count' => 100,\n 'size' => 'Large'\n ]);\n\n $secondCompany = Company::create([\n 'name' => 'ABC',\n 'employee_count' => 20,\n 'size' => 'Small'\n ]);\n\n // Add user\n $general_user = User::create([\n 'name' => 'Shayna Sylvia',\n 'email' => 'shayna.sylvia@gmail.com',\n 'password' => Hash::make('12345678'),\n 'street' => '9 Mill Pond Rd',\n 'city' => 'Northwood',\n 'state' => 'NH',\n 'zip' => '03261',\n 'company_id' => $company->id,\n 'type' => 'admin'\n ]);\n\n // Add Challenge\n $challenge = Challenge::create([\n 'name' => 'Conquer the Cold 2018',\n 'slug' => 'conquer',\n 'start_date' => '2018-11-01',\n 'end_date' => '2018-12-31',\n 'type' => 'Individual',\n 'image_url' => '/images/conquer-the-cold-banner.png'\n ]);\n }", "title": "" }, { "docid": "62d26c53627928e22ea575cc46bf775a", "score": "0.7849954", "text": "public function run()\n {\n Category::create([\n 'name' => 'Belleza',\n 'status' => 'A'\n ]);\n\n SubCategory::create([\n 'category_id' => 1,\n 'name' => 'Shampoo'\n ]);\n\n SubCategory::create([\n 'category_id' => 1,\n 'name' => 'Acondicionador'\n ]);\n\n SubCategory::create([\n 'category_id' => 1,\n 'name' => 'Maquillaje'\n ]);\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "b33aa01f2832813762ccbfb3d2d3532d", "score": "0.7846495", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(5)->create();\n $this->call(MenuCategoryTableSeeder::class);\n $this->call(AttributeTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n \\App\\Models\\Product::factory(50)->create();\n \\App\\Models\\AttributeProduct::factory(500)->create();\n \n // Circles\n $this->call(CircleTableSeeder::class);\n\n // Top Products\n $this->call(TopProductTableSeeder::class);\n\n // Random Products\n $this->call(RandomProductTableSeeder::class);\n }", "title": "" }, { "docid": "a07071a752d8cf92db253078ae570196", "score": "0.7844956", "text": "public function run()\n {\n $this->call(SuperuserSeeder::class);\n //$this->call(UserSeeder::class);\n\n Article::truncate();\n Category::truncate();\n User::truncate(); \n\n $basica = Category::factory()->create([ \n 'name' => 'Matemática Básica',\n 'slug' => 'matematica_basica',\n ]);\n $equacoes = Category::factory()->create([ \n 'name' => 'Equações',\n 'slug' => 'equacoes',\n ]);\n $funcoes = Category::factory()->create([ \n 'name' => 'Funções',\n 'slug' => 'funcoes',\n ]);\n\n $user = User::factory()->create([\n 'name' => 'Thiago Ryo',\n ]);\n\n Article::factory(10)->for($basica)->create([\n 'user_id' => $user->id,\n ]);\n\n Article::factory(7)->for($equacoes)->create([\n 'user_id' => $user->id,\n ]);\n Article::factory(15)->for($funcoes)->create([\n 'user_id' => $user->id,\n ]);\n }", "title": "" }, { "docid": "177d3ebe2b223afa4e9bd6a908d0f913", "score": "0.7839857", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //factory(App\\Article::class,5)->create();\n //factory(App\\Topic::class,20)->create();\n //factory(App\\Test::class,50)->create();\n //factory(App\\Question::class,60)->create();\n factory(App\\ArticleTest::class,5)->create();\n factory(App\\SubjectTest::class,1)->create();\n }", "title": "" }, { "docid": "a2a4fa12a5d7340c77994a01f5fd0004", "score": "0.7832346", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('cursos')->insert([\n 'cod_curso' => '123456',\n 'nome_curso' => 'Curso de pedagogia',\n 'instituicao_ensino' => 'Faculdade alguma coisa'\n ]);\n DB::table('alunos')->insert([\n 'nome_aluno' => '123456',\n 'curso' => 1,\n 'numero_maricula' => 'Faculdade alguma coisa',\n 'semestre' => 'Faculdade alguma coisa',\n 'status' => 'matriculado'\n ]);\n }", "title": "" }, { "docid": "b6032e82ff7748213ddc30ee53d1f11b", "score": "0.7830752", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('roles')->insert(\n [\n [\n 'title' => 'Директор',\n 'name' => 'Director',\n 'parent_id' => '0'\n ],\n [\n 'title' => 'Зам директор',\n 'name' => 'Deputy director',\n 'parent_id' => '1'\n ],\n [\n 'title' => 'Начальник',\n 'name' => 'Director',\n 'parent_id' => '2'\n ],\n [\n 'title' => 'ЗАм начальник',\n 'name' => 'Deputy сhief',\n 'parent_id' => '3'\n ],\n [\n 'title' => 'Работник',\n 'name' => 'Employee',\n 'parent_id' => '4'\n ]\n ]);\n\n\n $this->call(departmentsTableSeeder::class);\n $this->call(employeesTableSeeder::class);\n }", "title": "" }, { "docid": "b250412ac4bb97281cc75b73e99d5169", "score": "0.7827436", "text": "public function run()\n {\n factory(App\\User::class, 10)->create();\n factory(App\\Category::class, 5)->create();\n factory(App\\Question::class, 20)->create();\n factory(App\\Reply::class, 50)->create()->each(function ($reply) {\n $reply->favorite()->save(factory(App\\Favorite::class)->make());\n });\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "f72b073f1562b517a5cbd8caadf6f8b1", "score": "0.78215635", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1, 50) as $index) {\n\n Category::create([\n 'title' => $faker->jobTitle,\n ]);\n }\n }", "title": "" }, { "docid": "2bfba5dc2d1c3f62eb529c4f407a8fcd", "score": "0.7818739", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n DB::table('articles')->insert([\n 'name' => $faker->title,\n 'description' => $faker->text,\n 'created_at' => new \\DateTime(),\n 'updated_at' => new \\DateTime(),\n ]);\n }", "title": "" }, { "docid": "7e80466dc8005ac35863dfc3e5c7c169", "score": "0.7817918", "text": "public function run()\n {\n User::create([\n 'name' => 'Administrator',\n 'email' => 'admin@admin.com',\n 'password' => Hash::make('adminadmin'),\n ]);\n\n Genre::factory(5)->create();\n Classification::factory(5)->create();\n Actor::factory()->count(50)->create();\n Director::factory(20)->create();\n Movie::factory(30)->create()->each(function ($movie) {\n $movie->actors(['actorable_id' => rand(30, 50)])->attach($this->array(rand(1, 50)));\n });\n Serie::factory(10)->create();\n Season::factory(20)->create();\n Episode::factory(200)->create()->each(function ($episode) {\n $episode->actors(['actorable_id' => rand(15, 30)])->attach($this->array(rand(1, 50)));\n });\n }", "title": "" }, { "docid": "c621382a9007bb3f312489ab7da81f56", "score": "0.7814175", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n // DB::table('user_roles')->delete();\n\n $roles = [\n ['id' => 1, 'name' => 'Director'],\n ['id' => 2, 'name' => 'Chair'],\n ['id' => 3, 'name' => 'Secretary'],\n ['id' => 4, 'name' => 'Faculty'],\n ];\n\n // Uncomment the below to run the seeder\n DB::table('user_roles')->insert($roles);\n }", "title": "" }, { "docid": "41d5d9d0667abadecd972a5a32ed0a4b", "score": "0.7810804", "text": "public function run()\n {\n\n DB::table('authors')->delete();\n\n $gender = Array('Male', 'Female', 'Other');\n $faker = Faker::create();\n foreach (range(1, 100) as $index) {\n $author = new Author();\n $author->name = $faker->name;\n $author->gender = $gender[rand(0,2)];\n $author->dateOfBirth = $faker->dateTimeBetween($startDate = '-90 years', $endDate = '-25 years', $timezone = date_default_timezone_get())->format('Y-m-d');\n $author->shortBio = $faker->sentence(6, true);\n $author->country = $faker->country;\n $author->email = $faker->safeEmail;\n $author->twitter = $faker->userName;\n $author->website = 'http://www.'.$faker->domainName;\n $author->save();\n }\n\n }", "title": "" }, { "docid": "40a0e12ed745bd76bf6ddbc9fe97e1a8", "score": "0.78103507", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert([\n // 'name' => 'employee',\n // 'guard_name' => 'web',\n // ]);\n\n // DB::table('roles')->insert([\n // 'name' => 'admin',\n // 'guard_name' => 'web',\n // ]);\n\n // DB::table('units')->insert([\n // 'name' => 'kg',\n // ]);\n // DB::table('units')->insert([\n // 'name' => 'litre',\n // ]);\n // DB::table('units')->insert([\n // 'name' => 'dozen',\n // ]);\n }", "title": "" }, { "docid": "aa0eccb2055398458b2a6272fcb8936f", "score": "0.78012705", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Order::truncate();\n\n $faker = \\Faker\\Factory::create();\n $customers = \\App\\Models\\Customer::all()->pluck('id')->toArray();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n $alphabet = 'abcdefghijklmnopqrstuvwxyz';\n $numbers = '0123456789';\n $value = '';\n for ($j = 0; $j < 3; $j++) {\n $value .= substr($alphabet, rand(0, strlen($alphabet) - 1), 1);\n }\n Order::create([\n 'customerId' => $faker->randomElement($customers),\n 'totalPrice' => $faker->randomFloat(2, 1, 5000),\n 'isPaid' => $faker->boolean($chanceOfGettingTrue = 50),\n 'extraInfo' => $faker->boolean($chanceOfGettingTrue = 50)\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "48fe7d1d0d33106e3241378b6668a775", "score": "0.7796966", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 50)->create();\n factory(Post::class, 500)->create();\n factory(Category::class, 10)->create();\n factory(Tag::class, 150)->create();\n factory(Image::class, 1500)->create();\n factory(Video::class, 500)->create();\n factory(Comment::class, 1500)->create();\n }", "title": "" }, { "docid": "86dd297f311dc339eb33e3e6509e604e", "score": "0.77966315", "text": "public function run()\n {\n $this->seeds([\n Poliklinik::class => ['fasilitas/polikliniks.csv', 35],\n Ruangan::class => ['fasilitas/ruangans.csv', 15],\n Kamar::class => ['fasilitas/kamars.csv', 43],\n Ranjang::class => ['fasilitas/ranjang.csv', 187],\n ]);\n }", "title": "" }, { "docid": "368508f66336ac53d1be3d6743e70422", "score": "0.7792271", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //Desactivamos la revision de las llaves foraneas.\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n //trunco las tablas para poder meter datos nuevos\n articulos::truncate();\n clientes::truncate();\n impuestos::truncate();\n imp_art::truncate();\n empresa::truncate();\n\n $cantidadArticulos = 20;\n $cantidadClientes = 20;\n $cantidadImpuestos = 4;\n $cantidadImp_Arts = 10;\n $cantidadEmpresas = 10;\n\n factory(articulos::class, $cantidadArticulos)->create();\n factory(clientes::class, $cantidadClientes)->create();\n factory(impuestos::class, $cantidadImpuestos)->create();\n factory(imp_art::class, $cantidadImp_Arts)->create();\n factory(empresa::class, $cantidadEmpresas)->create();\n\n }", "title": "" }, { "docid": "0a5fb8cc194091e39e8322105883b61f", "score": "0.77910054", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('jobs')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n $ranks = Rank::all();\n $users = User::all();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Job::create([\n 'user_id' => $users[rand(0, $users->count() - 1)]->id,\n 'title' => $faker->sentence($nbWords = 2, $variableNbWords = true),\n 'description' => $faker->sentence($nbWords = 10, $variableNbWords = true),\n 'departure' => $faker->lexify('????'),\n 'arrival' => $faker->lexify('????'),\n 'category' => $faker->sentence,\n 'limitations' => $faker->sentence,\n 'required_rank_id' => $ranks[rand(0, $ranks->count() - 1)]->id\n ]);\n }\n }", "title": "" }, { "docid": "d82dd297f054671ec046bcf0b882a63f", "score": "0.7790729", "text": "public function run()\n {\n $this->call([\n AdminSeeder::class,\n // TrackSeeder::class,\n ]);\n\n \\App\\Models\\Track::factory(10)->create();\n \\App\\Models\\Location::factory(10)->create();\n \\App\\Models\\Event::factory(20)->create();\n }", "title": "" }, { "docid": "845dcb98a7e8e0d45a3cf018b23c6ecd", "score": "0.77882665", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Product::class, 100)->create()->each(function($products){\n $products->save();\n });\n \n factory(App\\Client::class, 100)->create()->each(function($clients){\n $clients->save();\n });\n \n factory(App\\Sale::class, 100)->create()->each(function($sales){\n $sales->save();\n });\n \n }", "title": "" }, { "docid": "de60f0a26beec0ef156f5bbeb41b9ee7", "score": "0.7785993", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::table('password_resets')->truncate();\n DB::table('projects')->truncate();\n DB::table('payments')->truncate();\n DB::table('tags')->truncate();\n DB::table('taggables')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n \n $this->call(UsersTableSeeder::class);\n \n $tags = factory(\\App\\Models\\Tag::class, 10)->create();\n factory(App\\Models\\User::class, 10)->create()->each(function ($user) use ($tags) {\n $projects = factory(\\App\\Models\\Project::class, 5)->create(['user_id' => $user->id]);\n foreach ($projects as $project) {\n $project->tags()->attach($tags->random(1));\n factory(\\App\\Models\\Payment::class, random_int(10, 30))\n ->create(['project_id' => $project->id])->each(function (\\App\\Models\\Payment $payment) use ($tags) {\n $payment->tags()->attach($tags->random(1)); \n });\n }\n });\n }", "title": "" }, { "docid": "d807dce754ed136319cb37b9a9be6494", "score": "0.77856374", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Localizacao::class, 5)->create();\n factory(Estado::class, 2)->create();\n factory(Tamanho::class, 4)->create();\n factory(Cacifo::class, 20)->create();\n factory(Cliente::class, 10)->create();\n factory(UserType::class, 2)->create();\n factory(User::class, 8)->create();\n factory(Encomenda::class, 25)->create();\n factory(LogCacifo::class, 20)->create();\n\n foreach (Encomenda::all() as $encomenda) {\n $user = User::all()->random();\n DB::table('encomenda_user')->insert(\n [\n 'user_id' => $user->id,\n 'encomenda_id' => $encomenda->id,\n 'user_type' => $user->tipo_id,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]\n );\n }\n\n }", "title": "" }, { "docid": "4a8a5f2d0bf57a648aa039d994ba098c", "score": "0.7780426", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $spec = [\n [\n 'name'=>'Dokter Umum',\n 'title_start'=> 'dr.',\n \"title_end\"=>null,\n ],[\n 'name'=>\"Spesialis Kebidanan Kandungan\",\n 'title_start'=>\"dr.\",\n 'title_end'=>\"Sp.OG\",\n ],[\n \"name\"=>\"Spesialis Anak\",\n \"title_start\"=>\"dr.\",\n \"title_end\"=>\"Sp.A\",\n ],[\n \"name\"=>\"Spesialis penyakit mulut\",\n \"title_start\"=>\"drg.\",\n \"title_end\"=>\"Sp.PM\"\n ],[\n \"name\"=>\"Dokter Gigi\",\n \"title_start\"=>\"drg.\",\n \"title_end\"=>null,\n ]\n ];\n\n DB::table(\"specializations\")->insert($spec);\n\n \n factory(User::class, 10)->create([\n 'type'=>\"doctor\",\n ]);\n factory(User::class, 10)->create([\n 'type'=>\"user\",\n ]);\n factory(Message::class, 100)->create();\n }", "title": "" }, { "docid": "ee06eccc68d87dcb640a4d5639c88ab8", "score": "0.77800995", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\t\t$tags = factory( \\App\\Tag :: class, 10 ) -> create();\n\t\t\n\t\t$articles = factory( \\App\\Article :: class, 20 ) -> create();\n\t\t\n\t\t$tags_id = $tags -> pluck( 'id' );\n\t\t\n\t\t$articles ->each( function( $article ) use( $tags_id ){\n\t\t\t$article -> tags() -> attach( $tags_id -> random( 3 ) );\n\t\t\tfactory( \\App\\Comment :: class, 3 ) -> create( [\n\t\t\t\t'article_id' => $article -> id\n\t\t\t] );\n\t\t\t\n\t\t\tfactory( \\App\\State :: class, 1 ) -> create( [\n\t\t\t\t'article_id' => $article -> id\n\t\t\t] );\n\t\t} );\n\t\t\n }", "title": "" }, { "docid": "4a49e16a546df16655fd9740de7ae5c5", "score": "0.77780515", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n DB::table('users')->insert([\n \t[\n \t\t'username' => 'johan',\n \t\t'email' => 'johanst1409@gmail.com',\n \t\t'password' => bcrypt('wachtwoord1'),\n \t],\n \t[\n \t\t'username' => 'vamidi',\n \t\t'email' => 'vamidi@gmail.com',\n \t\t'password' => bcrypt('wachtwoord1'),\n \t]\n ]);\n\n DB::table('profiles')->insert([\n \t[\n \t\t'user_id' => 1,\n \t],\n \t[\n \t\t'user_id' => 2,\n \t]\n ]);\n\n DB::table('teams')->insert(\n \t[\n \t\t'name' => 'VaMiDi Games',\n \t\t'url_name' => 'vamidi-games',\n \t]\n );\n }", "title": "" }, { "docid": "b32c8e0e5988bd2cbc8f9b3c1069084f", "score": "0.7775103", "text": "public function run()\n {\n //這邊用到集合 pluck() 將全部User id取出並轉為陣列,如 [1,2,3,4,5]\n $user_ids = User::all()->pluck('id')->toArray();\n\n //同上\n $topic_id = Topic::all()->pluck('id')->toArray();\n\n //取Faker 實例化\n $faker = app(Faker\\Generator::class);\n\n //生成100筆假數據\n $posts = factory(Post::class)->times(100)\n ->make()->each(function ($post,$index) use ($user_ids,$topic_id,$faker)\n {\n //用User id隨機取一個並賦值\n $post->user_id = $faker->randomElement($user_ids);\n //用Topic id隨機取一個並賦值\n $post->topic_id = $faker->randomElement($topic_id);\n });\n //將數據轉為陣列在插入資料庫\n Post::insert($posts->toArray());\n }", "title": "" }, { "docid": "0ac3bd79ccafd183f64a83daa8e8b734", "score": "0.77742934", "text": "public function run()\n {\n //\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => 'admin@example.com',\n 'level' => 'admin',\n 'password' => Hash::make('12345678'),\n ]);\n\n factory(App\\User::class, 9)->create([\n 'password' => Hash::make('12345678')\n ]);\n\n factory(App\\Author::class, 10)->create();\n\n factory(App\\Book::class, 10)->create();\n\n $author = App\\Author::all();\n\n App\\Book::all()->each(function ($book) use ($author) { \n $book->author()->attach(\n $author->random(rand(1, 3))->pluck('id')->toArray()\n ); \n });\n \n }", "title": "" }, { "docid": "8cce7ad451e41e0616427ac1279b46cd", "score": "0.77644897", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// factory(\\App\\User::class, 50)->create();\n //students seeding\n $schoolsClasses = \\App\\SchoolClass::all();\n foreach ($schoolsClasses as $schoolsClass){\n $schoolsClass->student()->createMany(\n factory(\\App\\Student::class, 20)->make()->toArray()\n );\n }\n }", "title": "" }, { "docid": "120274b83b13efad13e4d0a22631a7e2", "score": "0.7763531", "text": "public function run()\n {\n\n $this->seedersPath = database_path('seeds').'/';\n $this->seed('MessagesTableSeeder');\n\n $this->seed('WishesTableSeeder');\n $this->seed('PresentsTableSeeder');\n\n $this->seed('InstitutionsTableSeeder');\n $this->seed('LocationsTableSeeder');\n $this->seed('OpeningHoursTableSeeder');\n\n $this->seed('FaqsTableSeeder');\n\n //$this->seed('PermissionRoleTableSeeder');\n }", "title": "" }, { "docid": "edb6c4e5c696e79c6cb87775bdf73c85", "score": "0.77605385", "text": "public function run()\n {\n factory(App\\Models\\User::class, 200)->create();\n $this->call(GenresTableSeeder::class);\n $this->call(BandsTableSeeder::class);\n factory(App\\Models\\Post::class, 1000)->create();\n $this->call(TagsTableSeeder::class);\n $this->call(PostTagTableSeeder::class);\n factory(App\\Models\\Comment::class, 5000)->create();\n $this->call(AdminSeeder::class);\n }", "title": "" }, { "docid": "a5eec395c42a1c641cc29056de013a2a", "score": "0.7760248", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n UserRole::truncate();\n BookList::truncate();\n BookEntry::truncate();\n\n $this->call([\n UserRoleSeeder::class,\n BookListSeeder::class,\n BookEntrySeeder::class,\n ]);\n\n User::insert([\n 'name' => 'super_admin',\n 'email' => 'super_admin@gmail.com',\n 'role_serial' => 1,\n 'password' => Hash::make('12345678'),\n ]);\n User::insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'role_serial' => 2,\n 'password' => Hash::make('12345678'),\n ]);\n User::insert([\n 'name' => 'management',\n 'email' => 'management@gmail.com',\n 'role_serial' => 3,\n 'password' => Hash::make('12345678'),\n ]);\n User::insert([\n 'name' => 'student',\n 'email' => 'student@gmail.com',\n 'role_serial' => 4,\n 'password' => Hash::make('12345678'),\n ]);\n }", "title": "" }, { "docid": "5c8214e2d3c221fbe38a112c0256f06f", "score": "0.7759768", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'role' => 1,\n 'email' => 'admin@gmail.com',\n 'password' => '$2y$10$UT2JvBOse3.6uuElsmqDpOhvp8d5PkoRdmbIHDMwOJmr226GRrmKe',\n ]);\n\n DB::table('programs')->insert([\n ['name' => 'Ingeniería de sistemas'],\n ['name' => 'Ingeniería electrónica'],\n ['name' => 'Ingeniería industrial'],\n ['name' => 'Diseño gráfico'],\n ['name' => 'Psicología'],\n ['name' => 'Administración de empresas'],\n ['name' => 'Negocios internacionales'],\n ['name' => 'Criminalística'],\n ]);\n }", "title": "" }, { "docid": "2290f88bd069e9499c0321a79bda7083", "score": "0.7759102", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('filials')->insert([\n 'nome' => 'Filial 1',\n 'endereco' => 'Endereco, 1',\n 'bairro' => 'Bairro',\n 'cidade' => 'Cidade',\n 'uf' => 'ES',\n 'inscricao_estadual' => 'ISENTO',\n 'cnpj' => '00123456000178'\n ]);\n DB::table('users')->insert([\n 'name' => 'Vitor Braga',\n 'data_nascimento' => '1991-03-16',\n 'sexo' => 'M',\n 'cpf' => '12345678900',\n 'endereco' => 'Rua Luiz Murad, 2',\n 'bairro' => 'Vista da Serra',\n 'cidade' => 'Colatina',\n 'uf' => 'ES',\n 'cargo' => 'Desenvolvedor',\n 'salario' => '100.00',\n 'situacao' => '1',\n 'password' => bcrypt('123456'),\n 'id_filial' => '1'\n ]);\n }", "title": "" }, { "docid": "fa279d8f7a87d9a40806207839ca7e30", "score": "0.7750227", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n $faker = Faker::create();\n foreach ( range(1,10) as $item) {\n DB::table('fire_incidents')->insert([\n 'created_at' => $faker->dateTime,\n 'title'=> $faker->title(),\n 'first_name' => $faker->firstName,\n 'last_name'=> $faker->lastName,\n 'email'=>$faker->email,\n 'phone_number'=>$faker->phoneNumber,\n 'ip_address'=>$faker->ipv4,\n 'message'=>$faker->paragraph\n ]);\n }\n }", "title": "" }, { "docid": "dfa1829f132b8c48a9fa02a696b5951b", "score": "0.7737741", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(TokenPackageSeeder::class);\n\n factory(Video::class, 30)->create();\n $this->call(PurchaseSeeder::class);\n\n // factory(Comment::class, 50)->create();\n }", "title": "" }, { "docid": "81e5569fa61ad16b28597151ca8922ab", "score": "0.7731372", "text": "public function run()\n {\n $faker = Faker\\Factory::create('fr_FR');\n $user = App\\User::pluck('id')->toArray();\n $data = [];\n\n for ($i = 1; $i <= 100; $i++) {\n $title = $faker->sentence(rand(4, 10)); // astuce pour le slug\n array_push($data, [\n 'title' => $title,\n 'sub_title' => $faker->sentence(rand(10, 15)),\n 'slug' => Str::slug($title),\n 'body' => $faker->realText(4000),\n 'published_at' => $faker->dateTime(),\n 'user_id' => $faker->randomElement($user),\n ]);\n }\n DB::table('articles')->insert($data);\n }", "title": "" }, { "docid": "dbb7060bbc311a18cd207473bbe8e7f1", "score": "0.7728515", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\User::class,1)->create([\n 'name' => 'teste',\n 'email' => 'user@user.com',\n 'password' => bcrypt('12345')\n ]);\n factory(\\App\\Models\\SecaoTecnica::class,1)->create([\n 'sigla' => 'teste',\n 'descricao' => 'teste descrição'\n ]);\n }", "title": "" }, { "docid": "3d873be91ed6d1da3295d915f287cf94", "score": "0.77274096", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n //Seeding the database\n \\DB::table('authors')->insert([\n [\n 'name' => 'Diane Brody',\n 'occupation' => 'Software Architect, Freelancer',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ],\n [\n 'name' => 'Andrew Quentin',\n 'occupation' => 'Cognitive Scientist',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]\n ]);\n\n \\DB::table('publications')->insert([\n [\n 'title' => 'AI Consciousness Level',\n 'excerpt' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit',\n 'type' => 'Book',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ],\n [\n 'title' => 'Software Architecture for the experienced',\n 'excerpt' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit',\n 'type' => 'Report of a conference',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]\n ]);\n\n \\DB::table('publication_authors')->insert([\n [\n 'publication_id' => 1,\n 'author_id' => 2\n ],\n [\n 'publication_id' => 2,\n 'author_id' => 1\n ]\n ]);\n }", "title": "" }, { "docid": "0fdc3c6a7967d773048368acc1829445", "score": "0.7726644", "text": "public function run()\n {\n // TODO Seeder\n // TODO Run Seeder: php artisan migrate:fresh --seed\n // TODO Remove all tables and new create\n // TODO After run Seeder\n factory(User::class, 1)->create(['email' => 'erf@mail.com']);\n factory(User::class, 50)->create();\n factory(Forum::class, 20)->create();\n factory(Post::class, 50)->create();\n factory(Reply::class, 100)->create();\n factory(Category::class, 10)->create();\n }", "title": "" }, { "docid": "67bd68cad6c93282acfd6bf31f674b0f", "score": "0.7723515", "text": "public function run()\n {\n $db = DB::table('addresses');\n\n $faker = Faker\\Factory::create();\n $cities_id = City::all()->pluck('city_id')->toArray();\n\n foreach (Post::all()->pluck('id')->toArray() as $post_id){\n $values ['post_id'] = $post_id;\n $values ['street'] = $faker->streetAddress;\n $values ['house'] = $faker->numberBetween(1, 300);\n $values ['city_id'] = array_rand(array_flip($cities_id),1);\n\n $db->insert($values);\n }\n }", "title": "" }, { "docid": "8f23bfa6e5d2337ed218b6aa9e74c8f2", "score": "0.77190584", "text": "public function run()\n {\n $users = factory(App\\User::class,10)->create();\n\n $categories = factory(App\\Category::class,10)->create();\n\n $users->each(function(App\\User $user) use ($users){\n \tfactory(App\\Job::class, 5)->create([\n \t\t'user_id' => $user->id,\n 'category_id' => random_int(1, 10),\n \t]);\n });\n\n $reviews = factory(App\\Review::class,30)->create();\n\n Model::unguard();\n\n $this->call('PermissionsTableSeeder');\n $this->call('RolesTableSeeder');\n $this->call('ConnectRelationshipsSeeder');\n //$this->call('UsersTableSeeder');\n\n Model::reguard();\n }", "title": "" }, { "docid": "2ecfbbe58300fc8debd0410b17f21e9d", "score": "0.771693", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n DB::table('users')->insert([\n 'name' => 'Demo',\n 'phone' => '0737116001',\n 'email' => 'demo@gmail.com',\n 'password' => Hash::make('demo'),\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'admin',\n 'slug' => 'admin',\n ]);\n\n\n DB::table('roles')->insert([\n 'name' => 'user',\n 'slug' => 'user',\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'manager',\n 'slug' => 'manager',\n ]);\n\n DB::table('roles_users')->insert([\n 'user_id' => 1,\n 'role_id' => 1,\n ]);\n }", "title": "" }, { "docid": "c8d45356aa6a26dbc0f8f55b3b96b143", "score": "0.7714273", "text": "public function run()\n {\n // prevent db error from key constraint when refresh seeder\n DB::statement('SET foreign_key_checks=0');\n DB::table('albums')->truncate();\n DB::statement('SET foreign_key_checks=1');\n\n $albums = [\n ['artist_id' => 1, 'name' => 'One Palitchoke', 'year_release' => 2005],\n ['artist_id' => 2, 'name' => 'Offering Love', 'year_release' => 2007],\n ['artist_id' => 3, 'name' => 'Ice Sarunyu', 'year_release' => 2006],\n ];\n\n foreach ( $albums as $album ) {\n DB::table('albums')->insert($album);\n }\n }", "title": "" }, { "docid": "603a2ad87e835d00866a742b9f5d2a52", "score": "0.77141565", "text": "public function run()\n {\n $users = User::factory()->count(10)->create();\n\n $categoriesNames = [\n 'Programación',\n 'Desarrollo Web',\n 'Desarrollo Movil',\n 'Inteligencia Artificial',\n ];\n $collection = collect($categoriesNames);\n $categories = $collection->map(function ($category, $key){\n return Category::factory()->create(['name' => $category]);\n });\n\n Post::factory()\n ->count(10)\n ->make()\n ->each(function($post) use ($users, $categories){\n $post->author_id = $users->random()->id;\n $post->category_id = $categories->random()->id;\n $post->save();\n });\n \n $user = User::factory()->create();\n $user->name = 'Jesús Ramírez';\n $user->email = 'jesus.ra98@hotmail.com';\n $user->password = Hash::make('jamon123');\n $user->save();\n }", "title": "" }, { "docid": "102a7ac2c5bf3d7bd06597a234035ae0", "score": "0.77117646", "text": "public function run()\n {\n \\App\\User::create(['name'=>\"asd\", 'email'=>\"a@a.com\", 'password'=>Hash::make(\"123456\")]);\n \n $directorio = \"database/seeds/json_seeds/\";\n $archivos = scandir($directorio);\n \n for($i = 2; $i < sizeof($archivos); $i++)\n {\n $nombre = explode(\".\", $archivos[$i])[1];\n \n $fullPath = \"App\\Models\\\\\" . $nombre;\n echo \"Seeding \". $i.\") \".$fullPath .\"...\\n\";\n $instance = (new $fullPath());\n \n $table = $instance->table;\n \n $json = File::get(\"database/seeds/json_seeds/\" . $archivos[$i]);\n \n DB::table($table)->delete();\n \n $data = json_decode($json, true);\n \n foreach ($data as $obj)\n {\n $instance::create($obj);\n }\n \n }\n \n \n }", "title": "" }, { "docid": "51006cd093566713d168ba0692107f19", "score": "0.7708964", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'denis',\n 'email' => 'denis@gmail.com',\n 'password' => bcrypt('123456789'),\n ]);\n \n DB::table('users')->insert([\n \t'name'=> 'admin',\n \t'email' => 'ccc@mail.ru',\n \t'password' => bcrypt('cccccccc'),\n \n ]);\n\n DB::table('posts')->insert([\n 'id'=> 1,\n 'title'=>'Генное редактирование изменит мир быстрее, чем мы думаем',\n 'content'=>'https://hightech.fm/wp-content/uploads/2018/11/45807.jpg',\n 'description' => NULL,\n 'slug'=>'gennoe-redaktirovanie-izmenit-mir-bistree-chem-mi-dumaem_1',\n 'author'=> 1,\n ]);\n\n DB::table('posts')->insert([\n 'id'=> 2,\n 'title'=>'billboard',\n 'content'=>'https://i.kinja-img.com/gawker-media/image/upload/lufkpltdkvtxt9kzwn9u.jpg',\n 'description' => NULL,\n 'slug'=>'billboard_2',\n 'author'=> 1,\n ]);\n }", "title": "" }, { "docid": "ec2a852d7d4c7c86fb7a9c04f4e0dd7e", "score": "0.77069575", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Role::class)->create([\n 'name' => 'admin',\n 'description' => 'usuario con todos los privilegios'\n ]);\n\n factory(App\\Role::class)->create([\n 'name' => 'teacher',\n 'description' => 'profesores'\n ]);\n\n factory(App\\Role::class)->create([\n 'name' => 'student',\n 'description' => 'estudiantes'\n ]);\n\n factory(App\\User::class)->create([\n 'name' => 'Administrador',\n 'email' => 'admin@dammer-lms.test',\n 'role_id' => \\App\\Role::ADMIN\n ]);\n\n factory(App\\User::class, 4)->create([\n 'role_id' => \\App\\Role::TEACHER\n ])->each(function ($teacher) {\n $module = $teacher->teach()->save(factory(App\\Module::class)->make());\n $module->students()->saveMany(factory(App\\User::class, 10)->make([\n 'role_id' => \\App\\Role::STUDENT\n ]));\n $module->resources()->save(factory(App\\Resource::class)->make(), ['evaluation' => 1]);\n $module->tasks()->save(factory(App\\Task::class)->make(), ['evaluation' => 1]);\n });\n\n\n }", "title": "" }, { "docid": "67228a7edb1e67f6bdd0b8d19bb2b59a", "score": "0.7705309", "text": "public function run()\n {\n Model::unguard();\n $faker = Faker::create();\n for ($i = 0; $i <= 100; $i++) {\n DB::table('posts')->insert([\n 'published' => 1,\n 'title' => $faker->sentence(),\n 'body' => $faker->text(500),\n ]);\n }\n Model::reguard();\n }", "title": "" }, { "docid": "51f53a0357babd8023bfb0bf05d79e4b", "score": "0.7705115", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $quests = factory(\\App\\Models\\Quest::class, 10)->create();\n\n $quests->each(function (\\App\\Models\\Quest $quest) {\n $count = random_int(100, 500);\n factory(\\App\\Models\\Booking::class, $count)->create([\n 'quest_id' => $quest->id,\n ]);\n });\n }", "title": "" }, { "docid": "cb57daba0c53f155a9c942af3dc024bd", "score": "0.7703433", "text": "public function run()\n {\n // 指令::php artisan db:seed --class=day20180611_campaign_event_table_seeder\n // 第一次執行,執行前全部資料庫清空\n $now_date = date('Y-m-d h:i:s');\n // 角色\n DB::table('campaign_event')->truncate();\n DB::table('campaign_event')->insert([\n // system\n ['id' => '1', 'keyword' => 'reg', 'created_at' => $now_date, 'updated_at' => $now_date],\n ['id' => '2', 'keyword' => 'order', 'created_at' => $now_date, 'updated_at' => $now_date],\n ['id' => '3', 'keyword' => 'complete', 'created_at' => $now_date, 'updated_at' => $now_date],\n ]);\n }", "title": "" }, { "docid": "cf7fcb1fe5570ba6a475aaf00815d6f6", "score": "0.7701871", "text": "public function run()\n {\n\n //SEEDING MASTER DATA\n $this->call([\n BadgeSeeder::class,\n AchievementSeeder::class\n ]);\n\n //SEEDING FAKER DATA\n Lesson::factory()\n ->count(20)\n ->create();\n\n Comment::factory()->count(2)->create();\n\n }", "title": "" }, { "docid": "84e706cea7bd7dc14995a5ca30acd23f", "score": "0.7698958", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n // authorsテーブルにデータ登録を行う処理\n $this->call(AuthorsTableSeeder::class);\n\n // publishersテーブルに50件のレコードを作成する\n Publisher::factory(50)->create();\n\n // usersとuser_tokensのテーブルにレコードを追加\n $this->call(\n [\n UserSeeder::class\n ]\n );\n\n // ordersとorder_detailsのテーブルにレコードを追加\n $this->db->transaction(\n function () {\n $this->orders();\n $this->orderDetails();\n }\n );\n\n $now = CarbonImmutable::now();\n // customersテーブルにレコードを追加\n EloquentCustomer::create(\n [\n 'id' => 1,\n 'name' => 'name1',\n 'created_at' => $now,\n 'updated_at' => $now,\n ]\n );\n // customer_pointsテーブルにレコードを追加\n EloquentCustomerPoint::create(\n [\n 'customer_id' => 1,\n 'point' => 100,\n 'created_at' => $now,\n 'updated_at' => $now,\n ]\n );\n }", "title": "" }, { "docid": "09fe947dea0cf1a8047d0c9bb4bf806d", "score": "0.76984954", "text": "public function run()\n {\n // gọi tới file UserTableSeeder nếu bạn muốn chạy users seed\n // $this->call(UsersTableSeeder::class);\n // gọi tới file PostsTableSeeder nếu bạn muốn chạy posts seed\n $this->call(PostsTableSeeder::class); \n // gọi tới file CategoriesTableSeeder nếu bạn muốn chạy categories seed\n $this->call(CategoriesTableSeeder::class);\n $this->call(PostTagsTableSeeder::class);\n $this->call(TagsTableSeeder::class);\n $this->call(ProjectTableSeeder::class);\n }", "title": "" }, { "docid": "980af6960bda0fc5e03df83c2b9e41cc", "score": "0.7698196", "text": "public function run()\n {\n // $categories = factory(App\\Category::class, 10)->create();\n\n $categories = ['Appetizers', 'Beverages', 'Breakfast', 'Detox Water', 'Fresh Juice', 'Main Course', 'Pasta', 'Pizza', 'Salad', 'Sandwiches', 'Soups', 'Special Desserts', 'Hot Drinks', 'Mocktails', 'Shakes', 'Water and Softdrinks'];\n foreach( $categories as $category )\n { \n Category::create([\n 'name' => $category\n ]);\n }\n\n $categories = Category::all();\n\n foreach( $categories as $category )\n {\n factory(App\\Menu::class, 10)->create([\n 'category_id' => $category->id\n ]);\n }\n \t\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "5c2d13aa24ff40662a0ce876f3c44809", "score": "0.7694809", "text": "public function run()\n {\n //\n $user_ids = ['1','2','3'];\n $faker = app(Faker\\Generator::class);\n\n $articles = factory(Article::class)->times(100)->make()->each(function ($articles) use ($faker, $user_ids) {\n $articles->user_id = $faker->randomElement($user_ids);\n });\n\n Article::insert($articles->toArray());\n }", "title": "" }, { "docid": "1c93783c2ea23b1bcf0fcecb87e597a1", "score": "0.7693655", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('planeta')->insert([\n\n 'name'=>'Jupiter',\n 'peso'=>'1321'\n \n ]);\n\n DB::table('planeta')->insert([\n\n 'name'=>'Saturno',\n 'peso'=>'6546'\n \n ]);\n\n DB::table('planeta')->insert([\n\n 'name'=>'Urano',\n 'peso'=>'564564'\n \n ]);\n\n DB::table('planeta')->insert([\n\n 'name'=>'netuno',\n 'peso'=>'5213'\n \n ]);\n }", "title": "" }, { "docid": "cdec075ee5f589f68df7d8e373f800d0", "score": "0.76934415", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n for ($i=0; $i<100; $i++) {\n $faker = Faker\\Factory::create();\n \\App\\Models\\Agencies::create([\n 'name'=>$faker->name\n ]);\n }\n\n for ($i=0; $i<100000; $i++){\n $faker = Faker\\Factory::create();\n \\App\\Models\\User::create([\n 'first_name'=>$faker->firstName,\n 'last_name'=>$faker->lastName,\n 'email'=>$faker->email,\n 'agencies_id'=>$faker->numberBetween(1,10)\n ]);\n }\n\n }", "title": "" }, { "docid": "6a416e8eba24d6a06a2c1821432bb069", "score": "0.76887816", "text": "public function run()\n {\n $faker=Faker::create();\n foreach(range(1,10) as $value)\n {\n DB::table('students')->insert([\n \"name\"=>$faker->name(),\n \"email\"=>$faker->unique->safeEmail(),\n \"password\"=>Hash::make($faker->password),\n \"mobile\"=>$faker->phoneNumber,\n \"gender\"=>$faker->randomElement(['Male','Female'])\n ]);\n }\n }", "title": "" }, { "docid": "d40aad4597dc498684ff1a2297b648e4", "score": "0.7687799", "text": "public function run()\n {\n //factory('App\\Store', 2)->create();\n // for individual use \"php artisan db:seed --class=StoreTableSeeder\"\n Schema::disableForeignKeyConstraints();\n \n DB::table('store')->truncate();\n\n App\\Store::create([\n 'manager_staff_id' => 1,\n 'address_id' => 1,\n ]);\n\n App\\Store::create([\n 'manager_staff_id' => 2,\n 'address_id' => 2,\n ]);\n\n Schema::enableForeignKeyConstraints();\n \n }", "title": "" }, { "docid": "d932a3a60db7e3e1b5c8ff7359b4a2ba", "score": "0.768728", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /*$faker = Faker::create();\n \tfor($i = 0; $i < 10; $i++) {\n App\\Lists::create([\n 'item_name' => $faker->name,\n 'store_name' => $faker->name,\n 'total_item' => $faker->randomDigitNotNull,\n 'item_price' => $faker->numberBetween($min = 100, $max = 900),\n 'total_price' =>$faker->numberBetween($min = 1000, $max = 9000)\n ]);\n }*/\n }", "title": "" }, { "docid": "98c57ab9dc9353ad077141992a0dd327", "score": "0.7687021", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n $this->call(GenreSeeder::class);\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n Schema::enableForeignKeyConstraints();\n \n // create an admin user with email admin@library.test and password secret\n User::truncate();\n User::create(array('name' => 'Administrator',\n 'email' => 'admin@library.test', \n 'password' => bcrypt('secret'),\n 'role' => 1)); \n }", "title": "" }, { "docid": "6b052b127c0955be874bff998cbf539d", "score": "0.76856595", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n //$this->call(RequisitosSeeder::class);\n //factory('App\\User', 3)->create();\n //factory('App\\Situation', 3)->create();\n factory('App\\Sector', 3)->create();\n factory('App\\Role', 3)->create();\n factory('App\\Privilege', 3)->create();\n factory('App\\Evidence', 3)->create();\n factory('App\\Requirement', 3)->create();\n factory('App\\Company', 3)->create();\n }", "title": "" }, { "docid": "6f4cd475360e7bf0d5a1fe2752972955", "score": "0.76846963", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(KategoriSeeder::class);\n $this->call(UsersTableSeeder::class);\n $roles = \\App\\Models\\Role::all();\n \\App\\Models\\User::All()->each(function ($user) use ($roles){\n // $user->roles()->saveMany($roles);\n $user->roles()->attach(\\App\\Models\\Role::where('name', 'admin')->first());\n });\n // \\App\\Models\\User::all()->each(function ($user) use ($roles) { \n // $user->roles()->attach(\n // $roles->random(rand(1, 2))->pluck('id')->toArray()\n // ); \n // });\n }", "title": "" }, { "docid": "4b0c5746a1ac85fa81771a8a8a20868c", "score": "0.7678735", "text": "public function run()\n {\n //Tạo 1 dữ liệu trên data base\n // DB::table('todos')->insert([\n // 'name' => Str::random(10),\n // 'description' => Str::random(10),\n // 'completed' => true,\n // ]);\n\n //Tạo nhiều\n Todo::factory(5)\n // ->count(10)\n // ->hasPosts(1)\n ->create();\n //Sau khi tạo xong thì qua databaseSeeder.php để gọi\n }", "title": "" }, { "docid": "c6a289f8899b7ae9ecc9fac9bc29c5a6", "score": "0.7678028", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(\"OthersTableSeeder\");\n factory(Welfare::class, 100)->create();\n factory(JobTag::class, 100)->create();\n factory(Welfare::class, 100)->create();\n\n factory(Company::class, 10)->create()->each(function (Company $company) {\n $company->images()->createMany(factory(CompanyImage::class, random_int(0, 3))->make()->toArray());\n $company->jobs()->createMany(factory(Job::class, random_int(0, 20))->make()->toArray());\n });\n }", "title": "" }, { "docid": "e4b68debc10ebf9c9ba7ccc13ad96554", "score": "0.7677989", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Student::truncate();\n Schema::enableForeignKeyConstraints();\n\n // $faker = Faker\\Factory::create();\n\n // for ($i=0; $i < 100; $i++) { \n // $st = new Student([\n // \"first_name\" => $faker->firstName(),\n // \"last_name\" => $faker->lastName(),\n // \"email\" => $faker->unique()->safeEmail()\n // ]);\n // $st->save();\n // }\n\n factory(Student::class, 25)->create();\n }", "title": "" }, { "docid": "232280f5b66a069fae8a2b568db508e7", "score": "0.7671213", "text": "public function run()\n {\n factory(App\\Models\\User::class, 15)->create();\n factory(App\\Models\\Movie::class, 30)->create();\n factory(App\\Models\\Address::class, 30)->create();\n factory(App\\Models\\Contact::class, 30)->create();\n $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "2e8c9674b5b47271246bd3c5d33867fc", "score": "0.7670721", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n\n $faker = Factory::create();\n $users = array_merge(\n factory(User::class, 9)->create()->toArray(),\n factory(User::class, 1)->create(['role_id' => Role::where('name', 'admin')->first()->id])->toArray()\n );\n $categories = factory(Category::class, 6)->create()->toArray();\n\n foreach ($users as $user) {\n /** @var Post $posts */\n $posts = factory(Post::class, rand(1, 5))->create(['user_id' => $user['id']]);\n\n foreach ($posts as $post) {\n $post->categories()->attach([\n $faker->randomElements($categories)[0]['id'],\n $faker->randomElements($categories)[0]['id'],\n ]);\n\n factory(Comment::class, rand(1, 5))->create([\n 'post_id' => $post['id'],\n 'user_id' => $user['id'],\n ]);\n }\n }\n }", "title": "" }, { "docid": "4bea3dcfb1c11c2f563ef5c570939031", "score": "0.76692706", "text": "public function run()\n {\n $this->call(UsersSeeder::class);\n $this->call(MeasuresSeeder::class);\n $this->call(ItemsSeeder::class);\n \\App\\Models\\Buyer::factory(200)->create();\n \\App\\Models\\Storage::factory(3000)->create();\n \\App\\Models\\Purchase::factory(2000)->create();\n\n }", "title": "" }, { "docid": "b8a2d239e166712dd77165697867a5de", "score": "0.76674277", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n// Task::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 20; $i++) {\n Task::create([\n 'name' => $faker->name,\n 'status' => $faker->randomElement($array = array ('to-do','doing','done')),\n 'description' => $faker->paragraph,\n 'start' => $faker->dateTime($min = 'now', $timezone = null) ,\n 'end' => $faker->dateTime($min = 'now', $timezone = null) ,\n 'assignee' => $faker->randomElement(User::pluck('id')->toArray()),\n 'assigner' => $faker->randomElement(User::pluck('id')->toArray()),\n ]);\n }\n }", "title": "" }, { "docid": "ff42adb6774e0bbeff44a5168ad219fd", "score": "0.7666566", "text": "public function run()\n {\n $this->call([\n PermissionsTableSeeder::class,\n ]);\n\n \\App\\Models\\User::factory(10)->create();\n\n \\App\\Models\\Blog::factory(100)->create();\n }", "title": "" }, { "docid": "720860b2dc67da65a78f539890510b34", "score": "0.76662236", "text": "public function run()\n {\n\n \t$faker = Faker::create('id_ID');\n foreach(range(0,5) as $i){\n \t\tDB::table('sarana')->insert([\n 'judul'=>$faker->bothify('Taman ###'),\n 'user_id'=>1,\n \t'body'=>$faker->realText($maxNbChars = 50, $indexSize = 2),\n \t'gambar'=>'gambar.jpg',\n \t\t]);}\n // factory(App\\Sarana::class,10)->create();\n }", "title": "" }, { "docid": "475d4973b6c6199504d485d769b2a6fc", "score": "0.7665698", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Admins::insert(['email'=>'admin@smartuniv.com','password'=>Hash::make('Admin2019')]); //First Admin\n Uidata::insert(['data'=>'News tap']);\n Uidata::insert(['data'=>'']);\n Uidata::insert(['data'=>'']);\n Acyear::insert(['year'=>'2019/2020','semister'=>'1']);\n Syssta::insert(['state'=>0,'academic_year'=>1]);\n }", "title": "" }, { "docid": "3956831ae87733f8f0e38ec5700c0dbd", "score": "0.76615685", "text": "public function run()\n {\n // Initialize Faker\n $faker = Faker::create('id_ID');\n for ($i = 0; $i < 10; $i++) {\n DB::table('authors')->insert([\n 'first_name' => $faker->firstName,\n 'middle_name' => $faker->firstNameMale,\n 'last_name' => $faker->lastName,\n 'created_at' => $faker->date()\n ]);\n }\n }", "title": "" }, { "docid": "7b230b72d30c25948db35185929e3563", "score": "0.76597947", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class , 20)->create();\n factory(Rank::class,100)->create();\n factory(Answer::class,100)->create();\n\n }", "title": "" }, { "docid": "6d654d34dff257df1302ac38c4a46fab", "score": "0.76586807", "text": "public function run()\n {\n Model::unguard();\n\n $this->truncateMultiple([\n 'cache',\n 'failed_jobs',\n 'ledgers',\n 'jobs',\n 'sessions',\n // 'banner_per_pages',\n // 'news',\n // 'galeries',\n // 'careers',\n // 'faqs',\n // 'categories',\n // 'products',\n // 'about_contents',\n // 'company_contents',\n // 'web_settings'\n ]);\n\n // $news = factory(News::class, 5)->create();\n // $galeries= factory(Galery::class, 6)->create();\n\n // $faqs = factory(Faq::class, 8)->create();\n\n // $categoryIndustrial = factory(Category::class, 4)\n // ->create()\n // ->each(function ($category)\n // {\n // $category->products()->createMany(\n // factory(Product::class, 4)->make()->toArray()\n // );\n // });\n\n // $this->call(CareerTableSeeder::class);\n // $this->call(AboutContentSeeder::class);\n // $this->call(CompanyContentSeeder::class);\n // $this->call(WebSettingSeeder::class);\n\n // $this->call(AuthTableSeeder::class);\n\n // $this->call(MainCategorySeeder::class);\n\n $this->call(BannerPerPageSeeder::class);\n\n Model::reguard();\n }", "title": "" }, { "docid": "c5a6368cf4078a0a4d8b652f1ce43194", "score": "0.7657722", "text": "public function run()\n {\n // Create roles\n $this->call(RoleTableSeeder::class);\n // Create example users\n $this->call(UserTableSeeder::class);\n // Create example city\n $this->call(CitiesTableSeeder::class);\n // Create example restaurant type\n $this->call(RestaurantsTypesSeeder::class);\n // Create example restaurant\n $this->call(RestaurantsSeeder::class);\n }", "title": "" }, { "docid": "2b1ccfcd74ea29f817442dd58fc9459e", "score": "0.7657721", "text": "public function run()\n {\n //\n //DB::table('users')->truncate();\n $fakerBrazil = Faker::create('pt_BR');\n $faker = Faker::create();\n\n\n foreach (range(1, 10) as $index) {\n Notes::create(array(\n 'title' => $faker->randomElement($array = array('Atividade-1', 'Atividade-2', 'Atividade-3', 'Atividade-4')),\n 'user_name' => $faker->randomElement(User::lists('username')->toArray()),\n 'body' => $faker->sentence($nbWords = 15, $variableNbWords = true),\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\n ));\n }\n }", "title": "" }, { "docid": "33c35c9330268efff78a329cb9fde5f6", "score": "0.76569766", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'ricky',\n 'username' => 'admin',\n 'userlevel' => 'admin',\n 'email' => 'admin@example.com',\n 'password' => bcrypt('123'),\n 'created_by' => '1',\n 'created_at' => Carbon::now()\n ]);\n DB::table('users')->insert([\n 'name' => 'budi',\n 'username' => 'operator',\n 'userlevel' => 'pegawai',\n 'email' => 'operator@example.com',\n 'password' => bcrypt('123'),\n 'created_by' => '1',\n 'created_at' => Carbon::now()\n ]);\n\n // $this->call(UsersTableSeeder::class);\n // $this->call(CategoriesSeeder::class);\n // $this->call(ProductsSeeder::class);\n }", "title": "" }, { "docid": "ea44d8a6a359fde35d7e5c7e98a844c7", "score": "0.7656455", "text": "public function run()\n {\n $faker = Faker::create('es_ES');\n foreach(range(1,100) as $index){\n \tDB::table('personas')->insert([\n \t\t'nombre' => $faker->name,\n \t\t'apellido' => $faker->lastname,\n \t\t'edad' => $faker->numberBetween(1,100),\n \t\t'dni' => $faker->randomNumber(8),\n \t]);\n }\n }", "title": "" }, { "docid": "b69765baa7a12d13300d2c6d1d088950", "score": "0.7654586", "text": "public function run()\n {\n DB::table('users')->insert(\n [\n 'username' => 'admin',\n 'email' => 'oleg2e2@gmail.com',\n 'email_verified_at' => now(),\n 'password' => Hash::make('123456789'),\n 'link' => 'kontakt',\n 'created_at' => now(),\n 'updated_at' => now(),\n ]\n );\n\n DB::table('roles')->insert(['title' => 'admin']);\n DB::table('roles')->insert(['title' => 'user']);\n DB::table('role_user')->insert(['user_id' => 1, 'role_id' => 1]);\n\n factory(App\\User::class, 20)->create()->each(\n function ($user) {\n $user->posts()->save(factory(App\\Post::class)->make());\n $user->hasMany(App\\Reply::class, 'owner_id')->save(factory(App\\Reply::class)->make(['model_id' => rand(1, 9)]));\n $user->trips()->save(factory(App\\Trip::class)->make());\n }\n );\n }", "title": "" }, { "docid": "d8aa9d1a66e018ca7c4a33e3c222390c", "score": "0.76545465", "text": "public function run()\n {\n $this->labFacultiesSeeder();\n $this->labStudentSeeder();\n $this->labTagsTableSeeder();\n $this->labPositionsTableSeeder();\n $this->labSkillsTableSeeder();\n }", "title": "" }, { "docid": "38c1567f61695033bc9c5cd019c0e92f", "score": "0.7653314", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n // factory(App\\Patient::class, 3)->create()->each(function ($patient){$patient->appointments()->createMany(factory(App\\Appointment::class, 3)->make()->toArray()); $patient->});\n // factory(App\\Appointment::class, 3)->create()->each(function ($appointment){$appointment->patient()->save(factory(App\\Patient::class)->make());$appointment->nurse()->save(factory(App\\Nurse::class)->make());$appointment->physician()->save(factory(App\\Physician::class)->make());});\n\n $this->call(RoomTableSeeder::class);\n $this->call(MedicationTableSeeder::class);\n $this->call(DepartmentTableSeeder::class);\n $this->call(ProcedureTableSeeder::class);\n $this->call(DiseaseSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(UserSeederTable::class);\n }", "title": "" }, { "docid": "f22715a3aaed51889e03d8e0eff9e1bc", "score": "0.7648523", "text": "public function run()\n {\n \n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n \n DB::table('users')->truncate();\n\n DB::table('users')->insert([\n [\n \t'name'=>'user 1',\n \t'email'=>'user1@gmail.com',\n \t'password'=>bcrypt('password'),\n \t'created_at'=>\\Carbon\\Carbon::now()\n ],\n [\n \t'name'=>'user 2',\n \t'email'=>'user2@gmail.com',\n \t'password'=>bcrypt('password'),\n \t'created_at'=>\\Carbon\\Carbon::now()\n ],\n ]);\n\n //enable foreign key check for this connection after running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n \n }", "title": "" }, { "docid": "b0a54c2c4ac3b52e29c9b1fec31b5271", "score": "0.76484305", "text": "public function run()\n {\n\n // php artisan migrate:refresh --seed\n factory(App\\User::class, 10)->create()->each(function($user){\n $user->profile()->save(factory(App\\Profile::class)->make());\n });\n\n factory(App\\Website::class, 10)->create();\n factory(App\\Article::class, 100)->create()->each(function($article){\n $flag = random_int(0, 1);\n $ids = range(1, 10);\n\n shuffle($ids);\n\n if ($flag) {\n $sliced = array_slice($ids, 0, 2);\n $article->website()->attach($sliced);\n } else {\n $article->website()->attach(array_rand($ids, 1));\n }\n \n });\n\n }", "title": "" }, { "docid": "271eb5b13582683b989e89620a409611", "score": "0.76447785", "text": "public function run()\n {\n DB::table('shops')->delete();\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('shops')->insert([\n 'name' => $faker->firstName(),\n 'street' => $faker->streetName(),\n 'city' => $faker->city(),\n 'phoneNumber' => $faker->phoneNumber(),\n 'email' => $faker->email(),\n ]);\n }\n }", "title": "" } ]
4825e16f7f6b9d59d30bfb8a35c7eb30
Tells flight to render the page but with a prefix to save typing
[ { "docid": "c11473f7089b80faef43b1a809bd998e", "score": "0.50349724", "text": "private function renderPageFile($file)\n {\n\n Flight::render(\"developer/{$file}\");\n }", "title": "" } ]
[ { "docid": "d74cc7a864cf6529a4c8dc4961116f09", "score": "0.58020455", "text": "public function setTemplatePrefix( $prefix );", "title": "" }, { "docid": "465471ddc35f2a572fe903365bb56926", "score": "0.5701532", "text": "function setPrefix($prefix);", "title": "" }, { "docid": "b85874f6c5c7c3c0a707ec0244d4f601", "score": "0.56565094", "text": "public function prefix( $prefix );", "title": "" }, { "docid": "933e7ac1d0cbd0a3dbca7743c4cfd9e4", "score": "0.55972135", "text": "public function prefix( $prefix )\n {\n // i'll write the tests first ;)\n }", "title": "" }, { "docid": "afd95271620800cd45541cf7bf826b07", "score": "0.5546296", "text": "public function testFlashWithPrefix(): void\n {\n $this->View->setRequest($this->View->getRequest()->withParam('prefix', 'Admin'));\n $result = $this->Flash->render('flash');\n $expected = 'flash element from Admin prefix folder';\n $this->assertStringContainsString($expected, $result);\n }", "title": "" }, { "docid": "94197453ffbce6861293fb38212718bb", "score": "0.55275357", "text": "public function setPrefix($prefix) {\n\t\t$this->prefix = $this->sanitizer->name($prefix); \n\t}", "title": "" }, { "docid": "20e160a0187d78040447dce8811d44f9", "score": "0.5517722", "text": "public function setPrefix($prefix);", "title": "" }, { "docid": "20e160a0187d78040447dce8811d44f9", "score": "0.5517722", "text": "public function setPrefix($prefix);", "title": "" }, { "docid": "9f7c3000a17224f6312a8aa85c126d60", "score": "0.55143327", "text": "public function setPrefix($prefix){\r\n\t\t$this->prefix = ! empty($prefix) ? $prefix.':' : '';\r\n\t}", "title": "" }, { "docid": "207fe1b9f3e039788ea6ca211a11a4cd", "score": "0.54972464", "text": "public function _prefix($value) {}", "title": "" }, { "docid": "a1a0ef2501dd604e5d471af0eaca914c", "score": "0.5455328", "text": "function senarai_kujian(){\n $data['title'] = \"Senarai Kod Ujian\";\n $this->_render_page($data);\n }", "title": "" }, { "docid": "dd61327c4f36af26ce7a1cb7796fe1a8", "score": "0.54472345", "text": "public function setTypoScriptPrefix($prefix) {\n\t\t$this->request->setArgument('__typoScriptPrefix', $prefix);\n\t}", "title": "" }, { "docid": "fea64bb4ae0e76429a89281365d03a1b", "score": "0.5442909", "text": "public function prefix() {\n\t\t$this->processBlock( $this->tree );\n\t}", "title": "" }, { "docid": "baa036eb92433fd0a8ae7f8c7adb0b31", "score": "0.54419696", "text": "public function setPageTitlePrefix($prefix) {\r\n\t\t$this->pageTitlePrefix = $prefix;\r\n\t}", "title": "" }, { "docid": "c064e3fe38c0eec233ccfc2a7f6ef3ec", "score": "0.54037356", "text": "function pre_render() {}", "title": "" }, { "docid": "7a539a25ee6eea20b056b40fcdadf540", "score": "0.5374202", "text": "public function actionFishing()\n {\n //define semantic url for page\n $slug = '';\n $pageKey = 13;\n $page = $this->getGenericPage($pageKey);\n return $this->render('/sibley/genericMaster', [\n 'page' => $page,\n 'key' => $pageKey,\n \n ]);\n }", "title": "" }, { "docid": "bdd18556ba14ea758a767c81c02bc847", "score": "0.5364367", "text": "function setPrefix($prefix) {\n\t\t$this->prefix = $prefix;\n\t}", "title": "" }, { "docid": "fa60f47e50a6ea714cc079b4669cb97e", "score": "0.5331321", "text": "public function setPrefix(string $prefix): void\n\t{\n\t\t$this->prefix = (string) $prefix;\n\t}", "title": "" }, { "docid": "6b3913e349bec2e544eb855546f7339a", "score": "0.5307231", "text": "public function plugin_page() {\n\t\techo '<div class=\"{{lowercaseAbbrev name}}-wrap\"><div id=\"{{lowercaseAbbrev name}}-app\"></div></div>';\n\t}", "title": "" }, { "docid": "ab278f398fab143c602a33842bfae8ca", "score": "0.5298062", "text": "public static function setHookPrefix( string $prefix ) {\n\t\tstatic::$hookPrefix = $prefix;\n\t}", "title": "" }, { "docid": "4ef7608e19d2f95596a27b55869a1595", "score": "0.5290475", "text": "public function autoRender($flag = null) {}", "title": "" }, { "docid": "762885dd035a872b9fa3bd593c84bd2f", "score": "0.52735746", "text": "public function setPrefix($prefix) {\n\t\t$this->prefix = trim($prefix);\n\t}", "title": "" }, { "docid": "27ac5536322a9e4252020c32f50068e7", "score": "0.5267004", "text": "public function setTermsPrefix($prefix) {}", "title": "" }, { "docid": "4a872b4b602ca937a4ffa171b8d4a25a", "score": "0.52509505", "text": "function senarai_jawapan(){\n $data['title'] = \"Senarai Jawapan\";\n $this->_render_page($data);\n }", "title": "" }, { "docid": "09e7d84bc34c406d1f7b14601e27da5e", "score": "0.5247875", "text": "public function setPrefix($prefix)\n\t{\n\t\t$this->prefix = (string) $prefix;\n\t}", "title": "" }, { "docid": "2e51baa4685b0077ccdadef04494f3af", "score": "0.5227437", "text": "function page_speakers() {\n $f3=$this->framework;\n\t\t$f3->set('speakers', $this->speakers() );\n\t\t$f3->set('content','speakers.html');\n\t\t$f3->set('html_title','Performers - '.$this->site_title() );\n\t\tprint Template::instance()->render( \"page.html\" );\n\t}", "title": "" }, { "docid": "2ee812f68719e2a529a97288cce1e88b", "score": "0.5214225", "text": "public function setPrefix(string $prefix): void\n {\n $this->prefix = $prefix;\n }", "title": "" }, { "docid": "c153440f55ce4391eb9cb5de463c6312", "score": "0.52131164", "text": "public function add($path)\n {\n $this->render($this->prefixPath . $path);\n }", "title": "" }, { "docid": "b12fc561c20cd99d786cebd1a0be1053", "score": "0.5203625", "text": "public function onBeforeDispatch() {\n\t\tKService::setAlias('com:actors.template.helper','plg://site/system.username.helper'); \n\t\tKService::setAlias('com://site/actors.template.helper.story','plg://site/system.username.story');\n\t}", "title": "" }, { "docid": "5e7ea1716d8fb8f5058adb9fe239ebfc", "score": "0.52004415", "text": "function activePrefix($prefix)\n {\n if(request()->route()->getPrefix()==$prefix){\n return ' active';\n }else {\n return '';\n }\n }", "title": "" }, { "docid": "ef996a803f000cc681a8a0f8b3690db0", "score": "0.51956755", "text": "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n }", "title": "" }, { "docid": "a962e897d9149cb91a0f339e9cab19ff", "score": "0.51938105", "text": "public function setPrefix($prefix)\n {\n $mode = array_key_exists($prefix, $this->prefixMap) ? $this->prefixMap[$prefix] : '';\n\n if ($mode != '') {\n $this->setMode(\"+{$mode}\");\n }\n }", "title": "" }, { "docid": "ad1492a878f0ac96dde27cfddb7a6209", "score": "0.51810277", "text": "function do_acprename()\n\t{\n\t\t//-----------------------------------------\n\t\t// Show it\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->html->rename_admin_dir();\n\n\t\t$this->ipsclass->admin->nav[] = array( '', 'Изменение директории админцентра' );\n\n\t\t$this->ipsclass->admin->output();\n\t}", "title": "" }, { "docid": "84bf7fc93c72fe4a4ca014b560b0ded4", "score": "0.5166659", "text": "public function setPrefix($prefix) {\n\t\t$this->prefix = $prefix;\n\t\treturn;\n\t}", "title": "" }, { "docid": "182e264a649264e3161c389e9e3e9e82", "score": "0.51422286", "text": "private function prefix() {\n\n global $WC;\n\n $prefix = $this->local_prefix;\n\n $cache_prefix = xcache_get($prefix.\"_cache_prefix\");\n\n if($cache_prefix===false){\n $cache_prefix = $this->set_cache_prefix();\n }\n\n $prefix.=\"_$cache_prefix\";\n\n return $prefix;\n }", "title": "" }, { "docid": "5bdd2eca5f658724034ec02009e9a2e2", "score": "0.51422125", "text": "function do_acprename()\n\t{\n\t\t//-----------------------------------------\n\t\t// Show it\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->html .= $this->html->rename_admin_dir();\n\t\t\n\t\t$this->ipsclass->admin->nav[] = array( '', 'Rename the admin directory' );\n\t\t\n\t\t$this->ipsclass->admin->output();\n\t}", "title": "" }, { "docid": "46fe1134835a706bfec95b3cc1456689", "score": "0.5123266", "text": "abstract protected function prefixName($name);", "title": "" }, { "docid": "46fe1134835a706bfec95b3cc1456689", "score": "0.5123266", "text": "abstract protected function prefixName($name);", "title": "" }, { "docid": "46fe1134835a706bfec95b3cc1456689", "score": "0.5123266", "text": "abstract protected function prefixName($name);", "title": "" }, { "docid": "b601aa999dad3663ee64182ce8e59460", "score": "0.51182616", "text": "function fol(){\n $this->data['pageTypeName']=\"KLASÖR İÇERİĞİ\";\n }", "title": "" }, { "docid": "d930289e7557491c8a86e93a6bc2a8b4", "score": "0.5111276", "text": "function wporg_modify_archive_title_prefix( $prefix ) {\n\tif ( is_post_type_archive() ) {\n\t\treturn '';\n\t}\n\n\treturn sprintf(\n\t\t'<span class=\"archive-title-prefix\">%s</span>',\n\t\t$prefix\n\t);\n}", "title": "" }, { "docid": "614f8c9e40938f88a0da59ae9c9665a8", "score": "0.51045936", "text": "public function setCachingPrefix($prefix='')\n {\n $this->prefix = $prefix;\n }", "title": "" }, { "docid": "184b4153c4c7c794efbd0d16312f7524", "score": "0.5102307", "text": "public function setPrefix($prefix)\n {\n $this->prefix = !empty($prefix) ? $prefix . ':' : '';\n }", "title": "" }, { "docid": "0d347061e71b7e3833c9b6e99f2a42fd", "score": "0.5095665", "text": "public function littleAction()\n {\n return $this->render('default/little.html.twig');\n }", "title": "" }, { "docid": "45efe521fab03ed2091c8906640c3d28", "score": "0.5091624", "text": "public function beforeroute() {\n $this->render_target = 'snippets/plain_text.htm';\n // viewport is the window surrounded by the main UI frame & menus (set false for login screen)\n $this->f3->set('use_viewport', true);\n // for responses within normal body html structure\n $this->f3->set('view','snippets/plain_text.htm');\n // variable data entered into plain text or alert responses\n $this->f3->set('response_message', 'success');\n\t}", "title": "" }, { "docid": "836d6b32be698ee0217ac85371bbe631", "score": "0.50850964", "text": "public function landing()\n\t{\n\t\t$this->template\t= false;\n\t\tview::render(\"main/landing\");\n\t}", "title": "" }, { "docid": "bf3be7ab49f8db532a2e0ed8b36c247c", "score": "0.5084514", "text": "public function kontak(){\n $this->render_backend('kontak'); // load view kontak.php\n }", "title": "" }, { "docid": "f8fdd2e00869139ac0af5e29e76dd725", "score": "0.5083333", "text": "public function setSwiftPrefix($var) {}", "title": "" }, { "docid": "985fd9e4369e1eb4119eab2912922109", "score": "0.50806886", "text": "function response_prefix()\n{\n\tglobal $language, $txt;\n\tstatic $response_prefix = null;\n\n\t$cache = Cache::instance();\n\n\t// Get a response prefix, but in the forum's default language.\n\tif ($response_prefix === null && (!$cache->getVar($response_prefix, 'response_prefix') || !$response_prefix))\n\t{\n\t\tif ($language === User::$info->language)\n\t\t{\n\t\t\t$response_prefix = $txt['response_prefix'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$mtxt = [];\n\t\t\t$lang_loader = new Loader($language, $mtxt, database());\n\t\t\t$lang_loader->load('index');\n\t\t\t$response_prefix = $mtxt['response_prefix'];\n\t\t}\n\n\t\t$cache->put('response_prefix', $response_prefix, 600);\n\t}\n\n\treturn $response_prefix;\n}", "title": "" }, { "docid": "cbe57219226482f1d4740135100866c4", "score": "0.5079788", "text": "function setPrefix($value) {\n $this->prefix = trim($value);\n }", "title": "" }, { "docid": "d66e926847fbcd09c8616693301fb6e2", "score": "0.50702786", "text": "public function hookDisplayHeader(){\n\t\t// this page. \t \t\t \t \t \t \n\t\tif ($this->context->controller instanceof OrderOpcController) {\n\t\t\t$this->context->controller->addCSS(_MODULE_DIR_ . 'barclaycardcw/css/style.css');\n\t\t}\n\t}", "title": "" }, { "docid": "9d288e5b132f29ae046c1b249da1fe06", "score": "0.5059359", "text": "private function fronteEnd() {\n\n }", "title": "" }, { "docid": "2a2abdc425e87fddc5a166185307efeb", "score": "0.5054106", "text": "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n if (!StringHelper::endsWith(\".\", $prefix)) {\n $this->prefix .= \".\";\n }\n }", "title": "" }, { "docid": "e8907afcc268c19f6fc535a77c67cb30", "score": "0.50418025", "text": "public static function prefix( $prefix ) {\n\t\tarray_push( self::$prefixes, $prefix );\n\t}", "title": "" }, { "docid": "d4cf01b46f11cbb2117f4ee01306d6c1", "score": "0.5036663", "text": "function menu_page() {\r\n\t\techo '<h3>' . __( 'FS Repeater', 'fs-pods-repeater-field' ) . '</h3>';\r\n\r\n\t}", "title": "" }, { "docid": "5bf7fbb0f51d0b2938ece1c2c06ed0d8", "score": "0.50339216", "text": "public static function setPrefix($prefix)\n\t{\n\t\tself::$prefix = $prefix;\n\t}", "title": "" }, { "docid": "bea9b59381dbad587595d7f45dd6d345", "score": "0.5032266", "text": "function senarai_kodjenisfasiliti(){\n $data['title'] = \"Senarai Kod Jenis Fasiliti\";\n $this->_render_page($data);\n }", "title": "" }, { "docid": "0d7a38f715774aea27f297c50b89bd4c", "score": "0.5029538", "text": "public function indexAction()\n {\n $this->view->controllerUrl = '/' . ltrim($this->getRequest()->getPathInfo(), '/');\n $this->view->xtype = 'kwf.autotreesync';\n }", "title": "" }, { "docid": "f61885b457f8277794e6b11094b8f6d0", "score": "0.50289404", "text": "public function prefix($compiler) {\n\n\t}", "title": "" }, { "docid": "9428c563958a1911b3b231937de0ec9d", "score": "0.5028545", "text": "function addHeadingFE() {\r\n global $pagename;\r\n echo \"<h1 class=\\\"text-center text-danger\\\">\" . ucfirst($pagename) . \" Items</h1>\";\r\n return null;\r\n}", "title": "" }, { "docid": "fce306b3cb3e22409850e9e98b25f18f", "score": "0.5023415", "text": "function hey_api_prefix( $prefix ) {\n\treturn 'api'; // http://mysite.com/api/\n}", "title": "" }, { "docid": "c1ec2423843068355088c548fc404a13", "score": "0.5015954", "text": "protected function set_use_prefix($use_prefix = true) {\n $this->use_prefix = $use_prefix;\n }", "title": "" }, { "docid": "8bc383be0c0551987008cc1e903dfb3e", "score": "0.5010373", "text": "function listing(){ \n $data['title'] = 'Senarai Selenggaraan';\n $this->_render_page($data);\n }", "title": "" }, { "docid": "cf51e44baf9ef0501e5d6638efc4a890", "score": "0.50090814", "text": "function snazzy_pingback_header() {\n\t\tif ( is_singular() && pings_open() ) {\n\t\t\techo '<link rel=\"pingback\" href=\"', bloginfo( 'pingback_url' ), '\">';\n\t\t}\n\t}", "title": "" }, { "docid": "6cb4dcfc22496bfa5ed8ebbd14ce310e", "score": "0.50090533", "text": "function __page ($path_to_page) {\n\techo _page($path_to_page);\n}", "title": "" }, { "docid": "d0b6929e16474ac7919d9db08029add0", "score": "0.5006726", "text": "public function index() {\r\n echo \"hola\";\r\n $this->autoRender=false;\r\n }", "title": "" }, { "docid": "2729c35442e9ab51e6b8166a7456d582", "score": "0.49938363", "text": "public static function getPrefixKey()\n\t{\n return 'cms_page_prefix_key';\n\t}", "title": "" }, { "docid": "8afc1877e86dd69123d0b21f434c20a8", "score": "0.49913275", "text": "function clientCode(Page $page)\n {\n // ...\n\n echo $page->view();\n\n // ...\n }", "title": "" }, { "docid": "52a6ec7c89c44794c621a88171c5f42a", "score": "0.49885634", "text": "public function setPrefix(callable $prefix): void\n {\n $this->prefix = $prefix;\n }", "title": "" }, { "docid": "b64a694128a6aa66b4d84b31b0e0d5d0", "score": "0.49877223", "text": "function setRequestPrefix($prefix)\r\n {\r\n $this->requestPrefix = $prefix;\r\n }", "title": "" }, { "docid": "63f95165939708ae3b6e9ca8f55bd703", "score": "0.49804646", "text": "public function prefix($value) : string;", "title": "" }, { "docid": "8311f1976ab6d19f4ac29b4320663823", "score": "0.49776617", "text": "public function actionGolf()\n {\n //define semantic url for page\n $slug = '';\n $pageKey = 10;\n $page = $this->getGenericPage($pageKey);\n return $this->render('/sibley/genericMaster', [\n 'page' => $page,\n 'key' => $pageKey,\n \n ]);\n }", "title": "" }, { "docid": "6e55338260ae22b5c50a17ae29442b28", "score": "0.4974933", "text": "function home()\n {\n $this->f3->set('content', '/card/home.phtml');\n }", "title": "" }, { "docid": "a12cfc7b7509b5814cac09203bd7a6c6", "score": "0.49570364", "text": "public function home()\n {\n $this->ntag->render('body')\n ->send();\n }", "title": "" }, { "docid": "07e7aa4ec799434ce0e734a2db5fdd9f", "score": "0.4956233", "text": "#[Route (\"/exemples/ajax/form/data/exemple1/affichage/master/page\")]\n public function exemple1AffichageMasterPage()\n {\n return $this->render(\"/exemples_ajax_form_data/exemple1_affichage_master_page.html.twig\");\n }", "title": "" }, { "docid": "5c6c51be31b8e76afe3ec8b4045dcdbb", "score": "0.49485558", "text": "private function setOutputPrefix($prefix)\n {\n if (!($this->output->getFormatter() instanceof PrefixFormatter)) {\n return;\n }\n\n $this->output->getFormatter()->prefix = $prefix;\n }", "title": "" }, { "docid": "5daf8c4737c45846ec8cf4525fd1a1f5", "score": "0.49464068", "text": "protected function DisplayPre()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "fdae876d03abf95f9f263453ba61835f", "score": "0.49399725", "text": "public static function route() {\r\r\n $current_view = self::$hooks[current_filter()];\r\r\n include(ASP_PATH.'backend/'.str_replace(\"asp_\", \"\", $current_view).'.php');\r\r\n }", "title": "" }, { "docid": "28fb33e2147dede5b003990d4bfab5e3", "score": "0.4928891", "text": "function gwp_page_prefix() \n{\n if (is_post_type_archive()) \n {\n $prefix = get_queried_object()->name;\n }\n elseif(is_category() || is_tag() || is_tax())\n {\n $obj = get_queried_object();\n $id = $obj->term_id;\n if(is_tax('portfolio_page')) \n {\n $prefix = $id . '_portfolio';\n }\n elseif(is_tax('posts_page'))\n {\n $prefix = $id . '_blog';\n }\n else\n {\n $prefix = 'term_' . $id;\n }\n }\n elseif(is_page() || is_single()) \n {\n $prefix = get_queried_object_id();\n }\n elseif (is_home() || \n is_archive() ||\n is_author() ||\n is_search())\n { \n $prefix = 'blog';\n }\n else \n {\n return false;\n }\n return $prefix;\n}", "title": "" }, { "docid": "f8c148c03c6a3d74071b79bec20c0f09", "score": "0.49232498", "text": "public function prefix() {\r\n\t\treturn $this->prefix.$this->_;\r\n\t}", "title": "" }, { "docid": "d4d40b600267e4ceda02c5499f1da362", "score": "0.4907972", "text": "protected function showBeforeBody() {\r\n\t\t\teval(\"\\$url = Config::URL_\".strtoupper(E7::$languageId).\";\");\r\n?>\r\n<h3><?= $url.$_SERVER['REQUEST_URI'] ?></h3>\r\n<h2><?= $this->title ?></h2>\r\n<?\r\n\t\t}", "title": "" }, { "docid": "85bd36749098d869ec1f8cc857bc19b4", "score": "0.49079528", "text": "public function render() {\n\t\t$GLOBALS['TSFE']->additionalHeaderData[] = '\n\t\t\t<script type=\"text/javascript\" src=\"' . t3lib_extMgm::siteRelPath('jobsearch') . '/Resources/Public/Javascript/search.js\"></script>\n\t\t';\n\t}", "title": "" }, { "docid": "801a0d82b52d77323290ae134ef8187d", "score": "0.49007967", "text": "public function render_wizard() {\n\t\tinclude Plugin::instance()->get_view( 'common/page' );\n\t}", "title": "" }, { "docid": "b03e47b88557ec75e506dee176785f79", "score": "0.48873496", "text": "public function hookDisplayHome() {\r\n $config = json_decode(Configuration::get($this->name), true);\r\n $this->smarty->assign(array(\r\n 'quote' => $config['quote'][$this->context->language->id],\r\n 'author' => $config['author'][$this->context->language->id]\r\n ));\r\n\r\n return $this->display(__FILE__, $this->name . '.tpl');\r\n }", "title": "" }, { "docid": "7ce96c91b9475908d3dfd926dd63e267", "score": "0.48873293", "text": "function w8ing_page_text() {\n\techo '<p>'.__('Select on which page you want your traffic to be redirected when the landing page is activated','w8ing').'</p>';\n}", "title": "" }, { "docid": "f2853785967c03bff47967084d7684b6", "score": "0.4880458", "text": "public function setUserAgentPrefix(string $prefix);", "title": "" }, { "docid": "7da441d1e6a1fc84a2edd418227d710a", "score": "0.48787245", "text": "function handle_special_request($path){\n\tglobal $PAGE_FORWARDING; //Get forwarding array from config.php\n\tif(array_key_exists(strtolower($path),$PAGE_FORWARDING)){\n\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\theader(\"Location: {$PAGE_FORWARDING[$path]}\");\n\t}\n}", "title": "" }, { "docid": "66045976d87aa0246bd500729c0ccddd", "score": "0.48757997", "text": "public function custom() \n {\n $this->wpanel->set_meta_title('Início');\n $this->render('custom');\n }", "title": "" }, { "docid": "0e1f00f0e45458cd4eb9870b2031451f", "score": "0.4873921", "text": "function renderFieldsByName($prefix){\n\t\t$partform=array();\n\t\tforeach ($this->fields as $key=>$field){\n\t\t\tif (!isset($field['name'])) continue;\n\t\t\tif (!\\is_array($field['name'])) continue;\n\t\t\tif ($field['name'][0]==$prefix)$partform[$key]=$field;\n\t\t}\n\t\tif ($this->needSort)datawork::stable_uasort($partform,array('c\\\\datawork','positionCompare'));\n\t\t$htmlout='';\n\t\t$out='';\n\t\tforeach ($partform as $key=>$field){\n\t\t\tif (core::$debug)$htmlout.='\n<?=$form->renderField(\\''.$key.'\\')?>';\n\t\t\t$out.=$this->renderField($key);\n\t\t}\n\t\tif (core::$debug){\n\t\t\tdebug::consoleLog($htmlout);\n\t\t\tdebug::groupEnd();\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "c634f40b80728ad2ce4115aab3017779", "score": "0.48695588", "text": "protected function setPrefixOption(string $prefix): void\n {\n $this->prefix = $prefix;\n }", "title": "" }, { "docid": "b656f8cde15aebb1501224b10a70d8c0", "score": "0.48626107", "text": "public function render()\n\t{\n\t\t\n\t\t$this -> requestView($this -> viewName);\t\t\n\t\t\n\t}", "title": "" }, { "docid": "7754c964fad2d8b80663fc1a23ef955c", "score": "0.4860785", "text": "public function customPage() {\n\t\treturn [ '#markup' => t('Welcome to my custom page'), ];\n\t}", "title": "" }, { "docid": "8e45ae8a4593cade3a66a168c5d455a0", "score": "0.48536634", "text": "private function getPrefix($name, $page)\n {\n if(isset($this->objects[$name]['prefix'])){\n return \"/\".$this->objects[$name]['prefix'].\"/\".$page->URLSegment.\"/\";\n }\n }", "title": "" }, { "docid": "736e4bff3ad4a7d5a5c33705ac206db8", "score": "0.4852362", "text": "function UKMnominasjon() {\n\t$TWIG = array();\n\trequire_once('controller/layout.controller.php');\n\t$TWIG['tab_active'] = 'nominasjon';\n\techo TWIG('nominasjon/snart.html.twig', $TWIG, dirname(__FILE__), true);\n\treturn;\n}", "title": "" }, { "docid": "50ece2607af00f9c34fded33431a7072", "score": "0.48522064", "text": "public function setForcePrefix($prefix=\"\")\n { \n $this->prefix = $prefix;\n return $this;\n }", "title": "" }, { "docid": "6dfe63f3562f3bef9d0f3e887232b214", "score": "0.48429358", "text": "public function actionSwimming()\n {\n //define semantic url for page\n $slug = '';\n $pageKey = 14;\n $page = $this->getGenericPage($pageKey);\n return $this->render('/sibley/genericMaster', [\n 'page' => $page,\n 'key' => $pageKey,\n \n ]);\n }", "title": "" }, { "docid": "744cd9924f90a26353cf4e12c7d5111a", "score": "0.48422247", "text": "public function router()\n {\n $this->ntag->setStyle('medium-editor.min.css')\n ->setScript('medium-editor.min.js')\n ->setScript('manual.js')\n ->render('manual/router')\n ->send();\n }", "title": "" }, { "docid": "b7129267c8a549f65fb77ee4be0aa880", "score": "0.4838097", "text": "#[Route (\"/exemples/ajax/form/data/exemple1/affichage/master/page/script/externe\")]\n public function exemple1AffichageMasterPageScriptExterne()\n {\n return $this->render(\"/exemples_ajax_form_data/exemple1_affichage_master_page_script_externe.html.twig\");\n }", "title": "" }, { "docid": "b2ff56691329d374f1dd40b743f357ca", "score": "0.48375598", "text": "private function generateBackend()\n {\n $this->strTemplate = 'be_wildcard';\n $this->Template = new \\BackendTemplate($this->strTemplate);\n $this->Template->wildcard = \"Navigation aus Libraree\";\n }", "title": "" }, { "docid": "7fea8d0df438eda213b19fd8bd480c48", "score": "0.4837188", "text": "function linkPrefixExtension() { return false; }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "504f2133f2154439bff023c89c7e65d6", "score": "0.0", "text": "public function edit($id)\n {\n $rows= Classmember::find($id);\n if (is_null($rows))\n {\n Session::flash('message','Records could not be found!');\n Session::flash('alert-class','alert-warning'); \n return redirect('classmembers');\n }\n $classes = Classes::where('NationalID',auth()->user()->NationalID)->lists('classname','id');\n return view('classmembers.edit',compact('rows','classes'));\n }", "title": "" } ]
[ { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "8f5529ba137277265d5572c380aac566", "score": "0.76910913", "text": "public function editAction()\n {\n $this->view->title .= ' - Edit Resource';\n\n $id = $this->_getParam('id');\n if (empty($id)) {\n throw new RuntimeException('Missing parameter id.');\n }\n\n $resourceResource = $this->_helper->modelResource('Resources');\n $resource = $resourceResource->find($id);\n if (!count($resource)) {\n throw new RuntimeException('Cannot found resource ' . $id);\n }\n $resource = $resource->getIterator()->current();\n\n $form = $this->_helper->form();\n $request = $this->getRequest();\n if ($request->isPost() && $form->isValid($request->getPost())) {\n $data = $form->getValues();\n unset($data['id']); //unset data for zf 1.6\n $resource->populate($data);\n if (!$resource->save()) {\n throw new RuntimeException('Save Resource failure!');\n }\n\n $this->_helper->flashMessenger(\"Save Resource \\\"{$resource->name}\\\" successful!\");\n $this->view->messages = $this->_helper->flashMessenger->getCurrentMessages();\n $this->_helper->flashMessenger->clearCurrentMessages();\n }\n $form->setDefaults($resource->toArray());\n $form->setDefault('id', $resource->id);\n $this->view->form = $form;\n }", "title": "" }, { "docid": "5069ab4d37ad8824f8739ff562d0d370", "score": "0.74427706", "text": "function editForm() {\n render(\"guest/update\");\n }", "title": "" }, { "docid": "6f88bb286afae4ce47ad9810da77dffb", "score": "0.7220439", "text": "public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Super_Service_Resource::get(intval($id));\r\n\t\t\r\n\t\t$this->assign('info', $info);\r\n\t}", "title": "" }, { "docid": "84fa42f4318791adb736d823ce255f40", "score": "0.7115206", "text": "public function edit() {\n \n $partner = $this->partner_model->get_by_id($this->input->get('id'));\n if (!is_null($partner)) {\n echo $this->load->view('partner/edit_form', array(\n 'id' =>$partner->id,\n 'name' => $partner->name\n ), TRUE);\n }\n else {\n echo show_404('The resource you requested was not found');\n } \n }", "title": "" }, { "docid": "7f75b87329616886dbf4cacf219053f8", "score": "0.7070694", "text": "public function editAction()\n {\n $this->formClass = EditForm::class;\n\n return parent::editAction();\n }", "title": "" }, { "docid": "da32ec30ea6b151bdb0d8c95b7fbef49", "score": "0.7062849", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::find($id);\n\n\t\tif (Auth::id() !== ($resource->user_id))\n\t\t{\n\t\t\treturn Redirect::back()->withFlashMessage('You cannot edit this resource');\n\t\t}\n\n\t\treturn View::make('resources.edit')->with('resource', $resource);\n\t}", "title": "" }, { "docid": "5a02684925f991ee39abcb153d80d058", "score": "0.7008457", "text": "public function edit()\r\n {\r\n return view('hr::edit');\r\n }", "title": "" }, { "docid": "06b34b79c3a9b611ad6ef22ee71c20e7", "score": "0.6987668", "text": "public function edit()\n {\n return view('redistask::edit');\n }", "title": "" }, { "docid": "53fbc8894a41287014c5edbb650194bf", "score": "0.6966032", "text": "public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Resource::get(intval($id));\r\n\t\t\r\n\t\tlist(,$resource_imgs) = Gou_Service_ResourceImg::getList(0, 10, array('resource_id'=>intval($id)), array('id'=>'ASC'));\r\n\t\t$this->assign('resource_imgs', $resource_imgs);\r\n\t\t\r\n\t\t$this->assign('info', $info);\r\n\t}", "title": "" }, { "docid": "7e492dbc3c5834bd8dcf322b6e0bebf4", "score": "0.6945628", "text": "public function editAction() {\n $patientID = $this->getParam('id');\n\n $form = new Application_Form_Patient();\n $form->getElement('submit')->setLabel(\"Daten ändern\");\n\n $request = $this->getRequest();\n\n // Wenn das Formular abgesedet wurde, neue Daten Speichern\n // Wenn kein post Request vorliegt => Erster Seitenaufruf, Patient wird anhand der uebergebenen ID ins Formular eingetragen.\n\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($request->getPost())) {\n $patient = new Application_Model_Patient_Patient($form->getValues());\n $mapper = new Application_Model_Patient_PatientMapper();\n $mapper->save($patient);\n return $this->_helper->redirector('list');\n }\n } else {\n $patient = new Application_Model_Patient_Patient();\n $mapper = new Application_Model_Patient_PatientMapper();\n $mapper->find($patientID, $patient);\n\n\n $form->populate($patient->getKeyValueArray());\n }\n\n $this->view->form = $form;\n }", "title": "" }, { "docid": "a5aafcf2a2bbeb05f135b2394c4525d2", "score": "0.6944655", "text": "public function action_edit() {\n\t\tif (empty($this->id)) {\n\t\t\tthrow new Kohana_Exception('No ID received for view');\n\t\t}\n\n\t\t$this->load_model('edit');\n\n\t\tif ( ! empty($_POST)) {\n\t\t\t$this->save_model();\n\t\t}\n\n\t\t$this->template->page_title = 'Edit - ' . $this->page_title_append;\n\t\t$view_title = $this->get_page_title_message('editing_item');\n\t\t$view_content = $this->model->get_form(array(\n\t\t\t'mode' => 'edit',\n\t\t));\n\t\t$this->add_default_view($view_title, $view_content);\n\t}", "title": "" }, { "docid": "5528e9d735a1d9a4a8c37629a76211ee", "score": "0.6944128", "text": "public function show_editform() {\n $this->item_form->display();\n }", "title": "" }, { "docid": "5984290a0d4758b0ead36edab74a7fcb", "score": "0.69379073", "text": "public function edit($id)\n {\n $title = $this->model->getTitle();\n $form_title = $this->name;\n $forms = $this->model->getFormList();\n $data = $this->model->find($id);\n return view('admin.layouts.edit')->with(compact('data','forms', 'title', 'form_title'));\n }", "title": "" }, { "docid": "439b2cee9a4232572f243ce40fe7ff37", "score": "0.6936526", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::find($id);\n\n\t\t// queries the schools db table, orders by type and lists type and id\n\t \t$school_options = DB::table('schools')->orderBy('type', 'asc')->lists('type','type');\n\t \t$year_options = DB::table('years')->lists('year','year');\n\t \t$unit_options = DB::table('units')->lists('unit','unit');\n\t \t$resourceTypes_options = DB::table('resource_types')->orderBy('type', 'asc')->lists('type','type');\n\n\t \t$options = [\n\n\t \t\t'school_options' => $school_options, \n\t \t\t'year_options' => $year_options, \n\t \t\t'unit_options' => $unit_options,\n\t \t\t'resourceType_options' => $resourceTypes_options\n\t \t];\n\n\t return View::make('resources.edit', array('options' => $options, 'resource' => $resource));\n\n\n\n\t}", "title": "" }, { "docid": "44db8e15fc1352a7c519823621a72cc9", "score": "0.69331795", "text": "public function edit()\n {\n return view('coreplanification::edit');\n }", "title": "" }, { "docid": "6f12de6367ed6b5e724959286c687d98", "score": "0.6924614", "text": "public function edit($id)\n\t{\n\t\t$model = SysDetailFormManager::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysDetailFormManagerForm', [\n \t'method' => 'POST',\n \t'url' => 'detailformmanager/update/'.$id,\n \t'model' => $model,\n \t]);\n\n\t\treturn View::make('dynaflow::detailformmanager.form', compact('form'));\n\t}", "title": "" }, { "docid": "32d0551d54bd22e3701bf40a8c1cbd2e", "score": "0.6904719", "text": "public function edit()\n {\n return view('partnermanagement::edit');\n }", "title": "" }, { "docid": "7b1b04ea22eb307dae4782d1893d684f", "score": "0.68787277", "text": "public function edit()\n {\n return view('app::edit');\n }", "title": "" }, { "docid": "be7762755fcfeef213c7106eb19a722a", "score": "0.68687415", "text": "public function edit()\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "bd55c6cca624fddd49faf3e7f8d44ebc", "score": "0.6867638", "text": "public function editAction()\n {\n// \treturn array('form'=>$form);\n }", "title": "" }, { "docid": "311e3f6fa3d20c187430d7b70defb091", "score": "0.68635666", "text": "public function editAction()\n {\n $this->loadLayout();\n $this->renderLayout();\n }", "title": "" }, { "docid": "a093d663f095c2eff827fd56ba3f1c5c", "score": "0.6835696", "text": "public function edit()\n {\n return view('taskmanagement::edit');\n }", "title": "" }, { "docid": "96e7a1a8798dd32cbc9d0fff02092958", "score": "0.683385", "text": "public function edit($id)\n\t{\n\t\t$this->resources = array('driver' => $this->resource\n \t\t\t\t\t\t);\n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, $this->resources);\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, $this->resources)->render();\n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t\t);\n\t}", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "9c40deb595ac4a285fa76f490ad8b576", "score": "0.67989755", "text": "public function fieldEditAction() {\n\n parent::fieldEditAction();\n\n //GENERATE FORM\n $form = $this->view->form;\n\n if ($form) {\n $form->setTitle('Edit Form Question');\n $form->removeElement('search');\n $form->removeElement('display');\n $form->removeElement('show');\n $form->addElement('hidden', 'show', array('value' => 0));\n $form->removeElement('error');\n $form->removeElement('style');\n }\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.67960227", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "38b95b158cfbd7d6008eb1313d74dead", "score": "0.67904013", "text": "public function editProduct()\n {\n $this->configureFormRenderer('required');\n\n $this->productForm->addProductId();\n $this->productForm->populateFrom($product = $this->catalog->productOf($id = 1));\n\n echo $this->view->render('examples/edit-information.html.twig', [\n 'form' => $this->productForm->buildView(),\n ]);\n }", "title": "" }, { "docid": "1f3e62c409733532dc3f0f85568bdbb0", "score": "0.6761064", "text": "public function edit($id)\n\t{\n\t\treturn view($this->plural.'.edit', [$this->singular => $this->model->findOrFail($id)]);\n\t}", "title": "" }, { "docid": "2e451cbecb2a4edf2e18ea359a84b198", "score": "0.6758181", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('OffresBundle:Offres')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Offres entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('OffresBundle:Offres:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "1ad8f42c84160b8c6ce6296389de89c9", "score": "0.6757268", "text": "function edit( $resource ){\n\n $brands = allWithoutTrash('product_brands' );\n\n\n $stocks = get('inventory', $resource);\n\n $product = get( 'products', $resource );\n\n return view( 'admin/product/add_product', compact( 'product', 'brands', 'stocks' ));\n}", "title": "" }, { "docid": "c687e229c70d5b2bb3174acd2887d935", "score": "0.67551833", "text": "public function edit($id)\n {\n //Open form in edit mode.\n $product = Product::findOrFail($id);\n return view('admin.Products.edit')->with('product', $product);\n }", "title": "" }, { "docid": "aae9d312c6fa709ae12d3c879ef9a3f2", "score": "0.67495203", "text": "public function edit(Form $form)\n {\n $form = Form::find($form->id);\n $data = array(\n 'form' => $form,\n 'types' => $this->getType()\n );\n return view('./form/form', $data);\n }", "title": "" }, { "docid": "173e18a8d00009c51c3e2b096afa35c6", "score": "0.67494076", "text": "public function edit()\n {\n $rmk = Specialization::find($id);\n return view('specialization.edit', compact('rmk'));\n }", "title": "" }, { "docid": "de59ebe43d3ccd460af8c204a2ce504f", "score": "0.674883", "text": "public function editAction()\n {\n# $page = $this->_helper->db->findById();\n# $this->view->form = $this->_getForm($page);\n# $this->_processPageForm($page, 'edit');\n }", "title": "" }, { "docid": "bcf716390400a7068b7e1c48017f7c0f", "score": "0.67475426", "text": "function edit()\n\t{\n\t\t$id = $this->ci->uri->segment($this->config['uri_segment']+1);\n\t\treturn $this->_form($id);\n\t}", "title": "" }, { "docid": "7b5265e5c66828f2674f182bfb554b6b", "score": "0.67471254", "text": "public function edit()\n {\n return view('feaccount::edit');\n }", "title": "" }, { "docid": "7e53728fc096714ffa60b9478bd64083", "score": "0.67435557", "text": "function edit()\n {\n JRequest::setVar('view', 'team');\n JRequest::setVar('layout', 'form');\n JRequest::setVar('hidemainmenu', 1);\n\n parent::display();\n }", "title": "" }, { "docid": "668b7d8579ddada4536a4181f3e08041", "score": "0.6737808", "text": "public function edit()\n {\n return view('rekanan::edit');\n }", "title": "" }, { "docid": "7cb2b004357f9ffd5cddc45388789b2a", "score": "0.6736445", "text": "public function edit($id)\n {\n $this->data['obj'] = FormObject::find($id);\n $this->data['title'] = \"Edit \" . $this->data['obj']->name . \" Property\";\n $this->data['url'] = 'system/form-objects/' . $id;\n $this->data['method'] = 'put';\n $this->data['sites'] = Site::whereActive(1)->get()->all();\n\n $this->data['hotels'] = Hotel::all();\n\n return view('system.forms.form-object', $this->data);\n }", "title": "" }, { "docid": "a57bcfb849abf842f54ab142f87778dc", "score": "0.6734803", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n return view('admin.portal.edit', compact('resource'));\n }", "title": "" }, { "docid": "ff86c2f46684f81c5fd959adb2807f9e", "score": "0.67255336", "text": "public function edit($id)\n {\n $product = $this->products->findById($id);\n return View::make('products._form', compact('product'));\n }", "title": "" }, { "docid": "e144891e4fdc3366376e396b701fbf99", "score": "0.6711672", "text": "public function edit()\n\t{\n\t\t$jInput = JFactory::getApplication()->input;\n\t\t$jInput->set('view', 'item');\n\t\t$jInput->set('layout', 'default');\n\t\t$jInput->set('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "c53a972e2af2970da7bb04372311a3a5", "score": "0.669989", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AppBundle:Programas')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programas entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AppBundle:Programas:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "aae7f4b0c772355bb99330a14ba29014", "score": "0.6696947", "text": "public function edit($id)\n\t{\n return View::make('matrimonials.edit');\n\t}", "title": "" }, { "docid": "883502561745369884d7fc695ef1624e", "score": "0.6691808", "text": "public function edit($id)\n\t{\n return View::make('requirements.edit');\n\t}", "title": "" }, { "docid": "439487f339021f8335c9eeaa79db8fa8", "score": "0.6690575", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $data['title'] = $this->title;\n $tbl = $this->table->find($id);\n $data['form'] = $formBuilder->create('App\\Forms\\TypeBookForm', [\n 'method' => 'PUT',\n 'model' => $tbl,\n 'url' => route($this->uri.'.update', $id)\n ]);\n\n $data['url'] = route($this->uri.'.index');\n return view($this->folder.'.create', $data);\n }", "title": "" }, { "docid": "1507a482b7f295d6473bdf19d6d3da89", "score": "0.6678381", "text": "function edit( $resource ){\n\n $receivables = get( 'receivables', $resource );\n\n return view( 'admin/receivables/add_receivables', compact( 'receivables' ) );\n\n}", "title": "" }, { "docid": "2e96703e3ded22777d115212adcbfa8e", "score": "0.66781634", "text": "public function edit($id)\n {\n return view('manage::edit');\n }", "title": "" }, { "docid": "f2990bfbaee0f3cc29d99eb0cccdfc5d", "score": "0.6674401", "text": "public function edit(Entity $entity)\n {\n $this->authorize('update', $entity);\n\n return view('entities.edit', [\n 'entity' => $entity,\n ]);\n }", "title": "" }, { "docid": "b182548861e62c722e9b46c8496db241", "score": "0.6673116", "text": "public function edit($id)\n {\n $this->setOperation('update');\n if ($this->tienePermiso('update')) {\n\n // get entry ID from Request (makes sure its the last ID for nested resources)\n $id = $this->getCurrentEntryId() ?? $id;\n $entry = $this->getEntry($id);\n\n $this->data = array();\n // get the info for that entry\n $this->data['title'] = $this->getTitle() ?? trans('cesi::core.crud.edit') . ' ' . $this->entity_name;\n $this->data['heading'] = $this->getHeading() ?? $this->entity_name_plural;\n $this->data['subheading'] = $this->getSubheading() ?? trans('cesi::core.crud.edit').' '.$this->entity_name;\n $this->data['entry'] = $entry;\n $this->data['contentClass'] = $this->getEditContentClass();\n $this->data['routerAlias'] = $this->getRouterAlias();\n $this->data['resourceAlias'] = $this->getResourceAlias();\n $this->data['hasUploadFields'] = $this->hasUploadFields('update', $entry->getKey());\n\n // TODO ?? $this->data['saveAction'] = $this->getSaveAction();\n // $this->data['fields'] = $this->getCrud()->getUpdateFields($id);\n\n $this->data['id'] = $id;\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->getEditView(), $this->filterEditViewData($this->data));\n } else {\n return view('cesi::errors.401');\n }\n }", "title": "" }, { "docid": "23695efbb416dcbac50f5655f76220eb", "score": "0.6671321", "text": "public function edit()\n {\n return view('mpcs::edit');\n }", "title": "" }, { "docid": "9eabaca39cbbc769fdc4d4613662986d", "score": "0.6670628", "text": "public function edit($id)\n {\n $form = Form::find( $id );\n return view('editar', [\n 'item' => $form,\n ]);\n }", "title": "" }, { "docid": "98a687ec9cd21bb18a66914c17a84262", "score": "0.666875", "text": "function viewedit() {\n $id = Request::read('email');\n $error = Request::read('r'); \n \n if($error == -1){\n $error = 'No se ha editado';\n }\n \n $usuario = $this->getModel()->getUsuario($id);\n $email = $usuario->getEmail();\n \n \n $this->getModel()->addData('email', $email);\n $this->getModel()->addData('error', $error);\n \n $this->getModel()->addFile('form', 'sections/user/formEdit.html');\n }", "title": "" }, { "docid": "8aecb685b024e89667372cb88e6534b5", "score": "0.6665608", "text": "public function edit()\n {\n $product = $this->model('IndexModel')->get($this->getParam()['id']);\n\n $this->template('edit', $product);\n }", "title": "" }, { "docid": "897c904da29480933d49a2afe6a447fa", "score": "0.6664957", "text": "public function edit()\n {\n return view('core::edit');\n }", "title": "" }, { "docid": "47e15a6904083b2dac82790c56050341", "score": "0.66649014", "text": "public function showEditJobForm($id){\n \t$jobData = Job::find($id);\n \treturn view('employer.employer_edit_job', compact('jobData'));\n }", "title": "" }, { "docid": "55bfb83b470d662ff8fb0f9f1f658c98", "score": "0.6653699", "text": "public function edit($id)\n\t{\n\t\t$form = \\View::make('project.form');\n\t\t$form->project = Project::find($id);\n\t\t$form->action = array('action' => array('Toomdrix\\Pm\\ProjectController@update', $form->project->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "f7bd52c4216f50ae40e29aa9291a3153", "score": "0.66463226", "text": "public function edit($id) {}", "title": "" }, { "docid": "028c8bc8d418c3bcb062ed6c39f57a64", "score": "0.6643353", "text": "public function edit($id)\n {\n $asociado = Asociado::getPersonaAsociadoSingle($id);\n $asociado->persona;\n $title = 'Editad asociado: '.$asociado->persona->primer_nombre;\n $form_data = ['route' => ['asociado.update',$asociado->id],'method' => 'PUT'];\n $cliente_id_field = '';\n $cliente_id = $asociado->cliente_id;\n\n return view('asociado.form')->with(compact('asociado','title','form_data','cliente_id_field','cliente_id'));\n }", "title": "" }, { "docid": "45821cecfbb5732cd269059f6aad418f", "score": "0.66403663", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'editlieux' );\n\t\tJRequest::setVar( 'layout', 'edit_form' );\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "e4c3c0cbb7ac2570554ac1a25beb95aa", "score": "0.66388327", "text": "public function edit()\n {\n return view('berita::edit');\n }", "title": "" }, { "docid": "ab2518ea287ee8d0a67051d27dc511a8", "score": "0.66294515", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->membership->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['membership' => $this->membership]);\n\t}", "title": "" }, { "docid": "55c0c1d3fd64720346563285fe8ebb07", "score": "0.6628236", "text": "public function edit($id)\n {\n return view('employee.edit_form',['employee' => User::findOrFail($id)]);\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "4ba8a0764293ed6e4bdc9a47879f5cdb", "score": "0.66251445", "text": "public function edit($id)\n {\n $item = Provider::find($id);\n return View('provider.form', [\"item\" => $item, 'type' => 'edit']);\n }", "title": "" }, { "docid": "c2183a818e413caf29da395ac5aa45fe", "score": "0.6625103", "text": "public function edit($id)\n\t{\n\t\t$datos['empresa'] = Empresa::find($id);\n\t\t$datos['form'] = array('route'=> array('datos.empresas.update', $id), 'method' => 'PATCH');\n\t\t\n\t\treturn View::make('datos/empresas/list-edit-form')->with('datos', $datos);\n\t}", "title": "" }, { "docid": "1a4ead4c141c44cd189d59dd857cc05f", "score": "0.6621553", "text": "public function edit($field)\n {\n $field = Fields::find($field);\n return view('admin.fields.form',[\n 'active' => 'Fields',\n 'action' => 'Edit',\n 'field' => $field,\n ]);\n }", "title": "" }, { "docid": "5004b89ebea0b269b185830cb2f7e2f7", "score": "0.6621499", "text": "public function edit($id)\n {\n $this->view->guest = $this->model->edit($id);\n $this->view->render($this->_path . '/edit');\n \n }", "title": "" }, { "docid": "4085123883432653825ea3d6eca4c3ba", "score": "0.66196555", "text": "public function edit(Form $form, Event $event)\n {\n return view('form.edit', compact('event', 'form'));\n }", "title": "" }, { "docid": "8310a47ca16507655295572f382e4e29", "score": "0.6616868", "text": "public function edit($id)\n {\n // first : retrieve flower info and show the form to update flower\n }", "title": "" }, { "docid": "8c2bb4ce9efff69262207822b4887159", "score": "0.66112494", "text": "public function edit($id)\n {\n $template = (object) $this->template;\n $form = $this->form();\n $data = Penduduk::findOrFail($id);\n return view('admin.master.edit',compact('template','form','data'));\n }", "title": "" }, { "docid": "9a57ebf3330d38ff3b1cfbadfc9fc69b", "score": "0.66103256", "text": "function edit() {\n\t\t\n\t\tif ($_POST) {\n\t\t\t$this->entity->update($_POST);\n\t\t\t$this->_relative_redirect('view');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "12e1c226dd6ae426a8e7bea555851773", "score": "0.6606947", "text": "public function edit($id)\n {\n \t$manufacturer = Manufacturer::findOrFail($id);\n return view('backend.module.manufacturer.edit',['manufacturer' => $manufacturer]);\n }", "title": "" }, { "docid": "c6087fca66897a650dc6e75718832e74", "score": "0.66025347", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->generic_medication->id], 'method' => 'PUT'];\n \n return view(self::$prefixView . 'formm', compact('form_data'))\n \t->with(['generic_medication' => $this->generic_medication]);\n\t}", "title": "" }, { "docid": "a12dc077ea7b8efef6338c64b0b115cb", "score": "0.66000247", "text": "public function edit($id)\n {\n // get the nerd\n $product = Product::find($id);\n\n // show the edit form and pass the nerd\n return View::make('products.edit')\n ->with('product', $product);\n }", "title": "" }, { "docid": "2b5fb043a3c87778cf2cebbc780df3b7", "score": "0.659838", "text": "public function edit()\n\t{\n\t\tparent::edit();\n\t}", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6596694", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.65909845", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "6d657e63dc93b082619d2f7dcb0b720c", "score": "0.65891075", "text": "public function edit($id)\n {\n //mostrar formulario d edicion\n }", "title": "" }, { "docid": "7b2f75aaedf8589b46dde92aafda12f3", "score": "0.6586938", "text": "public function editAction()\n\t{\n\t\t$accountId = $this->_getParam('id');\n\t\t$accountTable = new AccountTable();\n\t\tif ($accountId) $account = $accountTable->find($accountId);\n\t\telse {\n\t\t\t/* Redirect to some error page */\n\t\t}\n\t\t\n\t\t/* Setup view data */\n\t\t$view = $this->getView();\n\t\t\n\t\t$view->title = \"Edit Account\";\n\t\t$view->account = $account;\n\t\t$view->error = NULL;\n\t\t\n\t\t/* And render it */\t\t\n\t\t$this->render('account/AccountEditView.php');\n\t}", "title": "" }, { "docid": "7f6e393f74ad5b78eb86af1fb59ad0f7", "score": "0.65856075", "text": "public function edit($id)\n {\n $data = User::findOrFail($id);\n $template = (object)$this->template;\n $form = $this->form();\n return view('admin.master.edit',compact('template','form','data'));\n }", "title": "" }, { "docid": "2ca5925eff8fd2c9f2e5fb536e2717b3", "score": "0.65842867", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'edit', true );\n\t\t$model\t=& $this->getModel( 'Item' );\n\t\t$model->checkout();\n\n\t\t$view =& $this->getView( 'Item' );\n\t\t$view->setModel( $model, true );\n\t\t// Set the layout and display\n\t\t$view->setLayout('form');\n\t\t$view->edit();\n\t}", "title": "" }, { "docid": "df89a714812746e77528c831bc256a8a", "score": "0.6574023", "text": "public function edit($id)\n {\n $this->user->offers()->findOrFail($id);\n\n return view('admin.offer.edit_form', [\n 'route_base_url' => 'offer',\n 'model_name' => '\\App\\Models\\Offer',\n 'model_id' => $id,\n ]);\n }", "title": "" }, { "docid": "568ce94a39ba9f1d0b81cd0579729a5f", "score": "0.6571842", "text": "public function edit()\n {\n $view = $this->getView('election', 'html');\n $view->setModel($this->getModel('election'), true);\n //JRequest::setVar('hidemainmenu', 1);\n\n $view->display();\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "ce4fc37201a9083467febf6f580c94ee", "score": "0.6567868", "text": "public function edit($id) {\n $urinalysis = Urinalysis::ConsolidatedId($id)->first();\n $urinalysisRef = UrinalysisRef::all();\n return view('pages.urinalysis.form', [\"urinalysis\" => $urinalysis, 'urinalysisRef' => $urinalysisRef, 'mode' => 'EDIT']);\n }", "title": "" }, { "docid": "df0197e5108b918276674eb05562c1d7", "score": "0.65657616", "text": "public function editAction()\n {\n $page = Pages::findFirst(\n [\n 'conditions' => 'id = :id:',\n 'bind' => ['id' => (int) $this->dispatcher->getParam('id')],\n ]\n );\n if ($page === false) {\n return $this->dispatcher->forward(['action' => 'error404']);\n }\n $this->assets\n ->collection('ace')\n ->addJs('scripts/ace/ace.js');\n $page->content = htmlentities($page->content);\n $this->view->page = $page;\n $this->view->title = $page->title.' – Edit ';\n $editable = new \\stdClass();\n $editable->content = $page->content;\n $editable->id = $page->id;\n $this->view->form = new \\Kolibri\\Forms\\Edit($editable);\n }", "title": "" }, { "docid": "d49dc9860beddbcef1bd1992ac80ce76", "score": "0.656234", "text": "public function action_edit()\r\n\t{\r\n\t\t$item_id = $this->request->param('params');\r\n\r\n\t\t$element = ORM::Factory($this->_resource, $item_id);\r\n\r\n\t\t$form = Formo::form()->orm('load', $element);\r\n\t\t$form->add('update', 'submit', 'Save');\r\n\r\n\t\tif($form->load($_POST)->validate())\r\n\t\t{\r\n\t\t\tif($this->_update_passed($form, $element))\r\n\t\t\t{\r\n\t\t\t\t$element->save();\r\n\t\t\t\t$form->orm('save_rel', $element);\r\n\r\n\t\t\t\t$this->request->redirect(Route::get($this->_route_name)->uri( array('controller' => $this->controller)));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->_update_error($form, $element);\r\n\t\t}\r\n\r\n\t\t$view = $this->template->content;\r\n\t\t$view->set(\"formo\", $form);\r\n\t}", "title": "" }, { "docid": "469fc3592be913e351b579a5c9fe18dc", "score": "0.65604365", "text": "public function edit()\n {\n $organization = OwnerOrganization::find(0);\n return view('modules.system.OwnerOrganization.form', compact('organization'));\n }", "title": "" }, { "docid": "59702db081c964bfd257f5f4ed31ec07", "score": "0.6559696", "text": "public function edit($id){\n $entry = Entry::find($id);\n $this->authorize('update', $entry); //Access Controll using policies\n return view('entries.edit',compact('entry'));\n }", "title": "" }, { "docid": "3cee07ed8f37cad18680bc48310b6842", "score": "0.6559204", "text": "public function edit()\n {\n return view('tenderpurchaserequest::edit');\n }", "title": "" }, { "docid": "531deb797a3602e8ea456bf473e6c600", "score": "0.6543909", "text": "public function edit($id)\n\t{\n\t\t$record = Record::find($id);\n\n\t\treturn View::make('records.edit', compact('record'));\n\t}", "title": "" }, { "docid": "5c6c8de62974cc03322207e7d02b68d7", "score": "0.6542949", "text": "public function edit($id) {\r\n\t\t$data ['aluno'] = Aluno::findOrFail ( $id );\r\n\t\t$data ['page_title'] = 'Editar aluno';\r\n\t\treturn view ( 'paginas.cadastro.aluno.create-edit' )->with ( $data );\r\n\t}", "title": "" }, { "docid": "0108853fa0d0f8ddd5e30d5bd2f3f67d", "score": "0.6542555", "text": "public function edit($id)\n\t{\n // Get the student\n $student = Student::find($id);\n\n // show the edit form and pass the nerd\n return View::make('students.edit')->with('student', $student);\n\t}", "title": "" }, { "docid": "0b8bea11641b000a8cc94135b0aa739a", "score": "0.6542523", "text": "public function edit($id)\n {\n return view('slo::edit');\n }", "title": "" }, { "docid": "3d60dba5b14a240b364d0e8824386a7e", "score": "0.6542473", "text": "public function edit($id)\n {\n $electric = $this->electricService->findById($id);\n return view('electric.update' ,compact('electric'));\n }", "title": "" }, { "docid": "4530461421ee8156467d6dfae72cde9c", "score": "0.6540356", "text": "public function edit($id)\n {\n static::setInstanceModel($model = $this->model()->findOrFail($id));\n $this->renderForm($model);\n $this->renderButton($model);\n return view(static::$baseView.'.edit');\n }", "title": "" }, { "docid": "5cddc5545db4d8408b496a8b468427fc", "score": "0.6539553", "text": "public function edit($project_id) {\n $project = Project::withTrashed()->where('id', $project_id)->first();\n\n if (empty($project)) {\n return abort(404);\n }\n $form = new AdministrationForm();\n $form->route(Administration::route('projects.store'));\n $form->model($project);\n $form->route(Administration::route('projects.update', $project->id));\n $form->method('PUT');\n $form->form(ProjectForm::class);\n\n\n Breadcrumbs::register('administration', function ($breadcrumbs) {\n $breadcrumbs->parent('base');\n $breadcrumbs->push(trans('projects::admin.module_name'), Administration::route('projects.index'));\n $breadcrumbs->push(trans('administration::admin.edit'));\n });\n\n Administration::setTitle(trans('projects::admin.article') . ' - ' . trans('administration::admin.edit') . ' #' . $project->id);\n\n return $form->generate();\n }", "title": "" } ]
c3e4c7649cb9c03d9ff91b16a6df4dff
Constructs EventBuffer object Constructs EventBuffer object
[ { "docid": "3c2006ac7e580c347673986ba986d8fa", "score": "0.0", "text": "public function __construct() {}", "title": "" } ]
[ { "docid": "4c3e89b4cad8b2a14feaa6fbed53ac39", "score": "0.66086787", "text": "public function __construct(EventInfo $eventInfo) {\n parent::__construct($eventInfo);\n\n if(self::$eventBuffer === null) {\n self::$eventBuffer = new RingBuffer(10);\n }\n\n if($this->isMouseDownEvent()) {\n self::$eventBuffer->add($this);\n }\n }", "title": "" }, { "docid": "524b496ebd63c68c60c4799357f2c405", "score": "0.6319135", "text": "public function getOutputBuffer(): \\EventBuffer {}", "title": "" }, { "docid": "4ccd3371ae4c253bfb17d01004a3d99b", "score": "0.6002514", "text": "public function getInputBuffer(): \\EventBuffer {}", "title": "" }, { "docid": "a03d5a3282ade092042b7ef2c9885482", "score": "0.5920638", "text": "public function getOutput(): \\EventBuffer {}", "title": "" }, { "docid": "930a5a420f541f31c043ca8bf2695244", "score": "0.58112985", "text": "public function __construct($buffer = '')\n {\n $this->buffer = $buffer;\n }", "title": "" }, { "docid": "5677d36044d61325b0801aae8316477e", "score": "0.5522258", "text": "public function __construct()\r\n {\r\n parent::__construct();\r\n $this->info_setName(\"outputbuffer\");\r\n $this->info_setDesc(\"Buffers the output\");\r\n $this->info_setVersion(1.0);\r\n $this->info_setOnlyOnce(true);\r\n $this->clear();\r\n }", "title": "" }, { "docid": "eb23627efe548ea9919aa10c9c4fbc8d", "score": "0.54777247", "text": "public function __construct(\\EventBase $base, $socket = NULL, int $options = 0, callable $readcb = NULL, callable $writecb = NULL, callable $eventcb = NULL) {}", "title": "" }, { "docid": "df6d25b6192fa879863f27f88a81c923", "score": "0.5410407", "text": "public function createEvent()\n {\n $entityClass = 'RK\\\\BulletinModule\\\\Entity\\\\EventEntity';\n\n return new $entityClass();\n }", "title": "" }, { "docid": "b91ff9eaaad0d27eba5ce9839d2c887e", "score": "0.5371735", "text": "static function getGlobalConstructor() {\n $Buffer = new Func('Buffer', function() {\n $self = new Buffer();\n $self->init(func_get_args());\n return $self;\n });\n $Buffer->set('prototype', Buffer::$protoObject);\n $Buffer->setMethods(Buffer::$classMethods, true, false, true);\n return $Buffer;\n }", "title": "" }, { "docid": "17682aebfc95c81439ec7453101fa494", "score": "0.5342355", "text": "public function __construct(){\n $this->buffer = Loco_output_Buffer::start();\n parent::__construct();\n }", "title": "" }, { "docid": "c8efc94c8595c09682317bc55f009bea", "score": "0.53413594", "text": "abstract public function makeEvent();", "title": "" }, { "docid": "c8efc94c8595c09682317bc55f009bea", "score": "0.53413594", "text": "abstract public function makeEvent();", "title": "" }, { "docid": "73ba226a77d3a57614ad946fa08596a0", "score": "0.5329761", "text": "function __construct($srcenc = null, $mode = 'event', $tgtenc = null)\n {\n parent::__construct($srcenc, $mode, $tgtenc);\n }", "title": "" }, { "docid": "cd8a55e373b3d2a34cbe810d8eda67cf", "score": "0.5310374", "text": "public function createNewEvent()\n {\n $event = new Event();\n\n return $event;\n }", "title": "" }, { "docid": "8c3e54f8769bc6b8e17b6154e07e2e73", "score": "0.5302776", "text": "public function addBuffer(\\EventBuffer $buf): bool {}", "title": "" }, { "docid": "e3901758e50a7bfe5083e071fee86378", "score": "0.52926093", "text": "public function __construct(Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher, $localDomain = '127.0.0.1', Swift_AddressEncoder $addressEncoder = null)\n {\n parent::__construct($buf, $dispatcher, $localDomain, $addressEncoder);\n }", "title": "" }, { "docid": "1d46c3afaed7e6b7eebbb43de90eb33a", "score": "0.5274466", "text": "public function __construct() {\n $this->_creation_date = getdate(time());\n $this->_events = new Aevents;\n }", "title": "" }, { "docid": "db7914e9bdcbda9c433aaee1ed16c697", "score": "0.5258996", "text": "function __construct($event) {\n\t\tparent::__construct();\n\t\t\n\t\t$this->event = $event;\n\t}", "title": "" }, { "docid": "3060578b8a72b780d374add6f01aa364", "score": "0.52583796", "text": "public function getBuffer();", "title": "" }, { "docid": "04433bb26d4d30ad25bbe55f6663e599", "score": "0.52423006", "text": "public abstract function __construct(AscmvcEvent $event);", "title": "" }, { "docid": "2796942bf0710edf9405f8f94a74a039", "score": "0.52037907", "text": "public function __construct(\\EventConfig $cfg = NULL) {}", "title": "" }, { "docid": "b5165a47a1422ad70e21b74af1a0cb5c", "score": "0.52004236", "text": "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "title": "" }, { "docid": "453a8c02c9d5c4e1835559f38dbcc3dc", "score": "0.5191816", "text": "function event_buffer_base_set($bevent, $event_base)\n{\n}", "title": "" }, { "docid": "1cba616a3e1a019f908bb21a54984332", "score": "0.5183387", "text": "public function getInput(): \\EventBuffer {}", "title": "" }, { "docid": "c33cb2b8ab4448819ccc1d0b2c568fa0", "score": "0.5156888", "text": "function __construct($eventID) {\n\t\t$eventData = LogicFactory::CreateObject(\"Event\");\n\t\t\n\t\t try {\n $event = $eventData->getEvent($eventID);\n $this->event = $event;\n $this->data['eventID'] = $event->getId();\n $this->data['eventName'] = $event->getName();\n } catch (Exception $e) {\n $this->errorMessage = $e->getMessage();\n return;\n }\n }", "title": "" }, { "docid": "b5a83c1ee227385ef7a8785de05493a6", "score": "0.5156219", "text": "public function __construct($event)\n {\n $this->event = $event;\n }", "title": "" }, { "docid": "a83ba143e2d9641836d8f124fab3dd16", "score": "0.5095724", "text": "public function __construct($event) {\n\t\tif (is_array($event)) {\n\t\t\t$this->id = $event['event_id'];\n\t\t\t$this->title = $event['event_title'];\n\t\t\t$this->etype_id = $event['event_etype_id'];\n\t\t\t$this->location_id = $event['event_location_id'];\n\t\t\t$this->location_name = $event['dealer_name'];\n\t\t\t$this->description = $event['event_desc'];\n\t\t\t$this->start = $event['event_start'];\n\t\t\t$this->end = $event['event_end'];\n\t\t} else {\n\t\t\tthrow new Exception(\"No event data was supplied.\");\n\t\t}\n\t}", "title": "" }, { "docid": "ece1f60d035e85e9b8d048b25ca8b839", "score": "0.50891274", "text": "public function __construct() \n\t{\n\t\t$this->outputBuffer = '';\n\t}", "title": "" }, { "docid": "98f293b8ec81a2836616fcfc3e962ed2", "score": "0.5021535", "text": "protected function _construct()\n {\n $this->_init('Gabrielqs\\Boleto\\Model\\ResourceModel\\Remittance\\File\\Event');\n }", "title": "" }, { "docid": "0f36995eb46414e4d0183183829dfb76", "score": "0.5007997", "text": "public function __construct () {\n\t\t$this->buf = new \\StringBuf();\n\t\t$this->cache = new \\Array_hx();\n\t\t$this->useCache = Serializer::$USE_CACHE;\n\t\t$this->useEnumIndex = Serializer::$USE_ENUM_INDEX;\n\t\t$this->shash = new StringMap();\n\t\t$this->scount = 0;\n\t}", "title": "" }, { "docid": "d0c492870cc48f27691754562cf35468", "score": "0.49536437", "text": "public function startBuffer($buffer_name)\n {\n if (! $this instanceof Psr3Decorator) {\n return $this;\n }\n\n if (array_key_exists($buffer_name, $this->active_buffers)) {\n return $this;\n }\n\n $this->active_buffers[$buffer_name] = $buffer_name;\n\n if (! array_key_exists($buffer_name, $this->buffers)) {\n $this->buffers[$buffer_name] = array();\n }\n\n if ($this->buffer_filter_registered == false) {\n $this->addMessageFilter($this->getBufferMessageFilter(), -1000);\n $this->buffer_filter_registered = true;\n }\n return $this;\n }", "title": "" }, { "docid": "5840041930f056507b506bb1709b8c0b", "score": "0.49186677", "text": "public function testCreateEvent0()\n {\n }", "title": "" }, { "docid": "5840041930f056507b506bb1709b8c0b", "score": "0.49186677", "text": "public function testCreateEvent0()\n {\n }", "title": "" }, { "docid": "73a19a4910787b7bc1239ece9f58c7d8", "score": "0.48869613", "text": "public function __construct(Queue $queue, EventManager $events)\n {\n $this->queue = $queue;\n $this->events = $events;\n }", "title": "" }, { "docid": "1e50bf652a2ae54347297e3f8d1c1674", "score": "0.48537984", "text": "public function __construct(\\EventBase $base, $fd, int $what, callable $cb, $arg = NULL) {}", "title": "" }, { "docid": "b82689af040be9d71c033f948b97df09", "score": "0.48449066", "text": "function createEvent($subject = null);", "title": "" }, { "docid": "c33276d43570e502354b41f8acabe7d4", "score": "0.48124972", "text": "public function events(): EventsRequestBuilder {\n return new EventsRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "title": "" }, { "docid": "be079fd9e47bc3959b729f9aedde460f", "score": "0.47939128", "text": "protected function getEvent()\n {\n if ($header = trim(Utils::readLine($this->inputStream))) {\n $header = $this->parseData($header);\n\n $payload = $this->inputStream->read((int) $header['len']);\n $payload = explode(\"\\n\", $payload, 2);\n isset($payload[1]) or $payload[1] = null;\n\n list($payload, $body) = $payload;\n\n $payload = $this->parseData($payload);\n\n return new Event($header, $payload, $body);\n }\n }", "title": "" }, { "docid": "3c4df7aa5774af61640a91b94324b33b", "score": "0.47747734", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->createSocket(self::SOCKET_OUTPUT);\n $this->createSocket(self::SOCKET_ARRAY);\n $this->createSocket(self::SOCKET_DATA);\n }", "title": "" }, { "docid": "dee5c6e63715b716f412978a6569d6c1", "score": "0.47512636", "text": "protected function _construct()\n {\n $this->_init('boleto_remittance_file_event', 'remittance_file_event_id');\n }", "title": "" }, { "docid": "2c404367d4ba584ac0b545683dbcfec5", "score": "0.47424307", "text": "public function __construct()\n {\n $this->events = new ArrayCollection();\n }", "title": "" }, { "docid": "4d0efd6247e88d9668b1b659dbc07d12", "score": "0.4734815", "text": "public function __construct($eventID)\n {\n $this->eventID = $eventID;\n }", "title": "" }, { "docid": "2fe508ccb7c69074d3ce369faa07411f", "score": "0.47294465", "text": "public function __construct($input = null)\n {\n if (!$input instanceof Buffer) {\n $input = Buffer::hex($input);\n }\n\n $this->string = $input->serialize();\n $this->position = 0;\n $this->math = Bitcoin::getMath();\n return $this;\n }", "title": "" }, { "docid": "1faf4d2ec310701dbafd271fc43d34ad", "score": "0.47275856", "text": "abstract protected function buildEventCache();", "title": "" }, { "docid": "de887a80d48be867c6af2ea8b0244dca", "score": "0.47123992", "text": "protected function _getEventParam()\n {\n /* reset object state instead of instantiating new object over and over again */\n if (!$this->_eventParam) {\n $this->_eventParam = new \\Magento\\TestFramework\\Event\\Param\\Transaction();\n } else {\n $this->_eventParam->__construct();\n }\n return $this->_eventParam;\n }", "title": "" }, { "docid": "ecaedd4e972b47b35b54856a78b80f22", "score": "0.4706927", "text": "public function __construct(string $eventId)\n {\n $this->eventId = $eventId;\n }", "title": "" }, { "docid": "2ab9b3bd023eff4000d0dd52bc380aef", "score": "0.4682229", "text": "public function getBuffer()\n {\n $buffer = new Buffer($this->string);\n return $buffer;\n }", "title": "" }, { "docid": "c173f1eca97d57a7221eacd946be9326", "score": "0.46755305", "text": "public function __construct()\n {\n $this->entityName = Event::EVENT_ENTITY_NAME;\n $this->modelClass = \"\\PhoenixEvents\\Model\\Event\";\n $this->dataItem = EVENT::EVENT_DATA_ENTITY; \n }", "title": "" }, { "docid": "29429b2800ad633dacf572d9a8b50201", "score": "0.46750185", "text": "public function event()\n {\n return new EventManager;\n }", "title": "" }, { "docid": "65223cef02456bc108e312cc691d87eb", "score": "0.4657675", "text": "public function __construct(?EApmEventBase $parentEvent = null)\n {\n $this->setEventType(static::EVENT_TYPE);\n $this->setComposer(EApmContainer::make(\"GAgent\"));\n\n if (!is_null($parentEvent)) {\n $this->setParent($parentEvent);\n }\n\n if ($this->getEventType() !== EApmMetadata::EVENT_TYPE) {\n $this->setTimestamp(round(microtime(true) * 1e6));\n $this->setId($this->getRandomAndUniqueSpanId());\n register_shutdown_function([$this, \"end\"]);\n }\n\n $this->eventRegister($parentEvent);\n }", "title": "" }, { "docid": "e31a24c6e0983fe1899cd5dedd46aa0d", "score": "0.4642031", "text": "protected function __construct()\n {\n parent::__construct();\n $this->keyEvent = new KeyboardEvent;\n $this->setType(self::TYPE_INPUT);\n }", "title": "" }, { "docid": "d0141f61875ffe0a590ffc559fc7f122", "score": "0.4641572", "text": "public function __construct()\n {\n $this->eventMap = [\n 'Swift_Events_CommandEvent' => 'Swift_Events_CommandListener',\n 'Swift_Events_ResponseEvent' => 'Swift_Events_ResponseListener',\n 'Swift_Events_SendEvent' => 'Swift_Events_SendListener',\n 'Swift_Events_TransportChangeEvent' => 'Swift_Events_TransportChangeListener',\n 'Swift_Events_TransportExceptionEvent' => 'Swift_Events_TransportExceptionListener',\n ];\n }", "title": "" }, { "docid": "5ac48f5c782e4aa0016c448a6f6373a1", "score": "0.46414033", "text": "public function __construct($event_host=\"\", $event_port=\"\", $event_password=\"\",$opt = array()) {\n\t\t\tif($event_host) $this->event_host = $event_host; \n\t\t\tif($event_port) $this->event_port = $event_port;\n\t\t\tif($event_password) $this->event_password = $event_password; \n\t\t\tif(is_array($opt)) $this->opt = $opt; \n\t\t\tif (!$this->connect_event_socket())\n\t\t\t\tdie(' Error : Failed to use event socket ! 严重错误,没有连接上服务器!');\n\t\t}", "title": "" }, { "docid": "db7f45f99b42e56919fb63190cba3aec", "score": "0.46309698", "text": "public static function fromEvent(Event $event)\n {\n $io = NutStyle::fromComposer($event->getIO());\n\n return new static($io);\n }", "title": "" }, { "docid": "6e3351ca83a56881d59c739d802842c1", "score": "0.46209937", "text": "private function __constructor() {}", "title": "" }, { "docid": "34bf2286c7a794adbfd3a2137c913eeb", "score": "0.4599594", "text": "public function Events($access_token)\n {\n return new EventRequest($this->api_domain, $access_token);\n }", "title": "" }, { "docid": "8dd20ae2d3598537c967f14812fb013e", "score": "0.45978522", "text": "public function testConstructor()\n {\n $eventEntityTest = new Event();\n $this->assertInstanceOf('Ivory\\GoogleMapBundle\\Model\\Events\\Event', $eventEntityTest);\n }", "title": "" }, { "docid": "e4e57ace0da72d15a07fe37e8bf19c1c", "score": "0.45934433", "text": "public function appendFrom(\\EventBuffer $buf, int $len): int {}", "title": "" }, { "docid": "08ee87477e82f6e32a193994658136d1", "score": "0.45910507", "text": "public function __construct()\n\t{\n\t\tLog::info('GoMyEvent:__construct');\n\t}", "title": "" }, { "docid": "0dbbbdae2906f000efa1d23ac50b3848", "score": "0.45636666", "text": "public function testConstructor() {\n $dispatcher = new EventDispatcherClass();\n\n // Make sure the EVENTDISPATCHER_EVENT_DISPATCHED event was registered\n // in the constructor\n $dispatcher->addEventListener('eventdispatcher_event_dispatched', array($this, 'eventDispatched'));\n }", "title": "" }, { "docid": "7ddb98cedae814b89800213718866fee", "score": "0.45602658", "text": "function __construct()\n\t{\n\t\t$this->events[\"BeforeProcessAdd\"]=true;\n\n\t\t$this->events[\"BeforeProcessEdit\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"BeforeProcessList\"]=true;\n\n\t\t$this->events[\"BeforeProcessPrint\"]=true;\n\n\t\t$this->events[\"BeforeProcessView\"]=true;\n\n\t\t$this->events[\"BeforeShowView\"]=true;\n\n\t\t$this->events[\"BeforeProcessExport\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeShowList\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\t\t$this->events[\"ListGetRowCount\"]=true;\n\n\t\t$this->events[\"ListQuery\"]=true;\n\n\t\t$this->events[\"ListFetchArray\"]=true;\n\n\n\n\t\t$this->events[\"BeforeShowAdd\"]=true;\n\n\t\t$this->events[\"BeforeMoveNextPrint\"]=true;\n\n\t\t$this->events[\"ProcessValuesView\"]=true;\n\n\t\t$this->events[\"ProcessValuesEdit\"]=true;\n\n\t\t$this->events[\"CustomAdd\"]=true;\n\n\t\t$this->events[\"CustomEdit\"]=true;\n\n\t\t$this->events[\"BeforeProcessRowList\"]=true;\n\n\t\t$this->events[\"ProcessValuesAdd\"]=true;\n\n\t\t$this->events[\"BeforeQueryView\"]=true;\n\n\t\t$this->events[\"BeforeQueryEdit\"]=true;\n\n\t\t$this->events[\"BeforeProcessRowPrint\"]=true;\n\n\t\t$this->events[\"BeforeShowPrint\"]=true;\n\n\t\t$this->events[\"BeforeOut\"]=true;\n\n\t\t$this->events[\"BeforeProcessSearch\"]=true;\n\n\n//\tonscreen events\n\t\t$this->events[\"Daily_Next_Prev\"] = true;\n\t\t$this->events[\"caldaily_snippet1\"] = true;\n\t\t$this->events[\"caldaily_snippet2\"] = true;\n\n\t}", "title": "" }, { "docid": "c0ce8fe6a7fc07aa7b954273a45a62b9", "score": "0.45578176", "text": "public function events()\n {\n return new Events($this->credentials, $this->adapter);\n }", "title": "" }, { "docid": "c9db43974e4c753b9ef9d5085e636a1c", "score": "0.455679", "text": "public function __construct()\n {\n parent::__construct(\"AtaEvent\", BaseAta_event::TABLE_NAME, \n BaseAta_event::PRIMARY_KEY, BaseAta_event::SCHEMA);\n }", "title": "" }, { "docid": "3148e03cd9b093bb1e4f4a04295f1d6c", "score": "0.4549122", "text": "public function __construct( $lfevents, $version ) {\n\n\t\t$this->lfevents = $lfevents;\n\t\t$this->version = $version;\n\n\t}", "title": "" }, { "docid": "f15f4b266245b2f0271a2a2b03f71a40", "score": "0.4545779", "text": "public function __construct(EventService $eventService)\n {\n $this->eventService = $eventService;\n }", "title": "" }, { "docid": "0e1110ac9b24451cccb681cb96fac212", "score": "0.453907", "text": "public function event($name)\n {\n return new Event($name);\n }", "title": "" }, { "docid": "20385138184f2fc8deb7215e445c4f93", "score": "0.4537116", "text": "public function __construct(array $options, Event $event)\n {\n $this->options = $options;\n $this->event = $event;\n }", "title": "" }, { "docid": "00b88bdba4d60ecb71d2ccef7734107a", "score": "0.45317775", "text": "public function writeBuffer(\\EventBuffer $buf): bool {}", "title": "" }, { "docid": "935c5aa44cd2455a41087f6eb609e9ed", "score": "0.45274994", "text": "private function _createEvent($eventName, Interfaces\\Message $message = null, $type = self::EVENT_BROADCAST) {\r\n switch ($type) {\r\n case self::EVENT_BROADCAST:\r\n $event = new Action\\Broadcast();\r\n $source = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3);\r\n $event->setModule($this->_getModule($source[2]['class']));\r\n break;\r\n case self::EVENT_EMIT:\r\n $event = new Action\\Emit();\r\n $source = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3);\r\n $event->setModule($this->_getModule($source[2]['class']));\r\n break;\r\n default :\r\n throw new Exception('Undefined event type.');\r\n }\r\n\r\n $event->setName($eventName);\r\n $event->setData($message);\r\n\r\n return $event;\r\n }", "title": "" }, { "docid": "6f29846b05c5ba8c3846af49b459d0d8", "score": "0.4514169", "text": "abstract protected function _getEventFactory();", "title": "" }, { "docid": "68afb2773d20faf4f0966c17c57eea88", "score": "0.4505101", "text": "private function createEvent(array $acceptableMediaTypes, \\Exception $exception, array $query = []): ExceptionEvent\n {\n $request = new Request(\n $query,\n [],\n [],\n [],\n [],\n [\n 'HTTP_Accept' => $acceptableMediaTypes,\n ]\n );\n\n $kernel = $this->createMock(HttpKernelInterface::class);\n\n return new ExceptionEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST, $exception);\n }", "title": "" }, { "docid": "d164fbcd55b5cbe6755bbc3a1b7721db", "score": "0.4503556", "text": "public function setBuffer($var)\n {\n GPBUtil::checkString($var, False);\n $this->buffer = $var;\n\n return $this;\n }", "title": "" }, { "docid": "e85dceb025cc86ecc27e7774eb7ac558", "score": "0.45011503", "text": "public function withMetadata(MessageMetadata $metadata): EventTransport\n {\n return new static($this->event, $metadata);\n }", "title": "" }, { "docid": "ab1a8af5c2d2a627cc4dc51589811ea2", "score": "0.4496919", "text": "function __construct($event_id = NULL) {\r\n\r\n\t\t$this->event_id = $event_id;\r\n\t\t$this->event_name = \"\";\r\n\t\t$this->person_id = NULL;\r\n\t\t$this->type_id = NULL;\r\n\t\t$this->description_id = 0;\r\n\t\t$this->event_description = \"\";\r\n\t\t$this->start_datetime = NULL;\r\n\t\t$this->end_datetime = NULL;\r\n\t\t$this->recurrence_start = NULL;\r\n\t\t$this->recurrence_end = NULL;\r\n\t\t$this->recurrence_weeks = 0;\r\n\t\t$this->recurrence_days = \"\";\r\n\t\t$this->exceptions = array ();\r\n\t\t$this->dates = array ();\r\n\t\t$this->conflictMessage = \"\";\r\n\r\n\t\tif ($this->event_id != NULL)\r\n\t\t\t$this->initialize();\r\n\t}", "title": "" }, { "docid": "4b149c659dd2b0647ad9220c453ee0dc", "score": "0.44948828", "text": "private function google_event_to_bbbs_event($google_event)\n\t{\n\t\t$bbbs_event= new c_bbbs_event();\n\t\t\n\t\t$bbbs_event->initialize_from_google_calendar_event($google_event);\n\t\t\n\t\treturn $bbbs_event;\n\t}", "title": "" }, { "docid": "b12bd5878606f8f1e210247c1a054da6", "score": "0.4491116", "text": "function obtenBuffer() {\n\t\treturn $this->buffer;\n\t}", "title": "" }, { "docid": "b12bd5878606f8f1e210247c1a054da6", "score": "0.4491116", "text": "function obtenBuffer() {\n\t\treturn $this->buffer;\n\t}", "title": "" }, { "docid": "aebb789c4a98b2e866f593a5d5b725f9", "score": "0.4479961", "text": "public function __construct() {\n $this->date = new DateTime;\n $this->openMemory();\n $this->setIndent(true);\n $this->setIndentString(' ');\n $this->startDocument('1.0', 'UTF-8');\n $this->startElement('timestamps');\n }", "title": "" }, { "docid": "ef7e613cb45312b86f800fe3a11ae3f1", "score": "0.4479508", "text": "private function buildEvent(\\SimpleXMLElement $xml)\n {\n $event = new Event();\n $event->setId($xml->event_id);\n $event->setVenue($xml->venue);\n $event->setEventDate(new \\DateTime($xml->date));\n $homeAway = $xml->name;\n $teams = explode(\" vs \", $homeAway);\n $event->setHomeTeam($teams[0]);\n $event->setAwayTeam($teams[1]);\n $event->setHomeScore($xml->home_team_score);\n $event->setAwayScore($xml->away_team_score);\n $event->setCompetitionName($xml->competition_name);\n $event->setCompetitionShortName($xml->competition_shortname);\n $event->setCompetitionIcon($xml->competition_icon);\n\n return $event;\n }", "title": "" }, { "docid": "99a233089875d09e9f20cec203608d7d", "score": "0.44753894", "text": "public function __construct0(){\n if (!empty($_POST)) {\n # Gets event data by $_POST (action: new)\n $this->init($_POST);\n\n } else {\n # Initializes a new event (action : new)\n $this->init([]);\n\n }\n }", "title": "" }, { "docid": "c7e1930f25589a4091322f8c48a36034", "score": "0.44683546", "text": "public function & getBuffer()\n {\n return $this->buffer;\n }", "title": "" }, { "docid": "a113b8b76d2cd5d5099bfb685979d5c0", "score": "0.44649684", "text": "public function __construct(GitWrapper $wrapper, Process $process, GitCommand $command, $type, $buffer)\n {\n parent::__construct($wrapper, $process, $command);\n $this->type = $type;\n $this->buffer = $buffer;\n }", "title": "" }, { "docid": "3734125c6e48acf1684d4544445d9b41", "score": "0.44643295", "text": "public function getEventStreamObject(): EventStreamObject\n {\n $eventStreamObject = new EventStreamObject();\n $eventStreamObject->setUuid($this->getUuid());\n $eventStreamObject->setCommandUuid($this->getCommandUuid());\n $eventStreamObject->setVersion($this->getVersion());\n $eventStreamObject->setCreated($this->getCreated());\n $eventStreamObject->setEvent($this->getEvent());\n $eventStreamObject->setAggregateClass($this->getAggregateClass());\n $eventStreamObject->setUser($this->getUser());\n $eventStreamObject->setPayload($this->getPayload());\n $eventStreamObject->setMessage($this->getMessage());\n\n return $eventStreamObject;\n }", "title": "" }, { "docid": "e1ae17048ea33f94cc940540feeb2c57", "score": "0.4459483", "text": "public function __construct ()\n\t{\n\t\t$this->workingByte = new BitArray (8);\n\t}", "title": "" }, { "docid": "fcc160c28dfee6e5de0eeec5d7493b22", "score": "0.44589555", "text": "public function readBuffer(InputBuffer $buffer){\n if(is_null($this->inputBuffer)){\n $this->inputBuffer = $buffer;\n } else {\n\n }\n }", "title": "" }, { "docid": "32a9c7122da86017fdc19ea519fcaf25", "score": "0.44576865", "text": "public function readBuffer(\\EventBuffer $buf): bool {}", "title": "" }, { "docid": "64fe781bf99a09723945b13d0478aa71", "score": "0.44561866", "text": "public function onCreate()\n {\n $this->emitter = $this->params['emitter'];\n $this->contentType = $this->params['content_type'];\n }", "title": "" }, { "docid": "8ea535bf28cd43e4db24642d9354661e", "score": "0.44427878", "text": "public function event()\n {\n return new Event(\n $this->newTrigger(Trigger::TYPE_EVENT)\n );\n }", "title": "" }, { "docid": "5af6d1431c41d0e11c739ae06afd1ecc", "score": "0.44408923", "text": "function buildEventObject(array $activeEvents, object $webhookEventData){\n\tdate_default_timezone_set('Europe/Berlin');\n\t$date = date('d/m/Y G:i:s', time());\n\n\t$eventObject = new \\stdClass();\n\t$eventObject->Timestamp = $date;\n\t$eventObject->EventType = implode(\",\", $activeEvents);\n\t$eventObject->Username = $webhookEventData->sender->login;\n\n\taddToEventList($eventObject);\n}", "title": "" }, { "docid": "1ee0aae4d9e5aec4bd81425f5b9767c6", "score": "0.44393712", "text": "public function __construct($event, $user, $idevent)\n {\n $this->event = $event;\n $this->user = $user;\n $this->idevent = $idevent;\n }", "title": "" }, { "docid": "80e4c81bfa8a4c29b37c5bb6e660a85f", "score": "0.4437848", "text": "public function __construct()\n {\n parent::__construct(\"MtcEvent\", BaseMtc_event::TABLE_NAME, \n BaseMtc_event::PRIMARY_KEY, BaseMtc_event::SCHEMA);\n }", "title": "" }, { "docid": "e8a9209e40a4c8d560ccca510ec4e445", "score": "0.4429904", "text": "public function __construct()\n {\n $this->struct = FFI::gobject()->new(\"GValue\", true, true);\n $this->pointer = \\FFI::addr($this->struct);\n\n # GValue needs to be inited to all zero\n \\FFI::memset($this->pointer, 0, \\FFI::sizeof($this->struct));\n }", "title": "" }, { "docid": "dce6fc7a36817959d5815db91a33a533", "score": "0.4428921", "text": "public function get_buffer()\n {\n return $this->buffer;\n }", "title": "" }, { "docid": "aa87a0f7eb70185747e7e667122452cb", "score": "0.4427386", "text": "public function construct()\n {\n\n }", "title": "" }, { "docid": "55e56f21782e5e01664fc5fa4d154047", "score": "0.44188833", "text": "function __construct()\r\n\t{\r\n\t\t$this->events[\"AfterAdd\"]=true;\r\n\r\n\t\t$this->events[\"BeforeDelete\"]=true;\r\n\r\n\t\t$this->events[\"BeforeAdd\"]=true;\r\n\r\n\r\n//\tonscreen events\r\n\r\n\t}", "title": "" }, { "docid": "a971b2d3fd1b7caaad12094a145a3ec5", "score": "0.44170532", "text": "public function setEvent(Event $e)\n {\n if (!$e instanceof QueueEvent) {\n $eventParams = $e->getParams();\n $e = new QueueEvent();\n $e->setParams($eventParams);\n unset($eventParams);\n }\n $this->event = $e;\n\n return $this;\n }", "title": "" }, { "docid": "a971b2d3fd1b7caaad12094a145a3ec5", "score": "0.44170532", "text": "public function setEvent(Event $e)\n {\n if (!$e instanceof QueueEvent) {\n $eventParams = $e->getParams();\n $e = new QueueEvent();\n $e->setParams($eventParams);\n unset($eventParams);\n }\n $this->event = $e;\n\n return $this;\n }", "title": "" }, { "docid": "b0a344a42851aa58cd7d914d3dd868a4", "score": "0.4412968", "text": "public function __construct(){\n\n\t\t$this->frameLength=3600*1; // 1 hour\n\t\t$this->frameDistance=3600*24; // 24 hours\n\t\t\n\t\t$this->sampleLength=60*5; // 5 minutes\n\t\t$this->sampleDistance=60*10; // 10 minutes\n\n\t\t$this->presentEnd=time()-3600*24*2; // right now\n\t\t$this->presentEnd=strtotime(date('2013-02-11 15:00'));\n\t\t$this->presentStart=$this->presentEnd-($this->frameLength); // 1 hour\n\t\t\n\t\t$this->pastEnd=$this->presentEnd-$this->frameDistance;\n\t\t$this->pastStart=$this->presentEnd-(3600*24*7); // 7 days\n\n\t\t$this->streamCriteria=array();\n\n\t\t$this->thresholdChi=1.5;\n\t\t$this->thresholdRatio=0.0009;\n\t}", "title": "" }, { "docid": "1f3d90988f1b2a3f5ccfb24ef4f9bc3d", "score": "0.44058207", "text": "public function getEditBuffer();", "title": "" }, { "docid": "62bd1cd5b2dae3b2a42b5ce5952f4134", "score": "0.4404003", "text": "public function grade_export_update_buffer() {\n debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);\n self::__construct();\n }", "title": "" }, { "docid": "6db497ab31e23439eaa9d6bc251e13a3", "score": "0.4401166", "text": "public function __construct(array $event = [])\r\n {\r\n\t $this->invite = isset($event['invite']) ? $event['invite'] : [];\r\n $this->notice = isset($event['notice']) ? $event['notice'] : [];\r\n $this->count = isset($event['count']) ? $event['count'] : [];\r\n }", "title": "" } ]
9279abb57c40d80af77d17f48139fbcd
/ | | ADMIN PANNEL URL CONFIGURATION | | | function name is otherbase_url(); | call this function any where working with admin panel | //CUSTOMIZE RANDOM FUNCTION///////////////
[ { "docid": "37193c1ea662556a2486a079355f6ce6", "score": "0.0", "text": "function mt_rand_str($l, $c = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*-') {\n for ($s = '', $cl = strlen($c)-1, $i = 0; $i < $l; $s .= $c[mt_rand(0, $cl)], ++$i);\n return $s;\n }", "title": "" } ]
[ { "docid": "3a7c29e29f0b0aaa0649dcac7fce337f", "score": "0.6582559", "text": "private function generateAndCheckURL( $base_url ){\n $generated_string = $this->generateRandomCode();\n $em = $this->getDoctrine()->getManager();\n $repository = $em->getRepository('MilaShortLinksBundle:UrlList');\n $url_to_check = $base_url.$generated_string;\n $is_generated_string = $repository->findOneBy( array( 'generated_url' => $url_to_check ) );\n if ( $is_generated_string != null ){\n $this->generateAndCheckURL( $base_url );\n } else {\n return $url_to_check;\n }\n }", "title": "" }, { "docid": "424b5c2d0819fda4fe02641a98bcffdc", "score": "0.65099865", "text": "function phpfmg_admin_url(){\n $http_host = \"http://{$_SERVER['HTTP_HOST']}\";\n switch( true ){\n case (0 === strpos(PHPFMG_ADMIN_URL, 'http://' )) :\n $url = PHPFMG_ADMIN_URL;\n break;\n case ( '/' == substr(PHPFMG_ADMIN_URL,0,1) ) :\n $url = $http_host . PHPFMG_ADMIN_URL ;\n break;\n default:\n $uri = phpfmg_request_uri();\n $pos = strrpos( $uri, '/' );\n $vdir = substr( $uri, 0, $pos );\n $url = $http_host . $vdir . '/' . PHPFMG_ADMIN_URL ;\n };\n return $url;\n}", "title": "" }, { "docid": "4909b672346bebb0847ec8bcebcbc482", "score": "0.6440826", "text": "public static function base_url() \n\t{\n\t\treturn parent::base_url() . 'admin/';\n\t}", "title": "" }, { "docid": "b7e950595e31752e62925469a94f9f89", "score": "0.63568705", "text": "function base_url() \n\t{\n\n\t\tif(isset($_SERVER['HTTP_HOST'])) \n\t\t{\n\n\t\t\t$base_url = $_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://';\n\t\t\t$base_url .= $_SERVER['HTTP_HOST'];\n\t\t\t$base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);\n\t\t\t\n\t\t\t// If we're in the admin directory remove that from the path\n\t\t\t// probably not the best approach, however\n\t\t\treturn str_replace('admin/', '', $base_url); \n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "c20ac2c38c4342204ec1fbdb82c2472e", "score": "0.63038003", "text": "function generate_urlcode(){\r\nglobal $conf;\r\n\r\n// Load the chars array\r\n$chars = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',\r\n 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',\r\n '0','1','2','3','4','5','6','7','8','9');\r\n\r\n\r\n\r\n// Generate the random string\r\n$X = 1;\r\nwhile ($X <= $conf['app']['urichars']){\r\n\r\n$selection_no = rand(1,62);\r\n\r\n$str .= $chars[$selection_no];\r\n$X++;\r\n}\r\n\r\n\r\n$this->urlcode = $str;\r\n\r\n\r\n}", "title": "" }, { "docid": "731770c1861800576025cfabcfafe9a3", "score": "0.62875634", "text": "function rand() {\n $next = $this->Ringsite->rand();\n \n if (empty($next['Ringsite']['url'])) {\n $this->redirect($next['Link']['url']);\n } else {\n $this->redirect($next['Ringsite']['url']);\n }\n exit();\n }", "title": "" }, { "docid": "cab060940a0dc8b2dccb2e84e20d6dbe", "score": "0.6278512", "text": "function base_url($url = null){\n $base_url = \"http://localhost/kolamPemancingan\";\n if($url != null){\n return $base_url.\"/\".$url;\n } else {\n return $base_url;\n }\n}", "title": "" }, { "docid": "26f41b2a55cadd8a32e56c4119e74e9b", "score": "0.62312204", "text": "function base_url() {\n return BASE_URL;\n}", "title": "" }, { "docid": "dcf0a6c5ddf6af73543a5547c6199ee5", "score": "0.62264115", "text": "function baseurl() {\n\t$act = $_GET['view']; //setting disini\n\t$baseurl = \"index.php?view=$act\"; //setting disini\n\treturn $baseurl;\n}", "title": "" }, { "docid": "dcf0a6c5ddf6af73543a5547c6199ee5", "score": "0.62264115", "text": "function baseurl() {\n\t$act = $_GET['view']; //setting disini\n\t$baseurl = \"index.php?view=$act\"; //setting disini\n\treturn $baseurl;\n}", "title": "" }, { "docid": "2d734597a48fdfc7f237b23996358637", "score": "0.6207441", "text": "public function getDefaultUrl()\n\t{\n\t\treturn 'index.php?module=Roles&parent=Settings&view=Index';\n\t}", "title": "" }, { "docid": "9fffd6c04785f1ae23e482e8c5d97424", "score": "0.619257", "text": "function admin_url($url = '')\n{\n return base_url('admin/'.$url);\n}", "title": "" }, { "docid": "8bb6f01df4b1649c87e6bb5b77d8ed42", "score": "0.61741835", "text": "abstract public function getModuleUrl();", "title": "" }, { "docid": "cb5bb5b73116527f65068b80b3050c67", "score": "0.61739504", "text": "function generateUrlInformation()\n{\n $config_var = new config();\n\tif (!isset($_SESSION['operationsUrl']) || !isset($_SESSION['homeUrl'])) {\n $_SESSION['operationsUrl'] = 'http://'. $_SERVER['HTTP_HOST']\n . $_SERVER['PHP_SELF'];\n $path = explode('/', $_SERVER['PHP_SELF']);\n $path[count($path)-1] = 'index.php';\n $_SESSION['homeUrl'] = $config_var->WEB_URL.'index.php';\n }\n}", "title": "" }, { "docid": "1ae8475b4d1fa569d6e2ed3d40af621c", "score": "0.61539966", "text": "abstract public function testingUrl();", "title": "" }, { "docid": "5603d1d53788056d3574ca22cf104f34", "score": "0.61502934", "text": "public static function getUrlGenerator(){}", "title": "" }, { "docid": "7266aa4ab5e7e0e1d8a16584d7ad3c2c", "score": "0.60964173", "text": "public function generateUrl()\n\t{\n\t\treturn '';\n\t}", "title": "" }, { "docid": "aad20678fe73abc23987e14bfd6b761b", "score": "0.6089268", "text": "public function generate() {\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$num_characters = strlen($characters);\n\n\t\t$short_url = '';\n\t\tfor ($i = 0; $i < self::SHORT_URL_LENGTH; $i++) {\n\t\t\t$short_url .= $characters[rand(0, $num_characters - 1)];\n\t\t}\n\n\t\treturn $short_url;\n\t}", "title": "" }, { "docid": "f5973e3a0a14602853c9487898d6f000", "score": "0.6062607", "text": "private function shortURL()\n\t{\n\t\t$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n\t\t$len = strlen($chars);\n\t\t$hash = '';\n\t\tfor($x=0; $x < shortURLSize; $x++)\n \t\t$hash .= $chars[rand() % $len];\n \t$blacklist = array('api', 'editor','dashboard','download','index','m','upload','view');\n \tif( in_array($hash, $blacklist) )\n \t return $this->shortURL();\n \telse\n \t\treturn $hash;\n\t}", "title": "" }, { "docid": "065e68a6c790ba8bcda73566275063aa", "score": "0.6037506", "text": "private static function pick_random_url($list){\n $length = count($list);\n $num = rand(0,$length-1);\n return $list[$num];\n }", "title": "" }, { "docid": "f885b37d38be53307368c339a155971e", "score": "0.6023673", "text": "function admin_url($url = '')\n {\n return site_url('admin/'.$url);\n }", "title": "" }, { "docid": "7fb779bb6de2f7686d82c018d2cd84a5", "score": "0.5988022", "text": "public static function getRandomString(){\n $string = ''; \n for ($i = 0; $i < self::$urlLength; $i++) {\n $string .= self::$urlCharacters[mt_rand(0, 50)];\n }\n return $string;\n }", "title": "" }, { "docid": "bc77cc6804823f7641337853757fdd36", "score": "0.5961845", "text": "public function getUrlAlatPemeriksaanRad(){\n\t\treturn $this->module->id.'/AlatPemeriksaanRad/admin';\n\t}", "title": "" }, { "docid": "665601af72e9e35f7e4e07575ff5f9ac", "score": "0.5942343", "text": "abstract protected function getBaseUrl();", "title": "" }, { "docid": "20ccc55dc912664b9a0d8aa285348be6", "score": "0.5937983", "text": "function system_url()\n\t{\n\t\t$x = explode(\"/\", preg_replace(\"|/*(.+?)/*$|\", \"\\\\1\", BASEPATH));\n\t\treturn $this->item('base_url', 1).end($x).'/';\n\t}", "title": "" }, { "docid": "fbdae60a2fc92c42f4738117302d0969", "score": "0.5933288", "text": "abstract public function getServerUrl();", "title": "" }, { "docid": "e01fc3cecd653583493c1672905912c2", "score": "0.592816", "text": "function top_url() {\r\n $CI = & get_instance();\r\n $CI->config->item('top_url') ? $url = $CI->config->item('top_url') : $url = base_url();\r\n return $url;\r\n}", "title": "" }, { "docid": "d39b24c12ec8099b8d80450858995770", "score": "0.59223056", "text": "public static function get_unique_short_url() {\n\n\t\t$shortened = base_convert(rand(10000, 99999), 10, 36);\n\n\t\tif(static::whereshortened($shortened)->first()) {\n\t\t\tstatic::get_unique_short_url();\n\t\t}\n\n\t\treturn $shortened;\n\n\t}", "title": "" }, { "docid": "5d8dfa416fb2fb5d02936d011ca08cee", "score": "0.5917411", "text": "public static function generateUrl() {\r\n\t\t$urlBuilder = Yii::app()->getBaseUrl(true).Yii::app()->params['index'];\r\n\t\tforeach (func_get_args() as $arg) {\r\n\t\t\t// add ending slash if not present\r\n\t\t\tif (!StringUtils::endsWith($urlBuilder, '/')) {\r\n\t\t\t\t$urlBuilder .= '/';\r\n\t\t\t}\r\n\t\t\t// remove beginning slash if present\r\n\t\t\tif (StringUtils::startsWith($arg, '/')) {\r\n\t\t\t\t$arg = substr($arg, 1);\r\n\t\t\t}\r\n\t\t\t$urlBuilder .= $arg;\r\n\t\t}\r\n\t\t// remove one slash if ending with two slashes\r\n\t\tif (StringUtils::endsWith($urlBuilder, '//')) {\r\n\t\t\t$urlBuilder = substr($urlBuilder, 0, -1);\r\n\t\t}\r\n\t\treturn $urlBuilder;\r\n\t}", "title": "" }, { "docid": "4ff6adc4ef696078aa2f674a0a69e264", "score": "0.5916921", "text": "private function baseUrl(){\n if(!defined('BASEURL')){\n define('BASEURL', $this->baseUrl);\n }\n }", "title": "" }, { "docid": "137a169aeda4b63b33f0fda11ff74302", "score": "0.5914907", "text": "protected function _generateAdminPassword()\n {\n return substr(str_shuffle(strtolower(sha1(rand() . time() . \"styla_connect2\"))), 0, 9);\n }", "title": "" }, { "docid": "6cc68388725bdf8e45f6e452f49e0f54", "score": "0.59074694", "text": "function p6_ex6() {\n $building = func_get_args()[0];\n $room = func_get_args()[1];\n $d = ['1' => ['1', '2'], '12' => ['101'], 'Chez Leon' => ['Grande salle', 'Petite salle']];\n $rand1 = array_rand($d, 1);\n $rand2 = array_rand($d[$rand1], 1);\n $url = 'index.php?batiment='.$rand1.'&salle='.$rand2.'&view=6';\n\n if (array_key_exists(strtolower($building), $d) && in_array(strtolower($room), $d[$building]))\n return 'Batiment : '.$building .'<br />Salle : '.$room;\n else\n return 'Pas de get url (ou vide) : <a id=\"p6_ex6\" href=\"'.$url.'\">'.$url.'</a>';\n}", "title": "" }, { "docid": "b3808b95db7e09b4198d32233e6c1fe7", "score": "0.59037095", "text": "abstract protected function get_base_rest_url();", "title": "" }, { "docid": "4c13862c30c045ca4c4347fbab069765", "score": "0.58978146", "text": "private function _urlReturn()\n {\n return wp_login_url(get_admin_url());\n }", "title": "" }, { "docid": "d73c77c335e6085a857291bcf3b8aed4", "score": "0.5882343", "text": "function _base_url() {\n\t\t// for use in CI pagination library for base_url\n\n\t\t$uri_segments = $this->uri->uri_string();\n\n\t\t$uri_segments = explode('/', $uri_segments);\n\n\t\t// this is going to be a null value so unset it\n\t\tunset($uri_segments[0]);\n\n\t\t// add the index segment to the end of the array if it does not exist\n\t\tif (!in_array('index', $uri_segments, TRUE)) {\n\n\t\t\t$uri_segments[] = 'index';\n\n\t\t}\n\n\t\tforeach ($uri_segments as $key=>$value) {\n\n\t\t\tif ($value == 'page') {\n\n\t\t\t\tunset($uri_segments[$key], $uri_segments[$key + 1]);\n\n\t\t\t}\n\n\t\t}\n\n\t\t$uri_segments[] = 'page';\n\n\t\treturn site_url(implode('/', $uri_segments));\n\n\t}", "title": "" }, { "docid": "54847323ba4dd79e7eb0f7f31c8aab43", "score": "0.5882091", "text": "public function _platformUrlBasePage()\n {\n add_shortcode('ts_url_base_page', function() {\n return Platform::getURL(Platform::URL_BASE_ID);\n });\n }", "title": "" }, { "docid": "83c5ae8445fdd062e696602e6b195986", "score": "0.5859906", "text": "public function getDefaultUrl()\n\t{\n\t\treturn 'index.php?module=Groups&parent=Settings&view=ListTable';\n\t}", "title": "" }, { "docid": "6ee363e3e636bb6898e08c5fee5e3fb7", "score": "0.58406603", "text": "public function link_demo() {\n\t\treturn sprintf( 'https://%1$s.sva.one/', $this->slug() );\n\t}", "title": "" }, { "docid": "6835cb25aefbebed9cb6dc67eefc31bc", "score": "0.5826264", "text": "function random(){\n\t\treturn 'RAND()';\n\t}", "title": "" }, { "docid": "cfb1a9528eb5830e4c19fa6b1360ffe3", "score": "0.5824957", "text": "function custom_login_url()\n{\n return site_url();\n}", "title": "" }, { "docid": "5785c7c6f534468389f5094c3eb0a1da", "score": "0.58244926", "text": "protected function getUrlCrud(){\n return str_replace(\"_\", \"-\", $this->crud);\n }", "title": "" }, { "docid": "e737ff8dbea95474ffad15be86fb8953", "score": "0.58236605", "text": "public function new_slug(){\n\t\t$this->slug = substr( str_shuffle( URL_CHARSET ), 0, URL_LENGTH );\n\t}", "title": "" }, { "docid": "da7ecf20bb85262ea71390eb60f9dcfd", "score": "0.5822109", "text": "abstract public function getBaseUrl();", "title": "" }, { "docid": "110332be146afcd982e6802a36f3ad0b", "score": "0.58170664", "text": "function admin_url_custom($mysecretkey = 'superadmin')\n{\n if (isset($_GET['admin'])) {\n $seckey = $_GET['admin'];\n setcookie(\"secretkey\", $_GET['admin']);\n } else if (isset($_COOKIE['secretkey'])) {\n $seckey = $_COOKIE['secretkey'];\n } else {\n $seckey = '';\n }\n if ($seckey != $mysecretkey) {\n header(\"HTTP/1.0 404 Not Found\");\n exit;\n }\n}", "title": "" }, { "docid": "f1ceb61f4fb4c50cdfa6480950c7a909", "score": "0.58169913", "text": "function getBaseUrl();", "title": "" }, { "docid": "8cd4b94d93edca650eb460a7cb68812d", "score": "0.5809495", "text": "function UrlActual(){\n\t$url=\"http://\".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n\treturn $url;\n}", "title": "" }, { "docid": "0ccbc7b564a2bca29a8b398f306cc73b", "score": "0.5801887", "text": "public function link()\n\t{\n return \\IPS\\Http\\Url::internal( 'app=antispambycleantalk&module=antispambycleantalk&controller=settings', 'admin' );\n\t}", "title": "" }, { "docid": "0458313d0318c00007f6ad042b20edba", "score": "0.5800784", "text": "function base_url()\n{\n\treturn HOST.BASEDIR;\n}", "title": "" }, { "docid": "84601b8ed70e7332b007d36c6a761a4b", "score": "0.58005846", "text": "protected function initUrl()\n {\n $this->url = $_ENV['app_frontend_url'] . self::MCA;\n }", "title": "" }, { "docid": "d0c0f54fc8c83a8dde6c23b0b93b1cdc", "score": "0.57977086", "text": "static function login_page_url(){\n\n return get_site_url() . self::LOGIN_PAGE_BASE_URL;\n\n }", "title": "" }, { "docid": "0b070d669a7341011431e1e59989f618", "score": "0.5795121", "text": "function admin_url($path = false) {\n return site_url(config_item('admin_path') . '/' . $path);\n}", "title": "" }, { "docid": "4ce72194b5ca1c118fe71239880a9cda", "score": "0.57942325", "text": "function set_base_url($params)\n{\n return (\"on\" == $params['testMode']) ? \"https://sandbox-api.iyzipay.com\" : \"https://api.iyzipay.com\";\n}", "title": "" }, { "docid": "7c5a3de1757b6980e564ba61157daa03", "score": "0.5784236", "text": "public function base_url(){\n\t\t\treturn $this->base_url;\n\t\t}", "title": "" }, { "docid": "c93a3efc119389f4855626f103023fcb", "score": "0.5758539", "text": "function base_url() {\n\t\treturn get_permalink( $this->container_id );\n\t}", "title": "" }, { "docid": "272013920ad6ec7cd86063b8d9946ec1", "score": "0.57572556", "text": "function custom_url_login() {\n return get_bloginfo( 'siteurl' ); // On retourne l'index du site\n}", "title": "" }, { "docid": "9d11da4c5dd319c1b9b1073d5816642e", "score": "0.57570314", "text": "function jumpoff_random_img() {\n // Get dir\n $template_dir = get_bloginfo('template_directory');\n\n // Array of fallback images to deliver randomly\n // @since v1.2\n $random_no_images =\n array('placeholder-1.jpg',\n 'placeholder-2.jpg',\n 'placeholder-3.jpg',\n 'placeholder-4.jpg',\n 'placeholder-5.jpg',\n 'placeholder-6.jpg');\n\n // Randomize array of fallbacks\n $randomNumber = array_rand($random_no_images);\n $randomImage = $random_no_images[$randomNumber];\n\n // Set placeholder path for out random fallbacks\n $related_img = $template_dir.\"/assets/images/placeholders/$randomImage\";\n\n return $related_img;\n}", "title": "" }, { "docid": "107141c85738de7cbc0b138d832bf1a0", "score": "0.5753082", "text": "public function getURLTest(){\n return Routeur::creerURL(\"test\");\n }", "title": "" }, { "docid": "2de30463ee582f450f1790ca423b8518", "score": "0.5746577", "text": "function getManagePageUrl(){\n return get_bloginfo('url') . '/manage';\n}", "title": "" }, { "docid": "379c3de065604314a8221f0f330ae2a3", "score": "0.5745734", "text": "public function getURL()\n {\n return $this->site->getURL() . 'overrides/add/';\n\n }", "title": "" }, { "docid": "92216e5a525ce813773c10e8a7ea11d0", "score": "0.5718909", "text": "private function generateRandomUrl($length = 14){\n $chars = 'abdefhgdsgrergllkjtrjhgguerbgrehgiurehgiknrstyz';\n $numChars = strlen($chars);\n $string = '';\n for ($i = 0; $i < $length; $i++) {\n $string .= substr($chars, rand(1, $numChars) - 1, 1);\n }\n return $string . '.ru';\n }", "title": "" }, { "docid": "de2b33dd8af82f65062bb67a8d30f567", "score": "0.5712863", "text": "static function this_url() {\n \t if ( ! self::$_this_url ) {\n $installed_dir = self::installed_dir();\n $requested_path = substr( $_SERVER['REQUEST_URI'], strlen( $installed_dir ) );\n self::$_this_url = site_url( $requested_path );\n }\n return self::$_this_url;\n \t}", "title": "" }, { "docid": "2e3fd3c217157b8628f8b127c67ffe67", "score": "0.57127947", "text": "public function url ($config, $faker)\n {\n $record = $this->loadRecord($config->item_id);\n\n $this->url = $record['url'];\n $this->name = $record['name'];\n $this->description = $record['description'];\n $this->description__intro = $record['description__intro'];\n\n $this->slug = strtolower( $this->hyphenate( Text::_( $record['name'] )));\n }", "title": "" }, { "docid": "734af97c088321ba32ae309b95378393", "score": "0.57085735", "text": "function _engine_url()\n {\n if (false !== $pos = strpos(SITE_URL, '/', 8)) {\n return substr(SITE_URL, $pos);\n } else {\n return '/';\n }\n }", "title": "" }, { "docid": "f109175b97ebe2d5e204e0aa737fba6f", "score": "0.5703019", "text": "function get_url () {\n global $Config;\n if (func_num_args() > 0) {\n $pieces = func_get_args();\n return $Config['BaseURL'] . '/' . implode('/', $pieces);\n } elseif ($Config['BaseURL'] == \"\" || $Config['BaseURL'] == \"/index.php\") {\n return \"/\";\n } else {\n return $Config['BaseURL'];\n }\n}", "title": "" }, { "docid": "cfcf644c721030dcf717e292f73c6d1b", "score": "0.57001597", "text": "abstract public function getApiUrl();", "title": "" }, { "docid": "fb8b3b0470e4b7a59c21a7a42968606f", "score": "0.56994116", "text": "public function getUrlAlatRadiologi(){\n\t\treturn $this->module->id.'/AlatRadiologi/Admin';\n\t}", "title": "" }, { "docid": "7c171beebc432652d38ec042b69434c7", "score": "0.5698611", "text": "static function get_base_url() {\n return \"http://\" . $_SERVER['HTTP_HOST'] . preg_replace(\"#/[^/]*\\.php$#simU\", \"/\", $_SERVER[\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "810eec4524cfc7c9002fc82f3fa964c1", "score": "0.56858295", "text": "public function getAdminUrl(){\n\t\t$params = $this->getParameters();\n\t\treturn $params['admin-url'];\n\t}", "title": "" }, { "docid": "e79e1aac6d176a61c8cc5c53953a9548", "score": "0.56803536", "text": "function get_upload_limit_config_url()\n{\n\t$config_url=NULL;\n\tif (has_actual_page_access(get_member(),'admin_config'))\n\t{\n\t\t$_config_url=build_url(array('page'=>'admin_config','type'=>'category','id'=>'SITE'),get_module_zone('admin_config'));\n\t\t$config_url=$_config_url->evaluate();\n\t\t$config_url.='#group_UPLOAD';\n\t}\n\treturn $config_url;\n}", "title": "" }, { "docid": "edaefb7d2e8f7af92f720f738f175ee5", "score": "0.5663726", "text": "function getUrl(){\r\n $url = \"http://\".$_SERVER['HTTP_HOST'];\r\n $url .= str_replace(basename($_SERVER['SCRIPT_NAME']),\"\",$_SERVER['SCRIPT_NAME']);\r\n \r\n return $url;\r\n }", "title": "" }, { "docid": "d5272f717eff867309caf6652ed9ff86", "score": "0.56623894", "text": "public function getUrlBase()\n {\n return self::BASE.$this->getArea().'/'.$this->getPackage().'/'.$this->getTheme().'/';\n }", "title": "" }, { "docid": "6d82b092ec5500d6118eb4305b345c07", "score": "0.56545407", "text": "public static function _url() {\n\t\treturn self::pw('pages')->get('pw_template=msa')->url;\n\t}", "title": "" }, { "docid": "b8e32bd5586efa43f0a6da8e8da32f9c", "score": "0.5654208", "text": "function random(){\n\t\treturn 'RANDOM()';\n\t}", "title": "" }, { "docid": "b342d0499c8f210337b42a7fc6fcb0e2", "score": "0.5645588", "text": "function baseUrl($url=null) \n{\n static $baseUrl;\n if ($baseUrl===null)\n $baseUrl=Yii::app()->getRequest()->getBaseUrl();\n return $url===null ? $baseUrl : $baseUrl.'/'.ltrim($url,'/');\n}", "title": "" }, { "docid": "7899d5cfe8c91b65610595ebc2a58d9f", "score": "0.56455696", "text": "function bigbluebtton_get_group_url($group_id) {\n\treturn 'mods/bigbluebutton/index.php';\n}", "title": "" }, { "docid": "36e7df8d0ae2db1ba3676472bd8efd5f", "score": "0.5642693", "text": "function p6_ex4($langage, $serveur) {\n $d['lang'] = ['html', 'php', 'css', 'python']; // Etc etc\n $d['serv'] = ['apache', 'lamp', 'ngix', 'mamp'];\n $rand = mt_rand(0, 3);\n $url = 'index.php?langage='.$d['lang'][$rand].'&serveur='.$d['serv'][$rand].'&view=6';\n\n if (in_array(strtolower($langage), $d['lang']) && in_array(strtolower($serveur), $d['serv']))\n return 'Langage : '.$langage .'<br />Serveur : '.$serveur;\n else\n return 'Pas de get url (ou vide) : <a id=\"p6_ex4\" href=\"'.$url.'\">'.$url.'</a>';\n}", "title": "" }, { "docid": "ad180d6246449b08ca60a903e6da1db3", "score": "0.5633891", "text": "public function urlBase()\n {\n return BASE.'?C=Plugins&plugin='.$this->plugin_details['plugin'];\n }", "title": "" }, { "docid": "8b213516862a8d75a3366d8c84eec5ed", "score": "0.5632848", "text": "function baseHostUrl($a = NULL, $b = NULL){\n $arr = explode('.', get_instance()->config->base_url($a, $b));\n if (count($arr) == 3){\n return $arr[1].$arr[2];\n }\n \n return get_instance()->config->base_url($a, $b);\n }", "title": "" }, { "docid": "ad65a568183407e92170f637c4742fcd", "score": "0.56323624", "text": "public function construct_api_url()\n {\n $url = api_url() . 'registry/object/' . $this->id . '/';\n// $url.='?includes=grants';\n return $url;\n }", "title": "" }, { "docid": "11a2e9999128019f0679ca74db59805f", "score": "0.56293845", "text": "public static function getAdminURL($more = ''): string {\n\t\treturn self::getURL(\"admin/{$more}\");\n\t}", "title": "" }, { "docid": "2d016c6608960dca5d0b35b6382918b7", "score": "0.56290954", "text": "protected function setBaseURL()\n\t{\n\t\t$this->baseURL = '/'.$this->link_id;\n\t\treturn;\n\t}", "title": "" }, { "docid": "419715b2a8bbff05b155d8c362a0e51e", "score": "0.56211895", "text": "function _ajax_url()\n\t\t{\n\t\t\t$url = $this->EE->functions->fetch_site_index(0,0);\n\n\t\t\t$host = (isset($_SERVER['HTTP_HOST']) == TRUE && $_SERVER['HTTP_HOST'] != FALSE) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];\n\t\t\t$url = preg_replace('#http\\://(([\\w][\\w\\-\\.]*)\\.)?([\\w][\\w\\-]+)(\\.([\\w][\\w\\.]*))?\\/#', \"http://\".$host.\"/\", $url);\n\t\t\t\n\t\t\t// Create new URL\n\t\t\t$this->ajax_url = $url.QUERY_MARKER.'ACT=';\n\t\t}", "title": "" }, { "docid": "ea7df333767a3417ff3d17b69b3e3d3d", "score": "0.5619378", "text": "public function generate()\n {\n return $this->loginUrl->generate();\n }", "title": "" }, { "docid": "22e85be17bc3fb24104aee57ec407992", "score": "0.5616914", "text": "function pwtp_random_number() {\r\n\t$page_number = mt_rand(100, 999);\r\n\treturn $page_number;\r\n}", "title": "" }, { "docid": "efb9560d2e0df820472e033d97254acd", "score": "0.561629", "text": "public static function get_root_url() {\r\r\n return get_template_directory_uri() . '/lib/custom_button';\r\r\n }", "title": "" }, { "docid": "d878250824d12e42cbb621146a154925", "score": "0.5614559", "text": "function linklaunder_random_string() { \n\t$length= 6;\n\t$characters = \"ABCDEFGHIJKLMNOPRQSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\t$num_characters = strlen($characters) - 1; \n\twhile (strlen($return) < $length) \n\t{ \n\t\t$return.= $characters[mt_rand(0,$num_characters)]; \n\t} \n\treturn $return; \n}", "title": "" }, { "docid": "66caa148523550b61df971bed1773156", "score": "0.56130755", "text": "public function getURL() {\n\t\treturn \"admin/administer_utilities/tour/view?guid={$this->guid}\";\n\t}", "title": "" }, { "docid": "38e5eb5d8b46e97ac8ff9c63001193a2", "score": "0.5608572", "text": "public static function adminId()\n {\n $randomInt = random_int(10000000,99999999);\n return 'ADM'.$randomInt;\n }", "title": "" }, { "docid": "29b3ba8031af5bac5a63b6c838ae5371", "score": "0.55973613", "text": "function fondo()\n{\n\t$fondo = mt_rand(0,40);\n\t$fondo = \"fondo\".$fondo.\".jpg\";\n\t\n\treturn $fondo;\n}", "title": "" }, { "docid": "b4319a3b216ff34d2cce085cfc5c3d2d", "score": "0.55971587", "text": "function site_rest_url() {\n\n return $this->lf_core->http_url . '/site/' . get_option('livefyre_apps-livefyre_site_id' );\n\n }", "title": "" }, { "docid": "8c3bbb96da25239098aded76efcd0393", "score": "0.5597036", "text": "public function urlGeneratorRender() {\n return [\n '#theme' => 'twig_theme_test_url_generator',\n ];\n }", "title": "" }, { "docid": "692b9a7fbb6ce6b342266202a11884d8", "score": "0.5594779", "text": "protected function generateAdminPassword()\n\t{\n\t\treturn\n\t\t\tUtil::getRandomString(1, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') .\n\t\t\tUtil::getRandomString(1, '0123456789') .\n\t\t\tUtil::getRandomString(1, '@*^%#()<>') .\n\t\t\tUtil::getRandomString();\n\t}", "title": "" }, { "docid": "6a9c3d11a24e4f094b158677d0203ff8", "score": "0.5592089", "text": "function bones_login_url() { return home_url(); }", "title": "" }, { "docid": "6a9c3d11a24e4f094b158677d0203ff8", "score": "0.5592089", "text": "function bones_login_url() { return home_url(); }", "title": "" }, { "docid": "f4be9553d78554c174fb47d96ee51b49", "score": "0.55850357", "text": "public function getBaseUrl()\n {\n return str_replace('http://', '', Mage::getStoreConfig('web/unsecure/base_url'));\n }", "title": "" }, { "docid": "11a383ba8d5609ef8d2d756b7116c30e", "score": "0.55821675", "text": "protected function getUrlBase()\n\t{\n\t\treturn $this->url_base;\n\t}", "title": "" }, { "docid": "1311215fdfd7a55838a21cdd9d2867c3", "score": "0.55796486", "text": "function base_url()\n\t{\n\t\treturn $_SERVER['REMOTE_ADDR'].':'.$_SERVER['SERVER_PORT'];\n\t}", "title": "" }, { "docid": "4b078329654f8b32db2e12e949529055", "score": "0.5575997", "text": "public static function baseUrl() {\n\t\treturn Yii::app()->params['http_addr'];\t\n }", "title": "" }, { "docid": "2aaa2ce1e4a43ebf4cae7716fe38c5fe", "score": "0.5573959", "text": "public function randomIdentifier() {\n $random_url = \"\";\n $domain = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\n $len = strlen($domain);\n $n = rand(5, 9);\n for ($i = 0; $i < $n; $i++) {\n // Generate a random index to pick\n // characters.\n $index = rand(0, $len - 1);\n\n // Concatenating the character\n // in resultant string.\n $random_url = $random_url . $domain[$index];\n }\n return $random_url;\n }", "title": "" }, { "docid": "22c6c8c902b5c4aaf3b0a56df06a368a", "score": "0.55619437", "text": "public function getClearUrl()\r\n {\r\n \tif (!Mage::app()->getRequest()->getParam('am_landing')) {\r\n \t\treturn parent::getClearUrl();\r\n \t}\r\n return Mage::helper('amlanding/url')->getClearUrl();\r\n }", "title": "" }, { "docid": "39b38e151f5cc36867629a96a0121959", "score": "0.55585617", "text": "abstract public function url();", "title": "" } ]
7a9c783e0642e8bc7c4853fd200ec988
Create or Update Podio Item data to DB
[ { "docid": "0d84a7c693246a9b92a070e8d29bad39", "score": "0.6194074", "text": "private function createOrUpdateAppItem($item, $appId)\n {\n try {\n $appItem = AppItem::updateOrCreate(\n [\n 'podio_item_id' => $item->item_id\n ],\n [\n 'app_id' => $appId,\n 'podio_item_id' => $item->item_id,\n 'podio_app_item_id' => $item->app_item_id\n ]\n );\n Log::info($appItem->podio_item_id);\n $fields = $item->fields;\n foreach ($fields as $field) {\n $this->storeFieldValues($field, $appItem->id);\n }\n\n } catch (\\Exception $exception) {\n Log::error($exception->getMessage());\n }\n }", "title": "" } ]
[ { "docid": "a85da10e125c18ab7ca113f8311f4035", "score": "0.6427558", "text": "public function testUpdateItemMinData()\n {\n // Create a fake Item\n $item = $this->createItem();\n $data = ['name' => '1'];\n // Request\n $response = $this->put('/api/items/' . $item->id . '?api_key=ApiKeyExample',$data);\n\n // Assert status\n $response->assertResponseOk();\n // Assert Json\n $response->seeJson($data);\n // Assert Database\n $data['id'] = $item->id;\n $this->seeInDatabase('items',$data);\n }", "title": "" }, { "docid": "7ed553c69a311a8fad429809094da581", "score": "0.6383581", "text": "public function testUpdateItemNoData()\n {\n // Create a fake Item\n $item = $this->createItem();\n // Request\n $response = $this->put('/api/items/' . $item->id . '?api_key=ApiKeyExample');\n\n // Assert status\n $response->assertResponseOk();\n // Assert Json\n $response->seeJson($item->toArray());\n // Assert Database\n $this->seeInDatabase('items',$item->toArray());\n }", "title": "" }, { "docid": "ff50dc27035f45d83fcdbbdf8f9c9afb", "score": "0.6329139", "text": "public function updateItem($item);", "title": "" }, { "docid": "1a0fa428ec840d2a429f2169c31da3f6", "score": "0.62810946", "text": "public function upsertItem($item) {\n\t\t\n\t\t//Delete the existing record, if it exists.\t\t\n\t\t$where = $this->quoteInto('QUOTEID = ? AND DATAPROTECTIONID = ?', $item->itemGroupId, $item->constraintTypeId);\n $this->delete($where);\n\t\t\n\t\t//Insert the new record.\n\t\t$data = array(\n\t\t\t'QUOTEID' => $item->itemGroupId,\n\t\t\t'DATAPROTECTIONID' => $item->constraintTypeId,\n\t\t\t'ISALLOWED' => ($item->isAllowed) ? 1 : 0\n\t\t);\n\t\t$this->insert($data);\n\t}", "title": "" }, { "docid": "3763464b5154458ff77335eff1fb844d", "score": "0.624641", "text": "public function createItem($item);", "title": "" }, { "docid": "db50edf324fe82eb6ee6840af13e1aa7", "score": "0.61745876", "text": "public function insertAdminItem($itemData);", "title": "" }, { "docid": "4561ca7b4a2394fc641f88c33e663de5", "score": "0.6172988", "text": "public function updateUserData(UserDataDBO $item);", "title": "" }, { "docid": "787c0df97120a437509c9229262e1be9", "score": "0.6171509", "text": "private function updatePodioItem($appId, $itemId)\n {\n $this->authenticatePodio();\n try {\n $item = \\PodioItem::get($itemId);\n $this->createOrUpdateAppItem($item, $appId);\n } catch (\\Exception $exception) {\n Log::error($exception->getMessage());\n }\n }", "title": "" }, { "docid": "0fdd0f18ae0f2f98f178385bcf730f8f", "score": "0.59811646", "text": "protected function _putPostPersist(array &$item)\n {\n $item['entry_id'] = $item['resource_id'];\n unset($item['resource_id']);\n }", "title": "" }, { "docid": "aca632a55402a775d48552e665bbac2d", "score": "0.59042996", "text": "public function testCreateOrUpdateItem()\n {\n }", "title": "" }, { "docid": "029a97e175de34db1cea691ffe74db71", "score": "0.5879817", "text": "public function update($item){\r\n\t\t$sql = 'UPDATE item SET name = ?, description = ?, price = ?, status = ?, shoppinglist_id = ? WHERE item_id = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t\n\t\t$sqlQuery->set($item->name);\n\t\t$sqlQuery->set($item->description);\n\t\t$sqlQuery->set($item->price);\n\t\t$sqlQuery->set($item->status);\n\t\t$sqlQuery->set($item->shoppinglistId);\n\r\n\t\t$sqlQuery->set($item->itemId);\r\n\t\treturn $this->executeUpdate($sqlQuery);\r\n\t}", "title": "" }, { "docid": "e280291d5a74545e29dbf567a4e17d55", "score": "0.58686155", "text": "function updateDrugItems($items)\n{\n file_put_contents(\"model/dataStorage/items.json\",json_encode($items));\n}", "title": "" }, { "docid": "da0855bfcaba86ca9aafc0d695cffa1f", "score": "0.5864669", "text": "public function testUpdateItemMaxData()\n {\n // Create a fake Item\n $item = $this->createItem();\n $data = [\n \"name\" => \"1\",\n \"vegetarian\" => 1,\n \"vegan\" => 1,\n \"glutenfree\" => 1,\n \"sweet\" => 1,\n \"salty\" => 1,\n \"spicy_level\" => strval(1),\n ];\n // Request\n $response = $this->put('/api/items/' . $item->id . '?api_key=ApiKeyExample',$data);\n\n // Assert status\n $response->assertResponseOk();\n // Assert Json\n $response->seeJson($data);\n // Assert Database\n $data['id'] = $item->id;\n $this->seeInDatabase('items',$data);\n }", "title": "" }, { "docid": "5a71a402058c5ae3966176b8675a5513", "score": "0.583161", "text": "public function writeUpdatedItem($item){\n if(is_string($item)){\n $itemKey = $item;\n $item = $this->items->getItem($itemKey);\n }\n $updateItemJson = json_encode($item->updateItemObject());\n $etag = $item->etag;\n \n $aparams = array('target'=>'item', 'itemKey'=>$item->itemKey);\n $reqUrl = $this->apiRequestUrl($aparams) . $this->apiQueryString($aparams);\n $response = $this->_request($reqUrl, 'PUT', $updateItemJson, array('If-Match'=>$etag));\n return $response;\n }", "title": "" }, { "docid": "61e3b08926ad70b626aed3c1ca1d68a3", "score": "0.57948303", "text": "public function testCreateOrUpdateItems()\n {\n }", "title": "" }, { "docid": "d4be4a27c71effdf005373540331b280", "score": "0.5786998", "text": "protected function _getPostPersist(array &$item)\n {\n $item['entry_id'] = $item['resource_id'];\n unset($item['resource_id']);\n }", "title": "" }, { "docid": "cc32cde0ef37fcaea895e60cadc5ca73", "score": "0.5744045", "text": "function post_addItem() {\n //and maybe closed (according to entitiy configuration)\n if ($this->item == null) {\n $this->item = new $this->fields['itemtype'];\n $this->item->getFromDB($this->fields['items_id']);\n }\n\n $item = $this->item;\n\n // Replace inline pictures\n $this->input[\"_job\"] = $this->item;\n $this->input = $this->addFiles(\n $this->input, [\n 'force_update' => true,\n 'name' => 'content',\n 'content_field' => 'content',\n ]\n );\n\n // Add solution to duplicates\n if ($this->item->getType() == 'Ticket' && !isset($this->input['_linked_ticket'])) {\n Ticket_Ticket::manageLinkedTicketsOnSolved($this->item->getID(), $this);\n }\n\n $status = $item::SOLVED;\n\n //handle autoclose, for tickets only\n if ($item->getType() == Ticket::getType()) {\n $autoclosedelay = Entity::getUsedConfig(\n 'autoclose_delay',\n $this->item->getEntityID(),\n '',\n Entity::CONFIG_NEVER\n );\n\n // 0 = immediatly\n if ($autoclosedelay == 0) {\n $status = $item::CLOSED;\n }\n }\n\n $this->item->update([\n 'id' => $this->item->getID(),\n 'status' => $status\n ]);\n parent::post_addItem();\n }", "title": "" }, { "docid": "da5ce37e58115099e07d0300f4ee547a", "score": "0.5743414", "text": "public function run()\n {\n foreach ($this->items() as $item) {\n Provinsi::query()->updateOrCreate($item);\n }\n }", "title": "" }, { "docid": "3d8688bc5400f516ac5acafe4e734b47", "score": "0.5718421", "text": "public function syncItem($item);", "title": "" }, { "docid": "92491e52bfb8657f2c32221a6b7206ae", "score": "0.5707454", "text": "protected function _postPostPersist(array &$item)\n {\n $item['entry_id'] = $item['resource_id'];\n unset($item['resource_id']);\n }", "title": "" }, { "docid": "ad22d521ca62f0487fbba3b469f079a8", "score": "0.5702451", "text": "protected function populateItems(): void {\n\t\tTestPDO::CreateTestDatabaseAndUser ();\n\t\t$pdo = TestPDO::getInstance ();\n\t\tDatabaseGenerator::Generate ( $pdo );\n\t\tDatabaseGenerator::CreateFullTextIndex( $pdo );\n\n\t\t$user = new User ( $pdo, [\n\t\t\t'user' => 'user',\n\t\t\t'email' => 'user@gmail.com',\n\t\t\t'password' => 'TestTest88'\n\t\t] );\n\n\t\t$user->set ();\n\n\t\t// Insert items.\n\t\t$args = [ \n\t\t\t\tself::ITEM_ID => self::ITEM_ID_1,\n\t\t\t\tself::OWNING_USER_ID => $user->userID,\n\t\t\t\tself::TITLE => self::TITLE_1,\n\t\t\t\tself::DESCRIPTION => self::DESCRIPTION_1,\n\t\t\t\tself::QUANTITY => self::QUANTITY_1,\n\t\t\t\tself::CONDITION => self::CONDITION_1,\n\t\t\t self::TYPE => 'Wanted',\n\t\t\t\tself::PRICE => self::PRICE_1,\n\t\t\t\tself::ITEM_STATUS => self::STATUS_1 \n\t\t];\n\t\t\n\t\t$item = new Item ( $pdo, $args );\n\t\t$item->set ();\n\n\t\t$args2 = [ \n\t\t\t\tself::ITEM_ID => self::ITEM_ID_2,\n\t\t\t self::OWNING_USER_ID => $user->userID,\n\t\t\t\tself::TITLE => self::TITLE_2,\n\t\t\t\tself::DESCRIPTION => self::DESCRIPTION_2,\n\t\t\t\tself::QUANTITY => self::QUANTITY_2,\n\t\t\t\tself::CONDITION => self::CONDITION_2,\n\t\t\t\tself::TYPE => 'Wanted',\n\t\t\t\tself::PRICE => self::PRICE_2,\n\t\t\t\tself::ITEM_STATUS => self::STATUS_2 \n\t\t];\n\t\t\n\t\t$item = new Item ( $pdo, $args2 );\n\t\t$item->set ();\n\n\t\t$args3 = [ \n\t\t\t\tself::ITEM_ID => self::ITEM_ID_3,\n\t\t\t self::OWNING_USER_ID => $user->userID,\n\t\t\t\tself::TITLE => self::TITLE_3,\n\t\t\t\tself::DESCRIPTION => self::DESCRIPTION_3,\n\t\t\t\tself::QUANTITY => self::QUANTITY_3,\n\t\t\t\tself::CONDITION => self::CONDITION_3,\n\t\t\t\tself::TYPE => 'Wanted',\n\t\t\t\tself::PRICE => self::PRICE_3,\n\t\t\t\tself::ITEM_STATUS => self::STATUS_3 \n\t\t];\n\t\t\n\t\t$item = new Item ( $pdo, $args3 );\n\t\t$item->set ();\n\t}", "title": "" }, { "docid": "9e66d201ba4aabfd6a4ee4e85b4dee4e", "score": "0.5700253", "text": "public function updateData($data_obj, $item_id)\n {\n\t\t$em = $this->controller_obj->getDoctrine()->getManager();\n\t\t$item = $em->getRepository(\"WebManagementBundle:video\")->find($item_id);\n\t\t$item->setName($data_obj->getName());\t\t\t\n\t\t$item->setUploadingDate($data_obj->getUploadingDate());\n\t\t$item->setDescription($data_obj->getDescription());\t\t\n\t\t$item->setUploadedBy($data_obj->getUploadedBy());\t\t\n\t\t$em->flush();\n\t}", "title": "" }, { "docid": "c3836bd3b1967bed60b3b775a37a277c", "score": "0.56462985", "text": "function feedback_update_item($item, $data = null){\n if($data != null){\n $itemname = trim($data->itemname);\n $item->name = addslashes($itemname ? $data->itemname : get_string('no_itemname', 'feedback'));\n \n //get the used class from item-typ\n $itemclass = 'feedback_item_'.$data->typ;\n //get the instance of the item class\n $itemobj = new $itemclass();\n $item->presentation = addslashes($itemobj->get_presentation($data));\n\n $item->required=0;\n if (isset($data->required)) {\n $item->required=$data->required;\n } \n }else {\n $item->name = addslashes($item->name);\n $item->presentation = addslashes($item->presentation);\n }\n\n return update_record(\"feedback_item\", $item);\n}", "title": "" }, { "docid": "21597d998225833d9934d4fcbf73286e", "score": "0.5637163", "text": "public function updateAdminItem($itemId, $itemData);", "title": "" }, { "docid": "65595ee1ff427befd4621784fc0072f2", "score": "0.5626026", "text": "function doPut() {\n /* Our variables are sent as a raw http post, not as a post var */\n $data = getJsonPayload();\n if ($data['itemID'] == 0) {\n unset($data['itemID']);\n $inserting = TRUE;\n $sql = \"insert into `items` (`itemID`, `name`, `description`, `price`, `photoURL`, `categoryID`) values (NULL, :name, :description, :price, :photoURL, :categoryID)\";\n } else {\n $inserting = FALSE;\n $sql = \"update `items` set `itemID` = :itemID, `name` = :name, `description` = :description, `price` = :price, `photoURL` = :photoURL, `categoryID` = :categoryID where `itemID` = :itemID\";\n }\n $db = dbSetup();\n\n\n /* Prepare our data. Here is where you should add filtering, etc. */\n $insert = array();\n foreach ($data as $key => $val) {\n if ($key != \"category_id\") {\n $insert[':'.$key] = $val;\n }\n }\n\n $stmt = $db->prepare($sql);\n $stmt->execute($insert);\n if ($inserting) {\n $data['itemID'] = $db->lastInsertId();\n }\n $data['category'] = getCategory($data['categoryID'],$db);\n doJson($data);\n}", "title": "" }, { "docid": "48d8a412a38199f152e70b6d509873c6", "score": "0.56041706", "text": "public function run()\n {\n foreach ($this->items() as $item) {\n Fasyankes::query()->updateOrCreate(\n \\Illuminate\\Support\\Arr::only($item, ['nama', 'tipe', 'kota_id']),\n $item\n );\n }\n }", "title": "" }, { "docid": "c40bfe2fb9ce8c1d5bb9814e7d185850", "score": "0.5601101", "text": "public function run()\n {\n Product::upsert(\n [\n 'id' => 1,\n 'title' => 'title1',\n 'content' => 'content1',\n 'price' => 400,\n 'quantity' => 10000\n ],\n [\n 'id' => 2,\n 'title' => 'title2',\n 'content' => 'content2',\n 'price' => 80,\n 'quantity' => 999\n ],\n ['id'],\n ['title', 'content', 'quantity']\n );\n }", "title": "" }, { "docid": "4fc7d8693d18beb275969769bc212efd", "score": "0.55867875", "text": "public function insert($item){\r\n\t\t$sql = 'INSERT INTO item (name, description, price, status, shoppinglist_id) VALUES (?, ?, ?, ?, ?)';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t\n\t\t$sqlQuery->set($item->name);\n\t\t$sqlQuery->set($item->description);\n\t\t$sqlQuery->set($item->price);\n\t\t$sqlQuery->set($item->status);\n\t\t$sqlQuery->set($item->shoppinglistId);\n\r\n\t\t$id = $this->executeInsert($sqlQuery);\t\r\n\t\t$item->itemId = $id;\r\n\t\treturn $id;\r\n\t}", "title": "" }, { "docid": "3ca926d67de3dec900e1beb79a9d719c", "score": "0.5585062", "text": "public function addItem($data) {\n $this->db->merge(self::BASE_TABLE)\n ->key('alias')\n ->insertFields($data)\n ->updateFields($data)\n ->execute();\n }", "title": "" }, { "docid": "8f2c4a9466b17adfbdaa4df1e387bdb3", "score": "0.5584747", "text": "public function insert($item);", "title": "" }, { "docid": "8f2c4a9466b17adfbdaa4df1e387bdb3", "score": "0.5584747", "text": "public function insert($item);", "title": "" }, { "docid": "443fd01a76cdc7d8f41e0ac77687071e", "score": "0.55818665", "text": "protected function populateItemNotes(): void {\n\t\tTestPDO::CreateTestDatabaseAndUser ();\n\t\t$pdo = TestPDO::getInstance ();\n\t\tDatabaseGenerator::Generate ( $pdo );\n\t\tDatabaseGenerator::CreateFullTextIndex( $pdo );\n\n\t\t$user = new User ( $pdo, [\n\t\t\t'user' => 'user',\n\t\t\t'email' => 'user@gmai.com',\n\t\t\t'password' => 'TestTest88'\n\t\t] );\n\n\t\t$user->set ();\n\n\t\tfor($i = 1; $i <= 3; $i ++) {\n\t\t\t$item = new Item ( $pdo );\n\t\t\t$item->owningUserID = $user->userID;\n\t\t\t$item->itemcondition = 'Used';\n\t\t\t$item->type = 'Wanted';\n\t\t\t$item->title = 'title' . $i;\n\t\t\t$item->set ();\n\t\t}\n\t}", "title": "" }, { "docid": "b35e48a455bb68a521c4ab80aa405449", "score": "0.55686414", "text": "public function save()\n {\n if ($this->key || $this->id) {\n $this->update();\n } else {\n $this->create();\n }\n }", "title": "" }, { "docid": "70767175e9714cf43f6b567666d2bdcc", "score": "0.5561764", "text": "function PostProcessItemData()\n {\n $this->PostProcessUnitData();\n $this->PostProcessEventData();\n\n $this->CertificatesObj()->Sql_Table_Structure_Update();\n }", "title": "" }, { "docid": "ecb5bf2b46458d752f9919f14070e706", "score": "0.555036", "text": "function saveItem() \n {\n $db = factory::getDatabase();\n $app = factory::getApplication();\n \n $id = $app->getVar('id', 0, 'post');\n \n if($id == 0) {\n \t$result = $db->insertRow($this->table, $_POST);\n } else {\n \t$result = $db->updateRow($this->table, $_POST, 'id', $id);\n }\n \n if($result) {\n \t$msg = \"El impost ha estat guardada\";\n \t$type = 'success';\n } else {\n \t$msg = \"El impost no s'ha pogut guardar\";\n \t$type = 'danger';\n }\n \n $app->redirect('index.php?view='.$this->view, $msg, $type);\n }", "title": "" }, { "docid": "54cefd1b1d83f9a304dcc2f0fd5a2048", "score": "0.5544656", "text": "public function test_update_item() {\n $todolist_items = \\local_todolist\\get_items_for_user($this->_user, $this->_now);\n $item = $todolist_items[0];\n $modified_task_description = 'Modified task description';\n $item->task_description = $modified_task_description;\n $item = \\local_todolist\\update_item((array)$item);\n $this->assertEquals([\n 'id' => $todolist_items[0]->id,\n 'task_description' => $modified_task_description,\n 'is_done' => $todolist_items[0]->is_done,\n 'due_timestamp' => $todolist_items[0]->due_timestamp,\n 'created_timestamp' => $todolist_items[0]->created_timestamp,\n 'user_id' => $todolist_items[0]->user_id,\n ], $item);\n }", "title": "" }, { "docid": "7204513c079202c09f6c2484ae28fc49", "score": "0.55082595", "text": "function saveEditItem($form) {\n $data = array();\n $id_booster = $form->getData('id');\n $dt = new jDateTime();\n $dt->now();\n\n $dao = jDao::get('boosteradmin~boo_items_mod','booster');\n $record = jDao::createRecord('booster~boo_items','booster');\n $record->id = $id_booster;\n $record->name = $form->getData('name');\n $record->item_info_id = $form->getData('item_info_id');\n $record->short_desc = $form->getData('short_desc');\n $record->short_desc_fr = $form->getData('short_desc_fr'); \n $record->type_id = $form->getData('type_id');\n $record->url_website = $form->getData('url_website');\n $record->url_repo = $form->getData('url_repo');\n $record->author = $form->getData('author');\n $record->item_by = $form->getData('item_by');\n $record->tags = $form->getData(\"tags\");\n $record->status = 0; //will need moderation\n $record->created = jDao::get('booster~boo_items','booster')->get($id_booster)->created;\n $record->modified = $dt->toString(jDateTime::DB_DTFORMAT);\n\n $return = ($dao->insert($record)) ? true : false;\n\n //$form->saveControlToDao('jelix_versions', 'booster~boo_items_jelix_versions', null, array('id_item', 'id_version'));\n\n return $return;\n }", "title": "" }, { "docid": "bea6a7b92d940342ef8f472f8bff954a", "score": "0.54979354", "text": "private function _saveUpdate() {\n $instance = static::create($this->data);\n $this->data = $instance->getData();\n $this->data_status = BaseModel::DATA_DB;\n }", "title": "" }, { "docid": "f51ffe16679e33c1a1c8a368bf71d462", "score": "0.54978865", "text": "function update ($request, $response, $item) {\n try {\n $item->unserialize($request->getParsedBody());\n if (!$item->validate()) {\n $errors = [];\n foreach ($item->getValidationFailures() as $failure)\n $errors[] = \"Property \".$failure->getPropertyPath().\": \".$failure->getMessage().\"\\n\";\n return $response->withJson([ \"errors\" => $errors ], 400);\n }\n $item->save();\n return $response->withJson($item->serialize(), 200);\n } catch (Exception $e) {\n return $response->withJson([ \"errors\" => [$e->getMessage()] ], 400);\n }\n}", "title": "" }, { "docid": "cbbf4122e25cc69636cae4d176c50e98", "score": "0.54913676", "text": "private function _Save(TableObject $item)\n {\n $item->Save();\n }", "title": "" }, { "docid": "65b27052a98c389021b116b39283ef19", "score": "0.54850036", "text": "public function createItem($data) /*{{{*/\n\t{\n\t\t$id = $this->entityCreate(self::ITEM_TABLE, $data);\n\t\treturn $this->getItemById($id);\n\t}", "title": "" }, { "docid": "5bc11fdd21ac077655fea5ab82f82bc5", "score": "0.547774", "text": "public function save()\r\n\t{\r\n\t\tif (is_null($this->getDataStruct()->id)) {\r\n\t\t\t$this->getDataStruct()->id = $this->getDataProvider()->insert($this->getDataStruct());\r\n\t\t} else {\r\n\t\t\t$this->getDataProvider()->update($this->getDataStruct());\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f484a3fab40a4a3158661b024ac4d651", "score": "0.5452583", "text": "public function testUpdateItemNotExist()\n {\n // Request\n $response = $this->put('/api/items/0?api_key=ApiKeyExample');\n\n // Assert status\n $response->assertResponseStatus(404);\n // Assert Json\n $response->seeJson([\"message\" => \"Error when updating item.\",\"details\"=>\"No item found with the following ID : 0.\"]);\n }", "title": "" }, { "docid": "2bd30f214593614b17b869bb39a43d3f", "score": "0.54447323", "text": "function dbInsertUpdateItem($item_id,$item_title, $path_link, $added_by_id, $is_enabled, $added_date_time, $remarks)\n\t{\n\n\t\t$conn = DBConnection();\n\t\tif($item_id == 0)\n\t\t{\n\t\t\t$query = \"INSERT INTO music VALUE(NULL,'$item_title', '$path_link', $added_by_id, $is_enabled, '$added_date_time', '$remarks')\";\n\t\t\tmysqli_query($conn, $query);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = \" UPDATE music SET item_id = $item_id, item_title = $item_title, path_link = $path_link, added_by_id = $added_by_id, is_enabled = $is_enabled, added_date_time = $added_date_time, remarks = $remarks WHERE item_id = $item_id\";\n\t\t\tmysqli_query($conn, $query);\n\t\t}\n\t}", "title": "" }, { "docid": "81fbc89950d1c800e50e3e2da0d7df36", "score": "0.54356027", "text": "public function updateItem() {\n $item_detail = json_decode($_POST['data']);\n $item_detail_decode = array(\n \"id_item\" => $item_detail[0],\n \"id_item_category\" => $item_detail[1],\n \"item_account_code\" => $item_detail[2],\n \"item_name\" => $item_detail[3],\n \"item_alias\" => $item_detail[4],\n \"item_no\" => $item_detail[5]\n );\n\n $item_map = array(\n 'id_item_map' => $item_detail[7],\n 'id_division' => $item_detail[6],\n 'id_item_category' => $item_detail[1],\n 'id_item' => $item_detail[0]\n );\n\n $this->load->model('item/item_model');\n $this->item_model->updateItem($item_detail_decode);\n $this->item_model->updateItemMap($item_map);\n // echo $updateItem;\n }", "title": "" }, { "docid": "e014cf8169dd8d163eb2128e2dcb752a", "score": "0.54150194", "text": "public function create()\n\t{\n\t\n\t return $this->item->create(\\Input::all());\n\n\t //if the items has branches then \n\t //$this->item->attach(branchs ids in array);\n\t}", "title": "" }, { "docid": "dbce9a729780f6ad99cc958766d646e2", "score": "0.5404217", "text": "public function createItem($item){\n $createItemObject = $item->newItemObject();\n //unset variables the api won't accept\n unset($createItemObject['mimeType']);\n unset($createItemObject['charset']);\n unset($createItemObject['contentType']);\n unset($createItemObject['filename']);\n unset($createItemObject['md5']);\n unset($createItemObject['mtime']);\n unset($createItemObject['zip']);\n \n $createItemJson = json_encode(array('items'=>array($createItemObject)));;\n libZoteroDebug(\"create item json: \" . $createItemJson);\n //libZoteroDebug( $createItemJson );die;\n $aparams = array('target'=>'items');\n //alter if item is a child\n if($item->parentKey){\n $aparams['itemKey'] = $item->parentKey;\n $aparams['target'] = 'item';\n $aparams['targetModifier'] = 'children';\n }\n $reqUrl = $this->apiRequestUrl($aparams) . $this->apiQueryString($aparams);\n $response = $this->_request($reqUrl, 'POST', $createItemJson);\n return $response;\n }", "title": "" }, { "docid": "3a6ff842515816dfc21c8b79b61d3564", "score": "0.5403641", "text": "public function update($item, $data){\n $result = $this->generateErrorObject();\n\n try{\n if(!$item || !$data){\n $result->errors = null;\n $result->data = 400;\n $result->message = __(\"Update request cannot be processed due to contain invalid data\");\n return $result;\n }\n\n $updateRules = $this->getUpdateRules();\n if($updateRules) {\n //validate\n $messages = $this->getValidationMessages();\n $validator = Validator::make($data, $updateRules, $messages);\n\n if ($validator->fails()) {\n $result->errors = $validator->errors();\n $result->code = 400;\n $result->message = __(\"Update request cannot be processed due to contain invalid data\");\n return $result;\n }\n }\n\n foreach($data as $propertyName => $value){\n // we will only update property that this object have, and ignore the rest. Also we will ignore primary key too\n // And we will only accept primary data only\n if($propertyName !== 'id'){\n try{\n if(Schema::hasColumn($item->getTable(), $propertyName)){\n $item->$propertyName = $value;\n }\n }\n catch(Exception $e){\n //ignore and carry on\n }\n }\n }\n\n $updateResult = $item->save();\n\n if($item->id) {\n $item = $this->find($item->id);\n }\n\n $result->success = $updateResult;\n $result->data = $item;\n $result->code = ($updateResult ? 200 : 500);\n\n return $result;\n }\n catch(Exception $e){\n $result->success = false;\n $result->errors = $e->getMessage();\n $result->data = 500;\n $result->message = __(\"Update request cannot be processed due to unexpected data\");\n return $result;\n }\n }", "title": "" }, { "docid": "69fe3fa97e81a28fd576dfdd15f292b0", "score": "0.53989804", "text": "public function post_products()\n{\n $rawPostData = file_get_contents('php://input');\n $product = Product::fromJson($rawPostData);\n\n $db = new DataStore();\n $db->beginTransaction();\n $product->insert($db);\n $db->commit();\n\n echo('Product ' . $product->name . \" added.\");\n}", "title": "" }, { "docid": "f5f2bc6fb1bc29adf1b65dfb1a84d2c6", "score": "0.5397412", "text": "abstract protected function createItem();", "title": "" }, { "docid": "11b3e054afd82d1f2f0b07a443ddb617", "score": "0.5389604", "text": "public function update(Request $request, Item $item)\n {\n //\n }", "title": "" }, { "docid": "11b3e054afd82d1f2f0b07a443ddb617", "score": "0.5389604", "text": "public function update(Request $request, Item $item)\n {\n //\n }", "title": "" }, { "docid": "11b3e054afd82d1f2f0b07a443ddb617", "score": "0.5389604", "text": "public function update(Request $request, Item $item)\n {\n //\n }", "title": "" }, { "docid": "11b3e054afd82d1f2f0b07a443ddb617", "score": "0.5389604", "text": "public function update(Request $request, Item $item)\n {\n //\n }", "title": "" }, { "docid": "11b3e054afd82d1f2f0b07a443ddb617", "score": "0.5389604", "text": "public function update(Request $request, Item $item)\n {\n //\n }", "title": "" }, { "docid": "7507d84bbcced1da57d242004f289f01", "score": "0.5382356", "text": "public function test_update_item() {\n\t\t$request = new WP_REST_Request( 'POST', '/wp/v2/types/post' );\n\t\t$response = $this->server->dispatch( $request );\n\t\t$this->assertSame( 404, $response->get_status() );\n\t}", "title": "" }, { "docid": "e37cc93f9df2a005e054a10c45dc14ef", "score": "0.5380954", "text": "public function putAluno($item){\n\t\t$data['nome'] = ucwords(mb_strtolower($this->input->post('nome')));\n\t\t$data['nascimento'] = $this->input->post('nascimento');\n\t\t$data['cep'] = $this->input->post('cep');\n\t\t$data['logradouro'] = $this->input->post('logradouro');\n\t\t$data['bairro'] = $this->input->post('bairro');\n\t\t$data['numero'] = $this->input->post('numero');\n\t\t$data['cidade'] = $this->input->post('cidade');\n\t\t$data['estado'] = $this->input->post('estado');\n\t\t$data['id_curso'] = $this->input->post('id_curso');\n return ($this->db->query(\"UPDATE alunos SET nome = ?, data_nascimento = ? ,cep = ? ,logradouro = ? ,bairro = ? ,numero = ? ,cidade = ?, estado =? ,id_curso = ? WHERE id_aluno = $item\",$data)) ? true : false;\n\n }", "title": "" }, { "docid": "ff8993068c815cc712a622e8c2b312d2", "score": "0.5378927", "text": "public function test_making_put_request_to_update_product()\n {\n $data = Product::factory()->create();\n $toUpdate = [\n 'name' => 'Picanha',\n 'type' => 'Carnes',\n 'quantity' => 75\n ];\n\n $this->assertDatabaseCount('products', 1);\n $this->assertDatabaseHas('products', [\n 'name' => 'Picanha'\n ]);\n\n $response = $this->putJson(self::PRODUCT_URI . '/' . $data->id, $toUpdate);\n $response->assertOk();\n }", "title": "" }, { "docid": "06e08b0e0c6031cb7ef39688697e59dc", "score": "0.5370135", "text": "function put() {\n // Redirects to the post method if no id is provided\n if (isset($this->params['id'])) return $this->post();\n // Checks if method is allowed\n if (!in_array('put', $this->allow)) throw new xException(\"Method not allowed\", 403);\n // Checks provided parameters\n if (!isset($this->params['items'])) throw new xException('No items provided', 400);\n // Database action\n $r = xModel::load($this->model, $this->params['items'])->put();\n // Result\n $r['items'] = array_shift(xModel::load($this->model, array('id'=>$r['xinsertid']))->get());\n return $r;\n }", "title": "" }, { "docid": "5962056752c3d33bd9b04c35e7831bc9", "score": "0.5369554", "text": "public function writeItem($item)\n {\n $this->entityManager->persist($item);\n ++$this->persistCount;\n if ($this->options['flushInterval'] && $this->shouldFlush()) {\n $this->finish();\n }\n }", "title": "" }, { "docid": "08757cc2c81b23ca63469f255efa2060", "score": "0.53661007", "text": "protected function update() {\n $this->client->sendRequest('POST', $this->name . ($this->key ? : (string) $this->id), $this->prepareRequestData());\n }", "title": "" }, { "docid": "b5990ca6e1edda4ff757dd992e97a41e", "score": "0.53658634", "text": "public function update(Request $request, Item $item)\n {\n if (isset($request->item['name'])) {\n $item->name = $request->item['name']; \n }\n $item->completed = $request->item['completed'] ? true : false;\n $item->completed_at = $request->item['completed'] ? now() : null;\n $item->save();\n return $item;\n }", "title": "" }, { "docid": "d2ea4f17e76b74dab1d9419d1e18d8c3", "score": "0.53591734", "text": "public function run() {\n\n\n \\DB::table('items')->delete();\n\n \\DB::table('items')->insert(array(\n 0 =>\n array(\n 'id' => 1,\n 'upc_ean_isbn' => '494363778-7',\n 'item_name' => 'Parsnip',\n 'size' => '3XL',\n 'description' => 'Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '33.02',\n 'selling_price' => '290.39',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:24',\n 'updated_at' => '2018-01-17 19:40:24',\n ),\n 1 =>\n array(\n 'id' => 2,\n 'upc_ean_isbn' => '377376048-5',\n 'item_name' => 'Ocean Spray - Kiwi Strawberry',\n 'size' => 'M',\n 'description' => 'Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '90.07',\n 'selling_price' => '212.56',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:24',\n 'updated_at' => '2018-01-17 19:40:24',\n ),\n 2 =>\n array(\n 'id' => 3,\n 'upc_ean_isbn' => '651730253-0',\n 'item_name' => 'Bread Base - Italian',\n 'size' => 'XL',\n 'description' => 'Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '88.25',\n 'selling_price' => '234.40',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:24',\n 'updated_at' => '2018-01-17 19:40:24',\n ),\n 3 =>\n array(\n 'id' => 4,\n 'upc_ean_isbn' => '875171784-0',\n 'item_name' => 'Spice - Greek 1 Step',\n 'size' => '3XL',\n 'description' => 'Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi. Integer ac neque. Duis bibendum. Morbi non quam nec dui luctus rutrum. Nulla tellus. In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '91.01',\n 'selling_price' => '223.12',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:24',\n 'updated_at' => '2018-01-17 19:40:24',\n ),\n 4 =>\n array(\n 'id' => 5,\n 'upc_ean_isbn' => '411106782-4',\n 'item_name' => 'Cabbage - Red',\n 'size' => 'XS',\n 'description' => 'Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy. Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '6.09',\n 'selling_price' => '235.40',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:24',\n 'updated_at' => '2018-01-17 19:40:24',\n ),\n 5 =>\n array(\n 'id' => 6,\n 'upc_ean_isbn' => '907198388-9',\n 'item_name' => 'Wine - Zinfandel Rosenblum',\n 'size' => 'XS',\n 'description' => 'Donec semper sapien a libero. Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '13.56',\n 'selling_price' => '264.74',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:24',\n 'updated_at' => '2018-01-17 19:40:24',\n ),\n 6 =>\n array(\n 'id' => 7,\n 'upc_ean_isbn' => '924160143-4',\n 'item_name' => 'Cup - 8oz Coffee Perforated',\n 'size' => 'XL',\n 'description' => 'Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '72.70',\n 'selling_price' => '292.99',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:24',\n 'updated_at' => '2018-01-17 19:40:24',\n ),\n 7 =>\n array(\n 'id' => 8,\n 'upc_ean_isbn' => '933466155-0',\n 'item_name' => 'Appetizer - Sausage Rolls',\n 'size' => 'S',\n 'description' => 'Phasellus in felis. Donec semper sapien a libero. Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '45.15',\n 'selling_price' => '225.37',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:24',\n 'updated_at' => '2018-01-17 19:40:24',\n ),\n 8 =>\n array(\n 'id' => 9,\n 'upc_ean_isbn' => '556213205-2',\n 'item_name' => 'Sobe - Green Tea',\n 'size' => '3XL',\n 'description' => 'Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '86.98',\n 'selling_price' => '228.85',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:24',\n 'updated_at' => '2018-01-17 19:40:24',\n ),\n 9 =>\n array(\n 'id' => 10,\n 'upc_ean_isbn' => '550255625-5',\n 'item_name' => 'Chinese Foods - Pepper Beef',\n 'size' => '3XL',\n 'description' => 'Donec semper sapien a libero.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '73.66',\n 'selling_price' => '288.81',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:24',\n 'updated_at' => '2018-01-17 19:40:24',\n ),\n 10 =>\n array(\n 'id' => 11,\n 'upc_ean_isbn' => '783535718-6',\n 'item_name' => 'Wine - Red, Cabernet Sauvignon',\n 'size' => 'L',\n 'description' => 'Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero. Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '2.66',\n 'selling_price' => '234.63',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:24',\n 'updated_at' => '2018-01-17 19:40:24',\n ),\n 11 =>\n array(\n 'id' => 12,\n 'upc_ean_isbn' => '876396994-7',\n 'item_name' => 'White Fish - Filets',\n 'size' => 'M',\n 'description' => 'Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt. Nulla mollis molestie lorem. Quisque ut erat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '84.00',\n 'selling_price' => '245.49',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 12 =>\n array(\n 'id' => 13,\n 'upc_ean_isbn' => '065268554-4',\n 'item_name' => 'Pomello',\n 'size' => 'S',\n 'description' => 'Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla. Quisque arcu libero, rutrum ac, lobortis vel, dapibus at, diam.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '32.03',\n 'selling_price' => '222.04',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 13 =>\n array(\n 'id' => 14,\n 'upc_ean_isbn' => '100362978-4',\n 'item_name' => 'Ice Cream - Chocolate',\n 'size' => 'S',\n 'description' => 'Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat. In congue. Etiam justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '50.95',\n 'selling_price' => '208.56',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 14 =>\n array(\n 'id' => 15,\n 'upc_ean_isbn' => '606894933-8',\n 'item_name' => 'Versatainer Nc - 888',\n 'size' => 'L',\n 'description' => 'Aliquam sit amet diam in magna bibendum imperdiet.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '7.58',\n 'selling_price' => '216.75',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 15 =>\n array(\n 'id' => 16,\n 'upc_ean_isbn' => '763857762-0',\n 'item_name' => 'Veal - Leg',\n 'size' => '2XL',\n 'description' => 'Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '76.22',\n 'selling_price' => '299.75',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 16 =>\n array(\n 'id' => 17,\n 'upc_ean_isbn' => '248631714-7',\n 'item_name' => 'Sword Pick Asst',\n 'size' => 'S',\n 'description' => 'Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '46.94',\n 'selling_price' => '239.17',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 17 =>\n array(\n 'id' => 18,\n 'upc_ean_isbn' => '055010991-9',\n 'item_name' => 'Yams',\n 'size' => 'L',\n 'description' => 'Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet. Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '8.72',\n 'selling_price' => '297.63',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 18 =>\n array(\n 'id' => 19,\n 'upc_ean_isbn' => '197640186-0',\n 'item_name' => 'Green Scrubbie Pad H.duty',\n 'size' => 'XL',\n 'description' => 'Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '78.29',\n 'selling_price' => '257.79',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 19 =>\n array(\n 'id' => 20,\n 'upc_ean_isbn' => '265111122-8',\n 'item_name' => 'Wine - Riesling Alsace Ac 2001',\n 'size' => 'XL',\n 'description' => 'Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '89.92',\n 'selling_price' => '263.17',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 20 =>\n array(\n 'id' => 21,\n 'upc_ean_isbn' => '736442664-7',\n 'item_name' => 'Soup - Clam Chowder, Dry Mix',\n 'size' => 'L',\n 'description' => 'Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '75.87',\n 'selling_price' => '209.29',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 21 =>\n array(\n 'id' => 22,\n 'upc_ean_isbn' => '658758052-1',\n 'item_name' => 'Pernod',\n 'size' => 'S',\n 'description' => 'Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo. Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '68.27',\n 'selling_price' => '206.74',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 22 =>\n array(\n 'id' => 23,\n 'upc_ean_isbn' => '511385900-1',\n 'item_name' => 'Bread Foccacia Whole',\n 'size' => 'S',\n 'description' => 'Integer ac neque.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '98.25',\n 'selling_price' => '202.26',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 23 =>\n array(\n 'id' => 24,\n 'upc_ean_isbn' => '836854299-5',\n 'item_name' => 'Sour Puss Sour Apple',\n 'size' => '2XL',\n 'description' => 'Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '82.80',\n 'selling_price' => '234.15',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 24 =>\n array(\n 'id' => 25,\n 'upc_ean_isbn' => '336033585-6',\n 'item_name' => 'Basil - Pesto Sauce',\n 'size' => 'XL',\n 'description' => 'Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '14.29',\n 'selling_price' => '232.86',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 25 =>\n array(\n 'id' => 26,\n 'upc_ean_isbn' => '768220081-2',\n 'item_name' => 'Longos - Chicken Curried',\n 'size' => 'M',\n 'description' => 'Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '40.55',\n 'selling_price' => '200.03',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 26 =>\n array(\n 'id' => 27,\n 'upc_ean_isbn' => '139934339-4',\n 'item_name' => 'Rum - White, Gg White',\n 'size' => '3XL',\n 'description' => 'Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '15.97',\n 'selling_price' => '224.76',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 27 =>\n array(\n 'id' => 28,\n 'upc_ean_isbn' => '942962523-3',\n 'item_name' => 'Juice - Grape, White',\n 'size' => '3XL',\n 'description' => 'Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi. Integer ac neque. Duis bibendum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '14.04',\n 'selling_price' => '299.05',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 28 =>\n array(\n 'id' => 29,\n 'upc_ean_isbn' => '362368625-5',\n 'item_name' => 'Canadian Emmenthal',\n 'size' => 'S',\n 'description' => 'Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus. Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero. Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '53.25',\n 'selling_price' => '293.47',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 29 =>\n array(\n 'id' => 30,\n 'upc_ean_isbn' => '961316662-9',\n 'item_name' => 'Cranberry Foccacia',\n 'size' => 'L',\n 'description' => 'Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '61.79',\n 'selling_price' => '269.07',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 30 =>\n array(\n 'id' => 31,\n 'upc_ean_isbn' => '486964237-9',\n 'item_name' => 'Lamb - Shoulder, Boneless',\n 'size' => 'S',\n 'description' => 'Nulla justo. Aliquam quis turpis eget elit sodales scelerisque. Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '93.22',\n 'selling_price' => '266.23',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 31 =>\n array(\n 'id' => 32,\n 'upc_ean_isbn' => '443744078-1',\n 'item_name' => 'Calvados - Boulard',\n 'size' => 'S',\n 'description' => 'Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '2.75',\n 'selling_price' => '213.87',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:25',\n 'updated_at' => '2018-01-17 19:40:25',\n ),\n 32 =>\n array(\n 'id' => 33,\n 'upc_ean_isbn' => '575620661-2',\n 'item_name' => 'Urban Zen Drinks',\n 'size' => 'M',\n 'description' => 'Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '6.67',\n 'selling_price' => '230.71',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 33 =>\n array(\n 'id' => 34,\n 'upc_ean_isbn' => '992461034-2',\n 'item_name' => 'Cake - Pancake',\n 'size' => '3XL',\n 'description' => 'Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '25.62',\n 'selling_price' => '258.58',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 34 =>\n array(\n 'id' => 35,\n 'upc_ean_isbn' => '451548923-2',\n 'item_name' => 'Wine - Niagara Peninsula Vqa',\n 'size' => '2XL',\n 'description' => 'In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt. Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '18.79',\n 'selling_price' => '287.29',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 35 =>\n array(\n 'id' => 36,\n 'upc_ean_isbn' => '646344619-X',\n 'item_name' => 'Capon - Whole',\n 'size' => '2XL',\n 'description' => 'Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '90.01',\n 'selling_price' => '247.85',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 36 =>\n array(\n 'id' => 37,\n 'upc_ean_isbn' => '634880883-1',\n 'item_name' => 'Chocolate - Pistoles, Lactee, Milk',\n 'size' => 'L',\n 'description' => 'Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti. Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '98.40',\n 'selling_price' => '275.53',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 37 =>\n array(\n 'id' => 38,\n 'upc_ean_isbn' => '255043781-0',\n 'item_name' => 'Juice - Lime',\n 'size' => 'S',\n 'description' => 'Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '96.87',\n 'selling_price' => '230.06',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 38 =>\n array(\n 'id' => 39,\n 'upc_ean_isbn' => '545656450-5',\n 'item_name' => 'Food Colouring - Blue',\n 'size' => 'XL',\n 'description' => 'Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '96.46',\n 'selling_price' => '256.55',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 39 =>\n array(\n 'id' => 40,\n 'upc_ean_isbn' => '901725854-3',\n 'item_name' => 'Food Colouring - Orange',\n 'size' => 'XL',\n 'description' => 'Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo. Morbi ut odio.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '3.83',\n 'selling_price' => '221.35',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 40 =>\n array(\n 'id' => 41,\n 'upc_ean_isbn' => '789901708-4',\n 'item_name' => 'Jerusalem Artichoke',\n 'size' => '2XL',\n 'description' => 'Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '8.46',\n 'selling_price' => '252.52',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 41 =>\n array(\n 'id' => 42,\n 'upc_ean_isbn' => '439526463-8',\n 'item_name' => 'Wine - Magnotta - Bel Paese White',\n 'size' => 'M',\n 'description' => 'Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '73.61',\n 'selling_price' => '251.03',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 42 =>\n array(\n 'id' => 43,\n 'upc_ean_isbn' => '605062883-1',\n 'item_name' => 'Grouper - Fresh',\n 'size' => 'XS',\n 'description' => 'Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet. Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis. Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '51.78',\n 'selling_price' => '217.61',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 43 =>\n array(\n 'id' => 44,\n 'upc_ean_isbn' => '185339959-0',\n 'item_name' => 'Bar Special K',\n 'size' => 'M',\n 'description' => 'In eleifend quam a odio. In hac habitasse platea dictumst.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '48.87',\n 'selling_price' => '280.02',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 44 =>\n array(\n 'id' => 45,\n 'upc_ean_isbn' => '547965654-6',\n 'item_name' => 'Wine - Red, Black Opal Shiraz',\n 'size' => 'XS',\n 'description' => 'Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis. Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus. Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '49.97',\n 'selling_price' => '204.65',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 45 =>\n array(\n 'id' => 46,\n 'upc_ean_isbn' => '394192854-6',\n 'item_name' => 'Tart Shells - Sweet, 4',\n 'size' => 'L',\n 'description' => 'Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '10.19',\n 'selling_price' => '284.60',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 46 =>\n array(\n 'id' => 47,\n 'upc_ean_isbn' => '487601778-6',\n 'item_name' => 'Doilies - 7, Paper',\n 'size' => 'S',\n 'description' => 'Mauris lacinia sapien quis libero. Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '3.23',\n 'selling_price' => '287.49',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 47 =>\n array(\n 'id' => 48,\n 'upc_ean_isbn' => '659759354-5',\n 'item_name' => 'Longos - Grilled Salmon With Bbq',\n 'size' => 'M',\n 'description' => 'Morbi vestibulum, velit id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien placerat ante. Nulla justo. Aliquam quis turpis eget elit sodales scelerisque. Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '67.24',\n 'selling_price' => '276.83',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 48 =>\n array(\n 'id' => 49,\n 'upc_ean_isbn' => '570921815-4',\n 'item_name' => 'Dates',\n 'size' => 'L',\n 'description' => 'Donec semper sapien a libero. Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '16.44',\n 'selling_price' => '220.50',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 49 =>\n array(\n 'id' => 50,\n 'upc_ean_isbn' => '645558641-7',\n 'item_name' => 'Water - Spring Water, 355 Ml',\n 'size' => 'L',\n 'description' => 'Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '41.34',\n 'selling_price' => '249.18',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 50 =>\n array(\n 'id' => 51,\n 'upc_ean_isbn' => '267588176-7',\n 'item_name' => 'Milk - Chocolate 500ml',\n 'size' => 'S',\n 'description' => 'Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '96.17',\n 'selling_price' => '257.99',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 51 =>\n array(\n 'id' => 52,\n 'upc_ean_isbn' => '098045498-0',\n 'item_name' => 'Campari',\n 'size' => 'L',\n 'description' => 'Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '48.79',\n 'selling_price' => '243.67',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 52 =>\n array(\n 'id' => 53,\n 'upc_ean_isbn' => '581107980-X',\n 'item_name' => 'Sauce - Vodka Blush',\n 'size' => 'L',\n 'description' => 'Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '66.69',\n 'selling_price' => '237.48',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 53 =>\n array(\n 'id' => 54,\n 'upc_ean_isbn' => '907049991-6',\n 'item_name' => 'Wine - Periguita Fonseca',\n 'size' => 'XS',\n 'description' => 'Donec semper sapien a libero. Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '12.34',\n 'selling_price' => '201.91',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:26',\n 'updated_at' => '2018-01-17 19:40:26',\n ),\n 54 =>\n array(\n 'id' => 55,\n 'upc_ean_isbn' => '282848128-X',\n 'item_name' => 'Wine - Fat Bastard Merlot',\n 'size' => 'L',\n 'description' => 'Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla. Quisque arcu libero, rutrum ac, lobortis vel, dapibus at, diam. Nam tristique tortor eu pede.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '93.98',\n 'selling_price' => '249.34',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 55 =>\n array(\n 'id' => 56,\n 'upc_ean_isbn' => '389247181-9',\n 'item_name' => 'Sproutsmustard Cress',\n 'size' => 'L',\n 'description' => 'Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '55.24',\n 'selling_price' => '236.76',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 56 =>\n array(\n 'id' => 57,\n 'upc_ean_isbn' => '141759688-0',\n 'item_name' => 'Salami - Genova',\n 'size' => 'L',\n 'description' => 'Proin risus. Praesent lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '73.04',\n 'selling_price' => '239.80',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 57 =>\n array(\n 'id' => 58,\n 'upc_ean_isbn' => '158007819-2',\n 'item_name' => 'Olives - Stuffed',\n 'size' => '2XL',\n 'description' => 'Sed ante.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '34.61',\n 'selling_price' => '257.18',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 58 =>\n array(\n 'id' => 59,\n 'upc_ean_isbn' => '219588254-9',\n 'item_name' => 'Wine - Peller Estates Late',\n 'size' => 'XS',\n 'description' => 'Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '92.72',\n 'selling_price' => '209.30',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 59 =>\n array(\n 'id' => 60,\n 'upc_ean_isbn' => '452847040-3',\n 'item_name' => 'Pepper - White, Whole',\n 'size' => 'XS',\n 'description' => 'Aliquam sit amet diam in magna bibendum imperdiet. Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '15.29',\n 'selling_price' => '276.97',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 60 =>\n array(\n 'id' => 61,\n 'upc_ean_isbn' => '232729306-5',\n 'item_name' => 'Wine - Chateauneuf Du Pape',\n 'size' => 'L',\n 'description' => 'Morbi ut odio.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '38.36',\n 'selling_price' => '243.28',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 61 =>\n array(\n 'id' => 62,\n 'upc_ean_isbn' => '664066438-0',\n 'item_name' => 'Sprouts - Baby Pea Tendrils',\n 'size' => '2XL',\n 'description' => 'Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '92.36',\n 'selling_price' => '282.11',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 62 =>\n array(\n 'id' => 63,\n 'upc_ean_isbn' => '769417690-3',\n 'item_name' => 'Tray - 16in Rnd Blk',\n 'size' => 'S',\n 'description' => 'Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo. Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '47.65',\n 'selling_price' => '286.04',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 63 =>\n array(\n 'id' => 64,\n 'upc_ean_isbn' => '945212020-7',\n 'item_name' => 'Aspic - Amber',\n 'size' => 'M',\n 'description' => 'Aenean sit amet justo. Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '64.74',\n 'selling_price' => '287.05',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 64 =>\n array(\n 'id' => 65,\n 'upc_ean_isbn' => '637844813-2',\n 'item_name' => 'Jolt Cola - Red Eye',\n 'size' => '2XL',\n 'description' => 'Aenean sit amet justo. Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '82.90',\n 'selling_price' => '242.11',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 65 =>\n array(\n 'id' => 66,\n 'upc_ean_isbn' => '206098297-9',\n 'item_name' => 'Wine - Kwv Chenin Blanc South',\n 'size' => '3XL',\n 'description' => 'Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est congue elementum. In hac habitasse platea dictumst.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '36.86',\n 'selling_price' => '231.48',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 66 =>\n array(\n 'id' => 67,\n 'upc_ean_isbn' => '723228716-X',\n 'item_name' => 'Lobak',\n 'size' => '2XL',\n 'description' => 'Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus. Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero. Nullam sit amet turpis elementum ligula vehicula consequat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '67.07',\n 'selling_price' => '282.42',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 67 =>\n array(\n 'id' => 68,\n 'upc_ean_isbn' => '453511466-8',\n 'item_name' => 'Turkey - Breast, Double',\n 'size' => 'S',\n 'description' => 'Nulla suscipit ligula in lacus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '41.38',\n 'selling_price' => '205.38',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 68 =>\n array(\n 'id' => 69,\n 'upc_ean_isbn' => '569335298-6',\n 'item_name' => 'Pasta - Cappellini, Dry',\n 'size' => 'XL',\n 'description' => 'Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '84.18',\n 'selling_price' => '232.97',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 69 =>\n array(\n 'id' => 70,\n 'upc_ean_isbn' => '709280198-2',\n 'item_name' => 'Squid Ink',\n 'size' => '3XL',\n 'description' => 'Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '6.19',\n 'selling_price' => '233.61',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 70 =>\n array(\n 'id' => 71,\n 'upc_ean_isbn' => '125378897-9',\n 'item_name' => 'Oil - Peanut',\n 'size' => 'XS',\n 'description' => 'Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '86.90',\n 'selling_price' => '297.10',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 71 =>\n array(\n 'id' => 72,\n 'upc_ean_isbn' => '792767969-4',\n 'item_name' => 'Soap - Mr.clean Floor Soap',\n 'size' => 'S',\n 'description' => 'Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '8.34',\n 'selling_price' => '219.86',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 72 =>\n array(\n 'id' => 73,\n 'upc_ean_isbn' => '743652293-0',\n 'item_name' => 'Table Cloth 81x81 Colour',\n 'size' => 'XS',\n 'description' => 'Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '79.60',\n 'selling_price' => '225.76',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 73 =>\n array(\n 'id' => 74,\n 'upc_ean_isbn' => '800954273-3',\n 'item_name' => 'Wine - Cave Springs Dry Riesling',\n 'size' => '2XL',\n 'description' => 'Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus. Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero. Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '7.50',\n 'selling_price' => '281.55',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 74 =>\n array(\n 'id' => 75,\n 'upc_ean_isbn' => '520739500-9',\n 'item_name' => 'Pasta - Gnocchi, Potato',\n 'size' => '3XL',\n 'description' => 'Pellentesque eget nunc.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '69.37',\n 'selling_price' => '209.09',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 75 =>\n array(\n 'id' => 76,\n 'upc_ean_isbn' => '990523251-6',\n 'item_name' => 'Cheese - Gouda Smoked',\n 'size' => 'XL',\n 'description' => 'Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est congue elementum. In hac habitasse platea dictumst.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '39.62',\n 'selling_price' => '265.61',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 76 =>\n array(\n 'id' => 77,\n 'upc_ean_isbn' => '297710589-1',\n 'item_name' => 'Wine - Port Late Bottled Vintage',\n 'size' => 'XL',\n 'description' => 'Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '64.03',\n 'selling_price' => '262.65',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 77 =>\n array(\n 'id' => 78,\n 'upc_ean_isbn' => '344490810-5',\n 'item_name' => 'Wine - Magnotta - Red, Baco',\n 'size' => 'XL',\n 'description' => 'Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '17.83',\n 'selling_price' => '211.11',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:27',\n 'updated_at' => '2018-01-17 19:40:27',\n ),\n 78 =>\n array(\n 'id' => 79,\n 'upc_ean_isbn' => '866411641-5',\n 'item_name' => 'Carbonated Water - Wildberry',\n 'size' => 'M',\n 'description' => 'Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '87.11',\n 'selling_price' => '237.27',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 79 =>\n array(\n 'id' => 80,\n 'upc_ean_isbn' => '052204902-8',\n 'item_name' => 'Wine - Trimbach Pinot Blanc',\n 'size' => '2XL',\n 'description' => 'In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '87.89',\n 'selling_price' => '226.10',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 80 =>\n array(\n 'id' => 81,\n 'upc_ean_isbn' => '145451520-1',\n 'item_name' => 'Snapple Lemon Tea',\n 'size' => '3XL',\n 'description' => 'Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '62.07',\n 'selling_price' => '279.90',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 81 =>\n array(\n 'id' => 82,\n 'upc_ean_isbn' => '889067439-3',\n 'item_name' => 'Carroway Seed',\n 'size' => '2XL',\n 'description' => 'Aenean auctor gravida sem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '5.49',\n 'selling_price' => '256.12',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 82 =>\n array(\n 'id' => 83,\n 'upc_ean_isbn' => '158574365-8',\n 'item_name' => 'Wine - Barossa Valley Estate',\n 'size' => 'L',\n 'description' => 'Duis at velit eu est congue elementum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '53.95',\n 'selling_price' => '276.53',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 83 =>\n array(\n 'id' => 84,\n 'upc_ean_isbn' => '073510096-9',\n 'item_name' => 'Island Oasis - Raspberry',\n 'size' => 'L',\n 'description' => 'Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '95.95',\n 'selling_price' => '201.21',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 84 =>\n array(\n 'id' => 85,\n 'upc_ean_isbn' => '810898181-6',\n 'item_name' => 'Crackers - Trio',\n 'size' => 'XS',\n 'description' => 'Vestibulum rutrum rutrum neque.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '28.47',\n 'selling_price' => '253.98',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 85 =>\n array(\n 'id' => 86,\n 'upc_ean_isbn' => '107395892-2',\n 'item_name' => 'Appetizer - Cheese Bites',\n 'size' => 'XS',\n 'description' => 'Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '56.79',\n 'selling_price' => '214.64',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 86 =>\n array(\n 'id' => 87,\n 'upc_ean_isbn' => '952865894-6',\n 'item_name' => 'Water - Green Tea Refresher',\n 'size' => 'L',\n 'description' => 'Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '31.89',\n 'selling_price' => '245.02',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 87 =>\n array(\n 'id' => 88,\n 'upc_ean_isbn' => '293233055-1',\n 'item_name' => 'Yogurt - Plain',\n 'size' => 'M',\n 'description' => 'Duis at velit eu est congue elementum. In hac habitasse platea dictumst. Morbi vestibulum, velit id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien placerat ante. Nulla justo. Aliquam quis turpis eget elit sodales scelerisque. Mauris sit amet eros. Suspendisse accumsan tortor quis turpis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '24.61',\n 'selling_price' => '263.93',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 88 =>\n array(\n 'id' => 89,\n 'upc_ean_isbn' => '749214717-1',\n 'item_name' => 'Juice - Clam, 46 Oz',\n 'size' => '3XL',\n 'description' => 'Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus. Phasellus in felis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '60.95',\n 'selling_price' => '218.87',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 89 =>\n array(\n 'id' => 90,\n 'upc_ean_isbn' => '560168306-9',\n 'item_name' => 'Appetizer - Shrimp Puff',\n 'size' => 'S',\n 'description' => 'Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus. Phasellus in felis. Donec semper sapien a libero.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '11.36',\n 'selling_price' => '204.88',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 90 =>\n array(\n 'id' => 91,\n 'upc_ean_isbn' => '316508016-X',\n 'item_name' => 'Lettuce - Baby Salad Greens',\n 'size' => 'XL',\n 'description' => 'Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo. Morbi ut odio.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '19.70',\n 'selling_price' => '232.67',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 91 =>\n array(\n 'id' => 92,\n 'upc_ean_isbn' => '016295587-1',\n 'item_name' => 'Soup - Knorr, French Onion',\n 'size' => 'S',\n 'description' => 'Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '63.01',\n 'selling_price' => '243.99',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 92 =>\n array(\n 'id' => 93,\n 'upc_ean_isbn' => '580098133-7',\n 'item_name' => 'Cheese - Brie Roitelet',\n 'size' => 'M',\n 'description' => 'Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus. Phasellus in felis. Donec semper sapien a libero. Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '5.63',\n 'selling_price' => '283.00',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 93 =>\n array(\n 'id' => 94,\n 'upc_ean_isbn' => '899554501-1',\n 'item_name' => 'Lamb Leg - Bone - In Nz',\n 'size' => 'XS',\n 'description' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '41.37',\n 'selling_price' => '213.62',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 94 =>\n array(\n 'id' => 95,\n 'upc_ean_isbn' => '973009434-9',\n 'item_name' => 'Foam Espresso Cup Plain White',\n 'size' => 'XS',\n 'description' => 'Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '27.59',\n 'selling_price' => '289.08',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 95 =>\n array(\n 'id' => 96,\n 'upc_ean_isbn' => '189978768-2',\n 'item_name' => 'Cup - Translucent 7 Oz Clear',\n 'size' => 'L',\n 'description' => 'Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum. Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est. Phasellus sit amet erat. Nulla tempus. Vivamus in felis eu sapien cursus vestibulum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '81.71',\n 'selling_price' => '229.79',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:28',\n 'updated_at' => '2018-01-17 19:40:28',\n ),\n 96 =>\n array(\n 'id' => 97,\n 'upc_ean_isbn' => '336121579-X',\n 'item_name' => 'Sausage - Breakfast',\n 'size' => 'L',\n 'description' => 'Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus. Phasellus in felis. Donec semper sapien a libero.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '71.09',\n 'selling_price' => '212.11',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 97 =>\n array(\n 'id' => 98,\n 'upc_ean_isbn' => '079050998-9',\n 'item_name' => 'Bacardi Limon',\n 'size' => 'L',\n 'description' => 'Nullam molestie nibh in lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '39.03',\n 'selling_price' => '297.89',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 98 =>\n array(\n 'id' => 99,\n 'upc_ean_isbn' => '800098568-3',\n 'item_name' => 'Pop Shoppe Cream Soda',\n 'size' => '2XL',\n 'description' => 'Maecenas pulvinar lobortis est.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '27.69',\n 'selling_price' => '205.90',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 99 =>\n array(\n 'id' => 100,\n 'upc_ean_isbn' => '380520490-6',\n 'item_name' => 'Tart Shells - Savory, 2',\n 'size' => 'M',\n 'description' => 'Nullam varius.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '2.28',\n 'selling_price' => '226.29',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 100 =>\n array(\n 'id' => 101,\n 'upc_ean_isbn' => '133393811-X',\n 'item_name' => 'Pasta - Lasagne, Fresh',\n 'size' => '2XL',\n 'description' => 'Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla. Quisque arcu libero, rutrum ac, lobortis vel, dapibus at, diam.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '66.00',\n 'selling_price' => '215.79',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 101 =>\n array(\n 'id' => 102,\n 'upc_ean_isbn' => '397482712-9',\n 'item_name' => 'Kellogs Special K Cereal',\n 'size' => '3XL',\n 'description' => 'Aenean lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '70.66',\n 'selling_price' => '243.74',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 102 =>\n array(\n 'id' => 103,\n 'upc_ean_isbn' => '203707020-9',\n 'item_name' => 'Wine - Clavet Saint Emilion',\n 'size' => '2XL',\n 'description' => 'Etiam pretium iaculis justo. In hac habitasse platea dictumst.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '96.49',\n 'selling_price' => '260.76',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 103 =>\n array(\n 'id' => 104,\n 'upc_ean_isbn' => '103895066-X',\n 'item_name' => 'Liners - Baking Cups',\n 'size' => 'S',\n 'description' => 'Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '22.14',\n 'selling_price' => '237.84',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 104 =>\n array(\n 'id' => 105,\n 'upc_ean_isbn' => '609643447-9',\n 'item_name' => 'Snails - Large Canned',\n 'size' => 'XL',\n 'description' => 'Vivamus in felis eu sapien cursus vestibulum. Proin eu mi. Nulla ac enim. In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem. Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '85.39',\n 'selling_price' => '279.08',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 105 =>\n array(\n 'id' => 106,\n 'upc_ean_isbn' => '833157260-2',\n 'item_name' => 'Compound - Pear',\n 'size' => '2XL',\n 'description' => 'Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '52.65',\n 'selling_price' => '286.58',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 106 =>\n array(\n 'id' => 107,\n 'upc_ean_isbn' => '963198014-6',\n 'item_name' => 'Cookie Chocolate Chip With',\n 'size' => 'XS',\n 'description' => 'Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '97.68',\n 'selling_price' => '239.36',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 107 =>\n array(\n 'id' => 108,\n 'upc_ean_isbn' => '949621923-3',\n 'item_name' => 'Bread - Granary Small Pull',\n 'size' => 'L',\n 'description' => 'Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '99.90',\n 'selling_price' => '231.44',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 108 =>\n array(\n 'id' => 109,\n 'upc_ean_isbn' => '080019060-2',\n 'item_name' => 'Marzipan 50/50',\n 'size' => '3XL',\n 'description' => 'In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '36.38',\n 'selling_price' => '276.68',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 109 =>\n array(\n 'id' => 110,\n 'upc_ean_isbn' => '719137708-9',\n 'item_name' => 'Soup - Campbells - Chicken Noodle',\n 'size' => '2XL',\n 'description' => 'Phasellus in felis. Donec semper sapien a libero.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '34.11',\n 'selling_price' => '243.92',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 110 =>\n array(\n 'id' => 111,\n 'upc_ean_isbn' => '711426462-3',\n 'item_name' => 'Pop - Club Soda Can',\n 'size' => 'XL',\n 'description' => 'Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '20.83',\n 'selling_price' => '236.54',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 111 =>\n array(\n 'id' => 112,\n 'upc_ean_isbn' => '789819196-X',\n 'item_name' => 'Pike - Frozen Fillet',\n 'size' => '3XL',\n 'description' => 'Aenean sit amet justo. Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '61.51',\n 'selling_price' => '244.11',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 112 =>\n array(\n 'id' => 113,\n 'upc_ean_isbn' => '218906285-3',\n 'item_name' => 'Island Oasis - Ice Cream Mix',\n 'size' => 'XS',\n 'description' => 'Pellentesque at nulla. Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '79.67',\n 'selling_price' => '209.41',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 113 =>\n array(\n 'id' => 114,\n 'upc_ean_isbn' => '571658679-1',\n 'item_name' => 'Cheese - St. Andre',\n 'size' => '2XL',\n 'description' => 'Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl. Nunc nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '88.63',\n 'selling_price' => '211.16',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 114 =>\n array(\n 'id' => 115,\n 'upc_ean_isbn' => '084890990-9',\n 'item_name' => 'Bagel - Plain',\n 'size' => 'L',\n 'description' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '76.84',\n 'selling_price' => '233.11',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 115 =>\n array(\n 'id' => 116,\n 'upc_ean_isbn' => '922162165-0',\n 'item_name' => 'Corn Kernels - Frozen',\n 'size' => 'M',\n 'description' => 'Sed sagittis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '53.14',\n 'selling_price' => '227.67',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:29',\n 'updated_at' => '2018-01-17 19:40:29',\n ),\n 116 =>\n array(\n 'id' => 117,\n 'upc_ean_isbn' => '818333771-6',\n 'item_name' => 'Crush - Grape, 355 Ml',\n 'size' => 'XS',\n 'description' => 'Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '45.06',\n 'selling_price' => '270.35',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 117 =>\n array(\n 'id' => 118,\n 'upc_ean_isbn' => '651557101-1',\n 'item_name' => 'Beans - Yellow',\n 'size' => '3XL',\n 'description' => 'Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '63.09',\n 'selling_price' => '235.08',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 118 =>\n array(\n 'id' => 119,\n 'upc_ean_isbn' => '779392065-1',\n 'item_name' => 'Veal - Sweetbread',\n 'size' => 'S',\n 'description' => 'Suspendisse potenti. Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet. Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis. Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '40.22',\n 'selling_price' => '273.35',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 119 =>\n array(\n 'id' => 120,\n 'upc_ean_isbn' => '453969097-3',\n 'item_name' => 'Sterno - Chafing Dish Fuel',\n 'size' => '2XL',\n 'description' => 'Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '47.43',\n 'selling_price' => '238.97',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 120 =>\n array(\n 'id' => 121,\n 'upc_ean_isbn' => '165344621-8',\n 'item_name' => 'Pan Grease',\n 'size' => 'S',\n 'description' => 'Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus. Phasellus in felis. Donec semper sapien a libero.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '45.96',\n 'selling_price' => '239.80',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 121 =>\n array(\n 'id' => 122,\n 'upc_ean_isbn' => '710599596-3',\n 'item_name' => 'Cleaner - Lime Away',\n 'size' => 'S',\n 'description' => 'Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '3.06',\n 'selling_price' => '247.59',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 122 =>\n array(\n 'id' => 123,\n 'upc_ean_isbn' => '398185096-3',\n 'item_name' => 'Danishes - Mini Raspberry',\n 'size' => 'L',\n 'description' => 'Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '70.00',\n 'selling_price' => '274.55',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 123 =>\n array(\n 'id' => 124,\n 'upc_ean_isbn' => '553743712-0',\n 'item_name' => 'Avocado',\n 'size' => 'XL',\n 'description' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '40.69',\n 'selling_price' => '285.37',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 124 =>\n array(\n 'id' => 125,\n 'upc_ean_isbn' => '562634768-2',\n 'item_name' => 'Ecolab Digiclean Mild Fm',\n 'size' => 'L',\n 'description' => 'Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '74.57',\n 'selling_price' => '235.69',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 125 =>\n array(\n 'id' => 126,\n 'upc_ean_isbn' => '910006093-3',\n 'item_name' => 'Gelatine Leaves - Bulk',\n 'size' => 'M',\n 'description' => 'Aliquam quis turpis eget elit sodales scelerisque. Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '68.01',\n 'selling_price' => '274.02',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 126 =>\n array(\n 'id' => 127,\n 'upc_ean_isbn' => '398951337-0',\n 'item_name' => 'Garlic - Elephant',\n 'size' => 'XL',\n 'description' => 'In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '33.32',\n 'selling_price' => '286.57',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 127 =>\n array(\n 'id' => 128,\n 'upc_ean_isbn' => '453891792-3',\n 'item_name' => 'Food Colouring - Red',\n 'size' => 'M',\n 'description' => 'Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '49.16',\n 'selling_price' => '287.76',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 128 =>\n array(\n 'id' => 129,\n 'upc_ean_isbn' => '749578103-3',\n 'item_name' => 'Chicken - Leg / Back Attach',\n 'size' => '2XL',\n 'description' => 'Etiam justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '46.01',\n 'selling_price' => '257.38',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 129 =>\n array(\n 'id' => 130,\n 'upc_ean_isbn' => '236010055-6',\n 'item_name' => 'Coffee - Flavoured',\n 'size' => 'S',\n 'description' => 'Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi. Integer ac neque. Duis bibendum. Morbi non quam nec dui luctus rutrum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '7.70',\n 'selling_price' => '283.23',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 130 =>\n array(\n 'id' => 131,\n 'upc_ean_isbn' => '818973791-0',\n 'item_name' => 'Potatoes - Yukon Gold, 80 Ct',\n 'size' => 'S',\n 'description' => 'Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '64.08',\n 'selling_price' => '245.81',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 131 =>\n array(\n 'id' => 132,\n 'upc_ean_isbn' => '781063862-9',\n 'item_name' => 'Salmon Steak - Cohoe 6 Oz',\n 'size' => 'M',\n 'description' => 'Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti. Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '42.75',\n 'selling_price' => '214.96',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 132 =>\n array(\n 'id' => 133,\n 'upc_ean_isbn' => '312443823-X',\n 'item_name' => 'Wine - Tribal Sauvignon',\n 'size' => 'S',\n 'description' => 'Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo. Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '18.34',\n 'selling_price' => '223.62',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 133 =>\n array(\n 'id' => 134,\n 'upc_ean_isbn' => '046350910-2',\n 'item_name' => 'Swordfish Loin Portions',\n 'size' => '3XL',\n 'description' => 'Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '92.75',\n 'selling_price' => '281.53',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 134 =>\n array(\n 'id' => 135,\n 'upc_ean_isbn' => '018164987-X',\n 'item_name' => 'Milk - Homo',\n 'size' => 'XL',\n 'description' => 'Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '57.36',\n 'selling_price' => '267.72',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 135 =>\n array(\n 'id' => 136,\n 'upc_ean_isbn' => '240889380-1',\n 'item_name' => 'Cookie Dough - Chocolate Chip',\n 'size' => '3XL',\n 'description' => 'Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '64.90',\n 'selling_price' => '268.31',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 136 =>\n array(\n 'id' => 137,\n 'upc_ean_isbn' => '682418469-1',\n 'item_name' => 'Cod - Fillets',\n 'size' => 'XL',\n 'description' => 'Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '66.85',\n 'selling_price' => '239.16',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 137 =>\n array(\n 'id' => 138,\n 'upc_ean_isbn' => '220200298-7',\n 'item_name' => 'Emulsifier',\n 'size' => 'XS',\n 'description' => 'Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero. Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '68.85',\n 'selling_price' => '298.00',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:30',\n 'updated_at' => '2018-01-17 19:40:30',\n ),\n 138 =>\n array(\n 'id' => 139,\n 'upc_ean_isbn' => '117249661-7',\n 'item_name' => 'Rice - Brown',\n 'size' => 'XS',\n 'description' => 'Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '58.64',\n 'selling_price' => '253.95',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 139 =>\n array(\n 'id' => 140,\n 'upc_ean_isbn' => '696552625-4',\n 'item_name' => 'Beef - Top Butt Aaa',\n 'size' => '2XL',\n 'description' => 'Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '18.93',\n 'selling_price' => '278.61',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 140 =>\n array(\n 'id' => 141,\n 'upc_ean_isbn' => '263767929-8',\n 'item_name' => 'Coffee - Decafenated',\n 'size' => 'S',\n 'description' => 'In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '67.16',\n 'selling_price' => '214.08',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 141 =>\n array(\n 'id' => 142,\n 'upc_ean_isbn' => '135504436-7',\n 'item_name' => 'Sauce Tomato Pouch',\n 'size' => 'S',\n 'description' => 'Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus. Phasellus in felis. Donec semper sapien a libero. Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '31.83',\n 'selling_price' => '269.97',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 142 =>\n array(\n 'id' => 143,\n 'upc_ean_isbn' => '170280060-1',\n 'item_name' => 'Cookie Dough - Double',\n 'size' => 'XS',\n 'description' => 'Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti. Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '27.61',\n 'selling_price' => '252.16',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 143 =>\n array(\n 'id' => 144,\n 'upc_ean_isbn' => '766380571-2',\n 'item_name' => 'Versatainer Nc - 9388',\n 'size' => 'L',\n 'description' => 'Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '77.68',\n 'selling_price' => '223.76',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 144 =>\n array(\n 'id' => 145,\n 'upc_ean_isbn' => '170405955-0',\n 'item_name' => 'Sprite - 355 Ml',\n 'size' => '3XL',\n 'description' => 'Sed vel enim sit amet nunc viverra dapibus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '14.74',\n 'selling_price' => '270.12',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 145 =>\n array(\n 'id' => 146,\n 'upc_ean_isbn' => '338070273-0',\n 'item_name' => 'Beef - Outside, Round',\n 'size' => 'XS',\n 'description' => 'Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '85.01',\n 'selling_price' => '210.97',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 146 =>\n array(\n 'id' => 147,\n 'upc_ean_isbn' => '756445045-2',\n 'item_name' => 'Jam - Raspberry,jar',\n 'size' => 'M',\n 'description' => 'Pellentesque at nulla. Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '18.73',\n 'selling_price' => '257.86',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 147 =>\n array(\n 'id' => 148,\n 'upc_ean_isbn' => '322862969-4',\n 'item_name' => 'Pork Loin Cutlets',\n 'size' => 'M',\n 'description' => 'Curabitur at ipsum ac tellus semper interdum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '23.25',\n 'selling_price' => '272.36',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 148 =>\n array(\n 'id' => 149,\n 'upc_ean_isbn' => '720821606-1',\n 'item_name' => 'Appetizer - Asian Shrimp Roll',\n 'size' => 'S',\n 'description' => 'In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem. Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy. Integer non velit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '63.08',\n 'selling_price' => '214.56',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 149 =>\n array(\n 'id' => 150,\n 'upc_ean_isbn' => '892479776-X',\n 'item_name' => 'V8 - Vegetable Cocktail',\n 'size' => 'M',\n 'description' => 'Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '83.55',\n 'selling_price' => '227.88',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 150 =>\n array(\n 'id' => 151,\n 'upc_ean_isbn' => '587381624-7',\n 'item_name' => 'Cheese - Victor Et Berthold',\n 'size' => 'L',\n 'description' => 'Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '96.00',\n 'selling_price' => '219.81',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 151 =>\n array(\n 'id' => 152,\n 'upc_ean_isbn' => '878838461-6',\n 'item_name' => 'Rye Special Old',\n 'size' => '3XL',\n 'description' => 'Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '41.37',\n 'selling_price' => '292.50',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 152 =>\n array(\n 'id' => 153,\n 'upc_ean_isbn' => '973298029-X',\n 'item_name' => 'Wine - George Duboeuf Rose',\n 'size' => 'M',\n 'description' => 'Donec semper sapien a libero. Nam dui.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '82.72',\n 'selling_price' => '296.16',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 153 =>\n array(\n 'id' => 154,\n 'upc_ean_isbn' => '551739922-3',\n 'item_name' => 'Saskatoon Berries - Frozen',\n 'size' => '2XL',\n 'description' => 'Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '25.82',\n 'selling_price' => '251.88',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 154 =>\n array(\n 'id' => 155,\n 'upc_ean_isbn' => '723049064-2',\n 'item_name' => 'Paper Cocktail Umberlla 80 - 180',\n 'size' => '2XL',\n 'description' => 'Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '14.82',\n 'selling_price' => '228.07',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 155 =>\n array(\n 'id' => 156,\n 'upc_ean_isbn' => '364177605-8',\n 'item_name' => 'Glove - Cutting',\n 'size' => '3XL',\n 'description' => 'Duis bibendum. Morbi non quam nec dui luctus rutrum. Nulla tellus. In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '28.60',\n 'selling_price' => '224.65',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 156 =>\n array(\n 'id' => 157,\n 'upc_ean_isbn' => '385062317-3',\n 'item_name' => 'Capicola - Hot',\n 'size' => 'XL',\n 'description' => 'Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero. Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '66.15',\n 'selling_price' => '204.04',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 157 =>\n array(\n 'id' => 158,\n 'upc_ean_isbn' => '389600844-7',\n 'item_name' => 'Vermouth - White, Cinzano',\n 'size' => '3XL',\n 'description' => 'Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus. Phasellus in felis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '86.25',\n 'selling_price' => '288.39',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 158 =>\n array(\n 'id' => 159,\n 'upc_ean_isbn' => '407301894-9',\n 'item_name' => 'Sprouts - Peppercress',\n 'size' => 'XL',\n 'description' => 'Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '73.11',\n 'selling_price' => '238.44',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 159 =>\n array(\n 'id' => 160,\n 'upc_ean_isbn' => '233292881-2',\n 'item_name' => 'Scallops 60/80 Iqf',\n 'size' => 'S',\n 'description' => 'Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '11.18',\n 'selling_price' => '200.66',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 160 =>\n array(\n 'id' => 161,\n 'upc_ean_isbn' => '349001163-5',\n 'item_name' => 'Syrup - Monin - Blue Curacao',\n 'size' => 'M',\n 'description' => 'Nullam varius. Nulla facilisi.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '77.03',\n 'selling_price' => '233.58',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 161 =>\n array(\n 'id' => 162,\n 'upc_ean_isbn' => '639028441-1',\n 'item_name' => 'Duck - Breast',\n 'size' => 'L',\n 'description' => 'Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '17.59',\n 'selling_price' => '290.06',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 162 =>\n array(\n 'id' => 163,\n 'upc_ean_isbn' => '604431458-8',\n 'item_name' => 'Skewers - Bamboo',\n 'size' => 'S',\n 'description' => 'Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '19.34',\n 'selling_price' => '262.83',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 163 =>\n array(\n 'id' => 164,\n 'upc_ean_isbn' => '645212178-2',\n 'item_name' => 'Beef - Shank',\n 'size' => 'XS',\n 'description' => 'Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus. Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '98.19',\n 'selling_price' => '213.45',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:31',\n 'updated_at' => '2018-01-17 19:40:31',\n ),\n 164 =>\n array(\n 'id' => 165,\n 'upc_ean_isbn' => '985480662-6',\n 'item_name' => 'Ecolab - Hobart Upr Prewash Arm',\n 'size' => 'S',\n 'description' => 'Proin eu mi. Nulla ac enim. In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem. Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy. Integer non velit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '65.94',\n 'selling_price' => '279.98',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 165 =>\n array(\n 'id' => 166,\n 'upc_ean_isbn' => '362670192-1',\n 'item_name' => 'Mix - Cocktail Strawberry Daiquiri',\n 'size' => '2XL',\n 'description' => 'In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '11.06',\n 'selling_price' => '271.25',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 166 =>\n array(\n 'id' => 167,\n 'upc_ean_isbn' => '680129147-5',\n 'item_name' => 'Lamb - Sausage Casings',\n 'size' => '3XL',\n 'description' => 'Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '30.26',\n 'selling_price' => '224.47',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 167 =>\n array(\n 'id' => 168,\n 'upc_ean_isbn' => '048653731-5',\n 'item_name' => 'Cheese - Grie Des Champ',\n 'size' => 'S',\n 'description' => 'Duis ac nibh.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '85.28',\n 'selling_price' => '224.39',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 168 =>\n array(\n 'id' => 169,\n 'upc_ean_isbn' => '914341575-X',\n 'item_name' => 'Soupfoamcont12oz 112con',\n 'size' => 'S',\n 'description' => 'Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '82.70',\n 'selling_price' => '225.99',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 169 =>\n array(\n 'id' => 170,\n 'upc_ean_isbn' => '480030871-2',\n 'item_name' => 'Pie Filling - Cherry',\n 'size' => '2XL',\n 'description' => 'Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '36.83',\n 'selling_price' => '279.46',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 170 =>\n array(\n 'id' => 171,\n 'upc_ean_isbn' => '164093294-1',\n 'item_name' => 'Juice - Ocean Spray Cranberry',\n 'size' => '2XL',\n 'description' => 'Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo. Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '82.02',\n 'selling_price' => '285.58',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 171 =>\n array(\n 'id' => 172,\n 'upc_ean_isbn' => '890314421-X',\n 'item_name' => 'Chicken - White Meat With Tender',\n 'size' => 'XS',\n 'description' => 'Nunc rhoncus dui vel sem. Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '94.55',\n 'selling_price' => '267.80',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 172 =>\n array(\n 'id' => 173,\n 'upc_ean_isbn' => '188453092-3',\n 'item_name' => 'Radish',\n 'size' => 'L',\n 'description' => 'Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '57.67',\n 'selling_price' => '285.96',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 173 =>\n array(\n 'id' => 174,\n 'upc_ean_isbn' => '379236655-X',\n 'item_name' => 'Mushroom - Porcini Frozen',\n 'size' => 'M',\n 'description' => 'Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '59.14',\n 'selling_price' => '260.98',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 174 =>\n array(\n 'id' => 175,\n 'upc_ean_isbn' => '678093705-3',\n 'item_name' => 'Nut - Pistachio, Shelled',\n 'size' => '2XL',\n 'description' => 'Duis at velit eu est congue elementum. In hac habitasse platea dictumst. Morbi vestibulum, velit id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien placerat ante. Nulla justo. Aliquam quis turpis eget elit sodales scelerisque. Mauris sit amet eros. Suspendisse accumsan tortor quis turpis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '19.74',\n 'selling_price' => '231.06',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 175 =>\n array(\n 'id' => 177,\n 'upc_ean_isbn' => '846226634-3',\n 'item_name' => 'Table Cloth 120 Round White',\n 'size' => 'XS',\n 'description' => 'Nunc rhoncus dui vel sem. Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '40.73',\n 'selling_price' => '277.91',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 176 =>\n array(\n 'id' => 179,\n 'upc_ean_isbn' => '532455094-9',\n 'item_name' => 'Mushroom - White Button',\n 'size' => '2XL',\n 'description' => 'Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '77.25',\n 'selling_price' => '251.60',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 177 =>\n array(\n 'id' => 180,\n 'upc_ean_isbn' => '609152513-1',\n 'item_name' => 'Wine - Alicanca Vinho Verde',\n 'size' => 'S',\n 'description' => 'Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '70.10',\n 'selling_price' => '237.83',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 178 =>\n array(\n 'id' => 181,\n 'upc_ean_isbn' => '685788712-8',\n 'item_name' => 'Cheese - Bakers Cream Cheese',\n 'size' => 'XL',\n 'description' => 'In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '88.37',\n 'selling_price' => '219.75',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 179 =>\n array(\n 'id' => 182,\n 'upc_ean_isbn' => '671103433-3',\n 'item_name' => 'Trueblue - Blueberry',\n 'size' => 'XL',\n 'description' => 'Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '37.45',\n 'selling_price' => '250.22',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 180 =>\n array(\n 'id' => 183,\n 'upc_ean_isbn' => '154269455-8',\n 'item_name' => 'Bread - White, Unsliced',\n 'size' => '2XL',\n 'description' => 'Morbi a ipsum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '93.39',\n 'selling_price' => '255.40',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 181 =>\n array(\n 'id' => 184,\n 'upc_ean_isbn' => '455315381-5',\n 'item_name' => 'Muffin Mix - Oatmeal',\n 'size' => 'M',\n 'description' => 'Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '67.11',\n 'selling_price' => '207.51',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 182 =>\n array(\n 'id' => 185,\n 'upc_ean_isbn' => '913709206-5',\n 'item_name' => 'Kiwi',\n 'size' => '3XL',\n 'description' => 'Aliquam erat volutpat. In congue. Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '91.22',\n 'selling_price' => '279.44',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 183 =>\n array(\n 'id' => 187,\n 'upc_ean_isbn' => '987478209-9',\n 'item_name' => 'Beef - Tenderloin Tails',\n 'size' => '2XL',\n 'description' => 'Quisque id justo sit amet sapien dignissim vestibulum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '43.78',\n 'selling_price' => '298.40',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 184 =>\n array(\n 'id' => 189,\n 'upc_ean_isbn' => '282103831-3',\n 'item_name' => 'Cookie Choc',\n 'size' => 'XL',\n 'description' => 'Mauris lacinia sapien quis libero. Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '31.30',\n 'selling_price' => '258.78',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:32',\n 'updated_at' => '2018-01-17 19:40:32',\n ),\n 185 =>\n array(\n 'id' => 192,\n 'upc_ean_isbn' => '481308380-3',\n 'item_name' => 'Squid - Breaded',\n 'size' => 'XS',\n 'description' => 'In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt. Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '59.51',\n 'selling_price' => '257.92',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 186 =>\n array(\n 'id' => 193,\n 'upc_ean_isbn' => '598175152-5',\n 'item_name' => 'Soup - Campbells Bean Medley',\n 'size' => '2XL',\n 'description' => 'Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '32.68',\n 'selling_price' => '291.93',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 187 =>\n array(\n 'id' => 194,\n 'upc_ean_isbn' => '393015205-3',\n 'item_name' => 'Chevere Logs',\n 'size' => 'M',\n 'description' => 'Nullam molestie nibh in lectus. Pellentesque at nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '45.96',\n 'selling_price' => '236.65',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 188 =>\n array(\n 'id' => 195,\n 'upc_ean_isbn' => '945666849-5',\n 'item_name' => 'Fish - Base, Bouillion',\n 'size' => 'XS',\n 'description' => 'Fusce consequat. Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '91.54',\n 'selling_price' => '220.57',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 189 =>\n array(\n 'id' => 197,\n 'upc_ean_isbn' => '969982940-0',\n 'item_name' => 'Cherries - Fresh',\n 'size' => 'S',\n 'description' => 'Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat. In congue. Etiam justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '8.71',\n 'selling_price' => '220.27',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 190 =>\n array(\n 'id' => 198,\n 'upc_ean_isbn' => '104405742-4',\n 'item_name' => 'Icecream - Dibs',\n 'size' => '2XL',\n 'description' => 'Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '67.67',\n 'selling_price' => '272.45',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 191 =>\n array(\n 'id' => 199,\n 'upc_ean_isbn' => '358957337-6',\n 'item_name' => 'Sobe - Orange Carrot',\n 'size' => '2XL',\n 'description' => 'Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '54.32',\n 'selling_price' => '291.97',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 192 =>\n array(\n 'id' => 200,\n 'upc_ean_isbn' => '449335486-0',\n 'item_name' => 'Salt - Table',\n 'size' => 'S',\n 'description' => 'Maecenas pulvinar lobortis est. Phasellus sit amet erat. Nulla tempus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '9.33',\n 'selling_price' => '297.69',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 193 =>\n array(\n 'id' => 201,\n 'upc_ean_isbn' => '230874530-4',\n 'item_name' => 'Turkey - Whole, Fresh',\n 'size' => 'M',\n 'description' => 'Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '23.17',\n 'selling_price' => '273.38',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 194 =>\n array(\n 'id' => 202,\n 'upc_ean_isbn' => '451273648-4',\n 'item_name' => 'Pineapple - Regular',\n 'size' => '2XL',\n 'description' => 'In hac habitasse platea dictumst.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '75.75',\n 'selling_price' => '288.87',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 195 =>\n array(\n 'id' => 203,\n 'upc_ean_isbn' => '695958472-8',\n 'item_name' => 'Triple Sec - Mcguinness',\n 'size' => 'L',\n 'description' => 'Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '1.49',\n 'selling_price' => '255.73',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 196 =>\n array(\n 'id' => 204,\n 'upc_ean_isbn' => '054414198-9',\n 'item_name' => 'Juice - Apple, 500 Ml',\n 'size' => 'XL',\n 'description' => 'Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus. Phasellus in felis. Donec semper sapien a libero. Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '7.67',\n 'selling_price' => '244.34',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 197 =>\n array(\n 'id' => 205,\n 'upc_ean_isbn' => '850843813-3',\n 'item_name' => 'Bag Clear 10 Lb',\n 'size' => 'S',\n 'description' => 'Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla. Quisque arcu libero, rutrum ac, lobortis vel, dapibus at, diam. Nam tristique tortor eu pede.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '28.42',\n 'selling_price' => '245.98',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 198 =>\n array(\n 'id' => 206,\n 'upc_ean_isbn' => '012275862-5',\n 'item_name' => 'Onions - Vidalia',\n 'size' => 'M',\n 'description' => 'Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat. In congue. Etiam justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '24.60',\n 'selling_price' => '288.96',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 199 =>\n array(\n 'id' => 207,\n 'upc_ean_isbn' => '547730424-3',\n 'item_name' => 'Tart Shells - Barquettes, Savory',\n 'size' => '3XL',\n 'description' => 'Pellentesque ultrices mattis odio.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '39.66',\n 'selling_price' => '210.20',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 200 =>\n array(\n 'id' => 208,\n 'upc_ean_isbn' => '127951402-7',\n 'item_name' => 'Coconut - Shredded, Sweet',\n 'size' => 'XS',\n 'description' => 'Ut tellus. Nulla ut erat id mauris vulputate elementum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '4.93',\n 'selling_price' => '295.42',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 201 =>\n array(\n 'id' => 209,\n 'upc_ean_isbn' => '833189149-X',\n 'item_name' => 'Vodka - Smirnoff',\n 'size' => 'L',\n 'description' => 'Vestibulum rutrum rutrum neque. Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo. Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '18.29',\n 'selling_price' => '225.41',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 202 =>\n array(\n 'id' => 210,\n 'upc_ean_isbn' => '806407699-4',\n 'item_name' => 'Raspberries - Frozen',\n 'size' => '3XL',\n 'description' => 'Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '34.80',\n 'selling_price' => '277.63',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 203 =>\n array(\n 'id' => 211,\n 'upc_ean_isbn' => '819913819-X',\n 'item_name' => 'Food Colouring - Green',\n 'size' => 'XL',\n 'description' => 'Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '22.27',\n 'selling_price' => '242.61',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 204 =>\n array(\n 'id' => 212,\n 'upc_ean_isbn' => '639663129-6',\n 'item_name' => 'Syrup - Monin - Granny Smith',\n 'size' => '3XL',\n 'description' => 'Duis aliquam convallis nunc.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '67.27',\n 'selling_price' => '202.81',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 205 =>\n array(\n 'id' => 213,\n 'upc_ean_isbn' => '590466852-X',\n 'item_name' => 'Pork - Smoked Back Bacon',\n 'size' => '3XL',\n 'description' => 'Phasellus sit amet erat. Nulla tempus. Vivamus in felis eu sapien cursus vestibulum. Proin eu mi.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '63.10',\n 'selling_price' => '220.33',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:33',\n 'updated_at' => '2018-01-17 19:40:33',\n ),\n 206 =>\n array(\n 'id' => 214,\n 'upc_ean_isbn' => '537627406-3',\n 'item_name' => 'Arizona - Green Tea',\n 'size' => 'L',\n 'description' => 'Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '77.17',\n 'selling_price' => '226.89',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 207 =>\n array(\n 'id' => 215,\n 'upc_ean_isbn' => '071386953-4',\n 'item_name' => 'Pasta - Rotini, Dry',\n 'size' => 'L',\n 'description' => 'In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem. Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '25.77',\n 'selling_price' => '294.00',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 208 =>\n array(\n 'id' => 216,\n 'upc_ean_isbn' => '340946005-5',\n 'item_name' => 'Hand Towel',\n 'size' => 'XL',\n 'description' => 'Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '96.86',\n 'selling_price' => '279.80',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 209 =>\n array(\n 'id' => 217,\n 'upc_ean_isbn' => '081429371-9',\n 'item_name' => 'Cheese - Cheddar, Old White',\n 'size' => 'L',\n 'description' => 'Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '62.87',\n 'selling_price' => '294.34',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 210 =>\n array(\n 'id' => 219,\n 'upc_ean_isbn' => '434643430-4',\n 'item_name' => 'Wine - Crozes Hermitage E.',\n 'size' => 'L',\n 'description' => 'Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '4.40',\n 'selling_price' => '259.59',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 211 =>\n array(\n 'id' => 222,\n 'upc_ean_isbn' => '318154904-5',\n 'item_name' => 'Cake - Cheese Cake 9 Inch',\n 'size' => 'L',\n 'description' => 'Nulla tellus. In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '39.42',\n 'selling_price' => '257.71',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 212 =>\n array(\n 'id' => 223,\n 'upc_ean_isbn' => '841411191-2',\n 'item_name' => 'Steampan - Half Size Shallow',\n 'size' => '2XL',\n 'description' => 'Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '27.37',\n 'selling_price' => '264.82',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 213 =>\n array(\n 'id' => 224,\n 'upc_ean_isbn' => '729253855-X',\n 'item_name' => 'Myers Planters Punch',\n 'size' => 'XL',\n 'description' => 'Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est. Phasellus sit amet erat. Nulla tempus. Vivamus in felis eu sapien cursus vestibulum. Proin eu mi. Nulla ac enim. In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem. Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '35.43',\n 'selling_price' => '233.45',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 214 =>\n array(\n 'id' => 225,\n 'upc_ean_isbn' => '132632349-0',\n 'item_name' => 'Salmon Atl.whole 8 - 10 Lb',\n 'size' => 'M',\n 'description' => 'Ut at dolor quis odio consequat varius. Integer ac leo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '49.16',\n 'selling_price' => '267.08',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 215 =>\n array(\n 'id' => 226,\n 'upc_ean_isbn' => '267763257-8',\n 'item_name' => 'Lamb Tenderloin Nz Fr',\n 'size' => 'S',\n 'description' => 'Nam nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '54.34',\n 'selling_price' => '297.68',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 216 =>\n array(\n 'id' => 227,\n 'upc_ean_isbn' => '929832124-4',\n 'item_name' => 'Tumeric',\n 'size' => 'L',\n 'description' => 'Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '5.94',\n 'selling_price' => '229.56',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 217 =>\n array(\n 'id' => 228,\n 'upc_ean_isbn' => '203889233-4',\n 'item_name' => 'Pastry - Cherry Danish - Mini',\n 'size' => '2XL',\n 'description' => 'Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt. Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '7.76',\n 'selling_price' => '249.45',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 218 =>\n array(\n 'id' => 230,\n 'upc_ean_isbn' => '157588456-9',\n 'item_name' => 'Wine - Champagne Brut Veuve',\n 'size' => 'S',\n 'description' => 'Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '97.06',\n 'selling_price' => '210.06',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 219 =>\n array(\n 'id' => 232,\n 'upc_ean_isbn' => '727311148-1',\n 'item_name' => 'Beets - Pickled',\n 'size' => 'L',\n 'description' => 'Maecenas ut massa quis augue luctus tincidunt. Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '30.77',\n 'selling_price' => '261.24',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:34',\n 'updated_at' => '2018-01-17 19:40:34',\n ),\n 220 =>\n array(\n 'id' => 233,\n 'upc_ean_isbn' => '710986345-X',\n 'item_name' => 'Muffin Puck Ww Carrot',\n 'size' => '3XL',\n 'description' => 'Vivamus in felis eu sapien cursus vestibulum. Proin eu mi.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '50.08',\n 'selling_price' => '226.78',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 221 =>\n array(\n 'id' => 234,\n 'upc_ean_isbn' => '274523597-4',\n 'item_name' => 'Sugar - Brown, Individual',\n 'size' => 'XL',\n 'description' => 'Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '25.15',\n 'selling_price' => '258.25',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 222 =>\n array(\n 'id' => 235,\n 'upc_ean_isbn' => '287936548-1',\n 'item_name' => 'Laundry - Bag Cloth',\n 'size' => 'XL',\n 'description' => 'Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi. Integer ac neque. Duis bibendum. Morbi non quam nec dui luctus rutrum. Nulla tellus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '19.56',\n 'selling_price' => '242.24',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 223 =>\n array(\n 'id' => 236,\n 'upc_ean_isbn' => '731246858-6',\n 'item_name' => 'Chocolate - White',\n 'size' => 'M',\n 'description' => 'In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt. Nulla mollis molestie lorem. Quisque ut erat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '54.24',\n 'selling_price' => '227.25',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 224 =>\n array(\n 'id' => 237,\n 'upc_ean_isbn' => '579717826-5',\n 'item_name' => 'Mustard - Pommery',\n 'size' => 'M',\n 'description' => 'Proin risus. Praesent lectus. Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '92.59',\n 'selling_price' => '226.47',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 225 =>\n array(\n 'id' => 238,\n 'upc_ean_isbn' => '837139292-3',\n 'item_name' => 'Shark - Loin',\n 'size' => 'L',\n 'description' => 'Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '33.12',\n 'selling_price' => '281.77',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 226 =>\n array(\n 'id' => 239,\n 'upc_ean_isbn' => '517176654-1',\n 'item_name' => 'Pears - Bosc',\n 'size' => '3XL',\n 'description' => 'In hac habitasse platea dictumst. Morbi vestibulum, velit id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien placerat ante. Nulla justo. Aliquam quis turpis eget elit sodales scelerisque. Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '18.71',\n 'selling_price' => '244.17',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 227 =>\n array(\n 'id' => 240,\n 'upc_ean_isbn' => '140278267-5',\n 'item_name' => 'Nantucket Apple Juice',\n 'size' => '2XL',\n 'description' => 'Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet. Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis. Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '58.75',\n 'selling_price' => '234.86',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 228 =>\n array(\n 'id' => 241,\n 'upc_ean_isbn' => '562291911-8',\n 'item_name' => 'Bread - Calabrese Baguette',\n 'size' => 'S',\n 'description' => 'Donec posuere metus vitae ipsum. Aliquam non mauris.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '70.14',\n 'selling_price' => '241.89',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 229 =>\n array(\n 'id' => 243,\n 'upc_ean_isbn' => '341285048-9',\n 'item_name' => 'Hickory Smoke, Liquid',\n 'size' => 'M',\n 'description' => 'Integer ac neque. Duis bibendum. Morbi non quam nec dui luctus rutrum. Nulla tellus. In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '59.49',\n 'selling_price' => '208.24',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 230 =>\n array(\n 'id' => 244,\n 'upc_ean_isbn' => '531540155-3',\n 'item_name' => 'Lettuce - Boston Bib',\n 'size' => '2XL',\n 'description' => 'Duis at velit eu est congue elementum. In hac habitasse platea dictumst. Morbi vestibulum, velit id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien placerat ante. Nulla justo. Aliquam quis turpis eget elit sodales scelerisque. Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '70.31',\n 'selling_price' => '242.96',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 231 =>\n array(\n 'id' => 245,\n 'upc_ean_isbn' => '262025969-X',\n 'item_name' => 'Coconut - Shredded, Unsweet',\n 'size' => 'L',\n 'description' => 'Maecenas pulvinar lobortis est. Phasellus sit amet erat. Nulla tempus. Vivamus in felis eu sapien cursus vestibulum. Proin eu mi. Nulla ac enim. In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem. Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy. Integer non velit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '50.53',\n 'selling_price' => '263.71',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 232 =>\n array(\n 'id' => 246,\n 'upc_ean_isbn' => '067329934-1',\n 'item_name' => 'Tobasco Sauce',\n 'size' => 'XL',\n 'description' => 'Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum. Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est. Phasellus sit amet erat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '78.34',\n 'selling_price' => '291.45',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 233 =>\n array(\n 'id' => 247,\n 'upc_ean_isbn' => '780736812-8',\n 'item_name' => 'Juice - Orange, Concentrate',\n 'size' => 'XS',\n 'description' => 'Curabitur convallis. Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '54.06',\n 'selling_price' => '218.14',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 234 =>\n array(\n 'id' => 248,\n 'upc_ean_isbn' => '830489881-0',\n 'item_name' => 'Bread - Italian Corn Meal Poly',\n 'size' => 'M',\n 'description' => 'Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo. Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '5.97',\n 'selling_price' => '273.24',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 235 =>\n array(\n 'id' => 249,\n 'upc_ean_isbn' => '998992035-4',\n 'item_name' => 'Sole - Iqf',\n 'size' => '3XL',\n 'description' => 'Phasellus id sapien in sapien iaculis congue.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '50.72',\n 'selling_price' => '262.54',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 236 =>\n array(\n 'id' => 250,\n 'upc_ean_isbn' => '105684479-5',\n 'item_name' => 'Puff Pastry - Sheets',\n 'size' => 'XL',\n 'description' => 'Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt. Nulla mollis molestie lorem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '15.49',\n 'selling_price' => '240.42',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 237 =>\n array(\n 'id' => 251,\n 'upc_ean_isbn' => '403933731-X',\n 'item_name' => 'Mints - Striped Red',\n 'size' => 'S',\n 'description' => 'Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus. Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '27.14',\n 'selling_price' => '271.62',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 238 =>\n array(\n 'id' => 252,\n 'upc_ean_isbn' => '902401029-2',\n 'item_name' => 'Orange - Tangerine',\n 'size' => 'XS',\n 'description' => 'Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '50.36',\n 'selling_price' => '204.51',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 239 =>\n array(\n 'id' => 253,\n 'upc_ean_isbn' => '777161734-4',\n 'item_name' => 'Lettuce - Iceberg',\n 'size' => '2XL',\n 'description' => 'Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl. Nunc nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '98.82',\n 'selling_price' => '255.49',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 240 =>\n array(\n 'id' => 254,\n 'upc_ean_isbn' => '110668439-7',\n 'item_name' => 'Duck - Whole',\n 'size' => 'M',\n 'description' => 'Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '1.87',\n 'selling_price' => '238.06',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 241 =>\n array(\n 'id' => 255,\n 'upc_ean_isbn' => '150755960-7',\n 'item_name' => 'Bread - Roll, Italian',\n 'size' => 'S',\n 'description' => 'Aenean fermentum. Donec ut mauris eget massa tempor convallis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '38.01',\n 'selling_price' => '237.81',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 242 =>\n array(\n 'id' => 256,\n 'upc_ean_isbn' => '278484882-5',\n 'item_name' => 'Snapple - Iced Tea Peach',\n 'size' => 'M',\n 'description' => 'Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '83.64',\n 'selling_price' => '280.23',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 243 =>\n array(\n 'id' => 257,\n 'upc_ean_isbn' => '542693729-X',\n 'item_name' => 'Syrup - Kahlua Chocolate',\n 'size' => 'XL',\n 'description' => 'Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '30.33',\n 'selling_price' => '238.38',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:35',\n 'updated_at' => '2018-01-17 19:40:35',\n ),\n 244 =>\n array(\n 'id' => 258,\n 'upc_ean_isbn' => '784402168-3',\n 'item_name' => 'Pastry - French Mini Assorted',\n 'size' => 'S',\n 'description' => 'Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '73.18',\n 'selling_price' => '235.42',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 245 =>\n array(\n 'id' => 259,\n 'upc_ean_isbn' => '524411695-9',\n 'item_name' => 'Bread - Kimel Stick Poly',\n 'size' => 'XS',\n 'description' => 'Proin risus. Praesent lectus. Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '38.96',\n 'selling_price' => '219.46',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 246 =>\n array(\n 'id' => 260,\n 'upc_ean_isbn' => '561809705-2',\n 'item_name' => 'Carbonated Water - Cherry',\n 'size' => 'XL',\n 'description' => 'Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt. Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '84.21',\n 'selling_price' => '256.66',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 247 =>\n array(\n 'id' => 261,\n 'upc_ean_isbn' => '979917514-3',\n 'item_name' => 'Sultanas',\n 'size' => 'XL',\n 'description' => 'Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti. Nullam porttitor lacus at turpis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '80.63',\n 'selling_price' => '224.99',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 248 =>\n array(\n 'id' => 262,\n 'upc_ean_isbn' => '489192192-7',\n 'item_name' => 'Fireball Whisky',\n 'size' => 'M',\n 'description' => 'Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '61.99',\n 'selling_price' => '297.65',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 249 =>\n array(\n 'id' => 263,\n 'upc_ean_isbn' => '107629161-9',\n 'item_name' => 'Orange - Blood',\n 'size' => 'XS',\n 'description' => 'Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '34.68',\n 'selling_price' => '226.27',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 250 =>\n array(\n 'id' => 264,\n 'upc_ean_isbn' => '757201443-7',\n 'item_name' => 'Pepper - Black, Whole',\n 'size' => 'L',\n 'description' => 'Nam tristique tortor eu pede.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '98.08',\n 'selling_price' => '289.51',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 251 =>\n array(\n 'id' => 266,\n 'upc_ean_isbn' => '015217681-0',\n 'item_name' => 'Soup Knorr Chili With Beans',\n 'size' => 'M',\n 'description' => 'Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '62.72',\n 'selling_price' => '240.18',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 252 =>\n array(\n 'id' => 267,\n 'upc_ean_isbn' => '619216310-3',\n 'item_name' => 'Muffin - Blueberry Individual',\n 'size' => 'M',\n 'description' => 'Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '92.50',\n 'selling_price' => '206.92',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 253 =>\n array(\n 'id' => 268,\n 'upc_ean_isbn' => '133993630-5',\n 'item_name' => 'Galliano',\n 'size' => 'M',\n 'description' => 'Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '99.08',\n 'selling_price' => '230.21',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 254 =>\n array(\n 'id' => 269,\n 'upc_ean_isbn' => '325770791-6',\n 'item_name' => 'Bandage - Fexible 1x3',\n 'size' => 'XL',\n 'description' => 'Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat. In congue. Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '57.75',\n 'selling_price' => '232.21',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 255 =>\n array(\n 'id' => 270,\n 'upc_ean_isbn' => '647103426-1',\n 'item_name' => 'Muffin - Zero Transfat',\n 'size' => 'L',\n 'description' => 'Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo. Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '57.84',\n 'selling_price' => '268.25',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 256 =>\n array(\n 'id' => 271,\n 'upc_ean_isbn' => '909515995-7',\n 'item_name' => 'Burger Veggie',\n 'size' => 'M',\n 'description' => 'Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '95.49',\n 'selling_price' => '207.42',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 257 =>\n array(\n 'id' => 272,\n 'upc_ean_isbn' => '119863206-2',\n 'item_name' => 'Bag - Regular Kraft 20 Lb',\n 'size' => '2XL',\n 'description' => 'Etiam faucibus cursus urna.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '80.83',\n 'selling_price' => '249.59',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 258 =>\n array(\n 'id' => 273,\n 'upc_ean_isbn' => '136564776-5',\n 'item_name' => 'Clams - Canned',\n 'size' => 'XL',\n 'description' => 'Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo. Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '81.26',\n 'selling_price' => '298.15',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 259 =>\n array(\n 'id' => 274,\n 'upc_ean_isbn' => '314135727-7',\n 'item_name' => 'Wine - Mas Chicet Rose, Vintage',\n 'size' => '2XL',\n 'description' => 'Nulla ut erat id mauris vulputate elementum. Nullam varius.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '97.64',\n 'selling_price' => '208.90',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 260 =>\n array(\n 'id' => 275,\n 'upc_ean_isbn' => '904593073-0',\n 'item_name' => 'Cabbage - Green',\n 'size' => 'S',\n 'description' => 'Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '15.36',\n 'selling_price' => '247.29',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 261 =>\n array(\n 'id' => 276,\n 'upc_ean_isbn' => '000697487-2',\n 'item_name' => 'Chocolate - Unsweetened',\n 'size' => 'XL',\n 'description' => 'Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '22.46',\n 'selling_price' => '246.33',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 262 =>\n array(\n 'id' => 277,\n 'upc_ean_isbn' => '836450301-4',\n 'item_name' => 'Wine - Red, Gallo, Merlot',\n 'size' => 'XL',\n 'description' => 'Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '87.55',\n 'selling_price' => '202.27',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 263 =>\n array(\n 'id' => 279,\n 'upc_ean_isbn' => '304134146-8',\n 'item_name' => 'Mini - Vol Au Vents',\n 'size' => 'XS',\n 'description' => 'Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis. Duis consequat dui nec nisi volutpat eleifend.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '97.89',\n 'selling_price' => '271.56',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 264 =>\n array(\n 'id' => 280,\n 'upc_ean_isbn' => '710589543-8',\n 'item_name' => 'Chocolate Eclairs',\n 'size' => 'M',\n 'description' => 'Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '55.34',\n 'selling_price' => '214.99',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 265 =>\n array(\n 'id' => 281,\n 'upc_ean_isbn' => '612757893-0',\n 'item_name' => 'Mushroom - King Eryingii',\n 'size' => 'S',\n 'description' => 'Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti. Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '27.59',\n 'selling_price' => '236.09',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 266 =>\n array(\n 'id' => 282,\n 'upc_ean_isbn' => '840328766-6',\n 'item_name' => 'Red Currants',\n 'size' => '3XL',\n 'description' => 'Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '35.17',\n 'selling_price' => '292.79',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:36',\n 'updated_at' => '2018-01-17 19:40:36',\n ),\n 267 =>\n array(\n 'id' => 283,\n 'upc_ean_isbn' => '217205945-5',\n 'item_name' => 'Sea Bass - Fillets',\n 'size' => 'S',\n 'description' => 'Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet. Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '44.78',\n 'selling_price' => '246.25',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 268 =>\n array(\n 'id' => 285,\n 'upc_ean_isbn' => '769739130-9',\n 'item_name' => 'Pail - 15l White, With Handle',\n 'size' => 'S',\n 'description' => 'Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl. Nunc rhoncus dui vel sem. Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '22.45',\n 'selling_price' => '245.32',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 269 =>\n array(\n 'id' => 286,\n 'upc_ean_isbn' => '456546477-2',\n 'item_name' => 'Bread - Sour Sticks With Onion',\n 'size' => '2XL',\n 'description' => 'In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt. Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '56.47',\n 'selling_price' => '264.18',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 270 =>\n array(\n 'id' => 287,\n 'upc_ean_isbn' => '766316825-9',\n 'item_name' => 'Cafe Royale',\n 'size' => '3XL',\n 'description' => 'Integer ac neque. Duis bibendum. Morbi non quam nec dui luctus rutrum. Nulla tellus. In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '50.08',\n 'selling_price' => '206.32',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 271 =>\n array(\n 'id' => 289,\n 'upc_ean_isbn' => '890683775-5',\n 'item_name' => 'Island Oasis - Strawberry',\n 'size' => '2XL',\n 'description' => 'Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '52.92',\n 'selling_price' => '241.80',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 272 =>\n array(\n 'id' => 292,\n 'upc_ean_isbn' => '448858085-8',\n 'item_name' => 'Rum - Light, Captain Morgan',\n 'size' => 'M',\n 'description' => 'Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla. Quisque arcu libero, rutrum ac, lobortis vel, dapibus at, diam. Nam tristique tortor eu pede.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '37.08',\n 'selling_price' => '260.05',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 273 =>\n array(\n 'id' => 293,\n 'upc_ean_isbn' => '045378485-2',\n 'item_name' => 'Cake Circle, Paprus',\n 'size' => 'S',\n 'description' => 'Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '12.52',\n 'selling_price' => '231.43',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 274 =>\n array(\n 'id' => 294,\n 'upc_ean_isbn' => '738276719-1',\n 'item_name' => 'Cookie Dough - Oatmeal Rasin',\n 'size' => 'M',\n 'description' => 'Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '68.41',\n 'selling_price' => '293.37',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 275 =>\n array(\n 'id' => 295,\n 'upc_ean_isbn' => '869157075-X',\n 'item_name' => 'Puree - Blackcurrant',\n 'size' => 'XS',\n 'description' => 'Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '52.52',\n 'selling_price' => '206.98',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 276 =>\n array(\n 'id' => 296,\n 'upc_ean_isbn' => '128934193-1',\n 'item_name' => 'Mousse - Banana Chocolate',\n 'size' => '3XL',\n 'description' => 'Phasellus sit amet erat. Nulla tempus. Vivamus in felis eu sapien cursus vestibulum. Proin eu mi. Nulla ac enim. In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem. Duis aliquam convallis nunc.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '64.37',\n 'selling_price' => '216.31',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 277 =>\n array(\n 'id' => 297,\n 'upc_ean_isbn' => '123970311-2',\n 'item_name' => 'Dried Peach',\n 'size' => 'M',\n 'description' => 'Donec quis orci eget orci vehicula condimentum. Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '66.59',\n 'selling_price' => '220.20',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 278 =>\n array(\n 'id' => 298,\n 'upc_ean_isbn' => '877136289-4',\n 'item_name' => 'Shrimp - Baby, Warm Water',\n 'size' => 'L',\n 'description' => 'Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum. Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est. Phasellus sit amet erat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '83.26',\n 'selling_price' => '275.70',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 279 =>\n array(\n 'id' => 299,\n 'upc_ean_isbn' => '870111832-3',\n 'item_name' => 'Oranges',\n 'size' => '3XL',\n 'description' => 'Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt. Nulla mollis molestie lorem. Quisque ut erat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '6.36',\n 'selling_price' => '294.98',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 280 =>\n array(\n 'id' => 300,\n 'upc_ean_isbn' => '647423784-8',\n 'item_name' => 'Salmon - Smoked, Sliced',\n 'size' => '2XL',\n 'description' => 'Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum. Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est. Phasellus sit amet erat. Nulla tempus. Vivamus in felis eu sapien cursus vestibulum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '53.50',\n 'selling_price' => '231.32',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 281 =>\n array(\n 'id' => 301,\n 'upc_ean_isbn' => '029902960-3',\n 'item_name' => 'Lettuce - Sea / Sea Asparagus',\n 'size' => 'M',\n 'description' => 'Aliquam non mauris.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '44.88',\n 'selling_price' => '254.06',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:37',\n 'updated_at' => '2018-01-17 19:40:37',\n ),\n 282 =>\n array(\n 'id' => 302,\n 'upc_ean_isbn' => '471194102-9',\n 'item_name' => 'Tart - Lemon',\n 'size' => 'XL',\n 'description' => 'Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi. Integer ac neque. Duis bibendum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '86.23',\n 'selling_price' => '268.98',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 283 =>\n array(\n 'id' => 303,\n 'upc_ean_isbn' => '041409574-X',\n 'item_name' => 'Pears - Fiorelle',\n 'size' => 'L',\n 'description' => 'Fusce consequat. Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est congue elementum. In hac habitasse platea dictumst. Morbi vestibulum, velit id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien placerat ante.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '13.06',\n 'selling_price' => '207.71',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 284 =>\n array(\n 'id' => 304,\n 'upc_ean_isbn' => '600418260-5',\n 'item_name' => 'Chocolate - Dark',\n 'size' => '2XL',\n 'description' => 'Duis mattis egestas metus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '4.08',\n 'selling_price' => '200.39',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 285 =>\n array(\n 'id' => 305,\n 'upc_ean_isbn' => '334777657-7',\n 'item_name' => 'Yogurt - Strawberry, 175 Gr',\n 'size' => '2XL',\n 'description' => 'Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus. Pellentesque at nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '82.43',\n 'selling_price' => '226.73',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 286 =>\n array(\n 'id' => 306,\n 'upc_ean_isbn' => '029148213-9',\n 'item_name' => 'Herb Du Provence - Primerba',\n 'size' => '3XL',\n 'description' => 'Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '52.37',\n 'selling_price' => '240.28',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 287 =>\n array(\n 'id' => 307,\n 'upc_ean_isbn' => '179746549-X',\n 'item_name' => 'Tea - Vanilla Chai',\n 'size' => '2XL',\n 'description' => 'Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '37.50',\n 'selling_price' => '266.41',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 288 =>\n array(\n 'id' => 308,\n 'upc_ean_isbn' => '512643161-7',\n 'item_name' => 'Vermacelli - Sprinkles, Assorted',\n 'size' => 'S',\n 'description' => 'Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '17.97',\n 'selling_price' => '286.44',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 289 =>\n array(\n 'id' => 309,\n 'upc_ean_isbn' => '356074885-2',\n 'item_name' => 'Orange Roughy 4/6 Oz',\n 'size' => '3XL',\n 'description' => 'Fusce consequat. Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est congue elementum. In hac habitasse platea dictumst. Morbi vestibulum, velit id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien placerat ante. Nulla justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '41.65',\n 'selling_price' => '274.79',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 290 =>\n array(\n 'id' => 310,\n 'upc_ean_isbn' => '967814081-0',\n 'item_name' => 'Plate Pie Foil',\n 'size' => 'XL',\n 'description' => 'Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '26.77',\n 'selling_price' => '239.47',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 291 =>\n array(\n 'id' => 311,\n 'upc_ean_isbn' => '159679176-4',\n 'item_name' => 'Lobster - Tail, 3 - 4 Oz',\n 'size' => 'XS',\n 'description' => 'Fusce consequat. Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est congue elementum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '86.77',\n 'selling_price' => '231.38',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 292 =>\n array(\n 'id' => 312,\n 'upc_ean_isbn' => '033389499-5',\n 'item_name' => 'Oregano - Dry, Rubbed',\n 'size' => 'L',\n 'description' => 'Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '85.99',\n 'selling_price' => '299.68',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 293 =>\n array(\n 'id' => 313,\n 'upc_ean_isbn' => '683152243-2',\n 'item_name' => 'Langers - Ruby Red Grapfruit',\n 'size' => 'XS',\n 'description' => 'Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum. Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est. Phasellus sit amet erat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '98.40',\n 'selling_price' => '206.17',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 294 =>\n array(\n 'id' => 314,\n 'upc_ean_isbn' => '269811434-7',\n 'item_name' => 'Cocktail Napkin Blue',\n 'size' => 'M',\n 'description' => 'Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi. Integer ac neque. Duis bibendum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '63.87',\n 'selling_price' => '241.09',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 295 =>\n array(\n 'id' => 315,\n 'upc_ean_isbn' => '205483701-6',\n 'item_name' => 'Mackerel Whole Fresh',\n 'size' => 'XS',\n 'description' => 'Donec dapibus. Duis at velit eu est congue elementum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '27.15',\n 'selling_price' => '232.10',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 296 =>\n array(\n 'id' => 316,\n 'upc_ean_isbn' => '155986551-2',\n 'item_name' => 'Water - San Pellegrino',\n 'size' => 'M',\n 'description' => 'Aliquam quis turpis eget elit sodales scelerisque. Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '52.36',\n 'selling_price' => '225.81',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 297 =>\n array(\n 'id' => 317,\n 'upc_ean_isbn' => '093913397-0',\n 'item_name' => 'Rice - Sushi',\n 'size' => '3XL',\n 'description' => 'Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti. Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '77.57',\n 'selling_price' => '269.57',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 298 =>\n array(\n 'id' => 319,\n 'upc_ean_isbn' => '701864479-8',\n 'item_name' => 'Pasta - Fettuccine, Egg, Fresh',\n 'size' => '3XL',\n 'description' => 'Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum. Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est. Phasellus sit amet erat. Nulla tempus. Vivamus in felis eu sapien cursus vestibulum. Proin eu mi.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '54.83',\n 'selling_price' => '287.52',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:38',\n 'updated_at' => '2018-01-17 19:40:38',\n ),\n 299 =>\n array(\n 'id' => 320,\n 'upc_ean_isbn' => '573832622-9',\n 'item_name' => 'Nut - Macadamia',\n 'size' => 'S',\n 'description' => 'Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '63.12',\n 'selling_price' => '299.87',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 300 =>\n array(\n 'id' => 321,\n 'upc_ean_isbn' => '027646627-6',\n 'item_name' => 'Ham - Proscuitto',\n 'size' => '2XL',\n 'description' => 'Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '93.01',\n 'selling_price' => '237.63',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 301 =>\n array(\n 'id' => 322,\n 'upc_ean_isbn' => '892186317-6',\n 'item_name' => 'Pasta - Ravioli',\n 'size' => 'XS',\n 'description' => 'Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum. Curabitur in libero ut massa volutpat convallis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '40.58',\n 'selling_price' => '204.57',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 302 =>\n array(\n 'id' => 323,\n 'upc_ean_isbn' => '059954800-2',\n 'item_name' => 'Soap - Pine Sol Floor Cleaner',\n 'size' => 'XS',\n 'description' => 'Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '40.95',\n 'selling_price' => '220.94',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 303 =>\n array(\n 'id' => 324,\n 'upc_ean_isbn' => '250840607-4',\n 'item_name' => 'Coffee - Colombian, Portioned',\n 'size' => 'XL',\n 'description' => 'Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '16.12',\n 'selling_price' => '248.28',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 304 =>\n array(\n 'id' => 325,\n 'upc_ean_isbn' => '432645360-5',\n 'item_name' => 'Mushroom - Crimini',\n 'size' => '2XL',\n 'description' => 'Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '80.60',\n 'selling_price' => '200.74',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 305 =>\n array(\n 'id' => 326,\n 'upc_ean_isbn' => '955775988-7',\n 'item_name' => 'Chilli Paste, Sambal Oelek',\n 'size' => 'M',\n 'description' => 'Suspendisse ornare consequat lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '15.23',\n 'selling_price' => '294.47',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 306 =>\n array(\n 'id' => 328,\n 'upc_ean_isbn' => '322603355-7',\n 'item_name' => 'Wine - Chateau Timberlay',\n 'size' => '2XL',\n 'description' => 'Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero. Nullam sit amet turpis elementum ligula vehicula consequat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '13.35',\n 'selling_price' => '218.85',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 307 =>\n array(\n 'id' => 329,\n 'upc_ean_isbn' => '009417974-3',\n 'item_name' => 'Ice Cream - Turtles Stick Bar',\n 'size' => 'XL',\n 'description' => 'Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '41.32',\n 'selling_price' => '225.35',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 308 =>\n array(\n 'id' => 330,\n 'upc_ean_isbn' => '615934605-9',\n 'item_name' => 'Beef - Rib Roast, Cap On',\n 'size' => 'L',\n 'description' => 'Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat. In congue. Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '58.76',\n 'selling_price' => '260.40',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 309 =>\n array(\n 'id' => 331,\n 'upc_ean_isbn' => '821590227-8',\n 'item_name' => 'Soap - Hand Soap',\n 'size' => 'S',\n 'description' => 'Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus. Phasellus in felis. Donec semper sapien a libero. Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '5.45',\n 'selling_price' => '291.98',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 310 =>\n array(\n 'id' => 332,\n 'upc_ean_isbn' => '275498644-8',\n 'item_name' => 'Pepper - Green Thai',\n 'size' => 'XL',\n 'description' => 'Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '46.13',\n 'selling_price' => '217.96',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 311 =>\n array(\n 'id' => 333,\n 'upc_ean_isbn' => '560720243-7',\n 'item_name' => 'Onions - Red',\n 'size' => 'S',\n 'description' => 'Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '39.08',\n 'selling_price' => '241.43',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 312 =>\n array(\n 'id' => 334,\n 'upc_ean_isbn' => '576856124-2',\n 'item_name' => 'Cranberries - Frozen',\n 'size' => 'S',\n 'description' => 'Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '22.78',\n 'selling_price' => '260.67',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 313 =>\n array(\n 'id' => 335,\n 'upc_ean_isbn' => '908247006-3',\n 'item_name' => 'Sobe - Berry Energy',\n 'size' => 'XS',\n 'description' => 'Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '64.26',\n 'selling_price' => '218.43',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 314 =>\n array(\n 'id' => 336,\n 'upc_ean_isbn' => '053615891-6',\n 'item_name' => 'Olive - Spread Tapenade',\n 'size' => '2XL',\n 'description' => 'Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus. Phasellus in felis. Donec semper sapien a libero. Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '59.04',\n 'selling_price' => '237.65',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 315 =>\n array(\n 'id' => 337,\n 'upc_ean_isbn' => '712329513-7',\n 'item_name' => 'Ketchup - Tomato',\n 'size' => '3XL',\n 'description' => 'Nullam varius. Nulla facilisi.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '61.22',\n 'selling_price' => '260.95',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 316 =>\n array(\n 'id' => 338,\n 'upc_ean_isbn' => '649215516-5',\n 'item_name' => 'Table Cloth 91x91 Colour',\n 'size' => 'XL',\n 'description' => 'Morbi vestibulum, velit id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien placerat ante. Nulla justo. Aliquam quis turpis eget elit sodales scelerisque. Mauris sit amet eros. Suspendisse accumsan tortor quis turpis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '37.40',\n 'selling_price' => '267.74',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 317 =>\n array(\n 'id' => 339,\n 'upc_ean_isbn' => '125862183-5',\n 'item_name' => 'Vaccum Bag 10x13',\n 'size' => 'XL',\n 'description' => 'Aliquam quis turpis eget elit sodales scelerisque. Mauris sit amet eros.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '17.45',\n 'selling_price' => '276.13',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:39',\n 'updated_at' => '2018-01-17 19:40:39',\n ),\n 318 =>\n array(\n 'id' => 340,\n 'upc_ean_isbn' => '953948988-1',\n 'item_name' => 'Appetizer - Chicken Satay',\n 'size' => 'M',\n 'description' => 'Aenean fermentum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '32.08',\n 'selling_price' => '202.39',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 319 =>\n array(\n 'id' => 341,\n 'upc_ean_isbn' => '683271252-9',\n 'item_name' => 'Soup - Knorr, Chicken Noodle',\n 'size' => '3XL',\n 'description' => 'Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '92.33',\n 'selling_price' => '280.09',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 320 =>\n array(\n 'id' => 342,\n 'upc_ean_isbn' => '744269458-6',\n 'item_name' => 'Apricots - Halves',\n 'size' => 'XS',\n 'description' => 'Donec quis orci eget orci vehicula condimentum. Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est. Phasellus sit amet erat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '74.88',\n 'selling_price' => '229.88',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 321 =>\n array(\n 'id' => 343,\n 'upc_ean_isbn' => '669104429-0',\n 'item_name' => 'Wine - Magnotta - Cab Franc',\n 'size' => 'L',\n 'description' => 'In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '41.36',\n 'selling_price' => '217.51',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 322 =>\n array(\n 'id' => 345,\n 'upc_ean_isbn' => '625229792-5',\n 'item_name' => 'Roe - Flying Fish',\n 'size' => '2XL',\n 'description' => 'Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '42.32',\n 'selling_price' => '208.69',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 323 =>\n array(\n 'id' => 347,\n 'upc_ean_isbn' => '000131774-1',\n 'item_name' => 'Carrots - Mini Red Organic',\n 'size' => '2XL',\n 'description' => 'Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi. Integer ac neque. Duis bibendum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '18.64',\n 'selling_price' => '284.92',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 324 =>\n array(\n 'id' => 348,\n 'upc_ean_isbn' => '912397655-1',\n 'item_name' => 'Juice - Apple 284ml',\n 'size' => 'XS',\n 'description' => 'Nullam porttitor lacus at turpis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '98.40',\n 'selling_price' => '240.20',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 325 =>\n array(\n 'id' => 351,\n 'upc_ean_isbn' => '056126707-3',\n 'item_name' => 'Cotton Wet Mop 16 Oz',\n 'size' => 'L',\n 'description' => 'Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '50.78',\n 'selling_price' => '202.68',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 326 =>\n array(\n 'id' => 354,\n 'upc_ean_isbn' => '973631909-1',\n 'item_name' => 'Chicken - Base',\n 'size' => 'XS',\n 'description' => 'Vestibulum rutrum rutrum neque. Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '38.06',\n 'selling_price' => '224.43',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 327 =>\n array(\n 'id' => 355,\n 'upc_ean_isbn' => '168039433-9',\n 'item_name' => 'Huck White Towels',\n 'size' => 'L',\n 'description' => 'Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est congue elementum. In hac habitasse platea dictumst. Morbi vestibulum, velit id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien placerat ante. Nulla justo. Aliquam quis turpis eget elit sodales scelerisque. Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '54.70',\n 'selling_price' => '226.16',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 328 =>\n array(\n 'id' => 356,\n 'upc_ean_isbn' => '415503407-7',\n 'item_name' => 'Green Tea Refresher',\n 'size' => 'XS',\n 'description' => 'Phasellus sit amet erat. Nulla tempus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '89.25',\n 'selling_price' => '223.92',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 329 =>\n array(\n 'id' => 357,\n 'upc_ean_isbn' => '602970427-3',\n 'item_name' => 'Nantucket Cranberry Juice',\n 'size' => 'M',\n 'description' => 'Cras pellentesque volutpat dui.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '72.10',\n 'selling_price' => '202.95',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 330 =>\n array(\n 'id' => 358,\n 'upc_ean_isbn' => '136755838-7',\n 'item_name' => 'Sun - Dried Tomatoes',\n 'size' => 'M',\n 'description' => 'Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero. Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '63.81',\n 'selling_price' => '216.46',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 331 =>\n array(\n 'id' => 359,\n 'upc_ean_isbn' => '019075894-5',\n 'item_name' => 'Wine - Marlbourough Sauv Blanc',\n 'size' => 'XS',\n 'description' => 'Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti. Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '14.19',\n 'selling_price' => '233.48',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 332 =>\n array(\n 'id' => 360,\n 'upc_ean_isbn' => '143236436-7',\n 'item_name' => 'Crackers Cheez It',\n 'size' => '3XL',\n 'description' => 'Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '50.10',\n 'selling_price' => '279.82',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 333 =>\n array(\n 'id' => 361,\n 'upc_ean_isbn' => '325446297-1',\n 'item_name' => 'Flavouring Vanilla Artificial',\n 'size' => 'S',\n 'description' => 'Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '48.78',\n 'selling_price' => '269.16',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:40',\n 'updated_at' => '2018-01-17 19:40:40',\n ),\n 334 =>\n array(\n 'id' => 362,\n 'upc_ean_isbn' => '524971283-5',\n 'item_name' => 'Butter Ripple - Phillips',\n 'size' => 'M',\n 'description' => 'Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla. Quisque arcu libero, rutrum ac, lobortis vel, dapibus at, diam.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '33.49',\n 'selling_price' => '205.76',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:41',\n 'updated_at' => '2018-01-17 19:40:41',\n ),\n 335 =>\n array(\n 'id' => 363,\n 'upc_ean_isbn' => '406688728-7',\n 'item_name' => 'Long Island Ice Tea',\n 'size' => 'M',\n 'description' => 'Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '88.14',\n 'selling_price' => '237.96',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:41',\n 'updated_at' => '2018-01-17 19:40:41',\n ),\n 336 =>\n array(\n 'id' => 364,\n 'upc_ean_isbn' => '122276249-8',\n 'item_name' => 'Sauce - Sesame Thai Dressing',\n 'size' => 'M',\n 'description' => 'Nulla justo. Aliquam quis turpis eget elit sodales scelerisque. Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '41.53',\n 'selling_price' => '276.93',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:41',\n 'updated_at' => '2018-01-17 19:40:41',\n ),\n 337 =>\n array(\n 'id' => 365,\n 'upc_ean_isbn' => '788776175-1',\n 'item_name' => 'Muffin Hinge - 211n',\n 'size' => '2XL',\n 'description' => 'Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '8.95',\n 'selling_price' => '296.54',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:41',\n 'updated_at' => '2018-01-17 19:40:41',\n ),\n 338 =>\n array(\n 'id' => 366,\n 'upc_ean_isbn' => '415803166-4',\n 'item_name' => 'Appetizer - Mini Egg Roll, Shrimp',\n 'size' => 'M',\n 'description' => 'Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis. Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl. Nunc rhoncus dui vel sem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '99.99',\n 'selling_price' => '252.95',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:41',\n 'updated_at' => '2018-01-17 19:40:41',\n ),\n 339 =>\n array(\n 'id' => 367,\n 'upc_ean_isbn' => '063507114-2',\n 'item_name' => 'Wine - Baron De Rothschild',\n 'size' => '3XL',\n 'description' => 'Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '32.63',\n 'selling_price' => '205.83',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:41',\n 'updated_at' => '2018-01-17 19:40:41',\n ),\n 340 =>\n array(\n 'id' => 368,\n 'upc_ean_isbn' => '559330451-3',\n 'item_name' => 'Gelatine Leaves - Envelopes',\n 'size' => 'L',\n 'description' => 'Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '43.76',\n 'selling_price' => '272.52',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:41',\n 'updated_at' => '2018-01-17 19:40:41',\n ),\n 341 =>\n array(\n 'id' => 369,\n 'upc_ean_isbn' => '812879889-8',\n 'item_name' => 'Cup Translucent 9 Oz',\n 'size' => '2XL',\n 'description' => 'Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl. Nunc rhoncus dui vel sem. Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '81.12',\n 'selling_price' => '282.97',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:41',\n 'updated_at' => '2018-01-17 19:40:41',\n ),\n 342 =>\n array(\n 'id' => 370,\n 'upc_ean_isbn' => '267005518-4',\n 'item_name' => 'Wine - Guy Sage Touraine',\n 'size' => 'XS',\n 'description' => 'Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '85.37',\n 'selling_price' => '271.84',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 343 =>\n array(\n 'id' => 371,\n 'upc_ean_isbn' => '988945236-7',\n 'item_name' => 'Sunflower Seed Raw',\n 'size' => 'XS',\n 'description' => 'Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet. Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '52.02',\n 'selling_price' => '208.45',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 344 =>\n array(\n 'id' => 372,\n 'upc_ean_isbn' => '133935456-X',\n 'item_name' => 'Beer - Upper Canada Lager',\n 'size' => '3XL',\n 'description' => 'Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '83.00',\n 'selling_price' => '202.31',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 345 =>\n array(\n 'id' => 373,\n 'upc_ean_isbn' => '794683872-7',\n 'item_name' => 'Wine - Sauvignon Blanc',\n 'size' => 'S',\n 'description' => 'Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat. In congue. Etiam justo. Etiam pretium iaculis justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '9.77',\n 'selling_price' => '203.47',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 346 =>\n array(\n 'id' => 374,\n 'upc_ean_isbn' => '321797463-8',\n 'item_name' => 'V8 - Berry Blend',\n 'size' => 'XL',\n 'description' => 'Nulla tellus. In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt. Nulla mollis molestie lorem. Quisque ut erat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '7.65',\n 'selling_price' => '283.53',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 347 =>\n array(\n 'id' => 375,\n 'upc_ean_isbn' => '104219127-1',\n 'item_name' => 'Macaroons - Homestyle Two Bit',\n 'size' => '2XL',\n 'description' => 'Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '46.47',\n 'selling_price' => '237.10',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 348 =>\n array(\n 'id' => 376,\n 'upc_ean_isbn' => '677354054-2',\n 'item_name' => 'Sprite, Diet - 355ml',\n 'size' => 'L',\n 'description' => 'Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est. Phasellus sit amet erat. Nulla tempus. Vivamus in felis eu sapien cursus vestibulum. Proin eu mi. Nulla ac enim. In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem. Duis aliquam convallis nunc.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '30.21',\n 'selling_price' => '246.80',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 349 =>\n array(\n 'id' => 377,\n 'upc_ean_isbn' => '246556229-0',\n 'item_name' => 'Shiratamako - Rice Flour',\n 'size' => 'L',\n 'description' => 'Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl. Nunc rhoncus dui vel sem. Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '27.75',\n 'selling_price' => '241.73',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 350 =>\n array(\n 'id' => 379,\n 'upc_ean_isbn' => '155275705-6',\n 'item_name' => 'Alize Gold Passion',\n 'size' => 'S',\n 'description' => 'In hac habitasse platea dictumst.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '80.19',\n 'selling_price' => '224.66',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 351 =>\n array(\n 'id' => 380,\n 'upc_ean_isbn' => '796786639-8',\n 'item_name' => 'Muffin - Mix - Creme Brule 15l',\n 'size' => 'XS',\n 'description' => 'Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet. Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis. Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl. Nunc rhoncus dui vel sem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '44.25',\n 'selling_price' => '200.24',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 352 =>\n array(\n 'id' => 381,\n 'upc_ean_isbn' => '081418249-6',\n 'item_name' => 'Chinese Foods - Plain Fried Rice',\n 'size' => 'S',\n 'description' => 'Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '51.30',\n 'selling_price' => '225.09',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 353 =>\n array(\n 'id' => 382,\n 'upc_ean_isbn' => '548658276-5',\n 'item_name' => 'Bread - Raisin',\n 'size' => 'S',\n 'description' => 'Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '88.32',\n 'selling_price' => '250.13',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 354 =>\n array(\n 'id' => 383,\n 'upc_ean_isbn' => '770678689-7',\n 'item_name' => 'Wine - Red, Harrow Estates, Cab',\n 'size' => 'S',\n 'description' => 'Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '88.08',\n 'selling_price' => '244.13',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 355 =>\n array(\n 'id' => 384,\n 'upc_ean_isbn' => '997059642-X',\n 'item_name' => 'Shrimp, Dried, Small / Lb',\n 'size' => 'XS',\n 'description' => 'Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '75.34',\n 'selling_price' => '298.36',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 356 =>\n array(\n 'id' => 385,\n 'upc_ean_isbn' => '803047762-7',\n 'item_name' => 'Icecream - Dstk Cml And Fdg',\n 'size' => '3XL',\n 'description' => 'Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '56.03',\n 'selling_price' => '274.08',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 357 =>\n array(\n 'id' => 386,\n 'upc_ean_isbn' => '481500119-7',\n 'item_name' => 'Lemonade - Kiwi, 591 Ml',\n 'size' => '3XL',\n 'description' => 'Aliquam erat volutpat. In congue. Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '91.29',\n 'selling_price' => '221.63',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 358 =>\n array(\n 'id' => 387,\n 'upc_ean_isbn' => '632896301-7',\n 'item_name' => 'Artichoke - Hearts, Canned',\n 'size' => '2XL',\n 'description' => 'Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum. Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '8.36',\n 'selling_price' => '272.75',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 359 =>\n array(\n 'id' => 388,\n 'upc_ean_isbn' => '397197807-X',\n 'item_name' => 'Sage - Fresh',\n 'size' => '2XL',\n 'description' => 'Aliquam non mauris.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '8.85',\n 'selling_price' => '215.55',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 360 =>\n array(\n 'id' => 389,\n 'upc_ean_isbn' => '256503851-8',\n 'item_name' => 'Catfish - Fillets',\n 'size' => 'XS',\n 'description' => 'In blandit ultrices enim.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '91.93',\n 'selling_price' => '255.20',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 361 =>\n array(\n 'id' => 390,\n 'upc_ean_isbn' => '422406779-X',\n 'item_name' => 'Cheese - Perron Cheddar',\n 'size' => 'L',\n 'description' => 'Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '21.63',\n 'selling_price' => '213.58',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 362 =>\n array(\n 'id' => 392,\n 'upc_ean_isbn' => '655596052-3',\n 'item_name' => 'Swiss Chard - Red',\n 'size' => 'L',\n 'description' => 'Proin risus. Praesent lectus. Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '30.64',\n 'selling_price' => '276.35',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 363 =>\n array(\n 'id' => 393,\n 'upc_ean_isbn' => '658364451-7',\n 'item_name' => 'Pheasants - Whole',\n 'size' => '3XL',\n 'description' => 'Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est. Phasellus sit amet erat. Nulla tempus. Vivamus in felis eu sapien cursus vestibulum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '71.64',\n 'selling_price' => '216.57',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:42',\n 'updated_at' => '2018-01-17 19:40:42',\n ),\n 364 =>\n array(\n 'id' => 395,\n 'upc_ean_isbn' => '097075523-6',\n 'item_name' => 'Iced Tea - Lemon, 340ml',\n 'size' => 'XL',\n 'description' => 'Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus. Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '3.86',\n 'selling_price' => '218.61',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 365 =>\n array(\n 'id' => 396,\n 'upc_ean_isbn' => '442558527-5',\n 'item_name' => 'Gooseberry',\n 'size' => '3XL',\n 'description' => 'In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '17.04',\n 'selling_price' => '232.24',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 366 =>\n array(\n 'id' => 397,\n 'upc_ean_isbn' => '255603330-4',\n 'item_name' => 'Vinegar - Sherry',\n 'size' => '2XL',\n 'description' => 'Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '72.45',\n 'selling_price' => '250.52',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 367 =>\n array(\n 'id' => 398,\n 'upc_ean_isbn' => '077256466-3',\n 'item_name' => 'Shopper Bag - S - 4',\n 'size' => 'S',\n 'description' => 'Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum. Curabitur in libero ut massa volutpat convallis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '80.01',\n 'selling_price' => '211.93',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 368 =>\n array(\n 'id' => 399,\n 'upc_ean_isbn' => '102249104-0',\n 'item_name' => 'Wine - Red, Concha Y Toro',\n 'size' => '3XL',\n 'description' => 'Proin risus. Praesent lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '39.60',\n 'selling_price' => '266.21',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 369 =>\n array(\n 'id' => 400,\n 'upc_ean_isbn' => '722705042-4',\n 'item_name' => 'Beets - Mini Golden',\n 'size' => '2XL',\n 'description' => 'Ut tellus. Nulla ut erat id mauris vulputate elementum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '48.74',\n 'selling_price' => '281.93',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 370 =>\n array(\n 'id' => 402,\n 'upc_ean_isbn' => '934264377-9',\n 'item_name' => 'Beef Tenderloin Aaa',\n 'size' => 'M',\n 'description' => 'Morbi vestibulum, velit id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien placerat ante. Nulla justo. Aliquam quis turpis eget elit sodales scelerisque. Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '46.31',\n 'selling_price' => '240.40',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 371 =>\n array(\n 'id' => 403,\n 'upc_ean_isbn' => '288204812-2',\n 'item_name' => 'Fuji Apples',\n 'size' => 'XL',\n 'description' => 'Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '21.68',\n 'selling_price' => '246.54',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 372 =>\n array(\n 'id' => 404,\n 'upc_ean_isbn' => '565807498-3',\n 'item_name' => 'Longos - Chicken Wings',\n 'size' => '2XL',\n 'description' => 'Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo. Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '90.22',\n 'selling_price' => '297.93',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 373 =>\n array(\n 'id' => 405,\n 'upc_ean_isbn' => '685898822-X',\n 'item_name' => 'Truffle Paste',\n 'size' => 'L',\n 'description' => 'In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '32.21',\n 'selling_price' => '256.10',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 374 =>\n array(\n 'id' => 406,\n 'upc_ean_isbn' => '332931264-5',\n 'item_name' => 'Butter - Pod',\n 'size' => 'L',\n 'description' => 'Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '93.84',\n 'selling_price' => '290.93',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 375 =>\n array(\n 'id' => 407,\n 'upc_ean_isbn' => '596832842-8',\n 'item_name' => 'Spice - Montreal Steak Spice',\n 'size' => '3XL',\n 'description' => 'Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '35.58',\n 'selling_price' => '205.14',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 376 =>\n array(\n 'id' => 408,\n 'upc_ean_isbn' => '567200899-2',\n 'item_name' => 'Juice - Apple, 1.36l',\n 'size' => '2XL',\n 'description' => 'Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '89.66',\n 'selling_price' => '216.40',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 377 =>\n array(\n 'id' => 409,\n 'upc_ean_isbn' => '623344818-2',\n 'item_name' => 'Chickhen - Chicken Phyllo',\n 'size' => 'XL',\n 'description' => 'Morbi quis tortor id nulla ultrices aliquet. Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '13.85',\n 'selling_price' => '263.24',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 378 =>\n array(\n 'id' => 410,\n 'upc_ean_isbn' => '344473919-2',\n 'item_name' => 'Lid - 0090 Clear',\n 'size' => '2XL',\n 'description' => 'Mauris lacinia sapien quis libero. Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh. In quis justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '8.68',\n 'selling_price' => '207.36',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 379 =>\n array(\n 'id' => 411,\n 'upc_ean_isbn' => '700257748-4',\n 'item_name' => 'Cheese - Augre Des Champs',\n 'size' => '3XL',\n 'description' => 'Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '8.47',\n 'selling_price' => '203.64',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 380 =>\n array(\n 'id' => 412,\n 'upc_ean_isbn' => '375374807-2',\n 'item_name' => 'Fish - Scallops, Cold Smoked',\n 'size' => 'S',\n 'description' => 'Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '40.59',\n 'selling_price' => '284.03',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 381 =>\n array(\n 'id' => 413,\n 'upc_ean_isbn' => '779605827-6',\n 'item_name' => 'Versatainer Nc - 8288',\n 'size' => '3XL',\n 'description' => 'Aenean fermentum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '69.44',\n 'selling_price' => '230.08',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 382 =>\n array(\n 'id' => 414,\n 'upc_ean_isbn' => '580990636-2',\n 'item_name' => 'Wine - Magnotta, Merlot Sr Vqa',\n 'size' => 'XS',\n 'description' => 'Mauris sit amet eros. Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '88.26',\n 'selling_price' => '202.77',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 383 =>\n array(\n 'id' => 415,\n 'upc_ean_isbn' => '779837701-8',\n 'item_name' => 'Mcguinness - Blue Curacao',\n 'size' => 'M',\n 'description' => 'Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '47.88',\n 'selling_price' => '255.98',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 384 =>\n array(\n 'id' => 417,\n 'upc_ean_isbn' => '419276690-6',\n 'item_name' => 'Dr. Pepper - 355ml',\n 'size' => '3XL',\n 'description' => 'In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt. Nulla mollis molestie lorem. Quisque ut erat. Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '61.62',\n 'selling_price' => '262.10',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:43',\n 'updated_at' => '2018-01-17 19:40:43',\n ),\n 385 =>\n array(\n 'id' => 418,\n 'upc_ean_isbn' => '193176517-0',\n 'item_name' => 'Asparagus - Green, Fresh',\n 'size' => 'S',\n 'description' => 'Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat. In congue. Etiam justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '28.54',\n 'selling_price' => '210.76',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 386 =>\n array(\n 'id' => 420,\n 'upc_ean_isbn' => '351525262-2',\n 'item_name' => 'Napkin - Beverage 1 Ply',\n 'size' => 'S',\n 'description' => 'Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla. Nunc purus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '34.81',\n 'selling_price' => '298.60',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 387 =>\n array(\n 'id' => 421,\n 'upc_ean_isbn' => '445464584-1',\n 'item_name' => 'Figs',\n 'size' => 'M',\n 'description' => 'Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '88.25',\n 'selling_price' => '243.09',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 388 =>\n array(\n 'id' => 422,\n 'upc_ean_isbn' => '766591318-0',\n 'item_name' => 'Eggwhite Frozen',\n 'size' => 'XS',\n 'description' => 'Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '35.35',\n 'selling_price' => '252.42',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 389 =>\n array(\n 'id' => 423,\n 'upc_ean_isbn' => '082038552-2',\n 'item_name' => 'Nut - Walnut, Pieces',\n 'size' => '3XL',\n 'description' => 'Nullam molestie nibh in lectus. Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '61.53',\n 'selling_price' => '293.86',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 390 =>\n array(\n 'id' => 424,\n 'upc_ean_isbn' => '306328724-5',\n 'item_name' => 'Nut - Almond, Blanched, Ground',\n 'size' => 'L',\n 'description' => 'Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '25.96',\n 'selling_price' => '251.42',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 391 =>\n array(\n 'id' => 426,\n 'upc_ean_isbn' => '786073675-6',\n 'item_name' => 'Broom - Corn',\n 'size' => 'S',\n 'description' => 'Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '50.08',\n 'selling_price' => '280.07',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 392 =>\n array(\n 'id' => 427,\n 'upc_ean_isbn' => '207506389-3',\n 'item_name' => 'Muffin Mix - Banana Nut',\n 'size' => '2XL',\n 'description' => 'Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '59.91',\n 'selling_price' => '251.41',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 393 =>\n array(\n 'id' => 429,\n 'upc_ean_isbn' => '413004377-3',\n 'item_name' => 'Milk Powder',\n 'size' => 'XL',\n 'description' => 'Proin risus. Praesent lectus. Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis. Duis consequat dui nec nisi volutpat eleifend.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '76.43',\n 'selling_price' => '247.35',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 394 =>\n array(\n 'id' => 430,\n 'upc_ean_isbn' => '012857001-6',\n 'item_name' => 'Turkey Tenderloin Frozen',\n 'size' => '2XL',\n 'description' => 'Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '18.26',\n 'selling_price' => '241.64',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 395 =>\n array(\n 'id' => 431,\n 'upc_ean_isbn' => '974835974-3',\n 'item_name' => 'Pasta - Elbows, Macaroni, Dry',\n 'size' => '2XL',\n 'description' => 'Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy. Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi. Integer ac neque.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '59.74',\n 'selling_price' => '227.24',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 396 =>\n array(\n 'id' => 432,\n 'upc_ean_isbn' => '368443007-2',\n 'item_name' => 'Squash - Acorn',\n 'size' => 'L',\n 'description' => 'Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '81.24',\n 'selling_price' => '257.11',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 397 =>\n array(\n 'id' => 433,\n 'upc_ean_isbn' => '323789305-6',\n 'item_name' => 'Coriander - Ground',\n 'size' => 'XS',\n 'description' => 'Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat. In congue. Etiam justo. Etiam pretium iaculis justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '2.06',\n 'selling_price' => '225.87',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 398 =>\n array(\n 'id' => 435,\n 'upc_ean_isbn' => '977864072-6',\n 'item_name' => 'Pork - Liver',\n 'size' => '3XL',\n 'description' => 'Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '38.04',\n 'selling_price' => '208.54',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 399 =>\n array(\n 'id' => 436,\n 'upc_ean_isbn' => '014567241-7',\n 'item_name' => 'Sauce - Salsa',\n 'size' => '3XL',\n 'description' => 'Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '91.58',\n 'selling_price' => '224.43',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:44',\n 'updated_at' => '2018-01-17 19:40:44',\n ),\n 400 =>\n array(\n 'id' => 437,\n 'upc_ean_isbn' => '230332477-7',\n 'item_name' => 'Energy Drink Red Bull',\n 'size' => 'XS',\n 'description' => 'Duis consequat dui nec nisi volutpat eleifend.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '93.27',\n 'selling_price' => '231.93',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 401 =>\n array(\n 'id' => 438,\n 'upc_ean_isbn' => '778512634-8',\n 'item_name' => 'Mountain Dew',\n 'size' => 'M',\n 'description' => 'Suspendisse accumsan tortor quis turpis. Sed ante. Vivamus tortor. Duis mattis egestas metus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '63.30',\n 'selling_price' => '214.32',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 402 =>\n array(\n 'id' => 439,\n 'upc_ean_isbn' => '356947608-1',\n 'item_name' => 'Shrimp - 16/20, Iqf, Shell On',\n 'size' => 'XS',\n 'description' => 'Aenean fermentum. Donec ut mauris eget massa tempor convallis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '45.08',\n 'selling_price' => '271.80',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 403 =>\n array(\n 'id' => 440,\n 'upc_ean_isbn' => '758812583-7',\n 'item_name' => 'Pie Shell - 5',\n 'size' => 'M',\n 'description' => 'Proin at turpis a pede posuere nonummy. Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi. Integer ac neque. Duis bibendum. Morbi non quam nec dui luctus rutrum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '97.63',\n 'selling_price' => '224.93',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 404 =>\n array(\n 'id' => 441,\n 'upc_ean_isbn' => '329173655-9',\n 'item_name' => 'Mushroom - Shitake, Fresh',\n 'size' => 'XS',\n 'description' => 'Aliquam erat volutpat. In congue. Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '90.10',\n 'selling_price' => '298.07',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 405 =>\n array(\n 'id' => 442,\n 'upc_ean_isbn' => '949868748-X',\n 'item_name' => 'V8 Splash Strawberry Banana',\n 'size' => 'XL',\n 'description' => 'Proin at turpis a pede posuere nonummy. Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi. Integer ac neque.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '94.01',\n 'selling_price' => '270.73',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 406 =>\n array(\n 'id' => 443,\n 'upc_ean_isbn' => '327987690-7',\n 'item_name' => 'Pork Loin Bine - In Frenched',\n 'size' => 'XS',\n 'description' => 'Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '62.19',\n 'selling_price' => '254.26',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 407 =>\n array(\n 'id' => 444,\n 'upc_ean_isbn' => '985244668-1',\n 'item_name' => 'Flavouring - Orange',\n 'size' => '2XL',\n 'description' => 'Praesent id massa id nisl venenatis lacinia.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '48.57',\n 'selling_price' => '230.59',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 408 =>\n array(\n 'id' => 445,\n 'upc_ean_isbn' => '461393493-1',\n 'item_name' => 'The Pop Shoppe - Black Cherry',\n 'size' => '2XL',\n 'description' => 'Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '35.05',\n 'selling_price' => '217.58',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 409 =>\n array(\n 'id' => 446,\n 'upc_ean_isbn' => '075583661-8',\n 'item_name' => 'Wine - Hardys Bankside Shiraz',\n 'size' => 'XL',\n 'description' => 'Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta volutpat erat. Quisque erat eros, viverra eget, congue eget, semper rutrum, nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '43.62',\n 'selling_price' => '279.25',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 410 =>\n array(\n 'id' => 447,\n 'upc_ean_isbn' => '783063066-6',\n 'item_name' => 'Toothpick Frilled',\n 'size' => 'XS',\n 'description' => 'Fusce consequat. Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '51.47',\n 'selling_price' => '281.61',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 411 =>\n array(\n 'id' => 448,\n 'upc_ean_isbn' => '047784105-8',\n 'item_name' => 'Venison - Liver',\n 'size' => 'XL',\n 'description' => 'Proin risus. Praesent lectus. Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis. Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus. Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '94.84',\n 'selling_price' => '250.01',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 412 =>\n array(\n 'id' => 449,\n 'upc_ean_isbn' => '433382445-1',\n 'item_name' => 'Loaf Pan - 2 Lb, Foil',\n 'size' => 'XS',\n 'description' => 'In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '27.99',\n 'selling_price' => '212.22',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 413 =>\n array(\n 'id' => 450,\n 'upc_ean_isbn' => '195970233-5',\n 'item_name' => 'Cape Capensis - Fillet',\n 'size' => 'XS',\n 'description' => 'Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '71.04',\n 'selling_price' => '293.00',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 414 =>\n array(\n 'id' => 451,\n 'upc_ean_isbn' => '741275766-0',\n 'item_name' => 'Glaze - Clear',\n 'size' => 'L',\n 'description' => 'In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '93.07',\n 'selling_price' => '297.42',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 415 =>\n array(\n 'id' => 452,\n 'upc_ean_isbn' => '051988654-2',\n 'item_name' => 'Edible Flower - Mixed',\n 'size' => '3XL',\n 'description' => 'Nulla tellus. In sagittis dui vel nisl. Duis ac nibh.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '71.48',\n 'selling_price' => '248.49',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 416 =>\n array(\n 'id' => 453,\n 'upc_ean_isbn' => '192698229-0',\n 'item_name' => 'Sauce - White, Mix',\n 'size' => 'XL',\n 'description' => 'Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet. Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis. Fusce posuere felis sed lacus. Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl. Nunc rhoncus dui vel sem. Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '93.06',\n 'selling_price' => '284.63',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:45',\n 'updated_at' => '2018-01-17 19:40:45',\n ),\n 417 =>\n array(\n 'id' => 454,\n 'upc_ean_isbn' => '878459622-8',\n 'item_name' => 'Beer - Rickards Red',\n 'size' => 'L',\n 'description' => 'Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero. Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh. In quis justo. Maecenas rhoncus aliquam lacus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '41.04',\n 'selling_price' => '276.67',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:46',\n 'updated_at' => '2018-01-17 19:40:46',\n ),\n 418 =>\n array(\n 'id' => 455,\n 'upc_ean_isbn' => '989762732-4',\n 'item_name' => 'Pepper Squash',\n 'size' => '3XL',\n 'description' => 'Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '15.26',\n 'selling_price' => '205.85',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:46',\n 'updated_at' => '2018-01-17 19:40:46',\n ),\n 419 =>\n array(\n 'id' => 457,\n 'upc_ean_isbn' => '511210520-8',\n 'item_name' => 'Nutmeg - Ground',\n 'size' => 'M',\n 'description' => 'In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est congue elementum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '93.04',\n 'selling_price' => '222.89',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:46',\n 'updated_at' => '2018-01-17 19:40:46',\n ),\n 420 =>\n array(\n 'id' => 458,\n 'upc_ean_isbn' => '117392002-1',\n 'item_name' => 'Pork Ham Prager',\n 'size' => '3XL',\n 'description' => 'Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '8.15',\n 'selling_price' => '230.64',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:46',\n 'updated_at' => '2018-01-17 19:40:46',\n ),\n 421 =>\n array(\n 'id' => 459,\n 'upc_ean_isbn' => '038650693-0',\n 'item_name' => 'Sauce - Ranch Dressing',\n 'size' => '3XL',\n 'description' => 'Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '24.95',\n 'selling_price' => '209.91',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:46',\n 'updated_at' => '2018-01-17 19:40:46',\n ),\n 422 =>\n array(\n 'id' => 460,\n 'upc_ean_isbn' => '082744291-2',\n 'item_name' => 'Beer - Alexander Kieths, Pale Ale',\n 'size' => 'XL',\n 'description' => 'Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '40.66',\n 'selling_price' => '213.31',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:46',\n 'updated_at' => '2018-01-17 19:40:46',\n ),\n 423 =>\n array(\n 'id' => 462,\n 'upc_ean_isbn' => '538135618-8',\n 'item_name' => 'Vodka - Moskovskaya',\n 'size' => 'M',\n 'description' => 'Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue. Aliquam erat volutpat. In congue. Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '34.80',\n 'selling_price' => '242.51',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:46',\n 'updated_at' => '2018-01-17 19:40:46',\n ),\n 424 =>\n array(\n 'id' => 464,\n 'upc_ean_isbn' => '810178414-4',\n 'item_name' => 'Juice - Clamato, 341 Ml',\n 'size' => 'S',\n 'description' => 'Nulla tempus. Vivamus in felis eu sapien cursus vestibulum. Proin eu mi. Nulla ac enim. In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '96.85',\n 'selling_price' => '295.56',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:46',\n 'updated_at' => '2018-01-17 19:40:46',\n ),\n 425 =>\n array(\n 'id' => 465,\n 'upc_ean_isbn' => '725176993-X',\n 'item_name' => 'Pasta - Rotini, Colour, Dry',\n 'size' => '3XL',\n 'description' => 'Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '33.95',\n 'selling_price' => '255.26',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:46',\n 'updated_at' => '2018-01-17 19:40:46',\n ),\n 426 =>\n array(\n 'id' => 467,\n 'upc_ean_isbn' => '836511558-1',\n 'item_name' => 'Beef - Ground Lean Fresh',\n 'size' => 'S',\n 'description' => 'In eleifend quam a odio. In hac habitasse platea dictumst. Maecenas ut massa quis augue luctus tincidunt. Nulla mollis molestie lorem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '90.80',\n 'selling_price' => '292.10',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:46',\n 'updated_at' => '2018-01-17 19:40:46',\n ),\n 427 =>\n array(\n 'id' => 468,\n 'upc_ean_isbn' => '382219143-4',\n 'item_name' => 'Pea - Snow',\n 'size' => 'M',\n 'description' => 'Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus. Duis at velit eu est congue elementum. In hac habitasse platea dictumst. Morbi vestibulum, velit id pretium iaculis, diam erat fermentum justo, nec condimentum neque sapien placerat ante. Nulla justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '16.11',\n 'selling_price' => '281.13',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:46',\n 'updated_at' => '2018-01-17 19:40:46',\n ),\n 428 =>\n array(\n 'id' => 470,\n 'upc_ean_isbn' => '714104620-8',\n 'item_name' => 'Muffin Mix - Carrot',\n 'size' => '2XL',\n 'description' => 'Pellentesque at nulla. Suspendisse potenti. Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '14.89',\n 'selling_price' => '240.34',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:46',\n 'updated_at' => '2018-01-17 19:40:46',\n ),\n 429 =>\n array(\n 'id' => 471,\n 'upc_ean_isbn' => '162532504-5',\n 'item_name' => 'Soup Campbells Split Pea And Ham',\n 'size' => 'L',\n 'description' => 'Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '18.17',\n 'selling_price' => '265.32',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 430 =>\n array(\n 'id' => 472,\n 'upc_ean_isbn' => '572329764-3',\n 'item_name' => 'Tuna - Loin',\n 'size' => 'S',\n 'description' => 'Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum. Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est. Phasellus sit amet erat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '73.26',\n 'selling_price' => '241.09',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 431 =>\n array(\n 'id' => 473,\n 'upc_ean_isbn' => '740515179-5',\n 'item_name' => 'Cheese Cloth No 100',\n 'size' => 'L',\n 'description' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '2.69',\n 'selling_price' => '291.24',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 432 =>\n array(\n 'id' => 474,\n 'upc_ean_isbn' => '275142746-4',\n 'item_name' => 'Parasol Pick Stir Stick',\n 'size' => 'XL',\n 'description' => 'Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '93.95',\n 'selling_price' => '291.96',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 433 =>\n array(\n 'id' => 475,\n 'upc_ean_isbn' => '599398149-0',\n 'item_name' => 'Okra',\n 'size' => 'S',\n 'description' => 'Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros. Vestibulum ac est lacinia nisi venenatis tristique. Fusce congue, diam id ornare imperdiet, sapien urna pretium nisl, ut volutpat sapien arcu sed augue.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '95.14',\n 'selling_price' => '222.40',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 434 =>\n array(\n 'id' => 476,\n 'upc_ean_isbn' => '703345823-1',\n 'item_name' => 'Goldschalger',\n 'size' => '2XL',\n 'description' => 'Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '16.81',\n 'selling_price' => '220.31',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 435 =>\n array(\n 'id' => 477,\n 'upc_ean_isbn' => '414504267-0',\n 'item_name' => 'Beef Cheek Fresh',\n 'size' => 'L',\n 'description' => 'Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '15.25',\n 'selling_price' => '284.78',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 436 =>\n array(\n 'id' => 478,\n 'upc_ean_isbn' => '186204803-7',\n 'item_name' => 'Pumpkin',\n 'size' => 'S',\n 'description' => 'Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '23.47',\n 'selling_price' => '287.27',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 437 =>\n array(\n 'id' => 479,\n 'upc_ean_isbn' => '602197950-8',\n 'item_name' => 'Salad Dressing',\n 'size' => 'S',\n 'description' => 'Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '41.26',\n 'selling_price' => '203.52',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 438 =>\n array(\n 'id' => 480,\n 'upc_ean_isbn' => '696891040-3',\n 'item_name' => 'Soup - Campbells Tomato Ravioli',\n 'size' => 'XS',\n 'description' => 'Cras in purus eu magna vulputate luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vestibulum sagittis sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '22.68',\n 'selling_price' => '258.92',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 439 =>\n array(\n 'id' => 481,\n 'upc_ean_isbn' => '768279107-1',\n 'item_name' => 'Muffin Mix - Chocolate Chip',\n 'size' => 'XS',\n 'description' => 'Donec semper sapien a libero. Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla. Sed accumsan felis. Ut at dolor quis odio consequat varius. Integer ac leo. Pellentesque ultrices mattis odio. Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '54.01',\n 'selling_price' => '244.79',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 440 =>\n array(\n 'id' => 482,\n 'upc_ean_isbn' => '377596371-5',\n 'item_name' => 'Island Oasis - Lemonade',\n 'size' => '2XL',\n 'description' => 'Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '96.16',\n 'selling_price' => '236.54',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 441 =>\n array(\n 'id' => 483,\n 'upc_ean_isbn' => '737808965-6',\n 'item_name' => 'Beef - Kobe Striploin',\n 'size' => 'XS',\n 'description' => 'Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '97.38',\n 'selling_price' => '279.19',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 442 =>\n array(\n 'id' => 484,\n 'upc_ean_isbn' => '581037118-3',\n 'item_name' => 'Lamb - Whole Head Off',\n 'size' => '3XL',\n 'description' => 'Donec vitae nisi. Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '64.67',\n 'selling_price' => '297.58',\n 'expiry' => NULL,\n 'created_by' => 5,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:47',\n 'updated_at' => '2018-01-17 19:40:47',\n ),\n 443 =>\n array(\n 'id' => 485,\n 'upc_ean_isbn' => '534771571-5',\n 'item_name' => 'Oranges - Navel, 72',\n 'size' => 'XL',\n 'description' => 'Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '44.38',\n 'selling_price' => '228.66',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:48',\n 'updated_at' => '2018-01-17 19:40:48',\n ),\n 444 =>\n array(\n 'id' => 486,\n 'upc_ean_isbn' => '868182057-5',\n 'item_name' => 'Apricots Fresh',\n 'size' => '3XL',\n 'description' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl. Aenean lectus. Pellentesque eget nunc. Donec quis orci eget orci vehicula condimentum. Curabitur in libero ut massa volutpat convallis. Morbi odio odio, elementum eu, interdum eu, tincidunt in, leo. Maecenas pulvinar lobortis est.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '31.44',\n 'selling_price' => '223.16',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:48',\n 'updated_at' => '2018-01-17 19:40:48',\n ),\n 445 =>\n array(\n 'id' => 488,\n 'upc_ean_isbn' => '858724587-2',\n 'item_name' => 'Lettuce - Lambs Mash',\n 'size' => '3XL',\n 'description' => 'Curabitur gravida nisi at nibh. In hac habitasse platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer eget, rutrum at, lorem. Integer tincidunt ante vel ipsum. Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo placerat. Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '14.41',\n 'selling_price' => '292.55',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:48',\n 'updated_at' => '2018-01-17 19:40:48',\n ),\n 446 =>\n array(\n 'id' => 489,\n 'upc_ean_isbn' => '366136942-3',\n 'item_name' => 'Table Cloth 54x72 White',\n 'size' => 'XS',\n 'description' => 'Phasellus in felis. Donec semper sapien a libero. Nam dui. Proin leo odio, porttitor id, consequat in, consequat ut, nulla.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '84.10',\n 'selling_price' => '259.81',\n 'expiry' => NULL,\n 'created_by' => 4,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:48',\n 'updated_at' => '2018-01-17 19:40:48',\n ),\n 447 =>\n array(\n 'id' => 490,\n 'upc_ean_isbn' => '343049965-8',\n 'item_name' => 'Beef - Ox Tongue, Pickled',\n 'size' => 'XS',\n 'description' => 'Nulla suscipit ligula in lacus. Curabitur at ipsum ac tellus semper interdum.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '89.45',\n 'selling_price' => '228.05',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:48',\n 'updated_at' => '2018-01-17 19:40:48',\n ),\n 448 =>\n array(\n 'id' => 491,\n 'upc_ean_isbn' => '712756772-7',\n 'item_name' => 'Wine - Jaboulet Cotes Du Rhone',\n 'size' => 'S',\n 'description' => 'Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '32.93',\n 'selling_price' => '216.89',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:48',\n 'updated_at' => '2018-01-17 19:40:48',\n ),\n 449 =>\n array(\n 'id' => 492,\n 'upc_ean_isbn' => '694266516-9',\n 'item_name' => 'Nut - Almond, Blanched, Sliced',\n 'size' => 'XL',\n 'description' => 'Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi. Integer ac neque. Duis bibendum. Morbi non quam nec dui luctus rutrum. Nulla tellus. In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '52.39',\n 'selling_price' => '228.74',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:48',\n 'updated_at' => '2018-01-17 19:40:48',\n ),\n 450 =>\n array(\n 'id' => 493,\n 'upc_ean_isbn' => '782259617-9',\n 'item_name' => 'Bagel - 12 Grain Preslice',\n 'size' => 'XL',\n 'description' => 'In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at velit. Vivamus vel nulla eget eros elementum pellentesque.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '88.53',\n 'selling_price' => '285.47',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:48',\n 'updated_at' => '2018-01-17 19:40:48',\n ),\n 451 =>\n array(\n 'id' => 494,\n 'upc_ean_isbn' => '563204347-9',\n 'item_name' => 'Sobe - Tropical Energy',\n 'size' => 'M',\n 'description' => 'Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem. Fusce consequat. Nulla nisl. Nunc nisl. Duis bibendum, felis sed interdum venenatis, turpis enim blandit mi, in porttitor pede justo eu massa. Donec dapibus.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '71.04',\n 'selling_price' => '254.22',\n 'expiry' => NULL,\n 'created_by' => 6,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:48',\n 'updated_at' => '2018-01-17 19:40:48',\n ),\n 452 =>\n array(\n 'id' => 495,\n 'upc_ean_isbn' => '666702641-5',\n 'item_name' => 'Beef - Roasted, Cooked',\n 'size' => 'L',\n 'description' => 'Cras pellentesque volutpat dui. Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti. Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris. Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '68.88',\n 'selling_price' => '281.78',\n 'expiry' => NULL,\n 'created_by' => 2,\n 'branch_id' => 2,\n 'created_at' => '2018-01-17 19:40:48',\n 'updated_at' => '2018-01-17 19:40:48',\n ),\n 453 =>\n array(\n 'id' => 496,\n 'upc_ean_isbn' => '101983160-X',\n 'item_name' => 'Squash - Guords',\n 'size' => '3XL',\n 'description' => 'Pellentesque viverra pede ac diam.',\n 'avatar' => 'no-foto.png',\n 'cost_price' => '72.44',\n 'selling_price' => '202.13',\n 'expiry' => NULL,\n 'created_by' => 3,\n 'branch_id' => 1,\n 'created_at' => '2018-01-17 19:40:48',\n 'updated_at' => '2018-01-17 19:40:48',\n ),\n ));\n }", "title": "" }, { "docid": "6a9388c55b0f9c6630418698f0eb87db", "score": "0.53539705", "text": "static public function create() {\r\n $app = \\Slim\\Slim::getInstance();\r\n\r\n // get latest id\r\n $lastItemResponse = static::getModel()->getLast('/');\r\n $lastItemId = array_keys($lastItemResponse->getJson())[0];\r\n\r\n $newItemId = $lastItemId + 1;\r\n\r\n $item = [\r\n static::PRIMARY_KEY => $newItemId,\r\n 'email' => $app->request->params('email'),\r\n 'firstName' => $app->request->params('firstName'),\r\n 'lastName' => $app->request->params('lastName'),\r\n ];\r\n\r\n $response = static::getModel()->push('/'.$newItemId, $item);\r\n\r\n var_dump($response->getRaw());die;\r\n }", "title": "" }, { "docid": "fe174231696484f668367855042abedd", "score": "0.5339038", "text": "public function Save($item)\n {\n $this->_Save($item);\n }", "title": "" }, { "docid": "8fbc3b1c3a897262c30d741792615f73", "score": "0.5335152", "text": "public function persist(IndexDto $dto, ?string $item) : void\n {\n if (empty($item) === true) {\n return;\n }\n\n $this->watch($dto);\n\n $transaction = $this->beginTransaction($dto);\n\n $transaction->hset(\n $this->keys->makeIndexKey($dto->docType, $dto->name),\n $item,\n $dto->docId\n );\n\n $transaction->hset(\n $this->getSysKey($dto),\n $this->getSysField($dto),\n $item\n );\n\n try {\n $transaction->execute();\n } catch (AbortedMultiExecException | CommunicationException | ServerException $exception) {\n $this->persist($dto, $item);\n }\n }", "title": "" }, { "docid": "b31186f3eb1ed460c0b3ac761fb6fb8f", "score": "0.53301203", "text": "public function update(string $name, ItemInterface $item): void;", "title": "" }, { "docid": "8b74baba4a7e6a2bbcec615c6a1d94f2", "score": "0.53284067", "text": "public function save()\n\t{\n\t\t// validate required fields\n\t\tif($this->name === null) return false;\n\t\tif($this->collection_id === null) return false;\n\n\t\t$db = Site::getDB(true);\n\n\t\tif($this->created_on === null) $this->created_on = Site::getUTCDate();\n\t\t$item = get_object_vars($this);\n\t\tunset($item['custom']);\n\n\t\t// update\n\t\tif($this->id !== null) $db->update('items', $item, 'id = ?', $this->id);\n\n\t\t// insert\n\t\telse $this->id = $db->insert('items', $item);\n\n\t\t// (re-)insert custom values\n\t\t$i = 0;\n\t\t$db->delete('items_properties', 'item_id = ?', array($this->id));\n\t\tforeach((array) $this->custom as $custom)\n\t\t{\n\t\t\t$property = array(\n\t\t\t\t'item_id' => $this->id,\n\t\t\t\t'name' => $custom['name'],\n\t\t\t\t'value' => $custom['value'],\n\t\t\t\t'sequence' => $i++\n\t\t\t);\n\t\t\t$db->insert('items_properties', $property);\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "20c20b5820c0f7ea955178f8f2ccab93", "score": "0.5328341", "text": "public function update(){\n try{\n $entity = Val::getPayload($this,$this->TABLE_NAME);\n\n if(is_string($entity)){\n $entity = json_decode($entity,true);\n }\n\n $entity = ((array) $entity);\n\n $entity = R::dispense($entity);\n if($entity->id == 0){\n throw new Exception(\"Speichern einer entity ist so nicht möglich\");\n }\n\n $this->beforeUpdate($entity);\n R::store($entity);\n $this->afterUpdate($entity);\n\n $this->returnObject($entity,200);\n }catch (Exception $e){\n $this->makeResponse(null,$e->getMessage(),null,$e->getTraceAsString());\n }\n }", "title": "" }, { "docid": "41e247c2a4532cafc01bca8a5b137f45", "score": "0.53269154", "text": "public static function PodioItem_update($item_id, $attributes = [], $options = [])\n {\n try {\n self::rate_limit_check();\n return \\Podio::put(\"/item/{$item_id}\", $attributes, $options)->json_body();\n } catch (\\Exception $exception) {\n Log::info($exception);\n }\n }", "title": "" }, { "docid": "54ea97ade6bfa157f8037a6a1572c068", "score": "0.5316973", "text": "public function store(CreateItemRequest $request)\n {\n $input = $request->all();\n\n $v_index = $input['v_index'];\n $item = Item::where('v_index', $v_index)->first();\n\n if ($item)\n {\n Session::flash('error', '既に同じ管理番号を存在します。');\n return redirect('/basic/item');\n }\n else\n {\n $huri_item_name = $input['huri_item_name'];\n $item = Item::where('huri_item_name', $huri_item_name)->first();\n\n if ($item)\n {\n Session::flash('error', '既に同じ項目のフリガナ名を存在します。');\n return redirect('/basic/item');\n }\n else\n {\n $item_name = $input['item_name'];\n $item = Item::where('item_name', $item_name)->first();\n\n if ($item) {\n Session::flash('error', '既に同じ項目名を存在します。');\n return redirect('/basic/item');\n }\n else\n {\n Item::create($input);\n Session::flash('success', '正常に作成。');\n return redirect('/basic/item');\n }\n }\n }\n }", "title": "" }, { "docid": "79b014a28d7331534fbad09af1de35a1", "score": "0.53164643", "text": "public function updated(Item $item)\n {\n if (app()->runningInConsole() || config('app.env') === 'testing')\n {\n return;\n }\n if ($item->searchable) {\n UpdateElasticEntry::dispatch($item, 'BOOKMARK_ITEM', \"brain/{uuid}/bookmark/items/$item->id\");\n } else {\n CreateElasticEntry::dispatch($item, 'BOOKMARK_ITEM', \"brain/{uuid}/bookmark/items/$item->id\");\n }\n }", "title": "" }, { "docid": "8e5874c30953075497498a04534cfbf1", "score": "0.53149647", "text": "public function testUpdateItemNoItemId(): void {\n\t\tunset ( $_SESSION ['error'] );\n\t\t$this->populateUserItems ();\n\t\t$pdo = TestPDO::getInstance ();\n\t\t$system = new System ( $pdo );\n\t\t$i = new Item ( $pdo );\n\t\t$i->title = self::TITLE_16;\n\t\t$system->updateItem ( $i );\n\t\t$this->assertTrue( isset ( $_SESSION ['error'] ));\n\t\t$this->assertEquals ( self::ERROR_ITEM_ID_NOT_EXIST, $_SESSION ['error'] );\n\t}", "title": "" }, { "docid": "4081e53bdb4eac9c8321c3bc85c15895", "score": "0.5308877", "text": "public function update(Request $request, Item $item)\n {\n $items = Item::findOrFail($item);\n\n $item->name = $request->name;\n $item->description = $request->description;\n $item->initial_price = $request->initial_price;\n $item->end_date_time = Carbon::parse($request->end_date_time);\n $item->user_id = $request->user_id;\n\n\n if($request['image_name']){\n $image_file = $request->file('image');\n $filename = $request->user_id . '_' . $image_file->getClientOriginalName();\n\n if($image_file){\n Storage::disk('local')->put($filename, File::get($image_file));\n }\n\n $item->image_name = $filename;\n }\n\n $item->update();\n\n return redirect('/items');\n }", "title": "" }, { "docid": "b4e94e66a64686f79988cf0121e5d51a", "score": "0.53009385", "text": "private function setItem($itemid) {\n $q = $this->db->prepare(\"SELECT * FROM `shop_items` WHERE ID=:id\");\n $q->bindParam(\":id\",$itemid);\n $q->execute();\n $q = $q->fetchAll();\n if ($q == []) {\n throw new Exception(\"404|Item not found\");\n }\n $q = $q[0];\n $this->magic = $q['magic'];\n $this->ID = $q['ID'];\n $this->name = $q['name'];\n $this->type = $q['type'];\n $this->attack = $q['attack'];\n $this->defense = $q['defense'];\n $this->speed = $q['speed'];\n $this->weight = $q['weight'];\n $this->can_be_bought = $q['can_be_bought'];\n $this->can_eq = $q['can_eq'];\n $this->about = $q['about'];\n $this->inshop = $q['inshop'];\n $this->minlvl = $q['minlvl'];\n $this->emoji = $q['emoji'];\n $this->price = $q['price'];\n $this->tag = $q['tag'];\n $this->own_limit = $q['own_limit'];\n $this->capacity = $q['capacity'];\n $this->token = $q['token'];\n }", "title": "" }, { "docid": "812d36545905da826a0868c8350612f8", "score": "0.52977586", "text": "public function store(Request $request)\n {\n\n $request->validate($this->rules);\n $item = $request->input('item');\n\n if ( is_null($item['id']) )\n {\n $saved = Provincia::create($item);\n }\n else\n {\n $saved = Provincia::where([\n 'id' => $item['id']\n ])->update($this->filterMeta($item));\n }\n\n return $this->success($saved);\n }", "title": "" }, { "docid": "6ae9c48cab6d9db6dab8077a6eb11271", "score": "0.52903694", "text": "function store($data)\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\t\t\n\t\t$item =& $this->getTable('quickfaq_items', '');\n\t\t$user\t=& JFactory::getUser();\n\t\t\n\t\t$details\t= JRequest::getVar( 'details', array(), 'post', 'array');\n\t\t$tags \t\t= JRequest::getVar( 'tag', array(), 'post', 'array');\n\t\t$cats \t\t= JRequest::getVar( 'cid', array(), 'post', 'array');\n\t\t$files\t\t= JRequest::getVar( 'fid', array(), 'post', 'array');\n\t\t$files \t\t= array_filter($files);\n\t\t\n\t\t//At least one category needs to be assigned\n\t\tif (!is_array( $cats ) || count( $cats ) < 1) {\n\t\t\t$this->setError('SELECT CATEGORY');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// bind it to the table\n\t\tif (!$item->bind($data)) {\n\t\t\t$this->setError($this->_db->getErrorMsg());\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$item->bind($details);\n\n\t\t// sanitise id field\n\t\t$item->id = (int) $item->id;\n\t\t\n\t\t$nullDate\t= $this->_db->getNullDate();\n\n\t\t// Are we saving from an item edit?\n\t\tif ($item->id) {\n\t\t\t$item->modified \t\t= gmdate('Y-m-d H:i:s');\n\t\t\t$item->modified_by \t= $user->get('id');\n\t\t} else {\n\t\t\t$item->modified \t\t= $nullDate;\n\t\t\t$item->modified_by \t= '';\n\n\t\t\t//get time and userid\n\t\t\t$item->created \t\t\t= gmdate('Y-m-d H:i:s');\n\t\t\t$item->created_by\t\t= $user->get('id');\n\t\t}\n\t\t\n\t\t// Get a state and parameter variables from the request\n\t\t$item->state\t= JRequest::getVar( 'state', 0, '', 'int' );\n\t\t$params\t\t= JRequest::getVar( 'params', null, 'post', 'array' );\n\n\t\t// Build parameter INI string\n\t\tif (is_array($params))\n\t\t{\n\t\t\t$txt = array ();\n\t\t\tforeach ($params as $k => $v) {\n\t\t\t\t$txt[] = \"$k=$v\";\n\t\t\t}\n\t\t\t$item->attribs = implode(\"\\n\", $txt);\n\t\t}\n\n\t\t// Get metadata string\n\t\t$metadata = JRequest::getVar( 'meta', null, 'post', 'array');\n\t\tif (is_array($params))\n\t\t{\n\t\t\t$txt = array();\n\t\t\tforeach ($metadata as $k => $v) {\n\t\t\t\tif ($k == 'description') {\n\t\t\t\t\t$item->meta_description = $v;\n\t\t\t\t} elseif ($k == 'keywords') {\n\t\t\t\t\t$item->meta_keywords = $v;\n\t\t\t\t} else {\n\t\t\t\t\t$txt[] = \"$k=$v\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$item->metadata = implode(\"\\n\", $txt);\n\t\t}\n\t\t\n\t\tquickfaq_html::saveContentPrep($item);\n\t\t\n\t\tif (!$item->id) {\n\t\t\t$item->ordering = $item->getNextOrder();\n\t\t}\n\t\t\n\t\t// Make sure the data is valid\n\t\tif (!$item->check()) {\n\t\t\t$this->setError($item->getError());\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$item->version++;\n\n\t\t// Store it in the db\n\t\tif (!$item->store()) {\n\t\t\t$this->setError($this->_db->getErrorMsg());\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->_item\t=& $item;\n\t\t\n\t\t//store tag relation\n\t\t$query = 'DELETE FROM #__quickfaq_tags_item_relations WHERE itemid = '.$item->id;\n\t\t$this->_db->setQuery($query);\n\t\t$this->_db->query();\n\t\t\t\n\t\tforeach($tags as $tag)\n\t\t{\n\t\t\t$query = 'INSERT INTO #__quickfaq_tags_item_relations (`tid`, `itemid`) VALUES(' . $tag . ',' . $item->id . ')';\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_db->query();\n\t\t}\n\t\t\n\t\t//store cat relation\n\t\t$query = 'DELETE FROM #__quickfaq_cats_item_relations WHERE itemid = '.$item->id;\n\t\t$this->_db->setQuery($query);\n\t\t$this->_db->query();\n\t\t\t\n\t\tforeach($cats as $cat)\n\t\t{\n\t\t\t$query = 'INSERT INTO #__quickfaq_cats_item_relations (`catid`, `itemid`) VALUES(' . $cat . ',' . $item->id . ')';\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_db->query();\n\t\t}\n\t\t\n\t\t//store file relation\n\t\t$query = 'DELETE FROM #__quickfaq_files_item_relations WHERE itemid = '.$item->id;\n\t\t$this->_db->setQuery($query);\n\t\t$this->_db->query();\n\t\t\t\n\t\tforeach($files as $file)\n\t\t{\n\t\t\t$query = 'INSERT INTO #__quickfaq_files_item_relations (`fileid`, `itemid`) VALUES(' . $file . ',' . $item->id . ')';\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_db->query();\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a496e1e95aa2789b0437559c45e29e64", "score": "0.5289892", "text": "public function store(Request $request)\n {\n // dd($request->all());\n $this->validate($request, [\n // 'itemid' => 'required|max:100|min:5',\n // 'customid' => 'unique:items,custom_id|max:100|min:5',\n 'itemname' => 'required|max:64|min:2|unique:items,name',\n 'location' => 'required|max:128|min:2',\n 'note' => 'max:512',\n 'bought_year' => 'date'\n ]);\n\n $res=[\"status\" => \"\"];\n \\DB::beginTransaction();\n\n $itemid = trim($request->input('itemid'));\n $itemname = trim($request->input('itemname'));\n $location = trim($request->input('location'));\n\n try {\n $tracking = null;\n $item = new Item;\n if ($itemid=='') {\n //If user doesn't put any ID\n $item->item_id = $this->generateRandomId();\n $item->custom_id = $item->item_id;\n } else { \n if (Item::where('item_id', $itemid)->exists()) {\n $item->item_id = $itemid;\n if (Tracking::where('item_id', $itemid)->exists()) {\n //This itemid is already tracked.\n $tracking = Tracking::where('item_id', $itemid)->first();\n $item->custom_id = $itemid.'_'.$tracking->tracking;\n\n //update tracking No\n if ((int)$tracking->tracking<9) {\n $tracking->tracking = '0'.strval(intval($tracking->tracking)+1);\n } else {\n $tracking->tracking = strval(intval($tracking->tracking)+1);\n }\n $tracking->save();\n } else {\n //This itemid is not tracked yet.\n \\DB::table('tracking')->insert(['item_id' => $itemid, 'tracking' => '02']);\n \\DB::table('items')\n ->where('item_id', $itemid)\n ->update(['custom_id' => $itemid.'_00']);\n $item->custom_id = $itemid.'_01';\n }\n } else {\n $item->item_id = $itemid;\n $item->custom_id = $itemid;\n }\n }\n $item->name = $itemname;\n $item->status = $request->input('status');\n $item->location = $location;\n $item->category_id = $request->input('category');\n if ($request->input('note') !== \"\") {\n $item->note = trim($request->input('note'));\n }\n if ($request->input('bought_year') !== \"\") {\n $item->bought_year = trim($request->input('bought_year'));\n }\n \n $item->save();\n \\DB::commit();\n } catch (Exception $e) {\n \\DB::rollback();\n $res = [\"status\" => \"error_exception\", \"err_msg\" => $e->getMessage()];\n flash($res['message'], $res['status']);\n return redirect()->route('item.index');\n }\n\n $res['status'] = \"success\";\n $res['message'] = \"Create Item Success\";\n\n flash($res['message'], $res['status']);\n return redirect()->route('item.index');\n }", "title": "" }, { "docid": "df37fb7784099214e5f116f1a9f24f94", "score": "0.52847594", "text": "public function sendToDB ($item)\n {\n\t\t$item = $this->checkIntegrity($item);\n\n // encrypt all links\n $item = self::treatLinks($item);\n\n\t\tApp::debug(json_encode($item) . \"\\n\");\n\n if (!App::config(\"debug\") || true)\n {\n $success = $this->getMatcher()->match($item);\n\n // create new medias only if item has more data than a simple title\n if (!$success && sizeof($item) > 4) {\n $this->getMatcher()->createMedia($item);\n }\n }\n\t}", "title": "" }, { "docid": "f91029ceb2cc7749a2aebaae763afbae", "score": "0.5277779", "text": "public function databaseWrite()\n\t\t\t{\n\t\t\t\tif(!$this->get(\"row_id\") || !$this->exists(array(\"row_id\" => $this->get(\"row_id\"))))\n\t\t\t\t{\n\t\t\t\t\t$this->set(\"row_id\",self::nextRowId());\n\t\t\t\t\t$sql = \"INSERT INTO verifications (row_id) VALUES ('\".$this->get(\"row_id\").\"');\";\n\t\t\t\t\tnew Query($GLOBALS['gConn'],$sql);\n\t\t\t\t}\n\t\t\t\t$temp = $this->data;\n\t\t\t\tforeach($temp as $key => $value)\n\t\t\t\t{\n\t\t\t\t\tif(strtolower($key) !== \"row_id\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"UPDATE verifications SET \".$key.\"='\".$value.\"' WHERE row_id='\".$this->get(\"row_id\").\"';\";\n\t\t\t\t\t\tnew Query($GLOBALS['gConn'],$sql);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "3917308e9dfd067a67b7dfe09ff70db6", "score": "0.5272838", "text": "public function addData($item) {\n $this->_objects []= $item;\n }", "title": "" }, { "docid": "a7e896cfb0e9c46e1d7d26f87f2aa112", "score": "0.52702737", "text": "public function save() {\n //instantiates new database object\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'title' => $this->title,\n 'description' => $this->description,\n 'price' => $this->price,\n 'sizes' => $this->sizes,\n 'image_url' => $this->image_url,\n 'creator_id' => $this->creator_id\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "title": "" }, { "docid": "238396ec574e595348a7e88a754f6d57", "score": "0.52622193", "text": "function saveItem($form) {\n $data = array();\n\n $result = $form->prepareDaoFromControls('booster~boo_items');\n $dao = $result['dao'];\n $record = $result['daorec'];\n $record->status = self::STATUS_INVALID; //will need moderation\n\n if ($dao->insert($record)) {\n $id_booster = $record->id;\n $data['id'] = $id_booster;\n $data['name'] = $form->getData('name');\n\n $record->image = $this->saveImage($id_booster, $form, false);\n $dao->update($record);\n }\n\n return $data;\n }", "title": "" }, { "docid": "fa50fc48f6064097b123a65de2594b29", "score": "0.5259356", "text": "function save(&$item_data,$item_id=false)\r\n\t{\r\n\t\tif (!$item_id or !$this->exists($item_id))\r\n\t\t{\r\n\t\t\tif($this->db->insert('items',$item_data))\r\n\t\t\t{\r\n\t\t\t\t$item_data['item_id']=$this->db->insert_id();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$this->db->where('item_id', $item_id);\r\n\t\t$this->db->update('items',$item_data);\r\n return $this->update_all_bom_cost();\r\n\t}", "title": "" }, { "docid": "60285e36cef9bcab1623ea4ac9775c31", "score": "0.525676", "text": "public function update_item()\n\t{\n\t\tforeach ($this->EE->TMPL->tagparams as $key => $value)\n\t\t{\n\t\t\tif (preg_match('/^item_options?:(.*)$/', $key, $match))\n\t\t\t{\n\t\t\t\tunset($this->EE->TMPL->tagparams[$key]);\n\t\t\t\t\n\t\t\t\t$this->EE->TMPL->tagparams['item_options'][$match[1]] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$data = $this->EE->TMPL->tagparams;\n\t\t\n\t\t//should I?\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\t\t\t$data = array_merge($data, xss_clean($_POST));\n\t\t}\n\n\t\tif ($item = $this->EE->cartthrob->cart->item($this->EE->TMPL->fetch_param('row_id')))\n\t\t{\n\t\t\t$item->update($this->EE->TMPL->tagparams);\n\t\t\n\t\t\t$this->EE->cartthrob->cart->save();\n\t\t}\n\n\t\t$this->EE->template_helper->tag_redirect($this->EE->TMPL->fetch_param('return'));\n\t}", "title": "" }, { "docid": "4ec08867323b2aa06d5031cbf8b1ed0b", "score": "0.5248916", "text": "public function create() {\n $this->item->createItem();\n $idReturn = $this->item->getIdPue();\n $this->selectID();\n }", "title": "" }, { "docid": "6f3d10f48f7eca13c243d38cece050c6", "score": "0.5246186", "text": "public function save()\n\t{\n\t\t// Update the record\n\t\t$sth = ThumbsUp::db()->prepare('UPDATE '.ThumbsUp::config('database_table_prefix').'items SET name = ?, closed = ?, votes_up = ?, votes_down = ?, date = ? WHERE id = ?');\n\t\t$sth->execute(array($this->name, $this->closed, $this->votes_up, $this->votes_down, $this->date, $this->id));\n\n\t\t// Recalculate votes since votes_up or votes_down could have been changed\n\t\t$this->calculate_votes();\n\t}", "title": "" }, { "docid": "f2ad011b088cd18cfa03d5c10c09ce82", "score": "0.52454", "text": "function update_item($itemid, $item) {\n\t\t$upd_app = (isset($item['applications']) && !is_null($item['applications']));\n\t\t$item_in_params = $item;\n\n\t\t$item_data = get_item_by_itemid_limited($itemid);\n\t\t$item_data['applications'] = get_applications_by_itemid($itemid);\n\n\t\tif (!check_db_fields($item_data, $item)) {\n\t\t\terror(S_INCORRECT_ARGUMENTS_PASSED_TO_FUNCTION.SPACE.'[update_item]');\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!$host = get_host_by_hostid($item['hostid'])) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (($i = array_search(0,$item['applications'])) !== FALSE) {\n\t\t\tunset($item['applications'][$i]);\n\t\t}\n\n\t\tif (!itemIsValid($item['key_'], $item['type'], $item['value_type'], $item['delay'], $item['delay_flex'], $item['snmp_port'])) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($item['value_type'] == ITEM_VALUE_TYPE_STR) {\n\t\t\t$item['delta'] = 0;\n\t\t}\n\n\t\tif ($item['value_type'] != ITEM_VALUE_TYPE_UINT64) {\n\t\t\t$item['data_type'] = 0;\n\t\t}\n\n\t\t$sql = 'SELECT itemid, hostid, templateid '.\n\t\t\t\t' FROM items '.\n\t\t\t\t' WHERE hostid='.$item['hostid'].\n\t\t\t\t\t' AND itemid<>'.$itemid.\n\t\t\t\t\t' AND key_='.zbx_dbstr($item['key_']);\n\t\t$db_item = DBfetch(DBselect($sql));\n\t\tif($db_item && (($db_item['templateid'] != 0) || ($item['templateid'] == 0))){\n\t\t\terror(S_AN_ITEM_WITH_THE_KEY.SPACE.'['.$item['key_'].']'.SPACE.S_ALREADY_EXISTS_FOR_HOST_SMALL.SPACE.'['.$host['host'].'].'.SPACE.S_THE_KEY_MUST_BE_UNIQUE);\n\t\t\treturn FALSE;\n\t\t}\n// first update child items\n\t\t$db_tmp_items = DBselect('SELECT itemid, hostid FROM items WHERE templateid='.$itemid);\n\t\twhile($db_tmp_item = DBfetch($db_tmp_items)){\n\t\t\t$child_item_params = $item_in_params;\n\n\t\t\t$child_item_params['hostid'] = $db_tmp_item['hostid'];\n\t\t\t$child_item_params['templateid'] = $itemid;\n\n\t\t\tif($upd_app){\n\t\t\t\t$child_item_params['applications'] = get_same_applications_for_host($item['applications'], $db_tmp_item['hostid']);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$child_item_params['applications'] = null;\n\t\t\t}\n\n\t\t\tif(!check_db_fields($db_tmp_item, $child_item_params)){\n\t\t\t\terror(S_INCORRECT_ARGUMENTS_PASSED_TO_FUNCTION.SPACE.'[update_item]');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$result = update_item($db_tmp_item['itemid'], $child_item_params);\t\t// recursion!!!\n\n\t\t\tif(!$result)\n\t\t\t\treturn $result;\n\t\t}\n\n\t\tif($db_item && $item['templateid'] != 0){\n\t\t\t$result = delete_item($db_item['itemid']);\n\t\t\tif(!$result) {\n\t\t\t\terror(S_CANNOT_UPDATE_ITEM.SPACE.\"'\".$host[\"host\"].':'.$item['key_'].\"'\");\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\n\t\t//validating item key\n\t\t$itemKey = new CItemKey($item['key_']);\n\t\tif(!$itemKey->isValid()){\n\t\t\terror(S_ERROR_IN_ITEM_KEY.SPACE.$itemKey->getError());\n\t\t\treturn false;\n\t\t}\n\n\t\t$item_old = get_item_by_itemid($itemid);\n\t\tDBexecute('UPDATE items SET lastlogsize=0, mtime=0 WHERE itemid='.$itemid.' AND key_<>'.zbx_dbstr($item['key_']));\n\n\t\tif($upd_app){\n\t\t\t$result = DBexecute('DELETE FROM items_applications WHERE itemid='.$itemid);\n\t\t\tforeach($item['applications'] as $appid){\n\t\t\t\t$itemappid=get_dbid('items_applications','itemappid');\n\t\t\t\tDBexecute('INSERT INTO items_applications (itemappid,itemid,applicationid) VALUES ('.$itemappid.','.$itemid.','.$appid.')');\n\t\t\t}\n\t\t}\n\n\t\tif($item['status'] == ITEM_STATUS_ACTIVE)\n\t\t\tDBexecute(\"UPDATE items SET error='' WHERE itemid=\".$itemid.' and status<>'.$item['status']);\n\n\t\t$result=DBexecute(\n\t\t\t'UPDATE items '.\n\t\t\t' SET description='.zbx_dbstr($item['description']).','.\n\t\t\t\t'key_='.zbx_dbstr($item['key_']).','.\n\t\t\t\t'hostid='.$item['hostid'].','.\n\t\t\t\t'delay='.$item['delay'].','.\n\t\t\t\t'history='.$item['history'].','.\n\t\t\t\t'type='.$item['type'].','.\n\t\t\t\t'snmp_community='.zbx_dbstr($item['snmp_community']).','.\n\t\t\t\t'snmp_oid='.zbx_dbstr($item['snmp_oid']).','.\n\t\t\t\t'value_type='.$item['value_type'].','.\n\t\t\t\t'data_type='.$item['data_type'].','.\n\t\t\t\t'trapper_hosts='.zbx_dbstr($item['trapper_hosts']).','.\n\t\t\t\t'snmp_port='.$item['snmp_port'].','.\n\t\t\t\t'units='.zbx_dbstr($item['units']).','.\n\t\t\t\t'multiplier='.$item['multiplier'].','.\n\t\t\t\t'delta='.$item['delta'].','.\n\t\t\t\t'snmpv3_securityname='.zbx_dbstr($item['snmpv3_securityname']).','.\n\t\t\t\t'snmpv3_securitylevel='.$item['snmpv3_securitylevel'].','.\n\t\t\t\t'snmpv3_authpassphrase='.($item['snmpv3_securitylevel'] == ITEM_SNMPV3_SECURITYLEVEL_AUTHPRIV || $item['snmpv3_securitylevel'] == ITEM_SNMPV3_SECURITYLEVEL_AUTHNOPRIV ? zbx_dbstr($item['snmpv3_authpassphrase']) : \"''\").','.\n\t\t\t\t'snmpv3_privpassphrase='.($item['snmpv3_securitylevel'] == ITEM_SNMPV3_SECURITYLEVEL_AUTHPRIV ? zbx_dbstr($item['snmpv3_privpassphrase']) : \"''\").','.\n\t\t\t\t'formula='.zbx_dbstr($item['formula']).','.\n\t\t\t\t'trends='.$item['trends'].','.\n\t\t\t\t'logtimefmt='.zbx_dbstr($item['logtimefmt']).','.\n\t\t\t\t'valuemapid='.$item['valuemapid'].','.\n\t\t\t\t'delay_flex='.zbx_dbstr($item['delay_flex']).','.\n\t\t\t\t'params='.zbx_dbstr($item['params']).','.\n\t\t\t\t'ipmi_sensor='.zbx_dbstr($item['ipmi_sensor']).','.\n\t\t\t\t'templateid='.$item['templateid'].','.\n\t\t\t\t'authtype='.$item['authtype'].','.\n\t\t\t\t'username='.zbx_dbstr($item['username']).','.\n\t\t\t\t'password='.zbx_dbstr($item['password']).','.\n\t\t\t\t'publickey='.zbx_dbstr($item['publickey']).','.\n\t\t\t\t'privatekey='.zbx_dbstr($item['privatekey']).\n\t\t\t' WHERE itemid='.$itemid);\n\n\t\tif ($result){\n\t\t\t$item_new = get_item_by_itemid($itemid);\n\t\t\tadd_audit_ext(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_ITEM, $itemid, $host['host'].':'.$item_old['description'], 'items', $item_old, $item_new);\n\t\t}\n\n\t\tupdate_item_status($itemid, $item['status']);\n\n\t\tif($result){\n\t\t\tinfo(S_ITEM.SPACE.'\"'.$host['host'].':'.$item['key_'].'\"'.SPACE.S_UPDATED_SMALL);\n\t\t}\n\n\treturn $result;\n\t}", "title": "" }, { "docid": "e663d8e7812d70d8b5c47dd26f575000", "score": "0.5244255", "text": "protected function setupUpdateOperation()\n {\n //$this->setupCreateOperation();\n // Readonly field\n $this->crud->addField([\n 'name' => 'person.full_name',\n 'label' => 'Full Name',\n 'type' => 'text',\n 'attributes' => [\n 'readonly' => 'readonly'\n ],\n 'wrapper' => [ \n 'class' => 'form-group col-md-6'\n ]\n ]);\n $this->crud->addField([\n 'name' => 'person.national_id',\n 'label' => 'National ID',\n 'type' => 'text',\n 'attributes' => [\n 'readonly' => 'readonly'\n ],\n 'wrapper' => [ \n 'class' => 'form-group col-md-6'\n ]\n ]);\n $this->crud->addField([\n 'name' => 'email',\n 'label' => 'Email',\n 'type' => 'text',\n 'attributes' => [\n 'readonly' => 'readonly'\n ],\n 'wrapper' => [ \n 'class' => 'form-group col-md-6'\n ]\n ]);\n $this->crud->addField([\n 'name' => 'phone_number',\n 'label' => 'Phone Number',\n 'type' => 'text',\n 'attributes' => [\n 'readonly' => 'readonly'\n ],\n 'wrapper' => [ \n 'class' => 'form-group col-md-6'\n ]\n ]);\n\n \n $this->crud->addField([\n 'name' => 'start_time',\n 'label' => 'Start Time',\n 'type' => 'datetime',\n 'attributes' => [\n 'readonly' => 'readonly'\n ],\n 'wrapper' => [ \n 'class' => 'form-group col-md-6'\n ]\n ]);\n $this->crud->addField([\n 'name' => 'expire_time',\n 'label' => 'Expire Time',\n 'type' => 'datetime',\n 'attributes' => [\n 'readonly' => 'readonly'\n ],\n 'wrapper' => [ \n 'class' => 'form-group col-md-6'\n ]\n ]);\n\n // Edit enable\n $this->crud->addField([ // select_from_array\n 'name' => 'status',\n 'label' => \"Status\",\n 'type' => 'select_from_array',\n 'options' => ['ACTIVATING' => 'ACTIVATING', 'DONE' => 'DONE', 'EXPIRED' => 'EXPIRED']\n ]);\n $this->crud->field('otp');\n }", "title": "" }, { "docid": "5eae703d4a88240cca523bd519baaa3d", "score": "0.52429867", "text": "public function addnewfooditem(Request $request)\r\n {\r\n $user = User::where(['api_token' => $request->api_token])->first();\r\n if($user)\r\n {\r\n $validator = Validator::make($request->all(), [\r\n 'item_name' => ['required'],\r\n 'price' => ['required', 'numeric'],\r\n 'estimated_time' => ['required'],\r\n 'description' => ['required'],\r\n ]);\r\n if(!$validator->fails())\r\n {\r\n $restorant = Restorant::where(['user_id' => $user->id])->first();\r\n\r\n $item = new Items;\r\n $item->name = $request->item_name;\r\n $item->description = $request->description;\r\n $item->price = $request->price;\r\n $item->estimated_time = $request->estimated_time;\r\n $item->category_id = 1;\r\n $item->restorant_id = $restorant->id;\r\n $item->food_type = $request->food_type;\r\n $item->created_at = date(\"Y-m-d H:i:s\");\r\n $item->updated_at = date(\"Y-m-d H:i:s\");\r\n $item->available = 1;\r\n $item->has_variants = 0;\r\n $item->vat = 0;\r\n $item->save();\r\n\r\n $item_id = $item->id;\r\n\r\n if(!is_dir($this->foodItemPath))\r\n {\r\n mkdir($this->foodItemPath, 0755);\r\n }\r\n if(!is_dir($this->foodItemPath.$item_id.\"/\"))\r\n {\r\n mkdir($this->foodItemPath.$item_id.\"/\", 0755);\r\n }\r\n\r\n $newitem = Items::find($item_id);\r\n if($request->hasFile('image'))\r\n {\r\n $image_extension = $request->file('image')->extension();\r\n if($image_extension=='jpeg' || $image_extension=='jpg' || $image_extension=='png')\r\n {\r\n $newitem->image = $this->saveImageVersions(\r\n $this->foodItemPath.$item_id.\"/\",\r\n $request->image,\r\n [\r\n ['name'=>'large','w'=>590,'h'=>400],\r\n ['name'=>'medium','w'=>295,'h'=>200],\r\n ['name'=>'thumbnail','w'=>200,'h'=>200]\r\n ]\r\n );\r\n }\r\n else\r\n {\r\n $newitem->image = $this->saveVideo(\r\n $this->foodItemPath.$item_id.\"/\",\r\n $request->image,\r\n $image_extension\r\n );\r\n }\r\n $newitem->image = url($this->foodItemPath.$item_id.\"/\".$newitem->image);\r\n }\r\n if($request->hasFile('image2'))\r\n {\r\n $image2_extension = $request->file('image2')->extension();\r\n if($image2_extension=='jpeg' || $image2_extension=='jpg' || $image2_extension=='png')\r\n {\r\n $newitem->image2 = $this->saveImageVersions(\r\n $this->foodItemPath.$item_id.\"/\",\r\n $request->image2,\r\n [\r\n ['name'=>'large','w'=>590,'h'=>400],\r\n ['name'=>'medium','w'=>295,'h'=>200],\r\n ['name'=>'thumbnail','w'=>200,'h'=>200]\r\n ]\r\n );\r\n }\r\n else\r\n {\r\n $newitem->image2 = $this->saveVideo(\r\n $this->foodItemPath.$item_id.\"/\",\r\n $request->image2,\r\n $image2_extension\r\n );\r\n }\r\n $newitem->image2 = url($this->foodItemPath.$item_id.\"/\".$newitem->image2);\r\n }\r\n if($request->hasFile('image3'))\r\n {\r\n $image3_extension = $request->file('image3')->extension();\r\n if($image3_extension=='jpeg' || $image3_extension=='jpg' || $image3_extension=='png')\r\n {\r\n $newitem->image3 = $this->saveImageVersions(\r\n $this->foodItemPath.$item_id.\"/\",\r\n $request->image3,\r\n [\r\n ['name'=>'large','w'=>590,'h'=>400],\r\n ['name'=>'medium','w'=>295,'h'=>200],\r\n ['name'=>'thumbnail','w'=>200,'h'=>200]\r\n ]\r\n );\r\n }\r\n else\r\n {\r\n $newitem->image3 = $this->saveVideo(\r\n $this->foodItemPath.$item_id.\"/\",\r\n $request->image3,\r\n $image3_extension\r\n );\r\n }\r\n $newitem->image3 = url($this->foodItemPath.$item_id.\"/\".$newitem->image3);\r\n }\r\n if($request->hasFile('image4'))\r\n {\r\n $image4_extension = $request->file('image4')->extension();\r\n if($image4_extension=='jpeg' || $image4_extension=='jpg' || $image4_extension=='png')\r\n {\r\n $newitem->image4 = $this->saveImageVersions(\r\n $this->foodItemPath.$item_id.\"/\",\r\n $request->image4,\r\n [\r\n ['name'=>'large','w'=>590,'h'=>400],\r\n ['name'=>'medium','w'=>295,'h'=>200],\r\n ['name'=>'thumbnail','w'=>200,'h'=>200]\r\n ]\r\n );\r\n }\r\n else\r\n {\r\n $newitem->image4 = $this->saveVideo(\r\n $this->foodItemPath.$item_id.\"/\",\r\n $request->image4,\r\n $image4_extension\r\n );\r\n }\r\n $newitem->image4 = url($this->foodItemPath.$item_id.\"/\".$newitem->image4);\r\n }\r\n // if($request->hasFile('image5')) {\r\n // $newitem->image5 = $this->saveImageVersions(\r\n // $this->foodItemPath.$item_id.\"/\",\r\n // $request->image5,\r\n // [\r\n // ['name'=>'large','w'=>590,'h'=>400],\r\n // ['name'=>'medium','w'=>295,'h'=>200],\r\n // ['name'=>'thumbnail','w'=>200,'h'=>200]\r\n // ]\r\n // );\r\n // $newitem->image5 = url($this->foodItemPath.$item_id.\"/\".$newitem->image5);\r\n // }\r\n $newitem->save();\r\n\r\n $item_ingredients = $request->item_ingredients;\r\n if(!is_array($request->item_ingredients)) {\r\n $item_ingredients = json_decode($request->item_ingredients, 1);\r\n }\r\n foreach($item_ingredients as $item_ingredient)\r\n {\r\n $itemingredients = new ItemIngredients;\r\n $itemingredients->item_id = $item_id;\r\n $itemingredients->ingredient_id = $item_ingredient['id'];\r\n $itemingredients->created_at = date(\"Y-m-d H:i:s\");\r\n $itemingredients->updated_at = date(\"Y-m-d H:i:s\");\r\n $itemingredients->save();\r\n }\r\n\r\n $data = array();\r\n return response()->json([\r\n 'status' => true,\r\n 'data' => $data,\r\n 'succMsg' => 'New food item added successfully.'\r\n ]);\r\n }\r\n else\r\n {\r\n return response()->json([\r\n 'status' => false,\r\n 'errMsg' => $validator->errors()\r\n ]);\r\n }\r\n }\r\n else\r\n {\r\n return response()->json([\r\n 'status' => false,\r\n 'errMsg' => 'Invalid token'\r\n ]);\r\n }\r\n }", "title": "" }, { "docid": "ebaa3d5d1e106c03427c4ca17dab0bc6", "score": "0.5242461", "text": "public function save($data)\n {\n $id = JArrayHelper::getValue($data, \"id\", 0, \"int\");\n $title = JArrayHelper::getValue($data, \"title\");\n $description = JArrayHelper::getValue($data, \"description\");\n $categoryId = JArrayHelper::getValue($data, \"catid\", 0, \"int\");\n $userId = JArrayHelper::getValue($data, \"user_id\", 0, \"int\");\n\n $keys = array(\n \"id\" => $id,\n \"user_id\" => $userId\n );\n\n // Load a record from the database\n $row = $this->getTable();\n /** @var $row UserIdeasTableItem */\n\n $row->load($keys);\n\n // If there is an id, the item is not new\n $isNew = true;\n if ($row->get(\"id\")) {\n $isNew = false;\n }\n\n $row->set(\"title\", $title);\n $row->set(\"description\", $description);\n $row->set(\"catid\", $categoryId);\n\n if ($isNew) {\n\n $recordDate = new JDate();\n $row->set(\"record_date\", $recordDate->toSql());\n $row->set(\"user_id\", $userId);\n\n // Set status\n jimport(\"userideas.statuses\");\n $statuses = UserIdeasStatuses::getInstance(JFactory::getDbo());\n $defaultStatus = $statuses->getDefault();\n\n if (!empty($defaultStatus->id)) {\n $row->set(\"status_id\", (int)$defaultStatus->id);\n }\n\n // Auto publishing\n $params = JComponentHelper::getParams($this->option);\n /** @var $params Joomla\\Registry\\Registry */\n\n $published = $params->get(\"security_item_auto_publish\", 0);\n $row->set(\"published\", $published);\n }\n\n $this->prepareTable($row);\n\n $row->store();\n\n $this->triggerAfterSaveEvent($row, $isNew);\n\n $this->cleanCache();\n\n return $row->get(\"id\");\n }", "title": "" }, { "docid": "66139d48c34ab92a5f49f5d92e5064cc", "score": "0.5240252", "text": "public function put_products($productName)\n{\n $raw = file_get_contents('php://input');\n $newProduct = Product::fromJson($raw);\n\n $db = new DataStore();\n $db->beginTransaction();\n $oldProduct = Product::productByName($db, $productName);\n if (is_null($oldProduct))\n throw new RESTException('Product not found.', 404);\n\n $oldProduct->update($db, $newProduct);\n $db->commit();\n echo('Product ' . $productName . ' updated.');\n}", "title": "" }, { "docid": "ba5eee953dea00100ad2b55517302651", "score": "0.5231955", "text": "public function update(Item $item): void\n {\n $request = $this -> db -> prepare(\"UPDATE items SET itemName= :itemName, price=:price,stock=:stock, distributor=:distributor WHERE id=:id\");\n try{\n\n $request->execute(array(\n \"id\"=>$item -> id(),\n \"itemName\" => $item -> itemName(),\n \"price\" => $item -> price(),\n \"price\" => $item -> stock(),\n \"distributor\" => $item -> distributor()\n ));\n }\n catch(\\PDOException $e){\n $exception= new ItemManagerException(\"Recovery item error in the database\",700);\n $exception->setPDOMessage($e->getMessage());\n throw $exception;\n return;\n }\n }", "title": "" }, { "docid": "903aae0c42efb336f4fff12f65317a05", "score": "0.5230915", "text": "function smart_update_item($itemid, $item=array()){\n\t\t$item_data = get_item_by_itemid_limited($itemid);\n\n\t\t$restore_rules= array(\n\t\t\t'description'\t\t=> array(),\n\t\t\t'key_'\t\t\t=> array(),\n\t\t\t'hostid'\t\t=> array(),\n\t\t\t'delay'\t\t\t=> array('template' => 1),\n\t\t\t'history'\t\t=> array('template' => 1 , 'httptest' => 1),\n\t\t\t'status'\t\t=> array('template' => 1 , 'httptest' => 1),\n\t\t\t'type'\t\t\t=> array(),\n\t\t\t'snmp_community'\t=> array('template' => 1),\n\t\t\t'snmp_oid'\t\t=> array(),\n\t\t\t'snmp_port'\t\t=> array('template' => 1),\n\t\t\t'snmpv3_securityname'\t=> array('template' => 1),\n\t\t\t'snmpv3_securitylevel'\t=> array('template' => 1),\n\t\t\t'snmpv3_authpassphrase'\t=> array('template' => 1),\n\t\t\t'snmpv3_privpassphrase'\t=> array('template' => 1),\n\t\t\t'value_type'\t\t=> array(),\n\t\t\t'data_type'\t\t=> array(),\n\t\t\t'trapper_hosts'\t\t=> array('template' =>1 ),\n\t\t\t'units'\t\t\t=> array(),\n\t\t\t'multiplier'\t\t=> array(),\n\t\t\t'delta'\t\t\t=> array('template' => 1 , 'httptest' => 1),\n\t\t\t'formula'\t\t=> array(),\n\t\t\t'trends'\t\t=> array('template' => 1 , 'httptest' => 1),\n\t\t\t'logtimefmt'\t\t=> array(),\n\t\t\t'valuemapid'\t\t=> array('httptest' => 1),\n\t\t\t'authtype'\t\t=> array('template' => 1),\n\t\t\t'username'\t\t=> array('template' => 1),\n\t\t\t'password'\t\t=> array('template' => 1),\n\t\t\t'publickey'\t\t=> array('template' => 1),\n\t\t\t'privatekey'\t\t=> array('template' => 1),\n\t\t\t'params'\t\t=> array('template' => 1),\n\t\t\t'delay_flex'\t\t=> array('template' => 1),\n\t\t\t'ipmi_sensor'\t\t=> array()\n\t\t);\n\n\t\tforeach($restore_rules as $var_name => $info){\n\t\t\tif(!isset($info['template']) && (0 != $item_data['templateid'])){\n\t\t\t\t$item[$var_name] = $item_data[$var_name];\n\t\t\t}\n\n\t\t\tif(!array_key_exists($var_name,$item)){\n\t\t\t\t$item[$var_name] = $item_data[$var_name];\n\t\t\t}\n\t\t}\n\n\t\treturn update_item($itemid,$item);\n\t}", "title": "" }, { "docid": "a7fcb5a57f0504e6f684be58b376f301", "score": "0.5222361", "text": "public function testUpdateItemInCart()\n {\n }", "title": "" }, { "docid": "7182252d4bfd37b18c80a717c1e21bfb", "score": "0.5213549", "text": "public function run()\n {\n $item = Item::create([\n 'item_code' => 'ITM-0001',\n 'name' => 'Item 0001',\n 'description' => 'Desc 0001',\n 'main_unit' => 'pcs',\n 'unit_id' => 1,\n /*'unit_name1' => 'pcs',\n 'unit_qty1' => '1',\n 'unit_name2' => 'dozens',\n 'unit_qty2' => '12',*/\n ]);\n $this->command->info('Create Item ' . $item->item_code);\n $item = Item::create([\n 'item_code' => 'STL-0002',\n 'name' => 'Steel 0002',\n 'description' => 'Desc 0002',\n 'main_unit' => 'kilogram',\n 'unit_id' => 5,\n /*'unit_name1' => 'kg',\n 'unit_qty1' => '1',\n 'unit_name2' => 'ton',\n 'unit_qty2' => '1000',*/\n ]);\n $this->command->info('Create Item ' . $item->item_code);\n $item = Item::create([\n 'item_code' => 'REB-0003',\n 'name' => 'Rebel 003',\n 'description' => 'Rebel',\n 'main_unit' => 'gram',\n 'unit_id' => 4,\n /*'unit_name1' => 'kg',\n 'unit_qty1' => '1',\n 'unit_name2' => 'pcs',\n 'unit_qty2' => '100',*/\n ]);\n $this->command->info('Create Item ' . $item->item_code);\n\n foreach(['ITM-002','ITM-003','ITM-004','ITM-005','ITM-006','ITM-007','ITM-008','ITM-009','ITM-010'] as $it){\n $item = Item::create([\n 'item_code' => $it,\n 'name' => 'I' . $it,\n 'description' => $it,\n 'main_unit' => 'pcs',\n 'unit_id' => 1,\n /*'unit_name1' => 'pcs',\n 'unit_qty1' => '1',\n 'unit_name2' => 'dozen',\n 'unit_qty2' => '12',*/\n ]);\n $this->command->info('Create Item ' . $item->item_code);\n }\n foreach(['ITM-011','ITM-012','ITM-013','ITM-014','ITM-015','ITM-016','ITM-017','ITM-018','ITM-019','ITM-020'] as $it){\n $item = Item::create([\n 'item_code' => $it,\n 'name' => 'I' . $it,\n 'description' => $it,\n 'main_unit' => 'pcs',\n 'unit_id' => 1,\n /*'unit_name1' => 'pack',\n 'unit_qty1' => '1',\n 'unit_name2' => 'pcs',\n 'unit_qty2' => '100',*/\n ]);\n $this->command->info('Create Item ' . $item->item_code);\n }\n foreach(['ITM-021','ITM-022','ITM-023','ITM-024','ITM-025','ITM-026','ITM-027','ITM-028','ITM-029','ITM-030'] as $it){\n $item = Item::create([\n 'item_code' => $it,\n 'name' => 'I' . $it,\n 'description' => $it,\n 'main_unit' => 'pcs',\n 'unit_id' => 1,\n /*'unit_name1' => 'kg',\n 'unit_qty1' => '1',\n 'unit_name2' => 'ton',\n 'unit_qty2' => '1000', //1 ton = 1000 kg*/\n ]);\n $this->command->info('Create Item ' . $item->item_code);\n }\n foreach(['ABC-011','ABC-012','ABC-013','ABC-014','ABC-015','ABC-016','ABC-017','ABC-018','ABC-019','ABC-020'] as $it){\n $item = Item::create([\n 'item_code' => $it,\n 'name' => 'A' . $it,\n 'description' => $it,\n 'main_unit' => 'pcs',\n 'unit_id' => 1,\n /*'unit_name1' => 'pack',\n 'unit_qty1' => '1',\n 'unit_name2' => 'pcs',\n 'unit_qty2' => '200',*/\n ]);\n $this->command->info('Create Item ' . $item->item_code);\n }\n foreach(['BBC-021','BBC-022','BBC-023','BBC-024','BBC-025','BBC-026','BBC-027','BBC-028','BBC-029','BBC-030'] as $it){\n $item = Item::create([\n 'item_code' => $it,\n 'name' => 'B' . $it,\n 'description' => $it,\n 'main_unit' => 'kilogram',\n 'unit_id' => 5,\n /*'unit_name1' => 'kg',\n 'unit_qty1' => '1',\n 'unit_name2' => 'ton',\n 'unit_qty2' => '1000', //1 ton = 1000 kg*/\n ]);\n $this->command->info('Create Item ' . $item->item_code);\n }\n $uom = App\\UOM::create([\n 'item_id' => 1,\n 'unit_id' => 1,\n 'main_qty' => 1,\n ]);\n $uom = App\\UOM::create([\n 'item_id' => 1,\n 'unit_id' => 2,\n 'main_qty' => 10,\n ]);\n $uom = App\\UOM::create([\n 'item_id' => 1,\n 'unit_id' => 3,\n 'main_qty' => 100,\n ]);\n $uom = App\\UOM::create([\n 'item_id' => 2,\n 'unit_id' => 5,\n 'main_qty' => 1,\n ]);\n $uom = App\\UOM::create([\n 'item_id' => 2,\n 'unit_id' => 6,\n 'main_qty' => 1000,\n ]);\n\n $uom = App\\UOM::create([\n 'item_id' => 3,\n 'unit_id' => 4,\n 'main_qty' => 1,\n ]);\n $uom = App\\UOM::create([\n 'item_id' => 3,\n 'unit_id' => 5,\n 'main_qty' => 1000,\n ]);\n $uom = App\\UOM::create([\n 'item_id' => 3,\n 'unit_id' => 6,\n 'main_qty' => 1000000,\n ]);\n }", "title": "" }, { "docid": "5fbe71a368b293440028b278fcd61a63", "score": "0.52135247", "text": "private function createModifications($item, $user)\n {\n $newItem = factory(Item::class)->make();\n\n $fillableFields = $newItem->getFillable();\n $changedFields = $this->selectRandomElements($fillableFields, count($fillableFields));\n\n foreach ($changedFields as $field) {\n\n if ($field === 'owner') {\n $item->owner = $newItem->owner->toArray();\n } else {\n $item->$field = $newItem->$field;\n }\n \n }\n\n event(new ItemEditedEvent($item, $user));\n\n $item->save();\n }", "title": "" }, { "docid": "e0f19c59e2c83a555c834da2d486b0a7", "score": "0.52110076", "text": "public function update(Request $request, Item $item)\n {\n //\n $data = array('title' => 'title', 'text' => 'text', 'type' => 'default', 'timer' => 3000);\n \n $itemClone = clone $item;\n // validate the info, create rules for the inputs\n $rules = array(\n 'code' => 'required',\n 'name' => 'required',\n 'quantity' => 'required',\n 'measuring_unit_id' => 'required',\n 'rack_id' => 'required',\n 'deck_id' => 'required',\n //'image_uri' => 'required|max:100',\n );\n // run the validation rules on the inputs from the form\n $validator = Validator::make(Input::all(), $rules);\n // if the validator fails, redirect back to the form\n if ($validator->fails()) {\n \n notify()->flash(\n 'Error', \n 'warning', [\n 'timer' => $data['timer'],\n 'text' => 'error',\n ]);\n \n return redirect()\n ->back()\n ->withErrors($validator)\n ->withInput();\n \n } else {\n // do process\n try {\n \n $app_file_storage_uri = config('app.app_file_storage_uri');\n $date_today = Carbon::now();//->format('Y-m-d');\n \n //create directory\n if(!Storage::exists($app_file_storage_uri)) {\n Storage::makeDirectory($app_file_storage_uri, 0775, true); //creates directory\n }\n \n $dataArray = array(\n 'is_visible' => true,\n 'name' => $request->input('name'),\n 'code' => $request->input('code'),\n 'quantity_low' => $request->input('quantity_low'),\n 'is_rentable' => $request->input('is_rentable'),\n 'unit_price' => $request->input('unit_price'),\n 'measuring_unit_id' => $request->input('measuring_unit_id'),\n 'rack_id' => $request->input('rack_id'),\n 'deck_id' => $request->get('deck_id')\n );\n \n $image_uri_input = $request->file('image_uri');\n \n // file input\n if( ($image_uri_input) ){\n if(Storage::exists($itemClone->image_uri)){\n chmod(Storage::path($itemClone->image_uri), 755);\n Storage::delete( $itemClone->image_uri );\n }\n \n $file_original_name = $image_uri_input->getClientOriginalName();\n $file_extension = $image_uri_input->getClientOriginalExtension();\n //$filename = $file->store( $dir );\n $filename = $image_uri_input->storeAs( \n $app_file_storage_uri,\n uniqid( time() ) . '_' . $file_original_name\n );\n \n $dataArray['image_uri'] = $filename;\n }\n \n DB::transaction(function () use ($itemClone, $request, $dataArray, $date_today){\n $itemClone->update( $dataArray );\n \n unset($dataArray);\n });\n \n }catch(Exception $e){\n notify()->flash(\n 'Error', \n 'warning', [\n 'timer' => $data['timer'],\n 'text' => 'error',\n ]);\n \n return redirect()\n ->back()\n ->withInput();\n }\n }\n \n notify()->flash(\n 'Success', \n 'success', [\n 'timer' => $data['timer'],\n 'text' => 'success',\n ]);\n \n //return Response::json( $data );\n //return redirect()->back();\n return $this->create();\n }", "title": "" }, { "docid": "f83902b63d796259996d30b43727eba2", "score": "0.5205605", "text": "private function postRequest() {\n $result = $this->inventoryGateway->insertItem();\n $result = json_encode($result);\n print_r($result);\n }", "title": "" }, { "docid": "06ddf450ff1fc06c6216c7d5c8f7910e", "score": "0.52027726", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'type' => 'required',\n 'description' => 'required'\n ]);\n\n if ($validator->passes()) {\n\n DescriptionRelease::updateOrCreate(['id' => $request->item_id],[\n 'type' => $request->type, \n 'description' => $request->description\n ]); \n return response()->json(['success'=>'Registro inserido com sucesso!']);\n\t\t\t\n }\n\n return response()->json(['error'=>$validator->errors()]);\n\n //DescriptionRelease::updateOrCreate(['id' => $request->item_id],\n //['type' => $request->type, 'description' => $request->description]); \n\n \n }", "title": "" } ]
f94bc027889d7ec4af05fe8336438948
Show the form for creating a new user.
[ { "docid": "97a70691c920f9fc4cd96f94885f5590", "score": "0.78747225", "text": "public function create()\n\t{\n return View::make('userform');\n\t}", "title": "" } ]
[ { "docid": "05a788f6cee6a481e60579669c5fc2cd", "score": "0.83872414", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make(\"newUserForm\");\n\t}", "title": "" }, { "docid": "7dbd46d199fe9c8de25f302865ab8386", "score": "0.8342869", "text": "public function createUser()\n {\n $admin = $this->di->common->verifyAdmin();\n $form = new Form('user-form', Models\\User::class);\n if ($this->di->request->getMethod() == 'POST') {\n if ($this->di->user->createFromForm($form, true)) {\n $this->di->common->redirectMessage('admin/user', 'Användaren <strong>' . htmlspecialchars($form->getModel()->username) . '</strong> har skapats.');\n }\n }\n \n return $this->di->common->renderMain('user/form', [\n 'user' => $form->getModel(),\n 'admin' => $admin,\n 'update' => false,\n 'form' => $form,\n 'title' => 'Skapa användare'\n ], 'Skapa användare');\n }", "title": "" }, { "docid": "3c646eed188594bfeb794e4f49224aff", "score": "0.83235633", "text": "public function createUserForm()\n {\n return view('admin.user.create', [\n 'page' => 'Create User',\n ]);\n }", "title": "" }, { "docid": "13f23ed1f3a2244a95bbe0e0169c2299", "score": "0.82763916", "text": "public function create() {\n $viewData = $this->getDefaultViewData();\n $viewData[\"user\"] = new User();\n $viewData [\"mode\"] = \"ADD\";\n\n return view('pages.users.form', $viewData);\n }", "title": "" }, { "docid": "e4bd1c880f63f3906fc5565a23562ab6", "score": "0.8242001", "text": "public function create()\n {\n return view('backend.user.form');\n }", "title": "" }, { "docid": "8fd41cae92631fe051293fa51aeb4dcb", "score": "0.8221364", "text": "public function create()\n {\n return view('user.form')\n ->with('user','');\n }", "title": "" }, { "docid": "e19fda02e25da65a73cbf3d32970f945", "score": "0.82098806", "text": "public function create()\n {\n $user = null;\n return view('pages.admin.user.form',compact('user'));\n }", "title": "" }, { "docid": "a24d0dd0eac7a5274a23639fa3e7cdde", "score": "0.81729275", "text": "public function create()\n {\n return view('users.form', ['user' => new User]);\n }", "title": "" }, { "docid": "633021d00aab6630cf048c438f0ba055", "score": "0.8150503", "text": "public function create()\n {\n return view('server.user.add');\n }", "title": "" }, { "docid": "4b8b78398a66414c91061f301385529e", "score": "0.8093858", "text": "public function create()\n\t{\n\t\t$pageTitle = 'Create New User';\n\t\t$thisUser = Auth::user();\n\t\treturn View::make('account.add-new.user', compact('pageTitle', 'id', 'thisUser'));\t\t\n\t}", "title": "" }, { "docid": "99bc8a98eab852279c802e0bb61ab9fe", "score": "0.8061811", "text": "public function create()\n {\n return view('user.form')\n ->with('form', [\n 'action' => 'UserController@store',\n 'method' => 'POST',\n ]);\n }", "title": "" }, { "docid": "b30f39e3e2507679ebe39a4065dd94a4", "score": "0.80500907", "text": "public function showFormCreate(){\n return view('user.createUser');\n }", "title": "" }, { "docid": "e53154351a8522616bda1a3d9ff1708e", "score": "0.8031466", "text": "public function create()\n {\n return view('Users.userForm');\n }", "title": "" }, { "docid": "8371b9b1a14ce40ccbee7775bcef527f", "score": "0.80209935", "text": "public function create()\n {\n\t\t$user = User::getModel();\n\t\treturn view( 'admin.user.create', compact( 'user' ) );\n }", "title": "" }, { "docid": "f14ceaaffed44568627a1b4b1823af31", "score": "0.8003505", "text": "public function create() {\n\t\treturn View::make ( 'user.create' );\n\t}", "title": "" }, { "docid": "9057c2a72600efd9ca6fca52b4ee86b3", "score": "0.79951787", "text": "public function create()\n {\n $this->view_data['page_title'] = \"Create new User\";\n $this->view_data['page_description'] = \"In this page you can create a new user.\";\n\n $this->view_data['create'] = TRUE;\n $this->view_data['admin_edit'] = FALSE;\n $this->view_data['user'] = new User();\n\n return $this->makeView('user.edit');\n }", "title": "" }, { "docid": "14bb043800c7dfca34c3a6b9c1385918", "score": "0.7978648", "text": "public function create()\n\t{\n\t\t$form_data = ['route' => 'system.users.store', 'method' => 'POST'];\n\n\t\treturn view('dashboard.pages.system.users.form', compact('form_data'))\n\t\t\t->with('user', $this->user);\n\t}", "title": "" }, { "docid": "1012bedf22c01955c376a6c18d241862", "score": "0.7972543", "text": "public function createUser()\n {\n return view('admin.user.add');\n }", "title": "" }, { "docid": "6a0cc14d09db556e59176469a1bf9bdf", "score": "0.79459274", "text": "public function showCreateForm(){\n return view('dashboards.users.create');\n }", "title": "" }, { "docid": "0866eec5b325841d89b4d1f1d06aa68c", "score": "0.7944029", "text": "public function create()\n {\n return view('Users\\\\newUser');\n }", "title": "" }, { "docid": "e3fab29b8d8134e6f81c6d80aefc92e9", "score": "0.7941543", "text": "public function create()\n {\n return view('dashboard.users.form');\n }", "title": "" }, { "docid": "a996874ee0cfc0075bb55ded23679af2", "score": "0.7939947", "text": "public function create()\n {\n //create a new user\n return view('users.create_form')->with('users', User::all());\n }", "title": "" }, { "docid": "be6d67bdeb9c923a57babaedaf22fd2d", "score": "0.79335034", "text": "public function create()\n\t{\n\t\treturn view('entity.user.create');\n\t}", "title": "" }, { "docid": "e5e94ca287e427e45bb9a420c43d1782", "score": "0.7929635", "text": "public function newAction()\n {\n $oUser = new User();\n $form = $this->createCreateForm($oUser);\n\n return $this->render('SlashworksBackendBundle:User:new.html.twig', array(\n 'entity' => $oUser,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "e81e745f1939cca19860fa8ff4ec6662", "score": "0.7914488", "text": "public function Create() {\n \t$form = new CFormUserCreate($this);\n\t if($form->Check() === false) {\n \t $this->session->AddMessage('notice', 'You must fill in all values.');\n \t $this->RedirectToController('Create');\n \t\t}\n \t$this->views->SetTitle('Create user');\n $this->views->AddInclude(__DIR__ . '/create.tpl.php', array('form' => $form->GetHTML())); \n \t}", "title": "" }, { "docid": "3738ba0207bcb05aed0f1c46fdea48de", "score": "0.78804684", "text": "public function Create(){\n\t\tif(!$this->user['isAuthenticated']){\n\t\t\t$this->RedirectToController('login');\n\t\t}elseif($this->user['isAuthenticated'] AND $this->user['acronym'] != 'root'){\n\t\t\t$this->RedirectToController('login');\n\t\t}else{\n\t\t\t$form = new CFormUserCreate($this);\n\t\t\tif($form->Check() === false){\n\t\t\t\t$this->AddMessage(\"notice\", \"Please: input all fields.\");\n\t\t\t\t$this->RedirectToController(\"Create\");\n\t\t\t}\n\t\t\n\t\t\t$this->views->SetTitle(\"Create user\");\n\t\t\t$this->views->AddInclude(__DIR__ . \"/create.tpl.php\", array(\"form\"=>$form->GetHTML()));\n\t\t}\n\t}", "title": "" }, { "docid": "b859908b725b69b4259b930cc4e0edc7", "score": "0.78766316", "text": "public function user_create() {\n return view('user_create');\n }", "title": "" }, { "docid": "2f49169256b2d8c97f94bf00b923e44c", "score": "0.7872482", "text": "public function create()\n {\n // --------------------------------------------------------------------\n $data = new \\stdClass;\n $data->title = \"User - Form\";\n $data->user = new User();\n $data->level = Level::pluck('nama','id');\n $data->cabang = Cabang::pluck('nama','id');\n // --------------------------------------------------------------------\n return view('backend.master.user.form', (array) $data);\n // --------------------------------------------------------------------\n }", "title": "" }, { "docid": "b877df3971a71d08e92e59fbc5de7b35", "score": "0.7869649", "text": "public function create()\n {\n return view('admin/user/addUser');\n }", "title": "" }, { "docid": "05638004984706358546af6940181dd6", "score": "0.78658605", "text": "public function create()\n {\n return view('admin.createuser');\n }", "title": "" }, { "docid": "4a3d49aa98e47dd917cbba53a8ae8b42", "score": "0.7858477", "text": "public function create()\n {\n return view('user.add');\n }", "title": "" }, { "docid": "aeb3cd8ec782a096ea520cc2c6d27725", "score": "0.78527445", "text": "public function create()\n {\n $new = true;\n return view('ticketit::admin.user.create', compact('new'));\n }", "title": "" }, { "docid": "ea9b6359a3b34bbf09200ac459944657", "score": "0.7851986", "text": "public function create()\n {\n $form = 'create';\n $usersforall = User::all();\n $role = Role::select('name', 'id')->get();\n return view('backend.user.form', compact('form', 'usersforall', 'role'));\n }", "title": "" }, { "docid": "ea6599d76387dd0c943a2894507de466", "score": "0.78515595", "text": "public function create()\n {\n return view('ticketit::admin.user.create');\n }", "title": "" }, { "docid": "7a22771e7a0ac32472c34a30de2f50d4", "score": "0.7844524", "text": "public function create()\n {\n return view('user.create_user');\n }", "title": "" }, { "docid": "32a0fc1b1e16d2c960adfdd14f234978", "score": "0.78390574", "text": "public function create()\n\t{\n\t\treturn View::make('admin.user.create');\n\t}", "title": "" }, { "docid": "32a0fc1b1e16d2c960adfdd14f234978", "score": "0.78390574", "text": "public function create()\n\t{\n\t\treturn View::make('admin.user.create');\n\t}", "title": "" }, { "docid": "6398cfdbd7382d8b8bb318f682e85552", "score": "0.78349686", "text": "public function create()\n {\n //\n return $this->formView(new User());\n }", "title": "" }, { "docid": "441a5364fa043b072e0c928751bd990f", "score": "0.7832498", "text": "public function create()\n {\n return view('cadastrar._formuser');\n }", "title": "" }, { "docid": "6f1673b64fc95f26bc6bcb3802f8b847", "score": "0.78282267", "text": "public function create()\n {\n if (( $redirect = $this->checkPermissions('ADD_MEMBER') ) !== true) {\n return $redirect;\n }\n return View::make(\n 'user.create',\n [\n 'user' => new User,\n 'countries' => $this->_getCountries(),\n 'branches' => Branch::getBranchList(),\n 'grades' => Grade::getGradesForBranch('RMN'),\n 'ratings' => Rating::getRatingsForBranch('RMN'),\n 'chapters' => ['0' => 'Select a Chapter'],\n 'billets' => ['0' => 'Select a Billet'] + Billet::getBillets(),\n 'locations' => ['0' => 'Select a Location'] + Chapter::getChapterLocations(),\n\n ]\n );\n }", "title": "" }, { "docid": "c341fc35889586c30012d058ecf3a6cd", "score": "0.7826296", "text": "public function create()\n {\n return view('backend.pages.user.create');\n }", "title": "" }, { "docid": "a81bce828646576220ec417c5b3e706f", "score": "0.7826062", "text": "public function create()\n {\n return view('web.users.create');\n }", "title": "" }, { "docid": "a81bce828646576220ec417c5b3e706f", "score": "0.7826062", "text": "public function create()\n {\n return view('web.users.create');\n }", "title": "" }, { "docid": "179aca7ac5ece8698c7c714cc96bc78f", "score": "0.78218377", "text": "public function create()\n {\n return view('backend.user.create');\n }", "title": "" }, { "docid": "179aca7ac5ece8698c7c714cc96bc78f", "score": "0.78218377", "text": "public function create()\n {\n return view('backend.user.create');\n }", "title": "" }, { "docid": "a9010494e4793495b0eab9cb8d88a884", "score": "0.7820742", "text": "public function create()\n {\n return view('hospital/add_user');\n }", "title": "" }, { "docid": "a5c2816f83c79f46ee3b02b5432e2c73", "score": "0.78120244", "text": "public function create()\n {\n return view('dashbord.users.add');\n }", "title": "" }, { "docid": "af2c23488ab3c51479a42a6156fa5366", "score": "0.78089404", "text": "public function create()\n {\n $this->meta->setTitle('Create User');\n return view('users.create');\n }", "title": "" }, { "docid": "5350b70a2118292f484b7338b2d3f917", "score": "0.7808394", "text": "public function create() {\n\t\t$title = 'Create | User | Admin';\n\n\t\treturn view('admin.user.create', compact('title'));\n\t}", "title": "" }, { "docid": "8d8f23641684536cf6c69b3805cb7455", "score": "0.7807991", "text": "public function create()\n {\n //\n $user = $this->user;\n return view('backend.create_user', compact('user'));\n }", "title": "" }, { "docid": "f0a3ea1d9d33b45cf8a289e6814e4d8a", "score": "0.78032017", "text": "public function create()\n {\n return view('Admin.user.create');\n }", "title": "" }, { "docid": "b6ef3520e2acce9b54df42987035b06e", "score": "0.77996767", "text": "public function create()\n {\n $this->breadcrumbs[] = ['url' => route('user.create'), 'title' => 'Add New'];\n return view('user.add', [\n 'page' => $this\n ]);\n }", "title": "" }, { "docid": "646bde3606e4a382913b628a41284363", "score": "0.7795705", "text": "public function create()\n {\n return view('record/user', ['title'=>'Users', 'subtitle'=>'Create User']);\n }", "title": "" }, { "docid": "4ad7e999943667a9f7422e5406180a71", "score": "0.77949524", "text": "public function create()\n {\n return view('admin.pages.users.user_add'); \n }", "title": "" }, { "docid": "31c9b465086dbe7616497b8a9386e489", "score": "0.77911514", "text": "public function create()\n {\n $option = $this->preparedData();\n $user = new User;\n\n return view('admin.user.create', compact('option', 'user'));\n }", "title": "" }, { "docid": "9024a085795bfc6d63070da295ed6cd9", "score": "0.77897763", "text": "public function create()\n {\n return view('ethereal-user::admin.user.create');\n }", "title": "" }, { "docid": "770ccd9365a5478de3cf4cb019dedcd5", "score": "0.7785669", "text": "public function create()\n {\n return view('addUser') ;\n }", "title": "" }, { "docid": "fe9f679abd94783c94dca24aeb8456c8", "score": "0.7783774", "text": "public function newAction()\n {\n $entity = new User();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AppBundle:User:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "ce66c7e4d4dfbb02bb1ff372cc70c834", "score": "0.77821314", "text": "public function getCreate(){\n\t\t//Views the create user form\n\n\t\treturn View::make('user.create');\n\t}", "title": "" }, { "docid": "3153000d74aea782a6d04cb08e3f1a4b", "score": "0.77770317", "text": "public function create()\n {\n return view('auth/newuser');\n }", "title": "" }, { "docid": "fb8671ea01135a909ab16303e997b3c0", "score": "0.7776647", "text": "public function new()\n {\n $pageConfigs = [\n 'mainLayoutType' => 'vertical',\n 'pageHeader' => true,\n 'pageName' => 'Agregar un Usuario'\n ];\n return view('/users/new-user', [\n 'pageConfigs' => $pageConfigs\n ]);\n }", "title": "" }, { "docid": "b541d08d6e275d43b8a3af5d168ee260", "score": "0.77709305", "text": "public function create()\n {\n //\n return view('bcs.user.create');\n }", "title": "" }, { "docid": "3b74e48eb8258fd0dda3e5c084c80da0", "score": "0.7764093", "text": "public function create()\n {\n $this->asExtension('FormController')->create();\n\n\n return view('backend::users.create',['widget'=>$this->widget]);\n\n }", "title": "" }, { "docid": "9288785be99926d212718aa572a240cc", "score": "0.77555496", "text": "public function create()\n {\n return view(\"User.create\");\n }", "title": "" }, { "docid": "47aaa2c59c4f2a3b7b7a37498bf23d2f", "score": "0.77539617", "text": "public function create()\n {\n //加载模板页面\n return view(\"Admin.User.add\");\n }", "title": "" }, { "docid": "509a8f8d8f86cec894f3ba1285dc5751", "score": "0.77489173", "text": "public function create()\n {\n return view('admin.user.create');\n }", "title": "" }, { "docid": "509a8f8d8f86cec894f3ba1285dc5751", "score": "0.77489173", "text": "public function create()\n {\n return view('admin.user.create');\n }", "title": "" }, { "docid": "509a8f8d8f86cec894f3ba1285dc5751", "score": "0.77489173", "text": "public function create()\n {\n return view('admin.user.create');\n }", "title": "" }, { "docid": "509a8f8d8f86cec894f3ba1285dc5751", "score": "0.77489173", "text": "public function create()\n {\n return view('admin.user.create');\n }", "title": "" }, { "docid": "509a8f8d8f86cec894f3ba1285dc5751", "score": "0.77489173", "text": "public function create()\n {\n return view('admin.user.create');\n }", "title": "" }, { "docid": "509a8f8d8f86cec894f3ba1285dc5751", "score": "0.77489173", "text": "public function create()\n {\n return view('admin.user.create');\n }", "title": "" }, { "docid": "509a8f8d8f86cec894f3ba1285dc5751", "score": "0.77489173", "text": "public function create()\n {\n return view('admin.user.create');\n }", "title": "" }, { "docid": "509a8f8d8f86cec894f3ba1285dc5751", "score": "0.77489173", "text": "public function create()\n {\n return view('admin.user.create');\n }", "title": "" }, { "docid": "509a8f8d8f86cec894f3ba1285dc5751", "score": "0.77489173", "text": "public function create()\n {\n return view('admin.user.create');\n }", "title": "" }, { "docid": "211989495d94c00680a0edd404a57622", "score": "0.77478284", "text": "public function create()\r\n {\r\n return view('user::create');\r\n }", "title": "" }, { "docid": "7b103c019b99e1e9e0f0d6c3795bb03d", "score": "0.77449924", "text": "public function create()\n {\n return $this->form->render('mconsole::users.form', [\n 'roles' => $this->roles,\n ]);\n }", "title": "" }, { "docid": "bd0b9bbfcc86b3fc7a5db61e39671177", "score": "0.7743666", "text": "public function showCreateUser()\n {\n return view('users.create');\n }", "title": "" }, { "docid": "3c48a1752592a3772b336ec3c3747b58", "score": "0.7741289", "text": "public function user_create()\n {\n return view('pages.user.user_create');\n }", "title": "" }, { "docid": "2868c062d0d0dfbf7296962e73d0239e", "score": "0.7733495", "text": "public function create()\n {\n return \\view(\"user.create\");\n }", "title": "" }, { "docid": "2cac995e186a0b4ec1e5ed9e98d9a649", "score": "0.7731148", "text": "public function create()\n\t{\n\t\treturn view('admin.users.create');\n\t}", "title": "" }, { "docid": "941c821f1f42f922235c6406f5abbfba", "score": "0.77267414", "text": "public function newAction()\n {\n $entity = new Users();\n $form = $this->createForm(new UsersType(), $entity);\n\n return $this->render('AcmeUsersBundle:Users:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "423bc55e841a9c0eca0680c159f7e230", "score": "0.7719894", "text": "public function create()\n {\n return view('admin.users.create',['title'=>__(\"admin.user_create\")]);\n }", "title": "" }, { "docid": "ce643b75fff7d2cc2a0c6d6834c19c84", "score": "0.7719454", "text": "public function create()\n {\n $this->page_description = 'vytvoriť';\n\n return view('admin.users.create');\n }", "title": "" }, { "docid": "be868f1774254988df831a5c0f9b3547", "score": "0.77160656", "text": "public function create()\n {\n return view('user::create');\n }", "title": "" }, { "docid": "be868f1774254988df831a5c0f9b3547", "score": "0.77160656", "text": "public function create()\n {\n return view('user::create');\n }", "title": "" }, { "docid": "be868f1774254988df831a5c0f9b3547", "score": "0.77160656", "text": "public function create()\n {\n return view('user::create');\n }", "title": "" }, { "docid": "35c10d3fc5a6ca29182f67b928b37a1d", "score": "0.7711878", "text": "public function create(){\n return view('user/form', ['action'=>'create']);\n }", "title": "" }, { "docid": "e8f6b7e93a04bbd2bc364749e70dd0c8", "score": "0.77073956", "text": "public function create()\n {\n $user = new User();\n return view('users.add', compact('user'));\n }", "title": "" }, { "docid": "a90e390941b2f6685523f8f5031dd658", "score": "0.7706627", "text": "public function create()\n {\n\n return view('admin.user.create');\n }", "title": "" }, { "docid": "ee897ec89bbd711f5978060d0396b187", "score": "0.7705253", "text": "public function create()\n {\n return view('backend.pages.users.create');\n }", "title": "" }, { "docid": "2add0b59b7cee4096324b287912ff2fd", "score": "0.7704031", "text": "public function create()\n\t{\n\t\treturn View('admin.users.create');\n\t}", "title": "" }, { "docid": "8a03ddf8f585896cdd211fe5c8fcec12", "score": "0.7698452", "text": "public function create()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "8a03ddf8f585896cdd211fe5c8fcec12", "score": "0.7698452", "text": "public function create()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "8a03ddf8f585896cdd211fe5c8fcec12", "score": "0.7698452", "text": "public function create()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "8a03ddf8f585896cdd211fe5c8fcec12", "score": "0.7698452", "text": "public function create()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "8a03ddf8f585896cdd211fe5c8fcec12", "score": "0.7698452", "text": "public function create()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "8a03ddf8f585896cdd211fe5c8fcec12", "score": "0.7698452", "text": "public function create()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "8a03ddf8f585896cdd211fe5c8fcec12", "score": "0.7698452", "text": "public function create()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "8a03ddf8f585896cdd211fe5c8fcec12", "score": "0.7698452", "text": "public function create()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "8a03ddf8f585896cdd211fe5c8fcec12", "score": "0.7698452", "text": "public function create()\n {\n return view('user.create');\n }", "title": "" } ]
89c43b6ebe289ada45855700c7b75888
Sets an attribute value.
[ { "docid": "a45dbdec713a680664f71357469a7ab8", "score": "0.0", "text": "function set($key, $value) {\n if (isset($this->special[$key])) {\n $this->special[$key]->set($value);\n $this->attributes[$key] = TRUE;\n }\n elseif (!is_string($value)) {\n throw new \\Exception(\"Value must be a string.\");\n }\n else {\n $this->attributes[$key] = $value;\n }\n return $this;\n }", "title": "" } ]
[ { "docid": "a35fd816cb665c643e37e351956a4004", "score": "0.8677824", "text": "public function set($attribute, $value);", "title": "" }, { "docid": "550281388255cda4cd6f7a209212aa7c", "score": "0.83290374", "text": "public function setAttribute ($attribute, $value) {}", "title": "" }, { "docid": "2045f796864f33ac199efabe5008fab2", "score": "0.8251643", "text": "public function __set($attribute, $value) {\n if (self::isValidAttributeValue($attribute,$value)) {\n $this->attributes[$attribute] = $value;\n }\n }", "title": "" }, { "docid": "4116df55732cfe1ec15bb7751d26668d", "score": "0.8219713", "text": "public function setAttribute($attr, $value) {}", "title": "" }, { "docid": "c3b4a4a7a52f49ef681c1813a7b9b45b", "score": "0.8218333", "text": "public function set($attributeName, $attributeValue);", "title": "" }, { "docid": "1b58c5a955058973b5d072ce4e0d0857", "score": "0.80412275", "text": "function setAttribute($attribute, $value){\r\n\t\t$this->attributes[$attribute]=$value;\r\n\t}", "title": "" }, { "docid": "407170370e532a4f5a2cb66043f2d9df", "score": "0.80242777", "text": "public function set( string $attributeName, $value );", "title": "" }, { "docid": "e43e7c9fe2eaab9c00220e6fdee8887a", "score": "0.8014152", "text": "public function setAttr($attr,$value)\n {\n self::log('> setAttr()',7);\n $this->attr[$attr] = $value;\n self::log('> setAttr()',7);\n }", "title": "" }, { "docid": "f2ca1db2ca739fb4407001d7b533b9b6", "score": "0.79879004", "text": "public function __set($attr, $value)\n\t{\n\t\t$this->$attr = $value;\n\t}", "title": "" }, { "docid": "b43d4667691f691e9081a256079c4479", "score": "0.790588", "text": "public function __set($attribute, $value)\n {\n $this->field->{$attribute} = $value;\n }", "title": "" }, { "docid": "79cee22f0aa9d50ffd93df8b0342dad1", "score": "0.7824791", "text": "public function __set ($attr, $value)\n {\n $setter = $this->setter($attr);\n\n # prioriza o uso do setter\n if ($setter) {\n $this->$setter($value);\n } else {\n $attr = self::attrTranslateName($attr);\n $this->$attr = $value;\n }\n }", "title": "" }, { "docid": "d9998c703ef524495e62afd8be00b297", "score": "0.77613944", "text": "public function setAttribute($attr_name, $value) {\n $this->attributes[$attr_name] = $value;\n }", "title": "" }, { "docid": "88f954f2b697bbb8b24bf38d5e0f8ebe", "score": "0.7732345", "text": "public function __set($name, $value)\n { \n //set the attribute with the value\n $this->$name = $value;\n }", "title": "" }, { "docid": "0941127dfb4fca73703686e02499f844", "score": "0.76670444", "text": "public function __set($name, $value)\n\t{\n\t\tif ($this->hasAttribute($name)) {\n\t\t\t$this->_attributes[$name] = $value;\n\t\t} else {\n\t\t\tparent::__set($name, $value);\n\t\t}\n\t}", "title": "" }, { "docid": "c02279b64b828b5a2a34319371993e3b", "score": "0.76572555", "text": "public function __set($attribute, $value)\n\t{\n\t\t//chech for field act command\n\t\tif (isset($this->_field_act[$attribute])) {\n\t\t\t$data = $this->_field_act[$attribute];\n\t\t\t\n\t\t\tif ($data[0] & FIELD_ACT_SET) {\n\t\t\t\t$args = $data[2];\n\t\t\t\t\n\t\t\t\t$obj = array_shift($args);\n\t\t\t\t$field = array_shift($args);\n\t\t\t\t\n\t\t\t\tarray_unshift($args, $value);\n\t\t\t\tarray_unshift($args, $field);\n\t\t\t\tarray_unshift($args, $obj);\n\t\t\t\t\n\t\t\t\tif ($data[0] & FIELD_ACT_SET) {\n\t\t\t\t\t$this->write_attribute($attribute, FieldAct::set($data[1], $args));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//check for method accessor\n\t\tif (method_exists($this, 'set_' . $attribute)) {\n\t\t\tcall_user_func(array($this, 'set_' . $attribute), $value);\n\t\t} elseif (isset($this->_relations[$attribute])) {\n\t\t\t$this->_relations[$attribute]->set_data($value);\n\t\t} else {\n\t\t\t//set attribute\n\t\t\t$this->write_attribute($attribute, $value);\n\t\t}\n\t}", "title": "" }, { "docid": "8a96605e177389a0f31d9ce6fc5a3981", "score": "0.7647637", "text": "public function setAttribute($name, $value);", "title": "" }, { "docid": "8a96605e177389a0f31d9ce6fc5a3981", "score": "0.7647637", "text": "public function setAttribute($name, $value);", "title": "" }, { "docid": "8a96605e177389a0f31d9ce6fc5a3981", "score": "0.7647637", "text": "public function setAttribute($name, $value);", "title": "" }, { "docid": "792fefc9e5260096d83dc1db4bfc347b", "score": "0.76473", "text": "public function __set($name, $value)\n {\n if ($this->hasAttribute($name)) {\n $this->_attributes[$name] = $value;\n } else {\n parent::__set($name, $value);\n }\n }", "title": "" }, { "docid": "c78c78d72258efc974a78113eefb0d0c", "score": "0.76409864", "text": "public function setAttribute(?string $value): void {\n $this->getBackingStore()->set('attribute', $value);\n }", "title": "" }, { "docid": "b244f291ea80f62b6abb4045798bcd8d", "score": "0.7610315", "text": "public function __SET($attr,$val)\n {\n $this->$attr = $val;\n }", "title": "" }, { "docid": "d964f4144e4a0b05c24e760663179d96", "score": "0.7604479", "text": "public function __set($name, $value)\n {\n if ($this->hasAttribute($name)) {\n $this->_attributes[$name] = $value;\n }\n parent::__set($name, $value);\n }", "title": "" }, { "docid": "3bde803dc8821f065150fa763bf82f7d", "score": "0.7562079", "text": "public function setAttribute($key, $value);", "title": "" }, { "docid": "3bde803dc8821f065150fa763bf82f7d", "score": "0.7562079", "text": "public function setAttribute($key, $value);", "title": "" }, { "docid": "869ef9c883d13b1975ac09f35934a4f7", "score": "0.7525505", "text": "public function __set($name, $value)\n {\n $this->set_attribute($name, $value);\n }", "title": "" }, { "docid": "ba9b77c2e5f6a102e84370d911eb8e6e", "score": "0.75145596", "text": "public function setAttribute(string $name, $value);", "title": "" }, { "docid": "715ffb6b1f33735cd78df757ef7cb55d", "score": "0.7496796", "text": "public function set($key,$value){\n\t\t$this->attributes[$key]=$value;\n\t}", "title": "" }, { "docid": "b4df380c3671f2d0c4ff22523113a4d4", "score": "0.7481796", "text": "public function set($obj, $attribute);", "title": "" }, { "docid": "9fe060ee30b4a57f5a2180c9e4017e77", "score": "0.7457538", "text": "public function setAttr($attr,$value)\n {\n $f = wbFormsElementForm::get();\n $f->attr[$attr] = $value;\n }", "title": "" }, { "docid": "954abc3f13b814aea272e80cedea4851", "score": "0.74488205", "text": "function setAttribute($attribute,$value) {\n $attributes[$attribute] = $value;\n return $this;\n }", "title": "" }, { "docid": "99d4c069854965a4bcd1ed7bfd512d8b", "score": "0.7437564", "text": "public function __Set($attribute, $value)\n {\n return $this->$attribute = $value;\n }", "title": "" }, { "docid": "570d5b6eef8e15ae39b87d9e3d6cd926", "score": "0.7435017", "text": "public function setAttribute($name, $value)\n {\n $this->attributeHolder->set($name, $value);\n }", "title": "" }, { "docid": "570d5b6eef8e15ae39b87d9e3d6cd926", "score": "0.7435017", "text": "public function setAttribute($name, $value)\n {\n $this->attributeHolder->set($name, $value);\n }", "title": "" }, { "docid": "cf565152e245c6eb5b54f021df360533", "score": "0.743298", "text": "public function set_attribute($key, $value)\n\t{\n\t\t$this->attributes[$key] = $value;\n\t\t$this->parent->attr_save($this->attributes);\n\t}", "title": "" }, { "docid": "e0a0442c83b66a27a4707d279f663ec1", "score": "0.74088514", "text": "public function __set( $name = \"\", $value ) {\n\t\t\t$this->setAttribute( $name, $value );\n\t\t}", "title": "" }, { "docid": "bedd1bf26adf74bc38b4b7d974510481", "score": "0.73430294", "text": "public function writeAttribute($attribute, $value)\n {\n $this->$attribute = $value;\n }", "title": "" }, { "docid": "ab44e56585f86f13f8c1225fbe927e6b", "score": "0.7319394", "text": "public function setAttribute(array &$attributes, $value);", "title": "" }, { "docid": "8b81f6869da41816b09b5b2efe8246ec", "score": "0.73180646", "text": "public function setAttribute($name, $value)\r\n {\r\n $this->attributes[$name] = $value;\r\n }", "title": "" }, { "docid": "b5e4d90a0db06a0fa8bb0f4e54fc56e2", "score": "0.73172873", "text": "public function setAttribute($name, $value)\n {\n if ('value' == $name) {\n $this->value = $value;\n } else {\n $this->attributes[$name] = $value;\n }\n }", "title": "" }, { "docid": "af49334b9c813bb0dca071e3bc7ee721", "score": "0.7315236", "text": "public function __set($atrib, $value) {\n $this->$atrib = $value;\n }", "title": "" }, { "docid": "f70d678b41dcceaedc93a6b13eb0f9a2", "score": "0.72914904", "text": "public function __set($key, $value)\n {\n // Set attribute\n $this->setAttribute($key, $value);\n }", "title": "" }, { "docid": "a56b44cf4593bc17489c72d13c9f4a46", "score": "0.7291158", "text": "public function setAttribute( $sAttr, $sValue ){\r\n $this->asAttributes[ \"$sAttr\"] = $sValue;\r\n }", "title": "" }, { "docid": "39a95d8d654e3be1bff7fb38c69317a9", "score": "0.7286182", "text": "public function __set(string $name, $value) {\n $this->_node->setAttribute($this->encodeName($name), $this->encodeValue($value));\n }", "title": "" }, { "docid": "6d064d773dfb4b95cb66deaada743fdd", "score": "0.7262445", "text": "public function __set(string $key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "14a9c513213edfb60067cb226f38deb6", "score": "0.7258085", "text": "public function __set($name, $value)\n {\n $this->setAttribute(upperCaseSplit($name, '_'), $value);\n }", "title": "" }, { "docid": "2beeae4b5b1b7a107e8cde93dd972b25", "score": "0.72288406", "text": "public function setAttribute( $name, $value )\n {\n\n $this->attributes[$name] = $value;\n }", "title": "" }, { "docid": "6fffb229ee1d498563be46cb6f843da9", "score": "0.7216907", "text": "public function setAttribute($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "6fffb229ee1d498563be46cb6f843da9", "score": "0.7216907", "text": "public function setAttribute($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "6fffb229ee1d498563be46cb6f843da9", "score": "0.7216907", "text": "public function setAttribute($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "6fffb229ee1d498563be46cb6f843da9", "score": "0.7216907", "text": "public function setAttribute($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "1091458c09455a1f01e62f987d3abdfb", "score": "0.7207527", "text": "public function __set($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "2358bb8791d4e8904db4be8d1af1efc1", "score": "0.71919477", "text": "public function __SET($attr, $valor){\n $this->$attr = $valor;\n }", "title": "" }, { "docid": "830e7e95d50188f97ff51b2b248dd8e8", "score": "0.71905756", "text": "function set_attribute($field, $name, $value){\r\n\t\t$this->form['components'][$field]['attributes'][$name] = $value;\r\n\t}", "title": "" }, { "docid": "67d9363d55307d64c5c6ad73683bbde0", "score": "0.7190322", "text": "public function __set($name, $value)\n {\n $setter='setAttr_'.$name;\n if(method_exists($this,$setter))\n $this->$setter($value);\n else\n parent::__set($name, $value);\n }", "title": "" }, { "docid": "4200c989a0bfab173e5f410a7e82d122", "score": "0.71747994", "text": "public function __set(\n\t\t\tstring $name,\n\t\t\t$value): void\n\t{\n\t\tstatic::init();\n\t\tif (array_key_exists(\n\t\t\t\t$name,\n\t\t\t\t$this->attributes) || static::$table->getColumn($name) !== null)\n\t\t{\n\t\t\t$this->attributes[$name] = $value;\n\t\t\t$this->isDirty = true;\n\t\t}\n\t\t\n\t\t// TODO: Throw exception if attribute could not be set.\n\t}", "title": "" }, { "docid": "cd4be2c0b9c3494afa83231125ec0eb7", "score": "0.7141278", "text": "public function set($value);", "title": "" }, { "docid": "cd4be2c0b9c3494afa83231125ec0eb7", "score": "0.7141278", "text": "public function set($value);", "title": "" }, { "docid": "cd4be2c0b9c3494afa83231125ec0eb7", "score": "0.7141278", "text": "public function set($value);", "title": "" }, { "docid": "cd4be2c0b9c3494afa83231125ec0eb7", "score": "0.7141278", "text": "public function set($value);", "title": "" }, { "docid": "e06372c64af824b3c0773f972a5cf49d", "score": "0.7099975", "text": "public function setAttribute(string $key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "f2dbc690640bf8555659334bc40138df", "score": "0.7081839", "text": "function SetValue($Value) {\n\t\t$this->mAttributes['value'] = $Value;\n\t}", "title": "" }, { "docid": "30c6778740fd99d75a4710e316fcfada", "score": "0.7071008", "text": "public function set($value) {}", "title": "" }, { "docid": "30c6778740fd99d75a4710e316fcfada", "score": "0.7071008", "text": "public function set($value) {}", "title": "" }, { "docid": "19de63a8bc1bb30b9f34ce8eb6f2620d", "score": "0.70449626", "text": "public function __set($key, $value)\n\t{\n\t\t$this->setAttribute($key, $value);\n\t}", "title": "" }, { "docid": "a6bc9a3114a711e13b9e44d41ff56ab7", "score": "0.7034812", "text": "public function __set( $name, $value ) {\n if ( isset( self::$_meta_attributes_table[$name] ) ) {\n if ( isset(self::$_meta_attributes_table[$name]['setter'])) {\n $this->{self::$_meta_attributes_table[$name]['setter']}( $value );\n }\n $this->_meta_attributes[$name] = $value;\n } else if ( isset( self::$_post_attributes_table[$name] ) ) {\n $this->_post_attributes[$name] = $value;\n } else {\n throw new Exception( __('That attribute does not exist to be set.','woocommerce_json_api') . \" `$name`\");\n }\n }", "title": "" }, { "docid": "a028c1c33d6d9b75977d845c78df851e", "score": "0.7033783", "text": "public function __set($name, $value)\n {\n switch($name) {\n case 'id':\n //if the id isn't null, you shouldn't update it!\n if( !is_null($this->id) ) {\n throw new Exception('Cannot update Role\\'s id!');\n }\n break;\n }\n \n //set the attribute with the value\n $this->$name = $value;\n }", "title": "" }, { "docid": "d992b549823ff7688b3992a7f6ecc560", "score": "0.7022524", "text": "public function setAttribute($key, $value)\n {\n $this->data->set($key, $value);\n }", "title": "" }, { "docid": "58eb48ba6833ec34c85636eb1b7fa264", "score": "0.7009034", "text": "public function __set($key, $value)\n {\n $this->setAttribute($key, $value);\n }", "title": "" }, { "docid": "58eb48ba6833ec34c85636eb1b7fa264", "score": "0.7009034", "text": "public function __set($key, $value)\n {\n $this->setAttribute($key, $value);\n }", "title": "" }, { "docid": "58eb48ba6833ec34c85636eb1b7fa264", "score": "0.7009034", "text": "public function __set($key, $value)\n {\n $this->setAttribute($key, $value);\n }", "title": "" }, { "docid": "58eb48ba6833ec34c85636eb1b7fa264", "score": "0.7009034", "text": "public function __set($key, $value)\n {\n $this->setAttribute($key, $value);\n }", "title": "" }, { "docid": "58eb48ba6833ec34c85636eb1b7fa264", "score": "0.7009034", "text": "public function __set($key, $value)\n {\n $this->setAttribute($key, $value);\n }", "title": "" }, { "docid": "58eb48ba6833ec34c85636eb1b7fa264", "score": "0.7009034", "text": "public function __set($key, $value)\n {\n $this->setAttribute($key, $value);\n }", "title": "" }, { "docid": "58eb48ba6833ec34c85636eb1b7fa264", "score": "0.7009034", "text": "public function __set($key, $value)\n {\n $this->setAttribute($key, $value);\n }", "title": "" }, { "docid": "73fa83cfea25a77c6800aabf63af3f16", "score": "0.6990806", "text": "public function setAttribute($attribute, $value) {\n switch ($attribute) {\n case self::ATTR_CACHE_PREPARES:\n $this->cachePreparedStatements = $value;\n break;\n case self::ATTR_CONNECTION_NAME:\n $this->_connectionName = $value;\n break;\n default:\n parent::setAttribute($attribute, $value);\n }\n }", "title": "" }, { "docid": "76aa023e7b9c953d57621517cea830e8", "score": "0.6948533", "text": "function setAttr($arg1){\n $this->attr = $arg1;\n }", "title": "" }, { "docid": "2c94175a30559404b4c15ab503dbf0a1", "score": "0.69362485", "text": "public function setAttribute($key, $value)\n {\n $this->storage->set($key, $value);\n }", "title": "" }, { "docid": "eaba2b09079201b60c0289cda055a8a2", "score": "0.69305617", "text": "public function __set($key, $value)\n {\n if (in_array($key, BaseWidget::$allowed)) {\n $this->attributes[$key] = $value;\n } else {\n $this->$key = $value;\n }\n }", "title": "" }, { "docid": "2420481b6d022fcb26403e388cebcca6", "score": "0.69202703", "text": "function setValue($value) {$this->_value = $value;}", "title": "" }, { "docid": "1674b0be08129c666cdb4bb8c33a13d2", "score": "0.6919387", "text": "function __set($name, $value)\n {\n\n if($name == 'attr' && $value == \"hello\")\n {\n $this->$name = 'goodbye!';\n } else {\n $this->$name = $value;\n }\n }", "title": "" }, { "docid": "89018c73ffed35a5857b073f00d46f71", "score": "0.6919227", "text": "public function writeAttribute($attribute, $value);", "title": "" }, { "docid": "31dea3adc5ad658543a891a25fa92c9d", "score": "0.6896986", "text": "public function writeAttribute(string $attribute, $value);", "title": "" }, { "docid": "91079cff01ecaa270abeb86499b741db", "score": "0.6887642", "text": "function set_value($attribute, $value ){\n if($value == null || trim($value) == \"\"){ throw new Exception(\"Null value for attribute \" . $attribute . \" not allowed.\");}\n\n switch($attribute){\n\n case \"event_id\":\n $this->event_id = $value;\n break;\n case \"rsvp_id\":\n $this->rsvp_id = $value;\n break;\n case \"first_name\":\n $this->first_name = $value;\n break;\n case \"last_name\":\n $this->last_name = $value;\n break;\n case \"email\":\n $this->email = $value;\n break;\n case \"events\":\n if($value == \"Wedding\" || $value == \"Reception\" || $value == \"All Events\"){\n $this->events = $value;\n }else{\n throw new Exception(\"Attribute Event Type must equal 'Wedding, Reception or All Events'. Value \" . $value . \" is invalid.\");\n }\n break;\n case \"status\":\n if($value == \"Going\" || $value == \"Not Going\"){\n $this->status = $value;\n }else{\n throw new Exception(\"Attribute Staus must equal 'Going or Not Going'. Value \" . $value . \" is invalid.\");\n }\n break;\n case \"number_in_party\":\n $this->number_in_party = $value;\n break;\n case \"create_date\":\n $this->create_date = $value;\n break;\n case \"last_update_date\":\n $this->last_update_date = $value;\n break;\n\n default:\n throw new Exception(\"Attribute \" . $attribute . \" not found.\");\n }\n }", "title": "" }, { "docid": "46224032cd3d22c2c7bfb70572023501", "score": "0.6875182", "text": "public function __set($attribute, $value)\n {\n $this->attributes[$attribute] = $value;\n\n return $this;\n }", "title": "" }, { "docid": "2d57ff1ad226fa4b1a43dfc92f5e9a77", "score": "0.6866885", "text": "function setValue ($value) {\r\n $this->_value = $value;\r\n }", "title": "" }, { "docid": "e9520c17362e47455b69b80bac072c39", "score": "0.68633336", "text": "function setAttribute($name, $value)\r\n {\r\n $this->arr_attr[$name] = $value;\r\n \r\n if ($name == 'id')\r\n {\r\n if($this->getAttribute('name') == '')\r\n {\r\n $this->arr_attr['name'] = $value;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "e7b8a56042d187cd7afd23afcb0c88c4", "score": "0.6856071", "text": "public function setValue($value) {\n $this->value = $value;\n\t}", "title": "" }, { "docid": "fb5ff1c74416af7ea1b0cd757d95bcfe", "score": "0.68550736", "text": "public function setAttribute($key, $value)\n {\n // First we will check for the presence of a mutator for the set operation\n // which simply lets the developers tweak the attribute as it is set on\n // the model, such as \"json_encoding\" an listing of data for storage.\n if ($this->hasSetMutator($key)) {\n $method = 'set'.$this->studly_case($key).'Attribute';\n return $this->{$method}($value);\n }\n\n\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "82595a0424ff35a0f8eb097e89f74c3a", "score": "0.68424517", "text": "function setValue($value) {\r\n\t\t$this->value = $value;\r\n\t}", "title": "" }, { "docid": "697ce052f0fbbb74652f4b7cbf3d0dd3", "score": "0.6831918", "text": "public function setValue($value){\n\t\t$this->value=$value;\n\t}", "title": "" }, { "docid": "310881e18675b168e3a3bb7b28e7f688", "score": "0.68278056", "text": "public function __set($name, $value)\n {\n if ($name === $this->attributeName) {\n $this->imageAttribute = $value;\n return;\n }\n\n parent::__set($name, $value);\n }", "title": "" }, { "docid": "ae357b59c9c572d5b7fa2aa9444ce9ba", "score": "0.6815436", "text": "public function setAttribute($key, $value)\n {\n $this[$key] = $value;\n }", "title": "" }, { "docid": "17f487ed80a687453c9e5da8f82708b2", "score": "0.6813099", "text": "function set_value($value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "76b4acd4df45f4b6ca8fb115f745d3c6", "score": "0.68099785", "text": "public function __set($key, $value)\n {\n $funcName = 'set'.Str::studly($key).'Attribute';\n\n if (is_callable([$this, $funcName])) {\n $this->attributes[$key] = $this->{$funcName}($value);\n\n return;\n }\n\n if (array_search($key, $this->fillable) === false) {\n return;\n }\n\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6803879", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6803879", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6803879", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6803879", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6803879", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6803879", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.6803879", "text": "public function setValue($value);", "title": "" } ]
81a2de8e4888fe3508a781548040bcec
Get the filters available for the resource.
[ { "docid": "62402b065ae7a2d65089023fd1de98e7", "score": "0.0", "text": "public function filters(Request $request)\n {\n return [];\n }", "title": "" } ]
[ { "docid": "e46b3fa1b0920523e39bcbf3fb2aef13", "score": "0.82047534", "text": "function getAllFilters() {\n\t\t\n\t\treturn $this->httpGet($this->_baseUrl.'filters');\n\n\t}", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.8169404", "text": "public function getFilters();", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.8169404", "text": "public function getFilters();", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.8169404", "text": "public function getFilters();", "title": "" }, { "docid": "bf3a9c1edc0a72bf624b23aade4749e7", "score": "0.8038534", "text": "public static function getFilters()\n {\n return static::$filters;\n }", "title": "" }, { "docid": "f77e7f94d47dad4b54e8410d85ba7092", "score": "0.8035729", "text": "public function availableFilters()\n {\n return $this->availableFilters;\n }", "title": "" }, { "docid": "ec7b60b7598cdeac3fc62bf9176a5b73", "score": "0.80241597", "text": "protected function getFilters()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "b39b8e9cd43a9fe8babb4ea597d775f5", "score": "0.8005134", "text": "public function getFilters()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "b39b8e9cd43a9fe8babb4ea597d775f5", "score": "0.8005134", "text": "public function getFilters()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "dcfb7beeff1729d551ec4d85ae40827d", "score": "0.7932071", "text": "public function get_filters();", "title": "" }, { "docid": "2a6d10394944ef22a7b31ff6189baeb9", "score": "0.7929623", "text": "public function getFilters ()\n {\n $filters = [];\n\n return $filters;\n }", "title": "" }, { "docid": "e1dccc441403bc5d14ae3824ec07974c", "score": "0.7900744", "text": "public function getFilters() {\n\t\treturn $this->filters;\n\t}", "title": "" }, { "docid": "4b287075f730bf0cc0cf293cae3c3d76", "score": "0.7891948", "text": "public function filters()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "d7c25c662948b021e344e1fd072e7de2", "score": "0.7848248", "text": "public function getFilters()\n {\n return $this->filterFilters($this->filters);\n }", "title": "" }, { "docid": "6458dc56efbe8aee7fe606b2e26ffb3a", "score": "0.77945036", "text": "public function listFilters()\n {\n return $this->options['filters'];\n }", "title": "" }, { "docid": "b97e930ffef64044d0ae5a20c16b3de2", "score": "0.7781235", "text": "public function getFilters()\n {\n if (empty($this->filters)) {\n $this->filters = [\n new Filter\\LicenceStatus(),\n new Filter\\GoodsOrPsv(),\n ];\n }\n\n return $this->filters;\n }", "title": "" }, { "docid": "a2f02df29521ae0528f48ff3fd27e290", "score": "0.773698", "text": "public function getFilters()\n {\n return [];\n }", "title": "" }, { "docid": "e770df3232675e87861f6338743f6a54", "score": "0.7697082", "text": "public function getAllFilters();", "title": "" }, { "docid": "7caa195517194413ec7b351f0e3cc98e", "score": "0.76210517", "text": "abstract public function getFilters();", "title": "" }, { "docid": "4380ec7ef8b26fa982037d331223ac50", "score": "0.7572731", "text": "function getFilters();", "title": "" }, { "docid": "7f767168e1b602d7f1abe66d49a574ed", "score": "0.75177413", "text": "public function getFilters()\n\t{\n\t\t// if laravel 5.5 ->only()\n\t\treturn $this->request->intersect($this->filters);\n\t}", "title": "" }, { "docid": "421a94858bef83aafabf45073018224a", "score": "0.75149536", "text": "public function getFilters(): array\n {\n return array_filter($this->request->only($this->filters));\n }", "title": "" }, { "docid": "f5bf6ac5b51df1af5732aeaabed74713", "score": "0.7508083", "text": "public function getFilter()\n {\n return $this->filters;\n }", "title": "" }, { "docid": "e7b685a02954908fa3edd8263bb17031", "score": "0.74561614", "text": "public function getFilters()\r\n {\r\n $filters = parent::getFilters();\r\n \r\n if ($this->_isStockFilter()) {\r\n $filters[] = $this->_getStockFilter();\r\n }\r\n\r\n return $filters;\r\n }", "title": "" }, { "docid": "4aae6159aa94224eafef2ffdf749cf35", "score": "0.7446072", "text": "function getFilters()\n\t{\n\t\treturn array(\n\t\t\t\t$this->buildProjectFilter(),\n\t\t\t\t$this->buildStateFilter(),\n\t\t\t\t$this->buildDepartmentFilter(),\n\t\t\t\t$this->buildCustomerFilter()\n\t\t);\n\t}", "title": "" }, { "docid": "955ef3359ead09922f9e75d6e28b12be", "score": "0.74201", "text": "public function getFilters(): array\n {\n return $this->extensionSet->getFilters();\n }", "title": "" }, { "docid": "f816405e4b96cd620d9d91687dbb82a2", "score": "0.74056107", "text": "protected function getFilters()\n {\n /** @var \\Laminas\\Http\\Request $request */\n $request = $this->getRequest();\n\n if ($request->isPost()) {\n $query = $request->getPost('query');\n } else {\n $query = $request->getQuery();\n }\n\n return $this->formatFilters((array)$query);\n }", "title": "" }, { "docid": "3341571724d2fef68d17d1af5d3ac2f2", "score": "0.7405039", "text": "public function getFilters()\n {\n $endpoint = $this->getEndpoint(FilterEndpoint::NAME);\n\n return $endpoint->getBool();\n }", "title": "" }, { "docid": "21aae5ab2eb80953deac86e7fc2d1f8c", "score": "0.73930085", "text": "public function get_filters() : array;", "title": "" }, { "docid": "240189f3d8df7600f7a066f31d03c2fc", "score": "0.73211104", "text": "public function getFilters()\n {\n if (null === $this->filterCollection) {\n $this->filterCollection = new FilterCollection($this);\n }\n\n return $this->filterCollection;\n }", "title": "" }, { "docid": "02f860c135c4f9bbbca015176800fd46", "score": "0.73111737", "text": "public function getFilters() {\n $filters = array(\n new Twig_SimpleFilter('type', 'gettype'),\n );\n if(function_exists('krumo')) {\n $filters[] = new Twig_SimpleFilter('krumo', 'krumo');\n }\n return $filters;\n }", "title": "" }, { "docid": "6c2ff8f41f99d66d6e28b30702defb76", "score": "0.7297754", "text": "public static function getFilterList()\n {\n return [];\n }", "title": "" }, { "docid": "326593e9b250e9eaee2ebc8dc87fd966", "score": "0.72814053", "text": "public static function getFiltersFromRequest()\n {\n return request()->only(self::allowRequestFilters());\n }", "title": "" }, { "docid": "72a3987594bc7e60bc773d9bd3f84109", "score": "0.72727513", "text": "private function getFilters(ResourceInterface $resource)\n {\n if (isset($resource->getOptions()['filters']) && count(($resource->getOptions()['filters']))) {\n\n $result = [];\n\n foreach ($filters = $resource->getOptions()['filters'] as $filter) {\n\n if (strpos($filter, '?') !== 0 || (strpos($filter, '?') === 0 && !$this->options['development'])) {\n $result[$filter] = $this->filterManager->get(ltrim($filter, '?'));\n }\n }\n\n return $result;\n\n } else {\n return [];\n }\n }", "title": "" }, { "docid": "939b12016f46dd13c8d51f3bec1ee0ee", "score": "0.7261195", "text": "public function getFilters(): array\n {\n return Filter::createFilters($this->db);\n }", "title": "" }, { "docid": "61228b304819441cd2291be7b8a5d09f", "score": "0.72598815", "text": "public static function getFilterSet()\n\t{\n\t\treturn self::$filterSet;\n\t}", "title": "" }, { "docid": "b1dde392c95d76a518d348e33426f322", "score": "0.72466606", "text": "public function getFilterCollection();", "title": "" }, { "docid": "7b88ea46701e8d82e03ed7ea3e8b318b", "score": "0.72414404", "text": "public function filters()\n {\n return [\n 'from' => new FromDateSearch ,\n 'to' => new ToDateSearch ,\n 'active' => new StatusFilter ,\n 'category_id' => new CategoryFilter ,\n 'admin_global_search' => new AdminGlobalSearch(['name','description'])\n ];\n }", "title": "" }, { "docid": "b066a4d65b1f832c4ab0f719b23c4001", "score": "0.7236294", "text": "protected function _getFilters()\r\n {\r\n $request = $this->BRequest->request();\r\n if (!empty($request['hash'])) {\r\n $request = (array)$this->BUtil->fromJson(base64_decode($request['hash']));\r\n } elseif (!empty($request['filters'])) {\r\n $request['filters'] = $this->BUtil->fromJson($request['filters']);\r\n }\r\n\r\n /** @var FCom_Core_View_BackboneGrid $view */\r\n if (!empty($request['filters'])) {\r\n return $request['filters'];\r\n } else {\r\n $pers = $this->FCom_Admin_Model_User->personalize();\r\n $gridId = $this->origClass();\r\n $persState = !empty($pers['grid'][$gridId]['state']) ? $pers['grid'][$gridId]['state'] : [];\r\n if (!empty($persState['filters'])) {\r\n return $persState['filters'];\r\n }\r\n }\r\n\r\n return [];\r\n }", "title": "" }, { "docid": "01ba875dddec4adc9c48f12edfc47e3c", "score": "0.7200544", "text": "public function filters()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "3a8742542865dc782a018147d2b0932a", "score": "0.71932274", "text": "public function filters()\n {\n return [];\n }", "title": "" }, { "docid": "1a0fa67c3b63604c81db8b8f4e94ea85", "score": "0.7167742", "text": "public function getFilters(): FilterCollectionInterface;", "title": "" }, { "docid": "e47cabc62f8a67a61941836d9aace787", "score": "0.7158731", "text": "abstract public function getAllowedFilters();", "title": "" }, { "docid": "8e6a0ef7ed54bec86647e092ac444fef", "score": "0.7125526", "text": "protected function getFilters()\n {\n return $this->get('session')->get('application_post_filter_type', []);\n }", "title": "" }, { "docid": "05cd6c94a459f83ec19a90f6f811d084", "score": "0.7117916", "text": "public function getSearchFilters()\n {\n return $this->searchFilters;\n }", "title": "" }, { "docid": "74a52b471681733c5aff2fbea9cd81ce", "score": "0.709725", "text": "public function getFilters()\n {\n return [\n new Twig_SimpleFilter('purchasable_name', [$this, 'getPurchasableName']),\n ];\n }", "title": "" }, { "docid": "6c4adea0ba1aa2ba23d52f97aedff3d6", "score": "0.7069396", "text": "public function getFilter();", "title": "" }, { "docid": "6c4adea0ba1aa2ba23d52f97aedff3d6", "score": "0.7069396", "text": "public function getFilter();", "title": "" }, { "docid": "888813a801cdfad20446301216198f66", "score": "0.7032604", "text": "public function getOperationsFilters();", "title": "" }, { "docid": "9705d1166f88f5c7be485700a9e0f372", "score": "0.70170987", "text": "public function getFiltersList()\n {\n return array_keys($this->filters);\n }", "title": "" }, { "docid": "542b2a28e50f1d7f06d44261c20f5b21", "score": "0.7010958", "text": "protected function getReportFilters() {\n static $filters;\n\n if (is_null($filters)) {\n $filters = array();\n \\RightNow\\Utils\\Url::setFiltersFromAttributesAndUrl($this->data['attrs'], $filters);\n }\n\n return $filters;\n }", "title": "" }, { "docid": "bcbfaaad2ae4b0414f56670d9604c4e5", "score": "0.6981824", "text": "public function getFilters()\n {\n return[\n new \\Twig_SimpleFilter('species',[$this, 'birdFilter'])\n ];\n }", "title": "" }, { "docid": "0abc9c53e465610a9c5776709fc0b283", "score": "0.6972152", "text": "public function getFilters(){\n $filters = [];\n $current = $this->getFilter();\n while($current){\n $filters[] = $current;\n $current = $current->getNextFilter();\n }\n\n return $filters;\n }", "title": "" }, { "docid": "3c77b2cb22e53f809bfbcfbfba52e7e6", "score": "0.69684845", "text": "public function filters()\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "a1bb6a4df2b084e498124181e6c9a0fc", "score": "0.696434", "text": "public function getFilters()\r\n {\r\n return $this->getOptions()\r\n ->joinWith('taxGroup.lang')\r\n ->joinWith('lang');\r\n }", "title": "" }, { "docid": "8c2b278ae28cbde005fda367e6ee1cc3", "score": "0.6963", "text": "public function getFilters(): array\n {\n return [\n 'soft-deleteable' => SoftDeleteableFilter::class\n ];\n }", "title": "" }, { "docid": "56c0706998c3993fbeae61368a932b46", "score": "0.69553846", "text": "public function getFilter()\n {\n return $this->get(self::FILTER);\n }", "title": "" }, { "docid": "c28eea4e1ff435069c7914adffbfbb02", "score": "0.69326633", "text": "public function getProductCollectionFilters()\n {\n $filters = array(\n 'visibility' => array('neq'=>Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE),\n 'status' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED,\n );\n\n return $filters;\n }", "title": "" }, { "docid": "cb490ba40a68c46929fe21eef46b9abb", "score": "0.6901675", "text": "public function getActiveFilters();", "title": "" }, { "docid": "ddd4cadcc489d43b612c24c3c435716a", "score": "0.6883322", "text": "function acf_get_filters() { }", "title": "" }, { "docid": "537d55122e4ee310631026b77505cddd", "score": "0.68826705", "text": "public function getFilter() {}", "title": "" }, { "docid": "1ed7312c29ffa8a9e441b46fa9975e3f", "score": "0.6862317", "text": "protected function getFilters(){\n $inputFilter = new InputFilter();\n return $inputFilter;\n }", "title": "" }, { "docid": "3fdd4cb47b70f3bba4a84a5c7e46e593", "score": "0.68356484", "text": "public function getFilters()\n {\n return [new Twig_SimpleFilter('demo_f', function () {\n return 'demo_f';\n })];\n }", "title": "" }, { "docid": "386fe8b1973d7a6ba8bb4d8ed5b5edf6", "score": "0.6831601", "text": "public function getFilters() : array\n {\n return [\n new Twig_Filter('typeset', [$this, 'typesetFilter']),\n new Twig_Filter('smartypants', [$this, 'smartypantsFilter']),\n new Twig_Filter('widont', [$this, 'widontFilter']),\n new Twig_Filter('truncate', [$this, 'truncate']),\n new Twig_Filter('ucfirst', [$this, 'ucfirst']),\n ];\n }", "title": "" }, { "docid": "bfbbc7354c21674c4a7a629595820657", "score": "0.6795636", "text": "public function getFilters()\n {\n return [\n new TwigFilter('atgc_sublimer', [$this, 'sublimerATGC'], ['is_safe' => ['html']]),\n new TwigFilter('color_amino_custom', [$this, 'colorAminoCustom'], ['is_safe' => ['html']]),\n new TwigFilter('color_amino', [$this, 'colorAmino'], ['is_safe' => ['html']]),\n new TwigFilter('digest_code', [$this, 'disposeDigestedCode'], ['is_safe' => ['html']]),\n new TwigFilter('dispose_sequences', [$this, 'disposeAlignmentSequences'], ['is_safe' => ['html']]),\n ];\n }", "title": "" }, { "docid": "ffd98fc6f8dc03315ef9d705b776e3b6", "score": "0.67709064", "text": "public function filters()\r\n {\r\n $filters = array(\r\n 'postOnly + delete, reset_sending_quota',\r\n );\r\n\r\n return CMap::mergeArray($filters, parent::filters());\r\n }", "title": "" }, { "docid": "62ef8879006aa08af6046c2e86099415", "score": "0.67638206", "text": "public function get_filters() : array {\n return [\n 'field_class' => [$this, 'get_field_class'],\n 'error_messages_for' => [$this, 'get_error_messages_for'],\n 'err' => [$this, 'get_error_messages_for'],\n 'checked_attr' => [$this, 'checked_attr'],\n 'selected_attr' => [$this, 'selected_attr'],\n ];\n }", "title": "" }, { "docid": "dbd57eb51cd7dfd203fdf49289e41b80", "score": "0.67636687", "text": "public function getFilters()\n {\n return array(\n new Twig_SimpleFilter('shortAgo', array($this, 'shortAgoFilter')),\n new Twig_SimpleFilter('longAgo', array($this, 'longAgoFilter'))\n );\n }", "title": "" }, { "docid": "03f41a6bf9ef0487859320d75032db13", "score": "0.67591673", "text": "public function getFilters()\n {\n return [\n new \\Twig_SimpleFilter('muyourcitymodule_fileSize', [$this, 'getFileSize'], ['is_safe' => ['html']]),\n new \\Twig_SimpleFilter('muyourcitymodule_listEntry', [$this, 'getListEntry']),\n new \\Twig_SimpleFilter('muyourcitymodule_geoData', [$this, 'formatGeoData']),\n new \\Twig_SimpleFilter('muyourcitymodule_formattedTitle', [$this, 'getFormattedEntityTitle']),\n new \\Twig_SimpleFilter('muyourcitymodule_objectState', [$this, 'getObjectState'], ['is_safe' => ['html']])\n ];\n }", "title": "" }, { "docid": "27af998094840e555fc99a0630ba3e57", "score": "0.6747399", "text": "public function getFilters() {\n\n\t\t$filters = [\n\t\t\t(object) [\n\t\t\t\t'id' => 'all',\n\t\t\t\t'label' => elgg_echo('all'),\n\t\t\t\t'handler' => TypeSubtypeFilter::class,\n\t\t\t\t'query' => [\n\t\t\t\t\t'filter' => TypeSubtypeFilter::id(),\n\t\t\t\t\t'type' => '',\n\t\t\t\t\t'subtype' => '',\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\n\t\t$types = get_registered_entity_types();\n\t\tforeach ($types as $type => $subtypes) {\n\t\t\tif (empty($subtypes)) {\n\t\t\t\t$filters[] = (object) [\n\t\t\t\t\t'id' => $type,\n\t\t\t\t\t'label' => elgg_echo(\"collection:$type\"),\n\t\t\t\t\t'handler' => TypeSubtypeFilter::class,\n\t\t\t\t\t'query' => [\n\t\t\t\t\t\t'filter' => TypeSubtypeFilter::id(),\n\t\t\t\t\t\t'type' => $type,\n\t\t\t\t\t\t'subtype' => '',\n\t\t\t\t\t],\n\t\t\t\t];\n\t\t\t} else {\n\t\t\t\tforeach ($subtypes as $subtype) {\n\t\t\t\t\t$filters[] = (object) [\n\t\t\t\t\t\t'id' => \"$type:$subtype\",\n\t\t\t\t\t\t'label' => elgg_echo(\"collection:$type:$subtype\"),\n\t\t\t\t\t\t'handler' => TypeSubtypeFilter::class,\n\t\t\t\t\t\t'query' => [\n\t\t\t\t\t\t\t'filter' => TypeSubtypeFilter::id(),\n\t\t\t\t\t\t\t'type' => $type,\n\t\t\t\t\t\t\t'subtype' => $subtype,\n\t\t\t\t\t\t],\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$filters = elgg_trigger_plugin_hook('filters', 'feed', null, $filters);\n\n\t\t$filters = array_filter($filters, function ($filter) {\n\t\t\treturn $filter->id && $filter->label && is_subclass_of($filter->handler, FilterInterface::class);\n\t\t});\n\n\t\treturn $filters;\n\t}", "title": "" }, { "docid": "64ca8cbec4e4177a487f7be2fba333f3", "score": "0.67341053", "text": "public function getEnabledFilters()\n {\n return $this->enabledFilters;\n }", "title": "" }, { "docid": "d1d58a8c3732e100ef81e7e120a67f4e", "score": "0.67267084", "text": "public function getEnabledFilters(): array\n {\n return $this->enabledFilters;\n }", "title": "" }, { "docid": "3ee06ddcba897d38c55163a434b5cc41", "score": "0.67249215", "text": "public static function get_filters() {\n\t\treturn array( 'json_authentication_errors' => array( 'run_checks', 99, 1 ) );\n\n\t}", "title": "" }, { "docid": "c47f9bd363d17f1cf5e70bc57fb46ce8", "score": "0.67153627", "text": "public function getFilters()\n {\n return array(\n 'relpath' => new FilterMethod($this,'relpath'),\n );\n }", "title": "" }, { "docid": "824fda8cc95736383609bd352de56276", "score": "0.6676421", "text": "public function getFilters()\n\t{\n\t\treturn [\n\t\t\tnew \\Twig_SimpleFilter('get_class', 'get_class'),\n\t\t\tnew \\Twig_SimpleFilter('stripJRoot', [$this, 'stripJRoot'])\n\t\t];\n\t}", "title": "" }, { "docid": "aa31387664a8601be61c3437d2462994", "score": "0.6660664", "text": "public function getFilters(): array\n {\n return $this->layers;\n }", "title": "" }, { "docid": "347d2d0b0c3416d771bf2b27b1cdf4c7", "score": "0.66576046", "text": "protected function getAppliedFilters() {\n $request = $this->getRequest();\n $queryStringParams = array_keys($this->_context->getRequest()->getParams());\n $facets = array();\n foreach ($queryStringParams as $param) {\n // Ignore standard query standard params\n if (substr($param, 0, 1) == '_' || $param=='currency' || $param=='locale' || $param == 'callback' || $param == 'search' || $param == 'store' || $param == 'orderby' || $param == 'dir' || $param == 'page' || $param == 'pageSize') {\n continue;\n }\n\n // If we get here, the param is a facet\n $value = $request->getParam($param);\n if (!is_null($value) && trim($value)!=\"\") {\n $facets[$param] = $value;\n }\n }\n return $facets;\n }", "title": "" }, { "docid": "0b75f0f01a550a4027eee688cc0f7087", "score": "0.6644765", "text": "public function getFilters(): array {\n\n return [\n new TwigFilter(\"materialDesignIconicFontList\", [$this, \"materialDesignIconicFontListFilter\"], [\"is_safe\" => [\"html\"]]),\n new TwigFilter(\"mdiFontList\", [$this, \"materialDesignIconicFontListFilter\"], [\"is_safe\" => [\"html\"]]),\n\n new TwigFilter(\"materialDesignIconicFontListIcon\", [$this, \"materialDesignIconicFontListIconFilter\"], [\"is_safe\" => [\"html\"]]),\n new TwigFilter(\"mdiFontListIcon\", [$this, \"materialDesignIconicFontListIconFilter\"], [\"is_safe\" => [\"html\"]]),\n ];\n }", "title": "" }, { "docid": "b7e169b41b2b3e982a7cfbf35fe611fb", "score": "0.66379505", "text": "function getFilters($name = NULL);", "title": "" }, { "docid": "064e9cd1f73f2140ad1bf2d71069fc7c", "score": "0.66355056", "text": "public function filters(): array\n {\n $filters = [\n WhereIdIn::make($this),\n ];\n\n if ($this->publishedAttribute) {\n $filters[] = Scope::make('published')->asBoolean();\n }\n\n if (classHasTrait($this->model(), 'A17\\Twill\\Models\\Behaviors\\HasSlug')) {\n $filters[] = WhereSlug::make('slug')->singular();\n $filters[] = WhereSlug::make('slugs', 'slug');\n }\n\n return $filters;\n }", "title": "" }, { "docid": "1ade99b5c05dfce929239ab1919427ec", "score": "0.6606467", "text": "public function getSalesCollectionFilters()\n {\n $filters = array(\n 'status' => array('neq' => 'canceled'),\n 'created_at' => array('gt' => date('Y-m-d H:i:s',strtotime(date('Y-m-d').' -1 year'))),\n );\n\n return $filters;\n }", "title": "" }, { "docid": "5cc881ed9f2c443be21ffa4a41249436", "score": "0.6583436", "text": "public function getStorageFilters()\n {\n return $this->readOneof(2);\n }", "title": "" }, { "docid": "92b38ce15677454d57a3e8036aa6444f", "score": "0.65829813", "text": "public function filters()\n {\n $filters = array(\n 'postOnly + delete, blacklist',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "title": "" }, { "docid": "cc37da9a8c9e4e0bd03cfdddd793bb7a", "score": "0.65792984", "text": "public function getFilters()\n {\n return array(\n 'kit_shop_country' => new \\Twig_Filter_Function('Kitpages\\ShopBundle\\Twig\\Extension\\ShopExtension::countryName')\n );\n }", "title": "" }, { "docid": "8501431b9a361809abf7428d25d43d5d", "score": "0.6564697", "text": "public function getFilters()\n {\n return array(\n 'roles' => new \\Twig_SimpleFilter(\n 'roles',\n [$this, 'rolesFilter'],\n []\n ),\n );\n }", "title": "" }, { "docid": "c9024de9d25d3ae002379669bc1f5c68", "score": "0.6563236", "text": "public function getFilters() {\n return array(\n // Date and time\n //'timestamp' => new Twig_Filter_Function('strtotime'),\n 'fuzzy_timesince' => new Twig_Filter_Function('Date::fuzzy_span'),\n // Strings\n 'plural' => new Twig_Filter_Function('Inflector::plural'),\n 'singular' => new Twig_Filter_Function('Inflector::singular'),\n 'humanize' => new Twig_Filter_Function('Inflector::humanize'),\n // HTML \n 'obfuscate' => new Twig_Filter_Function('HTML::obfuscate'),\n 'nl2br' => new Twig_Filter_Function('nl2br'),\n // Numbers\n 'num_format' => new Twig_Filter_Function('Num::format'),\n 'phone_format' => new Twig_Filter_Function('View_Helper::format_phone'),\n // Text\n 'limit_words' => new Twig_Filter_Function('Text::limit_words'),\n 'limit_chars' => new Twig_Filter_Function('Text::limit_chars'),\n 'auto_link' => new Twig_Filter_Function('Text::auto_link'),\n 'auto_p' => new Twig_Filter_Function('Text::auto_p'),\n 'bytes' => new Twig_Filter_Function('Text::bytes'),\n 'slug' => new Twig_Filter_Function('URL::slug'),\n 'session' => new Twig_Filter_Function('Session::instance()->get'),\n );\n }", "title": "" }, { "docid": "d7b4fd13a90f8be942d2eb9ef35a4a10", "score": "0.65426743", "text": "public function filters()\n {\n $filters = array(\n 'postOnly + delete',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "title": "" }, { "docid": "f046ea80bb757fcf9288e8496f80b5a4", "score": "0.6537111", "text": "public function filters()\n {\n\t\t$filters = array(\n //'postOnly + delete, slug',\n );\n return CMap::mergeArray($filters, parent::filters());\n }", "title": "" }, { "docid": "41da5fa3be4642a0827648ef40c9bc16", "score": "0.6517513", "text": "public function filters()\n {\n $filters = array(\n 'postOnly + delete', // we only allow deletion via POST request\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "title": "" }, { "docid": "94cfafe58761accde5758b0507647e6c", "score": "0.65077883", "text": "public function get_filters() {\r\n\t\t$arr_stat = array();\r\n\t\tforeach(Scheduler::get_statuses() as $k => $d) {\r\n\t\t\t$arr_stat[strtolower($k)] = new DBFilterColumn(\r\n\t\t\t\t'scheduler.status', $k, $d\r\n\t\t\t); \r\n\t\t}\r\n\t\treturn array(\r\n\t\t\tnew DBFilterGroup(\r\n\t\t\t\t'status',\r\n\t\t\t\ttr('Status'),\r\n\t\t\t\t$arr_stat\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "88b28341e04c8851c476146770122c91", "score": "0.65049756", "text": "public function getFilters($name)\n {\n return isset($this->filters[$name]) ? $this->filters[$name] : [];\n }", "title": "" }, { "docid": "efc1c68f43d460a5ad5aee878283c8db", "score": "0.6504184", "text": "public function getFilters()\n {\n return array(\n new Twig_SimpleFilter('nonl', 'twig_nonl_filter', array('is_safe' => array('all'))),\n );\n }", "title": "" }, { "docid": "7a8ca8936db741e5f389358fff2df40d", "score": "0.6498826", "text": "public function getFilters()\n {\n return array(\n 'localizedDate' => new \\Twig_Filter_Method($this, 'twigLocalizedDateFilter'),\n );\n }", "title": "" }, { "docid": "b53732e1a60e76584e5d4b187b963cf7", "score": "0.6498806", "text": "public function getFilters()\n {\n $config = ['is_safe' => ['html']];\n\n return [\n\n /**\n * https://developer.wordpress.org/reference/functions/wpautop/\n */\n new TwigFilter('wpautop', 'wpautop', $config),\n\n /**\n * Check if file is an Video\n */\n new TwigFilter('isVideo', function($file) {\n return FileHelper::isVideo($file);\n }, $config),\n\n /**\n * Check if file is an SVG\n */\n new TwigFilter('isSvg', function ($file) {\n return FileHelper::isSvg($file);\n }, $config),\n\n /**\n * Check if file is an Image\n */\n new TwigFilter('isImage', function ($file) {\n return FileHelper::isImage($file);\n }, $config),\n\n /**\n * Check if url is an URL\n */\n new TwigFilter('isUrl', function ($url) {\n return UrlHelper::isUrl($url);\n }, $config),\n ];\n }", "title": "" }, { "docid": "0dc0bba5af69590122d1321305ba012b", "score": "0.64979035", "text": "public function getFilters()\n {\n return array(\n 'getThemePath' => new \\Twig_Filter_Method($this, 'getThemePath')\n );\n }", "title": "" }, { "docid": "3b906adf79f87ac751232b680d02fccb", "score": "0.64766103", "text": "public function provideGridListFilters() {\n\t\tif ($page = Application::get_current_page()) {\n\t\t\tif ($filter = $page->config()->get('filter_all')) {\n\t\t\t\t// set ModelTag so GridList.Filter method can find it... yech\n\t\t\t\t$filter['ModelTag'] = $filter['Filter'];\n\t\t\t\treturn [\n\t\t\t\t\tnew GridListFilter($filter)\n\t\t\t ];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "87b118fbf7d3f3e07b1c97e68e3f107e", "score": "0.64660335", "text": "public function getFilters()\n {\n return array(\n 'alink' => new Twig_Filter_Function('twig_bb_admin_link_filter'),\n 'link' => new Twig_Filter_Function('twig_bb_client_link_filter'),\n 'gravatar' => new Twig_Filter_Function('twig_gravatar_filter'),\n 'markdown' => new Twig_Filter_Function('twig_markdown_filter', array('needs_environment' => true, 'is_safe' => array('html'))),\n 'truncate' => new Twig_Filter_Function('twig_truncate_filter', array('needs_environment' => true)),\n 'timeago' => new Twig_Filter_Function('twig_timeago_filter'),\n 'daysleft' => new Twig_Filter_Function('twig_daysleft_filter'),\n 'size' => new Twig_Filter_Function('twig_size_filter'),\n 'ipcountryname' => new Twig_Filter_Function('twig_ipcountryname_filter'),\n 'number' => new Twig_Filter_Function('twig_number_filter'),\n 'period_title' => new Twig_Filter_Function('twig_period_title', array('needs_environment' => true, 'is_safe' => array('html'))),\n 'autolink' => new Twig_Filter_Function('twig_autolink_filter'),\n 'kses' => new Twig_Filter_Function('twig_kses_filter', array('needs_environment' => true, 'is_safe' => array('html'))),\n 'bbmd' => new Twig_Filter_Function('twig_bbmd_filter', array('needs_environment' => true, 'is_safe' => array('html'))),\n 'bb_date' => new Twig_Filter_Function('twig_bb_date'),\n 'bb_datetime' => new Twig_Filter_Function('twig_bb_datetime'),\n\n 'img_tag' => new Twig_Filter_Function('twig_img_tag', array('needs_environment' => false, 'is_safe' => array('html'))),\n 'script_tag' => new Twig_Filter_Function('twig_script_tag', array('needs_environment' => false, 'is_safe' => array('html'))),\n 'stylesheet_tag' => new Twig_Filter_Function('twig_stylesheet_tag', array('needs_environment' => false, 'is_safe' => array('html'))),\n\n 'mod_asset_url' => new Twig_Filter_Function('twig_mod_asset_url'),\n 'asset_url' => new Twig_Filter_Function('twig_asset_url', array('needs_environment' => true, 'is_safe' => array('html'))),\n\n 'money' => new Twig_Filter_Function('twig_money', array('needs_environment' => true, 'is_safe' => array('html'))),\n 'money_without_currency' => new Twig_Filter_Function('twig_money_without_currency', array('needs_environment' => true, 'is_safe' => array('html'))),\n 'money_convert' => new Twig_Filter_Function('twig_money_convert', array('needs_environment' => true, 'is_safe' => array('html'))),\n 'money_convert_without_currency' => new Twig_Filter_Function('money_convert_without_currency', array('needs_environment' => true, 'is_safe' => array('html'))),\n );\n }", "title": "" }, { "docid": "d880e725fe71718e6276e1ec5e2cca76", "score": "0.6456646", "text": "function get_filters($type)\n {\n global $Cbucket;\n\n if(isset($Cbucket->filters[$type]));\n return $Cbucket->filters[$type];\n }", "title": "" }, { "docid": "6d0d84018ca1189f187c1ce15d841bb5", "score": "0.64425635", "text": "public function getQueryAllowedFilters(): array\n {\n if (method_exists($this, 'setQueryAllowedFilters')) {\n return $this->setQueryAllowedFilters() ? $this->setQueryAllowedFilters() : [];\n }\n\n return $this->queryAllowedFilters ?? $this->query_allowed_filters ?? [];\n }", "title": "" }, { "docid": "033b95316db29031c1b75ac3df47f315", "score": "0.6429131", "text": "public function getFilters(): array\n {\n return [\n 'entitle' => new Twig_SimpleFilter(\n 'entitle', [$this, 'entitleFilter'])\n ];\n }", "title": "" }, { "docid": "c4e369529b22460f565de1f7bce9eecd", "score": "0.64238185", "text": "public static function getFilters()\n\t{\n\t\t// Query filters defaults\n\t\t$filters = array();\n\t\t$filters['search'] = '';\n\t\t$filters['status'] = 'open';\n\t\t$filters['type'] = 0;\n\t\t$filters['owner'] = '';\n\t\t$filters['reportedby'] = '';\n\t\t$filters['severity'] = 'normal';\n\t\t$filters['severity'] = '';\n\n\t\t$filters['sort'] = trim(Request::getState('com_support.tickets.sort', 'filter_order', 'created'));\n\t\t$filters['sortdir'] = trim(Request::getState('com_support.tickets.sortdir', 'filter_order_Dir', 'DESC'));\n\n\t\t// Paging vars\n\t\t$filters['limit'] = Request::getState('com_support.tickets.limit', 'limit', Config::get('list_limit'), 'int');\n\t\t$filters['start'] = Request::getState('com_support.tickets.limitstart', 'limitstart', 0, 'int');\n\n\t\t// Incoming\n\t\t$filters['_find'] = urldecode(trim(Request::getState('com_support.tickets.find', 'find', '')));\n\t\t$filters['_show'] = urldecode(trim(Request::getState('com_support.tickets.show', 'show', '')));\n\n\t\t// Break it apart so we can get our filters\n\t\t// Starting string hsould look like \"filter:option filter:option\"\n\t\tif ($filters['_find'] != '')\n\t\t{\n\t\t\t$chunks = explode(' ', $filters['_find']);\n\t\t\t$filters['_show'] = '';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$chunks = explode(' ', $filters['_show']);\n\t\t}\n\n\t\t// Loop through each chunk (filter:option)\n\t\tforeach ($chunks as $chunk)\n\t\t{\n\t\t\tif (!strstr($chunk, ':'))\n\t\t\t{\n\t\t\t\t$chunk = trim($chunk, '\"');\n\t\t\t\t$chunk = trim($chunk, \"'\");\n\n\t\t\t\t$filters['search'] = $chunk;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Break each chunk into its pieces (filter, option)\n\t\t\t$pieces = explode(':', $chunk);\n\n\t\t\t// Find matching filters and ensure the vaule provided is valid\n\t\t\tswitch ($pieces[0])\n\t\t\t{\n\t\t\t\tcase 'q':\n\t\t\t\t\t$pieces[0] = 'search';\n\t\t\t\t\tif (isset($pieces[1]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$pieces[1] = trim($pieces[1], '\"'); // Remove any surrounding quotes\n\t\t\t\t\t\t$pieces[1] = trim($pieces[1], \"'\"); // Remove any surrounding quotes\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$pieces[1] = $filters[$pieces[0]];\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 'status':\n\t\t\t\t\t$allowed = array('open', 'closed', 'all', 'waiting', 'new');\n\t\t\t\t\tif (!in_array($pieces[1], $allowed))\n\t\t\t\t\t{\n\t\t\t\t\t\t$pieces[1] = $filters[$pieces[0]];\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 'type':\n\t\t\t\t\t$allowed = array(\n\t\t\t\t\t\t'submitted' => 0,\n\t\t\t\t\t\t'automatic' => 1,\n\t\t\t\t\t\t'none' => 2,\n\t\t\t\t\t\t'tool' => 3\n\t\t\t\t\t);\n\t\t\t\t\tif (in_array($pieces[1], $allowed))\n\t\t\t\t\t{\n\t\t\t\t\t\t$pieces[1] = $allowed[$pieces[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$pieces[1] = 0;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 'owner':\n\t\t\t\tcase 'reportedby':\n\t\t\t\t\tif (isset($pieces[1]))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($pieces[1] == 'me')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$pieces[1] = User::get('username');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ($pieces[1] == 'none')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$pieces[1] = 'none';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 'severity':\n\t\t\t\t\t$allowed = array('critical', 'major', 'normal', 'minor', 'trivial');\n\t\t\t\t\tif (!in_array($pieces[1], $allowed))\n\t\t\t\t\t{\n\t\t\t\t\t\t$pieces[1] = $filters[$pieces[0]];\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$filters[$pieces[0]] = (isset($pieces[1])) ? $pieces[1] : '';\n\t\t}\n\n\t\t// Return the array\n\t\treturn $filters;\n\t}", "title": "" } ]
b38df333a4320a2ff7fec9eea0f89fb8
This method is used to define needles to search for within class names and define their associated path.
[ { "docid": "e8eec21d7db1d921fdeeecda20c3bd59", "score": "0.0", "text": "public function lookFor($suffix, $path, $extension = '.class.php')\n {\n if(!array_key_exists($suffix, $this->classType)) {\n array_push($this->classType, $suffix);\n }\n \n $this->classPath[$suffix] = $path;\n $this->classExtension[$suffix] = $extension;\n }", "title": "" } ]
[ { "docid": "0854c7b08754aa71553244152b7578e3", "score": "0.6119328", "text": "protected function getSearchPaths() {}", "title": "" }, { "docid": "d06fbd8af53999828c7329d286c2c737", "score": "0.60872996", "text": "protected function get_finder() {\n }", "title": "" }, { "docid": "76b1c5a97fcdbc7a519b1eeaa7e85aeb", "score": "0.605306", "text": "public static function classmap() {\n\t\t$routing = array(\n\t\t\t'/route_manager.php',\n\t\t\t'/route.php',\n\t\t\t'/dispatcher.php',\n\t\t\t'/controller.php',\n\t\t\t'/base_controller.php'\n\t\t);\n\t\t$utils = array(\n\t\t\t'/utils.php'\n\t\t);\n\t\t$security = array(\n\t\t\t'/security.php'\n\t\t);\n\t\t$database = array(\n\t\t\t'/db_adapter.php'\n\t\t);\n\n\t\tforeach ($routing as &$r) {\n\t\t\t$r = self::ROUTING.$r;\n\t\t}\n\n\t\tforeach ($utils as &$u) {\n\t\t\t$u = self::UTILS.$u;\n\t\t}\n\n\t\tforeach ($security as &$s) {\n\t\t\t$s = self::SECURITY.$s;\n\t\t}\n\n\t\tforeach ($database as &$d) {\n\t\t\t$d = self::DATABASE.$d;\n\t\t}\n\n\t\t$classes = array_merge($routing, $utils, $security, $database);\n\t\tforeach ($classes as $className) {\n\t\t\t//require_once $className;\n\t\t\tself::loadClass($className);\n\t\t}\n\t}", "title": "" }, { "docid": "880698d9484a1b62d10a6162268d2e29", "score": "0.5956109", "text": "protected function setupClassAliases()\n {\n $aliases = [\n 'admin.router' => \\App\\Admin\\Routing\\Router::class,\n ];\n\n foreach ($aliases as $key => $alias) {\n $this->app->alias($key, $alias);\n }\n }", "title": "" }, { "docid": "93b2b5af99436c71b037f1337881b15f", "score": "0.59406435", "text": "public function configure()\n {\n // TODO: Replace this\n return;\n $docs = $this->configuration->getTransformer()->getExternalClassDocumentation();\n foreach ($docs as $external) {\n $prefix = (string) $external->getPrefix();\n $uri = (string) $external->getUri();\n\n $this[] = new Rule(\n function ($node) use ($prefix) {\n return (is_string($node) && (strpos(ltrim($node, '\\\\'), $prefix) === 0));\n },\n function ($node) use ($uri) {\n return str_replace('{CLASS}', ltrim($node, '\\\\'), $uri);\n }\n );\n }\n }", "title": "" }, { "docid": "b91e170e9c640d2991d8f71f8de9c3bf", "score": "0.5902203", "text": "private function registerClasses() {\n $classes = [\n // include the models\n 'Sitemap',\n ];\n }", "title": "" }, { "docid": "ff9974974be24281bee77c2673857e9d", "score": "0.5844682", "text": "protected function _retriveStandsForClassName()\n\t{\n\t\t$name = get_class($this);\n\t\t$this->_standsForClass = substr($name, 0, strlen($name) - strlen('_Import'));\n\t}", "title": "" }, { "docid": "fdeca1be4ebb189abada8b12fa21634a", "score": "0.5770413", "text": "public static function pathAutoload($classname)\n {\n\n $length = strlen($classname);\n $requireMe = null;\n\n foreach (BuizCore::$autoloadPath as $path) {\n\n $parts = [];\n $start = 0;\n $end = 1;\n $package = '';\n\n if (file_exists($path.$classname.'.php')) {\n\n include $path.$classname.'.php' ;\n return;\n\n } else {\n\n // 3 Stufen Packages\n $level = 0;\n for ($pos = 1 ; $pos < $length ; ++$pos) {\n\n if (ctype_upper($classname[$pos])) {\n $package .= strtolower(str_replace('_','', substr($classname, $start, $end ))).'/' ;\n $start += $end;\n $end = 0;\n ++$level;\n\n $file = realpath($path.$package.$classname.'.php');\n if (file_exists($file)) {\n Debug::logFile($file);\n self::$classIndex[$classname] = $file;\n self::$indexChanged = true;\n include $file;\n\n return;\n }\n\n if ($level == self::MAX_PACKAGE_LEVEL)\n break;\n }\n ++$end;\n }\n }//end if (file_exists($path.$classname.'.php'))\n\n }//end foreach (BuizCore::$autoloadPath as $path)\n\n }", "title": "" }, { "docid": "2db320c0c5f3c05ff9d0466d80ce196c", "score": "0.56485903", "text": "public function addClassFolders()\n\t{\t\n\t\t//load class\n\t\tClassLoader::addDirectories(array(\n\t\t\t__DIR__ . '/v1',\n\t\t));\n\t}", "title": "" }, { "docid": "3d28af4f84a34831daf24d87c1d2b3ce", "score": "0.56342405", "text": "function autoload($classname){\n\t\t$paths = array(\n\t\t\t\t'_Model'\t\t=>\tCORE.DS.'Models'.DS,\n\t\t\t\t'_Controller'\t=>\tCORE.DS.'Controllers'.DS,\n\t\t\t\t'' \t\t\t\t=>\tCORE.DS\n\t\t);\n\t\n\t\tforeach($paths as $name => $chemin){\n\t\t\tif(!is_array($chemin)){\n\t\t\t\t$chemin = array($chemin);\n\t\t\t}\n\n\t\t\tforeach($chemin as $location){\n\t\t\t\tif(preg_match('#(.*)'.$name.'$#i', $classname, $out)){\n\t\t\t\t\t$filepath = $location.strtolower($out[1]).'.php';\n\t\t\t\t\t$r = @include_once($filepath);\n\t\t\t\t\tif($r==true || class_exists($classname, false)){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7b628030616d57c8f100d7f0d3d6e681", "score": "0.5625639", "text": "public function __construct() {\n $this->classNameMapping = array(\n 'JPT\\SocketFramework' => 'SocketFramework' . \n \\DIRECTORY_SEPARATOR . 'Classes',\n 'Tools' => __DIR__\n );\n }", "title": "" }, { "docid": "14700965db4829b0abe36b7b3f51ac70", "score": "0.562144", "text": "private function set_path() {\n\n foreach ( $this->functionPath as $function ) {\n set_include_path( $this->absPath . $function );\n }\n\n foreach ( $this->classPath as $class ) {\n set_include_path( $this->absPath . $class );\n }\n\n }", "title": "" }, { "docid": "aab735e81e74d3e0bff90091aaed5bbc", "score": "0.5616184", "text": "public static function addClassPath()\n\t\t{\n\t\t\tforeach (func_get_args() as $arg)\n\t\t\t\tself::$classPaths[] = rtrim($arg, \"\\x2F\\x5C\");\n\t\t}", "title": "" }, { "docid": "c73a6ea43f027d86539d5caa967fa270", "score": "0.5606562", "text": "function init(){\n\t\tparent::init();\n\t\t$this->api->pathfinder=$this;\n\t\t$GLOBALS['atk_pathfinder']=$this;\t// used by autoload\n\n\n\t\t$this->addDefaultLocations();\n\t}", "title": "" }, { "docid": "7cfac60fd65607d5166390623e55cf46", "score": "0.5576383", "text": "protected function resolveClassNames() {\n\t\t$classes = array('forumModel', 'threadModel', 'postModel', 'userModel', 'admin', 'auth', 'cache', 'pObj');\n\t\tforeach ($classes as $name) {\n\t\t\t$className = 'tx_simpleforum_' . $name;\n\t\t\twhile(class_exists('ux_' . $className)) {\n\t\t\t\t$className = 'ux_' . $className;\n\t\t\t}\n\t\t\t$this->className[$name] = $className;\n\t\t}\n\t}", "title": "" }, { "docid": "3943bd7926c5a9c0b518e2304ac967dd", "score": "0.55212134", "text": "function class_loader($class_name)\n{\n $subdirs = array('/Handlers/', '/Models/', '/Models/Guard/', '/Misc/', '/Enums/');\n\n foreach ($subdirs as $subdir)\n {\n if (file_exists(__DIR__.$subdir.$class_name.'.php'))\n {\n include __DIR__.$subdir.$class_name.'.php';\n break;\n }\n }\n}", "title": "" }, { "docid": "9343d57ee011c0333b4d58c3a9ae1158", "score": "0.5515017", "text": "public function testLocateClass()\n {\n $result = $this->uut->locateClass('MyObject');\n $this->assertEquals(MyObject::class, $result);\n\n $result = $this->uut->locateClass('Sub\\MySubObject');\n $this->assertEquals(MySubObject::class, $result);\n }", "title": "" }, { "docid": "7c15ab503b820cf4f4a2b24ded5a132e", "score": "0.55122304", "text": "function providerPath()\n\t{\n\t\treturn array(\n\t\t\tarray('foobar', NULL, $this->traversable['foobar']),\n\t\t\tarray('kohana', NULL, $this->traversable['kohana']),\n\t\t\tarray('foobar.definition', NULL, $this->traversable['foobar']['definition']),\n\t\t\tarray('foobar.alternatives', NULL, NULL),\n\t\t\tarray('kohana.alternatives', NULL, NULL),\n\t\t\tarray('kohana.alternatives', 'nothing', 'nothing'),\n\t\t\tarray('cheese.origins', array('far', 'wide'), array('far', 'wide')),\n\t\t);\n\t}", "title": "" }, { "docid": "b4f3941227ac53077e42c7c6b054a94a", "score": "0.55097306", "text": "function IterateClassDirs($main, $class_name) {\r\n $di = new RecursiveDirectoryIterator($main);\r\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\r\n if ($class_name == str_replace('.class.php', '', basename($file))) {\r\n require_once $file;\r\n break;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "6c7834f96a6c1b3bd524e6333861cba3", "score": "0.54896593", "text": "function zing_class_path($class) {\n if (is_object($class)) $class = get_class($class);\n return strtolower(preg_replace('|([^^/])([A-Z])|', '$1_$2', str_replace('\\\\', '/', $class)));\n}", "title": "" }, { "docid": "ddab651fa8df6b088d7d5eeca0498cc4", "score": "0.5450238", "text": "public function classDefinitions()\n\t{\n\t\t$this->assertConfigNodeHasChild('global/models', 'mytunes');\n\t\t$this->assertConfigNodeHasChild('global/models/mytunes', 'class');\n\t\t$this->assertConfigNodeValue('global/models/mytunes/class', 'Que_Mytunes_Model');\n\t\t\n\t\t$this->assertConfigNodeHasChild('global/blocks', 'mytunes');\n\t\t$this->assertConfigNodeHasChild('global/blocks/mytunes', 'class');\n\t\t$this->assertConfigNodeValue('global/blocks/mytunes/class', 'Que_Mytunes_Block');\n\t\t\n\t\t$this->assertConfigNodeHasChild('global/helpers', 'mytunes');\n\t\t$this->assertConfigNodeHasChild('global/helpers/mytunes', 'class');\n\t\t$this->assertConfigNodeValue('global/helpers/mytunes/class', 'Que_Mytunes_Helper');\n\t}", "title": "" }, { "docid": "30503e8c9dbe0ecda39226099db4e71b", "score": "0.5424538", "text": "function fn_loadClasspath($folderpath, $nameOfClass)\n\t\t{\n\t\t\t$filenameOfClass = \"{$nameOfClass}.class.php\";\n\t\t\t$filenameOfInterface = \"{$nameOfClass}.interface.php\";\n\t\t\t$folderContents = scandir($folderpath);\n\n\t\t\tforeach ($folderContents as $folderName)\n\t\t\t{\n\t\t\t\t//Eliminate those default \".\" and \"..\" folder entries\n\t\t\t\tif ($folderName != \".\" && $folderName != \"..\")\n\t\t\t\t{\n\t\t\t\t\t$contentPath = \"{$folderpath}/{$folderName}\";\n\t\t\t\t\tif (is_file($contentPath))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($folderName == $filenameOfClass)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//include this class and break out..\n\t\t\t\t\t\t\t$filepathOfClass = \"{$folderpath}/{$filenameOfClass}\";\n\t\t\t\t\t\t\t@require_once \"{$filepathOfClass}\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ($folderName == $filenameOfInterface)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//include this interface and break out..\n\t\t\t\t\t\t\t$filepathOfInterface = \"{$folderpath}/{$filenameOfInterface}\";\n\t\t\t\t\t\t\t@require_once \"{$filepathOfInterface}\";\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\tif (is_dir($contentPath))\n\t\t\t\t\t{\n\t\t\t\t\t\t//A folder. Search it again, recursively.\n\t\t\t\t\t\tfn_loadClasspath($contentPath, $nameOfClass);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e261d1f83728a3ede1be8abf85b7c41a", "score": "0.54212385", "text": "public function getClassesPath();", "title": "" }, { "docid": "f115322332d68bafb429dfe745d768d0", "score": "0.5410778", "text": "public function initialize_class_file_map(){\n\n $this->class_file_map = array(\n\n /**\n * Main Sensei class\n */\n 'Sensei_Main' => 'class-sensei.php',\n\n /**\n * Admin\n */\n 'Sensei_Welcome' => 'admin/class-sensei-welcome.php' ,\n 'Sensei_Learner_Management' => 'admin/class-sensei-learner-management.php' ,\n\n /**\n * Shortcodes\n */\n 'Sensei_Shortcode_Loader' => 'shortcodes/class-sensei-shortcode-loader.php',\n 'Sensei_Shortcode_Interface' => 'shortcodes/interface-sensei-shortcode.php',\n 'Sensei_Shortcode_Featured_Courses' => 'shortcodes/class-sensei-shortcode-featured-courses.php',\n 'Sensei_Shortcode_User_Courses' => 'shortcodes/class-sensei-shortcode-user-courses.php',\n 'Sensei_Shortcode_Courses' => 'shortcodes/class-sensei-shortcode-courses.php',\n 'Sensei_Shortcode_Teachers' => 'shortcodes/class-sensei-shortcode-teachers.php',\n 'Sensei_Shortcode_User_Messages' => 'shortcodes/class-sensei-shortcode-user-messages.php',\n 'Sensei_Shortcode_Course_Page' => 'shortcodes/class-sensei-shortcode-course-page.php',\n 'Sensei_Shortcode_Lesson_Page' => 'shortcodes/class-sensei-shortcode-lesson-page.php',\n 'Sensei_Shortcode_Course_Categories' => 'shortcodes/class-sensei-shortcode-course-categories.php',\n 'Sensei_Shortcode_Unpurchased_Courses' => 'shortcodes/class-sensei-shortcode-unpurchased-courses.php',\n 'Sensei_Legacy_Shortcodes' => 'shortcodes/class-sensei-legacy-shortcodes.php',\n\n /**\n * Built in theme integration support\n */\n 'Sensei_Theme_Integration_Loader' => 'theme-integrations/theme-integration-loader.php',\n 'Sensei__S' => 'theme-integrations/_s.php',\n 'Sensei_Twentyeleven' => 'theme-integrations/twentyeleven.php',\n 'Sensei_Twentytwelve' => 'theme-integrations/twentytwelve.php',\n 'Sensei_Twentythirteen' => 'theme-integrations/Twentythirteen.php',\n 'Sensei_Twentyfourteen' => 'theme-integrations/Twentyfourteen.php',\n 'Sensei_Twentyfifteen' => 'theme-integrations/Twentyfifteen.php',\n 'Sensei_Twentysixteen' => 'theme-integrations/Twentysixteen.php',\n 'Sensei_Storefront' => 'theme-integrations/Storefront.php',\n\n /**\n * WooCommerce\n */\n 'Sensei_WC' => 'class-sensei-wc.php',\n\n );\n }", "title": "" }, { "docid": "96e9153f5f78d1d0a9dd03cc3ba441b4", "score": "0.54024345", "text": "public static function classAutoload(){\r\n \tspl_autoload_register(function ($class) {\r\n \t\t// module either namespace or in url\r\n \t\tglobal $CNF;\r\n \t\t$parts = explode('\\\\', $class);\r\n \t\t$classname = array_pop($parts);\r\n\t\t\t$filename = implode($CNF->DS,$parts);\r\n\t\t\t// lower case file name and name space is also lowercase to match with foldername\r\n\t\t\t$filename =$filename.$CNF->DS.strtolower($classname).'.php';\r\n\t\t\tif(file_exists($CNF->basedir.$CNF->DS .$filename)){\r\n \t\t\tinclude_once $filename ;\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception($filename.\" Not Found while loading thorugh class Autload!\");\r\n\t\t\t}\r\n \t});\r\n }", "title": "" }, { "docid": "036c916a098cf841dc409444cdb0ea99", "score": "0.5401517", "text": "public function autoload () { \t\t\n\t\tspl_autoload_register( function ($class) {\t\t\t\t\n\t\t\t$class = str_replace(['\\\\','feathr'], ['/', ''], strtolower($class));\n\t\t\tif ( file_exists($this->root.$class.'.php') ) {\t\t\t\n\t\t\t\trequire_once($this->root.$class.'.php');\n\t\t\t}\n\t\t});\t\n\t}", "title": "" }, { "docid": "069bc52410efe0e82f5c00ff821ce934", "score": "0.53792775", "text": "public static function classNameProvider(): array\n {\n return [\n ['Does', 'Not', 'Exist'],\n\n ['Exists', 'In', 'App', true, 'TestApp\\In\\ExistsApp'],\n ['Also/Exists', 'In', 'App', true, 'TestApp\\In\\Also\\ExistsApp'],\n ['Also', 'Exists/In', 'App', true, 'TestApp\\Exists\\In\\AlsoApp'],\n ['Also', 'Exists/In/Subfolder', 'App', true, 'TestApp\\Exists\\In\\Subfolder\\AlsoApp'],\n ['No', 'Suffix', '', true, 'TestApp\\Suffix\\No'],\n\n ['MyPlugin.Exists', 'In', 'Suffix', true, 'MyPlugin\\In\\ExistsSuffix'],\n ['MyPlugin.Also/Exists', 'In', 'Suffix', true, 'MyPlugin\\In\\Also\\ExistsSuffix'],\n ['MyPlugin.Also', 'Exists/In', 'Suffix', true, 'MyPlugin\\Exists\\In\\AlsoSuffix'],\n ['MyPlugin.Also', 'Exists/In/Subfolder', 'Suffix', true, 'MyPlugin\\Exists\\In\\Subfolder\\AlsoSuffix'],\n ['MyPlugin.No', 'Suffix', '', true, 'MyPlugin\\Suffix\\No'],\n\n ['Vend/MPlugin.Exists', 'In', 'Suffix', true, 'Vend\\MPlugin\\In\\ExistsSuffix'],\n ['Vend/MPlugin.Also/Exists', 'In', 'Suffix', true, 'Vend\\MPlugin\\In\\Also\\ExistsSuffix'],\n ['Vend/MPlugin.Also', 'Exists/In', 'Suffix', true, 'Vend\\MPlugin\\Exists\\In\\AlsoSuffix'],\n ['Vend/MPlugin.Also', 'Exists/In/Subfolder', 'Suffix', true, 'Vend\\MPlugin\\Exists\\In\\Subfolder\\AlsoSuffix'],\n ['Vend/MPlugin.No', 'Suffix', '', true, 'Vend\\MPlugin\\Suffix\\No'],\n\n ['Exists', 'In', 'Cake', false, 'Cake\\In\\ExistsCake'],\n ['Also/Exists', 'In', 'Cake', false, 'Cake\\In\\Also\\ExistsCake'],\n ['Also', 'Exists/In', 'Cake', false, 'Cake\\Exists\\In\\AlsoCake'],\n ['Also', 'Exists/In/Subfolder', 'Cake', false, 'Cake\\Exists\\In\\Subfolder\\AlsoCake'],\n ['No', 'Suffix', '', false, 'Cake\\Suffix\\No'],\n\n // Realistic examples returning nothing\n ['App', 'Core', 'Suffix'],\n ['Auth', 'Controller/Component'],\n ['Unknown', 'Controller', 'Controller'],\n\n // Real examples returning class names\n ['App', 'Core', '', false, 'Cake\\Core\\App'],\n ['Auth', 'Controller/Component', 'Component', false, 'Cake\\Controller\\Component\\AuthComponent'],\n ['File', 'Cache/Engine', 'Engine', false, 'Cake\\Cache\\Engine\\FileEngine'],\n ['Command', 'Shell/Task', 'Task', false, 'Cake\\Shell\\Task\\CommandTask'],\n ['Upgrade/Locations', 'Shell/Task', 'Task', false, 'Cake\\Shell\\Task\\Upgrade\\LocationsTask'],\n ['Pages', 'Controller', 'Controller', true, 'TestApp\\Controller\\PagesController'],\n ];\n }", "title": "" }, { "docid": "329d1541940746c3a26fef66f4f19e2d", "score": "0.5366404", "text": "protected function discover() {\n\t\t$definitions = [];\n\n\t\t$i = 0;\n\t\tforeach ( $this->getSources() as $namespace => $location ) {\n\t\t\t$finder = new Finder();\n\t\t\t$results = $finder->recurse()->in( $location )->files( '*.php' );\n\t\t\t$replacements = [\n\t\t\t\t$location => '',\n\t\t\t\t'.php' => '',\n\t\t\t\tDIRECTORY_SEPARATOR => '\\\\',\n\t\t\t];\n\n\t\t\t/** @var SplFileInfo $file */\n\t\t\tforeach ( $results as $file ) {\n\t\t\t\t$class = strtr( $file->getRealPath(), $replacements );\n\t\t\t\t$class = trim( $class, '\\\\' );\n\n\t\t\t\tif ( is_string( $namespace ) && ! is_numeric( $namespace ) ) {\n\t\t\t\t\t// Convert path into namespace using PSR-4 standard.\n\t\t\t\t\t$namespace = rtrim( $namespace, '\\\\' ) . '\\\\';\n\t\t\t\t\t$class = $namespace . $class;\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\t$reflection = new ReflectionClass( $class );\n\t\t\t\t\tif ( ! $reflection->isAbstract() && ! $reflection->isInterface() && in_array( $this->interfaceName, $reflection->getInterfaceNames() ) ) {\n\t\t\t\t\t\t$key = $i;\n\t\t\t\t\t\tif ( $this->idMethodName && is_callable( [ $class, $this->idMethodName ] ) ) {\n\t\t\t\t\t\t\t$instance = new $class;\n\t\t\t\t\t\t\t$key = call_user_func( [ $instance, $this->idMethodName ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$definitions[ $key ] = $class;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch ( ReflectionException $exception ) {\n\t\t\t\t\t// Fail silently ... for now.\n\t\t\t\t}\n\n\t\t\t\t$i ++;\n\t\t\t}\n\t\t}\n\n\t\treturn $definitions;\n\t}", "title": "" }, { "docid": "1bf507cbe3dc0b23cbc8a5991de74e43", "score": "0.53248304", "text": "public function fillClassGeneralizations() {\r\n\t\t// This function only needs to be called once\r\n\t\tstatic $called = false;\r\n\t\tif ( $called ) return;\r\n\t\t$called = true;\r\n\t\t\r\n\t\t$smartwikiModel = SmartWikiModel::singleton();\r\n\t\t$classes = $smartwikiModel->getClasses();\r\n\t\t$gens = $smartwikiModel->getGeneralizations();\r\n\t\r\n\t\t$genFamily = array();\r\n\t\r\n\t\tforeach($gens as $keyGen => $valueGen) {\r\n\t\t\t$child = $valueGen->getChildClass()->getTitle()->getText();\r\n\t\t\t$parent = $valueGen->getParentClass()->getTitle()->getText();\r\n\t\t\t\t\r\n\t\t\t$genFamily[$child]['parents'][] = &$gens[$keyGen];\r\n\t\t\t$genFamily[$parent]['childs'][] = &$gens[$keyGen];\r\n\t\t\t\t\r\n\t\t}\r\n\t\r\n\t\tforeach($classes as $keyClass => $valueClass) {\r\n\t\t\t$className = $valueClass->getTitle()->getText();\r\n\t\t\tif ( isset($genFamily[$className]) ) {\r\n\t\t\t\tif ( isset($genFamily[$className]['parents']) && count($genFamily[$className]['parents']) > 0 ) {\r\n\t\t\t\t\t$classes[$keyClass]->setParentGeneralizations($genFamily[$className]['parents']);\r\n\t\t\t\t}\r\n\t\t\t\tif ( isset($genFamily[$className]['childs']) && count($genFamily[$className]['childs']) > 0 ) {\r\n\t\t\t\t\t$classes[$keyClass]->setChildGeneralizations($genFamily[$className]['childs']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1b560b7b96a42921bf2fbc76ae6297cf", "score": "0.53181714", "text": "public static function loadClassMap()\n {\n self::$classMap = AdiantiClassMap::getMap();\n $aliases = AdiantiClassMap::getAliases();\n \n if ($aliases)\n {\n foreach ($aliases as $old_class => $new_class)\n {\n if (class_exists($new_class))\n {\n class_alias($new_class, $old_class);\n }\n }\n }\n }", "title": "" }, { "docid": "a794b57039aa44a53971d3c781ce4ef7", "score": "0.5316652", "text": "protected function scan(){\n\n\t\t//We're listing the class declared into the directory of the child module\n\t\t$dir = cms_join_path(parent::GetModulePath(),'lib');\n\t\t$liste = array('entities' => array(), 'associate' => array());\n\n\t\t$files = $this->getFilesInDir($dir, \"#^class\\.entity\\.(.)*$#\");\n\t\tforeach ($files as $path => $filename) {\n\t\t $classname = substr($filename , 13 ,strlen($filename) - 4 - 13);\n\t\t $liste['entities'][] = array('filename'=>$filename, 'basename'=>$path, 'classname'=>$classname);\n\t\t}\n\t\t$files = $this->getFilesInDir($dir, \"#^class\\.assoc\\.(.)*$#\");\n\t\tforeach ($files as $path => $filename) {\n\t\t $classname = substr($filename , 12 ,strlen($filename) - 4 - 12);\n\t\t $liste['associate'][] = array('filename'=>$filename, 'basename'=>$path, 'classname'=>$classname);\n\t\t}\n\n\t\t$errors = array();\n\t\t\n\t\tforeach($liste['entities'] as $element) {\n\t\t\t$className = $element['classname'];\n\t\t\t$filename = $element['filename'];\n\t\t\t$basename = $element['basename'];\n\t\t\tif(!class_exists($className)){\n\t\t\t\tOrmTrace::debug(\"importing Entity \".$className.\" into the module \".$this->getName());\n\t\t\t\trequire_once($basename);\t\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\t$entity = new $className();\n\t\t\t} catch(OrmIllegalConfigurationException $oce){\n\t\t\t\t$errors[$className] = $oce;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tforeach($liste['associate'] as $element) {\n\t\t\t$className = $element['classname'];\n\t\t\t$filename = $element['filename'];\n\t\t\t$basename = $element['basename'];\n\t\t\tif(!class_exists($className)){\n\t\t\t\tOrmTrace::debug(\"importing Associate Entity \".$className.\" into the module \".$this->getName());\n\t\t\t\trequire_once($basename);\t\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\t$entity = new $className();\n\t\t\t} catch(OrmIllegalConfigurationException $oce){\n\t\t\t\t$errors[$className] = $oce;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t//Process all the errors\n\t\tif(!empty($errors)){\n\t\t\techo '<h3 style=\"color:#F00\">Some OrmIllegalConfigurationException have been thrown</h3>';\n\t\t\t\n\t\t\tforeach ($errors as $className => $error) {\n\t\t\t\techo '<h4>Entity '.$className.' </h4><ol>';\n\t\t\t\tforeach ($error->getMessages() as $message) {\n\t\t\t\t\techo '<li>'.$message.'</li>';\n\t\t\t\t}\n\t\t\t\techo '</ol>';\n\t\t\t}\n\t\t\t\n\t\t\texit;\n\t\t}\n\n\t\treturn $liste;\n\t}", "title": "" }, { "docid": "c5df55b7c543bb6a2ffd885c6805e559", "score": "0.5306382", "text": "public function addClassPathMapping($classNamePrefix, $pathPrefix) {\n $this->classNameMapping[$classNamePrefix] = $pathPrefix;\t\n }", "title": "" }, { "docid": "341117b7ec5865446b8cacd6d961149b", "score": "0.5303468", "text": "public static function registerClass(array $data): void\n {\n foreach ($data as $className => $relPath){\n if($className[0] === '\\\\'){\n $className = substr($className, 1);\n }\n self::$classes[$className] = $relPath;\n }\n }", "title": "" }, { "docid": "816e99583540e0138de5d47f16cf9a26", "score": "0.52893585", "text": "public function classes_init() {\n\t\t\t// create other classes' objects and call init()\n\t\t\t$class_names = array( 'theme', 'admin', 'review' );\n\t\t\tforeach ( $class_names as $class ) {\n\t\t\t\t//capitalize first letter of class name\n\t\t\t\t$class_uc = ucfirst( $class );\n\t\t\t\t//Instanciate class and call init() of every class\n\t\t\t\t$class_name = \"rtCamp\\WP\\\\rtRestaurants\\\\\" . $class_uc;\n\t\t\t\t${$class} = new $class_name();\n\t\t\t\t${$class}->init();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "11e2ade83ea8f18000977ecad337d38e", "score": "0.528357", "text": "public function build(): self\n {\n foreach ($this->directories as $path) {\n $this->path = $path;\n\n $directory = new RecursiveDirectoryIterator(\n $this->getSearchPath(),\n RecursiveDirectoryIterator::SKIP_DOTS\n );\n\n $fileIterator = new RecursiveIteratorIterator($directory, RecursiveIteratorIterator::LEAVES_ONLY);\n\n $this->buildCustomizableClasspath();\n $this->buildVersionedClasspath();\n\n $notIncludedClasses = array_flip($this->notIncluded);\n $hardcodedNamespaces = array_flip(static::$hardcodedNamespaces[$path]);\n\n /** @var \\SplFileObject $file */\n foreach ($fileIterator as $file) {\n $fileNameWithoutExt = str_ireplace('.' . $this->fileExt, '', $file->getFilename());\n\n if ($file->getExtension() !== $this->fileExt) {\n continue;\n }\n\n if (in_array($file->getFilename(), static::$customizableClasses[$path])\n || in_array($file->getFilename(), static::$ignoredClasses[$path])\n ) {\n if (in_array($file->getFilename(), $this->notIncluded)) {\n $this->result[$notIncludedClasses[$file->getFilename()]] = $this->getImportPath($file->getPathname());\n }\n\n continue;\n }\n\n if (in_array($file->getFilename(), static::$hardcodedNamespaces[$path])) {\n $this->result[$hardcodedNamespaces[$file->getFilename()]] = $this->getImportPath($file->getPathname());\n } else {\n $this->result[$this->getImportClass($fileNameWithoutExt, $file->getPath())] = $this->getImportPath($file->getPathname());\n }\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "8d0f7d1223784c7b07467a1ad007f955", "score": "0.52781683", "text": "public function index($extraPaths = null) {\n\n $fileMasks = [\n sprintf(self::LOOKUP_CLASS_MASK, '*'),\n sprintf(self::LOOKUP_INTERFACE_MASK, '*')\n ];\n\n $extraPathsRemove = null;\n if (!is_null($extraPaths)) {\n $extraPathsRemove = [];\n foreach ($extraPaths as $pathOpts) {\n $extraPath = val('path', $pathOpts);\n if (array_key_exists($extraPath, $this->paths)) {\n continue;\n }\n\n $extraPathsRemove[] = $extraPath;\n $extraOptions = $this->buildOptions;\n $extraOptions['SplitTopic'] = val('topic', $pathOpts);\n $this->addPath($extraPath, $extraOptions);\n }\n }\n\n foreach ($this->paths as $path => $pathOptions) {\n $recursive = val('recursive', $pathOptions);\n $files = $this->findFiles($path, $fileMasks, $recursive);\n if ($files === false) {\n continue;\n }\n\n foreach ($files as $file) {\n $splitTopic = val('topic', $pathOptions, self::TOPIC_DEFAULT);\n\n $providedClass = $this->getClassNameFromFile($file);\n if ($providedClass) {\n $this->map[$splitTopic][$providedClass] = $file;\n $this->mapInfo['dirty'] = true;\n }\n\n// $ProvidesClasses = $this->investigate($File);\n// if ($ProvidesClasses === false) continue;\n//\n// foreach ($ProvidesClasses as $ProvidedClass) {\n// $ProvidedClass = strtolower($ProvidedClass);\n// $this->Map[$SplitTopic][$ProvidedClass] = $File;\n// $this->MapInfo['dirty'] = true;\n// }\n }\n }\n\n // Save\n $this->shutdown();\n\n if (!is_null($extraPathsRemove)) {\n foreach ($extraPathsRemove as $remPath) {\n unset($this->paths[$remPath]);\n }\n }\n }", "title": "" }, { "docid": "f3154e44998f028223d2d02f66e8f089", "score": "0.5274536", "text": "static public function addToPath($className, $path){\n\t\tif(!isset(self::$_classPath[$className])){\n\t\t\tself::$_classPath[$className] = $path;\n\t\t}\n\t}", "title": "" }, { "docid": "4e55e18b22d914fbdc4b6c7001178db9", "score": "0.52722514", "text": "function wrapido_autoloader( $class_name ) {\n\t\n\t// autoload only classes starting with Kosher\n if ( 0 !== strpos( $class_name, 'Wrapido' ) ) {\n return;\n }\n\t\n\t$class_name = str_replace(\n array( '_' ), // Remove prefix | Underscores \n array( '/' ),\n strtolower( $class_name ) // lowercase\n );\n \n $class_name = str_replace(\n array( 'wrapido' ), // Remove prefix | Underscores \n array( 'includes' ),\n strtolower( $class_name ) // lowercase\n );\n\t\n // Compile our path from the current location\n $file = WRAPIDO_DIR . $class_name .'.php';\n\n // If a file is found\n if ( file_exists( $file ) ) { \n \trequire_once( $file );\n }\t \n}", "title": "" }, { "docid": "262ff0b082421e379b1eea4914f72151", "score": "0.5264214", "text": "public function buildClassAliasMapFile() {}", "title": "" }, { "docid": "28b0bd33f2cfa5ac241de62068de10ae", "score": "0.52599096", "text": "function Ark_autoload($className) {\n\tglobal $autoload_conf;\n\t$temp_path = '';\n\tforeach ( $autoload_conf ['paths'] as $path ) {\n\t\tif (require_it ( $className, gen_path ( $path, $className ) )) {\n\t\t\treturn;\n\t\t}\n\t}\n\texit ( 'Not Found ' . $className );\n\n}", "title": "" }, { "docid": "ab547d676404c9b95e89bb0e30f3604e", "score": "0.52486134", "text": "function loadClasses($className)\n{\n define('ROOT_DIR','/var/www/html/');\n define('DS','/');\n try {\n if (file_exists(ROOT_DIR . 'my work/' . $className . '.php')) {//mywork folder\n set_include_path(ROOT_DIR . 'my work' . DS);\n spl_autoload($className);\n }elseif (file_exists(ROOT_DIR . 'log/' . $className . '.php')) {//log folder and so on.....\n set_include_path(ROOT_DIR . 'log' . DS);\n spl_autoload($className);\n } elseif (file_exists(ROOT_DIR .'login/' . $className . '.php')) {\n set_include_path(ROOT_DIR . 'login' . DS);\n spl_autoload($className);\n } elseif (file_exists(ROOT_DIR .'app/' . $className . '.php')) {\n set_include_path(ROOT_DIR . 'app' . DS);\n spl_autoload($className);\n }elseif (file_exists(ROOT_DIR .'PDO/' . $className . '.php')) {\n set_include_path(ROOT_DIR . 'PDO' . DS);\n spl_autoload($className);\n }elseif (file_exists(ROOT_DIR .'php_oop/' . $className . '.php')) {\n set_include_path(ROOT_DIR . 'php_oop' . DS);\n spl_autoload($className);\n } elseif (file_exists(ROOT_DIR .'myphp/' . $className . '.php')) {\n set_include_path(ROOT_DIR . 'myphp' . DS);\n spl_autoload($className);\n } elseif (file_exists(ROOT_DIR .'tabular data/' . $className . '.php')) {\n set_include_path(ROOT_DIR . 'tabular data' . DS);\n spl_autoload($className);\n } elseif (file_exists(ROOT_DIR . $className . '.php')){\n set_include_path(ROOT_DIR );\n spl_autoload($className);\n }else\n {\n throw new Exception('Class does not exist');//throwing the exceptions \n }\n }\n catch(Exception $e)\n {\n echo $e;//catching the exception\n\n }\n}", "title": "" }, { "docid": "219d280d571d6fb087e2a72b383d3790", "score": "0.52477527", "text": "public static function namespaceAutoload($classname)\n {\n\n $length = strlen($classname);\n $requireMe = null;\n\n $relPath = str_replace(\"\\\\\", \"/\", $classname).\".php\";\n\n foreach (BuizCore::$autoloadPath as $path) {\n\n $file = $path.$relPath;\n\n if (file_exists($file)) {\n Debug::logFile($file);\n self::$classIndex[$classname] = $file;\n self::$indexChanged = true;\n include $file;\n\n return;\n }\n\n }//end foreach (BuizCore::$autoloadPath as $path)\n\n }", "title": "" }, { "docid": "e0c53ca69df4e1aac88bfffe7358ad7a", "score": "0.5242783", "text": "public function classSetUp()\n {\n $this->assemblyRouter = TreeRouteStack::factory(self::$config);\n }", "title": "" }, { "docid": "3bb94b30107363fc38199deda207e627", "score": "0.52377844", "text": "private function searchForClass($key)\n {\n $found = false;\n $dirs = getAllSubDires('core/System/');\n\n foreach ($dirs as $dir) {\n $path = $this->file->fullPath($dir . ucwords($key)) . '.php';\n\n if ($this->file->exists($path)) {\n $found = true;\n\n $dir = $this->file->fullPath($dir . ucwords($key));\n $dir = ltrim($dir, $this->file->root() . 'core');\n\n $this->classes[$key] = $dir;\n\n $this->share($key, $this->createObject($key));\n }\n }\n\n if (!$found) {\n throw new Exception(\"$key is not found\");\n }\n }", "title": "" }, { "docid": "5153b67cd6a4fa0423f0b5bb051e8167", "score": "0.5227723", "text": "function autoloadClasses($class_ref) {\n // Isolate class name from namespace\n $class_ref_parts = explode('\\\\', $class_ref);\n $class_name = end($class_ref_parts);\n\n $class_url = dirname(__FILE__) . \"/classes/$class_name.php\";\n \n if (file_exists($class_url)) {\n require_once $class_url;\n }\n}", "title": "" }, { "docid": "40ecc11da4bf4a6087f97fc06ba31847", "score": "0.5217546", "text": "private function makeClasses(){\n $strContent = '';\n $strSourceBe= TL_ROOT . '/' . $this->strSnippetsPath . '/class_be.php';\n $strSourceFe= TL_ROOT . '/' . $this->strSnippetsPath . '/class_fe.php';\n\n // Klassen der Tabellen anlegen und Callbacks einfuegen\n foreach($this->arrModuleData['table'] as $rowTable){\n if($rowTable['table_name'] != ''){\n $strCallbacks = $this->es_easydev_util->genCallbacks($rowTable);\n $strCallbacks .= $this->es_easydev_util->genFieldCallbacks($this->arrModuleData['fields'][$rowTable['id']]);\n $arrTags = array('project::be_class_name' => $rowTable['table_name'], 'table::callbacks' => $strCallbacks);\n $strDest = $this->strBasePath . '/'. $rowTable['table_name'] . '.php';\n $strContent .= $this->es_easydev_util->parseFile($strSourceBe, $strDest, $arrTags);\n }\n }\n\n // zusaetzliche Backend-Klassen anlegen\n $arrBeClasses = unserialize($this->arrModuleData['project'][0]['beclasses']);\n foreach($arrBeClasses as $strBeClass){\n if($strBeClass != ''){\n $arrTags = array('project::be_class_name' => $strBeClass);\n $strDest = $this->strBasePath . '/'. $strBeClass . '.php';\n $strContent.= $this->es_easydev_util->parseFile($strSourceBe, $strDest, $arrTags);\n }\n }\n\n // zusaetzliche Frontend-Klassen anlegen\n $arrFeClasses = unserialize($this->arrModuleData['project'][0]['feclasses']);\n foreach($arrFeClasses as $strFeClass){\n if($strFeClass != ''){\n $arrTags = array('project::fe_class_name' => $strFeClass);\n $strDest = $this->strBasePath . '/'. $strFeClass . '.php';\n $strContent.= $this->es_easydev_util->parseFile($strSourceFe, $strDest, $arrTags);\n }\n }\n\n return $strContent;\n }", "title": "" }, { "docid": "ec4f3da5d116e97f7ed99a30c35f32f0", "score": "0.5212056", "text": "function classLoader($className)\n{\n $folderList = [\"classes\", \"models\"];\n // La classe a-t-elle été trouvée\n $found = false;\n\n // boucle sur la liste des dossier\n foreach ($folderList as $item) {\n $classPath = \"../$item/$className.php\";\n // Test de l'existence du fichier\n if (file_exists($classPath)) {\n require_once $classPath;\n // Si vrai alors require et found = true\n $found = true;\n break;\n }\n }\n if(!$found){\n // Si found == false alors on lève une exception\n throw new Exception(\"Fichier $classPath non trouvé\");\n } \n}", "title": "" }, { "docid": "51993a833f8020e26155b300cb610bb8", "score": "0.521175", "text": "function autoload_thornbird($classname) {\n $classname = strtolower($classname);\n //static $pre = '/data/wwwroot/pubsystem';\n static $classpath = array(\n 'index' => '/data/wwwroot/pubsystem/index.php',\n 'login' => '/data/wwwroot/pubsystem/login.php',\n 'dbfaculty' => '/data/wwwroot/pubsystem/plib/db.php',\n 'tool' => '/data/wwwroot/pubsystem/plib/tool.php',\n 'page' => '/data/wwwroot/pubsystem/plib/page.php',\n );\n if (!empty($classpath[$classname])) {\n include($classpath[$classname]);\n }\n}", "title": "" }, { "docid": "6c8652513494a0f55745657a7d886ec1", "score": "0.52105975", "text": "public function canLocate($class);", "title": "" }, { "docid": "aef22aa7e606641f4a5fb293b9541d6f", "score": "0.5198277", "text": "public function classOfPath($rootObject, $path);", "title": "" }, { "docid": "7dfe931d31510da6a4a4dd316125aae2", "score": "0.5189701", "text": "public function __construct() {\n\t\t$this->classes_to_load = array(\n\t\t\t'Hestia_Core' => HESTIA_CORE_DIR,\n\t\t\t'Hestia_Admin' => HESTIA_CORE_DIR,\n\t\t\t'Hestia_Public' => HESTIA_CORE_DIR,\n\t\t\t'Hestia_Feature_Factory' => HESTIA_CORE_DIR,\n\t\t\t'Hestia_Abstract_Main' => HESTIA_CORE_DIR . 'abstract',\n\t\t\t'Hestia_Abstract_Module' => HESTIA_CORE_DIR . 'abstract',\n\t\t\t'Hestia_Register_Customizer_Controls' => HESTIA_CORE_DIR . 'abstract',\n\t\t\t'Hestia_Front_Page_Section_Controls_Abstract' => HESTIA_CORE_DIR . 'abstract',\n\t\t\t'Hestia_Abstract_Metabox' => HESTIA_CORE_DIR . 'abstract',\n\t\t\t'Hestia_Customizer_Panel' => HESTIA_CORE_DIR . 'types',\n\t\t\t'Hestia_Customizer_Control' => HESTIA_CORE_DIR . 'types',\n\t\t\t'Hestia_Customizer_Partial' => HESTIA_CORE_DIR . 'types',\n\t\t\t'Hestia_Customizer_Section' => HESTIA_CORE_DIR . 'types',\n\t\t\t'Hestia_Bootstrap_Navwalker' => HESTIA_PHP_INCLUDE,\n\t\t\t'Hestia_Admin_Notices_Manager' => HESTIA_PHP_INCLUDE . 'admin',\n\t\t\t'Hestia_Metabox_Manager' => HESTIA_PHP_INCLUDE . 'admin/metabox',\n\t\t\t'Hestia_Metabox_Main' => HESTIA_PHP_INCLUDE . 'admin/metabox',\n\t\t\t'Hestia_Metabox_Controls_Base' => HESTIA_PHP_INCLUDE . 'admin/metabox',\n\t\t\t'Hestia_Metabox_Control_Base' => HESTIA_PHP_INCLUDE . 'admin/metabox/controls',\n\t\t\t'Hestia_Metabox_Radio_Image' => HESTIA_PHP_INCLUDE . 'admin/metabox/controls',\n\t\t\t'Hestia_Metabox_Checkbox' => HESTIA_PHP_INCLUDE . 'admin/metabox/controls',\n\t\t\t'Hestia_Customizer_Main' => HESTIA_PHP_INCLUDE . 'customizer',\n\t\t\t'Hestia_Customizer_Notices' => HESTIA_PHP_INCLUDE . 'customizer',\n\t\t\t'Hestia_Sync_About' => HESTIA_PHP_INCLUDE . 'customizer',\n\t\t\t'Hestia_Customizer_Page_Editor_Helper' => HESTIA_PHP_INCLUDE . 'customizer/controls/custom-controls/customizer-page-editor',\n\t\t\t'Hestia_Page_Editor' => HESTIA_PHP_INCLUDE . 'customizer/controls/custom-controls/customizer-page-editor',\n\t\t\t'Hestia_Customize_Alpha_Color_Control' => HESTIA_PHP_INCLUDE . 'customizer/controls/custom-controls/alpha-color-picker',\n\t\t\t'Hestia_Customizer_Dimensions' => HESTIA_PHP_INCLUDE . 'customizer/controls/custom-controls/dimensions',\n\t\t\t'Hestia_Font_Selector' => HESTIA_PHP_INCLUDE . 'customizer/controls/custom-controls/font-selector',\n\t\t\t'Hestia_Select_Multiple' => HESTIA_PHP_INCLUDE . 'customizer/controls/custom-controls/multi-select',\n\t\t\t'Hestia_Customizer_Range_Value_Control' => HESTIA_PHP_INCLUDE . 'customizer/controls/custom-controls/range-value',\n\t\t\t'Hestia_Repeater' => HESTIA_PHP_INCLUDE . 'customizer/controls/custom-controls/repeater',\n\t\t\t'Hestia_Hiding_Section' => HESTIA_PHP_INCLUDE . 'customizer/controls/custom-controls/section-hiding',\n\t\t\t'Hestia_Customize_Control_Radio_Image' => HESTIA_PHP_INCLUDE . 'customizer/controls/custom-controls/subcontrols-allowing',\n\t\t\t'Hestia_Select_Hiding' => HESTIA_PHP_INCLUDE . 'customizer/controls/custom-controls/subcontrols-allowing',\n\t\t\t'Hestia_Customizer_Scroll_Ui' => HESTIA_PHP_INCLUDE . 'customizer/controls/ui/customizer-scroll',\n\t\t\t'Hestia_Customize_Control_Tabs' => HESTIA_PHP_INCLUDE . 'customizer/controls/ui/customizer-tabs',\n\t\t\t'Hestia_Plugin_Install_Helper' => HESTIA_PHP_INCLUDE . 'customizer/controls/ui/helper-plugin-install',\n\t\t\t'Hestia_Subscribe_Info' => HESTIA_PHP_INCLUDE . 'customizer/controls/ui/subscribe-info',\n\t\t\t'Hestia_Button' => HESTIA_PHP_INCLUDE . 'customizer/controls/ui',\n\t\t\t'Hestia_Contact_Info' => HESTIA_PHP_INCLUDE . 'customizer/controls/ui',\n\t\t\t'Hestia_Control_Upsell' => HESTIA_PHP_INCLUDE . 'customizer/controls/ui',\n\t\t\t'Hestia_Customizer_Heading' => HESTIA_PHP_INCLUDE . 'customizer/controls/ui',\n\t\t\t'Hestia_Generic_Notice_Section' => HESTIA_PHP_INCLUDE . 'customizer/controls/ui',\n\t\t\t'Hestia_Main_Notice_Section' => HESTIA_PHP_INCLUDE . 'customizer/controls/ui',\n\t\t\t'Hestia_PageBuilder_Button' => HESTIA_PHP_INCLUDE . 'customizer/controls/ui',\n\t\t\t'Hestia_Section_Docs' => HESTIA_PHP_INCLUDE . 'customizer/controls/ui',\n\t\t\t'Hestia_Section_Upsell' => HESTIA_PHP_INCLUDE . 'customizer/controls/ui',\n\t\t\t'Hestia_Header_Controls' => HESTIA_PHP_INCLUDE . 'customizer/general',\n\t\t\t'Hestia_Color_Controls' => HESTIA_PHP_INCLUDE . 'customizer/general',\n\t\t\t'Hestia_General_Controls' => HESTIA_PHP_INCLUDE . 'customizer/general',\n\t\t\t'Hestia_Typography_Controls' => HESTIA_PHP_INCLUDE . 'customizer/general',\n\t\t\t'Hestia_Blog_Settings_Controls' => HESTIA_PHP_INCLUDE . 'customizer/general',\n\t\t\t'Hestia_Upsell_Manager' => HESTIA_PHP_INCLUDE . 'customizer/general',\n\t\t\t'Hestia_Buttons_Style_Controls' => HESTIA_PHP_INCLUDE . 'customizer/general',\n\t\t\t'Hestia_Footer_Controls' => HESTIA_PHP_INCLUDE . 'customizer/general',\n\t\t\t'Hestia_Big_Title_Controls' => HESTIA_PHP_INCLUDE . 'customizer/front-page',\n\t\t\t'Hestia_About_Controls' => HESTIA_PHP_INCLUDE . 'customizer/front-page',\n\t\t\t'Hestia_Shop_Controls' => HESTIA_PHP_INCLUDE . 'customizer/front-page',\n\t\t\t'Hestia_Blog_Section_Controls' => HESTIA_PHP_INCLUDE . 'customizer/front-page',\n\t\t\t'Hestia_Contact_Controls' => HESTIA_PHP_INCLUDE . 'customizer/front-page',\n\t\t\t'Hestia_Subscribe_Controls' => HESTIA_PHP_INCLUDE . 'customizer/front-page',\n\t\t\t'Hestia_Gutenberg' => HESTIA_PHP_INCLUDE . 'compatibility',\n\t\t\t'Hestia_PWA' => HESTIA_PHP_INCLUDE . 'compatibility',\n\t\t\t'Hestia_Header_Footer_Elementor' => HESTIA_PHP_INCLUDE . 'compatibility/page-builder',\n\t\t\t'Hestia_Page_Builder_Helper' => HESTIA_PHP_INCLUDE . 'compatibility/page-builder',\n\t\t\t'Hestia_Elementor_Compatibility' => HESTIA_PHP_INCLUDE . 'compatibility/page-builder',\n\t\t\t'Hestia_Beaver_Builder_Compatibility' => HESTIA_PHP_INCLUDE . 'compatibility/page-builder',\n\t\t\t'Hestia_Wpbakery_Compatibility' => HESTIA_PHP_INCLUDE . 'compatibility/page-builder',\n\t\t\t'Hestia_Child' => HESTIA_PHP_INCLUDE . 'compatibility/child-themes',\n\t\t\t'Hestia_Child_Customizer' => HESTIA_PHP_INCLUDE . 'compatibility/child-themes',\n\t\t\t'Hestia_Woocommerce_Header_Manager' => HESTIA_PHP_INCLUDE . 'compatibility/woocommerce',\n\t\t\t'Hestia_Wp_Forms' => HESTIA_PHP_INCLUDE . 'compatibility/wp-forms',\n\t\t\t'Hestia_Infinite_Scroll' => HESTIA_PHP_INCLUDE . 'infinite-scroll',\n\t\t\t'Hestia_Tweaks' => HESTIA_PHP_INCLUDE . 'views',\n\t\t\t'Hestia_Compatibility_Style' => HESTIA_PHP_INCLUDE . 'views',\n\t\t\t'Hestia_Content_404' => HESTIA_PHP_INCLUDE . 'views/main',\n\t\t\t'Hestia_Top_Bar' => HESTIA_PHP_INCLUDE . 'views/main',\n\t\t\t'Hestia_Header' => HESTIA_PHP_INCLUDE . 'views/main',\n\t\t\t'Hestia_Footer' => HESTIA_PHP_INCLUDE . 'views/main',\n\t\t\t'Hestia_Featured_Posts' => HESTIA_PHP_INCLUDE . 'views/blog',\n\t\t\t'Hestia_Authors_Section' => HESTIA_PHP_INCLUDE . 'views/blog',\n\t\t\t'Hestia_Additional_Views' => HESTIA_PHP_INCLUDE . 'views/blog',\n\t\t\t'Hestia_Sidebar_Layout_Manager' => HESTIA_PHP_INCLUDE . 'views/blog',\n\t\t\t'Hestia_Header_Layout_Manager' => HESTIA_PHP_INCLUDE . 'views/blog',\n\t\t\t'Hestia_Blog_Post_Layout' => HESTIA_PHP_INCLUDE . 'views/blog',\n\t\t\t'Hestia_Colors' => HESTIA_PHP_INCLUDE . 'views/inline',\n\t\t\t'Hestia_Buttons' => HESTIA_PHP_INCLUDE . 'views/inline',\n\t\t\t'Hestia_Inline_Style_Manager' => HESTIA_PHP_INCLUDE . 'views/inline',\n\t\t\t'Hestia_Public_Typography' => HESTIA_PHP_INCLUDE . 'views/inline',\n\t\t\t'Hestia_First_Front_Page_Section' => HESTIA_PHP_INCLUDE . 'views/front-page',\n\t\t\t'Hestia_Big_Title_Section' => HESTIA_PHP_INCLUDE . 'views/front-page',\n\t\t\t'Hestia_About_Section' => HESTIA_PHP_INCLUDE . 'views/front-page',\n\t\t\t'Hestia_Blog_Section' => HESTIA_PHP_INCLUDE . 'views/front-page',\n\t\t\t'Hestia_Shop_Section' => HESTIA_PHP_INCLUDE . 'views/front-page',\n\t\t\t'Hestia_Contact_Section' => HESTIA_PHP_INCLUDE . 'views/front-page',\n\t\t\t'Hestia_Subscribe_Section' => HESTIA_PHP_INCLUDE . 'views/front-page',\n\t\t\t'Hestia_Woocommerce_Manager' => HESTIA_PHP_INCLUDE . 'modules/woo_enhancements',\n\n\t\t\t'Hestia_Main_Addon' => HESTIA_PHP_INCLUDE . 'addons',\n\t\t\t'Hestia_Addon_Manager' => HESTIA_PHP_INCLUDE . 'addons',\n\t\t\t'Hestia_Hooks_Page' => HESTIA_PHP_INCLUDE . 'addons/admin/hooks-page',\n\t\t\t'Hestia_Metabox_Addon' => HESTIA_PHP_INCLUDE . 'addons/admin',\n\t\t\t'Hestia_Metabox_View' => HESTIA_PHP_INCLUDE . 'views/pluggable',\n\n\t\t\t'Hestia_Iconpicker' => HESTIA_PHP_INCLUDE . 'addons/customizer/controls/iconpicker',\n\t\t\t'Hestia_Section_Ordering' => HESTIA_PHP_INCLUDE . 'addons/customizer/front-page',\n\t\t\t'Hestia_Clients_Bar_Controls' => HESTIA_PHP_INCLUDE . 'addons/customizer/front-page',\n\t\t\t'Hestia_Features_Controls' => HESTIA_PHP_INCLUDE . 'addons/customizer/front-page',\n\t\t\t'Hestia_Portfolio_Controls' => HESTIA_PHP_INCLUDE . 'addons/customizer/front-page',\n\t\t\t'Hestia_Pricing_Controls' => HESTIA_PHP_INCLUDE . 'addons/customizer/front-page',\n\t\t\t'Hestia_Ribbon_Controls' => HESTIA_PHP_INCLUDE . 'addons/customizer/front-page',\n\t\t\t'Hestia_Team_Controls' => HESTIA_PHP_INCLUDE . 'addons/customizer/front-page',\n\t\t\t'Hestia_Testimonials_Controls' => HESTIA_PHP_INCLUDE . 'addons/customizer/front-page',\n\t\t\t'Hestia_Blog_Section_Controls_Addon' => HESTIA_PHP_INCLUDE . 'addons/customizer/front-page',\n\t\t\t'Hestia_Shop_Controls_Addon' => HESTIA_PHP_INCLUDE . 'addons/customizer/front-page',\n\t\t\t'Hestia_Slider_Controls_Addon' => HESTIA_PHP_INCLUDE . 'addons/customizer/front-page',\n\n\t\t\t'Hestia_Blog_Settings_Controls_Addon' => HESTIA_PHP_INCLUDE . 'addons/customizer/general',\n\t\t\t'Hestia_Buttons_Style_Controls_Addon' => HESTIA_PHP_INCLUDE . 'addons/customizer/general',\n\t\t\t'Hestia_Color_Controls_Addon' => HESTIA_PHP_INCLUDE . 'addons/customizer/general',\n\t\t\t'Hestia_Footer_Controls_Addon' => HESTIA_PHP_INCLUDE . 'addons/customizer/general',\n\t\t\t'Hestia_General_Controls_Addon' => HESTIA_PHP_INCLUDE . 'addons/customizer/general',\n\t\t\t'Hestia_Header_Controls_Addon' => HESTIA_PHP_INCLUDE . 'addons/customizer/general',\n\t\t\t'Hestia_Typography_Controls_Addon' => HESTIA_PHP_INCLUDE . 'addons/customizer/general',\n\t\t\t'Hestia_White_Label_Controls_Addon' => HESTIA_PHP_INCLUDE . 'addons/customizer/general',\n\t\t\t'Hestia_Customizer_Notices_Addon' => HESTIA_PHP_INCLUDE . 'addons/customizer',\n\t\t\t'Hestia_Defaults_Models' => HESTIA_PHP_INCLUDE . 'addons/models',\n\n\t\t\t'Hestia_Dokan_Compatibility' => HESTIA_PHP_INCLUDE . 'addons/plugin-compatibility/dokan',\n\t\t\t'Hestia_Woocommerce_Module' => HESTIA_PHP_INCLUDE . 'addons/modules/woo_enhancements',\n\t\t\t'Hestia_Woocommerce_Infinite_Scroll' => HESTIA_PHP_INCLUDE . 'addons/plugin-compatibility/woocommerce',\n\t\t\t'Hestia_Woocommerce_Settings_Controls' => HESTIA_PHP_INCLUDE . 'addons/plugin-compatibility/woocommerce',\n\n\t\t\t'Hestia_Custom_Layouts_Module' => HESTIA_PHP_INCLUDE . 'addons/modules/custom_layouts',\n\n\t\t\t'Hestia_Translations_Manager' => HESTIA_PHP_INCLUDE . 'addons/plugin-compatibility',\n\t\t\t'Hestia_Elementor_Compatibility_Addon' => HESTIA_PHP_INCLUDE . 'addons/plugin-compatibility',\n\n\t\t\t'Hestia_Subscribe_Blog_Section' => HESTIA_PHP_INCLUDE . 'addons/views/blog',\n\t\t\t'Hestia_Front_Page_Shortcodes' => HESTIA_PHP_INCLUDE . 'addons/views/front-page',\n\t\t\t'Hestia_Clients_Bar_Section' => HESTIA_PHP_INCLUDE . 'addons/views/front-page',\n\t\t\t'Hestia_Features_Section' => HESTIA_PHP_INCLUDE . 'addons/views/front-page',\n\t\t\t'Hestia_Portfolio_Section' => HESTIA_PHP_INCLUDE . 'addons/views/front-page',\n\t\t\t'Hestia_Pricing_Section' => HESTIA_PHP_INCLUDE . 'addons/views/front-page',\n\t\t\t'Hestia_Ribbon_Section' => HESTIA_PHP_INCLUDE . 'addons/views/front-page',\n\t\t\t'Hestia_Slider_Section_Addon' => HESTIA_PHP_INCLUDE . 'addons/views/front-page',\n\t\t\t'Hestia_Team_Section' => HESTIA_PHP_INCLUDE . 'addons/views/front-page',\n\t\t\t'Hestia_Testimonials_Section' => HESTIA_PHP_INCLUDE . 'addons/views/front-page',\n\t\t\t'Hestia_Header_Addon' => HESTIA_PHP_INCLUDE . 'addons/views/main',\n\t\t\t'Hestia_Buttons_Addon' => HESTIA_PHP_INCLUDE . 'addons/views/styles-output',\n\t\t\t'Hestia_Colors_Addon' => HESTIA_PHP_INCLUDE . 'addons/views/styles-output',\n\t\t\t'Hestia_General_Inline_Style' => HESTIA_PHP_INCLUDE . 'addons/views/styles-output',\n\t\t\t'Hestia_Public_Typography_Addon' => HESTIA_PHP_INCLUDE . 'addons/views/styles-output',\n\t\t\t'Hestia_Compatibility_Style_Addon' => HESTIA_PHP_INCLUDE . 'addons/views',\n\t\t\t'Hestia_Content_Import' => HESTIA_PHP_INCLUDE . 'content-import',\n\t\t\t'Hestia_Import_Utilities' => HESTIA_PHP_INCLUDE . 'content-import',\n\t\t\t'Hestia_Import_Zerif' => HESTIA_PHP_INCLUDE . 'content-import',\n\t\t);\n\t}", "title": "" }, { "docid": "78baaba6fa1b015809cdcb7b1f71be18", "score": "0.5186287", "text": "private static function findClassPath(&$class_name, $data, $remove_prefix = false)\n {\n if (empty($data)) {\n return false;\n }\n\n self::$file = null;\n $class_path = false;\n $keys = array_keys($data);\n\n foreach ($keys as $key) {\n $keyTrim = ltrim($key,NAMESPACE_SEPARATOR);\n\n if (substr($class_name,0, strlen($keyTrim)) != $keyTrim) continue;\n self::$file = substr($class_name,strlen($key));\n\n $class_path = $data[$key];\n if ($remove_prefix) {\n $class_name = str_replace($keyTrim,'',$class_name);\n }\n break;\n }\n\n return $class_path;\n }", "title": "" }, { "docid": "2a084389e3f40ca10acd5df7b9faaf5e", "score": "0.5185688", "text": "public function set_class_path( $classPath ) {\n if ( is_array( $classPath) ) {\n foreach ( $classPath as $path ) {\n $this->classPath[] = $this->check_slash( $path );\n }\n } else {\n $this->classPath[] = check_slash( $path );\n }\n\n }", "title": "" }, { "docid": "3477865e7b54a8781d9074c4dda018fc", "score": "0.5184564", "text": "function findClasses($path, $namespace, &$res = [])\n{\n foreach (glob(\"$path/*.php\") as $filename) {\n $name = basename($filename, '.php');\n $className = \"$namespace\\\\$name\";\n $res[] = new ReflectionClass($className);\n }\n foreach (glob(\"$path/*\", GLOB_ONLYDIR) as $dir) {\n $name = basename($dir);\n findClasses(\"$path/$name\", \"$namespace\\\\$name\", $res);\n }\n return $res;\n}", "title": "" }, { "docid": "7f59242c6b3a6da95f016bf78891f67a", "score": "0.5184036", "text": "public function define() {\n\t\t$index = $this->getIndex();\n\n\t\t# Recreate the index\n if ($index->exists()) {\n $index->delete();\n\t\t}\n $index->create();\n\n\t\tforeach ($this->getIndexedClasses() as $class) {\n\t\t\t/** @var $sng Searchable */\n\t\t\t$sng = singleton($class);\n\n\t\t\t$mapping = $sng->getElasticaMapping();\n\t\t\t$mapping->setType($index->getType($sng->getElasticaType()));\n\t\t\t$mapping->send();\n\t\t}\n\t}", "title": "" }, { "docid": "5de343751ec75746dca2843681afdc6f", "score": "0.5183606", "text": "public function testClassMapNormalizesClassNames()\n {\n $classMap = new ClassMap();\n $classMap->add('\\Some\\Class', '/some/path');\n self::assertTrue($classMap->has('Some\\Class'));\n }", "title": "" }, { "docid": "30bde5ef41126c1975871bade4039495", "score": "0.5176738", "text": "function __gosa_autoload($class_name) {\n global $class_mapping, $BASE_DIR;\n\n if ($class_mapping === NULL){\n\t echo sprintf(_(\"Fatal error: no class locations defined - please run %s to fix this\"), bold(\"update-gosa\"));\n\t exit;\n }\n\n if (isset($class_mapping[\"$class_name\"])){\n require_once($BASE_DIR.\"/\".$class_mapping[\"$class_name\"]);\n } else {\n echo sprintf(_(\"Fatal error: cannot instantiate class %s - try running %s to fix this\"), bold($class_name), bold(\"update-gosa\"));\n exit;\n }\n}", "title": "" }, { "docid": "cacd1938dcc2c0c02a37f365c3ad794b", "score": "0.51730466", "text": "public static function addRequiredRoots() {\r\n\t\tself::$_fileRoot = new ADocumentationHierarchy();\r\n\t\tself::$_fileRoot->id = self::FILE_ROOT;\r\n\t\tself::$_fileRoot->saveNode();\r\n\r\n\t\tself::$_packageRoot = new ADocumentationHierarchy();\r\n\t\tself::$_packageRoot->id = self::PACKAGE_ROOT;\r\n\t\tself::$_packageRoot->saveNode();\r\n\r\n\t\tself::$_interfaceRoot = new ADocumentationHierarchy();\r\n\t\tself::$_interfaceRoot->id = self::INTERFACE_ROOT;\r\n\t\tself::$_interfaceRoot->saveNode();\r\n\r\n\t\tself::$_namespaceRoot = new ADocumentationHierarchy();\r\n\t\tself::$_namespaceRoot->id = self::NAMESPACE_ROOT;\r\n\t\tself::$_namespaceRoot->saveNode();\r\n\r\n\t}", "title": "" }, { "docid": "adcc79889b89ec0a369d4a168fb6165e", "score": "0.51549935", "text": "function __construct( $className, $files, $dirs )\n {\n $paths = array();\n foreach ( $dirs as $dir )\n {\n $paths[] = realpath( $dir->autoloadPath );\n }\n parent::__construct( \"Could not find a class to file mapping for '{$className}'. Searched for \". implode( ', ', $files ) . \" in: \" . implode( ', ', $paths ) );\n }", "title": "" }, { "docid": "3b0891dd12d7a7db3b6d306119a9a60f", "score": "0.5146457", "text": "protected function addClassPaths($path)\n\t{\n\t\t$directories = $this->getExistingDirectories($path);\n\n\t\t$this->autoloader->add(null, $directories);\n\t\t$this->autoloader->add(ucfirst($this->data->slug), $path.'classes');\n\t}", "title": "" }, { "docid": "bb2dae06eb3c8b43c6a2db7f56fee368", "score": "0.51406574", "text": "private static function findClasses($path)\n {\n $contents = file_get_contents($path);\n $tokens = token_get_all($contents);\n\n $classes = array();\n\n $namespace = '';\n for ($i = 0; isset($tokens[$i]); ++$i) {\n $token = $tokens[$i];\n\n if (!isset($token[1])) {\n continue;\n }\n\n $class = '';\n\n switch ($token[0]) {\n case T_NAMESPACE:\n $namespace = '';\n // If there is a namespace, extract it\n while (isset($tokens[++$i][1])) {\n if (in_array($tokens[$i][0], array(T_STRING, T_NS_SEPARATOR))) {\n $namespace .= $tokens[$i][1];\n }\n }\n $namespace .= '\\\\';\n break;\n case T_CLASS:\n case T_INTERFACE:\n case T_TRAIT:\n // Skip usage of ::class constant\n $isClassConstant = false;\n for ($j = $i - 1; $j > 0; --$j) {\n if (!isset($tokens[$j][1])) {\n break;\n }\n\n if (T_DOUBLE_COLON === $tokens[$j][0]) {\n $isClassConstant = true;\n break;\n } elseif (!in_array($tokens[$j][0], array(T_WHITESPACE, T_DOC_COMMENT, T_COMMENT))) {\n break;\n }\n }\n\n if ($isClassConstant) {\n break;\n }\n\n // Find the classname\n while (isset($tokens[++$i][1])) {\n $t = $tokens[$i];\n if (T_STRING === $t[0]) {\n $class .= $t[1];\n } elseif ('' !== $class && T_WHITESPACE === $t[0]) {\n break;\n }\n }\n\n $classes[] = ltrim($namespace.$class, '\\\\');\n break;\n default:\n break;\n }\n }\n\n return $classes;\n }", "title": "" }, { "docid": "3922df8d470a0972b6bf8633a550249f", "score": "0.51368517", "text": "public function testListParentsClassesNamesNotFound()\n {\n $this->initializeFinder('Teknoo\\Tests\\Support\\StatedClass\\ClassMissed', $this->statedClass6Path);\n try {\n $this->finder->listParentsClassesNames();\n } catch (Exception\\IllegalProxy $e) {\n return;\n } catch (\\Exception $e) {\n $this->fail($e->getMessage());\n }\n\n $this->fail('Error, if the proxy has not been initialized, the finder must thrown an exception');\n }", "title": "" }, { "docid": "45b3515d5ba54ca58d3605516bfdc391", "score": "0.51344264", "text": "private function load_classes ()\n\t{\n\t\tglobal $classes_array;\n\t\t\n\t\tforeach ($classes_array as $class)\n\t\t\trequire_once (RESOURCE_FOLDER.\"/\".$class.\".class.php\");\n\t}", "title": "" }, { "docid": "017024d5870cdbe77e48d9d0c72206bc", "score": "0.51314014", "text": "function create_paths($path_name)\n {\n $this->initContainer();\n return parent::create_paths($path_name);\n }", "title": "" }, { "docid": "d739081940ddc88af1c7840e59ff1e23", "score": "0.5121823", "text": "abstract protected function get_autoloader_paths();", "title": "" }, { "docid": "75b71652b3b7ce5560760601d10df8f1", "score": "0.5115707", "text": "function MyAutoLoad($Class) {\r\n $cDir = ['BKPConn', 'BaseConn', 'Models'];\r\n $iDir = null;\r\n\r\n foreach ($cDir as $dirName):\r\n if (!$iDir && file_exists(__DIR__ . '/' . $dirName . '/' . $Class . '.class.php') && !is_dir(__DIR__ . '/' . $dirName . '/' . $Class . '.class.php')):\r\n include_once (__DIR__ . '/' . $dirName . '/' . $Class . '.class.php');\r\n $iDir = true;\r\n endif;\r\n endforeach;\r\n}", "title": "" }, { "docid": "5fcc3b4e2542d63ac15890419e4d53ae", "score": "0.51146674", "text": "public function getPathInfo($class_name = null);", "title": "" }, { "docid": "adf432bc25efa3c7a783954e4f934477", "score": "0.5105688", "text": "function getClassIndexLocallangFiles($absPath,$table_class_prefix,$extKey)\t{\n\t\t$filesInside = t3lib_div::removePrefixPathFromList(t3lib_div::getAllFilesAndFoldersInPath(array(),$absPath,'php,inc'),$absPath);\n\t\t$out = array();\n\n\t\tforeach($filesInside as $fileName)\t{\n\t\t\tif (substr($fileName,0,4)!='ext_' && substr($fileName,0,6)!='tests/')\t{\t// ignore supposed-to-be unit tests as well\n\t\t\t\t$baseName = basename($fileName);\n\t\t\t\tif (substr($baseName,0,9)=='locallang' && substr($baseName,-4)=='.php')\t{\n\t\t\t\t\t$out['locallang'][] = $fileName;\n\t\t\t\t} elseif ($baseName!='conf.php')\t{\n\t\t\t\t\tif (filesize($absPath.$fileName)<500*1024)\t{\n\t\t\t\t\t\t$fContent = t3lib_div::getUrl($absPath.$fileName);\n\t\t\t\t\t\tunset($reg);\n\t\t\t\t\t\tif (preg_match('/\\n[[:space:]]*class[[:space:]]*([[:alnum:]_]+)([[:alnum:][:space:]_]*)/',$fContent,$reg))\t{\n\n\t\t\t\t\t\t\t// Find classes:\n\t\t\t\t\t\t\t$lines = explode(chr(10),$fContent);\n\t\t\t\t\t\t\tforeach($lines as $l)\t{\n\t\t\t\t\t\t\t\t$line = trim($l);\n\t\t\t\t\t\t\t\tunset($reg);\n\t\t\t\t\t\t\t\tif (preg_match('/^class[[:space:]]*([[:alnum:]_]+)([[:alnum:][:space:]_]*)/',$line,$reg))\t{\n\t\t\t\t\t\t\t\t\t$out['classes'][] = $reg[1];\n\t\t\t\t\t\t\t\t\t$out['files'][$fileName]['classes'][] = $reg[1];\n\t\t\t\t\t\t\t\t\tif ($reg[1]!=='ext_update' && substr($reg[1],0,3)!='ux_' && !t3lib_div::isFirstPartOfStr($reg[1],$table_class_prefix) && strcmp(substr($table_class_prefix,0,-1),$reg[1]))\t{\n\t\t\t\t\t\t\t\t\t\t$out['NSerrors']['classname'][] = $reg[1];\n\t\t\t\t\t\t\t\t\t} else $out['NSok']['classname'][] = $reg[1];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// If class file prefixed 'class.'....\n\t\t\t\t\t\t\tif (substr($baseName,0,6)=='class.')\t{\n\t\t\t\t\t\t\t\t$fI = pathinfo($baseName);\n\t\t\t\t\t\t\t\t$testName=substr($baseName,6,-(1+strlen($fI['extension'])));\n\t\t\t\t\t\t\t\tif ($testName!=='ext_update' && substr($testName,0,3)!='ux_' && !t3lib_div::isFirstPartOfStr($testName,$table_class_prefix) && strcmp(substr($table_class_prefix,0,-1),$testName))\t{\n\t\t\t\t\t\t\t\t\t$out['NSerrors']['classfilename'][] = $baseName;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$out['NSok']['classfilename'][] = $baseName;\n\t\t\t\t\t\t\t\t\tif (is_array($out['files'][$fileName]['classes']) && $this->first_in_array($testName,$out['files'][$fileName]['classes'],1))\t{\n\t\t\t\t\t\t\t\t\t\t$out['msg'][] = 'Class filename \"'.$fileName.'\" did contain the class \"'.$testName.'\" just as it should.';\n\t\t\t\t\t\t\t\t\t} else $out['errors'][] = 'Class filename \"'.$fileName.'\" did NOT contain the class \"'.$testName.'\"!';\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$XclassParts = split('if \\(defined\\([\\'\"]TYPO3_MODE[\\'\"]\\) && \\$TYPO3_CONF_VARS\\[TYPO3_MODE\\]\\[[\\'\"]XCLASS[\\'\"]\\]',$fContent,2);\n\t\t\t\t\t\t\tif (count($XclassParts)==2)\t{\n\t\t\t\t\t\t\t\tunset($reg);\n\t\t\t\t\t\t\t\tpreg_match('/^\\[[\\'\"]([[:alnum:]_\\/\\.]*)[\\'\"]\\]/',$XclassParts[1],$reg);\n\t\t\t\t\t\t\t\tif ($reg[1]) {\n\t\t\t\t\t\t\t\t\t$cmpF = 'ext/'.$extKey.'/'.$fileName;\n\t\t\t\t\t\t\t\t\tif (!strcmp($reg[1],$cmpF))\t{\n\t\t\t\t\t\t\t\t\t\tif (preg_match('/_once[[:space:]]*\\(\\$TYPO3_.ONF_VARS\\[TYPO3_MODE\\]\\[[\\'\"]XCLASS[\\'\"]\\]\\[[\\'\"]'.preg_quote($cmpF,'/').'[\\'\"]\\]\\);/', $XclassParts[1]))\t{\n\t\t\t\t\t\t\t\t\t\t\t$out['msg'][] = 'XCLASS OK in '.$fileName;\n\t\t\t\t\t\t\t\t\t\t} else $out['errors'][] = 'Couldn\\'t find the include_once statement for XCLASS!';\n\t\t\t\t\t\t\t\t\t} else $out['errors'][] = 'The XCLASS filename-key \"'.$reg[1].'\" was different from \"'.$cmpF.'\" which it should have been!';\n\t\t\t\t\t\t\t\t} else $out['errors'][] = 'No XCLASS filename-key found in file \"'.$fileName.'\". Maybe a regex coding error here...';\n\t\t\t\t\t\t\t} elseif (!$this->first_in_array('ux_',$out['files'][$fileName]['classes'])) $out['errors'][] = 'No XCLASS inclusion code found in file \"'.$fileName.'\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "9c5afee2dd393a65d6b09a3ff8e13ec7", "score": "0.51056683", "text": "public function setup() {\n\t\t$this->commandAlias->register($this->moduleName, \"guides breed\", \"breed\");\n\t\t$this->commandAlias->register($this->moduleName, \"guides healdelta\", \"healdelta\");\n\t\t$this->commandAlias->register($this->moduleName, \"guides lag\", \"lag\");\n\t\t$this->commandAlias->register($this->moduleName, \"guides nanodelta\", \"nanodelta\");\n\t\t$this->commandAlias->register($this->moduleName, \"guides stats\", \"stats\");\n\t\t$this->commandAlias->register($this->moduleName, \"aou 11\", \"title\");\n\t\t$this->commandAlias->register($this->moduleName, \"guides doja\", \"doja\");\n\t\t$this->commandAlias->register($this->moduleName, \"guides adminhelp\", \"adminhelp\");\n\t\t$this->commandAlias->register($this->moduleName, \"guides light\", \"light\");\n\n\t\t$this->path = __DIR__ . \"/guides/\";\n\t}", "title": "" }, { "docid": "ca2a087b1fb6aaea4f23768e6cf85c11", "score": "0.5095878", "text": "function mainClasses($class) {\n\trequire BasePath . 'engine/main/' . $class . '.inc.php';\n}", "title": "" }, { "docid": "0e859d64eb6beab2b2150858a46cd9f1", "score": "0.5091041", "text": "function __autoload($class_name) {\n $class_folders = array('ads', 'core', 'crawler', 'database', 'images', 'messages', 'rss', 'sites', 'text', 'users', 'templates', 'valid');\n \n foreach($class_folders as $folder) {\n $class_path = CLASSES . $folder . '/' . $class_name . '.php';\n if(file_exists($class_path)) {\n require_once $class_path;\n }\n }\n}", "title": "" }, { "docid": "eee37554e2c5937a26914c3243ea5e01", "score": "0.50858545", "text": "protected function populate_classes() {\n\n\t\t$this->populate_admin();\n\t\t$this->populate_migrations();\n\t\t$this->populate_capabilities();\n\t\t$this->populate_tasks();\n\t\t$this->populate_forms();\n\t\t$this->populate_logger();\n\t}", "title": "" }, { "docid": "1a77348c7f0a6389f53bcd3f64fc20d9", "score": "0.50846565", "text": "public function __construct($finder) {\n $this->finder= $finder;\n }", "title": "" }, { "docid": "edea9929751673e85f9e81d4769b707e", "score": "0.50821525", "text": "function __autoload($class_name){\n\n $path_array = array(\n '/models/',\n '/components/'\n );\n\n foreach($path_array as $path){\n $path = ROOT.$path.$class_name.'.php';\n if(file_exists($path)){\n include_once $path;\n }\n }\n\n}", "title": "" }, { "docid": "906ce5476051582c0ae4effab7710e71", "score": "0.507719", "text": "protected function getClassesToSearch()\n\t{\n\t\t// Will be private static config in 2.0\n\t\treturn self::$classes_to_search;\n\t}", "title": "" }, { "docid": "06e1c8439c0d111a017c5ae2218825a9", "score": "0.50728786", "text": "private function __set_controllers() {\n\t\tforeach (glob(APPPATH . 'controllers/*') as $controller) {\n\n\t\t\t// if the value in the loop is a directory loop through that directory\n\t\t\tif (is_dir($controller)) {\n\t\t\t\t// Get name of directory\n\t\t\t\t$dirname = basename($controller, EXT);\n\n\t\t\t\t// Loop through the subdirectory\n\t\t\t\tforeach (glob(APPPATH . 'controllers/'.$dirname.'/*') as $sub_dir_controller) {\n\t\t\t\t\t$this->__reg_controllers($sub_dir_controller);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telseif (pathinfo($controller, PATHINFO_EXTENSION) == \"php\") {\n\t\t\t\t$this->__reg_controllers($controller);\n\t\t\t}\n\t\t}\n\n\t\t$modules_path = key ( $this->config->item ( 'modules_locations' ) );\n\n\t\tforeach ( glob ( $modules_path . '*/controllers/*' ) as $controller ) {\n\t\t\tif ( is_dir ( $controller ) ) {\n\t\t\t\t$dirname = basename ( $controller, '.php' );\n\n\t\t\t\tforeach ( glob ( $modules_path . '*/controllers/'.$dirname.'/*' ) as $sub_controller ) {\n\t\t\t\t\t$this->__reg_controllers ( $sub_controller );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telseif ( pathinfo ( $controller, PATHINFO_EXTENSION ) == 'php' ) {\n\t\t\t\t$this->__reg_controllers ( $controller );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b55d19e49bf870d617c2a2a9b325ea8c", "score": "0.5070713", "text": "function loadClass($className) { require_once('class/'.$className.'.class.php'); }", "title": "" }, { "docid": "6f58daae8431bd415efffebf2bb0ec96", "score": "0.5067193", "text": "private function setNamespace(){\n\n $modules = config('modules');\n\n $isBreak = false;\n\n //dd(request()->getRouteResolver());\n\n foreach ($modules as $name => $module) {\n if(isset($module['prefix_url']) && $module['prefix_url'] != \"\")\n {\n if(request()->is($module['prefix_url']) || request()->is($module['prefix_url'] . '/*')){\n $this->namespace = join('\\\\', ['App', 'Modules', $module['folder'], 'Controllers']);\n $this->mapWhat = $name;\n $isBreak = true; \n } \n } \n if($isBreak) break;\n }\n \n }", "title": "" }, { "docid": "f9205e80723a8dc10a45e051e36660f8", "score": "0.50670564", "text": "public function fillClassAssociations() {\r\n\t\t// This function only needs to be called once\r\n\t\tstatic $called = false;\r\n\t\tif ( $called ) return;\r\n\t\t$called = true;\r\n\t\t\r\n\t\t$smartwikiModel = SmartWikiModel::singleton();\r\n\t\t$classes = $smartwikiModel->getClasses();\r\n\t\t$associationClasses = $smartwikiModel->getAssociationClasses();\r\n\t\t$associations = $smartwikiModel->getAssociations();\r\n\r\n\t\t$assoLinks = array();\r\n\t\t\r\n\t\tforeach($associations as $keyAss => $valueAss ) {\r\n\t\t\t$fromCLS = $valueAss->getFromClass();\r\n\t\t\tif ( $fromCLS == NULL ) {\r\n\t\t\t\tthrow new Exception(\"Invalid association. Missing from-point. (\".$valueAss->getTitle()->getText().\")\");\r\n\t\t\t}\r\n\t\t\t$toCLS = $valueAss->getToClass();\r\n\t\t\tif ( $toCLS == NULL ) {\r\n\t\t\t\tthrow new Exception(\"Invalid association. Missing to-point. (\".$valueAss->getTitle()->getText().\")\");\r\n\t\t\t}\r\n\t\t\t$from = $valueAss->getFromClass()->getTitle()->getText();\r\n\t\t\t$to = $valueAss->getToClass()->getTitle()->getText();\r\n\t\t\t\r\n\t\t\t$assoLinks[$from]['from'][] = &$associations[$keyAss];\r\n\t\t\t$assoLinks[$to]['to'][] = &$associations[$keyAss];\r\n\t\t}\r\n\r\n\t\t\r\n\t\tforeach($classes as $keyClass => $valueClass) {\r\n\t\t\t$className = $valueClass->getTitle()->getText();\r\n\t\t\tif ( isset($assoLinks[$className]) && isset($assoLinks[$className]['from']) && is_array($assoLinks[$className]['from']) ) {\r\n\t\t\t\tusort($assoLinks[$className]['from'], array(\"SmartWikiModel\", \"sortSmartWikiClass\"));\r\n\t\t\t\t$classes[$keyClass]->setFromAssociations($assoLinks[$className]['from']);\r\n\t\t\t} \r\n\t\t\tif ( isset($assoLinks[$className]) && isset($assoLinks[$className]['to']) && is_array($assoLinks[$className]['to']) ) {\r\n\t\t\t\tusort($assoLinks[$className]['to'], array(\"SmartWikiModel\", \"sortSmartWikiClass\"));\r\n\t\t\t\t$classes[$keyClass]->setToAssociations($assoLinks[$className]['to']);\r\n\t\t\t}\r\n\t\t\t \r\n\t\t\t// Sort my associations\r\n\t\t\t\r\n\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\r\n\t\t// +---------+ aso1 +---------+\r\n\t\t// | Class A |----------->| Class B |\r\n\t\t// +---------+ . +---------+\r\n\t\t// .\r\n\t\t// .\r\n\t\t// +-------------------+ aso2 +---------+\r\n\t\t// | Association Class |-------->| Class C |\r\n\t\t// +-------------------+ +---------+\r\n\t\t// Association classes can have associations as well\r\n\t\tforeach($associationClasses as $keyClass => $valueClass) {\t\t\t \r\n\t\t\t$className = $valueClass->getTitle()->getText(); \r\n\t\t\tif ( isset($assoLinks[$className]) && isset($assoLinks[$className]['from']) && is_array($assoLinks[$className]['from']) ) {\r\n\t\t\t\t$associationClasses[$keyClass]->setFromAssociations($assoLinks[$className]['from']);\r\n\t\t\t}\r\n\t\t\tif ( isset($assoLinks[$className]) && isset($assoLinks[$className]['to']) && is_array($assoLinks[$className]['to']) ) {\r\n\t\t\t\t$associationClasses[$keyClass]->setToAssociations($assoLinks[$className]['to']);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "009045a5bdd81a3dfdfe0898d95f89ce", "score": "0.5065739", "text": "public static function addSpecialClass($class_name, $path) {\n self::definePathConstants();\n self::$special_classes[$class_name] = ADMIN_ROOT_PATH.$path;\n require_once(ADMIN_ROOT_PATH.$path);\n }", "title": "" }, { "docid": "ecd7d6e332102b45d9a9aadabb6e573d", "score": "0.5059783", "text": "protected function bindPathsInContainer()\n {\n foreach ([\n 'path.plus-id' => $root = dirname(dirname(__DIR__)),\n 'path.plus-id.assets' => $root.'/assets',\n 'path.plus-id.config' => $root.'/config',\n 'path.plus-id.database' => $database = $root.'/database',\n 'path.plus-id.resources' => $resources = $root.'/resources',\n 'path.plus-id.lang' => $resources.'/lang',\n 'path.plus-id.views' => $resources.'/views',\n 'path.plus-id.migrations' => $database.'/migrations',\n 'path.plus-id.seeds' => $database.'/seeds',\n ] as $abstract => $instance) {\n $this->app->instance($abstract, $instance);\n }\n }", "title": "" }, { "docid": "a68e36150b9c7f021188e632f09d170b", "score": "0.50461274", "text": "public function find ( $class )\n {\n $class = \"\\\\\". trim( (string) $class, \" \\\\\" );\n\n foreach ( $this->map AS $prefix => $location ) {\n\n $prefix = '\\\\'. $prefix .'\\\\';\n $prefixLen = strlen( $prefix );\n\n // If the class name starts with this prefix, try to apply this rule\n if ( strncasecmp( $class, $prefix, $prefixLen ) == 0 ) {\n $file = substr( $class, $prefixLen );\n $file = str_replace('\\\\', '/', $file);\n $file = $location .\"/\". $file .\".php\";\n if ( file_exists($file) )\n return $file;\n }\n }\n\n return NULL;\n }", "title": "" }, { "docid": "362dfff37713762e6e429f18f6fdc315", "score": "0.5045322", "text": "public function _find ($minimalInformation, $alternativeKey = '', $prefix = 'class.', $suffix = '.php') {\n\t\t$info=trim($minimalInformation);\n\t\t$path = '';\n\t\tif(!$info) {\n\t\t\t$error = 'emptyParameter';\n\t\t}\n\t\tif(!$error) {\n\t\t\t$qSuffix = preg_quote ($suffix, '/');\n\t\t\t// If it is a path extract the key first.\n\t\t\t// Either the relevant part starts with a slash: xyz/[tx_].....php\n\t\t\tif(preg_match('/^.*\\/([0-9A-Za-z_]+)' . $qSuffix . '$/', $info, $matches)) {\n\t\t\t\t$class = $matches[1];\n\t\t\t}elseif(preg_match('/^.*\\.([0-9A-Za-z_]+)' . $qSuffix . '$/', $info, $matches)) {\n\t\t\t\t// Or it starts with a Dot: class.[tx_]....php\n\n\t\t\t\t$class = $matches[1];\n\t\t\t}elseif(preg_match('/^([0-9A-Za-z_]+)' . $qSuffix . '$/', $info, $matches)) {\n\t\t\t\t// Or it starts directly with the relevant part\n\t\t\t\t$class = $matches[1];\n\t\t\t}elseif(preg_match('/^[0-9a-zA-Z_]+$/', trim($info), $matches)) {\n\t\t\t\t// It may be the key itself\n\t\t\t\t$class = $info;\n\t\t\t}else{\n\t\t\t\t$error = 'classError';\n\t\t\t}\n\t\t}\n\t\t// With this a possible alternative Key is also validated\n\t\tif(!$error && !$key = tx_div2007::guessKey($alternativeKey ? $alternativeKey : $class)) {\n\t\t\t$error = 'classError';\n\t\t}\n\t\tif(!$error) {\n\t\t\tif(preg_match('/^tx_[0-9A-Za-z_]*$/', $class)) { // with tx_ prefix\n\t\t\t\t$parts=explode('_', trim($class));\n\t\t\t\tarray_shift($parts); // strip tx\n\t\t\t}elseif(preg_match('/^[0-9A-Za-z_]*$/', $class)) { // without tx_ prefix\n\t\t\t\t$parts=explode('_', trim($class));\n\t\t\t}else{\n\t\t\t\t$error = 'classError';\n\t\t\t}\n\t\t}\n\t\tif(!$error) {\n\n\t\t\t// Set extPath for key (first element)\n\t\t\t$first = array_shift($parts);\n\n\t\t\t// Save last element of path\n\t\t\tif(count($parts) > 0) {\n\t\t\t\t$last = array_pop($parts) . '/';\n\t\t\t}\n\n\t\t\t$dir = '';\n\t\t\t// Build the relative path if any\n\t\t\tforeach((array)$parts as $part) {\n\t\t\t\t$dir .= $part . '/';\n\t\t\t}\n\n\t\t\t// if an alternative Key is given use that\n\t\t\t$ext = \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::extPath($key);\n\n\t\t\t// First we try ABOVE last directory (dir and last may be empty)\n\t\t\t// ext(/dir)/last\n\t\t\t// ext(/dir)/prefix.tx_key_parts_last.php.\n\t\t\tif(!$path && !is_file($path = $ext . $dir . $prefix . $class . $suffix)) {\n\t\t\t\t$path = FALSE;\n\t\t\t}\n\n\t\t\t// Now we try INSIDE the last directory (dir and last may be empty)\n\t\t\t// ext(/dir)/last\n\t\t\t// ext(/dir)/last/prefix.tx_key_parts_last.php.\n\t\t\tif(!$path && !is_file($path = $ext . $dir . $last . $prefix . $class . $suffix)) {\n\t\t\t\t$path = FALSE;\n\t\t\t}\n\t\t}\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "afbb3bc2befda7a9d4cbe7ee1c24f8b1", "score": "0.5044147", "text": "protected function initFinderModelClass()\n {\n $container = Yii::$container;\n\n //$container->set(TweetFinder::class, ['modelClass' => 'api\\modules\\v1\\models\\Tweet']);\n }", "title": "" }, { "docid": "3c63c19ee3dc75fa14f7e389df9a7867", "score": "0.503539", "text": "protected function __construct()\n\t{\n\t\t$this->default_routes['category_rule']['keywords'] = array_merge($this->default_routes['category_rule']['keywords'], array(\n\t\t\t\t'categories' => array(\n\t\t\t\t\t'regexp' => '[/_a-zA-Z0-9-\\pL]*'\n\t\t\t\t),\n\t\t\t\t'id' => array(\n\t\t\t\t\t'regexp' => '[0-9]+'\n\t\t\t\t),\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'regexp' => '[_a-zA-Z0-9-\\pL]*',\n\t\t\t\t\t'param' => 'category_rewrite'\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->default_routes['product_rule']['keywords'] = array_merge($this->default_routes['product_rule']['keywords'], array(\n\t\t\t\t'id' => array(\n\t\t\t\t\t'regexp' => '[0-9]+'\n\t\t\t\t),\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'regexp' => '[_a-zA-Z0-9-\\pL]*',\n\t\t\t\t\t'param' => 'product_rewrite'\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->default_routes['supplier_rule']['keywords'] = array_merge($this->default_routes['supplier_rule']['keywords'], array(\n\t\t\t\t'id' => array(\n\t\t\t\t\t'regexp' => '[0-9]+'\n\t\t\t\t),\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'regexp' => '[_a-zA-Z0-9-\\pL]*',\n\t\t\t\t\t'param' => 'supplier_rewrite'\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->default_routes['manufacturer_rule']['keywords'] = array_merge($this->default_routes['manufacturer_rule']['keywords'], array(\n\t\t\t\t'id' => array(\n\t\t\t\t\t'regexp' => '[0-9]+'\n\t\t\t\t),\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'regexp' => '[_a-zA-Z0-9-\\pL]*',\n\t\t\t\t\t'param' => 'manufacturer_rewrite'\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->default_routes['cms_rule']['keywords'] = array_merge($this->default_routes['cms_rule']['keywords'], array(\n\t\t\t\t'id' => array(\n\t\t\t\t\t'regexp' => '[0-9]+'\n\t\t\t\t),\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'regexp' => '[_a-zA-Z0-9-\\pL]*',\n\t\t\t\t\t'param' => 'cms_rewrite'\n\t\t\t\t),\n\t\t\t\t'category_cms_rewrite' => array(\n\t\t\t\t\t'regexp' => '[_a-zA-Z0-9-\\pL]*',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->default_routes['cms_category_rule']['keywords'] = array_merge($this->default_routes['cms_category_rule']['keywords'], array(\n\t\t\t\t'id' => array(\n\t\t\t\t\t'regexp' => '[0-9]+'\n\t\t\t\t),\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'regexp' => '[_a-zA-Z0-9-\\pL]*',\n\t\t\t\t\t'param' => 'cms_category_rewrite'\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->default_routes['layered_rule']['keywords'] = array_merge($this->default_routes['layered_rule']['keywords'], array(\n\t\t\t\t'id' => array(\n\t\t\t\t\t'regexp' => '[0-9]+'\n\t\t\t\t),\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'regexp' => '[_a-zA-Z0-9-\\pL]*',\n\t\t\t\t\t'param' => 'category_rewrite'\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t/*$this->default_routes['attachment_rule'] = array(\n\t\t\t'controller' =>\t'attachment',\n\t\t\t'rule' =>\t\t'{categories:/}{product_name}/{file_name}',\n\t\t\t'keywords' => array(\n\t\t\t\t'id' =>\t\t\t\tarray('regexp' => '[0-9]+'),\n\t\t\t\t'file_name' =>\t\tarray('regexp' => '[\\._a-zA-Z0-9-\\pL]*', 'param' => 'attachment_file_name'),\n\t\t\t\t'categories' => array('regexp' => '[/_a-zA-Z0-9-\\pL]*'),\n\t\t\t\t'product_name' => array('regexp' => '[_a-zA-Z0-9-\\pL]*'),\n\t\t\t),\n\t\t);*/\n\n\t\t$this->setOldRoutes();\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "a82a20cd75586b53e9a46ad36ae387f0", "score": "0.50353307", "text": "function __autoload($class_name) {\n\tglobal $_AUTOLOAD;\n\tforeach ($_AUTOLOAD as $directory){\n\t\tif (file_exists(site::root.$directory.$class_name.'.php')){\n\t\t\trequire_once site::root.$directory.$class_name .'.php';\n\t\t\tbreak;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ef6d9ea7b3d79b0af4a934124651deac", "score": "0.50339484", "text": "function get_correct_class_name($cls)\n{\n global $class_mapping;\n if(isset($class_mapping) && is_array($class_mapping)){\n foreach($class_mapping as $class => $file){\n if(preg_match(\"/^\".$cls.\"$/i\",$class)){\n return($class);\n }\n }\n }\n return(FALSE);\n}", "title": "" }, { "docid": "d7f20e642a04948a8fca3a90a3654ec0", "score": "0.50292057", "text": "function php_class_autoloader($className)\n{\n $currentDir = dirname(__FILE__);\n\n $className = end(explode(\"\\\\\", $className));\n\n\n if (file_exists($currentDir . '/' . $className . '.php')) {\n include_once $currentDir . '/' . $className . '.php';\n } else if (file_exists($currentDir . '/models/' . $className . '.php')) {\n include_once $currentDir . '/models/' . $className . '.php';\n\n } else if (file_exists($currentDir . '/exceptions/' . $className . '.php')) {\n include_once $currentDir . '/exceptions/' . $className . '.php';\n }\n}", "title": "" }, { "docid": "0d7255475f52a9640682cdaebc875aa0", "score": "0.5023526", "text": "private static function setLookupPath(Array $paths = null) {\n self::definePathConstants();\n\n // set default lookup paths\n self::$lookup_path = array(\n INSCRIBE_ROOT_PATH . \"_lib/\",\n INSCRIBE_ROOT_PATH . \"_lib/model/\",\n INSCRIBE_ROOT_PATH . \"_lib/dao/\",\n INSCRIBE_ROOT_PATH . \"_lib/controller/\",\n INSCRIBE_ROOT_PATH . \"_lib/exceptions/\"\n );\n\n // set default lookup path for special classes\n self::$special_classes [\"Smarty\"] = INSCRIBE_ROOT_PATH . \"_lib/extlib/Smarty-2.6.26/libs/Smarty.class.php\";\n\n if (isset($paths)) {\n foreach($paths as $path) {\n self::$lookup_path[] = $path;\n }\n }\n }", "title": "" }, { "docid": "45d7b2ca22243da005f16afc9fb68967", "score": "0.502183", "text": "function initAutoloaderClasses(){\n spl_autoload_register(function($class){\n $sl = getenv('PHP_ENV') && getenv('PHP_ENV') == 'PROD' ? '/' : '\\\\';\n $prefix = \"Blog\\\\\";\n $len = strlen($prefix);\n if (strncmp($prefix, $class, $len) !== 0)\n return;\n\n $file = __DIR__ . $sl . str_replace('\\\\', '/', $class) . '.php';\n if (file_exists($file))\n require $file;\n });\n }", "title": "" }, { "docid": "164fc2689994d33549f005f01e32c58f", "score": "0.50200766", "text": "static public function replacePath($className, $path){\n\t\tself::$_classPath[$className] = $path;\n\t}", "title": "" }, { "docid": "b5f684ddecf54eb6c93d13584566eab1", "score": "0.50175816", "text": "function set_locator_class($class = 'SimplePie_Locator')\n{\nif (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Locator'))\n{\n$this->locator_class = $class;\nreturn true;\n}\nreturn false;\n}", "title": "" }, { "docid": "8b780f7370ecb5e68d3bd2540ce0825d", "score": "0.5014892", "text": "protected static function getPathsInternal() {}", "title": "" }, { "docid": "421ddeeacee0df866b318484bd88b577", "score": "0.5014715", "text": "function autoload($className) {\r\n foreach (array('../resto/core/') as $current_dir) {\r\n $path = $current_dir . sprintf('%s.php', $className);\r\n if (file_exists($path)) {\r\n include $path;\r\n return;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "c5f6239cf04237b46b4aeedb742049dd", "score": "0.50062746", "text": "function ClassAutoloader($class) {\n\tforeach (array(\"classes\",\"models\") as $dir) {\n\t\tif (file_exists(APP_PATH.\"/{$dir}/{$class}.php\")) {\n\t\t\trequire_once(APP_PATH.\"/{$dir}/{$class}.php\");\n\t\t}\n\t}\n}", "title": "" }, { "docid": "0934b3d52d5aed52706e3b8f585d7cd1", "score": "0.50041157", "text": "protected function _setup() {\n $this->_setupNames();\n }", "title": "" }, { "docid": "e8128a12a83a5c2948c89fe122a09db4", "score": "0.5003956", "text": "private function _getClassMap() \n {\n $host = array(\"hoststatus\", \"Hoststatus.php\");\n $service = array(\"servicestatus\", \"Servicestatus.php\");\n $info = array(\"info\", \"Info.php\");\n $program = array(\"programstatus\", \"Programstatus.php\");\n $contact = array(\"contactstatus\", \"Contactstatus.php\");\n $classes = array();\n $classes[] = $service;\n $classes[] = $host;\n $classes[] = $info;\n $classes[] = $program;\n $classes[] = $contact;\n return $classes;\n }", "title": "" }, { "docid": "4004390b6ce006ab1587229210a2b8ae", "score": "0.5003629", "text": "private function findCommandClasses()\n {\n $finder = Finder::create()\n ->ignoreVCS(true)\n ->name('*Command.php')\n ->in(\n $this->loadPaths()\n );\n\n foreach ($finder as $file) {\n $fileName = substr($file->getRelativePathname(), 0, -4);\n $className = '\\Roboli\\Command\\\\' . $fileName;\n\n if (class_exists($className)) {\n $this->commandClasses[] = $className;\n }\n }\n }", "title": "" }, { "docid": "5623211687d958bb41819903df9e0075", "score": "0.49974233", "text": "public function setFinderPattern():self{\n\n\t\t$pos = [\n\t\t\t[0, 0], // top left\n\t\t\t[$this->moduleCount - 7, 0], // bottom left\n\t\t\t[0, $this->moduleCount - 7], // top right\n\t\t];\n\n\t\tforeach($pos as $c){\n\t\t\tfor($y = 0; $y < 7; $y++){\n\t\t\t\tfor($x = 0; $x < 7; $x++){\n\t\t\t\t\t// outer (dark) 7*7 square\n\t\t\t\t\tif($x === 0 || $x === 6 || $y === 0 || $y === 6){\n\t\t\t\t\t\t$this->set($c[0] + $y, $c[1] + $x, true, $this::M_FINDER);\n\t\t\t\t\t}\n\t\t\t\t\t// inner (light) 5*5 square\n\t\t\t\t\telseif($x === 1 || $x === 5 || $y === 1 || $y === 5){\n\t\t\t\t\t\t$this->set($c[0] + $y, $c[1] + $x, false, $this::M_FINDER);\n\t\t\t\t\t}\n\t\t\t\t\t// 3*3 dot\n\t\t\t\t\telse{\n\t\t\t\t\t\t$this->set($c[0] + $y, $c[1] + $x, true, $this::M_FINDER_DOT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1a26a9cad45b06553dea6d5bf7ccd31c", "score": "0.49916914", "text": "function dstruct_autoloader($class_name) {\n\t$prefs = Prefs::gi();\n\t$cache = $prefs->get('cache');\n\t$key = Prefs::APP_NAME . \"_autoldr_$class_name\";\n\t\n\tif ($cache->hasServer()) {\n\t\tif ($path = $cache->get($key)) {\n\t\t\trequire_once($path);\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\t$directories = $prefs->get('autoloader_directories');\n \n\t//for each directory\n\tforeach($directories as $directory) {\n\t\t$path = APP_ROOT.\"lib/$directory/cls$class_name.php\";\n\t\tif(file_exists($path)) {\n\t\t\trequire_once($path);\n\t\t\tif ($cache->hasServer()) {$cache->set($key, $path);}\n\t\t\treturn;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "1a9b8543d45b678dc58e6478c53ee38c", "score": "0.4985992", "text": "protected function _setDirs()\n {\n // get the source class dir\n $class_dir = $this->_options['class_dir'];\n if ($class_dir) {\n $this->_class_dir = Solar_Dir::fix($class_dir);\n }\n \n // do we have a class dir?\n if (! $this->_class_dir) {\n throw $this->_exception('ERR_NO_CLASS_DIR');\n }\n \n // get the source package dir (if any)\n $package_dir = $this->_options['package_dir'];\n if ($package_dir) {\n $this->_package_dir = Solar_Dir::fix($package_dir);\n }\n \n // do we have a package dir?\n if (! $this->_package_dir) {\n throw $this->_exception('ERR_NO_PACKAGE_DIR');\n }\n \n // get the target docbook dir (if any)\n $docbook_dir = $this->_options['docbook_dir'];\n if ($docbook_dir) {\n $this->_docbook_dir = Solar_Dir::fix($docbook_dir);\n }\n \n // do we have a docbook dir?\n if (! $this->_docbook_dir) {\n throw $this->_exception('ERR_NO_DOCBOOK_DIR');\n }\n }", "title": "" } ]
748b13f5bfcab12c5773c5799a4b1d60
Check if a string is alphanumeric (with exceptions)
[ { "docid": "9663c1842c41d492754242f76835d79c", "score": "0.75731796", "text": "public static function is_alphanumeric($str, $exceptions=array()) {\n\n\t\t$default_exceptions = array('-', '_');\n\n\t\t$final_exceptions = array_merge(\n\n\t\t\t$default_exceptions,\n\t\t\t$exceptions\n\n\t\t\t);\n\n\t\t// To add excptions, fill this '-' '_' array -> higly optimized to be as fast as possible\n\t\tif (ctype_alnum(str_replace($final_exceptions, '', $str))) return TRUE;\n\t\telse return FALSE;\n\t}", "title": "" } ]
[ { "docid": "e130a163c4d0be8fa93a650951c908ff", "score": "0.8501688", "text": "function fnValidateAlphanumeric($string)\n{\n return ctype_alnum ($string);\n}", "title": "" }, { "docid": "2be6e277baadf7d17d7c5045a1db800b", "score": "0.8237215", "text": "public static function is_alphanum($string)\n {\n return ctype_alnum($string);\n }", "title": "" }, { "docid": "b32c9d4f4aa522b38801ad120271570c", "score": "0.82338583", "text": "function isAlphanumeric($input){\n if(!preg_match(\"/^[\\w\\-\\s]+$/\", $input)){\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "842b140ac496bb3f10249d7e8e82a348", "score": "0.8184005", "text": "function is_alphanum(\r\n $data_str // string to validate\r\n )\r\n{\r\n if (strlen($data_str) < 6)\r\n\treturn -1;\r\n \r\n if ( !ereg(\"[a-zA-Z0-9]\", $data_str) )\r\n\treturn -1;\r\n\t\r\n return 0;\r\n}", "title": "" }, { "docid": "2d7078a4dbbfb3c2e57884dc7fd96548", "score": "0.80781096", "text": "public static function isAlphanumeric($s) {\n\t\treturn ctype_alnum($s);\n\t}", "title": "" }, { "docid": "4783f4fd659ca04f2caabaa4cdfa4274", "score": "0.8077759", "text": "function is_alphanum($string)\n {\n if(!ctype_alnum($string)) {\n return(1);\n } elseif(empty($string)) {\n return(1);\n } elseif(str_replace(\" \", \"\", $string) == \"\") {\n return(1);\n } else {\n return(0);\n }\n }", "title": "" }, { "docid": "22e1288f4619669ff75b9a5b742937fd", "score": "0.7971803", "text": "function is_alphanumeric($str, $allowHyphen = false) {\n if($allowHyphen)\n return (bool) preg_match('/^[0-9a-z\\-]+$/i', $str);\n return (bool) preg_match('/^[0-9a-z]+$/i', $str);\n}", "title": "" }, { "docid": "dd53a63e7b69ffc426d37d381e23c49e", "score": "0.7822747", "text": "function is_alphanumeric($val)\n {\n return (bool)preg_match(\"/^([a-zA-Z0-9])+$/i\", $val);\n }", "title": "" }, { "docid": "f8e3d7bab150dd48dc23087cb19b7451", "score": "0.7807274", "text": "public static function isAlphanumeric($key, $string) {\n if(empty($string)) {\n Message::addError($key, 'Field can\\'t be empty');\n return;\n }\n if(!preg_match('/^[a-zA-Z\\p{L}0-9\\-\\/\\s,\\.\\?]*$/u', $string)) {\n Message::addError($key, 'Field can only contain alphanumeric characters and . / ? -');\n return;\n }\n }", "title": "" }, { "docid": "9148edc4e6d24547e276cc1cf3558935", "score": "0.77228165", "text": "function alphanumeric($str): string\n {\n return preg_replace('/[^\\p{L}\\p{N}\\s]/u', '', $str);\n }", "title": "" }, { "docid": "7c6fa1e019945278a430177413fd7605", "score": "0.7666969", "text": "function validateString($string)\r\n{\r\n return ctype_alpha($string);\r\n}", "title": "" }, { "docid": "0920d483178ccca259f332bc9ce889d0", "score": "0.76453114", "text": "function testAlphaNumberic($data) //tests if its just letters and white space\n//for valditing alpanumeric data\n{\n $error=\"\"; //returns blank when no error occurs\n if(!preg_match(\"/^[a-zA-Z0-9_]*$/\",$data)){ //Disallows anything not a letter or a space\n return $error=\"Only letters and white space allowed\";\n }\n}", "title": "" }, { "docid": "1755e1d6af9e14a6c296417924fb1669", "score": "0.7597139", "text": "function isalnum($char)\n {\n $ord = ord($char);\n return ($ord >= 65 && $ord <= 90) || ($ord >= 97 && $ord <= 122) || ($ord >= 48 && $ord <= 57);\n }", "title": "" }, { "docid": "9c6b6f152dddc66b1564dfed1144386c", "score": "0.7511976", "text": "function check_string($s) {\n if (!preg_match('/[^A-Za-z0-9]/', $s) && strlen($s) > 0 && strlen($s) < 12) // '/[^a-z\\d]/i' should also work.\n {\n //echo \"string contains only english letters & digits<br>\";\n return true;\n }\n else\n {\n //echo \"string is invalid\";\n return false;\n }\n}", "title": "" }, { "docid": "de718d15d610d95030554d6b418385b7", "score": "0.74422497", "text": "function verifyAlphaNum($testString) {\n // added & ; and # as a single quote sanitized with html entities will have \n return (preg_match (\"/^([[:alnum:]]|-|\\.| |\\'|&|;|#)+$/\", $testString));\n}", "title": "" }, { "docid": "6a5dccf27e9cd5bd96c2071317c605df", "score": "0.7374454", "text": "function isJustLetters($str)\n{\n if (!preg_match(\"/^[a-zA-Z]+$/\", $str)) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "590b9a0e12e7a9813e8b8a9bb44e6019", "score": "0.73312104", "text": "function sanitize_alphanumeric_string($string)\n\t{\n\t $string = preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $string);\n\t return $string;\n\t}", "title": "" }, { "docid": "246aef02651b89c56d039f62c391f5d2", "score": "0.7329829", "text": "function validate1($str) {\n $allowed = array(\".\",\"-\",\"_\",\" \");\n if (ctype_alnum(str_replace($allowed, '', $str))){\n //echo \"ternyata alpha-numeric\";\n return $str;\n }\n\telse {\n \t//echo \"bukan alpha-numeric\";\n $str = \"inputan salah\";\n return $str;\n }\n}", "title": "" }, { "docid": "a625b97165e9859b097999ff469c22a5", "score": "0.72802955", "text": "function checkAlphaNum($string)\n{\n return (eregi(\"^[a-z0-9]*$\", $string));\n}", "title": "" }, { "docid": "c37f77bdbfebcb8f67cb81c87fc446db", "score": "0.7246433", "text": "function isAlpha ($char) {\r\r\n return !preg_match(\"/[^a-zA-Z]/\", $char);\r\r\n }", "title": "" }, { "docid": "950858a222095026365db0cc1ef1325a", "score": "0.724237", "text": "function alnumValidation($str)\n\t\t{\n\t\t\t$str_pattern = '/[^[:alnum:][^\"][^\\']\\:\\#\\r\\n\\s\\,\\.\\-\\(\\)\\/\\;\\+\\%]/';\n\t\t\t\n\t\t\treturn preg_match_all($str_pattern, $str, $arr_matches);\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "8302b6567312afd2f1720d67537fa402", "score": "0.7218186", "text": "function checkAlphaNumSpace($string)\n{\n return (eregi(\"^[a-z0-9 ]*$\", $string));\n}", "title": "" }, { "docid": "53a2c33725082d7df1b3e3a759e215e1", "score": "0.72170943", "text": "function checkAlphaNum($arrData = array()) { // string contain digit with aplhabets\n\t\t$field = $arrData ['key'];\n\t\tif (ctype_alnum ( $field )) {\n\t\t\t\t\n\t\t\treturn true;\n\t\t} else {\n\t\t\t\t\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "4e57ff99e0e363db9f401d61cf941e7c", "score": "0.7192317", "text": "public static function checkAlphanum($value) {\r\n\t\t$regexp = \"/^[\\w]+$/\";\r\n\t\tif (preg_match($regexp, $value)) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "03f2d301e184d60c03e2e206328c1e0d", "score": "0.7136321", "text": "public function alpha_numeric($arg){\n\t\tif(ctype_alnum((String)$arg)){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "32b97689cb0789e72f3487deb157ec8c", "score": "0.70929056", "text": "private function validate_alphanumeric_underscore($str)\n {\n return preg_match('/^[a-zA-Z0-9_]+$/', $str);\n }", "title": "" }, { "docid": "61835cb42b54d0a7131f901fd2f7e906", "score": "0.70924693", "text": "function isOnlyLetter($string){\r\n\t\tif (preg_match('#^[A-Za-zàáâãäåçèéêëìíîïðòóôõöùúûüýÿ]+$#', $string))\r\n\t\t{\r\n\t\t return true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5152bc3ee8ef9c3f11536e9eaa81eb7f", "score": "0.70777833", "text": "private function assertAlphaNumeric($string, $message = \"\") {\n $this->assertTrue(ctype_alnum($string), $message);\n }", "title": "" }, { "docid": "fd6da48a41f94722751d0213e4581f77", "score": "0.70532113", "text": "function password_check($str)\n\t{\n\t\tif (preg_match('#[0-9]#', $str) && preg_match('#[a-zA-Z]#', $str)) {\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "7b86d7cfd061c605da88b45ccc846436", "score": "0.70450217", "text": "function validate_username($str) {\n // besides the ones from ctype_alnum\n $allowed = array(\".\", \"-\", \"_\");\n\n if (ctype_alnum(str_replace($allowed, '', $str ) ) ) {\n return $str;\n } else {\n $str = \"Invalid Username\";\n return $str;\n }\n}", "title": "" }, { "docid": "3593e7f578bb6f1bad9cb0822042335a", "score": "0.7036923", "text": "function isAlphaNumChar($str, $mustContainValue = FALSE) {\n return checkit::check(\n $str,\n '~^[a-zA-Z0-9'.PAPAYA_CHECKIT_WORDCHARS.'\\.\\(\\)\\[\\]\\/ ,_-]+$~u',\n $mustContainValue\n );\n }", "title": "" }, { "docid": "a358da95589a5ba47131ea50ff8ac11d", "score": "0.7025535", "text": "function is_alpha($string)\n {\n if(!ctype_alpha($string)) {\n return(1);\n } elseif(empty($string)) {\n return(1);\n } elseif(str_replace(\" \", \"\", $string) == \"\") {\n return(1);\n } else {\n return(0);\n }\n }", "title": "" }, { "docid": "e519a19b2a9d21526e4eefa4e115097f", "score": "0.7019778", "text": "public function forceAlphaNumeric()\n {\n $valid = false;\n if (!ctype_alpha($this->data[$this->alias]['temp_password'])\n && !ctype_digit($this->data[$this->alias]['temp_password'])){\n $valid = true;\n }\n\n return $valid;\n }", "title": "" }, { "docid": "50b84b34d63d4757091448be64fcd00f", "score": "0.6995201", "text": "static function isOnlyLetter($str)\n {\n $len = strlen($str);\n for ($i = 0; $i < $len; $i++) {\n $c = $str[$i];\n $res = false;\n if ($c > 'A' && $c < 'Z') $res = true;\n if ($c > 'a' && $c < 'z') $res = true;\n if (!$res) return false;\n }\n return true;\n }", "title": "" }, { "docid": "017e72468fbb24fb24638e2dd788d0a1", "score": "0.6961429", "text": "function company_validation($str)\n{\n return preg_match(\"/^[a-zA-Z0-9 ]+$/\", $str);\n}", "title": "" }, { "docid": "bcd3a9b221b4c149af6e726b61327402", "score": "0.6940869", "text": "function alpha_dash($str)\r\n{\r\n\treturn (bool) preg_match('/^[a-z0-9_-]+$/i', $str);\r\n}", "title": "" }, { "docid": "31fd97f4cac2432a5e3d5b5a5d5f165e", "score": "0.69164187", "text": "public function alpha_numeric($str)\n\t{\n\t\tif (valid::alpha_numeric($str))\n\t\t\treturn TRUE;\n\n\t\t$this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha'));\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "b1fa3588fff7fac821a019a751d4c192", "score": "0.6883448", "text": "function clean_alphanum($s) {\n\treturn preg_replace('/([^A-Za-z0-9])/','',$s);\n}", "title": "" }, { "docid": "e9723f453b4f504f6f7f6de631d23653", "score": "0.68823195", "text": "function isAlphaNum($str, $mustContainValue = FALSE) {\n return checkit::check(\n $str,\n '~^[a-zA-Z0-9'.PAPAYA_CHECKIT_WORDCHARS.'\\. ,_-]+$~u',\n $mustContainValue\n );\n }", "title": "" }, { "docid": "f099c99149a22514f381af2c3e48ea00", "score": "0.6879966", "text": "public function if_only_alpha($string){\n\n\t\t\tif(!preg_match('/[^a-z]/',$string))\n\t\t\t{\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f099c99149a22514f381af2c3e48ea00", "score": "0.6879966", "text": "public function if_only_alpha($string){\n\n\t\t\tif(!preg_match('/[^a-z]/',$string))\n\t\t\t{\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6f5c390e70221858548057c8e3c14820", "score": "0.6877221", "text": "public function test_f_validateStringAlphanumeric_r_err_str1()\n {\n $expected = 'error!';\n $input = '@!£test';\n $case = validateStringAlphanumeric($input);\n $this->assertEquals($expected, $case);\n }", "title": "" }, { "docid": "68385cd9736daf2bd2f5d1f31309da37", "score": "0.68402535", "text": "public function alphanumeric($value)\n{\n\tif(preg_match('/^(?=.*[a-zA-Z])[a-zA-Z0-9 .\\-\\,]+$/',$value))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "title": "" }, { "docid": "8778d1ff93e469a0628bded3485f29a0", "score": "0.6837121", "text": "protected function valid_alpha_digit($str, $val=''){\n\t\treturn (bool) preg_match(\"/^([a-z0-9])+$/i\", $str);\n\t}", "title": "" }, { "docid": "9da280df7612ab6be22792bd657c830c", "score": "0.68369925", "text": "public static function is_ascii($str) {\n\t\treturn is_string($str) AND ! preg_match('/[^\\x00-\\x7F]/S', $str);\n\t}", "title": "" }, { "docid": "b6e94eccc793b5839b1f88312c9346e2", "score": "0.68322563", "text": "public function isAlphanumeric() {\r\n // is optional?\r\n if ($this->isOptional()) {\r\n return $this;\r\n }\r\n // test\r\n $regex = '~^[a-z0-9 _-]+$~i';\r\n if (!preg_match($regex, $this->value)) {\r\n throw new Error(\"'{$this->name}' is not alpha-numeric.\", 416);\r\n }\r\n // return\r\n return $this;\r\n }", "title": "" }, { "docid": "5d5dbc0ef1212aa81de8ef4d4ad046ee", "score": "0.6798111", "text": "public function isAlphaNum()\n\t\t{\n\t\t\treturn ($this->isAlpha() || $this->isDigit()) ? true : false;\n\t\t}", "title": "" }, { "docid": "172992c5e353b6c88d35d2456a6f2bb9", "score": "0.67671186", "text": "public function if_alpha($string){\n\n\t\t\tif(!preg_match('/[a-z]/',$string))\n\t\t\t{\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "172992c5e353b6c88d35d2456a6f2bb9", "score": "0.67671186", "text": "public function if_alpha($string){\n\n\t\t\tif(!preg_match('/[a-z]/',$string))\n\t\t\t{\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5b23ce4f0a0670a43355893acf23f30f", "score": "0.6758483", "text": "function isInvalid($text)\n{\n\tif (empty($text))\n\t\treturn true;\n\telseif (!preg_match(\"/[a-z]/i\", $text))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "title": "" }, { "docid": "41f114959643bb8299d627f34c3cd166", "score": "0.675328", "text": "static public function alpha_numeric($string)\n {\n return preg_replace(\"/[^a-z0-9]/i\", '', $string);\n }", "title": "" }, { "docid": "3030a3fe83bfc44025f4584c0ec1b19b", "score": "0.67507625", "text": "function alpha_space_only($str)\n {\n \tif (!preg_match(\"/^[a-zA-Z ]+$/\",$str))\n \t{\n \t\t$this->form_validation->set_message('alpha_space_only', 'The %s field must contain only alphabets and space');\n \t\treturn FALSE;\n \t}\n \telse\n \t{\n \t\treturn TRUE;\n \t}\n }", "title": "" }, { "docid": "f60d580bfb8765aea2f207ddbfb87edf", "score": "0.6750361", "text": "public function utf8_alpha_numeric($str)\n\t{\n\t\tif (valid::alpha_numeric($str, TRUE))\n\t\t\treturn TRUE;\n\n\t\t$this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha'));\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "4ce104b4797627032a49ada8c62bc7ac", "score": "0.6716289", "text": "function isValid($str) {\n return !preg_match('/[^A-Za-z.#\\\\-$]/', $str);\n }", "title": "" }, { "docid": "3c5330820019b5347de914620b3cc8b7", "score": "0.6694174", "text": "function is_alpha($val)\n {\n return (bool)preg_match(\"/^([a-zA-Z])+$/i\", $val);\n }", "title": "" }, { "docid": "5ef489179b9bce81762e00af54036d12", "score": "0.66919804", "text": "function valid($str)\n{\n $pattern = '/[^(0-9)\\w_]/i';\n $replace = \"\";\n $res = preg_replace($pattern, $replace, $str);\n return $res;\n}", "title": "" }, { "docid": "0a2421a6525c08790fe9dc3dc9ed8e99", "score": "0.66898257", "text": "public function mb_ctype_alpha($text)\n {\n return (bool) preg_match('/^\\p{L}*$/', $text);\n }", "title": "" }, { "docid": "47d823ecfecabd8709d9d67116f52bcc", "score": "0.6674301", "text": "public function alpha_only_space($str)\n {\n if (!preg_match(\"/^([-a-z ])+$/i\", $str))\n {\n $this->form_validation->set_message('alpha_only_space', 'The %s field must contain only alphabets or spaces');\n return FALSE;\n }\n else\n {\n return TRUE;\n }\n }", "title": "" }, { "docid": "e26b71406d80145744cf891bc2ae4ba2", "score": "0.6668121", "text": "protected function valid_alpha($str, $val=''){\n\t\treturn (bool) preg_match(\"/^([a-z])+$/i\", $str);\n\t}", "title": "" }, { "docid": "b31ec9f0f95a0c73627a2c3e0554f296", "score": "0.6659854", "text": "function name_validation($str)\n{\n return preg_match(\"/^[a-zA-Z]+$/\", $str);\n}", "title": "" }, { "docid": "85f6c560ed1973c5c41659f6b81be7a3", "score": "0.6630244", "text": "public function alpha_only_space($str)\n {\n if (!preg_match(\"/^([-a-z ])+$/i\", $str)) {\n $this->form_validation->set_message('alpha_only_space', 'The %s field must contain only alphabets or spaces');\n return FALSE;\n } else {\n return TRUE;\n }\n }", "title": "" }, { "docid": "76e3a3d5b8bb19d3e1a8f05620baef13", "score": "0.6626028", "text": "function areSpecCharsPresent($pass){\n if (ereg('[^a-zA-Z0-9]',$pass)){ \n return true;\n }else{\n return false;\n } \n}", "title": "" }, { "docid": "740e43cb6fd27ff16bc209ff4cb36907", "score": "0.6607887", "text": "public function test_invalid_username_contains_nonAlphanumeric_character()\n {\n $results = array();\n // Act\n array_push($results,Validation::isValidUsername(\"-Regular1\"));\n array_push($results,Validation::isValidUsername(\".Regular1\"));\n array_push($results,Validation::isValidUsername(\"/Regular1\"));\n //Assert\n foreach ($results as $result) {\n assert(false, $result);\n }\n }", "title": "" }, { "docid": "ead6677d4e5303b2a64856a88464f0ac", "score": "0.66041446", "text": "public function test_f_validateStringAlphanumeric_r_err_str2()\n {\n $expected = 'error!';\n $input = '@!£test';\n $case = validateStringAlphanumeric($input);\n $this->assertEquals($expected, $case);\n }", "title": "" }, { "docid": "b4288e65e3fc4fd623e03684e90c678d", "score": "0.6595277", "text": "public function alphanumValido($value){\n\t\t$valueAux = str_replace(\" \",\"\",$value);\n\t\t// valida cadena\n\t\tif(Zend_Validate::is($valueAux, 'Alnum')){\n\t\t\t// filtrarlo\n\t\t\t$filtroST = new Zend_Filter_StripTags();\n\t\t\t$filtroHtml = new Zend_Filter_HtmlEntities();\n\t\t\t$filtroTrim = new Zend_Filter_StringTrim();\n\t\t\t\t\n\t\t\t$value = $filtroHtml -> filter($value);\n\t\t\t$value = $filtroST -> filter($value);\n\t\t\t$value = $filtroTrim -> filter($value);\n\n\t\t\treturn $value;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9b4d024d9b4369691c2cafe7a7731f8a", "score": "0.6586572", "text": "public static function isAlphabetic($s) {\n\t\treturn ctype_alpha($s);\n\t}", "title": "" }, { "docid": "9b8c09d80ab4e6b5a75fa4aef424160b", "score": "0.6585693", "text": "function isAlphaChar($str, $mustContainValue = FALSE) {\n return checkit::check(\n $str,\n '~^[\\da-zA-Z'.PAPAYA_CHECKIT_WORDCHARS.'\\.\\(\\)\\[\\]\\/ ,_-]+$~u',\n $mustContainValue\n );\n }", "title": "" }, { "docid": "56b8381e5bb8d73b6b6f08951bb2422c", "score": "0.6584987", "text": "function validName($name)\r\n {\r\n return ctype_alpha($name);\r\n }", "title": "" }, { "docid": "63536d3435d49719e3f3ea20d8fb8891", "score": "0.65383077", "text": "public static function is_alnum($value, $use_preg = false) {\n if ($use_preg === false && function_exists('ctype_alnum')) {\n return ctype_alnum($value);\n } else {\n return (preg_match('/^[a-zA-Z0-9]+$/', $value) ? true : false);\n }\n }", "title": "" }, { "docid": "c919ce523fae3bbfeceef712a0823983", "score": "0.6537399", "text": "public static function is($_string, $_alphabet = null)\n\t{\n\t\tif(!is_string($_string) && !is_numeric($_string))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t$_alphabet = self::alphabet($_alphabet);\n\t\tif(preg_match(\"/^[\". $_alphabet. \"]+$/\", $_string))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "173c467630334abec2609a8866efd28d", "score": "0.65335363", "text": "function valid($string){\n\treturn preg_match('/^[a-zA-Z0-9.!\\'\\\"\\s-,]+$/', $string);\n}", "title": "" }, { "docid": "cac296f54668cae628a35d56bd287712", "score": "0.65202606", "text": "public function isValidString($string, $allowed = [])\n {\n if (ctype_alnum(str_replace($allowed, '', $string))) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "3d23ef585824979e8b59825806c8ab21", "score": "0.6517439", "text": "function validName($name)\r\n\t{\r\n\t\treturn ctype_alpha($name);\r\n\t}", "title": "" }, { "docid": "d9b74c68a59dd6b97f4841c2682a5114", "score": "0.6511308", "text": "private function _isAscii ($str)\r\n\t{\r\n\t\treturn (preg_match ('/[^\\x00-\\x7F]/S', $str) == 0);\r\n\t}", "title": "" }, { "docid": "596870314a4f3b2b9902a2107a7c6980", "score": "0.6501577", "text": "protected function valid_alpha_digit_underscore($str, $val=''){\n\t\treturn (bool) preg_match(\"/^([a-z0-9_])+$/i\", $str);\n\t}", "title": "" }, { "docid": "b93910b797f6400e4390097e054ee5db", "score": "0.64918476", "text": "function invalidUsername($username){\n $result= true;\n $regex = '/^[a-zA-Z0-9]*$/';\n if(!preg_match($regex,$username)){\n $result = true;\n }else{\n $result = false;\n }\n return $result;\n}", "title": "" }, { "docid": "7fec218d76840f9ede6bcbccc5ec935f", "score": "0.64881617", "text": "static public function alpha($string)\n {\n return preg_replace(\"/[^a-z]/i\", '', $string);\n }", "title": "" }, { "docid": "777fffcf2b63302ee55ed9f5b77534a6", "score": "0.64870274", "text": "function validaLetrasNumeros($text){\r\n if(strlen($text) < 1) \r\n return false; \r\n //SI longitud pero NO solo caracteres A-z \r\n //else if(!preg_match(\"/^[a-zA-Z]+$/\", $name))\r\n else if(!preg_match(\"/^[a-záéóóúàèìíòùäëïöüñ0-9\\s]+$/i\", $text))\r\n return false; \r\n // SI longitud, SI caracteres A-z \r\n else \r\n return true; \r\n}", "title": "" }, { "docid": "98aba7c75f96390df179db50ee9d8b67", "score": "0.6484523", "text": "public static function alphanumeric($input, ?Param $param = null): string\n {\n if (ctype_alnum($input)) {\n return $input;\n }\n if ($param && $param->fix) {\n //remove non alpha numeric and space characters\n return preg_replace(\"/[^a-z0-9 ]/i\", \"\", $input);\n }\n throw new Invalid('Expecting only alpha numeric characters.');\n }", "title": "" }, { "docid": "1cb5e59db745c8162d07d82b3e662069", "score": "0.64572364", "text": "public function validateChars($str)\n\t{\t\n\t\t//take out trailling spaces\n\t\t$str = trim($str);\n\t\t//preg match to validate string\n\t\t$allowed = \"/^[a-zA-Z ]*$/\";\n\t\t//check if the characters are within this preg match\n\t\tif (!preg_match($allowed,$str)) {\n\t \t\treturn FALSE; \n\t\t}\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "4cddbfc68e4d761ae94da6b56bb95626", "score": "0.6450143", "text": "protected function isAlphaNum($c) {\n return ord($c) > 126 || $c === '\\\\' || preg_match('/^[\\w\\$]$/', $c) === 1;\n }", "title": "" }, { "docid": "c1134d0c81181b8ccfb73ae55e234823", "score": "0.64365697", "text": "public static function alpha_numeric($value){\n\t\t\treturn (bool) preg_match('/^[a-z0-9]+$/i', $value);\n\t\t}", "title": "" }, { "docid": "240f3f13898c590e3719f74a89d7ae34", "score": "0.6432482", "text": "public function no_special_character($str){\r\n $this->ci->form_validation->set_message('no_special_character' , $this->ci->lang->line('no_special_character'));\r\n $pattern = \"/^[\\pL0-9a-zA-Z]+$/u\";\r\n return (bool) preg_match($pattern, $str);\r\n }", "title": "" }, { "docid": "1ad8e175ea72d111f287459938f6f531", "score": "0.6419158", "text": "protected function isSafeAscii($str) {\n\t\tfor ($i=0;$i<strlen($str);$i++)\n\t\t\tif (ord($str{$i}) < 32 || ord($str{$i}) > 127)\n\t\t\t\treturn false;\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "029dcb139b1745bad23fca8154396a44", "score": "0.6417339", "text": "public static function alphaNumeric($value)\n {\n return !!preg_match('/^[a-zA-Z0-9]+$/', (string) $value);\n }", "title": "" }, { "docid": "82a6cf01b94c85ee053c356ac8b7becc", "score": "0.6416623", "text": "function validEntry ($string) { \n\t\tif(!ctype_alnum($string)){\n\t\t\techo \"<script> alert('Fields may only contain letters and numbers'); \n\t\t\t\twindow.location = 'signin.php'; </script>\";\n\t\t\treturn false;\n\n\t\t}\n \telse{\n \t\treturn true;\n \t}\n\t}", "title": "" }, { "docid": "f397e1ed500c2ccf9f5b4727220933d0", "score": "0.6411341", "text": "function isAlpha($str, $mustContainValue = FALSE) {\n return checkit::check(\n $str,\n '~^[a-zA-Z'.PAPAYA_CHECKIT_WORDCHARS.'\\. ,_-]+$~u',\n $mustContainValue\n );\n }", "title": "" }, { "docid": "93b44a8abdd20b1bed48de7444c5eb64", "score": "0.64102006", "text": "private function alpha_dash($str)\n {\n return (bool)preg_match('/^[a-z0-9_-]+$/i', $str);\n }", "title": "" }, { "docid": "f69bfdaee0f6380c5c68cb73df4769b9", "score": "0.64011765", "text": "public function testCodeCharsValid()\n {\n $value = $this->first_char . \"abcde12345\";\n $this->flight->code = $value;\n $this->assertTrue(ctype_alnum($this->flight->code));\n }", "title": "" }, { "docid": "bf34434ff6666c66ad7913ac852c361c", "score": "0.63982", "text": "protected function isAlphaNum($c) {\n\treturn ord($c) > 126 || $c === '\\\\' || preg_match('/^[\\w\\$]$/', $c) === 1;\n }", "title": "" }, { "docid": "f0a73d74f3ea96780e48a141d5be4e23", "score": "0.6391689", "text": "function areLowerCharsPresent($pass){\n if (ereg('[[:lower:]]',$pass)){ \n return true;\n }else{\n return false;\n } \n}", "title": "" }, { "docid": "82e2b9b8deadb2044fc585834f66aa43", "score": "0.63808334", "text": "public function isValid($subject)\n {\n if (is_scalar($subject) === false) {\n return false;\n }\n\n return ctype_alnum($subject);\n }", "title": "" }, { "docid": "148324f5a8e806c534ffff27bef7f4a1", "score": "0.6380775", "text": "function check_name($str)\n{\n\tif(preg_match('/[-_+.1-9a-zA-Z]{4,32}/',$str)) {\n\t\treturn false;\n\t}\n\n\treturn 'Allowed character must be any of [-_+.1-9a-zA-Z],4 - 32 characters.';\n}", "title": "" }, { "docid": "62611809e4e39d1de2cd14ab1d739dd6", "score": "0.6367466", "text": "function validName($name)\r\n{\r\n return !empty($name) && ctype_alpha($name);\r\n}", "title": "" }, { "docid": "550a718e06f3286e82ede076608b9156", "score": "0.63603836", "text": "public function alphanumeric_clean($string, $space = true) {\n\t\tif(is_array($string)) foreach($string as &$string_alone) $string_alone = $this -> alphanumeric_clean($string_alone, $space);\n\n\t\telse {\n\t\t\t$string = preg_replace('/[^a-zA-Z0-9\\s]/', '', $string);\n\t\t\tif($space) $string = str_replace(' ', '', $string);\n\t\t}\n\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "27f743dc0ce9beabbd0ef8a1be27c185", "score": "0.6344741", "text": "function testLettersAndWhiteSpace($data) //tests if its just letters and white space\n//for valditing names and such\n{\n $error=\"\"; //returns blank when no error occurs\n if(!preg_match(\"/^[a-zA-Z]*$/\",$data)){ //Disallows anything not a letter or a space\n return $error=\"Only letters and white space allowed\";\n }\n}", "title": "" }, { "docid": "ddea48ba0173e52eb323249ea26780e0", "score": "0.6340986", "text": "function validaEntero($num){\r\n if(strlen($num) < 1) \r\n return false; \r\n //SI longitud pero NO solo caracteres A-z \r\n //else if(!preg_match(\"/^[a-zA-Z]+$/\", $name))\r\n else if(!preg_match(\"/^[0-9]+$/\", $num))\r\n return false; \r\n // SI longitud, SI caracteres A-z \r\n else \r\n return true; \r\n}", "title": "" }, { "docid": "f85fa1da37cc742421f67a5d12c1145e", "score": "0.6340586", "text": "public function isAscii($string)\n {\n return !preg_match('/[^\\x20-\\x7f]/', $string);\n }", "title": "" }, { "docid": "22bbcb2f5f5aad747c7e57b16ed6f541", "score": "0.6318804", "text": "function CheckString($myparam) {\n if(preg_match(\"/^[-a-z0-9_]/i\",$myparam)) {\n return true;\n } else {\n return false;\n }\t\n}", "title": "" }, { "docid": "c2cd07d9ac30a699d354de32037d0d6e", "score": "0.6310859", "text": "public function test_s_validateStringAlphanumeric_r_str()\n {\n $expected = 'test';\n $input = 'test';\n $case = validateStringAlphanumeric($input);\n $this->assertEquals($expected, $case);\n }", "title": "" } ]
1b537b0a961ab5db9974c307c9481112
function to connect and execute the query
[ { "docid": "5fe228376590213681a0209e53f4bd57", "score": "0.0", "text": "function filterTable($query)\n{\n $conn = mysqli_connect(\"localhost\", \"root\", \"\", \"stuff\");\n $filter_Result = mysqli_query($conn, $query);\n return $filter_Result;\n}", "title": "" } ]
[ { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.7307311", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.7307311", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.7307311", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.7307311", "text": "public function query();", "title": "" }, { "docid": "22d90cd8940a0fb46f77b02dace8732b", "score": "0.7209824", "text": "protected function executeQuery(){\n\t\t\ttry{\n\t\t\t\t//abrir conexion\n\t\t\t\t$this->open_connection();\n\t\t\t\t//preparar la consulta\n\t\t\t\t$result=$this->conn->query($this->query);\t\n\t\t\t\t//cerrar conexion\n\t\t\t\t$this->close_connection();\n\t\t\t\treturn $result;\n\t\t\t} catch (Exception $e){\n\t\t\t\tdie('Error al ejecutar la consulata: '.$e->getMessage());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "fdea4f0322b7f19d781670da69141454", "score": "0.7098983", "text": "public function queries();", "title": "" }, { "docid": "c076b0a0689627adecc53ddbf555f815", "score": "0.708998", "text": "public function query()\n\t{\n\t\techo \"Running query on database conenction...<br />\\n\";\n\t}", "title": "" }, { "docid": "6a7cae39821bf1ee1cfec4cfa6bbc28e", "score": "0.7021324", "text": "public function runQuery()\n {\n }", "title": "" }, { "docid": "d9102fdc1eb19c27188f8fc7b5a26e81", "score": "0.6966461", "text": "abstract public function query();", "title": "" }, { "docid": "83b68f166a1920d825515c53efe7a994", "score": "0.6955164", "text": "public function execute() {\n $this->driver->query($this->getQuery());\n }", "title": "" }, { "docid": "638be5afe7ddae33a452097f06de3526", "score": "0.6948942", "text": "function Query()\n\t{\n\t\t//Armo la conexion al motor de bd.\n\t\t$this->coneccion = new Conexion();\n\t\n\t\t//Segun el motor de BD, eligo que clase consulta usar.\n\t\tif ($this->coneccion->getmotor()=='mysql')\n\t\t{\n\t\t\t$this->consulta = new mysql_consulta($this->coneccion);\n\t\t}\t\n\n\t\tif ($this->coneccion->getmotor()=='postgresql')\n\t\t{\n\t\t\t$this->consulta = new postgres_consulta($this->coneccion);\n\t\t}\t\t\t\t\t\n\t}", "title": "" }, { "docid": "85efd886d94ada2ded8ca89b7d5c1a42", "score": "0.69419974", "text": "public static function execute($query){\t//function to execuute query\r\n\t\tDB::$conn = new mysqli(DB::$dbHost,DB::$dbUser,DB::$dbPass,DB::$dbName);\r\n\t\t$res = DB::$conn->query($query);\r\n\t\tDB::$conn->close();\r\n\t\treturn($res);\r\n\t}", "title": "" }, { "docid": "9e6a52a941c7e6fb78bc1990f96589bd", "score": "0.6909601", "text": "function execute($sql)\n {\n $link = pg_connect('host='.SLEDGEMC_HOST.' dbname='.SLEDGEMC_NAME.' user='.SLEDGEMC_USER.' password='.SLEDGEMC_PASS);\n\n return pg_query($link, $sql);\n }", "title": "" }, { "docid": "6e265aa2bc94af85d22b1fd554528bd5", "score": "0.68725646", "text": "function query()\n {\n }", "title": "" }, { "docid": "749fa9d8532f8e992181a7816b19a08c", "score": "0.68580395", "text": "function query(){\n \t\n }", "title": "" }, { "docid": "4a814c801e946faba0799dedd8ec5c85", "score": "0.6838229", "text": "function execute($query){\n global $conn;\n $result = $conn->query($query);\n return $result;\n }", "title": "" }, { "docid": "121625f4d5174a9c670f45a348d8d0da", "score": "0.68345076", "text": "public function execute_query() {\n\n\t\t// Perform the query, return the result set\n\t\treturn $this->results = $this->search_engine_client_execute( $this->search_engine_client, $this->query_select );\n\t}", "title": "" }, { "docid": "17b41bbcc2fa366c1e53dc8867579fc3", "score": "0.6812266", "text": "function execute_query($query)\n {\n $conn = connectDB();\n $result = pg_query($conn, $query);\n return $result;\n }", "title": "" }, { "docid": "144d170ca9f5ee727f2bd94cceb364af", "score": "0.68036103", "text": "function executeQuery($query){\n\t$username=\"root\";\n\t$password=\"\";\n\t$database=\"university\";\n\t$db_handle = mysql_connect(\"127.0.0.1\",$username,$password);\n\t$db_found = mysql_select_db($database) or die( \"Unable to select database\");\n\t$Queryresult = mysql_query($query);\n\tmysql_close($db_handle);\n\treturn $Queryresult;\n}", "title": "" }, { "docid": "5009d9b433441547ea61d8e7ace366b7", "score": "0.6788672", "text": "function runQuery($query) {\r\n global $dbase;\r\n $result = $dbase->query($query);\r\n }", "title": "" }, { "docid": "88ea99e13c33c43073f4e1c7fbdf9272", "score": "0.6761193", "text": "abstract public function execute($conn);", "title": "" }, { "docid": "5fca3342526319aeca2dc8d9761d9d80", "score": "0.6734848", "text": "function ovrimos_exec($connection_id, $query)\n{\n}", "title": "" }, { "docid": "2b2743c648912fcbb3cdd801427ffff5", "score": "0.67184013", "text": "public function query(){}", "title": "" }, { "docid": "ede961f10f6273a77dae08d2d1663ccc", "score": "0.67117965", "text": "public function Execute( $query );", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.6711345", "text": "function query() {\n }", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.6711345", "text": "function query() {\n }", "title": "" }, { "docid": "6d20221333469a54c3f66af7af63da1e", "score": "0.67017037", "text": "function querydb(){\n\t\t}", "title": "" }, { "docid": "2027d2ddca0657f2ca9149ca38afa3cb", "score": "0.6674661", "text": "public function execute($query);", "title": "" }, { "docid": "b2212b85b1625c46c6939783b105e048", "score": "0.665689", "text": "abstract static function query($sql, $connection = 'default');", "title": "" }, { "docid": "a204ad1713d6539784f719d5b63e66e3", "score": "0.66568065", "text": "function executeQuery() {\n $database = ComponentDatabase::get_instance();\n return $database->executeQuery( $this->query->getSQL() );\n }", "title": "" }, { "docid": "c2edaf59417d0b89da0541304b6661f9", "score": "0.66482425", "text": "abstract public function execute( $query );", "title": "" }, { "docid": "ab634afa60a8583dcbeb0a843edaf304", "score": "0.66401637", "text": "public function connect()\r\n {\r\n //$link=pg_connect($datos_bd);\r\n if ( !$this->db_connection = pg_connect('127.0.0.1', 'LBRG', 'junior', 'junior') ) {\r\n throw new RunTimeException(\"Couldn't connect to the database server\");\r\n }\r\n //if ( !@mysql_select_db($this->db_name, $this->db_connection) ) {\r\n // throw new RunTimeException(\"Couldn't connect to the given database\");\r\n // }\r\n //$this->executeQuery(\"SET CHARACTER SET 'utf8'\");\r\n }", "title": "" }, { "docid": "63ebdf1e413b1fefe81bdc33d6c1925f", "score": "0.662135", "text": "function executeQuery($sql)\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "4718439e6b6e09cb3e669fb7acbefcfb", "score": "0.6613098", "text": "protected function set_query(){\n $this->db_open();\n $this->conn->query($this->query);\n $this->db_close(); \n }", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.66107845", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.66107845", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.66107845", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.66107845", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.66107845", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.66107845", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.66107845", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.66107845", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.66107845", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.66107845", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.66107845", "text": "public function execute();", "title": "" }, { "docid": "03c12db47b6e9ce11a285239cef015a8", "score": "0.6593703", "text": "protected function connect()\r\r\n\t{\r\r\n\t\tif ($GLOBALS['TL_CONFIG']['dbPconnect'])\r\r\n\t\t{\r\r\n\t\t\t$this->resConnection = @oci_connect($GLOBALS['TL_CONFIG']['dbUser'], $GLOBALS['TL_CONFIG']['dbPass'], '', $GLOBALS['TL_CONFIG']['dbCharset']);\r\r\n\t\t}\r\r\n\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\t$this->resConnection = @oci_connect($GLOBALS['TL_CONFIG']['dbUser'], $GLOBALS['TL_CONFIG']['dbPass'], '', $GLOBALS['TL_CONFIG']['dbCharset']);\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "be750b8cc1ab80ea7f687ee00c3785d6", "score": "0.65916", "text": "public static function query()\n {\n }", "title": "" }, { "docid": "be750b8cc1ab80ea7f687ee00c3785d6", "score": "0.6590405", "text": "public static function query()\n {\n }", "title": "" }, { "docid": "be750b8cc1ab80ea7f687ee00c3785d6", "score": "0.6590405", "text": "public static function query()\n {\n }", "title": "" }, { "docid": "65871c8af350a97af10589941569e1af", "score": "0.6582572", "text": "function executeQuery($query) {\n global $hn, $un, $pw, $db;\n $conn = new mysqli($hn, $un, $pw, $db);\n if ($conn->connect_error) {\n die($conn->connect_error);\n }\n $result = $conn->query($query);\n $conn->close();\n return $result;\n }", "title": "" }, { "docid": "5d95af190f7e01620bdc9b7452feedb2", "score": "0.65662247", "text": "function executeQuerySelect($query){\n $queryResult = null;\n\n $dbConnexion = openDBConnexion();//open database connexion\n if ($dbConnexion != null)\n {\n $statement = $dbConnexion->prepare($query);//prepare query\n $statement->execute();//execute query\n $queryResult = $statement->fetchAll();//prepare result for client\n }\n $dbConnexion = null;//close database connexion\n return $queryResult;\n}", "title": "" }, { "docid": "5a4794e7202d405fac5b9a712a11befc", "score": "0.6562301", "text": "function db_connect($query ) {\n\t$db = new mysqli(DBSERV, DBUSER, DBPASS, DBNAME);\n\t# Connect to the database and handle errors, if any.\n\tif($db->connect_errno > 0){\n\t\tdie('Unable to connect to database [' . $db->connect_error . ']');\n\t}\n\t# Run the query.\n\t$sql = $query;\n\tif(!$result = $db->query($sql)) {\n\t\tdie('There was an error running the query [' . $db->error . ']');\n\t}\n\t# Closes connection to database service.\n\t$db->close();\n\t\n\treturn $result;\n}", "title": "" }, { "docid": "c1bc041dbb62748ddd8ac0acbc63a10b", "score": "0.655429", "text": "abstract public function query($sql);", "title": "" }, { "docid": "c1bc041dbb62748ddd8ac0acbc63a10b", "score": "0.655429", "text": "abstract public function query($sql);", "title": "" }, { "docid": "3f3fc87bf22bb41f39b2f0ebe9839441", "score": "0.6550358", "text": "public abstract function connect($h,$u,$p,$db);", "title": "" }, { "docid": "421ebd9ae6dff1c6027b5949476647c9", "score": "0.6549259", "text": "function executeQuary($sql)\n\t{\t\t\n\t \tglobal $dbServer;\n\t \tglobal $dbUser;\n\t \tglobal $dbPassword;\n\t \tglobal $dbSchemeSelect;\n\t \t$db = mysql_connect($dbServer,$dbUser,$dbPassword) or die('error message');\n\t\t$Bool_val=mysql_select_db($dbSchemeSelect,$db);\n\t\t$result = mysql_query($sql,$db); \n\t\treturn $result;\n\t}", "title": "" }, { "docid": "7b60dc1871b01371c258b6d779324a89", "score": "0.65449405", "text": "private function query($query){\r\n\t\t$conn = $this->connect();\r\n\t\t\r\n\t\t//Query database\r\n\t\t$result = $conn->query($query);\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "75b9748bc6da11cd630e30da8b0faee5", "score": "0.65429723", "text": "public function query($sql);", "title": "" }, { "docid": "75b9748bc6da11cd630e30da8b0faee5", "score": "0.65429723", "text": "public function query($sql);", "title": "" }, { "docid": "5af139fe77d4f91577173c7cec8dc8b2", "score": "0.65275586", "text": "abstract protected function connectDB();", "title": "" }, { "docid": "20d707c0ecc9c9f8b49f64e235252e49", "score": "0.65207595", "text": "function getResultFromSql($query){\n $db = connect();\n return $db->query($query);\n}", "title": "" }, { "docid": "bc37824fa0871cca71e0093d5aa93ec2", "score": "0.6520096", "text": "function connection_query(){\n\t//Change the scope of the variables.\n\tglobal $user, $password, $db, $url_db;\n\n\t//Connect to the database.\n\t$con = mysqli_connect($url_db,$user,$password, $db);\n\n\tif (mysqli_connect_errno()) {\n \t\t echo \"Failed to connect to MySQL: \" . mysqli_connect_error();\n\t}\n\n\t//We return the connection.\n\treturn $con;\n\n\n}", "title": "" }, { "docid": "a6d504b6f8386e4b1314c9ed7af06d15", "score": "0.65199625", "text": "private function ExecuteQuery($query = \"\") { \n if($this->dbContext == null) {\n $this->dbContext = new DBConnection();\n }\n return $this->dbContext->ExecuteQuery($query);\n }", "title": "" }, { "docid": "a57159b07659397ee813940bad4d1972", "score": "0.6508156", "text": "public function execute($query){\n\t\t$this->con->query($query);\n\t}", "title": "" }, { "docid": "b919ffd50c53799d557bcb7d5ea3ad15", "score": "0.6507454", "text": "function query($query) {\n\t// success or FALSE on failure\n\t\tif(!$this->dbp)\t\t\t\t// if the connection has not been established, attempt to establish it\n\t\t\t$this->connect();\n\t\t\n\t\t$this->query = $query;\n\t\treturn $this->execute();\n\t}", "title": "" }, { "docid": "b4c7da7d4a28fc45582cae8014756ddf", "score": "0.65028405", "text": "public function execute()\n\t{\n\t\t$query = $this->_buildQuery();\n\t\treturn \\P3::getDatabase()->exec($query);\n\t}", "title": "" }, { "docid": "fd0adf4e3c115642f94f270fd689fd9e", "score": "0.64913917", "text": "function db_connection($query) {\r\n \t$con = mysqli_connect('**************','***********','**********','**********') \r\n \tOR die( 'Could not connect to database.');\r\n \t//Retorna los resultados de la solicitud SELECT de la base de datos.\r\n \treturn mysqli_query($con, $query);\r\n }", "title": "" }, { "docid": "dd37b61ad1eec6de4d47b2efbd637bce", "score": "0.6486802", "text": "function connect() {\n\n\t\t$config = $this->config;\n\t\t//$connect = $config['connect'];\n\t\t//$this->connection = $connect(\"host='{$config['host']}' port='{$config['port']}' dbname='{$config['database']}' user='{$config['login']}' password='{$config['password']}'\");\n\t\t\n\t\t$conn = \"host='{$config['host']}' port='{$config['port']}' dbname='{$config['database']}' \";\n\t\t$conn .= \"user='{$config['login']}' password='{$config['password']}'\";\n\n\t\tif (!$config['persistent']) {\n\t\t\t$this->connection = pg_connect($conn, PGSQL_CONNECT_FORCE_NEW);\n\t\t} else {\n\t\t\t$this->connection = pg_pconnect($conn);\n\t\t}\n\t\t$this->connected = false;\n\n\t\tif ($this->connection) {\n\t\t\t$this->connected = true;\n\t\t\t$this->_execute(\"SET search_path TO \" . $config['schema']);\n\t\t} else {\n\t\t\t$this->connected = false;\n\t\t}\n\t\tif (!empty($config['encoding'])) {\n\t\t\t$this->setEncoding($config['encoding']);\n\t\t}\n\n\t\treturn $this->connected;\n\t}", "title": "" }, { "docid": "89e0c1f2da0ebdf22b539dd1a00195fe", "score": "0.64709866", "text": "function run_query($sql)\n {\n // $con = mysqli_connect('sql7.freemysqlhosting.net', 'sql7349909', '23WgS9BkN3', 'sql7349909');// Online Database\n //$con = mysqli_connect('db4free.net', 'root', '', 'awesome_shop'); //Localhost Database\n // $con = mysqli_connect('localhost', 'root', '', 'awesome_shop');\n\n $con = mysqli_connect('68.183.118.104', 'virak', 'VIRAKseam33@gic', 'awesome_shop'); //Localhost Database\n \n \n $result = mysqli_query($con, $sql);\n mysqli_close($con);\n return $result;\n }", "title": "" }, { "docid": "3039523207346b14d6df22e5e2e1c472", "score": "0.6467083", "text": "function db_execute($sql) {\n db_connect();\n global $conn;\n return mysqli_query($conn, $sql);\n }", "title": "" }, { "docid": "fa9a6bfe40b358ebcda4c9e189283473", "score": "0.64654195", "text": "public function QueryManager() {\n $this->dbconn = new Connect(); \n }", "title": "" }, { "docid": "223528b4b7a02afc04678d682752ff35", "score": "0.64546573", "text": "private function getConnection(){}", "title": "" }, { "docid": "2ec023bf598b8f4039ca303a1f394972", "score": "0.6451005", "text": "function vQuery($query)\n{\nif(!isset($db_Link))\n$db_Link = \tconnect();\n$temp = mysql_query($query, $db_Link) or die('Error: ' . mysql_error());\n}", "title": "" }, { "docid": "b7ad67aa6eb1d8c052bb749e1cfc5fc8", "score": "0.6446182", "text": "function d4l_ExecQuery($sql){\n\tglobal $conn;\n\t$conn = db_connect_mysqli();\n\n\t//Return the resultset\n\treturn @mysqli_query($conn, $sql);\n}", "title": "" }, { "docid": "1cb1c9403bfc0849b32cd2cd03d06315", "score": "0.64452565", "text": "public function execute() {\n\t\t\t//Make sure there is a connection\n\t\t\tif(!$this->mysql_connect)\n\t\t\t\t$this->setMysqlConnection();\n\t\t\ttry\n\t\t\t{\n\t\t\t\t//Query the databse\n\t\t\t\t$this->result = $this->mysql_connect->query($this->query);\n\t\t\t\t//If error, then log that error and throw Exception\n\t\t\t\tif(mysqli_errno($this->mysql_connect))\n\t\t\t\t{\n\t\t\t\t\t$this->debug(\"MySQL ERROR: \" . mysqli_error($this->mysql_connect) . \"\\r\\n\" . $this->query);\n\t\t\t\t\tthrow new Exception(mysqli_error($this->mysql_connect), mysqli_errno($this->mysql_connect));\n\t\t\t\t}\n\n\t\t\t\t$this->numRows = $this->mysql_connect->affected_rows;\n\t\t\t\t// Clear the stored query\n\t\t\t\t$this->query = null;\n\t\t\t} catch (Exception $ex) {\n\t\t\t\tthrow new Exception($ex->getMessage());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "00faae4b59358d7f73ebbf3d9d43196c", "score": "0.6444046", "text": "abstract public function connection();", "title": "" }, { "docid": "ffac817164ca67b82968d7a592bd17f6", "score": "0.64434505", "text": "function query($sql);", "title": "" }, { "docid": "ea40744e7623ac4110eebae73eb041b4", "score": "0.64429224", "text": "function exec_query( $query )\n\t{\n\t\tswitch($this->dbtipo){\n\t\t\tcase \"MySql\":\n\t\t\t\t$this->result = @mysql_query($query);\n\n\t\t\t\tif($this->result==false){\n\t\t\t\t\techo \"Errore nella query: $query\";\n\t\t\t\t\techo mysql_error();\n\t\t\t\t\tregistraError(\"exec_query\", mysql_error(), $query);\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase \"MsSql\":\n\t\t\t\treturn mysql_query($query);\n\t\t\tbreak;\n\t\t\tcase \"PostgreSql\":\n\t\t\t\treturn pg_query($query);\n\t\t\tbreak;\n\t\t\tcase \"Oracle\":\n\t\t\t\t// $this->connessione rappresenta il cursore, non la connessione!!\n\t\t\t\treturn ora_do($this->connessione, $query);\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "1f7dc43bcb6cb7640c7a51904cec03c4", "score": "0.644092", "text": "abstract public function query ($sql);", "title": "" }, { "docid": "c050c604062d78f85d5664d1295ef8a3", "score": "0.64358896", "text": "abstract function execute();", "title": "" }, { "docid": "82c926215e06845a60194955c999a3b7", "score": "0.64268786", "text": "function runquery($query) {\n $con = mysqli_connect(\"localhost\",\"paybay_main\",'ZSE$6tfc',\"paybay_main\");\n return mysqli_query($con, $query);\n }", "title": "" }, { "docid": "ad24cf8c3e09d314be2dbd68f153f1d3", "score": "0.6424678", "text": "function query($query)\n\t{\n\t\tglobal $connection;\n\t\t$resuts = $connection->query($query);\n\t\treturn $resuts;\n\t\t$connection->close();\n\n\t}", "title": "" }, { "docid": "c1a0c44ce12d0333a6afd37e3ef0baba", "score": "0.6421208", "text": "function connect($host,$user,$pass,$dbName);", "title": "" }, { "docid": "8e53635cff1a1d7b5c2f7da73c5dd44b", "score": "0.6420762", "text": "public function execute($sql);", "title": "" }, { "docid": "8e53635cff1a1d7b5c2f7da73c5dd44b", "score": "0.6420762", "text": "public function execute($sql);", "title": "" }, { "docid": "8e53635cff1a1d7b5c2f7da73c5dd44b", "score": "0.6420762", "text": "public function execute($sql);", "title": "" }, { "docid": "d9fc6f001984a94d6911c26b73201787", "score": "0.64192516", "text": "private function query($query)\n \t{\n \t\t$this->db->connect();\n\t\t$res = $this->db->query($query);\n\n\t\treturn $res;\n \t}", "title": "" }, { "docid": "c3d6916805924ac51a78852e272b9d98", "score": "0.64180225", "text": "function qy($sql){\r\n\t\t$conn = connect();\r\n\t\t$result = $conn->query($sql);\r\n\t\tif($result === FALSE){\r\n\t\t\techo \"ERROR: \" . $conn->error . \"<br>\";\r\n\t\t}\r\n\t\t$conn->close();\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "432dc606314be612a70a3253301e2273", "score": "0.64150023", "text": "function sql($query){\n $servername = \"localhost\";\n $username = \"root\";\n $password = \"\";\n $dbname = \"soap\";\n\n //codigo para conexion a base de datos\n $conn = new mysqli($servername, $username, $password,$dbname);\n\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }else{\n $this->result = $conn->query($query);\n return true;\n }\n\n $conn->close();\n }", "title": "" }, { "docid": "1bf03591a450c5c29781d64fa02529fb", "score": "0.64088815", "text": "public function query() {\n // com passagem de parâmetros ($parameters, $page, $rows)\n $result = $this->getDb()->executeQuery(\"select idUsuario from usuario where idUsuario > ?\", 100, 3, 5);\n // usando encadeamento\n $query = $this->getDb()->getQueryCommand(\"select idUsuario from usuario where idUsuario > ?\")->setParameters(100)->setRange(3, 5);\n $result = $query->getResult();\n }", "title": "" }, { "docid": "b714acb1d7d102375425db729e1fd5b0", "score": "0.6403559", "text": "public function query() {\n\n }", "title": "" }, { "docid": "8bb040070bfb59716c392e0f6f26020c", "score": "0.63977534", "text": "function executeQuery($query) {\r\n\t\t\t//print $query;\r\n\t\t\tif($this->isConnected()) {\r\n\t\t\t\tif (is_Object($query) && is_a($query, \"databasequery\")) {\r\n\t\t\t\t\t$sqlQuery = $this->buildQuery($query);\r\n\t\t\t\t\t//print \"<B>Nieuwe Query: \".$sqlQuery.\"</B><BR />\\n\";\r\n\t\t\t\t\t//return false;\r\n\t\t\t\t}\telse {\r\n\t\t\t\t\t$sqlQuery = $query;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$result = @mysql_query($sqlQuery, $this->privateVars['link']);\r\n\t\t\t\t$GLOBALS['queriesExecuted']++;\r\n\t\t\t\tif($result) {\r\n\t\t\t\t\tglobal $language;\r\n\t\t\t\t\t$resultset = new MySQLResultset($result, $this, $sqlQuery);\r\n\t\t\t\t\t//$resultset->setLanguage($language->getDictionary());\r\n\t\t\t\t\t$resultset->setInsertID(mysql_insert_ID($this->privateVars['link']));\r\n\t\t\t\t\treturn $resultset;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprint \"(<b>\".$sqlQuery.\"</b>) - \";\r\n\t\t\t\t\ttrigger_error(\"Query niet gelukt! (<b>\".mysql_error($this->privateVars['link']).\"</b>)\", E_USER_ERROR);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "title": "" }, { "docid": "cccf635f80d276b873a66c26b3fff7cc", "score": "0.63950676", "text": "function execute($sql)\n{\n\t// open connection to database\n\t$con = mysqli_connect(HOST, USERNAME, PASSWORD, DATABASE);\n\t//insert, update, delete\n\tmysqli_query($con, $sql);\n\n\tif ($con->error) {\n\t\tdie(\"Connection failed: \" . mysqli_error($con));\n\t}\n\t\n\t//close connection\n\tmysqli_close($con);\n}", "title": "" }, { "docid": "9d0f8291063b8dc39a57f88e6e29cc5b", "score": "0.6394821", "text": "function sql_query( $query )\r\n\t{\r\n\t\t$servername=\"\";\r\n$username=\"\";\r\n$password=\"\";\r\n$dbname=\"\";\r\n\t\tinclude 'connection.php';\r\n\t\t$con = mysqli_connect($servername, $username, $password, $dbname);\r\n\t\tif (mysqli_connect_errno($con))\r\n\t\t{\r\n\t\t\tdb_failure();\r\n\t\t}\r\n\t\t$result = mysqli_query($con,$query);\r\n\t\t//echo(\"Error description: \" . mysqli_error($con));\r\n\t\tmysqli_close($con);\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.6382654", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.6382654", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.6382654", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.6382654", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.6382654", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.6382654", "text": "abstract public function execute();", "title": "" }, { "docid": "778a56a5e989db2f64897cce2630ebe3", "score": "0.6381787", "text": "public function doConnect(){\n\t\tglobal $gl_MysqliObj;\n\n\t\t$gl_MysqliObj = new mysqli( $this->mHost, $this->mUser, $this->mPass, $this->mDbName );\n\t\tif( $gl_MysqliObj->connect_errno ){\n\t\t\t$this->mIsSuccess\t= false;\n\t\t\tthrow new Exception( _EX.'DB Connection Error: '.$gl_MysqliObj->connect_errno.'. '.$gl_MysqliObj->connect_error );\n\t\t}else{\n\t\t\t$this->mIsSuccess\t= true;\n\t\t}\n\n\t\t$sql = 'SET NAMES utf8';\n\t\t$result = $gl_MysqliObj->query( $sql );\n\t}", "title": "" } ]
e9f4a95ff9db5d3f51ad554cd9004dda
function to test get all hotels By Status Code
[ { "docid": "855d26363e6e82984c60574eef261264", "score": "0.58102083", "text": "public function testGetAllHotelsByCitySuccessfully()\n {\n $data = [\n \"city_name\" => \"cairo\"\n ];\n $this->json('POST', 'api/v1/hotel_city', $data, ['Accept' => 'application/json'])\n ->assertStatus(200);\n\n }", "title": "" } ]
[ { "docid": "cda05ccad38bde9746aa06697e735f0c", "score": "0.6394638", "text": "public function test_get_status_by_code()\n {\n $this->assertEquals(OrderStatus::getStatus(0),'PENDING');\n $this->assertEquals(OrderStatus::getStatus(1),'DELIVERING');\n $this->assertEquals(OrderStatus::getStatus(2),'COMPLETED');\n $this->assertEquals(OrderStatus::getStatus(-1),'CANCELLED');\n }", "title": "" }, { "docid": "bf1def83935d80250c7a0ac87fec31b0", "score": "0.63028526", "text": "private function get_hotel_list(){ \n $hotelAvail = new SabreHotelAvail();\n\n return $hotelAvail->get_response(); \n }", "title": "" }, { "docid": "245c8aada7f442e15949845c3a11ebcf", "score": "0.606586", "text": "public function getTestStatusCodes();", "title": "" }, { "docid": "371d4b84d224bbc932b39b748335ac31", "score": "0.59390086", "text": "public function testGetAllHotelByRangeSuccessfully()\n {\n $data = [\n \"balanceMin\" => 400,\n \"balanceMax\" => 1000\n\n ];\n\n $this->json('POST', 'api/v1/hotel_range', $data, ['Accept' => 'application/json'])\n ->assertStatus(200);\n\n }", "title": "" }, { "docid": "ee90e5bd8b616bdaa65c3a068a9d085b", "score": "0.588853", "text": "public function testGetAllUserByHotelNameSuccessfully()\n {\n $data = [\n \"hotel_name\" => \"Annalise\"\n ];\n $response= $this->json('POST', 'api/v1/hotel_name', $data, ['Accept' => 'application/json'])\n ->assertStatus(200);\n\n\n }", "title": "" }, { "docid": "56593220895ead0eca4fba53d8256e96", "score": "0.5850039", "text": "public function togetAllTechexplorersDataStatusByAsc() {\r\n $tablename = 'tech_explorers';\r\n $AllTechexplorerData = $this->Global_model->getAllDataStatusByAsc($tablename);\r\n if (isset($AllTechexplorerData) && !empty($AllTechexplorerData)) {\r\n echo json_encode($AllTechexplorerData);\r\n exit;\r\n } else {\r\n echo 'fail';\r\n exit;\r\n }\r\n }", "title": "" }, { "docid": "066f019675f8dfd082588c866d243827", "score": "0.58287024", "text": "public function testCodesWithSpecialOffers(){\n \n $this->json('GET', '/api/v1/voucher/eddynikoi@gmail.com', [])\n ->seeJson([\n 'responseCode' => \"200\",\n 'responseMessage' => \"Voucher codes with their Special Offers fetched successfully\",\n ]);\n \n }", "title": "" }, { "docid": "c51f760924625642180edf1b76572fb2", "score": "0.5827333", "text": "public function test_responce_code_usage_for_200()\n {\n $result = web_service::response_code(200);\n\n $this->assertInternalType('array', $result);\n $this->assertArrayHasKey('status', $result);\n $this->assertTrue($result['status']);\n }", "title": "" }, { "docid": "700e1b5f01ce037900fa0086f2c6ae44", "score": "0.57661474", "text": "public function testGetStatus()\n {\n $client = new Client();\n\n $response = $client->request('get', 'http://www.3tempo.co.kr/product/list.html?cate_no=25');\n\n $this->assertEquals(200,$response->getStatusCode());\n }", "title": "" }, { "docid": "86857e9e368282e924d16910e8c7dcb7", "score": "0.5573163", "text": "public function testGetListStatus()\n\t {\n\t \t$this->testAllListsStatus(); \t\n\t \techo \"\\n ===testGetListStatus===\";\n\t \t//$client = new GuzzleHttp\\Client();\n\t \t$client = new \\GuzzleHttp\\Client(['defaults' => ['verify' => false]]);\n\t \t$request = $client->createRequest('GET', 'https://localhost/todolist_wine/api/v1/categories/'.$this->categoryId.'/lists/'.$this->listId);\n\t \t// Set a single value for a header\n\t \t$request->setHeader('Authorization', $this->apiKey);\n\t \t//echo $request->getHeader('Authorization');\n\t \t$response = $client->send($request);\n\t \t//echo $response->getStatusCode();\n\t \t//echo $response->getEffectiveUrl();\n\n\t \t$this->assertEquals($response->getStatusCode(), 200);\n\t \techo $jsonRes = $response->getBody();\t\n \t$obj = json_decode($jsonRes);\n \t$this->listId = $obj->id;\n\t }", "title": "" }, { "docid": "7161ff000067c72601dd4ff31e8f7f7a", "score": "0.5569328", "text": "public function testGetAllEN()\n {\n $httpStatusCode = $this->HTTPStatusCode;\n\n $this->assertInternalType(\n 'array',\n $httpStatusCode::getAll()\n );\n }", "title": "" }, { "docid": "5569089f67b4a8792f13ad3ecf9f15a3", "score": "0.55440897", "text": "public function testCountriesEndpointStatusIs200()\n {\n $response = $this->get('/countries');\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "cd04a8ad3c7a0903bbd787e2ffcc84bc", "score": "0.5514354", "text": "public function togetAllTechexplorersDataStatus() {\r\n $tablename = 'tech_explorers';\r\n $AllTechexplorerData = $this->Global_model->getAllDataStatus($tablename);\r\n if (isset($AllTechexplorerData) && !empty($AllTechexplorerData)) {\r\n echo json_encode($AllTechexplorerData);\r\n exit;\r\n } else {\r\n echo 'fail';\r\n exit;\r\n }\r\n }", "title": "" }, { "docid": "7587da652bddf7090bbdb25c42d994e4", "score": "0.55037194", "text": "public function test_getflavors()\n {\n $response = $this->getJson('/api/flavors/?page=1');\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "8f06d1dc1cc7960296f8d913ad789b22", "score": "0.54930955", "text": "public function testAllListsStatus()\n\t {\n\t \t$this->testGetCategoryStatus(); \t\n\t \techo \"\\n ===testAllListsStatus===\";\n\t \t//$client = new GuzzleHttp\\Client();\n\t \t$client = new \\GuzzleHttp\\Client(['defaults' => ['verify' => false]]);\n\t\n\t \t$request = $client->createRequest('GET', 'https://localhost/todolist_wine/api/v1/categories/'.$this->categoryId.'/lists');\n\t \t// Set a single value for a header\n\t \t$request->setHeader('Authorization', $this->apiKey);\n\t \t//echo $request->getHeader('Authorization');\n\n\t \t$response = $client->send($request);\n\t \t//echo $response->getStatusCode();\n\t \t//echo $response->getEffectiveUrl();\n\t \t\n\t \t$this->assertEquals($response->getStatusCode(), 200);\n\t \techo $jsonRes = $response->getBody();\n\t $rest = $jsonRes->__toString();\n $array = json_decode($rest, true);\t \n\t echo $this->listId = $array['lists'][0]['id'];\t\n\t }", "title": "" }, { "docid": "d0d91b96a8143b92021743c9bc75b4e1", "score": "0.54872704", "text": "public function testGETAlerts()\n {\n }", "title": "" }, { "docid": "9e3adf9f7f5f3c81ef582a4e90b694d6", "score": "0.5457011", "text": "public function test_list_Lead_status()\n {\n $data = factory(LeadStatus::class)->create();\n $response = $this->get($this->url, $this->headers()); //->dump() see uot the code for error\n $response->assertStatus(200);\n $response->assertJsonStructure(array_keys($data->toarray()), $data->toarray());\n $this->assertDatabaseHas($this->table, $data->toarray());\n }", "title": "" }, { "docid": "f96fb046c2227cd8478cd6553940b269", "score": "0.54496324", "text": "public function can_return_villages()\n {\n factory(\\App\\Country::class, 1)->create();\n factory(\\App\\Region::class, 1)->create();\n factory(\\App\\Province::class, 1)->create();\n factory(\\App\\City::class, 1)->create();\n\n $village = factory(\\App\\Village::class, 2)->create();\n\n $response = $this->getJson($this->route);\n\n $response->assertJsonStructure([\n 'success', 'villages'\n ]);\n\n $data = $response->json('villages');\n\n $this->assertEquals(collect($data)->count(), $village->count());\n\n $response->assertOk();\n }", "title": "" }, { "docid": "9ba53d69e63499d9e66fcef8817336a8", "score": "0.5415253", "text": "public function getHotel();", "title": "" }, { "docid": "42df383ceb7efb39627fc9d7aa542833", "score": "0.5414698", "text": "function getHostStatus()\n {\n $url = $this->getConf('icingaApiUrl').\"host/filter[AND(HOST_CUSTOMVARIABLE_NAME|=|trafficManager)]/columns[HOST_NAME|HOST_CURRENT_STATE|HOST_OUTPUT|HOST_LAST_CHECK|HOST_NEXT_CHECK|HOST_CUSTOMVARIABLE_NAME|HOST_CUSTOMVARIABLE_VALUE]/authkey=\".$this->getConf('icingaAuthKey').\"/json\";\n\n\n //A number that corresponds to the current state of the host: 0=UP, 1=DOWN, 2=UNREACHABLE.\n $response = file_get_contents($url);\n $results = json_decode ($response,true);\n\n return $results['result'];\n\n }", "title": "" }, { "docid": "0c41fdd103787212c35279286fc8c799", "score": "0.54090804", "text": "abstract public function get_status();", "title": "" }, { "docid": "e3300532b82d1fde5c590424f1c7c935", "score": "0.5402363", "text": "public function testGETAddressesAgents()\n {\n }", "title": "" }, { "docid": "0b2292f3d1aa30780c7e53c130ffcacb", "score": "0.53962255", "text": "public function testGetAllES()\n {\n $httpStatusCode = $this->HTTPStatusCode;\n\n $this->assertInternalType(\n 'array',\n $httpStatusCode::getAll('es')\n );\n }", "title": "" }, { "docid": "e7a79240b2200a44e47f545c8188bc3d", "score": "0.53829896", "text": "public function testGetAllOffersUsingGET()\n {\n }", "title": "" }, { "docid": "ba32147dbcb3cd621259bd31858e6cfa", "score": "0.53721964", "text": "public function testSearchPayloadHistoryByStatusFeature()\n {\n $user = factory(User::class)->create();\n $webhook = factory(Webhook::class)->create(['user_id' => $user->id]);\n $expectPayloadHistory = factory(PayloadHistory::class)\n ->create(['webhook_id' => $webhook->id, 'status' => PayloadHistoryStatus::FAILED]);\n factory(PayloadHistory::class)->create(['webhook_id' => $webhook->id, 'status' => PayloadHistoryStatus::SUCCESS]);\n $searchParams = ['search' => ['status' => 'FAILED']];\n\n $this->actingAs($user);\n $response = $this->get(route('history.index', $searchParams));\n $responsePayloadHistories = $response->getOriginalContent()->getData()['payloadHistories'];\n $response->assertStatus(200);\n $response->assertViewHas('payloadHistories');\n $this->assertCount(1, $responsePayloadHistories);\n $this->assertEquals($expectPayloadHistory->id, $responsePayloadHistories[0]->id);\n }", "title": "" }, { "docid": "288402e872d8afe023d3b2bd4a59f8b3", "score": "0.5344014", "text": "function getHostStatusSummary(){\n $url = $this->getConf('icingaApiUrl').\"host/filter[AND(HOST_CUSTOMVARIABLE_NAME|=|trafficManager)]/columns[HOST_NAME|HOST_CURRENT_STATE|HOST_OUTPUT|HOST_LAST_CHECK|HOST_NEXT_CHECK|HOST_CUSTOMVARIABLE_NAME|HOST_CUSTOMVARIABLE_VALUE]/authkey=\".$this->getConf('icingaAuthKey').\"/json\";\n\n\n //A number that corresponds to the current state of the host: 0=UP, 1=DOWN, 2=UNREACHABLE.\n $response = file_get_contents($url);\n $results = json_decode ($response,true);\n\n\n //devolver HostUP, HostDown, FilUP, FailDown\n\n $result= array('UP' => 0, 'DOWN' => 0,'FAILUP' => 0,'FAILDOWN' => 0);\n\n foreach ($results['result'] as $host){\n\tif (strpos($host['HOST_NAME'],'_failover') !== false){//es el host de failover\n\t if ($host['HOST_CURRENT_STATE'] == 0){\n\t\t$result['FAILUP'] = $result['FAILUP'] + 1;\n\t }else{\n\t\t$result['FAILDOWN'] = $result['FAILDOWN'] + 1;\n\t }\n\t}else{\n\t if ($host['HOST_CURRENT_STATE'] == 0){\n\t\t$result['UP'] = $result['UP'] + 1;\n\t }else{\n\t\t$result['DOWN'] = $result['DOWN'] + 1;\n\t }\n\t}\n }\n\n return $result;\n\n}", "title": "" }, { "docid": "2e373909d914f8f095bf4037dde4c249", "score": "0.5336869", "text": "public function test_show_all()\n {\n $response = $this->get('/office/all');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "5b2b2a426361bb76fc4e87645c48bbdd", "score": "0.5328894", "text": "public function testStatusCodeForTrends()\n {\n $response = $this->json('GET', '/api/statistics/trends');\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "64b6cfde2b26c498a576b284f04849d3", "score": "0.5326561", "text": "public static function findByStatus()\n {\n $entityManager = Service_Doctrine2Bootstrap::createEntityManager();\n\n $status = 'OPEN';\n Service_Console::log();\n Service_Console::log('Retreiving Bugs by status [' . $status . '] ..');\n Service_Console::log();\n\n /** @var Model_Bug[] $bugs */\n $bugs = $entityManager->getRepository('Model_Bug')->findBy(\n array(\n 'status' => $status,\n )\n );\n Service_Console::log('<b>found [' . count($bugs) . '] bugs with status [' . $status . ']:</b>', Service_Console::COLOR_GREEN);\n Service_Console::log();\n\n foreach ($bugs as $bug) {\n Service_Console::log(\n '<b>Bug id ['\n . $bug->getId()\n . '] description ['\n . $bug->getDescription()\n . '] reporter name ['\n . $bug->getReporter()->getName()\n . '] assignee name ['\n . $bug->getEngineer()->getName() . ']</b>',\n Service_Console::COLOR_GREEN\n );\n }\n Service_Console::log();\n\n Service_Action::perform(Service_Action::ACTION_0_SHOW_MAIN_MENU);\n }", "title": "" }, { "docid": "e30d9a0dd48a192aad35c947d8ba4d9f", "score": "0.5321955", "text": "public function findOrdersByStatus()\n {\n $input = Request::all();\n\n //path params validation\n\n\n //not path params validation\n if (!isset($input['status'])) {\n throw new \\InvalidArgumentException('Missing the required parameter $status when calling findOrdersByStatus');\n }\n $status = $input['status'];\n\n\n return response('How about implementing findOrdersByStatus as a GET method ?');\n }", "title": "" }, { "docid": "61bc7324199ed5d23b0d4b0c5f84362e", "score": "0.5321296", "text": "private function requestStatus($code)\n\t{\n\t\t$possibleStatus = array(\n\t\t\t200=>\"OK\",\n\t\t\t404=>\"Not Found\",\n\t\t\t405=>\"Method Not Allowed\",\n\t\t\t500=>\"Internal Server Error\"\n\t\t);\n\t\t\n\t\treturn ($possibleStatus[$code]) ? $possibleStatus[$code] : $possibleStatus[500];\n\t}", "title": "" }, { "docid": "3c5f94417ba61492c0d7076d51c33c76", "score": "0.53097785", "text": "public function statusAction()\n {\n $headers = $this->_getAllHeaders();\n $auth = $headers['Authorization'];\n \n if(is_null($auth))\n {\n echo '{ statusCode: 403, error: \"Error: Authorization failed\" }';\n }else{\n $postData = file_get_contents('php://input');\n $data = json_decode($postData);\n \n if(is_null($data))\n {\n echo '{ statusCode: 403, error: \"Error: Query validation failed\" }';\n }else{\n $server = Mage::getModel('multipunkty/api_server');\n $result = $server->getPartnerStatus($auth, $data);\n \n echo $result;\n }\n }\n }", "title": "" }, { "docid": "956e6be1d67ba5c1e72d440271687f0d", "score": "0.5285452", "text": "public function testStatusCode()\n {\n $response = $this->json('GET', 'api/books/top-review');\n $response->assertStatus(Response::HTTP_OK);\n }", "title": "" }, { "docid": "fc0a25a38f3423c4bfbbc53e16972c72", "score": "0.5226904", "text": "public function testGetVouchers()\n {\n $response = $this->call('GET', 'vouchers');\n\n $this->assertEquals(200, $response->status());\n\n }", "title": "" }, { "docid": "5b5cd319777a5ac9dae33f55810629fc", "score": "0.5221058", "text": "public function testOfferListWihoutParam() {\n $client = static::createClient();\n $client->request('GET', $this->successAPI);\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "2e94ef1a21c130f280e1f6bb418c3a87", "score": "0.52061963", "text": "function listPins_wetu(){\n $LP = curlGet(\"https://wetu.com/API/Pins/4PLEDRIUFRIAMOAM/List?countries=ZA\");\n return json_decode($LP);\n}", "title": "" }, { "docid": "c0ee2673dc904cde14108ac10ca4f5dd", "score": "0.5202676", "text": "private function getStatus()\n {\n $this->curl->get($this->status_url);\n }", "title": "" }, { "docid": "09c06a11a05bd89922b0f6dd678327a4", "score": "0.520253", "text": "abstract function getResponseCode();", "title": "" }, { "docid": "9621c032f502fdb89336552a267c1522", "score": "0.51938045", "text": "function query_alert_count ($status_file_content, $service_name, $status_code) {\n $num_matches = preg_match_all(\"/servicestatus \\{([\\S\\s]*?)\\}/\", $status_file_content, $matches, PREG_PATTERN_ORDER);\n $alertcounts_objects = array ();\n $total_alerts=0;\n $alerts=0;\n foreach ($matches[0] as $object) {\n $long_out = getParameter($object, \"long_plugin_output\");\n $skip_if_match=!strncmp($long_out, PASSIVE_MODE_STR, strlen(PASSIVE_MODE_STR));\n\n if (getParameter($object, \"service_description\") == $service_name && !$skip_if_match) {\n $total_alerts++;\n if (getParameter($object, \"current_state\") >= $status_code) {\n $alerts++;\n }\n }\n }\n $alertcounts_objects['total'] = $total_alerts;\n $alertcounts_objects['actual'] = $alerts;\n return $alertcounts_objects;\n }", "title": "" }, { "docid": "0a59f970782e849c429d066f4761ff25", "score": "0.5189975", "text": "public function testGETOnboardingAccounts()\n {\n }", "title": "" }, { "docid": "448e3bcfd9effa6a6d350ab67a9d201c", "score": "0.5179839", "text": "public function index() {\n return $this->hotelRepository->allHotels();\n }", "title": "" }, { "docid": "c4dc742b7c6aaa6ba51cd8167aace157", "score": "0.5171068", "text": "public function testGetCheckAvailability()\n {\n $this->json('GET', '/booking/check-availability')\n ->seeJsonEquals([\n 'created' => true,\n ]);\n }", "title": "" }, { "docid": "4a2f93b799951e6b8d4d657a497966ed", "score": "0.51569784", "text": "public function test200Admin()\n {\n $response = $this->requestToApi(\n $this->randomAdmin(), 'GET', '/users/'. $this->randomEntrant()->id .'/alerts'\n );\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "f3d165b2127c241358a622af1bc223ec", "score": "0.5156138", "text": "private function _requestStatus($code) {\n $status = array(\n 200 => 'OK',\n 401 => 'Unauthorized',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 500 => 'Internal Server Error',\n );\n return ($status[$code]) ? $status[$code] : $status[500];\n }", "title": "" }, { "docid": "e944daee3ee5854f1da133550db7b431", "score": "0.51459837", "text": "public function test_categories_list_status()\n {\n $response = $this->get('/categories');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "2ad5925bfbe30aabffa9dd3d9008152a", "score": "0.5145154", "text": "public function listStatuses();", "title": "" }, { "docid": "c1d2289feeb42a41604225f224edae90", "score": "0.5134069", "text": "public function testAllAction()\n {\n fwrite(STDERR, \"Test ReservationAdminController::All \\r\\n\");\n $client = static::createClient();\n $url = $client->getContainer()->get('router')->generate('api_reservation_admin_all');\n $client->request('GET', $url);\n $response = $client->getResponse();\n $this->assertEquals(302, $response->getStatusCode(), sprintf('Unexpected HTTP status code for GET %s', $url));\n fwrite(STDERR, \"[DONE]:Get all reservation as anonymous impossible\\r\\n\");\n\n $client = $this->logInAsClient();\n $url = $client->getContainer()->get('router')->generate('api_reservation_admin_all');\n $client->request('GET', $url);\n $response = $client->getResponse();\n $this->assertEquals(403, $response->getStatusCode(), sprintf('Unexpected HTTP status code for GET %s', $url));\n fwrite(STDERR, \"[DONE]:Get all reservation as client impossible\\r\\n\");\n\n $client = $this->logInAsAdmin();\n $url = $client->getContainer()->get('router')->generate('api_reservation_admin_all');\n $client->request('GET', $url);\n $response = $client->getResponse();\n $this->assertEquals(200, $response->getStatusCode(), sprintf('Unexpected HTTP status code for GET %s', $url));\n fwrite(STDERR, \"[DONE]:Get all reservation as admin\\r\\n\");\n\n $content = json_decode($response->getContent(), true);\n $this->assertInternalType('array', $content);\n\n $this->assertArrayHasKey('reservations', $content, 'Response has no key call reservations');\n $this->assertArrayHasKey('data', $content['reservations'], 'Response reservation has no key call data');\n\n $last = \\count($content['reservations']['data']) - 1;\n $reservation = $content['reservations']['data'][$last];\n $this->assertArrayHasKey('id', $reservation, 'Data Reservation is supposed to have Id');\n $this->assertArrayHasKey('user', $reservation, 'Data Reservation is supposed to have User');\n $this->assertArrayHasKey('state', $reservation, 'Data Reservation is supposed to have State');\n $this->assertArrayHasKey('housing', $reservation, 'Data Reservation is supposed to have Housing');\n fwrite(STDERR, \"[DONE]: Content data are reservation with Id, User, state and Housing\\r\\n\");\n fwrite(STDERR, \"Test ReservationAdminController::All Success \\r\\n\");\n }", "title": "" }, { "docid": "5f46bb091c4e49e502220a315e624f83", "score": "0.5132302", "text": "public function testChangeListingStatusSuccessfully(){\n changeListingStatus(1, \"offline\");\n $list = getListing(1);\n $this->assertEquals($list[\"status\"], \"offline\");\n changeListingStatus(1, \"online\");\n }", "title": "" }, { "docid": "8e3d53ae1d4eddfd031a6f2c610d11e5", "score": "0.5129688", "text": "function testListarBoletasBoletas()\n {\n $response = $this->get('/api/boletas');\n\n $response->assertStatus(200);\n\n }", "title": "" }, { "docid": "0c8f627026ad65dcf1614ac5ee9d552e", "score": "0.51065576", "text": "public function status($code = NULL);", "title": "" }, { "docid": "dc04ab1ed5757eed25a6bb16c5d5e938", "score": "0.50926125", "text": "public function testSearchPayloadHistoryByWebhookAndStatusFeature()\n {\n $user = factory(User::class)->create();\n $webhook1 = factory(Webhook::class)->create(['user_id' => $user->id]);\n $webhook2 = factory(Webhook::class)->create(['user_id' => $user->id]);\n $expectPayloadHistory = factory(PayloadHistory::class)->create([\n 'webhook_id' => $webhook1->id,\n 'status' => PayloadHistoryStatus::FAILED\n ]);\n factory(PayloadHistory::class)->create([\n 'webhook_id' => $webhook2->id,\n 'status' => PayloadHistoryStatus::SUCCESS\n ]);\n $searchParams = ['search' => [\n 'status' => 'FAILED',\n 'webhook' => $webhook1->id\n ]];\n\n $this->actingAs($user);\n $response = $this->get(route('history.index', $searchParams));\n $responsePayloadHistories = $response->getOriginalContent()->getData()['payloadHistories'];\n $response->assertStatus(200);\n $response->assertViewHas('payloadHistories');\n $this->assertCount(1, $responsePayloadHistories);\n $this->assertEquals($expectPayloadHistory->id, $responsePayloadHistories[0]->id);\n }", "title": "" }, { "docid": "849f3323eb2d86864f7a828bf7ed1993", "score": "0.5087098", "text": "public function get_hotel($id);", "title": "" }, { "docid": "ad13a9f95e940a8f33cc8973bd2d6823", "score": "0.50830626", "text": "public function testSearchByStatus()\n {\n $response_mock = file_get_contents(self::$fixturesPath . 'response_one_issue_new.serialized');\n // file_put_contents($path . 'response_one_issue_new.serialized', serialize($this->response_new_issue));die;\n $command = $this->createCommand('redmine:search');\n $this->createMocks(array('redmineApiIssueAll' => unserialize($response_mock)));\n\n $input = array(\n 'command' => $this->command->getName(),\n '--project_id' => 'test_project_id',\n );\n\n $options = array('--status' => 'new');\n $this->tester->execute($input, $options);\n $res = trim($this->tester->getDisplay());\n $this->assertContains('New', $res);\n }", "title": "" }, { "docid": "914ab4dd2eb04fcdf85f0d1bacbdb77f", "score": "0.50786793", "text": "public function test_can_get_all_books()\n {\n $response = $this->get(\"$this->url\");\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "beab20404ecd9e456f22d2ea5bff587f", "score": "0.50762093", "text": "public function OFF_testIndex() \n {\n $response = $this->call('GET', 'volunteer');\n $this->assertContains('Contacts',$response->getContent());\n $crawler = $this->client->request('GET', 'volunteer');\n $this->assertTrue($this->client->getResponse()->isOk());\n $this->assertCount(1, $crawler->filter('td:contains(\"Volunteer\")'));\n }", "title": "" }, { "docid": "e11eeddfe2a3e3bd62f5633bcfc9414a", "score": "0.5076091", "text": "function FindByStatus($status){\n $reponse = $this->bdd->prepare(\"SELECT * FROM list_bugs WHERE status = :status\");\n $reponse->execute([':status' => $status]);\n while($donnees = $reponse->fetch()) { \n $bug = new Bug($donnees[\"id\"],$donnees[\"titre\"],$donnees[\"description\"],$donnees[\"createAt\"],$donnees[\"status\"],$donnees[\"url\"],$donnees[\"ip\"]);\n $this->load($bug);\n }\n $reponse->closeCursor();\n return $this->bugs; \n }", "title": "" }, { "docid": "833e4ad1f8a84505cc2e86e2c57d68c2", "score": "0.50731605", "text": "public function testGETAddressesZipcodes()\n {\n }", "title": "" }, { "docid": "0fea0b19d009ca065963d442dd10c22d", "score": "0.5068683", "text": "public function index(string $hotel)\n {\n $filters = request()->validate([\n 'from_date' => [\n 'bail',\n 'nullable',\n 'date',\n 'before_or_equal:today',\n new MinDate(),\n ],\n 'status.*' => [\n 'bail',\n 'nullable',\n 'string',\n Rule::in(Voucher::STATUS),\n ],\n 'type.*' => [\n 'bail',\n 'nullable',\n 'string',\n Rule::in(Voucher::TYPES),\n ],\n 'search' => [\n 'bail',\n 'nullable',\n 'alpha_num',\n 'max:30',\n 'min:3'\n ],\n ]);\n\n $perPage = request()->input('per_page', config('settings.paginate'));\n\n $vouchers = $this->voucher->paginate(id_decode($hotel), $perPage, $filters);\n\n return response()->json([\n 'vouchers' => $vouchers,\n ]);\n }", "title": "" }, { "docid": "6920bdbf89c0c1dad751eeae84864fc8", "score": "0.5059062", "text": "public function testExample()\n {\n // create new object from TopHotel third party class\n $topHotel = new TopHotel();\n\n // get data from service provider\n $getHotelsData = $topHotel->getHotelsData(\n \"2019-11-01\",\n \"2019-11-18\",\n \"AUH\",\n 4\n );\n\n // validate the returned data match this structure\n $this->assertArrayStructure($getHotelsData, ['*' => \n ['hotelName', 'rate', 'price', 'discount', 'amenities']\n ]);\n }", "title": "" }, { "docid": "b3bacef91966baaf4e5fc4c550011d8c", "score": "0.50527126", "text": "public function testGETOnboardingApplicationsLanguage()\n {\n }", "title": "" }, { "docid": "0a0df9ab27a5a4e3a21ebdaddd2ce35d", "score": "0.50524586", "text": "public function testGetEN()\n {\n $httpStatusCode = $this->HTTPStatusCode;\n\n $this->assertContains(\n 'OK',\n $httpStatusCode::get(200)\n );\n }", "title": "" }, { "docid": "e4a2bf9671a83ebe81d1bfc2a0b685ac", "score": "0.5049743", "text": "public function testStatusCodeForCounts()\n {\n $response = $this->json('GET', '/api/statistics/counts');\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "9c2a5a965358102dd291dada5467b5e5", "score": "0.50490654", "text": "public function testStatus200() {\n\n\t\t// Perform request\n\t\t$crawler = $this->client->request('GET', '/newtag/17/status');\n\n\t\t// Assert 200 status OK\n\t\t$this\n\t\t\t\t->assertEquals(200,\n\t\t\t\t\t\t$this->client->getResponse()->getStatusCode());\n\n\t}", "title": "" }, { "docid": "e5a9fd61bb9bd01115e3d5f9d5fa06f7", "score": "0.5045429", "text": "public function index()\n {\n return $this->hotelService->index();\n }", "title": "" }, { "docid": "405a465d565f9b9da8c4064655314dd8", "score": "0.50444305", "text": "function query_api($term, $location) { \n for($i = 20; $i<=1000; $i+=20)\n\t{\n\t\t$response = json_decode(search($term, $location, $i));\n\t\tforeach($response->businesses as $bus)\n\t\t{\n\t\t\techo $bus->name.\",\".$bus->phone.\",\";\n\t\t\tforeach($bus->categories as $catg)\n\t\t\t{\n\t\t\t\tforeach($catg as $cat)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\techo $cat.\" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \",\".$bus->display_phone.\",\";\n\t\t\tforeach($bus->location->display_address as $dir_data)\n\t\t\t{\n\t\t\t\techo $dir_data.\",\";\n\t\t\t}\n\t\t\techo \"\\n\";\n\t\t}\n\t\t//$response = search($term, $location, $i);\n\t\t//print \"$response\\n\";\n }\n\t//$business_id = $response->businesses[0]->id;\n \n /* print sprintf(\n \"%d businesses found, querying business info for the top result \\\"%s\\\"\\n\\n\", \n count($response->businesses),\n $business_id\n );*/\n \n //$response = get_business($business_id);\n \n print sprintf(\"Result for business \\\"%s\\\" found:\\n\", $business_id);\n print \"$response\\n\";\n}", "title": "" }, { "docid": "d4275f319a7057056b66c8fd3a206752", "score": "0.50393945", "text": "public function testOfferListWithParam() {\n $client = static::createClient();\n $client->request('GET', $this->successAPI.'?filter='.$this->filterType);\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "fa3b92e7f58091739648c69edf03c6c2", "score": "0.5038487", "text": "public function test_all()\n {\n $response = $this->get('/api/all');\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "aca291f95991686503db3848ed655573", "score": "0.50265896", "text": "public function testApiProdAvailabilityRouteStatusWithOrder() {\n $response = $this->call(\"GET\", \"api/v1/products-availability\", [\"order_id\" => 2, \"api_token\" => \"0g3AubZqweE81ufvZYHYQpmjdk1VzriAlyEgiOpqmBJIerMKzjNNXs4YUsTt\"]);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "be0b68a6b23ffaa464abc4a76ab7cb00", "score": "0.5023929", "text": "public function testGetStatus1_success()\n {\n $listing= new Listing('CSL123_100259', 'Hill Farm', 'Plough Hill Road', 'Nuneaton', 'CV11 6PE', 'This is a rare opportunity...', '6','355000', 'CSL123_100327_IMG_00.JPG','1','For Sale');\n $result= $listing->getStatus();\n $expected = \"For Sale\";\n $this->assertEquals($expected, $result);\n }", "title": "" }, { "docid": "8ecd6454d0e6c3cf54cbdea40492cf3e", "score": "0.5023498", "text": "public function testFailureOfferList()\n {\n $client = static::createClient();\n $client->request('GET', $this->failureAPI);\n $this->assertEquals(404, $client->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "4185caeb05cd5bee23f9e93ed5ebb636", "score": "0.50200355", "text": "public function testStatus()\n {\n $data = [\n 'id' => '222',\n 'title' => 'The Test'\n ];\n\n $listing = new ListingFeatured($data);\n //call the getStatus method\n $status = $listing->getStatus();\n\n//does getStatus method return value equal to 'featured' ?\n $this->assertEquals($status , 'featured');\n\n }", "title": "" }, { "docid": "363d7abeb31d7ebedcbfd458d8b34a4c", "score": "0.50128675", "text": "private function check_status($status) {\n if (empty($status)) return 'The status variable is emtpy!';\n if (strtoupper($status) == \"OK\") {\n return array();\n }\n if (strtoupper($status) == \"ZERO_RESULTS\") {\n return array();\n }\n if (strtoupper($status) == \"OVER_QUERY_LIMIT\") {\n return array(\"You are over your quota.\", 200);\n }\n if (strtoupper($status) == \"REQUEST_DENIED\") {\n return array(\"Your request was denied, generally because of lack of a sensor parameter.\", 300);\n }\n if (strtoupper($status) == \"INVALID_REQUEST\") {\n return array(\"The query (address) is missing.\", 400);\n }\n }", "title": "" }, { "docid": "43e96991a2cc99e3029cfb41b0fac5b9", "score": "0.5007392", "text": "public function testIndex()\n\t{\t\t\n\t\t$crawler = $this->client->request('GET',$this->router->generate('ws_alerts_index'));\n\t\t$this->assertEquals(3,$crawler->filter('.row-alert')->count());\t\t\n\t\t$this->assertEquals(2,$crawler->filter('.row-alert-active')->count());\n\t\t$this->assertEquals(1,$crawler->filter('.row-alert-pending')->count());\n\t}", "title": "" }, { "docid": "446a41219b25f01c72476c94de432412", "score": "0.50067055", "text": "function onlineserver_CheckAvailability($params)\n{\n // user defined configuration values\n $url = $params['Url'];\n $username = $params['Username'];\n $password = $params['Password'];\n\n //return false;\n // availability check parameters\n $searchTerm = $params['searchTerm'];\n $punyCodeSearchTerm = $params['punyCodeSearchTerm'];\n $tldsToInclude = $params['tldsToInclude'];\n $isIdnDomain = (bool) $params['isIdnDomain'];\n $premiumEnabled = (bool) $params['premiumEnabled'];\n\n $sld=$params['sld'];\n $tld=$params['tldsToInclude'][0];\n if ($tld){\n //var_dump($params);\n $postfields=[\n 'username'=>$username,\n 'password'=>$password,\n 'data'=>[\n 'domain' => array(\n 'name' => $sld,\n 'extension' => ltrim($tld,'.')\n )\n ]\n ];\n\n try {\n $api = new ApiClient();\n $api->call('checkDomainRequest', $postfields);\n\n\n $results = new ResultsList();\n foreach ($api->results as $domain) {\n\n\n $domain_sld = explode('.', $domain['domain'])[0];\n $domain_tld = substr(str_replace($domain_sld, '', $domain['domain']), 1);\n\n // Instantiate a new domain search result object\n $searchResult = new SearchResult($domain_sld, $domain_tld);\n\n // Determine the appropriate status to return\n if($domain['status'] == 'free')\n $status = SearchResult::STATUS_NOT_REGISTERED;\n else\n $status = SearchResult::STATUS_REGISTERED;\n\n $searchResult->setStatus($status);\n\n // Return premium information if applicable\n /*if ($domain['isPremiumName']) {\n $searchResult->setPremiumDomain(true);\n $searchResult->setPremiumCostPricing(\n array(\n 'register' => $domain['premiumRegistrationPrice'],\n 'renew' => $domain['premiumRenewPrice'],\n 'CurrencyCode' => 'USD',\n )\n );\n }*/\n\n // Append to the search results list\n $results->append($searchResult);\n }\n\n return $results;\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n }\n}", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.500612", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.500612", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.500612", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.500612", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.500612", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.500612", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.500612", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.500612", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.500612", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.500612", "text": "public function getStatus();", "title": "" }, { "docid": "2403c6330937b00b5cc9a02782073d46", "score": "0.5002324", "text": "public function getAllJoinedRoomGuest($status)\n {\n // Database querycom\n $this->db->query('SELECT rooms.number, rooms.category, rooms.status, guests.id AS guest_id, invoices.number AS invoice_number FROM rooms INNER JOIN guests ON guests.room_number = rooms.number INNER JOIN invoices ON invoices.guest_id = guests.id WHERE rooms.status = :status');\n // Bind values\n $this->db->bind(':status', $status);\n // Return records \n $results = $this->db->resultSet();\n\n return $results;\n }", "title": "" }, { "docid": "d9efa12195e682a8052bc5dbb553f326", "score": "0.5001595", "text": "public function test_responce_code_usage_for_400()\n {\n $result = web_service::response_code(400);\n\n $this->assertInternalType('array', $result);\n $this->assertArrayHasKey('status', $result);\n $this->assertFalse($result['status']);\n }", "title": "" }, { "docid": "be88463c5f4250d3664a3aa7e5bb5130", "score": "0.4999183", "text": "public function getResponseCode();", "title": "" }, { "docid": "be88463c5f4250d3664a3aa7e5bb5130", "score": "0.4999183", "text": "public function getResponseCode();", "title": "" }, { "docid": "6098570e3f580d67767f249ab0589ce4", "score": "0.4994141", "text": "public function testMethod()\n{\n $this->call('GET','/json/expos');\n\n $this->assertResponseStatus(200);\n}", "title": "" }, { "docid": "149a739b9f371db94f21b37bf50c8129", "score": "0.49933484", "text": "public function getAllEmergencyWithHomeowner();", "title": "" }, { "docid": "2929817ad828692b9016fa4ef99b41c4", "score": "0.49912643", "text": "public function getStatus()\n {\n $users = DB::table('absent_status')->get();\n $response = new MyResponse(ErrorCode::$OK, ErrorDesc::$OK, $users );\n return $response->get();\n }", "title": "" }, { "docid": "068caaea7420b3091a7d92319b9be5e1", "score": "0.49910498", "text": "function query_host_count ($status_file_content, $status_code) {\n $num_matches = preg_match_all(\"/hoststatus \\{([\\S\\s]*?)\\}/\", $status_file_content, $matches, PREG_PATTERN_ORDER);\n $hostcounts_object = array ();\n $total_hosts = 0;\n $hosts = 0;\n foreach ($matches[0] as $object) {\n $total_hosts++;\n if (getParameter($object, \"current_state\") == $status_code) {\n $hosts++;\n }\n }\n $hostcounts_object['total'] = $total_hosts;\n $hostcounts_object['actual'] = $hosts;\n return $hostcounts_object;\n }", "title": "" }, { "docid": "147b7080c1a16e5f43833eb870a9d5da", "score": "0.4983478", "text": "public function testApiProdAvailabilityRouteStatusNoOrder() {\n $response = $this->call(\"GET\", \"api/v1/products-availability\", [\"api_token\" => \"0g3AubZqweE81ufvZYHYQpmjdk1VzriAlyEgiOpqmBJIerMKzjNNXs4YUsTt\"]);\n $response->assertStatus(400);\n }", "title": "" }, { "docid": "ab8a28c8b3a9e4c29c018bfb5ed17250", "score": "0.4982316", "text": "public function testSearchByMoreThanOneStatus()\n {\n $response_mock = file_get_contents(self::$fixturesPath . 'response_two_issue_new_and_in_progress.serialized');\n $response_mock_statues = file_get_contents(self::$fixturesPath . 'redmine-search-statuses.serialized');\n $command = $this->createCommand('redmine:search');\n $this->createMocks(\n array(\n 'redmineApiIssueAll' => unserialize($response_mock),\n 'redmineApiIssueStatusAll' => array('issue_statuses' => unserialize($response_mock_statues))\n )\n );\n $input = array(\n 'command' => $this->command->getName(),\n '--project_id' => 'test_project_id',\n '--status' => 'new, in progress'\n );\n $this->tester->execute($input);\n $res = trim($this->tester->getDisplay());\n $this->assertContains('New', $res);\n $this->assertContains('In Progress', $res);\n }", "title": "" }, { "docid": "06012ddcf972a4ac01833995bd05b788", "score": "0.49801123", "text": "public function testResultadosByID(){\n $resultado=Resultado::all();\n foreach($resultado as $r){\n $url=\"/api/v1/resultado/{$r['ID']}\";\n $response = $this->call('GET', $url);\n $this->assertEquals(200, $response->status(), \"Erro en {$url}\");\n }\n }", "title": "" }, { "docid": "e386ae7d334465c18e9db333487e4daa", "score": "0.49753943", "text": "public function testAllDeporte()\n {\n $url=\"/api/v1/deporte\";\n $response = $this->call('GET', $url);\n $this->assertEquals(200, $response->status(), \"Erro en {$url}\");\n }", "title": "" }, { "docid": "a67e6272c5087f1006df7a0525c4eb7f", "score": "0.49741688", "text": "function getVtigerPOStatus($vtiger_url) {\n\t\t\n\t\t\t$table = 'vtiger_postatus';\n\t\t\t$action = \"sql\";\n\t\t\t\n\t\n\t \t\t$resultRole = $this->doDynamicSql($vtiger_url, $table, $action,\n\t\t\t\t\tArray('custom_sql'=>\"SELECT postatusid,\tpostatus FROM \" . $table,\n\t\t\t\t\t\t 'where_clause'=> Array(),\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t 'order_by'=>\"ORDER BY postatus ASC\"\n\t\t\t\t\t)\t \n\t\t\t\t);\n\n\t\t\t$result = array();\t\t\t\n\t\t\t\n\t\t\tfor ($j=0;$j<count($resultRole);$j++) {\t\t\t\t\n\t\t\t\t$result[$resultRole[$j]['postatusid']] = $resultRole[$j]['postatus'];\n\t\t\t}\n\t\t\t\n\t\t\treturn $result;\t\t\t\n\t}", "title": "" }, { "docid": "2d93b3d47850f24d26df118a14314a1a", "score": "0.49723098", "text": "function checkOrderStatus($orderId) {\n return json_decode(httpGet(URL_ORDERSTATUS.'/'.$orderId, AUTH_HEADER),true);\n}", "title": "" }, { "docid": "a8473af5639bd16f84d370cfc5fda305", "score": "0.49713022", "text": "public function index()\n {\n $this->hotel = (new Hotel)->getHotel();\n $addons = optional($this->hotel)->addons;\n\n return response()->json([\n 'data' => $addons\n ]);\n }", "title": "" }, { "docid": "30de82acbd7ef44b7a0caafb5dd8ce9d", "score": "0.49700183", "text": "final public function testProviderOnlyReturnsOkForStatusInTwoHundredRange(): void\n {\n $url = 'https://www.example.com';\n $request = (new Psr17Factory())->createRequest('GET', $url);\n\n // Create a mock PSR7 response class.\n $mockResponse = $this->createMock(ResponseInterface::class);\n\n // Have mock response be a successful 200 HTML response.\n $mockResponse->expects($this::once())->method('getStatusCode')->willReturn(200);\n\n // Create PSR HTTP client mock.\n $mockClient = $this->createMock(ClientInterface::class);\n // Force mock to return the mocked PSR7 response.\n $mockClient->expects($this::once())\n ->method('sendRequest')\n ->with($request)\n ->willReturn($mockResponse);\n\n $mockFactory = $this->createMock(RequestFactoryInterface::class);\n\n $mockFactory->expects($this::once())\n ->method('createRequest')\n ->with('GET', $url)\n ->willReturn($request);\n\n $instance = new WebsiteProvider($mockClient, $mockFactory, $url);\n\n $status = $instance->getStatus();\n\n // Should be an OK status.\n $this::assertSame(['status' => StatusServiceProvider::STATUS_OK], $status);\n }", "title": "" } ]
7ebcf758136bf911a05256aa97769ed7
Store a newly created DrugTest in storage.
[ { "docid": "0654e3a170d5d497d062975079f6c451", "score": "0.651575", "text": "public function store(StoreDrugTestsRequest $request)\n {\n if (! Gate::allows('drug_test_create')) {\n return abort(401);\n }\n $request = $this->saveFiles($request);\n $drug_test = DrugTest::create($request->all());\n\n\n foreach ($request->input('file_id', []) as $index => $id) {\n $model = config('laravel-medialibrary.media_model');\n $file = $model::find($id);\n $file->model_id = $drug_test->id;\n $file->save();\n }\n\n return redirect()->route('admin.drug_tests.index');\n }", "title": "" } ]
[ { "docid": "8628973bd2659bcb48a70d1ec0523bfa", "score": "0.59871554", "text": "public function saved(Test $Test)\n {\n //code...\n }", "title": "" }, { "docid": "53b23500f551bbef6ad4a65447665f8a", "score": "0.593133", "text": "public function store() {}", "title": "" }, { "docid": "e6a2ecff8be90a692566c0ac3bcd7773", "score": "0.5900991", "text": "public function store()\r\n\t\t{\r\n\t\t\t//\r\n\t\t}", "title": "" }, { "docid": "14f9113e10ab16db8b93522fa5bed4d4", "score": "0.5852283", "text": "public function store() {\n // TODO: Implement store() method.\n }", "title": "" }, { "docid": "ac5fe65193706c7277539fdf6ce00070", "score": "0.5844254", "text": "public function testStore()\n {\n $device = factory(Device::class)->create();\n\n $dataset = factory(Dataset::class)->create();\n $dataset->device()->sync($device->getKey());\n\n $this->actingAs($device, 'api_device');\n $response = $this->postJson(route('api.device.data.store'), factory(Datum::class)->make()->toArray());\n $response->assertSuccessful();\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.58347243", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "bb7e6e82bec8695569f1d209223ba31d", "score": "0.5819342", "text": "public function store() {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.57885736", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
22680f6f34ae91e1241a5336560bdbb1
LISTA TODOS LOS CLIENTES PARA HACER EL PEDIDO
[ { "docid": "5e53df5d9b1f59ababbb6bd259fd6ded", "score": "0.0", "text": "public function listar_all_clientes()\n\t{\n\t\t \n\t\t$curl = curl_init();\n\n\t\tcurl_setopt_array($curl, array(\n\t\t CURLOPT_URL => \"http://drymatch.informaticapp.com/index.php/clientes\",\n\t\t CURLOPT_RETURNTRANSFER => true,\n\t\t CURLOPT_ENCODING => \"\",\n\t\t CURLOPT_MAXREDIRS => 10,\n\t\t CURLOPT_TIMEOUT => 0,\n\t\t CURLOPT_FOLLOWLOCATION => true,\n\t\t CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t CURLOPT_CUSTOMREQUEST => \"GET\",\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t \"Authorization: Basic YTJhYTA3YWRmaGRmcmV4ZmhnZGZoZGZlcnR0Z2VUU2hUQnZPZ2R2SHI5UG5DdExGbXlUZy53Lmc1Y01pOm8yYW8wN29kZmhkZnJleGZoZ2RmaGRmZXJ0dGdlY2ZpLi90RmxTRFhPOS9NOTlFNGxWS0xNOGdodzhOeQ==\"\n\t\t ),\n\t\t));\n\n\t\t$response = curl_exec($curl);\n\n\t\tcurl_close($curl);\n\t\t\n\t\t$data= json_decode( $response,true);\n\n\t\treturn $data;\t\n\n\t//var_dump ($data); die;\t\n\t}", "title": "" } ]
[ { "docid": "d8d1445116b254a883f92f6754b371a5", "score": "0.66417855", "text": "public function listartodo()\n\t\t{\n\t\t\t$sql=\"SELECT * FROM estudiantes\";\n\t\t\t$resultado=$this->con->consultaretorno($Sql);\n\t\t}", "title": "" }, { "docid": "9a6bd4f26459a3b852227954250ad638", "score": "0.65429175", "text": "public function todoListe()\n {\n $data = array();\n $user = $_SESSION['current_user'];\n $data['nomAffiche'] = $user->getPrenom() . \" \" . $user->getNom();\n $data['les_taches'] = $this->TaskModel->readAllByUser($user->getId());\n $data['URL_start'] = new Link(\"start\", \"Tache\");;\n $data['URL_stop'] = new Link(\"stop\", \"Tache\");;\n\n load_view(\"todoliste\", $data);\n }", "title": "" }, { "docid": "da01d18f0f34a3c348612ad52b5436e8", "score": "0.65242845", "text": "public function getListTodo(){\n\t try{\n\t\t $sql = \"(SELECT * FROM admin_todo WHERE executor is NULL)\";\n\t\t $stmt = $this->_db->prepare($sql);\n\t\t $stmt->execute(); \n\t\t if($stmt->errorCode() != 0){\n\t\t\t $error = $stmt->errorInfo();\n\t\t\t throw new SQLException($error[2], $error[0], $sql, \"Impossible d'obtenir la liste des todos non terminˇs\");\n\t\t } \n\t\t $todos = array(); \n\t\t while ($data = $stmt->fetch(PDO::FETCH_ASSOC)){ \t\n\t\t\t $todos[] = new Todo($data);\n\t\t } \n\t\t return $todos;\t\n\t }catch(PDOException $e){\n\t\t throw new DatabaseException($e->getCode(), $e->getMessage(), \"Impossible d'obtenir la liste des Todos non terminˇs\");\n\t }\n }", "title": "" }, { "docid": "8a45233ffe70e4804868e4e196c58320", "score": "0.65016866", "text": "public function listadoPuja(){\n $this->cargarVista(\"listadoPuja\");\n }", "title": "" }, { "docid": "711098b6be878b22eba406f0a8b31958", "score": "0.64693487", "text": "public function lista_todo()\r\n {\r\n if($this->vlrValido)\r\n {\r\n return 1;\r\n }\r\n }", "title": "" }, { "docid": "300c199f70030146241572622fab831e", "score": "0.63851357", "text": "public function listarPerguntasAction()\n {\n $params = $this->getRequest()->getParams();\n $service = App_Service_ServiceAbstract::getService('Pesquisa_Service_Questionariofrase');\n $serviceQuestionario = App_Service_ServiceAbstract::getService('Pesquisa_Service_Questionario');\n $questionario = $serviceQuestionario->getByIdDetalhar(array('idquestionario' => $params['idquestionario']));\n\n $this->view->questionario = $questionario;\n $this->view->formPesquisar = $service->getFormPesquisar();\n $this->view->idquestionario = $params['idquestionario'];\n }", "title": "" }, { "docid": "6ff186651afd170da9e83cce0a603524", "score": "0.633872", "text": "public function listar() {\n $q = $this->link->prepare('SELECT\n pedidosID as pedidoID,\n pedidosCliente as clienteID,\n pedidosContacto as contactoID,\n pedidosMailContacto as contactoMail,\n pedidosCategoria as categoriaID,\n responsableDesignado as responsableID,\n pedidosUsuario as usuarioID,\n pedidosNro as bas,\n pedidosTitulo as titulo,\n pedidosDescripcion as descripcion,\n pedidosFecha as fecha,\n estadoActual as proceso\n FROM tblPedidos');\n if($q->execute()) {\n\n return $q->fetchAll(PDO::FETCH_ASSOC);\n } else {\n return $q->errorInfo();\n }\n }", "title": "" }, { "docid": "41fef626b270813d7168bc85e985fcd2", "score": "0.631496", "text": "public function listadoPendiente() {\n $pendientes = Pedido::with('usuarioPidio')->terminado()->orderBy('fecha_pedido');\n return Datatables::eloquent($pendientes)\n ->addColumn('acciones', function ($pendientes) {\n return '<a href=\"#\" title=\"Confirmar pedido\"><i class=\"fa fa-check-square\"></i></a>&nbsp;'\n . '<a href=\"#\" title=\"Agregar detalle\"><i class=\"fa fa-warning\"></i></a>&nbsp;'\n . '<a href=\"#\" title=\"Eliminar pedido\"><i class=\"fa fa-times-circle\"></i></a>';\n })\n ->addColumn('desAv', function ($pendientes) {\n return $pendientes->desc_avanzada;\n })\n ->editColumn('fecha_pedido', function ($pendientes) {\n return $pendientes->fecha_pedido ? with(new Carbon($pendientes->fecha_pedido))->format('d/m/Y') : '';\n })\n ->make(true);\n }", "title": "" }, { "docid": "5e5a52e5541e63d1e2371791fcf3582c", "score": "0.6249118", "text": "public function Listadopedidos() {\n\t\t\n\t\t\t$modulo=\"micuenta\";\n \t$this->_acl->acceso($modulo);\t\n\t\t\t$this->_view->titulo = 'Mis Pedidos';\n\t\t\t$this->_view->navegacion = '';\n\t\t\t$this->_view->metadescripcion = 'Cooperativa Multiactiva de Empleados Colgate Palmolive, compre sus productos en linea, productos para el cuidado personal, productos para el cuidado oral, productos para el cuidado de la ropa, etc.';\n\t\t\t\n\t\t\t//Se instancia la libreria\n\t\t$paginador = new Paginador();\n\t\t\n\t\t$this->_view->pedidos = $paginador->paginar($this->_micuenta->getPedidos(Session::get('id_afiliado')),1,10);\n\t\t$this->_view->paginacion = $paginador->getView('paginacion_dinamica');\n\t\t$this->_view->setJs(array('mispedidos'));\n\t\t\n\t\t\t$this->_view->renderizar('mispedidos','micuenta');\n\t}", "title": "" }, { "docid": "84512c3adb16d7f453e3354e983582cb", "score": "0.61445314", "text": "function eliminar_todo()\n\t{\n\t\t//Me elimino a mi\n\t\t$this->eliminar_filas(false);\n\t\t//Sincronizo con la base\n\t\t$this->persistidor()->sincronizar_eliminados();\n\t\t$this->resetear();\n\t}", "title": "" }, { "docid": "35d1872ba27d4b5eeb1e886578cf2383", "score": "0.6097339", "text": "public function getListado()\n\t{\n\t\t$buttons = array('detalle' => null);\n\t\t/* nombre => campo en base de datos\t*/\n\t\t$fields = array('id' => 'id', 'Cliente' => 'id_cliente', 'Vendedor' => 'id_vendedor' ,'Estado' => 'id_estado', 'Fecha de confirmación' => 'fecha_confirmacion' );\n\t\t/*\tlistar(campos,nombre,botones,vista,tamtabla);\t*/\n\t\treturn parent::getList($fields,$buttons,\"adm.pedidos.listado\",'12');\n\t}", "title": "" }, { "docid": "28405a2dd7acdf76b07901a7de5d9992", "score": "0.6035676", "text": "public function listarP()\n {\n $sql = \"SELECT * FROM persona WHERE tipo_persona = 'Proveedor' AND estado='Aceptado' ORDER BY idpersona DESC\";\n return ejecutarConsulta($sql);\n }", "title": "" }, { "docid": "0932498e861da7d257e7690dffdcf55b", "score": "0.59516937", "text": "function lista()\n\t{\n\t\t$num = 32;\n\t\t$lista = $this->EjemploModel->lista();\n\t\t$NombreCuenta = $this->EjemploModel->cuenta($num);\n\t\t$hola = \"Hola Mundo\";\n\t\trequire('views/ejemplo/pantalla.php');\n\t}", "title": "" }, { "docid": "3e1bed55f5de7376556be062d47fa9c9", "score": "0.5943296", "text": "private function cargarJunta($fecha='') { \n $this->cargarJuntaOmision($fecha);\n if($fecha) {\n $rRes = $this->ejecutarSQL(\"SELECT FECHA,TIPO,CONVOCATORIA,HORA,PRESIDENTE,VICEPRESIDENTE1,VICEPRESIDENTE2,VOCAL1,VOCAL2,VOCAL3,VOCAL4,SECRETARIO,ADMINISTRACION,NOTAS FROM JUNTAS WHERE FECHA='$fecha'\");\n while($aRow = $rRes->fetch(PDO::FETCH_ASSOC)) {\n $this->fecha = $aRow['FECHA'];\n $this->tipo = $aRow['TIPO'];\n $this->convocatoria = $aRow['CONVOCATORIA'];\n $this->hora = $aRow['HORA'];\n $this->presidente = $aRow['PRESIDENTE'];\n $this->vicepresidente1 = $aRow['VICEPRESIDENTE1'];\n $this->vicepresidente2 = $aRow['VICEPRESIDENTE2'];\n $this->vocal1 = $aRow['VOCAL1'];\n $this->vocal2 = $aRow['VOCAL2'];\n $this->vocal3 = $aRow['VOCAL3'];\n $this->vocal4 = $aRow['VOCAL4'];\n $this->secretario = $aRow['SECRETARIO'];\n $this->administracion = $aRow['ADMINISTRACION'];\n $this->notas = $aRow['NOTAS'];\n }\n $rRes->closeCursor(); \n }\n }", "title": "" }, { "docid": "7b341a7a4237e1d59bee3c8cf7e9b7ee", "score": "0.58787984", "text": "function getTodosTemasAyuda($misGrupos) {\n $temas = $this->buscarAyudaParaUsuario('',$misGrupos);\n $dir = 'Inicio';\n $URL_IMG = URL_IMG;\n $lista = '';\n $conta = 0;\n foreach ($temas as $tema) {\n $actual = '';\n if ($tema->id == $this->id)\n $actual = 'actual';\n if ( dirname($tema->directorio) != $dir )\n {\n $conta ++;\n //{cycle values=\"comment_odd,comment_even\"}\n $oculto = 'noexpandido';\n if ($tema->estado == 'ACMISMO')\n $oculto = '';\n \n \n $dir = dirname($tema->directorio);\n // contenedor\n $lista .= <<<________LISTA\n </ul></li>\n <li class=\"comment_odd\" ><div class=\"author\"> <span class=\"name\"><a href=\"#\" onclick=\"$('#sublist$conta').toggle();return false;\" >{$tema->titulo}</a></span></div>\n <ul class=\"$oculto\" id=\"sublist$conta\">\n________LISTA;\n // normal\n $lista .= <<<________LISTA\n <li class=\"comment_even $actual\"><div class=\"author\"><span class=\"name\"><a href=\"index.php?codigo={$tema->codigo}\">{$tema->titulo}</a></span></div></li>\n________LISTA;\n }\n else\n {\n $lista .= <<<________LISTA\n <li class=\"comment_even $actual\"><div class=\"author\"><span class=\"name\"><a href=\"index.php?codigo={$tema->codigo}\">{$tema->titulo}</a></span></div></li>\n________LISTA;\n }\n \n }\n $lista = ltrim($lista,' </ul></li>');\n $lista .= <<<____LISTA\n </ul>\n </li>\n____LISTA;\n return $lista; \n }", "title": "" }, { "docid": "9e3b2ee3a697dfa83967c2f5c8a1ad3a", "score": "0.5875756", "text": "function procesarDoco($doco){\n\t\t$data = new pegaso;\n\t\t$pagina=$this->load_template2('Pedidos');\n\t\t$html=$this->load_page('app/views/pages/Logistica_recoleccion/p.ordenDetalle.php');\n\t\tob_start();\n\t\t$orden = $data->procesarDoco($doco);\n\t\t$detalle = $data->procesarDocoDetalle($doco);\n\t\t$table = ob_get_clean();\n\t\t$pagina = $this->replace_content('/\\#CONTENIDO\\#/ms',$table,$pagina);\n\t\tinclude 'app/views/pages/Logistica_recoleccion/p.ordenDetalle.php';\n\t\t\n\t\t$this->view_page($pagina);\n\t}", "title": "" }, { "docid": "37faa1556cafb05e9c0a5b8aa87a1c41", "score": "0.5871751", "text": "function Comienzo($Pantalla, $Idioma) {\n\tglobal $servicesFacade;\n\t$traducciones = $servicesFacade->getTraducciones(array (\n\t\t\"Codigo_Pantalla\" => $Pantalla,\n\t\t\"Codigo_Idioma\" => $Idioma\n\t));\n\t$textos = array ();\n\tforeach ($traducciones as $traduccion) {\n\t\t$textos[$traduccion[\"Codigo_Elemento\"]] = $traduccion[\"Texto\"];\n\t}\n\n\treturn $textos;\n}", "title": "" }, { "docid": "5036b1befddb77736bc0e57c61297ff9", "score": "0.5868407", "text": "public function listarPeticiones()\n \t\t{\n \t\t\t$a = explode(\"\\\\\", get_class($this))[1]; \t//$a = Peticion\n\t\t\t$peticiones = $this->model->listarPeticiones();\t\t\n \t\t\t$this->view->render($a, \"listar\", $peticiones, $this->getErrores());\n \t\t}", "title": "" }, { "docid": "174368561af11f8b7b90e723c8b51cff", "score": "0.58588773", "text": "function listarTipoProceso(){\n\t\t$this->procedimiento='wf.ft_tipo_proceso_sel';\n\t\t$this->transaccion='WF_TIPPROC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_proceso_macro','id_proceso_macro','int4');\n\t\t$this->setParametro('pm_relacionado','pm_relacionado','varchar');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_tipo_proceso','int4');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('id_proceso_macro','int4');\n\t\t$this->captura('tabla','varchar');\n\t\t$this->captura('columna_llave','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_tipo_estado','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('desc_proceso_macro','varchar');\n\t\t$this->captura('desc_tipo_estado','varchar');\n\t\t$this->captura('inicio','varchar');\n\t\t$this->captura('tipo_disparo','varchar');\n\t\t\n\t\t$this->captura('funcion_validacion_wf','varchar');\n\t\t$this->captura('descripcion','varchar');\n\t\t$this->captura('codigo_llave','varchar');\n\t\t\n\t\t\n\t\t\n\t\t\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}", "title": "" }, { "docid": "b92e7280d376f4f9135bb475179f36b8", "score": "0.58565456", "text": "protected function listarTipoProcedimentoConectado(MdWsSeiTipoProcedimentoDTO $objGetMdWsSeiTipoProcedimentoDTO)\n {\n try {\n\n $id = $objGetMdWsSeiTipoProcedimentoDTO->getNumIdTipoProcedimento();\n $nome = $objGetMdWsSeiTipoProcedimentoDTO->getStrNome();\n// $interno = $objGetMdWsSeiTipoProcedimentoDTO->getStrSinInterno();\n $favoritos = $objGetMdWsSeiTipoProcedimentoDTO->getStrFavoritos();\n $start = $objGetMdWsSeiTipoProcedimentoDTO->getNumStart();\n $limit = $objGetMdWsSeiTipoProcedimentoDTO->getNumLimit();\n\n\n // DTO QUE REPRESENTA OS TIPOS DE PROCESSO.\n $objTipoProcedimentoDTO = new TipoProcedimentoDTO();\n $objTipoProcedimentoDTO->setStrSinSomenteUtilizados($favoritos); //Flag de FAVORITOS S (true) / N (false)\n\n //RETORNOS ESPERADOS NOS PARÂMETROS DE SAÍDA\n $objTipoProcedimentoDTO->retNumIdTipoProcedimento();\n $objTipoProcedimentoDTO->retStrNome();\n $objTipoProcedimentoDTO->retStrSinInterno();\n\n //MÉTODO QUE RETORNA A BUSCA DOS TIPOS DE PROCESSO APLICANDO AS REGRAS DE RESTRIÇÃO POR ÓRGÃO, UNIDADE E OUVIDORIA\n $objTipoProcedimentoRN = new TipoProcedimentoRN();\n $arrObjTipoProcedimentoDTO = $objTipoProcedimentoRN->listarTiposUnidade($objTipoProcedimentoDTO); //Lista os tipos de processo\n\n $arrayObjs = array();\n //FILTRA NOME, ID e INTERNO\n if($arrObjTipoProcedimentoDTO){\n foreach ($arrObjTipoProcedimentoDTO as $aux) {\n\n setlocale(LC_CTYPE, 'pt_BR'); // Defines para pt-br\n\n $objDtoFormatado = strtolower(iconv('ISO-8859-1', 'ASCII//TRANSLIT', $aux->getStrNome()));\n $nomeFormatado = str_replace('?','',strtolower(iconv('UTF-8', 'ASCII//TRANSLIT', $nome)));\n\n if(\n ($aux->getNumIdTipoProcedimento() == $id || !$id)\n &&\n (($nome && strpos($objDtoFormatado, $nomeFormatado) !== false) || !$nomeFormatado)\n// &&\n// ($aux->getStrSinInterno() == $interno || !$interno)\n ){\n $arrayObjs[] = array(\n \"id\" => $aux->getNumIdTipoProcedimento(),\n \"nome\" => $aux->getStrNome()\n );\n }\n }\n }\n\n $arrayRetorno = array();\n $i = 0;\n //PERMITE SIGILOSO\n if(count($arrayObjs) > 0){\n foreach ($arrayObjs as $aux) {\n $i++;\n $objNivelAcessoPermitidoDTO = new NivelAcessoPermitidoDTO();\n $objNivelAcessoPermitidoDTO->setNumIdTipoProcedimento($aux[\"id\"]); // ID DO TIPO DE PROCESSO\n $objNivelAcessoPermitidoDTO->setStrStaNivelAcesso(ProtocoloRN::$NA_SIGILOSO);\n\n $objNivelAcessoPermitidoRN = new NivelAcessoPermitidoRN();\n $permiteSigiloso = $objNivelAcessoPermitidoRN->contar($objNivelAcessoPermitidoDTO) > 0 ? true : false;\n\n\n $arrayRetorno[] = array(\n \"id\" => $aux[\"id\"],\n \"nome\" => $aux[\"nome\"],\n \"permiteSigiloso\" => $permiteSigiloso\n );\n }\n }\n\n $total = 0;\n $total = count($arrayRetorno);\n\n if($start) $arrayRetorno = array_slice($arrayRetorno, ($start-1));\n if($limit) $arrayRetorno = array_slice($arrayRetorno, 0,($limit));\n\n\n /*$total = 0;\n $total = count($arrayRetorno);*/\n\n return MdWsSeiRest::formataRetornoSucessoREST(null, $arrayRetorno, $total);\n } catch (Exception $e) {\n return MdWsSeiRest::formataRetornoErroREST($e);\n }\n }", "title": "" }, { "docid": "e534563f13eb2746517a50b9f81523f5", "score": "0.58525825", "text": "public function listarTodos(){\r\n\t\tinclude(\"conexao.php\");\r\n\t\t$sql = 'SELECT * FROM pet_servico';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$consulta->execute();\r\n\t\treturn ($consulta->fetchAll(PDO::FETCH_ASSOC));\r\n\t}", "title": "" }, { "docid": "a7196973a00207ab75c7f87a690b661c", "score": "0.584302", "text": "public function listarTodos(){\n\t\tinclude(\"../config/conexao.php\");\n\t\t$sql = 'SELECT * FROM tecnico';\n\t\t$consulta = $conexao->prepare($sql);\n\t\t$consulta->execute();\n\t\treturn ($consulta->fetchAll(PDO::FETCH_ASSOC));\n\t}", "title": "" }, { "docid": "eb176794eee40036f2c6f5e7e2be6f1e", "score": "0.58119965", "text": "public function Listar(){\n $conn = Conexao::LigarConexao(); \n $buscar = $conn->prepare(\"SELECT * FROM contato ORDER BY contato.id DESC\"); /* Selecionar a tabela Contato e lista-la em ordem Desc -> Decrescente ... sendo que toda esa ação esta na var BUSCAR*/\n $buscar ->execute();\n $resultado = $buscar->fetchAll(PDO::FETCH_ASSOC);\n return($resultado);\n }", "title": "" }, { "docid": "6adeac8646e731696d0cae20707cdaf4", "score": "0.5786903", "text": "function descripcion_descuento(&$Sesion,&$aDatos){\n\t$id_art = $aDatos[\"Articulos.id_articulo\"];\n\t$usuario = identifica_usuarios($Sesion);\n\t// $id_cliente = $Sesion->get_var(\"id_cliente_pedido\");\n\t$oPedido = $Sesion->get_var(\"oPedido_en_curso\");\n\t$oDb = $Sesion->get_db('data');\n\n\t//DIVISA\n\tif (!is_object($oPedido)) {\n\t\t$consulta = \"select leyenda from Divisa , Empresas \".\n\t\t\t\" where Empresas.id_divisa = Divisa.id_divisa and id_empresa = $usuario[id]\";\n\t\t$resuld=$oDb->query($consulta);\n\t\t$rowd=$oDb->fetch_array($resuld);\n\t\t$aplicar_descuentos = (int) $Sesion->get_var(\"aplicar_descuentos_cliente\");\n\t} else {\n\t\t$id_cliente = $oPedido->get_reciever_id();\n\t\t$aDiv = $oPedido->get_currency();\n\t\t$rowd['leyenda'] = $aDiv['leyenda'];\n\t\t$aRec = $oPedido->get_reciever_info();\n\t\t$aplicar_descuentos = (int)$aRec['mostrar_ofertas'];\n\t}\n\n\tif (!is_numeric($id_cliente)) $id_cliente= id_entidad($Sesion,'id_cliente');\n\n\t//depurar_array($rowd);\n\t//debug($Sesion->get_var(\"aplicar_descuentos_cliente\"));\n\tif($aplicar_descuentos == 1 AND is_numeric($id_cliente)){\n\t\t//SI A ESTE CLIENTE SE LE APLIKAN LOS DESCUENTOS\n\t\t//descuento por cliente y articulo\n\t\t$consulta = \"Select descuento , monto from Cliente_articulos where id_articulo = $id_art and id_empresa = $usuario[id] and id_cliente = $id_cliente\";\n\t\t$resul4 = $oDb->query($consulta);\n\t\t$row4 = $oDb->fetch_array($resul2);\n\t\tif($row4['descuento'] > 0 )\n\t\t\treturn $row4['descuento'] . \"% Cli/Art\";\n\t\telseif($row4['monto'] > 0)\n\t\t\treturn $row4['monto'] .\" \" . $rowd['leyenda'] . \" Cli/Art\";\n\n\t\t//descuento por familia de articulos y cliente\n\t\t$consulta = \"Select descuento from Cliente_familia_articulos , Articulos\n\t\t\twhere Articulos.id_articulo = $id_art and Cliente_familia_articulos.id_empresa = $usuario[id]\n\t\t\tand Cliente_familia_articulos.id_cliente = $id_cliente\n\t\t\tand Cliente_familia_articulos.id_familia = Articulos.id_familia\";\n\t\t$resul2 = $oDb->query($consulta);\n\t\t$row2 = $oDb->fetch_array($resul2);\n\t\tif($row2['descuento'] > 0){\n\t\t\treturn $row2['descuento'] . \"% Cli/Fam\";\n\t\t}\n\t}//FIN DE DEESCUENTOS ESPECIFICOS DE CLIENTE\n\t//Promociones u ofertas\n\t$consulta = \"Select descuento , monto , oferta , nombre from Promociones where id_articulo = $id_art AND \".\n\t\t\"id_empresa = $usuario[id]\";\n\t$consulta = \"Select id_promocion, cantidad, descuento , monto , oferta , nombre \".\n\t\t\"FROM Promociones \".\n\t\t\"WHERE id_articulo = $id_art and id_empresa = $usuario[id] \".\n\t\t\"AND fecha_inicio < NOW() AND (fecha_fin>NOW() OR fecha_fin IS NULL OR fecha_fin=0) \";\n\t$resul3 = $oDb->query($consulta);\n\t$row3 = $oDb->fetch_array($resul3);\n\tif($row3['oferta'] == 1){\n\t\t//ofertas\n\t\tif($row3['descuento'] > 0)\n\t\t\treturn $row3['descuento'] . \"% Art >=$row3[cantidad]\";\n\t\telseif($row3['monto'] > 0)\n\t\t\treturn $row3['monto'] . \" \" . $rowd['leyenda'] . \" Art >=$row3[cantidad]\";\n\t}\n\telseif($row3['nombre'] != \"\") //Promociones\n\t\treturn $row3['nombre'].\" >=$row3[cantidad]\";\n\n\t$consulta = \"Select descuento from Descuento_familia , Articulos\n\t\twhere Articulos.id_articulo = $id_art and\n\t\tDescuento_familia.id_empresa = $usuario[id] and\n\t\tDescuento_familia.id_familia = Articulos.id_familia\";\n\t$resul8 = $oDb->query($consulta);\n\t$row8 = $oDb->fetch_array($resul8);\n\tif($row8['descuento'] > 0){\n\t\treturn $row8['descuento'] . \"% Fam\";\n\t}\n\n\tif ((int)$aDatos[\"Empresas_articulos.unidades_bulto\"]>1) {\n\t\tif ((int)$aDatos['Empresas_articulos.dto_vol']) {\n\t\t\tif ($aDatos['Empresas_articulos.dto_vol'] == (int)$aDatos['Empresas_articulos.dto_vol'])\n\t\t\t\t$aDatos['Empresas_articulos.dto_vol'] = (int)$aDatos['Empresas_articulos.dto_vol'];\n\t\t\tif (!(int)$aDatos['Empresas_articulos.dto_vol_bultos'])\n\t\t\t\t$aDatos['Empresas_articulos.dto_vol_bultos'] = NULL;\n\t\t\t$retval = $aDatos['Empresas_articulos.dto_vol'].'% X '.\n\t\t\t\t$aDatos['Empresas_articulos.dto_vol_bultos'].' Bto';\n\t\t} elseif ((int)$aDatos['Empresas.dto_gnrl_vol']) {\n\t\t\tif ($aDatos['Empresas.dto_gnrl_vol'] == (int)$aDatos['Empresas.dto_gnrl_vol'])\n\t\t\t\t$aDatos['Empresas.dto_gnrl_vol'] = (int)$aDatos['Empresas.dto_gnrl_vol'];\n\t\t\tif (!(int)$aDatos['Empresas.dto_gnrl_vol_bultos'])\n\t\t\t\t$aDatos['Empresas.dto_gnrl_vol_bultos'] = NULL;\n\t\t\t$retval = $aDatos['Empresas.dto_gnrl_vol'].'% X '.\n\t\t\t\t$aDatos['Empresas.dto_gnrl_vol_bultos'].' Bto';\n\t\t} else $retval = NULL;\n\t\treturn $retval;\n\t}\n\n}", "title": "" }, { "docid": "2a4e6aa190755b2485f40c23d6f37686", "score": "0.57729334", "text": "public function listAction($idComercial='', $dia='') {\n\n if ($idComercial == '')\n $idComercial = $this->request[2];\n\n if ($dia == '')\n $dia = $this->request[3];\n\n $this->values['listado']['dia'] = $dia;\n\n // Busco los clientes del comercial indicado y sucursal actual\n // que aun no estén asignados al día solicitado\n $cliente = new Clientes();\n $rutasVentas = new RutasVentas();\n \n $filtro = \"IDComercial='{$idComercial}'\n AND IDSucursal='{$_SESSION['suc']}'\n AND IDCliente NOT IN\n (SELECT IDCliente FROM {$rutasVentas->getDataBaseName()}.{$rutasVentas->getTableName()}\n WHERE IDComercial='{$idComercial}' AND Dia='{$dia}')\";\n $clientes = $cliente->cargaCondicion(\n \"IDCliente as Id, RazonSocial as Value\",\n $filtro,\n \"RazonSocial ASC\");\n\n $this->values['listado']['clientes'] = $clientes;\n array_unshift($this->values['listado']['clientes'], array('Id' => '', 'Value' => ':: Indique un cliente'));\n\n // Busco las zonas de los clientes del comercial indicado y sucursal actual\n // que aun no estén asignados al día solicitado\n $zona = new Zonas();\n $em = new EntityManager($cliente->getConectionName());\n if ($em->getDbLink()) {\n $query = \"SELECT DISTINCT t1.IDZona as Id, t2.Zona as Value \n FROM \n {$cliente->getDataBaseName()}.{$cliente->getTableName()} as t1, \n {$zona->getDataBaseName()}.{$zona->getTableName()} as t2\n WHERE t1.IDZona=t2.IDZona\n AND t1.IDComercial='{$idComercial}'\n AND t1.IDSucursal='{$_SESSION['suc']}'\n AND t1.IDCliente NOT IN\n (SELECT IDCliente FROM {$rutasVentas->getDataBaseName()}.{$rutasVentas->getTableName()}\n WHERE IDComercial='{$idComercial}' AND Dia='{$dia}')\n ORDER BY t2.Zona ASC\";\n $em->query($query);\n $rows = $em->fetchResult();\n $em->desConecta();\n }\n\n \n $this->values['listado']['zonas'] = $rows;\n array_unshift($this->values['listado']['zonas'], array('Id' => '', 'Value' => ':: Indique una Zona'));\n //-----------------------------------------------\n // Lleno los clientes asignados al comercial y día\n // ordenados por Zona\n // -----------------------------------------------\n $em = new EntityManager($cliente->getConectionName());\n if ($em->getDbLink()) {\n $query = \"SELECT t1.Id \n FROM \n {$rutasVentas->getDataBaseName()}.{$rutasVentas->getTableName()} as t1,\n {$cliente->getDataBaseName()}.{$cliente->getTableName()} as t2\n WHERE t1.IDCliente=t2.IDCliente\n AND t2.IDSucursal='{$_SESSION['suc']}'\n AND t1.IDComercial='{$idComercial}'\n AND t1.Dia='{$dia}'\n ORDER BY t1.OrdenCliente,t1.IDZona\";\n $em->query($query);\n $rows = $em->fetchResult();\n $em->desConecta();\n }\n unset($em);\n unset($em);\n unset($cliente);\n unset($zona);\n unset($rutasVentas);\n \n foreach ($rows as $row) {\n $lineas[] = new $this->parentEntity($row['Id']);\n }\n //-----------------------------------------------\n\n $template = $this->entity . '/list.html.twig';\n\n $this->values['linkBy']['value'] = $idComercial;\n $this->values['listado']['data'] = $lineas;\n $this->values['listado']['nClientes'] = count($lineas);\n\n unset($lis);\n unset($lineas);\n\n return array('template' => $template, 'values' => $this->values);\n }", "title": "" }, { "docid": "076c8b228aff629349f7df232accec2f", "score": "0.57699835", "text": "public function listaFeriado();", "title": "" }, { "docid": "c7f9b2819abebe4e97ff3cc7ba49797a", "score": "0.5766649", "text": "function get_lista_metodos($codigo_existente='')\r\n\t{\r\n\t\t$plan = array();\r\n\t\t$plan = $this->generar_lista_elementos($this->elementos_php, 'PHP', $codigo_existente);\r\n\t\t$plan = array_merge($plan, $this->generar_lista_elementos($this->elementos_js, 'JAVASCRIPT', $codigo_existente));\r\n\t\treturn $plan;\r\n\t}", "title": "" }, { "docid": "8c9317685c602fb74993546d416813f4", "score": "0.57654107", "text": "function generar_lista_elementos($elementos, $prefijo, $codigo_existente='')\r\n\t{\r\n\t\t$lista = array();\r\n\t\t$titulo = '';\r\n\t\t$subtitulo = '';\r\n\t\t$a = 0;\r\n\t\tforeach ($elementos as $id => $elemento) {\r\n\t\t\tif(\t$elemento instanceof toba_codigo_separador ) {\r\n\t\t\t\t//Filtra el separador según el código actual\r\n\t\t\t\tif (toba_archivo_php::codigo_tiene_codigo($codigo_existente, $elemento->get_codigo())) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\tif( $elemento->get_tipo() == 'chico' ) {\r\n\t\t\t\t\t$subtitulo = $elemento->get_descripcion();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$titulo = $elemento->get_descripcion();\r\n\t\t\t\t\t$subtitulo = '';\r\n\t\t\t\t}\r\n\t\t\t} elseif( $elemento instanceof toba_codigo_metodo ) {\r\n\r\n\t\t\t\t//Filtra el metodo según el código actual\t\t\t\t\r\n\t\t\t\tif ($elemento instanceof toba_codigo_metodo_js) {\r\n\t\t\t\t\tif (toba_archivo_php::codigo_tiene_metodo_js($codigo_existente, $elemento->get_descripcion())) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (toba_archivo_php::codigo_tiene_metodo($codigo_existente, $elemento->get_descripcion())) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t$desc = $prefijo . ' # ';\r\n\t\t\t\t$desc .= ($titulo && $subtitulo) ? $titulo.' - '.$subtitulo : $titulo.$subtitulo;\r\n\t\t\t\t$desc .= ' => ' . $elemento->get_descripcion();\r\n\t\t\t\t$lista[$a]['id'] = $id;\r\n\t\t\t\t$lista[$a]['desc'] = $desc;\r\n\t\t\t\t$lista[$a]['elemento'] = $elemento;\r\n\t\t\t}\r\n\t\t\t$a++;\r\n\t\t}\r\n\t\treturn $lista;\r\n\t}", "title": "" }, { "docid": "d56b2d7b214783f63f19b83a67caba31", "score": "0.57613415", "text": "public function pesquisarTiposCampanha() {\r\n $sql = \"SELECT\r\n\t\t\t\t cftpoid,\r\n\t\t\t\t cftpdescricao\r\n\t\t\t\tFROM\r\n\t\t\t\t credito_futuro_tipo_campanha\r\n\t\t\t\tWHERE\r\n\t\t\t\t cftpdt_exclusao IS NULL\r\n\t\t\t\tORDER BY\r\n\t\t\t\t cftpdescricao\";\r\n\r\n $results = $this->query($sql);\r\n if ($this->count($results) > 0) {\r\n return $this->fetchAllObject($results);\r\n }\r\n return array();\r\n }", "title": "" }, { "docid": "6b78bfc71473b28891c749bd994aac1c", "score": "0.5758222", "text": "public function Listar() {\n \n try {\n \n $sql = \"SELECT * FROM viaticos ORDER BY id_viaticos DESC\";\n $stm = $this->pdo->prepare($sql);\n $stm->execute();\n $data = $stm->fetchAll(PDO::FETCH_ASSOC);\n return $data;\n \n } catch(PDOException $e) {\n die('ERROR: ' . $e->getMessage());\n } \n \n }", "title": "" }, { "docid": "f204d54c3bf568cc6f3dc2a8555867dc", "score": "0.57475185", "text": "public function ListarPedidosRealizadosPorParteDelCliente($idPersona)\n {\n\n// $sql=\"SELECT pro.pro_imagen,pro.pro_nombre,pro.pro_precio, pe.pedido_estado FROM pedido as pe INNER JOIN detalle_pedido as dp\n // on pe.id_pedido = dp.id_pedido INNER JOIN producto as pro\n // on dp.id_producto = pro.ID_producto\n // WHERE pe.id_persona=\"32\"\";\n try {\n $instanciaComp = ConexionBD::getInstance();\n $sql = \"SELECT * FROM pedido pe WHERE pe.id_persona='$idPersona'; \";\n $res = $instanciaComp->EjecutarConEstado($sql);\n $lista = $instanciaComp->obtener_filas($res);\n\n return $lista;\n } catch (Exception $ex) {\n\n }\n }", "title": "" }, { "docid": "0b9d1ec332b984d3f9f9da2973782f0d", "score": "0.5745167", "text": "function getTask1Kelas(){\n\t\t$query = \"SELECT * FROM tb_to_do ORDER BY kelas_td ASC\";\n\n\t\t// Mengeksekusi query\n\t\treturn $this->execute($query);\n\t}", "title": "" }, { "docid": "84a4e14e3dacd0ebe0e51616d24bd9a5", "score": "0.5738928", "text": "public function lista(){\n $view = USingleton::getInstance('VEvento');\n $FEvento=new FEvento();\n \n\t\t$parametri=array();\n $categoria=$view->getCategoria();\n $parola=$view->getParola();\n\t\t\n if ($categoria!=false){\n $parametri[]=array('categoria','=',$categoria);\n }\n if ($parola!=false){\n $parametri[]=array('descrizione','LIKE','%'.$parola.'%');\n }\n\t\t// CONTROLLO FLAG PUBBLICATO\n\t\t$parametri[]=array('pubblicato','=',1);\n \n\t\t$limit=$view->getPage()*$this->_eventi_per_pagina.','.$this->_eventi_per_pagina;\n\t\t$num_risultati=count($FEvento->search($parametri));\n $pagine = ceil($num_risultati/$this->_eventi_per_pagina);\n $risultato=$FEvento->search($parametri, '', $limit);\n // Recupera media voti\n\t\t// DA IMPLEMENTARE\n\t\t\n\t\tif ($risultato!=false) {\n $array_risultato=array();\n\t\t\t foreach ($risultato as $item) {\n $tmpEvento=$FEvento->load($item->id);\n $array_risultato[]=array_merge(get_object_vars($tmpEvento),array('media_voti'=>$tmpEvento->getMediaVoti()));\n //$array_risultato[]=array(get_object_vars($tmpEvento));\n }\n }\n\t\t\n\t\t// RECUPERA PARTECIPANTI\n $partecipanti=$tmpEvento->getNumeroPartecipanti();\n\t\tdebug($partecipanti);\n\t\t$view->impostaDati('partecipanti',$partecipanti);\n\t\t\n\t\t$view->impostaDati('pagine',$pagine);\n $view->impostaDati('task','lista');\n $view->impostaDati('parametri','categoria='.$categoria.'&stringa='.$parola);\n $view->impostaDati('dati',$array_risultato);\n return $view->processaTemplate();\n }", "title": "" }, { "docid": "ca95d7b195105278035efa2c1f35c894", "score": "0.57380486", "text": "public function getAllTodo(){\n \ttry{\n \t\t$sql = \"SELECT * FROM admin_todo ORDER BY creation_date ASC\";\n \t\t$stmt = $this->_db->prepare($sql);\n \t\t$stmt->execute();\n \t\tif($stmt->errorCode() != 0){\n \t\t\t$error = $stmt->errorInfo();\n \t\t\tthrow new SQLException($error[2], $error[0], $sql, \"Impossible d'obtenir la liste des todos\");\n \t\t}\n \t\t$todos = array();\n \t\twhile ($data = $stmt->fetch(PDO::FETCH_ASSOC)){\n \t\t\t$todos[] = new Todo($data);\n \t\t}\n \t\treturn $todos;\n \t}catch(PDOException $e){\n \t\tthrow new DatabaseException($e->getCode(), $e->getMessage(), \"Impossible d'obtenir la liste des Todos\");\n \t}\n }", "title": "" }, { "docid": "30c45151fc2ae544eae7194e23b60be5", "score": "0.5729455", "text": "public function getPontuacao()\n {\n $this->data = array(\n 'title' => \"Pontuação\",\n 'titles' => \"Pontuações\",\n 'route' => 'admin/fidelidade-pontuacao',\n 'view_dir' => 'admin.fidelidade-pontuacao'\n );\n\n $fidMov = new FidelidadeMovimentacao;\n $result = $fidMov->getGrid();\n\n $this->layout->content = View::make($this->data['view_dir'] . '.index')\n ->with(array(\n 'data' => $this->data,\n 'result' => $result\n ));\n }", "title": "" }, { "docid": "0878f7683c3a32c56f487eea20bfae30", "score": "0.5720217", "text": "public function listByNomComAction($nombre) {\n \n $tcomercios= $this->getDoctrine()->getRepository('AppBundle:Tipocomercio')->findByNombre($nombre, array('id' => 'ASC'));\n \n return $this->render('comercio/listByComercio.html.twig', array('tcomercios'=>$tcomercios));\n \n }", "title": "" }, { "docid": "4560113af8e4133c972bbc9a4c934e99", "score": "0.57196385", "text": "function listaTipocliente() \r\n\t {\r\n\t \t$sqlText = <<<mya\r\n\t\t \t\tSELECT tipcli_id,tipcli_nombre\r\n\t\t \t\tFROM tipocliente \r\n\t\t \t\torder by tipcli_nombre\r\nmya;\r\n\t\t\t$rs = &$this->base->execute($sqlText);\r\n\t \tif(!$rs->EOF)\r\n\t \t\treturn $rs;\r\n\t \telse \r\n\t \t\treturn 0;\t \t\r\n\t }", "title": "" }, { "docid": "d74424326d02700748c75c6a8354cca7", "score": "0.5717801", "text": "public function MostrarTipos() {\r\n\r\n\r\n $tipos = array();\r\n $Conexion = conectar_bd();\r\n $Conexion->conectarse();\r\n\r\n $info_tipos = $Conexion->ejecutar(\"select * from programa\");\r\n $i = 0;\r\n while ($renglon = mysql_fetch_array($info_tipos)) {\r\n $objeto = new programa();\r\n $objeto->setidPrograma($renglon['id_programa']);\r\n $objeto->setNombrePrograma($renglon['nombre_programa']);\r\n \r\n array_push($tipos, $renglon['nombre_programa']);\r\n }\r\n\r\n $Conexion->desconectarse();\r\n return $tipos;\r\n }", "title": "" }, { "docid": "a964f09b409205c87e53a26fe6bba72b", "score": "0.5715616", "text": "function trova_parola($parola,$descrizione){\n\t$descrizione = preg_replace(\"/\\W/\", \" \", $descrizione); // elimino caratteri speciali\n\t$des_cerca=explode(\" \",$descrizione); // esplodo le singole parolo\n\t$risultato = count($des_cerca); // conto il totale delle parole esplose\n\t@$_ritono = false;\n\tfor($i=0; $i<=$risultato; $i++){ // ciclo per fare controllo\n\t\tif(@$des_cerca[$i]==@$parola){\n\t\t\t@$_ritono = true; // se la trovo chiudo ciclo e ritorno l'ok\n\t\t\tbreak;\n\t\t}\t\t\n\t}\t\n\treturn $_ritono;\n}", "title": "" }, { "docid": "f84540cb2be5f41d38db4d041dd909a2", "score": "0.57138073", "text": "public function Listargenero()\n\t{\n\t\ttry\n\t\t{\n\t\t $result= $this->modelo->Listar(\"genero\");\n \n\t\t\treturn $result;\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "ec9b054dcda630a73f61199948fb109f", "score": "0.5713206", "text": "public function selecionarTodos()\n {\n }", "title": "" }, { "docid": "4f1512c24e687c37228b2470ad8bb883", "score": "0.5700634", "text": "public function run()\n {\n $conteudos = [\n [\n 'nm_conteudo_objeto' => 'Lixo Eletrônico',\n 'ds_conteudo_objeto' => 'Este descarte é feito quando o equipamento apresenta defeito ou se torna obsoleto (ultrapassado). O problema ocorre quando este material é descartado no meio ambiente. Como estes equipamentos possuem substâncias químicas (chumbo, cádmio, mercúrio, berílio, etc.) em suas composições, podem provocar contaminação de solo e água.\n\nAlém do contaminar o meio ambiente, estas substâncias químicas podem provocar doenças graves em pessoas que coletam produtos em lixões, terrenos baldios ou na rua.\n\nEstes equipamentos são compostos também por grande quantidade de plástico, metais e vidro. Estes materiais demoram muito tempo para se decompor no solo.',\n 'ds_caminho_imagem' => 'http://reciclanordeste.com.br/wp-content/uploads/2014/04/Lixo-Eletronico-Brasil.jpg',\n 'ds_caminho_video' => 'https://www.youtube.com/embed/VB9OgYxDm7M',\n 'ic_tipo' => 'Reciclagem',\n 'cd_objeto_descarte' => 1\n ],\n [\n 'nm_conteudo_objeto' => 'Descarte de Computadores',\n 'ds_conteudo_objeto' => 'Como descartar celulares, tablets, notebooks, baterias e outros gadgets?\n\nSegundo um relatório do Programa das Nações Unidas para o Meio Ambiente (Pnuma) divulgado em 2010, o Brasil é o país emergente que mais produz lixo eletrônico per capita a cada ano (cerca de meio quilo). \n\nInfelizmente, uma parte desse lixo é descartada incorretamente ou mantida praticamente como peça de museu de eletrônicos nas casas dos amantes de tecnologia. O que muita gente não sabe, no entanto, é que existem lugares para encaminhar seus antigos aparelhos ao descartá-los. \n\nA criação desses locais de descarte foi uma das determinações incluídas na Política Nacional de Resíduos Sólidos, em vigor desde o fim de 2010 e que tenta corrigir diversos problemas relacionados ao lixo. A nova lei institui que os fabricantes, comerciantes, importadoras e distribuidoras de produtos eletroeletrônicos devem criar sistemas de logística reversa para garantir o despejo correto do lixo. \n\nPortanto, você pode devolver seus antigos gadgets às lojas onde comprou ou as suas respectivas fabricantes.\n\nSe tratado incorretamente, o aparelho eletrônico pode trazer diversos danos à natureza. Esse tipo de produto tem em sua composição substâncias tóxicas como mercúrio, chumbo, cádmio, berílio e arsênio. \n\nTambém são utilizados compostos químicos retardantes de chamas e PVC, cuja decomposição pode levar séculos para ocorrer naturalmente. A exposição direta ou indireta a esses elementos pode causar distúrbios no sistema nervoso, problemas renais e pulmonares, além de câncer e outras doenças.\n\nPara combater esse perigo à saúde e ao meio ambiente, consulte a lista abaixo e saiba como entrar em contato com algumas marcas, órgãos públicos ou ONGs e entregar seus antigos gadgets para reciclagem. \n\nMotorola\nO projeto ECOMOTO coleta telefones celulares, rádios de comunicação, baterias e acessórios. Os recipientes podem ser encontrados nesses endereços.\n\nLG\nAtravés da ação Coleta Inteligente, a empresa encaminha computadores, mini-systems, geladeiras, baterias e outros tipos de eletrodomésticos descartados de qualquer marca para empresas especializadas em reciclagem. Consulte os postos de coleta nesse link.\n\nApple\nA fabricante do iPhone e do iPad recicla seus produtos no Brasil. Para se informar melhor sobre isso, ligue para 0800 772 3126 ou envie um e-mail para applecs@oxil.com.br .\n\nNokia\nO programa de reciclagem da companhia recolhe aparelhos antigos da Nokia e seus acessórios em pontos de coleta, de assistência técnica autorizada ou pelos Correios. Os produtos também podem ser entregues em lojas do Grupo Pão de Açúcar através do programa Alô, Recicle.\n\nSony\nA empresa recolhe pilhas e baterias descartadas em postos de serviço autorizado ou nas lojas Sony Store. Mais informações nos telefones 4003 7669 (capitais e regiões metropolitanas) ou 0800 880 7669 (demais localidades).',\n 'ds_caminho_imagem' => 'http://www.usp.br/agen/wp-content/uploads/cedir2.jpg',\n 'ds_caminho_video' => 'https://www.youtube.com/embed/Z8NbpqRraao',\n 'ic_tipo' => 'Reciclagem',\n 'cd_objeto_descarte' => 1\n ],\n ];\n\n \\DB::table('conteudo_objeto')->insert($conteudos);\n }", "title": "" }, { "docid": "43fd75cd857b4566a2db1801c4f43984", "score": "0.56981903", "text": "function listar_comarcas_por_cidade()\n\t\t{\n\t\t\t$this->loadModel('ClienteLeilao');\n\t\t\t$cidade_id = $this->data['cidade_id'];\n\t\t\n\t\t\tif($cidade_id==0)\t\t\n\t\t\t{\n\t\t\t\t$sql = \"SELECT\n\t\t\t\t\t\t clientes_leilao.id,clientes_leilao.nome\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t clientes_leilao\n\t\t\t\t\t\tLEFT JOIN\n\t\t\t\t\t\t cidades ON clientes_leilao.cidade_id = cidades.id\n\t\t\t\t\t\tLEFT JOIN\n\t\t\t\t\t\t estados ON cidades.estado_id = estados.id\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t estados.id = 12 AND clientes_leilao.cliente_justica_id = 1\";\n\t\t\t\t\n\t\t\t\t$dados = $this->ClienteLeilao->query($sql);\n\n\t\t\t\tdie(json_encode($dados));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdie(json_encode($this->ClienteLeilao->query(\"SELECT id,nome FROM clientes_leilao WHERE cidade_id = $cidade_id\")));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "eadbd3a0d7d2642ec48341ee2742051c", "score": "0.5695113", "text": "public function getIdPuesto(){\n return $this->id_puesto;\n }", "title": "" }, { "docid": "152ae4a7962d7638dad3559b1a5d7505", "score": "0.569177", "text": "public function Listar() //Función para listar todos los datos de la tabla pruebacliente\r\n\t {\r\n\t\t\t\t \r\n\t\t\t\t $this->PruebaClientes=array(); //Hay que vaciar el array de objetos Pruebas\r\n\t\t\t\t \r\n\t\t\t\t $consulta=\"select * from pruebacliente\";\r\n\r\n $param=array(); //Creo un array para pasarle parámetros\r\n\r\n $this->Consulta($consulta,$param); //Ejecuto la consulta\r\n \t\r\n\t\t\t\t\t\t\r\n\t\t\t\t foreach ($this->datos as $fila) //Recorro el array de la consulta\r\n\t\t\t\t {\r\n\t\t\t\t\t \r\n\t\t\t\t\t $prucli = new PruebaCliente(); //Creo un nuevo objeto\r\n //Le seteo las variables, y así me ahorro el constructor \r\n\t\t\t\t\t $prucli->__SET(\"prueba_idprueba\",$fila[\"prueba_idprueba\"]);\r\n\t\t\t\t\t $prucli->__SET(\"cliente_idCliente\",$fila[\"cliente_idCliente\"]);\r\n\t\t\t\t\t $prucli->__SET(\"diagnostico\",$fila[\"diagnostico\"]);\r\n\t\t\t\t\t $prucli->__SET(\"fechaPrueba\",$fila[\"fechaPrueba\"]);\r\n\t\t\t\t\t \r\n\t\t\t\t\t $this->PruebaClientes[]=$prucli; //Meto la prueba en el array de PruebasClientes\r\n\t\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t }", "title": "" }, { "docid": "6275645e4ac63372816c5979b233dcf4", "score": "0.5687037", "text": "public function listarPersonas(){\r\n $respuesta=empleadoModel::listar();\r\n\t\t\tforeach ($respuesta as $row => $item) {\r\n\t\techo '<tr id=\"'.$item[\"Documento\"].'\">\r\n\t\t\t\t <td>'.$item[\"Nombre\"]. '</td>\r\n\t\t\t\t <td>'.$item[\"Apellido\"].'</td>\r\n\t\t\t\t <td>'.$item[\"Documento\"].'</td>\r\n\t\t\t\t <td>'.$item[\"Codigo\"].' </td>\r\n\t\t\t\t <td>'.$item[\"Email\"].'</td>\r\n\t\t\t\t <td>'.$item[\"Telefono\"].'</td>\r\n\t\t\t<td> <span class=\"btn btn-warning btn-sm editarempleado\" data-toggle=\"modal\" data-target=\"#modaleditar\"\r\n\t\t\tid='.$item[\"Documento\"] .'><span class=\"fa fa-pencil-square-o\"></span></span></td>\r\n\t\t\t\r\n\t\t\t<td><span class=\"btn btn-danger btn-sm eliminar\" id='.$item[\"Documento\"] .'><span class=\"fa fa-trash\"></span></span></td></tr>';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "58190c7ba821cf73265f918d866b4995", "score": "0.5683352", "text": "public function listar()\r\n\t{\r\n\t\t$sql=\"SELECT p.idprestamo,c.nombre as cliente,u.nombre as usuario,DATE(p.fprestamo) as fecha,p.monto,p.interes,p.saldo,p.formapago,DATE(p.fpago) as fechap,p.plazo,DATE(p.fplazo) as fechaf,p.estado \r\n FROM Pedidos p INNER JOIN clientes c ON \r\n p.idcliente=c.idcliente INNER JOIN usuarios u ON \r\n p.usuario=u.idusuario\";\r\n\t\treturn ejecutarConsulta($sql);\t\t\r\n\t}", "title": "" }, { "docid": "51a38da13d4aa67786f58dd99a051997", "score": "0.5681655", "text": "function put_listado($ie,$distrito,$moneda) {\r\nglobal $db,$add_where;\r\nglobal $bgcolor1;\r\nglobal $bgcolor2;\r\nglobal $desde,$hasta,$fechas;\r\nglobal $parametros; //cuando viene de cobranzas\r\nglobal $desde_m,$hasta_m,$montos;\r\nglobal $avanzada;\r\nglobal $id_t_cuenta,$id_t_ingreso,$id_t_egreso;\r\nglobal $entidades,$entidad,$letra;\r\nglobal $orden_default,$orden_by;\r\n\r\ncargar_calendario();\r\nif ($ie==\"ingreso\")\r\n{\r\n $sql_tmp=\"select caja.fecha,ingreso_egreso.id_ingreso_egreso,ingreso_egreso.item,ingreso_egreso.monto,ingreso_egreso.comentarios,\r\n moneda.simbolo,caja.id_moneda,entidad.nombre as nombre,tipo_cuenta_ingreso.nombre as cuenta_ingreso\r\n from caja join ingreso_egreso using(id_caja) left join entidad using(id_entidad) join moneda using(id_moneda)\r\n left join caja.tipo_cuenta_ingreso using(id_cuenta_ingreso)\r\n \";\r\n $where_tmp=\"(caja.id_distrito=$distrito and id_tipo_egreso isnull $add_where)\";\r\n $contar=\"select count(*) from ingreso_egreso join caja using(id_caja) where id_tipo_egreso isnull and caja.id_distrito=$distrito\";\r\n $title=\"Cliente\";\r\n $orden = array(\r\n\t\t\"default_up\" => \"$orden_by\",\r\n\t\t\"default\" => \"$orden_default\",\r\n\t\t\"1\" => \"ingreso_egreso.id_ingreso_egreso\",\r\n\t\t\"2\" => \"caja.fecha\",\r\n\t\t\"3\" => \"ingreso_egreso.item\",\r\n\t\t\"4\" => \"ingreso_egreso.monto\",\r\n\t);\r\n $filtro = array(\r\n\t\t\"caja.fecha\" => \"Fecha\",\r\n\t\t\"entidad.nombre\" => \"Cliente\",\r\n\t\t\"ingreso_egreso.item\" => \"Item\",\r\n\t\t\"ingreso_egreso.id_ingreso_egreso\" => \"ID\",\r\n\t\t\"ingreso_egreso.monto\" => \"Monto\",\r\n\t\t\"ingreso_egreso.comentarios\" => \"Comentarios\"\r\n\t);\r\n}\r\nelseif ($ie==\"egreso\")\r\n{$sql_tmp=\"select caja.fecha,ingreso_egreso.id_ingreso_egreso,ingreso_egreso.item,ingreso_egreso.monto,ingreso_egreso.comentarios,moneda.simbolo,caja.id_moneda,proveedor.razon_social as nombre from caja join ingreso_egreso using(id_caja) join proveedor using(id_proveedor) join moneda using(id_moneda) \";\r\n $where_tmp=\"(caja.id_distrito=$distrito and id_tipo_ingreso isnull $add_where)\";\r\n $contar=\"select count(*) from ingreso_egreso join caja using(id_caja) where id_tipo_ingreso isnull and caja.id_distrito=$distrito\";\r\n $title=\"Proveedor\";\r\n $orden = array(\r\n\t\t\"default_up\" => \"$orden_by\",\r\n\t\t\"default\" => \"$orden_default\",\r\n\t\t\"1\" => \"ingreso_egreso.id_ingreso_egreso\",\r\n\t\t\"2\" => \"caja.fecha\",\r\n\t\t\"3\" => \"ingreso_egreso.item\",\r\n\t\t\"4\" => \"ingreso_egreso.monto\",\r\n\t);\r\n $filtro = array(\r\n\t\t\"caja.fecha\" => \"Fecha\",\r\n\t\t\"proveedor.razon_social\" => \"Proveedor\",\r\n\t\t\"ingreso_egreso.item\" => \"Item\",\r\n\t\t\"ingreso_egreso.id_ingreso_egreso\" => \"ID\",\r\n\t\t\"ingreso_egreso.monto\" => \"Monto\",\r\n\t\t\"ingreso_egreso.comentarios\" => \"Comentarios\"\r\n\t);\r\n}\r\nelseif($ie==\"caja\")\r\n{$sql_tmp=\"SELECT moneda.simbolo,caja.fecha,caja.saldo_total,caja.cerrada,caja.id_caja FROM caja join moneda using(id_moneda)\";\r\n $where_tmp=\"(caja.id_distrito=$distrito $add_where)\";\r\n $contar=\"select count(*) from caja where id_distrito=$distrito\";\r\n $title=\"Proveedor\";\r\n $orden = array(\r\n\t\t\"default_up\" => \"$orden_by\",\r\n\t\t\"default\" => \"$orden_default\",\r\n\t\t\"1\" => \"caja.id_caja\",\r\n\t\t\"2\" => \"caja.fecha\",\r\n\t\t\"3\" => \"caja.cerrada\",\r\n\t);\r\n $filtro = array(\r\n\t\t\"caja.id_caja\" => \"ID\",\r\n\t\t\"caja.fecha\" => \"Fecha\",\r\n\t\t\"caja.saldo_total\" => \"Saldo Total\",\r\n\t\t\"caja.usuario\" => \"Usuario (solo si esta cerrada)\",\r\n\t);\r\n}\r\n\r\n$sumas = array(\r\n \t\t\"moneda\" => \"id_moneda\",\r\n \t\t\"campo\" => \"monto\",\r\n \t\t\"mask\" => array (\"\\$\",\"U\\$S\")\r\n);\r\n\r\necho \"<center>\";\r\n\r\nif($_POST['keyword'] || $keyword || $_POST['fechas'] || $_POST['select_moneda']!=-1 || $_POST['select_estado']!= -1 )\r\n $contar=\"buscar\";\r\nlist($sql,$total_lic,$link_pagina,$up,$suma) = form_busqueda($sql_tmp,$orden,$filtro,array(\"distrito\"=>$distrito),$where_tmp,$contar,$sumas);\r\n$resultado = sql($sql,\"Error en busqueda: $sql\");\r\n?>\r\n&nbsp;<b>Avanzada</b> <INPUT name=\"avanzada\" type='checkbox' value=\"1\" <? if ($avanzada==1) echo 'checked'?> onclick='activar(this,document.all.div)'>\r\n&nbsp;<input type=\"submit\" name=form_busqueda value=\"Buscar\" style=\"font-family :\r\ngeorgia, garamond, serif; font-size : 10px; font-weight : bold; color : white; border : solid 3px white;\r\nbackground-color: blue; cursor: hand\">\r\n<div id='div' style='display:<?if ($avanzada==1) echo \"all\"; else echo \"none\";?>'><br>\r\n<table width='95%' border='0' bgcolor='#E0E0E0' cellspacing='0' class=\"bordes\">\r\n<TR>\r\n\t<TD width=\"40%\" rowspan=\"3\">\r\n\t<TABLE id=\"ma\" width=\"100%\">\r\n\t<TR><TD width=\"40%\">\r\n <b> Moneda </b>\r\n </TD><TD align=\"right\">\r\n <?combo_moneda('select_moneda',\"Todas\");?>\r\n </TD></TR>\r\n <?if($ie==\"caja\")\r\n {?>\r\n <TR>\r\n <TD align=\"center\">\r\n <b>Estado</b>\r\n \t</TD><TD>\r\n <select name=\"select_estado\" style=\"width:100%\">\r\n <option value=-1 <?if($_POST['select_estado']==-1)echo \"selected\"?>>Todas</option>\r\n <option value=1 <?if($_POST['select_estado']==1)echo \"selected\"?>>Abiertas</option>\r\n <option value=2 <?if($_POST['select_estado']==2)echo \"selected\"?>>Cerradas</option>\r\n </select>\r\n </TD></TR>\r\n <?}\r\n if ($ie==\"ingreso\"){//combo de selección del tipo de ingreso\r\n \t?>\r\n <TR>\r\n <TD align=\"center\">\r\n <b>T. Cuenta</b>\r\n \t</TD><TD align=\"right\">\r\n <select name=\"select_t_cuenta\" style=\"width:100%\">\r\n <option value=-1 <?if($id_t_cuenta == -1)echo \"selected\";?>>Todas</option>\r\n\t<?\r\n\t$res_t_cuenta = sql(\"Select * from tipo_cuenta_ingreso\",\"Error en combo tipo de cuenta\");\r\n\twhile (!$res_t_cuenta->EOF){\r\n\t\t$text_t_cuenta = $res_t_cuenta->fields[\"nombre\"];\r\n\t\t$id_tipo_cuenta = $res_t_cuenta->fields[\"id_cuenta_ingreso\"];\r\n\t\tif($id_tipo_cuenta == $id_t_cuenta)\r\n \t\techo \"<option value=$id_tipo_cuenta selected>$text_t_cuenta</option>\";\r\n \t\telse\r\n \t\techo \"<option value=$id_tipo_cuenta>$text_t_cuenta</option>\";\r\n \t\t$res_t_cuenta->MoveNext();\r\n\t}\r\n ?>\r\n </select>\r\n </TD></TR>\r\n <TR>\r\n <TD align=\"center\">\r\n <b>T. Ingreso</b>\r\n \t</TD><TD align=\"right\">\r\n <select name=\"select_t_ingreso\" style=\"width:100%\" >\r\n <option value=-1 <?if($id_t_ingreso == -1)echo \"selected\";?>>Todas</option>\r\n\t<?\r\n\t$res_t_ingreso = sql(\"Select * from tipo_ingreso\",\"Error en combo tipo de ingreso\");\r\n\twhile (!$res_t_ingreso->EOF){\r\n\t\t$text_t_ingreso = $res_t_ingreso->fields[\"nombre\"];\r\n\t\t$id_tipo_ingreso = $res_t_ingreso->fields[\"id_tipo_ingreso\"];\r\n\t\tif($id_tipo_ingreso == $id_t_ingreso)\r\n \t\techo \"<option value=$id_tipo_ingreso selected title='$text_t_ingreso'>$text_t_ingreso</option>\";\r\n \t\telse\r\n \t\techo \"<option value=$id_tipo_ingreso>$text_t_ingreso</option>\";\r\n \t\t$res_t_ingreso->MoveNext();\r\n\t}\r\n ?>\r\n </select>\r\n </TD></TR>\r\n <?}\r\n if ($ie==\"egreso\"){//combo de selección del tipo de egreso\r\n \t?>\r\n <TR>\r\n <TD align=\"center\">\r\n <b>T. Cuenta</b>\r\n \t</TD><TD align=\"right\">\r\n <select name=\"select_t_cuenta\" style=\"width:100%\">\r\n <option value=-1 <?if($id_t_cuenta == -1)echo \"selected\";?>>Todas</option>\r\n\t<?\r\n\t$res_t_cuenta = sql(\"Select * from tipo_cuenta\",\"Error en combo tipo de cuenta\");\r\n\twhile (!$res_t_cuenta->EOF){\r\n\t\t$text_t_cuenta = $res_t_cuenta->fields[\"concepto\"].\"[\".$res_t_cuenta->fields[\"plan\"].\"]\";\r\n\t\t$id_tipo_cuenta = $res_t_cuenta->fields[\"numero_cuenta\"];\r\n\t\tif($id_tipo_cuenta == $id_t_cuenta)\r\n \t\techo \"<option value=$id_tipo_cuenta selected>$text_t_cuenta</option>\";\r\n \t\telse\r\n \t\techo \"<option value=$id_tipo_cuenta>$text_t_cuenta</option>\";\r\n \t\t$res_t_cuenta->MoveNext();\r\n\t}\r\n ?>\r\n </select>\r\n </TD></TR>\r\n <TR>\r\n <TD align=\"center\">\r\n <b>T. Egreso</b>\r\n \t</TD><TD align=\"right\">\r\n <select name=\"select_t_egreso\" style=\"width:100%\">\r\n <option value=-1 <?if($id_t_egreso == -1)echo \"selected\";?>>Todas</option>\r\n\t<?\r\n\t$res_t_egreso = sql(\"Select * from tipo_egreso\",\"Error en combo tipo de egreso\");\r\n\twhile (!$res_t_egreso->EOF){\r\n\t\t$text_t_egreso = $res_t_egreso->fields[\"nombre\"];\r\n\t\t$id_tipo_egreso = $res_t_egreso->fields[\"id_tipo_egreso\"];\r\n\t\tif($id_tipo_egreso == $id_t_egreso)\r\n \t\techo \"<option value=$id_tipo_egreso selected>$text_t_egreso</option>\";\r\n \t\telse\r\n \t\techo \"<option value=$id_tipo_egreso>$text_t_egreso</option>\";\r\n \t\t$res_t_egreso->MoveNext();\r\n\t}\r\n ?>\r\n </select>\r\n </TD></TR>\r\n <?}\r\n ?>\r\n \t<TR>\r\n \t<TD>\r\n \tOrdenar Por:\r\n \t</TD>\r\n \t<TD align=\"right\">\r\n \t<SELECT name=\"orden\">\r\n\t<?if($ie!=\"caja\"){?>\r\n \t<OPTION <?if($orden_default == 1)echo \"selected\";?> value=\"1\">ID</OPTION>\r\n \t<OPTION <?if($orden_default == 2)echo \"selected\";?> value=\"2\">Fecha</OPTION>\r\n \t<OPTION <?if($orden_default == 3)echo \"selected\";?> value=\"3\">Item</OPTION>\r\n \t<OPTION <?if($orden_default == 4)echo \"selected\";?> value=\"4\">Monto</OPTION>\r\n \t<?} else {?>\r\n \t<OPTION <?if($orden_default == 1)echo \"selected\";?> value=\"1\">ID Caja</OPTION>\r\n \t<OPTION <?if($orden_default == 2)echo \"selected\";?> value=\"2\">Fecha</OPTION>\r\n \t<OPTION <?if($orden_default == 3)echo \"selected\";?> value=\"3\">Estado</OPTION>\r\n \t<?}?>\r\n \t</SELECT>\r\n \t</TD>\r\n \t</TR>\r\n \t<TR>\r\n \t<TD colspan=\"2\" align=\"right\">\r\n \tOrden Ascendente:\r\n\t<INPUT type=\"checkbox\" name=\"orden_by\" <?if($orden_by==1) echo \"checked\"?> value=\"1\">\r\n \t</TD>\r\n \t</TR>\r\n \t</TABLE>\r\n \t</TD>\r\n <TD width=\"60%\">\r\n\r\n <table id=\"ma\">\r\n <tr>\r\n <td align=\"left\" colspan=\"2\"> <input name=\"fechas\" type=\"checkbox\" value=\"1\" <? if ($fechas==1) echo 'checked'?> onclick=\"if (!this.checked) { document.all.desde.value='';document.all.hasta.value='';} \" > <b>Entre fechas: </b></td>\r\n <td colspan=\"2\"> <b>Desde: </b> <input type='text' size=10 name='desde' value='<?=$desde?>' readonly>\r\n\t <? echo link_calendario('desde');?>\r\n\t <b>Hasta: </b><input type='text' size=10 name='hasta' value='<?=$hasta?>' readonly>\r\n <? echo link_calendario('hasta'); ?>\r\n </td>\r\n </tr>\r\n<TR>\r\n <td align=\"left\" colspan=\"2\"> <input name=\"montos\" type=\"checkbox\" value=\"1\" <? if ($montos==1) echo 'checked'?> onclick=\"if (!this.checked) { document.all.desde_m.value='';document.all.hasta_m.value='';} \" > <b>Entre montos: </b></td>\r\n <td colspan=\"2\"> <b>Mínimo: </b> <input type='text' size=10 name='desde_m' value='<?=$desde_m?>' onkeypress=\"return filtrar_teclas(event,'0123456789.')\">\r\n\t <b>Máximo: </b><input type='text' size=10 name='hasta_m' value='<?=$hasta_m?>' onkeypress=\"return filtrar_teclas(event,'0123456789.')\">\r\n </td>\r\n</tr>\r\n <?if($ie==\"ingreso\")\r\n {?>\r\n\t<TR>\r\n \t<td align=\"left\" colspan=\"4\">\r\n \t<input name=\"entidades\" type=\"checkbox\" value=\"1\" <? if ($entidades==1) echo 'checked'?> onclick=\"document.form1.submit();\"> <b>Por cliente: </b>\r\n \t</td>\r\n\t</tr>\r\n \t<?\r\n \tif ($entidades) {\r\n \t\t$sql_entidades = \"Select id_entidad,nombre from entidad where nombre ilike '$letra%' order by nombre asc\";\r\n \t\t$result_entidades = sql($sql_entidades,\"Error en $sql_entidades\");\r\n \t?>\r\n\t<TR>\r\n \t<td width=\"20%\">\r\n \tComienza con:\r\n \t</td>\r\n \t<td width=\"10%\">\r\n \t<SELECT name=\"letras\" onchange=\"document.form1.submit();\">\r\n \t<OPTION value=\"a\"<?if($letra == \"a\")echo \"selected\";?>>A</OPTION>\r\n \t<OPTION value=\"b\"<?if($letra == \"b\")echo \"selected\";?>>B</OPTION>\r\n \t<OPTION value=\"c\"<?if($letra == \"c\")echo \"selected\";?>>C</OPTION>\r\n \t<OPTION value=\"d\"<?if($letra == \"d\")echo \"selected\";?>>D</OPTION>\r\n \t<OPTION value=\"e\"<?if($letra == \"e\")echo \"selected\";?>>E</OPTION>\r\n \t<OPTION value=\"f\"<?if($letra == \"f\")echo \"selected\";?>>F</OPTION>\r\n \t<OPTION value=\"g\"<?if($letra == \"g\")echo \"selected\";?>>G</OPTION>\r\n \t<OPTION value=\"h\"<?if($letra == \"h\")echo \"selected\";?>>H</OPTION>\r\n \t<OPTION value=\"i\"<?if($letra == \"i\")echo \"selected\";?>>I</OPTION>\r\n \t<OPTION value=\"j\"<?if($letra == \"j\")echo \"selected\";?>>J</OPTION>\r\n \t<OPTION value=\"k\"<?if($letra == \"k\")echo \"selected\";?>>K</OPTION>\r\n \t<OPTION value=\"l\"<?if($letra == \"l\")echo \"selected\";?>>L</OPTION>\r\n \t<OPTION value=\"m\"<?if($letra == \"m\")echo \"selected\";?>>M</OPTION>\r\n \t<OPTION value=\"n\"<?if($letra == \"n\")echo \"selected\";?>>N</OPTION>\r\n \t<OPTION value=\"ñ\"<?if($letra == \"ñ\")echo \"selected\";?>>Ñ</OPTION>\r\n \t<OPTION value=\"o\"<?if($letra == \"o\")echo \"selected\";?>>O</OPTION>\r\n \t<OPTION value=\"p\"<?if($letra == \"p\")echo \"selected\";?>>P</OPTION>\r\n \t<OPTION value=\"q\"<?if($letra == \"q\")echo \"selected\";?>>Q</OPTION>\r\n \t<OPTION value=\"r\"<?if($letra == \"r\")echo \"selected\";?>>R</OPTION>\r\n \t<OPTION value=\"s\"<?if($letra == \"s\")echo \"selected\";?>>S</OPTION>\r\n \t<OPTION value=\"t\"<?if($letra == \"t\")echo \"selected\";?>>T</OPTION>\r\n \t<OPTION value=\"u\"<?if($letra == \"u\")echo \"selected\";?>>U</OPTION>\r\n \t<OPTION value=\"v\"<?if($letra == \"v\")echo \"selected\";?>>V</OPTION>\r\n \t<OPTION value=\"w\"<?if($letra == \"w\")echo \"selected\";?>>W</OPTION>\r\n \t<OPTION value=\"x\"<?if($letra == \"x\")echo \"selected\";?>>X</OPTION>\r\n \t<OPTION value=\"y\"<?if($letra == \"y\")echo \"selected\";?>>Y</OPTION>\r\n \t<OPTION value=\"z\"<?if($letra == \"z\")echo \"selected\";?>>Z</OPTION>\r\n \t<select>\r\n \t</td>\r\n \t<TD width=\"10%\">\r\n \tNombre:\r\n \t</td>\r\n \t<td width=\"60%\">\r\n \t<SELECT name=\"entidades_list\" style=\"width:100%\">\r\n \t<OPTION value=\"-1\" <?if($entidad == -1)echo \"selected\";?>>Todos</OPTION>\r\n\t<?\r\n\twhile(!$result_entidades->EOF) {\r\n\t\tif ($entidad==$result_entidades->fields[\"id_entidad\"])\r\n\t\t\techo \"<OPTION value='\".$result_entidades->fields[\"id_entidad\"].\"' selected >\".$result_entidades->fields[\"nombre\"].\"</OPTION>\";\r\n\t\telse\r\n\t\t\techo \"<OPTION value='\".$result_entidades->fields[\"id_entidad\"].\"'>\".$result_entidades->fields[\"nombre\"].\"</OPTION>\";\r\n\t\t$result_entidades->MoveNext();\r\n\t}?>\r\n \t<select>\r\n\t</TD>\r\n\t</TR>\r\n<?\t}\r\n }?>\r\n\r\n <?if($ie==\"egreso\")\r\n {?>\r\n\t<TR>\r\n \t<td align=\"left\" colspan=\"4\">\r\n \t<input name=\"entidades\" type=\"checkbox\" value=\"1\" <? if ($entidades==1) echo 'checked'?> onclick=\"document.form1.submit();\"> <b>Por Proveedor: </b>\r\n \t</td>\r\n\t</tr>\r\n \t<?\r\n \tif ($entidades) {\r\n \t\t$sql_entidades = \"Select id_proveedor,razon_social as nombre from proveedor where razon_social ilike '$letra%' order by nombre asc\";\r\n \t\t$result_entidades = sql($sql_entidades,\"Error en $sql_entidades\");\r\n \t?>\r\n\t<TR>\r\n \t<td width=\"20%\">\r\n \tComienza con:\r\n \t</td>\r\n \t<td width=\"10%\">\r\n \t<SELECT name=\"letras\" onchange=\"document.form1.submit();\">\r\n \t<OPTION value=\"a\"<?if($letra == \"a\")echo \"selected\";?>>A</OPTION>\r\n \t<OPTION value=\"b\"<?if($letra == \"b\")echo \"selected\";?>>B</OPTION>\r\n \t<OPTION value=\"c\"<?if($letra == \"c\")echo \"selected\";?>>C</OPTION>\r\n \t<OPTION value=\"d\"<?if($letra == \"d\")echo \"selected\";?>>D</OPTION>\r\n \t<OPTION value=\"e\"<?if($letra == \"e\")echo \"selected\";?>>E</OPTION>\r\n \t<OPTION value=\"f\"<?if($letra == \"f\")echo \"selected\";?>>F</OPTION>\r\n \t<OPTION value=\"g\"<?if($letra == \"g\")echo \"selected\";?>>G</OPTION>\r\n \t<OPTION value=\"h\"<?if($letra == \"h\")echo \"selected\";?>>H</OPTION>\r\n \t<OPTION value=\"i\"<?if($letra == \"i\")echo \"selected\";?>>I</OPTION>\r\n \t<OPTION value=\"j\"<?if($letra == \"j\")echo \"selected\";?>>J</OPTION>\r\n \t<OPTION value=\"k\"<?if($letra == \"k\")echo \"selected\";?>>K</OPTION>\r\n \t<OPTION value=\"l\"<?if($letra == \"l\")echo \"selected\";?>>L</OPTION>\r\n \t<OPTION value=\"m\"<?if($letra == \"m\")echo \"selected\";?>>M</OPTION>\r\n \t<OPTION value=\"n\"<?if($letra == \"n\")echo \"selected\";?>>N</OPTION>\r\n \t<OPTION value=\"ñ\"<?if($letra == \"ñ\")echo \"selected\";?>>Ñ</OPTION>\r\n \t<OPTION value=\"o\"<?if($letra == \"o\")echo \"selected\";?>>O</OPTION>\r\n \t<OPTION value=\"p\"<?if($letra == \"p\")echo \"selected\";?>>P</OPTION>\r\n \t<OPTION value=\"q\"<?if($letra == \"q\")echo \"selected\";?>>Q</OPTION>\r\n \t<OPTION value=\"r\"<?if($letra == \"r\")echo \"selected\";?>>R</OPTION>\r\n \t<OPTION value=\"s\"<?if($letra == \"s\")echo \"selected\";?>>S</OPTION>\r\n \t<OPTION value=\"t\"<?if($letra == \"t\")echo \"selected\";?>>T</OPTION>\r\n \t<OPTION value=\"u\"<?if($letra == \"u\")echo \"selected\";?>>U</OPTION>\r\n \t<OPTION value=\"v\"<?if($letra == \"v\")echo \"selected\";?>>V</OPTION>\r\n \t<OPTION value=\"w\"<?if($letra == \"w\")echo \"selected\";?>>W</OPTION>\r\n \t<OPTION value=\"x\"<?if($letra == \"x\")echo \"selected\";?>>X</OPTION>\r\n \t<OPTION value=\"y\"<?if($letra == \"y\")echo \"selected\";?>>Y</OPTION>\r\n \t<OPTION value=\"z\"<?if($letra == \"z\")echo \"selected\";?>>Z</OPTION>\r\n \t<select>\r\n \t</td>\r\n \t<TD width=\"10%\">\r\n \tNombre:\r\n \t</td>\r\n \t<td width=\"60%\">\r\n \t<SELECT name=\"entidades_list\" style=\"width:100%\">\r\n \t<OPTION value=\"-1\" <?if($entidad == -1)echo \"selected\";?>>Todos</OPTION>\r\n\t<?\r\n\twhile(!$result_entidades->EOF) {\r\n\t\tif ($entidad==$result_entidades->fields[\"id_proveedor\"])\r\n\t\t\techo \"<OPTION value='\".$result_entidades->fields[\"id_proveedor\"].\"' selected >\".$result_entidades->fields[\"nombre\"].\"</OPTION>\";\r\n\t\telse\r\n\t\t\techo \"<OPTION value='\".$result_entidades->fields[\"id_proveedor\"].\"'>\".$result_entidades->fields[\"nombre\"].\"</OPTION>\";\r\n\t\t$result_entidades->MoveNext();\r\n\t}?>\r\n \t<select>\r\n\t</TD>\r\n\t</TR>\r\n<?\t}\r\n }?>\r\n</table>\r\n\r\n </td>\r\n</tr></table> </div><br>\r\n<SCRIPT>\r\nfunction activar(obj1,obj2){\r\n\tif (obj1.checked) {\r\n\t\tobj2.style.display = 'block';\r\n\t} else {\r\n\t\tobj2.style.display= 'none';\r\n\t}\r\n}\r\n</SCRIPT>\r\n\r\n<?\r\n//vemos en que distrito estamos\r\n$query=\"select nombre from distrito where id_distrito=$distrito\";\r\n$res_dist=$db->Execute($query) or die($db->ErrorMsg().\"<br>\".$query);\r\n\r\nif($ie!='caja') {\r\n\r\n\techo \"\r\n<center>\r\n\r\n<table width=95% cellspacing=2 class='bordes'><tr id=ma>\r\n\t<td align=left colspan=2><b>\r\n\tTotal:</b> $total_lic \".$ie.\"s</td>\r\n\t<td align=left><b>\r\n\tSuma:</b> $suma </td>\r\n\t<td align=right colspan=3>$link_pagina</td>\r\n\t</tr>\r\n<!--</table>\r\n<table width='95%' border='0' cellspacing='2'>-->\r\n<tr title='Vea comentarios de los \".$ie.\"' id=mo>\r\n<td width='1%'><a id=mo href='\".encode_link($_SERVER['PHP_SELF'],array(\"sort\"=>\"1\",\"up\"=>$up,\"distrito\"=>$distrito)).\"'><b>ID</b></a></td>\r\n<td width='5%'><a id=mo href='\".encode_link($_SERVER['PHP_SELF'],array(\"sort\"=>\"2\",\"up\"=>$up,\"distrito\"=>$distrito)).\"'><b>Fecha</b></a></td>\r\n<td width='40%'><a id=mo href='\".encode_link($_SERVER['PHP_SELF'],array(\"sort\"=>\"3\",\"up\"=>$up,\"distrito\"=>$distrito)).\"'><b>Item</b></a></td>\r\n<td width='15%'><a id=mo href='\".encode_link($_SERVER['PHP_SELF'],array(\"sort\"=>\"4\",\"up\"=>$up,\"distrito\"=>$distrito)).\"'><b>Montos</b></a></td>\r\n<td width='25%'><b>$title</b></td>\r\n<td width='10%'><b>Cuenta</b></td>\r\n</tr>\";\r\n }\r\nelse { //si es caja\r\n\r\necho \"\r\n<center>\r\n\r\n<table width=95% cellspacing=2 class='bordes'><tr id=ma>\r\n\t<td align=left colspan=2><b>\r\n\tTotal:</b> $total_lic cajas</td>\r\n\t<td align=right colspan=2>$link_pagina</td>\r\n\t</tr>\r\n<!--</table>\r\n<table width='95%' border='0' cellspacing='2'>-->\r\n<tr id=mo>\r\n<td width='1%'><a id=mo href='\".encode_link($_SERVER['PHP_SELF'],array(\"sort\"=>\"1\",\"up\"=>$up,\"distrito\"=>$distrito)).\"'><b>ID</b></a></td>\r\n<td width='10%'><a id=mo href='\".encode_link($_SERVER['PHP_SELF'],array(\"sort\"=>\"2\",\"up\"=>$up,\"distrito\"=>$distrito)).\"'><b>Fecha</b></a></td>\r\n<td width='25%'><b>Saldo Actual</b></td>\r\n<td width='10%'><a id=mo href='\".encode_link($_SERVER['PHP_SELF'],array(\"sort\"=>\"3\",\"up\"=>$up,\"distrito\"=>$distrito)).\"'><b>Estado</b></a></td>\r\n</tr>\";\r\n}\r\n\r\n$cnr=1;\r\n\r\nwhile (!$resultado->EOF)\r\n{\r\n //seteo los links\r\n if($ie!='caja')//si no es caja (es ingreso o egreso)\r\n {if($resultado->fields['comentarios']==\"\")\r\n $comentario=\"Observaciones: no tiene\";\r\n else\r\n $comentario=\"Observaciones:\".$resultado->fields['comentarios'];\r\n if($res_dist->fields['nombre']==\"San Luis\")\r\n \t$distrito=1;\r\n elseif($res_dist->fields['nombre']==\"Buenos Aires - GCBA\")\r\n \t$distrito=2;\r\n\r\n $archivo=\"ingresos_egresos.php\";\r\n $link=encode_link($archivo,array(\"id_ingreso_egreso\"=> $resultado->fields[\"id_ingreso_egreso\"],\"pagina\"=>$ie,\"distrito\"=>$distrito));\r\n }\r\n else\r\n {\r\n $archivo=\"caja_diaria.php\";\r\n \tif($res_dist->fields['nombre']==\"San Luis\")\r\n \t\t$distrito=1;\r\n elseif($res_dist->fields['nombre']==\"Buenos Aires - GCBA\")\r\n $distrito=2;\r\n $link=encode_link($archivo,array(\"id_caja\"=> $resultado->fields[\"id_caja\"],\"pagina\"=>\"listado\",\"distrito\"=>$distrito));\r\n }\r\n\r\n\r\n /*\r\n if ($cnr==1)\r\n {$color2=$bgcolor2;\r\n $color=$bgcolor1;\r\n $atrib =\"bgcolor='$bgcolor1'\";\r\n $cnr=0;\r\n }\r\n else\r\n {$color2=$bgcolor1;\r\n $color=$bgcolor2;\r\n $atrib =\"bgcolor='$bgcolor2'\";\r\n $cnr=1;\r\n }\r\n $atrib.=\" onmouseover=\\\"this.style.backgroundColor = '#ffffff'\\\" onmouseout=\\\"this.style.backgroundColor = '$color'\\\"\";\r\n $atrib.=\" title='$comentario' style=cursor:hand\";\r\n */\r\n //anexar luego con un join al query principal\r\n $comentario = str_replace(\"'\",\"\",$comentario);\r\n\r\n if($ie!='caja') {\r\n //tr_tag($link,\"title='$comentario'\");\r\n ?>\r\n <tr <?=atrib_tr();?> title=\"<?=$comentario?>\" onclick=\"window.open('<?=$link?>')\">\r\n <!--<tr <?php echo $atrib; ?>>-->\r\n <td width=\"1%\"><?php echo $resultado->fields[\"id_ingreso_egreso\"]; ?></td>\r\n <td width=\"10%\"><?php echo fecha($resultado->fields[\"fecha\"]); ?></td>\r\n <td width=\"40%\"><?php echo $resultado->fields[\"item\"]; ?></td>\r\n <td width=\"15%\">\r\n <table border=\"0\" width=\"100%\"><tr height=\"100%\"><td align=\"left\"><?php echo $resultado->fields[\"simbolo\"];?></td><td align=\"right\"><?php echo formato_money($resultado->fields[\"monto\"]);?></td></tr></table>\r\n </td>\r\n <td width=\"25%\"><?php echo $resultado->fields[\"nombre\"]; ?></td>\r\n <td width=\"10%\"><?=$resultado->fields[\"cuenta_ingreso\"];?></td>\r\n </tr>\r\n\r\n <?php\r\n\r\n }\r\n else {\r\n //tr_tag($link,\"title='$comentario'\");\r\n ?>\r\n <tr <?=atrib_tr();?> title=\"<?=$comentario?>\" onclick=\"window.open('<?=$link?>')\">\r\n <td ><?php echo $resultado->fields[\"id_caja\"]; ?></td>\r\n <td ><?php echo fecha($resultado->fields[\"fecha\"]); ?></td>\r\n <td width=\"15%\">\r\n <table border=\"0\" width=\"100%\"><tr height=\"100%\"><td align=\"left\"><?php echo $resultado->fields[\"simbolo\"];?></td><td align=\"right\"><?php echo formato_money($resultado->fields[\"saldo_total\"]);?></td></tr></table>\r\n </td>\r\n <td ><?php if($resultado->fields[\"cerrada\"]) echo \"Cerrada\"; else echo \"Abierta\"; ?></td>\r\n </tr>\r\n\r\n <?php\r\n\r\n }\r\n $resultado->MoveNext();\r\n} //del while\r\n?>\r\n</table>\r\n</center>\r\n\r\n <?\r\n}", "title": "" }, { "docid": "892c73d3619276ff2c620b40ba847bb9", "score": "0.56736344", "text": "function listarPuntoVentaTipo() {\r\n\t\t$this->procedimiento='vef.ft_reporte_ventas';\r\n\t\t$this->transaccion='VF_FILTIPO_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n\t\t$this->setParametro('tipo','tipo','varchar');\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('tipo','varchar');\r\n\t\t$this->captura('codigo','varchar');\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t// echo $this->consulta;exit;\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "9911b745ec4ed543da305b610cdbf747", "score": "0.5670927", "text": "public function Lista_procedimiento($idjuicio) {\r\n $sql = \"SELECT * FROM PROCEDIMIENTO WHERE JUICIOS_ID=$idjuicio\";\r\n $lista = $this->db->query($sql);\r\n return $lista->result();\r\n }", "title": "" }, { "docid": "4af0657d6a870dbc2f11e0d57e89213e", "score": "0.56695175", "text": "public function listar(){\n $conexao = Conexao::pegarConexao();\n $querySelect = \"select idProduto, \n nomeProduto,unidadeProduto, precoProduto,fotoProduto \n from tbproduto\";\n $resultado = $conexao->query($querySelect);\n $lista = $resultado->fetchAll();\n return $lista; \n }", "title": "" }, { "docid": "c4993f228c8987e1166197eddec2ed62", "score": "0.56666917", "text": "public function ctrListarPedidos($item){\n\n \t$tabla=\"pedido\";\n\n \t$respuesta=ModeloVentas::mdlListarPedidos($tabla,$item);\n\n \treturn $respuesta;\n }", "title": "" }, { "docid": "96c321950ea3590f881776395bfc0b88", "score": "0.56617355", "text": "public static function getNomesEdificios_parteEdificio(){\r\n\r\n // create DB connection\r\n $con = connectDatabase();\r\n\r\n // select DB\r\n selectDatabase( $con ); \r\n \r\n // select data\r\n $result = mysqli_query( $con, 'SELECT * FROM parte_edificio ORDER BY nome_parte');\r\n \r\n // set pormenores array\r\n $nomeEdificio[] = NULL;\r\n $i = 0;\r\n while ( $row = mysqli_fetch_array( $result ) ) {\r\n $nomeEdificio[$i] = $row['nome_parte'];\r\n $i++;\r\n } // end WHILE\r\n \r\n // close DB connection\r\n mysqli_close( $con ); \r\n \r\n // return pormenores array\r\n return $nomeEdificio; \r\n }", "title": "" }, { "docid": "35cb368fe8016d8dc912e1909032a725", "score": "0.56541586", "text": "public function ListaDePostulaciones($cod){\n $sentencia = $this->con->prepare(\"SELECT * FROM vistapostulaciones WHERE cod_estudiante =\".$cod);\n $sentencia->execute();\n $em = array();\n while ($fila = $sentencia->fetch()) {\n $em[] = $fila;\n }\n return $em;\n }", "title": "" }, { "docid": "e7b7a5af709386cdda210e8effb576ac", "score": "0.5647369", "text": "public function listarTodos(){\n\t\tinclude(\"../conexao/conexao.php\");\n\t\t$sql = 'SELECT * FROM telefone';\n\t\t$consulta = $conexao->prepare($sql);\n\t\t$consulta->execute();\n\t\treturn ($consulta->fetchAll(PDO::FETCH_ASSOC));\n\t}", "title": "" }, { "docid": "85bb8cf61b8979fc800ab7d715e2178d", "score": "0.56413865", "text": "public function Listar()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$stm = $this->pdo->prepare(\"SELECT * FROM negocios, organizaciones, pertenece, etapasventas, personas WHERE negocios.idOrganizacion = organizaciones.idOrganizacion AND negocios.idNegocio = pertenece.idNegocio AND pertenece.idCliente = personas.idCliente AND negocios.idEtapa = etapasventas.idEtapa\");\n\t\t\t$stm->execute();\n\n\t\t\treturn $stm->fetchAll(PDO::FETCH_OBJ);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "cf999d5236df4a5e09699f8bb3ef04c8", "score": "0.56409395", "text": "function getTodosTipoDocumento(){\n require_once $_SERVER['DOCUMENT_ROOT'] . \"/repitelramo/entidades/tipoDocumento.php\";\n require_once $_SERVER['DOCUMENT_ROOT'] . \"/repitelramo/persistencia/daoTipoDocumento.php\";\n\n $lista = consultarTiposDocumento();\n \n return $lista;\n }", "title": "" }, { "docid": "16dcb33ed56175311268e4f39838ffbe", "score": "0.5635496", "text": "function listarUnActoPorIdyTitulo($id, $titulo) {\r\n $query = \"SELECT programas.id_Programa \r\n FROM programas \r\n WHERE programas.id_Programa LIKE \".$id.\" AND programas.titulo LIKE '\".$titulo.\"';\";\r\n $database = new Database();\r\n $resultado = $database->getConn()->query($query);\r\n \r\n $arrayMedios = array();\r\n $programa = new Programa();\r\n\r\n while ($row = $resultado->fetch(PDO::FETCH_ASSOC)) {\r\n $programa->id=$row[\"id_Programa\"];\r\n }\r\n return $this->listarUnActoPorId($programa->id);\r\n }", "title": "" }, { "docid": "3a578b86466e7e7ffe4ddcc9289db4da", "score": "0.56302327", "text": "public function ListarOrdenados() {\n $consulta = $this->createQueryBuilder('p')\n ->where('p.estado = 1')\n ->orderBy('p.fechapublicacion', 'DESC');\n\n $lista = $consulta->getQuery()->getResult();\n return $lista;\n }", "title": "" }, { "docid": "5338d5d32789c2a3aabedd3950814b51", "score": "0.5626093", "text": "function listarPuntoVentaRbol(){\r\n\t\t$this->procedimiento='vef.ft_reporte_ventas';\r\n\t\t$this->transaccion='VF_PUVERB_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t// $this->captura('id_punto_venta','int4');\r\n\t\t// $this->captura('nombre','varchar');\r\n\t\t// $this->captura('descripcion','text');\r\n\t\t$this->captura('codigo','varchar');\r\n\t\t// $this->captura('tipo','varchar');\r\n\t\t// $this->captura('office_id', 'varchar');\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t// echo $this->consulta;exit;\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "66a682b06ef25879db30a4ed585cfa93", "score": "0.56240654", "text": "public function MostrarTiposDependencia() {\r\n\r\n\r\n $tipos = array();\r\n $Conexion = conectar_bd();\r\n $Conexion->conectarse();\r\n\r\n $info_tipos = $Conexion->ejecutar(\"select * from programas\");\r\n $i = 0;\r\n while ($renglon = mysql_fetch_array($info_tipos)) {\r\n $objeto = new programa();\r\n $objeto->setidPrograma($renglon['id_programa']);\r\n $objeto->setNombrePrograma($renglon['nombre_programa']);\r\n \r\n array_push($tipos, $objeto);\r\n }\r\n\r\n $Conexion->desconectarse();\r\n return $tipos;\r\n }", "title": "" }, { "docid": "3f07bcacd73b0ef72270941aa58572ba", "score": "0.56157947", "text": "public function listar_tema()\n {\n \t$consulta=$this->db->query(\"SELECT * FROM temas WHERE id = '{$this->id}';\");\n \twhile($filas=$consulta->fetch_assoc()){$this->tema[]=$filas;}\n \treturn $this->tema;\n }", "title": "" }, { "docid": "249018f5c800fbaec7afadba84a613d6", "score": "0.56006104", "text": "public function listar_cargos_controlador(/*$privilegio,$codigo*/){\n\t\t\t\n\t\t\n\t\t\t//$privilegio=mainModel::limpiar_cadena($privilegio);\n\t\t\t//$codigo=mainModel::limpiar_cadena($codigo);\n\t\t\t\n\n\t\t\t$tabla=\"\";\n\n\t\t\t\n\n\t\t\t\n\t\t\t//$consulta=\"SELECT SQL_CALC_FOUND_ROWS * FROM departemento\" /*WHERE CuentaCodigo!='$codigo' AND id!='1' ORDER BY AdminNombre*/;\n\t\t\t//$paginaurl=\"adminlist\";\n\t\t\t//$consulta=\"SELECT SQL_CALC_FOUND_ROWS * FROM cargo ORDER BY cargonombre\";\n\t\t\t\n\t\t\t//Consulta de los cargos registrados en el sistema, para la búsqueda se utilizo la plantilla Genetella Master\n\t\t\t$consulta=\"SELECT *,T2.cargocodigo as id_pl FROM departemento as T1 INNER JOIN cargo as T2 on T1.departamentocodigo=T2.departamentocodigo ORDER BY cargonombre\";\n\n\t\t\t$conexion = mainModel::conectar();\n\n\t\t\t$datos = $conexion->query($consulta);\n\t\t\t$datos= $datos->fetchAll();\n\n\t\t\t\n\n\t\t\n\t\t\t//InicioTabla_______________________________________________________________\n\t\t\t$tabla.='\n\t\t\t\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th><center>#</center></th>\n\t\t\t\t\t\t\t<th><center>EMPRESA</center></th>\n\t\t\t\t\t\t\t<th><center>NOMBRE</center></th>\n\t\t\t\t\t\t\t\n\t\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t\t<th><center>ACCIONES</center></th>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t';\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t$tabla.='</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>';\n\n\t\t\t\t\n\t\t\t\t$contador=0;\n\t\t\t\tforeach ($datos as $rows) {\n\t\t\t\t\t$contador=$contador+1;\n\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td><center>'.$contador.'</center></td>\n\t\t\t\t\t\t\t<td><center>'.$rows['departamentonombre'].'</center></td>\n\t\t\t\t\t\t\t<td><center>'.$rows['cargonombre'].'</center></td>\n\t\t\t\t\t\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t\t<td><center>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<form method=\"POST\" action=\"'.SERVERURL.'cargosinfo/\">\n\t\t\t\t\t\t\t\t<input type=\"hidden\" value=\"'.$rows['cargocodigo'].'\" name=\"codigo\">\n\t\t\t\t\t\t\t\t<button style=\"font-size:15px; borderbox:0px; width:100px;\" type=\"submit\" class=\"btn btn-primary\"><i class=\"fa fa-edit\" onclick=\"editbtnmenu\"></i> Editar</button>\n\t\t\t\t\t\t\t\t</form> \n \n\t\t\t\t\t\t\t</center></td>\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t';\n\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\t\t/*$tabla.='\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<form action=\"'.SERVERURL.'ajax/administradorAjax.php\" method=\"POST\" class=\"FormularioAjax\" data-form=\"delete\" entype=\"multipart/form-data\" autocomplete=\"off\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"codigo-del\" value=\"'.mainModel::encryption($rows['CuentaCodigo']).'\"></input>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"privilegio-admin\" value=\"'.mainModel::encryption($privilegio).'\"></input>\n\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-danger btn-raised btn-xs\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"zmdi zmdi-delete\"></i>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<div class=\"RespuestaAjax\"></div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t';*/\n\t\t\t\t\t\t}\t\n\t\t\t$tabla.='\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t';\n\t\t\t\t\t//$contador++;\n\t\t\t\t//}\n\t\t\t\n\n\t\t\t$tabla.='\n\t\t\t\t\t</tbody>\n\t\t\t\t';\n\t\t\t//Fin Tabla__________________________________________________________________\n\n\t\t\t\n\n\t\t\treturn $tabla;\n\t\t}", "title": "" }, { "docid": "49a802339bf073b6a3f91017a7199aac", "score": "0.5597812", "text": "function listarPersonaComunicacion(){\n\t\t$this->procedimiento='dir.f_persona_comunicacion_sel';\n\t\t$this->transaccion='DIR_PERCOM_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_persona_comunicacion','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_tipo_comunicacion','int4');\n\t\t$this->captura('valor','varchar');\n\t\t$this->captura('id_persona','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t\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}", "title": "" }, { "docid": "1153779c967dab5088d94b8cb15b75e0", "score": "0.55961007", "text": "protected function listar() {\r\n\r\n\t\t$pagamentos = $this->pagamentos;\r\n\t\t$tipos = $this->tipos;\r\n\r\n\t\t$lista=\"\";\r\n\t\t//$valores_db = mysql_query();\r\n\r\n\t\t$query = \"SELECT * FROM despesas\";\r\n\r\n\t\t$valores_db = $this->model->query($query);\r\n\t\t$letra = \"B\";\r\n\r\n\r\n\t\twhile ($linha = mysql_fetch_array($valores_db)) {\r\n\r\n\t\t\tif ($letra==\"B\") {\r\n\t\t\t\t$letra=\"A\";\r\n\t\t\t}elseif ($letra==\"A\") {\r\n\t\t\t\t$letra = \"B\";\r\n\t\t\t}\r\n\r\n\r\n\t\t\t$lista.= \"\r\n\r\n\t\t\t<tr class='grade\".$letra.\"'>\r\n\t\t\t<td class='center'>\".($linha[\"id\"]).\"</td>\r\n\t\t\t<td class='center'>\".htmlspecialchars($linha[\"titulo\"]).\"</td>\r\n\t\t\t<td class='center'>R$ \".number_format($linha[\"valor\"],2).\"</td>\r\n\t\t\t<td class='center'>\".$linha[\"data\"].\"</td>\r\n\t\t\t<td class='center'>\".$tipos[$linha[\"tipo\"]].\"</td>\r\n\t\t\t<td class='center'>\".$pagamentos[$linha[\"pagamento\"]].\"</td>\";\r\n\r\n\r\n\t\t\tif ($linha[\"vencimento\"]!=\"\") {\r\n\t\t\t\t$lista.= \"\r\n\t\t\t\t<td class='center'>\".$linha[\"vencimento\"].\"</td>\";\r\n\t\t\t}else{\r\n\t\t\t\t$lista.= \"\r\n\t\t\t\t<td class='center'>\".$linha[\"data\"].\"</td>\";\r\n\t\t\t}\r\n\r\n\t\t\t$lista.= \"\r\n\t\t\t<td class='actBtns'>\r\n\t\t\t<a href='\".URL.$_GET[\"var1\"].\"/Editar/\".$linha[\"id\"].\"' title='Editar' class='tipS'>\r\n\t\t\t<img src='\". Folder.\"images/icons/control/16/pencil.png' alt='' /> \r\n\t\t\t</a> \r\n\t\t\t<a href='\".URL.$_GET[\"var1\"].\"/Deletar/\".$linha[\"id\"].\"' title='Deletar' class='tipS'>\r\n\t\t\t<img src='\". Folder.\"images/icons/control/16/clear.png' alt='' />\r\n\t\t\t</a>\r\n\t\t\t</td>\r\n\t\t\t</tr>\";\r\n\r\n\t\t}\r\n\r\n\t\t$this->view->lista = $lista;\r\n\r\n\t}", "title": "" }, { "docid": "c7a6de9f75f4d69068bf3498684bfb4a", "score": "0.5592232", "text": "function listar($Id_Pedido)\r\n\t{\r\n\t\t\r\n\t\t$Consulta = '\r\n\t\t\tselect id_pedido_adjuntos as id_pa, url, nombre_adjunto, tipo_adjunto\r\n\t\t\tfrom cliente clie, procesos proc, pedido ped, pedido_adjuntos pead\r\n\t\t\twhere clie.id_cliente = proc.id_cliente and proc.id_proceso = ped.id_proceso\r\n\t\t\tand ped.id_pedido = pead.id_pedido and pead.id_pedido = \"'.$Id_Pedido.'\"\r\n\t\t';\r\n\t\t\r\n\t\t$Resultado = $this->db->query($Consulta);\r\n\t\t\r\n\t\t$Adjuntos = array();\r\n\t\t\r\n\t\tforeach($Resultado->result_array() as $Fila)\r\n\t\t{\r\n\t\t\t$Adjuntos[$Fila['id_pa']] = '{';\r\n\t\t\t$Adjuntos[$Fila['id_pa']] .= '\"i\":\"'.$Fila['id_pa'].'\",';\r\n\t\t\t$Adjuntos[$Fila['id_pa']] .= '\"n\":\"'.$Fila['nombre_adjunto'].'\",';\r\n\t\t\t$Adjuntos[$Fila['id_pa']] .= '\"t\":\"'.$Fila['tipo_adjunto'].'\",';\r\n\t\t\t$Adjuntos[$Fila['id_pa']] .= '\"url\":\"'.$Fila['url'].'\"';\r\n\t\t\t$Adjuntos[$Fila['id_pa']] .= '}';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn implode(',', $Adjuntos);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "91747b5b810ca1d6603fe5db15be31cc", "score": "0.5591009", "text": "public function RptListar(){\r\n $sql=\"SELECT \r\n idmacceso, \r\n cod_macceso, \r\n desc_macceso,\r\n estatus\r\n FROM tbmacceso\r\n ORDER BY cod_macceso ASC\";\r\n return ejecutarConsulta($sql);\r\n }", "title": "" }, { "docid": "10b2c39a9e4d8634c2ecd8064c84edf5", "score": "0.5588009", "text": "function listarItems($cadena) {\n global $sql;\n $respuesta = array();\n $consulta = $sql->seleccionar(array('tipos_venta'), array('id', 'nombre'), 'nombre LIKE \"%' . $cadena . '%\" AND activo = \"1\" ', '', 'nombre ASC', 0, 20);\n\n while ($fila = $sql->filaEnObjeto($consulta)) {\n $respuesta1 = array();\n $respuesta1['label'] = $fila->nombre;\n $respuesta1['value'] = $fila->id;\n $respuesta[] = $respuesta1;\n }\n\n Servidor::enviarJSON($respuesta);\n}", "title": "" }, { "docid": "4c507669a2a5f69c2d18422ded95d68f", "score": "0.55867237", "text": "public function test_notes_list()\n {\n //Having\n Recursos::create(['titol' => 'Test',\n 'subTitol'=>'Test para probar creacion',\n 'descDetaill1'=>'Estamos construyendo un buen sitio',\n 'creatPer'=>'Nico'\n ]);\n // When\n $this->visit('resource/list')\n ->see('Test')\n ->see('Nico')\n ->see('Estamos construyendo un buen sitio')\n ->see('Test para probar creacion');\n }", "title": "" }, { "docid": "b148cb10144026f98192f550c945f4df", "score": "0.55853677", "text": "public function listPersos() {\r\n $query = $this->_db->prepare('SELECT * FROM tpcombat');\r\n $query->execute();\r\n $donnees = $query->fetchAll();\r\n\r\n return $donnees;\r\n }", "title": "" }, { "docid": "0b1377edf06a82cbd19bedb06081a2e0", "score": "0.557917", "text": "function listarValorDescripcion(){\n\t\t$this->procedimiento='vef.ft_valor_descripcion_sel';\n\t\t$this->transaccion='VF_vald_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_valor_descripcion','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('valor','varchar');\n\t\t$this->captura('id_tipo_descripcion','int4');\n\t\t$this->captura('obs','varchar');\n\t\t$this->captura('id_venta','int4');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\t\t\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('columna','numeric');\n\t\t$this->captura('fila','numeric');\n\t\t$this->captura('obs_tipo','varchar');\n\t\t$this->captura('valor_label','varchar');\n\t\t\n\t\t\n\t\t\n\t\t\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}", "title": "" }, { "docid": "50b6fc314476c3fffc27d8be7acd1225", "score": "0.5564336", "text": "function ProcesarAtajos($cuerpo) \n\t{\n\t\t$patron = \"/\\(atajo\\)(.*?)\\(atajofin\\)/s\";\n\t\tpreg_match_all($patron, $cuerpo, $encontrados);\n\t\n\t\t//los que encuentro\n\t\t$arregloAtajos = $encontrados[1];\n\t\t$arregloTagModificar = $encontrados[0];\n\n\t\tfor ($i = 0; $i < count($arregloAtajos); $i++) \n\t\t{\n\t\t\t\t\n\t\t\t\t/*proceso la cantida de columnas*/\n\t\t\t\t$patronCols = \"/\\(Col\\)(.*)\\(Col\\)/s\";\n\t\t\t\tpreg_match_all($patronCols, $arregloAtajos[$i], $encontradosCols);\n\t\t\t\t$columnas = $encontradosCols[1][0];\n\t\t\t\t\n\t\t\t\t//proceso la clase del atajo\n\t\t\t\t$patronDesc = \"/\\(Cl\\)(.*)\\(Cl\\)/s\";\n\t\t\t\tpreg_match_all($patronDesc, $arregloAtajos[$i], $encontradosClass);\n\t\t\t\t$Class = $encontradosClass[1][0];\n\t\t\t\t\n\t\t\t\t//proceso la clase del atajo\n\t\t\t\t$patronDesc = \"/\\(Ic\\)(.*)\\(Ic\\)/s\";\n\t\t\t\tpreg_match_all($patronDesc, $arregloAtajos[$i], $encontradosIconos);\n\t\t\t\t$Iconos = $encontradosIconos[1][0];\n\t\t\t\t\n\t\t\t\t//proceso la clase del atajo\n\t\t\t\t$patronDesc = \"/\\(Tex\\)(.*)\\(Tex\\)/s\";\n\t\t\t\tpreg_match_all($patronDesc, $arregloAtajos[$i], $encontradosTextos);\n\t\t\t\t$Texto = $encontradosTextos[1][0];\n\t\t\t\t\n\t\t\t\t//proceso la clase del atajo\n\t\t\t\t$patronDesc = \"/\\(Link\\)(.*)\\(Link\\)/s\";\n\t\t\t\tpreg_match_all($patronDesc, $arregloAtajos[$i], $encontradosLink);\n\t\t\t\t$Link = $encontradosLink[1][0];\n\t\t\t\t\n\t\t\t\t$html ='<div class=\"col-md-'.$columnas.' col-sm-'.($columnas+1).'\">';\n\t\t\t\t$html .='<a class=\"shortcut\" href=\"'.$Link.'\">';\n\t\t\t\t$html.='<span class=\"'.$Class.'\">';\n\t\t\t\t$html.='<span class=\"glyphicon '.$Iconos.'\"></span>';\n\t\t\t\t$html.='</span>';\n\t\t\t\t$html.='<h3>'.$Texto.'</h3>';\n\t\t\t\t$html.='</a></div>';\n\t\t\t\n\t\t\t//remplazo por cambios\n\n\t\t\t$cuerpo = str_ireplace($arregloTagModificar[$i], $html, $cuerpo);\n\t\t\n\t\t}\n\t\treturn $cuerpo;\n\t}", "title": "" }, { "docid": "ea55bcbbfddc763be7d396a93ceda7a7", "score": "0.5562914", "text": "function listarUnActoPorTitulo($titulo) {\r\n $query = \"SELECT programas.id_Programa FROM programas WHERE programas.titulo LIKE '\".$titulo.\"';\";\r\n $database = new Database();\r\n $resultado = $database->getConn()->query($query);\r\n \r\n $arrayMedios = array();\r\n $programa = new Programa();\r\n\r\n while ($row = $resultado->fetch(PDO::FETCH_ASSOC)) {\r\n $programa->id=$row[\"id_Programa\"];\r\n }\r\n return $this->listarUnActoPorId($programa->id);\r\n }", "title": "" }, { "docid": "2c9c055ff84a19a870c8b668eb03f061", "score": "0.5557561", "text": "public function obtenerTodos() {\n $query = $this->getDb()->prepare('SELECT * FROM paises ORDER BY nombre ASC');\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "634ab814ddb898489b2d89990db3dbd7", "score": "0.55521077", "text": "public function listar_temas()\n {\n \t$consulta=$this->db->query(\"SELECT * FROM temas ORDER BY id ASC;\");\n \twhile($filas=$consulta->fetch_assoc()){$this->temas[]=$filas;}\n \treturn $this->temas;\n }", "title": "" }, { "docid": "2fd572ac0d32e8f4869b8651e8194365", "score": "0.5545449", "text": "public function ListarEjecutores()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$result = array();\n\n\t\t\t$stm = $this->pdo->prepare(\"\n\t\t\t\tSELECT * FROM proyecto a\n\t\t\t\tINNER JOIN responsable_proyecto b ON b.id_proyecto = a.id_proyecto\n\t\t\t\tINNER JOIN usuarios c ON c.id_usuario = b.id_responsable\n\t\t\t\tWHERE a.estado = 1\");\n\t\t\t$stm->execute();\n\n\t\t\treturn $stm->fetchAll(PDO::FETCH_OBJ);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "7bd91a4b77ed3981e4f1343821cf44d1", "score": "0.55396026", "text": "public function ListaProcesos() {\n $stmt = $this->objPdo->prepare(\"\nselect * from PROTABLAGENDET\nwhere tabgen_id = '19' and eliminado = '0'\n\n \");\n $stmt->execute();\n $maq = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $maq;\n }", "title": "" }, { "docid": "4c0911ef74c125e2745f36761c3fd959", "score": "0.55344", "text": "public function listar()\n {\n }", "title": "" }, { "docid": "74a9a552b4dcda0d69b6aebf87347cf8", "score": "0.55321956", "text": "public function ultimasEncomiendas(){\n $sql = \"SELECT e.idencomienda, CONCAT(p.nombres,' ',p.apellidos) as nombre, e.monto, e.estado\n FROM encomienda e\n INNER JOIN persona p\n ON e.personaid = p.idpersona\n ORDER BY e.idencomienda DESC LIMIT 10\"; //ORDENANDO DESCENDENTE, ULTIMOS 10 PEDIDOS\n $request = $this->listar($sql);\n return $request;\n }", "title": "" }, { "docid": "51f5c7f54f361f86b04a7b0519a2d982", "score": "0.5530536", "text": "function listarReciboDescripcion(){\r\n\t\t$this->procedimiento='vef.ft_venta_sel';\r\n\t\t$this->transaccion='VF_VENDESREP_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\t\t$this->setCount(false);\r\n\r\n\t\t$this->setParametro('id_venta','id_venta','integer');\r\n\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('nombre','varchar');\r\n\t\t$this->captura('columna','numeric');\r\n\t\t$this->captura('fila','numeric');\r\n\t\t$this->captura('valor','varchar');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "b523dd56dfda8ff379911295840963f9", "score": "0.55290514", "text": "public function listarPesquisa($campoPesquisa){\n $conexao = Conexao::pegarConexao();\n $querySelect = \"select idProduto,nomeProduto,unidadeProduto,precoProduto,\n fotoProduto\n from tbproduto\n where nomeProduto like '$campoPesquisa' or like '$campoPesquisa'\";\n $resultado = $conexao->query($querySelect);\n $lista = $resultado->fetchAll();\n return $lista; \n }", "title": "" }, { "docid": "77b91d1e2a42a64754784d626190d5a2", "score": "0.5527934", "text": "public function apresentar() {\n echo \"{$this->nome}, {$this->idade} anos! <br>\"; \n\n }", "title": "" }, { "docid": "6ae14829209f8d3ae4d780c7d0558ee6", "score": "0.5526393", "text": "function get_parceiros() \n\t{\n\t\t\t$params = array(\n\t\t\t\t'where'\t\t=> 't.bairro LIKE \"%'.$_POST['s'].'%\"', \n\t\t\t\t'limit'\t\t=> 15\n\t\t\t); \n\n\t\t\t$html = '';\n\n\t\t\t// Create and find in one shot \n\t\t\t$parceiros = pods( 'parceiro', $params ); \n\n\t\t\tif ( 0 < $parceiros->total() ):\n\t\t\t\twhile ( $parceiros->fetch() ):\n\t \n\t\t\t$html .= \"\n\t\t\t\t<div class='col-xs-6 col-sm-3 col-md-15 col-lg-15'> \n\t\t\t\t\t<div style='background-image: url(\".$parceiros->display('logomarca').\");'></div> \n\t\t\t\t\t<h4>\n\t\t\t\t\t\t\".$parceiros->display('bairro').\"-\".$parceiros->display('estado').\"\n\t\t\t\t\t</h4>\t\n\t\t\t\t\t\n\t\t\t\t\t<form action='/cardapio' method='post'>\n\t\t\t\t\t\t<input type='hidden' name='parceiro' value='\".$parceiros->display('id').\"' />\n\t\t\t\t\t\t<input type='submit' value='Selecionar'/>\n\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t</div>\";\n\n\t\t\t\tendwhile; // end of books loop \n\t\t\tendif;\n\n\t\t\techo $html;\n\n\t\t// Don't forget to stop execution afterward.\n\t\twp_die();\n\t}", "title": "" }, { "docid": "c4be0a7f3418cb829fb6468d32b88b6e", "score": "0.5526076", "text": "public function listarTienda(){\n $sql = \"SELECT * FROM tienda\";\n return ejecutarConsulta($sql);\n }", "title": "" }, { "docid": "35e8d4da5e8e38a78c55a46cd3c1986b", "score": "0.5515868", "text": "public function getTodos() {\n //On établit la connection à la BDD\n $pdo = $this->getConnection();\n\n // On récupère nos données\n $query = 'SELECT * FROM todos'; // Ceci est juste une chaine de caractères\n\n $PdoStatement = $pdo->prepare($query);\n\n $PdoStatement->execute();\n\n // Debug : affichage du résultat\n // print_r($PdoStatement->fetchAll());\n\n // Je return le résultat de ma requête\n return $PdoStatement->fetchAll();\n }", "title": "" }, { "docid": "c29d0c6d73c9b76fad00be024c34b7d4", "score": "0.5510337", "text": "function listarDefProyecto(){\n\t\t$this->procedimiento='sp.ft_def_proyecto_sel';\n\t\t$this->transaccion='SP_DEFPROY_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_def_proyecto','int4');\n\t\t$this->captura('fecha_inicio_teorico','date');\n\t\t$this->captura('descripcion','text');\n\t\t$this->captura('fecha_fin_teorico','date');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_proyecto','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\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('desc_proyecto','varchar');\n\t\t$this->captura('codproyecto','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "e758c7d3c9b22e7831a2b60349bfc1f3", "score": "0.55078506", "text": "public function getAllInfo_parteEdificio ( $id_pE) {\r\n \r\n // create DB connection\r\n $con = connectDatabase();\r\n\r\n // select DB\r\n selectDatabase( $con );\r\n \r\n // select data\r\n $result = mysqli_query( $con, 'SELECT * FROM parte_edificio WHERE id_parte='.$id_pE );\r\n\r\n $row = mysqli_fetch_array( $result );\r\n \r\n // id of the object\r\n $this->setId_parteEdificio( $row['id_parte'] );\r\n \r\n // name of the object \r\n $this->setNome_parteEdificio( $row['nome_parte'] );\r\n \r\n // desciption of the object\r\n $this->setDesc_parteEdificio( $row['desc_parte'] );\r\n \r\n // type of the object\r\n $this->setTipo_parteEdifício( $row['tipo_parte'] );\r\n \r\n // path to the 3D model of the object\r\n $this->setModelPath_parteEdificio( $row['modelPath_parte'] );\r\n \r\n // close the DB\r\n mysqli_close( $con ); \r\n }", "title": "" }, { "docid": "5eee8665588886bc7cf631b1eb73017e", "score": "0.5500685", "text": "public function listar_todas($cadastro_faixa_entrega){\n $sql_usado = $cadastro_faixa_entrega === 'true'\n ? $this->sql_select_fe : $this->sql_select;\n $resultado = $this->conexao->query($sql_usado);\n\t\tif($resultado){\n\t\t\tif($resultado->num_rows > 0){\n\t\t\t\t//monta JSON de retorno\n\t\t\t\t$retorno = '[';\n\t\t\t\t$i = 1;\n\t\t\t\twhile($registro = $resultado->fetch_assoc()){\n\t\t\t\t\t$json = construirJSON($this->atributos,$registro);\t\t\t\t\t\n\t\t\t\t\t$retorno .= $json . ($i !== $resultado->num_rows ? ',' : '');\t//testa se eh a ultima posicao para por a virgula, para fins de boa construcao do JSON;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t$retorno .= ']';\n\t\t\t\techo $retorno;\n\t\t\t} else{\n\t\t\t\tdie('Nenhum resultado');\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\techo \"Query falhou\";\n\t\t}\n\t}", "title": "" }, { "docid": "3a6a055b887360c312f7ddc9988302d4", "score": "0.54997915", "text": "function mostrarTema($codForo){\r\n $conec=new Conexion(); \r\n $con=$conec->getConection(); \r\n // Ejecutar la consulta SQL\r\n $sql=\"SELECT titulo,autor,mensaje FROM foro WHERE codforo='$codForo'\";\r\n $result = pg_query($con,$sql);\r\n // Crear el array de elementos para la capa de la vista\r\n while ($row = pg_fetch_object($result)){\r\n $retornar = \"<l1><strong>\".$row->autor.\"</strong></l1><br>\";\r\n $retornar.=\"<l1><strong>\".$row->titulo.\"</strong></l1><br>\";\r\n $retornar.=\"<l1>\".$row->mensaje.\"</l1>\";\r\n }\r\n // Closing connection\r\n pg_close($con);\r\n return $retornar;\r\n}", "title": "" }, { "docid": "0472b4cf619a6a5b77f363e7facc9ab5", "score": "0.5499721", "text": "static function listaDesplegable($nombre, $contenido, $valorInicial = NULL, $clase = NULL, $id = NULL, $primerItem = NULL, $opciones = NULL) {\n global $sql;\n\n $codigo = ' <select name=\"' . $nombre . '\" ';\n\n if (!empty($id) && is_string($id)) {\n $codigo .= ' id=\"' . $id . '\" ';\n }\n\n if (!empty($clase) && is_string($clase)) {\n $codigo .= ' class=\"' . $clase . '\" ';\n }\n\n if (!empty($opciones) && is_array($opciones)) {\n\n foreach ($opciones as $atributo => $valor) {\n $codigo .= ' ' . $atributo . ' = \"' . $valor . '\" ';\n }\n }\n\n $codigo .= '>';\n\n if (!empty($primerItem) && is_string($primerItem)) {\n $codigo .= ' <option>' . $primerItem . '</option> ';\n }\n\n /* * * La lista debe ser generada a partir del resultado de una consulta ** */\n if (is_resource($contenido)) {\n while ($datos = $sql->filaEnArreglo($contenido)) {\n $codigo .= ' <option ' . $elegido . '>' . $datos[1] . '</option>';\n }\n\n /* * * La lista debe ser generada a partir de un arreglo ** */\n } elseif (is_array($contenido)) {\n\n foreach ($contenido as $valor => $texto) {\n\n if ($valor == $valorInicial) {\n $elegido = 'selected';\n } else {\n $elegido = '';\n }\n\n $codigo .= ' <option ' . $elegido . ' value=\"' . $valor . '\">' . $texto . '</option>';\n }\n }\n\n $codigo .= ' </select>';\n\n return $codigo;\n }", "title": "" }, { "docid": "b41111fb526c48bf4cd2529ef5f0e771", "score": "0.54935175", "text": "static public function mdlListarPropetarios (){\n $stmt = Conexion::conectar()->prepare(\"SELECT P.Id,P.IdPersona,PE.Nombre,PE.ApellidoPa,PE.ApellidoMa from propietario P inner join persona PE on PE.Id=P.IdPersona\"); \n $stmt -> execute();\n return $stmt -> fetchAll();\n $stmt -> close();\n $stmt -> null;\n }", "title": "" }, { "docid": "c13ff504e8f008926bd16fd8569d3eb6", "score": "0.54887927", "text": "function listarProvincias($conexion){\r\n\ttry{\r\n\t\t$consulta = \"SELECT * FROM PROVINCIAS ORDER BY NOMBRE\";\r\n \t$stmt = $conexion->query($consulta);\r\n\t\treturn $stmt;\r\n\t}catch(PDOException $e) {\r\n\t\treturn $e->getMessage();\r\n }\r\n}", "title": "" }, { "docid": "5606022129ded87d66ece25a27e225c0", "score": "0.5485188", "text": "public function consulta_test_tipos_de_posiciones_de_juego()\n\t{\n\t\t$test = $this->Participante_model->consulta_tipos_de_posiciones_de_juego();\n\t\t$expected_result = 'is_array';\n\t\t$test_name = 'Consulta de tipos de posiciones de juego';\n\t\t$notes = var_export($test, true);\n\t\t$this->unit->run($test, $expected_result, $test_name, $notes);\n\t}", "title": "" }, { "docid": "6bdfb9e69bbe31ff0fe9b0406bb847ef", "score": "0.5484654", "text": "public function Listar()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$result = array();\n\n\t\t\t$statement = $this->pdo->prepare(\"call up_listar_conceptos()\");\n\t\t\t$statement->execute();\n\n\t\t\tforeach($statement->fetchAll(PDO::FETCH_OBJ) as $r)\n\t\t\t{\n\t\t\t\t$per = new Concepto();\n\n\t\t\t\t$per->__SET('id_concepto', $r->id_concepto);\n\t\t\t\t$per->__SET('concepto', $r->concepto);\n\t\t\t\t\n\t\t\t\t$result[] = $per;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "0b15117638aab1e7a3d2024085cae381", "score": "0.5481625", "text": "public function Listas(){\n\t\t\t$sql=$this->db->query(\"CALL GET_LISTA_DEP\");\n\t\t\twhile($filas=$sql->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->entidad[]=$filas;\n\t\t\t}\n\t\t\treturn $this->entidad;\n\t\t}", "title": "" }, { "docid": "2331ffa7ca05521c5ba8e959577b862c", "score": "0.54781216", "text": "public function list_bienes(){\n $this->index();\n }", "title": "" }, { "docid": "c6521fba1c354fdc37925f9cac6aba03", "score": "0.5475965", "text": "function visualizzaPartecipanti($id_partita, $isAdmin) {\r\n $result = getPartecipanti($id_partita);\r\n $row = mysql_fetch_array($result);\r\n if ($row) {\r\n echo \"<ol>\";\r\n do {\r\n $partecipante = $row[\"NAME\"] . \" \" . $row[\"SURNAME\"];\r\n $userId = $row[\"ID\"];\r\n if ($isAdmin == 1) {\r\n echo \"<li style='line-height:25px;'>$partecipante <a href='#' onclick='cancellaUserPartita($userId,$id_partita)'><img style='vertical-align:text-bottom;' src='img/Remove_16x16.png' alt='Cancella partecipante' title='Cancella partecipante' /></a></li>\";\r\n } else {\r\n echo \"<li>$partecipante</li>\";\r\n }\r\n } while ($row = mysql_fetch_array($result));\r\n echo \"</ol>\";\r\n } else {\r\n echo \"<div class='info'>Non ci sono ancora partecipanti!</div>\";\r\n }\r\n}", "title": "" }, { "docid": "f631678e4fe75eb2a8346d50e9a91e7c", "score": "0.54729354", "text": "function CabeceraListado()\n\t{\n\t\t// Obtenemos la gama de colores a usar\n\t\t$gama_colores=InformesInmueblesPDF::ObtenerGamaColores($this->color);\t\t\n\t\t\n\t\t$this->pdf->SetFont('Arial','B',$this->tam_letra);\n\t\t$this->pdf->SetTextColor(0,0,0);\t\n\t\t$this->pdf->SetFillColor($gama_colores['cabecera'][0], $gama_colores['cabecera'][1], $gama_colores['cabecera'][2]);\n\t\t$this->pdf->SetWidths(array(280));\n\t\t$this->pdf->SetAligns(array(\"C\"));\n\n\t\tif(!is_null($this->pos_x))\n\t\t\t$this->pdf->SetX($this->pos_x);\n\t\t$this->pdf->Row(array(\"INMUEBLES\"),true);\t\n\t\t$this->pdf->SetFont('Arial','B',$this->tam_letra);\n\t\t$this->pdf->SetFillColor($gama_colores['cabecera2'][0], $gama_colores['cabecera2'][1], $gama_colores['cabecera2'][2]);\n\t\t$this->pdf->SetWidths(array(15,12,30,40,40,60,20,20,20,10,13));\n\t\t$this->pdf->SetAligns(array(\"C\",\"C\",\"C\",\"C\",\"C\",\"C\",\"C\",\"C\",\"C\",\"C\",\"C\"));\n\n\t\tif(!is_null($this->pos_x))\n\t\t\t$this->pdf->SetX($this->pos_x);\n\t\t$this->pdf->Row(array(\"Id.\",\"Certif.\",\"Tipología\",\"Municipio\",\"Zona\",\"Dirección\",\"Precio Compra\",\"Precio Alquiler\",\"Metros\",\"Hab.\",\"Baños\"),true);\t\t\t\t\t\n\t}", "title": "" }, { "docid": "bd9e217d6f3e3be8d36121898c3fc2b0", "score": "0.54654026", "text": "public function listleyparaAction()\n {\n if($this->getRequest()->isPost()) \n {\n $request = $this->getRequest(); \n if ($request->isPost()) { \n $data = $this->request->getPost(); \n $id = $data->id; // ID de la nomina \n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $d=new PlanillaFunc($this->dbAdapter); \n $valores=array\n (\n \"datos\" => $d->getCajaD($data->idPla, $data->idEmp),\n );\n $view = new ViewModel($valores); \n $this->layout('layout/blancoC'); // Layout del login\n return $view; \n }\n } \n }", "title": "" }, { "docid": "f927504d45b2db9a1bb1deb0d9915712", "score": "0.54626185", "text": "public function Listar()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$result = array();\n\n\t\t\t$stm = $this->pdo->prepare(\"SELECT * FROM vista_proy WHERE estado = 1 and nom_categoria = 'Perfil de proyecto'\n\t\t\tand year(inicio) >= year(now()) order by personas_beneficiarias desc\");\n\t\t\t$stm->execute();\n\n\t\t\treturn $stm->fetchAll(PDO::FETCH_OBJ);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "9d5bf1db3b23549811c9667c26afdc5e", "score": "0.54574454", "text": "function listarCanalVentaPuntoVenta() {\r\n\t\t$this->procedimiento='vef.ft_reporte_ventas';\r\n\t\t$this->transaccion='VF_CCANVE_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n\t\t//Definicion de la lista del resultado del query\r\n\r\n\t\t$this->captura('id_catalogo', 'int4');\r\n\t\t$this->captura('codigo', 'varchar');\r\n\t\t$this->captura('descripcion', 'varchar');\r\n\t\t$this->captura('orden', 'int4');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t// echo $this->consulta;exit;\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" } ]
64eb5bb627a19e3584840604c2224b64
print $sql; Output the players role
[ { "docid": "cf3ef6744871cf58532bb856b30b6208", "score": "0.0", "text": "function printPlayer($player, $count, $hlSeason) {\n if ($player['season'] == $hlSeason) {\n $class = \"currentSeason\";\n } else {\n $class = \"oSeason\";\n }\n\n print \"<tr class=\\\"$class\\\"><td>$count</td><td>{$player['name']}</td>\";\n print \"<td>{$player['season']}</td>\";\n print \"<td>{$player['pts']}</td></tr>\";\n}", "title": "" } ]
[ { "docid": "a1d7a8899e451343e96d91924bdfdf66", "score": "0.596734", "text": "private function role_list(){\n $results = $this->dt->role_list();\n echo $results;\n }", "title": "" }, { "docid": "780978400a089451d7b321cb4a4e2c84", "score": "0.5920951", "text": "function selectRole($user, $role) {\n $query = \"\tSELECT\t\tkuka.kuka \t\tAS 'kuka' \n\t\t\t\t\t, kuka.yhtio \t\t\tAS 'yhtio' \n\t\t\t\t\t, yhtio.nimi \t\t\tAS 'yhtionNimi' \n\t\t\t\t\t, TAMK_pankkitili.tilinro \tAS 'tilinro'\n\t\t\t\t\t, yhtio.ytunnus\t\t\tAS 'ytunnus'\n\t\t\t\tFROM\t\tkuka \n\t\t\t\tJOIN\t\tyhtio\n\t\t\t\tON\t\t\tkuka.yhtio = yhtio.yhtio \n\t\t\t\tJOIN\t\tTAMK_pankkitili\n\t\t\t\tON\t\t\tyhtio.ytunnus = TAMK_pankkitili.ytunnus\n\t\t\t\tWHERE\t\tkuka.kuka = '$user' \n\t\t\t\t\t\tAND yhtio.ytunnus = '$role'\n\t\t\t\t; \";\n\n print_result($query);\n}", "title": "" }, { "docid": "a8bf5f4b3b617b62c592a535f5e773ec", "score": "0.5631532", "text": "function ViewUsers(){\n\n if($_SESSION[\"role\"] == 1 ){\n\n $sql = \"SELECT u.username,r.name as role,t.name as team,l.name as league\n FROM server_user as u\n LEFT JOIN server_team as t\n ON t.id = u.team\n JOIN server_roles as r\n ON r.id = u.role\n LEFT JOIN server_league as l\n ON l.id = u.league\n \" ;\n\n $data = $this->db->doQuery($sql,array(),array());\n }\n if($_SESSION[\"role\"] == 2){\n\n $sql = \"SELECT u.username,r.name as role,t.name as team,l.name as league\n FROM server_user as u\n RIGHT JOIN server_team as t\n ON t.id = u.team\n JOIN server_roles as r\n ON r.id = u.role\n LEFT JOIN server_league as l\n ON l.id = u.league\n where r.id BETWEEN ? and ?\" ;\n $intial = 3;\n $final = 4;\n\n $data = $this->db->doQuery($sql,array($intial,$final),array(PDO::PARAM_INT,PDO::PARAM_INT));\n\n\n }\n\n if($_SESSION[\"role\"] == 3 ||$_SESSION[\"role\"] == 4){\n\n $sql = \"SELECT u.username,r.name as role,t.name as team\n FROM server_user as u\n JOIN server_team as t\n ON t.id = u.team\n JOIN server_roles as r\n ON r.id = u.role\n LEFT JOIN server_league as l\n ON l.id = u.league\n where r.id BETWEEN ? and ? and t.id = ?\" ;\n $intial = 3;\n $final = 5;\n $team = $_SESSION[\"team\"];\n\n $data = $this->db->doQuery($sql,array($intial,$final,$team),\n array(PDO::PARAM_INT,PDO::PARAM_INT,PDO::PARAM_INT));\n\n\n }\n\n if($_SESSION[\"role\"] == 5){\n\n $sql = \"SELECT u.username,r.name as role,t.name as team\n FROM server_user as u\n JOIN server_team as t\n ON t.id = u.team\n JOIN server_roles as r\n ON r.id = u.role\n where t.id = ? \" ;\n $intial = $_SESSION[\"team\"];\n\n\n $data = $this->db->doQuery($sql,array($intial),array(PDO::PARAM_INT));\n\n\n }\n\n\n if($_SESSION[\"role\"] <5){\n foreach ($data as &$value){\n\n $username = $value[\"username\"];\n $role = $value[\"role\"];\n $role_name = $username.\"role\";\n\n if( !empty($value[\"team\"])){\n $team = $value[\"team\"];\n $team_name = $username.\"team\";\n }\n $user_name = $username.\"user\";\n if( !empty($value[\"league\"])){\n $league = $value[\"league\"];\n $league_name = $username.\"league\";\n\n }\n\n\n\n\n $value[\"username\"] = \"<input type='radio' name='username' value='$username'>\n <input type='text' name='$user_name' value='$username' readonly>\";\n //$value[\"role\"] = FN::arrangeDropdown($role,$role_name,\"server_roles\",\"role\");;\n //$roles = $db->getInstances(\"server_roles\");\n\n $value[\"role\"] = \"<select name=$role_name>\";\n\n\n $role_id = $_SESSION[\"role\"] ;\n $sql = \"SELECT name FROM server_roles where id >= ?\";\n $db_array = $this->db->doQuery($sql,array($role_id),array(PDO::PARAM_INT));\n\n $select = FN::drop_down($db_array,$role, \"role\");\n\n foreach($select as $row){\n\n\n $value[\"role\"] = $value[\"role\"].$row;\n\n }\n $value[\"role\"] = $value[\"role\"].\"</select>\" ;\n\n\n if( !empty($value[\"team\"])){\n\n $team = $value[\"team\"];\n $value[\"team\"] = FN::arrangeDropdown($team,$team_name,\"server_team\",\"team\");\n\n }\n\n\n if( !empty($value[\"league\"])){\n\n $league = $value[\"league\"];\n\n $value[\"league\"] = FN::arrangeDropdown($league,$league_name,\"server_league\",\"league\");\n\n }\n\n\n }\n }\n\n\n return $data;\n\n }", "title": "" }, { "docid": "3a5e78ac990e03ac71cdddd60a7cd4d6", "score": "0.5602737", "text": "function mostrar_rol($con)\n {\n\n $sqlr = \"SELECT id, nombre_rol FROM roles;\";\n\n $queryr = mysqli_query($con, $sqlr);\n\n return $queryr;\n\n }", "title": "" }, { "docid": "5547957927f244cccdc87eff0b35a978", "score": "0.5523876", "text": "function print_role($roleid = 0)\n{\n global $ilance, $myapi, $phrase;\n $sqlroles = $ilance->db->query(\"\n SELECT title\n FROM \" . DB_PREFIX . \"subscription_roles\n WHERE roleid = '\".intval($roleid).\"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sqlroles) > 0)\n {\n $roles = $ilance->db->fetch_array($sqlroles);\n return stripslashes($roles['title']);\n }\n return $phrase['_no_role'];\t\n}", "title": "" }, { "docid": "7a7520d781882fcc57437f6f27244aad", "score": "0.543391", "text": "public function printPlayers()\n {\n foreach ($this->getPlayers() as $playerName => $playerRating)\n {\n echo '[' . $playerName . ']: ' . $playerRating . \"<br />\";\n }\n }", "title": "" }, { "docid": "39e4c562eac324a71e949d0ff3a2b55c", "score": "0.5406295", "text": "function displayCrewStatusTableRows($db) {\n $stmt = $db->query('SELECT name, primaryRole, status FROM crew LEFT JOIN roles on crew.primaryRole = roles.role WHERE status IS NOT NULL ORDER BY status, roles.roleSortOrdinal, name');\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n // Output into table\n foreach ($result as $row) {\n print('<tr>');\n print('<td>' . $row['name'] . '</td>');\n print('<td>' . $row['primaryRole'] . '</td>');\n print('<td class=\"' . $row['status'] . '\">' . $row['status'] . '</td>');\n print('</tr>');\n }\n}", "title": "" }, { "docid": "f53bb442cf0aad95c50c705144fe89d2", "score": "0.5332863", "text": "function showplayers(){\r\n $sql=\"SElECT nick From team where clan='' \";\r\n $db = config::getConnexion();\r\n try{\r\n $list=$db->query($sql);\r\n return $list;\r\n }\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n } \r\n }", "title": "" }, { "docid": "e2676ddac00e01dbd06adf1e5c4c9a00", "score": "0.53011453", "text": "function printNameResult($result) {\n\t\t\t\t\t\techo \"<br>Players who have bought all of our games:<br>\";\n\t\t\t\t\t\techo '<table class=\"table table-striped\">';\n\t\t\t\t\t\techo \"<tr>\n\t\t\t\t\t\t\t\t<th>Player name</th>\n\t\t\t\t\t\t\t\t<th>Balance</th>\n\t\t\t\t\t\t\t\t<th>Game Point</th>\n\t\t\t\t\t\t\t\t<th>Email</th>\n\t\t\t\t\t\t\t\t<th>Join Date</th>\n\t\t\t\t\t\t\t</tr>\";\n\n\t\t\t\t\t\twhile ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n\t\t\t\t\t\t\techo \"<tr>\n\t\t\t\t\t\t\t<td>\" . $row[0] . \"</td>\n\t\t\t\t\t\t\t<td>\" . $row[1] . \"</td>\n\t\t\t\t\t\t\t<td>\" . $row[2] . \"</td>\n\t\t\t\t\t\t\t<td>\" . $row[3] . \"</td>\n\t\t\t\t\t\t\t<td>\" . $row[4] . \"</td>\n\t\t\t\t\t\t\t</tr>\"; //or just use \"echo $row[0]\" \n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"</table>\";\n\t\t\t\t\t}", "title": "" }, { "docid": "218d567afdf31ab5f3b04e19764c87f2", "score": "0.5256028", "text": "function getBoardMembers()\n\t{\n\t\t/* Create query to retrieve family information */\n\t\t$query = \n\t\t\t\"SELECT user_id, username from users where role_id = 3\";\n\t\t\n\t\t/* Perform the query */\n\t\t$result = $this->connection->query($query) or die (\"An error occurred.\");\n\t\t\n\t\t/* Retrieve and echo results */\n\t\twhile ($row = $result->fetch_assoc()){\n\t\t\techo $row['user_id'] .\" \" . $row['username'] . \",\";\n\t\t};\n\t\t\n\t}", "title": "" }, { "docid": "fe22307f640382b564fc5a29a3f4c93c", "score": "0.5206422", "text": "function executeStatement($statement)\n {\n $statement->execute();\n $result = $statement->get_result();\n if ($result) {\n while ($row = $result->fetch_assoc()) {\n echo \"<tr>\";\n echo \"<td>\".$row[\"name\"].\"</td>\";\n echo \"<td>\".$row[\"level\"].\"</td>\";\n echo \"<td><img class='class-icon' src='\" . getClassIcon($row['class']) . \"'/></td>\";\n echo \"<td><img class='class-icon' src='\" . getRaceIcon($row['race'], $row['gender']) . \"'/></td>\";\n echo \"</tr>\";\n }\n } else \n {\n echo \"<p>No players online</p>\";\n }\n\n }", "title": "" }, { "docid": "7d809902ff85c70d7805d09f5b68b617", "score": "0.51852816", "text": "function select_sql() {\n\n // get attempts at this Reader activity\n list($attemptsql, $attemptparams) = $this->select_sql_attempts('userid');\n\n // get users who can access this Reader activity\n list($usersql, $userparams) = $this->select_sql_users();\n\n $usertype = $this->filter->get_optionvalue('usertype');\n switch ($usertype) {\n\n case reader_admin_reports_options::USERS_ENROLLED_WITHOUT:\n $raa_join = 'LEFT JOIN';\n $raa_join_u = 'raa.userid IS NULL';\n break;\n\n case reader_admin_reports_options::USERS_ENROLLED_ALL:\n $raa_join = 'LEFT JOIN';\n $raa_join_u = '(raa.userid IS NULL OR raa.userid = u.id)';\n break;\n\n case reader_admin_reports_options::USERS_ENROLLED_WITH:\n case reader_admin_reports_options::USERS_ALL_WITH:\n default: // shouldn't happen !!\n $raa_join = 'JOIN';\n $raa_join_u = 'raa.userid = u.id';\n break;\n\n }\n\n if ($this->output->reader->wordsorpoints==0) {\n $totalthisterm = 'totalwordsthisterm';\n $totalallterms = 'totalwordsallterms';\n } else {\n $totalthisterm = 'totalpointsthisterm';\n $totalallterms = 'totalpointsallterms';\n }\n\n $select = $this->get_userfields('u', array('username'), 'userid').', '.\n 'raa.countpassed, raa.countfailed, '.\n 'raa.averageduration, raa.averagegrade, '.\n \"raa.$totalthisterm, raa.$totalallterms,\".\n 'rl.startlevel, rl.currentlevel, rl.stoplevel, rl.allowpromotion, rl.goal';\n $from = '{user} u '.\n \"$raa_join ($attemptsql) raa ON $raa_join_u \".\n \"LEFT JOIN {reader_levels} rl ON (rl.readerid = :readerid AND rl.userid = u.id)\";\n if ($usersql) {\n $where = \"u.id $usersql\";\n } else {\n $where = 'u.id = 0'; // must keep MSSQL happy :-)\n }\n\n $params = $attemptparams + array('readerid' => $this->output->reader->id) + $userparams;\n\n return $this->add_filter_params($select, $from, $where, '', '', '', $params);\n }", "title": "" }, { "docid": "fdfda42cc41a4218cc99724dc5744ece", "score": "0.5184378", "text": "public function eduDetails(){\r\n\t $edu_sql=\"SELECT * from edu\";\r\n\t}", "title": "" }, { "docid": "925b358422fc1b58418a655c6753fb07", "score": "0.51757634", "text": "function showlogins()\n\t{\n\t\tglobal $tablepre,$wane_user,$db;\n\t\t$sql=$db->query(\"select username,logins from {$tablepre}member where username='$wane_user'\");\n\t\t$row=$db->row($sql);\n\t\treturn $row['logins'];\n\t}", "title": "" }, { "docid": "05785bab3ecba69012b6401581b38a25", "score": "0.516663", "text": "function PrintPlayerTable($playername, $which)\n\t{\n\t\techo \"<div class='playerdetail'>\";\n\t\tforeach($this->stats[$playername][\"custom\"][\"total\"][$which] as $playername => $value)\n\t\t{\n\t\t\techo \"<div class='playerdetailname'>\" . Helper::colorsToHtml($this->stats[$playername][\"custom\"][\"playername\"]) . \"</div><div class='playerdetailvalue'>\" . $value . \"</div>\\n<br/>\\n\";\n\t\t}\n\t\techo \"</div>\\n\";\n\t}", "title": "" }, { "docid": "dc40b2d99dfe6e6c19070b1a2ee6f6cf", "score": "0.5147089", "text": "public function printSql(): string\n {\n return $this->getQuery()->toSql();\n }", "title": "" }, { "docid": "c7398d565dfcb9ca8d19ae3370321872", "score": "0.5141093", "text": "function user_role($username) {\n global $db;\n $query = 'SELECT UserRole FROM Users\n WHERE userName = :username';\n $statement = $db->prepare($query);\n $statement->bindValue(':username', $username);\n $statement->execute();\n $row = $statement->fetch();\n $statement->closeCursor();\n return $row;\n}", "title": "" }, { "docid": "c5d209a1b3ff55c53c71f01278870bb1", "score": "0.5135252", "text": "function show_players(){\n global $mysqli;\n $sql = 'select count(*) as p from players where username is not null';\n $st = $mysqli->prepare($sql);\n $st->execute();\n $res = $st->get_result();\n $players = $res->fetch_assoc()['p'];\n return($players);\n }", "title": "" }, { "docid": "40c24cdb7acb0cd2c71ffb3a8b672cc6", "score": "0.51219773", "text": "public function toString(){\r\n echo $playerNum . $firstName . $lastName . $position . $bats . $throw . $age . $height . $weight . $birthPlace;\r\n }", "title": "" }, { "docid": "fff674e9befde2ac8d14ddd70ee7f121", "score": "0.511492", "text": "function selectAllMembers()\n {\n return 'SELECT * FROM users';\n }", "title": "" }, { "docid": "c139b6bacfff16c3ae74c660b565afb3", "score": "0.5096663", "text": "function echoPlayers() {\n $result = query ( \"Select * From pipboys\" ); \n echo (\"<option value=0>No One</option>\\n\" );\n while ($row = mysql_fetch_assoc ($result)) {\t\t\n $Owner = $row[\"ID\"]; \n $Username = $row[\"Username\"];\n $MAC = $row[\"MAC\"];\n $pos = strpos ( $MAC, \":\"); \n if ($pos !== false) { \n echo (\" <option value=\\\"$Owner\\\">$Username</option>\\n\" );\n } \n } \n }", "title": "" }, { "docid": "e97ecd99bc38f35f3e5a03a6ade1c227", "score": "0.5086121", "text": "function displayRace( ) {\n global $conn;\n $sql = \"select raceName, raceCourse from race\n \";\n $result = $conn->query($sql);\n displayResult($result, $sql);\n \n }", "title": "" }, { "docid": "9e7042e573d36d223602e8362ecbfd7d", "score": "0.5083551", "text": "function team($tID = '')\n{\n global $db,$teamRow,$l_team;\n//SQL\n if(!empty($tID)) $where = \"WHERE id = '\".intval($tID).\"' AND navi = 1\";\n else $where = \"WHERE navi = '1' ORDER BY RAND()\";\n\n $get = _fetch(db(\"SELECT * FROM \".$db['squads'].\" \".$where.\"\"));\n\n//Members\n $qrym = db(\"SELECT s1.squad,s2.id,s2.level,s2.nick,s2.status,s2.rlname,s2.bday,s4.position\n FROM \".$db['squaduser'].\" AS s1\n LEFT JOIN \".$db['users'].\" AS s2\n ON s2.id=s1.user\n LEFT JOIN \".$db['userpos'].\" AS s3\n ON s3.squad=s1.squad AND s3.user=s1.user\n LEFT JOIN \".$db['pos'].\" AS s4\n ON s4.id=s3.posi\n WHERE s1.squad='\".$get['id'].\"'\n AND s2.level != 0\n ORDER BY s4.pid\");\n $i=1;\n $cnt=0;\n while($getm = _fetch($qrym))\n {\n unset($tr1, $tr2);\n\n if($i == 0 || $i == 1) $tr1 = \"<tr>\";\n if($i == $teamRow)\n {\n $tr2 = \"</tr>\";\n $i = 0;\n }\n\n $status = ($getm['status'] == 1 || $getm['level'] == 1) ? _aktiv : _inaktiv;\n\n $info = 'onmouseover=\"DZCP.showInfo(\\'<tr><td colspan=2 align=center padding=3 class=infoTop>'.rawautor($getm['id']).'</td></tr><tr><td width=80px><b>'._posi.':</b></td><td>'.getrank($getm['id'],$get['id']).'</td></tr><tr><td><b>'._status.':</b></td><td>'.$status.'</td></tr><tr><td><b>'._age.':</b></td><td>'.getAge($getm['bday']).'</td></tr><tr><td colspan=2 align=center>'.jsconvert(userpic($getm['id'])).'</td></tr>\\')\" onmouseout=\"DZCP.hideInfo()\"';\n\n\n $member .= show(\"menu/team_show\", array(\"pic\" => userpic($getm['id'],40,50),\n \"tr1\" => $tr1,\n \"tr2\" => $tr2,\n \"squad\" => $get['id'],\n \"info\" => $info,\n \"id\" => $getm['id'],\n \"width\" => round(100/$teamRow,0)));\n $i++;\n $cnt++;\n }\n\n if(is_float($cnt/$teamRow))\n {\n for($e=$i;$e<=$teamRow;$e++)\n {\n $end .= '<td></td>';\n }\n $end = $end.\"</tr>\";\n }\n\n// Next / last ID\n $all = cnt($db['squads'], \"WHERE `navi` = '1'\");\n $next = _fetch(db(\"SELECT id FROM \".$db['squads'].\" WHERE `navi` = '1' AND `id` > '\".$get['id'].\"' ORDER BY `id` ASC LIMIT 1\"));\n if(empty($next)) $next = _fetch(db(\"SELECT id FROM \".$db['squads'].\" WHERE `navi` = '1' ORDER BY `id` ASC LIMIT 1\"));\n $last = _fetch(db(\"SELECT id FROM \".$db['squads'].\" WHERE `navi` = '1' AND `id` < '\".$get['id'].\"' ORDER BY `id` DESC LIMIT 1\"));\n if(empty($last)) $last = _fetch(db(\"SELECT id FROM \".$db['squads'].\" WHERE `navi` = '1' ORDER BY `id` DESC LIMIT 1\"));\n\n\n//Output\n $team = show(\"menu/team\", array(\"row\" => $teamRow,\n \"team\" => re($get['name']),\n \"id\" => $get['id'],\n \"next\" => $next['id'],\n \"last\" => $last['id'],\n \"br1\" => ($all <= 1 ? '<!--' : ''),\n \"br2\" => ($all <= 1 ? '-->' : ''),\n \"member\" => $member,\n \"end\" => $end));\n return '<div id=\"navTeam\">'.$team.'</div>';\n}", "title": "" }, { "docid": "9090d2f691d17ea6ba21a9fa44cf41d6", "score": "0.5070277", "text": "function getrole($connect , $role)\n\t{\n\t\t$query = mysqli_query($connect , \"SELECT * FROM staff_role WHERE role_id = '$role' \") ;\n\t\tif($query)\n\t\t{\n\t\t\t$fetch = mysqli_fetch_assoc($query) ;\n\t\t\t$return = $fetch['role_name'] ;\n\t\t\treturn $return ;\n\t\t}\n\t}", "title": "" }, { "docid": "75611ef4f28ca91bd386ccc700be448c", "score": "0.506028", "text": "function viewLevel(){\n\t$stmt = $this->tampil(\"SELECT * FROM `level`\");\n\treturn $stmt;\n}", "title": "" }, { "docid": "eb902c619490fb4b2ffb14c74b88507b", "score": "0.50587034", "text": "function displayAccessLevel() // isAdminMember()\r\n{\r\n $mysqli = connectdb();\r\n $access = \"\";\r\n $user = $_SESSION['uname'];\r\n $sql = \"SELECT initAccess, access from users WHERE userName='$user'\";\r\n $result = $mysqli->query($sql);\r\n\r\n if ($result->num_rows === 1) {\r\n $row = $result->fetch_array(MYSQLI_ASSOC);\r\n $access = $row['access'];\r\n\r\n if ($access == 1) {\r\n echo \"Admin\";\r\n }\r\n if ($access == 0) {\r\n echo \"Member\";\r\n }\r\n if ($access == 3) {\r\n echo \"Guest\";\r\n }\r\n }\r\n}", "title": "" }, { "docid": "68a0c13bb7d78ded52f80bbfa436475c", "score": "0.50407", "text": "function X1GetPlayerTeams($moderator=false,$uid){\n\tif(empty($uid)){\n\t\tAdminLog($output=\"Empty uid\", $function=\"X1GetPlayerTeams\", $title = 'Major Error',ERROR_DIE);\n\t}\n\n\t$teaminfo=SqlGetAll(X1_prefix.X1_DB_teamroster.\".team_id, \".X1_prefix.X1_DB_teams.\".*\",X1_DB_teamroster.\",\".X1_prefix.X1_DB_teams,\"where \".X1_prefix.X1_DB_teamroster.\".uid=\".MakeItemString($uid).\" and \".X1_prefix.X1_DB_teams.\".team_id=\".X1_prefix.X1_DB_teamroster.\".team_id\");\n\tif(empty($teaminfo)){\n\t\tAdminLog($output=\"Failed Database data retrieval\", $function=\"X1GetPlayerTeams\", $title = 'Sql Error',ERROR_DIE);\n\t}\n\t\t\n\t$output = DispFunc::X1PluginTitle(XL_aplayer_joined);\n\t$output .= \"\n\t<table class='\".X1plugin_playerprofiletable.\"' width='100%'>\n\t<thead class='\".X1plugin_tablehead.\"'>\n\t\t<tr> \n\t\t\t<th>\".XL_teamlist_hcountry.\"</th>\n\t\t\t<th>\".XL_teamlist_hname.\"</th>\n\t\t\t<th>\".XL_playerprofile_tags.\"</th>\n\t\t\t<th>\".XL_teamprofile_captain.\"</th>\n\t\t\t<th>\".XL_aplayer_remove.\"</th>\";\n\n\t$output .= \"</tr>\n </thead>\n <tbody class='\".X1plugin_tablebody.\"'>\";\n\t\tforeach($teaminfo As $team){\n\t\t\t$captain_name=X1TeamUser::GetUserName($team['playerone']);\n\t\t\t\n\t\t\t$output .= \"\n\t\t\t\t<tr> \n\t\t\t\t\t<td class='alt2'>\n\t \t\t <img src='\".X1_imgpath.\"/flags/$team[country].bmp' width='20' height='15' border='0'>$team[country]</td>\n\t\t\t\t\t<td class='alt1'><a href='\".X1_adminpostfile.X1_linkactionoperator.\"teamprofile&teamname=$team[team_id]'>$team[name]</a></td>\n\t\t\t\t\t<td class='alt2'><a href='\".X1_adminpostfile.X1_linkactionoperator.\"teamprofile&teamname=$team[team_id]'>$team[clantags]</a></td>\n\t\t\t\t\t<td class='alt2'><a href='\".X1_adminpostfile.X1_linkactionoperator.\"playerprofile&member=$team[playerone]'>$captain_name</a></td>\n\t\t\t\t\t<form method='post' action='\".X1_adminpostfile.\"' style='\".X1_formstyle.\"'>\n\t\t\t\t\t<td class='alt2'>\".DeletePlayerButton($moderator,$uid,$team['team_id'],$team['playerone']).\"</td>\n\t\t\t\t\t</form>\n\t\t\t\t</tr>\";\n\t\t}\n\t\t$output.= DispFunc::DisplaySpecialFooter($span=8);\n\t\treturn $output;\n}", "title": "" }, { "docid": "b47eb864b478e92e575c7e36bfac7671", "score": "0.5029707", "text": "function echoLeaderboard($db){\n try{\n $statement = $db->query('SELECT * FROM user ORDER BY best_score DESC');\n $users = $statement->fetchAll(PDO::FETCH_CLASS, 'User');\n }\n catch (PDOException $exception){\n error_log('Request error: '.$exception->getMessage());\n return false;\n }\n foreach ($users as $key => $value) {\n if ($key>24) {//A maximum of 25 users are shown\n break;\n }\n echo '<tr>\n <td>Numéro '.($key+1).'</td>\n <td>'.$value->getLogin().'</td>';\n if (NULL != $value->getBestScore()) {//If the user has a high score\n echo '<td>'.$value->getBestScore().' pts</td>\n <td>\n <a href=\"mainmenu.php?gameId='.$value->getBestGameId().'\">Partie n°'.$value->getBestGameId().'</a>\n </td>\n </tr>';\n // Anyone can click on the game number to challenge the user\n }\n else{\n echo '<td></td>\n <td></td>\n </tr>';\n }\n }\n}", "title": "" }, { "docid": "0753bd23c2619f313b570b615fc8ce64", "score": "0.50262654", "text": "public function databaseAltTurmaListProfessor()\t{\r\n\t\t/*Instancia o objeto de acesso ao banco*/\r\n\t\t$objDataBase\t= new conexao();\r\n\t\t$conect\t\t\t= $objDataBase->bd();\r\n\r\n\t\t$query\t= \"SELECT uf.id, u.nome\r\n\t\t\t\t\t\t\t\tFROM usuario u\";\r\n\t\t$query\t.=\t\" JOIN\tusuario_funcao uf\r\n\t\t\t\t\t\t\t\tON u.id = uf.usuarioid\";\r\n\t\t$query\t.=\t\" JOIN\tfuncao f\r\n\t\t\t\t\t\t\t\tON uf.funcaoid = f.id\";\t\t\r\n\t\t$query\t.=\t\" WHERE f.funcao\t= 'professor'\";\r\n\t\t$query\t.=\t\" ORDER BY u.nome ASC\";\r\n\t\t\t\t\t\t\t\r\n\t\t$result = mysqli_query($conect, $query);\r\n\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "dba9bb4e39579130154bcda6f77490f5", "score": "0.50143206", "text": "function displayUsers(){\n global $database;\n global $_WORDS;\n $q = \"SELECT username,userlevel,email,timestamp \"\n .\"FROM \".TBL_USERS.\" WHERE userlevel=1 OR userlevel=9 ORDER BY userlevel DESC,username\";\n $result = $database->query($q);\n /* Error occurred, return given name by default */\n $num_rows = mysql_num_rows($result);\n // echo $num_rows.\"**<br>\";\n if(!$result || ($num_rows < 0)){\n echo \"Error displaying info\";\n return;\n }\n if($num_rows == 0){\n echo \"Database table empty\";\n return;\n }\n /* Display table contents */\n ?>\n <table align=\"center\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n <tr><td><b> <?php echo $_WORDS['username']; ?> </b></td>\n <td><b><?php echo $_WORDS['level']; ?></b></td><td><b>Email</b></td>\n <td><b> <?php echo $_WORDS['last_act']; ?> </b></td></tr>\n <?php\n for($i=0; $i<$num_rows; $i++){\n $uname = mysql_result($result,$i,\"username\");\n $ulevel = mysql_result($result,$i,\"userlevel\");\n\t //begin: update 3/18 userlevel change to chinese\n\t if ($ulevel == 9)\n\t {$ulevel = $_WORDS['admin']; }\n\t if ($ulevel == 1)\n\t {$ulevel = $_WORDS['user']; }\n\t //end\n $email = mysql_result($result,$i,\"email\");\n $time = mysql_result($result,$i,\"timestamp\");\n\t $time = date(\"Y-m-d H:i:s\", $time); \n\n echo \"<tr><td>$uname</td><td>$ulevel</td><td>$email</td><td>$time</td></tr>\\n\";\n }\n echo \"</table><br>\\n\";\n}", "title": "" }, { "docid": "c4171051360fd7d46e4e9d81ee20525b", "score": "0.49954617", "text": "function rolesetup($id_user,$name_page){\n$db = new Database();\n$db->connect();\n$db->selectall(\"pr_user_role\",'*',null,'id_user='.$id_user); // Table name, Column Names, JOIN, WHERE conditions, ORDER BY conditions\n$res = $db->getResult();\n $name_role=$res[0][\"name_role\"];\n\n$db = new Database();\n$db->connect();\n$db->selectall(\"role_setup\",'*',null,\"`name_role` = '\".$name_role.\"' AND `name_page` = '\".$name_page.\"'\"); // Table name, Column Names, JOIN, WHERE conditions, ORDER BY conditions\n$res = $db->getResult();\n \n$return=$res[0];\nreturn $return;\n\n \n \n\n \n}", "title": "" }, { "docid": "236731419460d5aad8cbfce4852d73bf", "score": "0.49819705", "text": "function emarking_get_students_for_printing($courseid) {\n global $DB;\n $query = 'SELECT u.id, u.idnumber, u.firstname, u.lastname, GROUP_CONCAT(e.enrol) as enrol\n\t\t\t\tFROM {user_enrolments} ue\n\t\t\t\tJOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = ?)\n\t\t\t\tJOIN {context} c ON (c.contextlevel = 50 AND c.instanceid = e.courseid)\n\t\t\t\tJOIN {role_assignments} ra ON (ra.contextid = c.id AND ra.roleid = 5 AND ra.userid = ue.userid)\n\t\t\t\tJOIN {user} u ON (ue.userid = u.id)\n GROUP BY u.id\n\t\t\t\tORDER BY lastname ASC';\n $params = array(\n $courseid\n );\n // Se toman los resultados del query dentro de una variable.\n $rs = $DB->get_recordset_sql($query, $params);\n return $rs;\n}", "title": "" }, { "docid": "0e141bc5a9bc9af49ace8858a757a93a", "score": "0.49768195", "text": "public function rol3($id) {\n\n\t\tif (!$enlace = mysqli_connect(\"localhost\", \"root\", \"\")) {\n \t\techo 'No pudo conectarse a mysql';\n \t\t\texit;\n\t\t}\n\n\t\tif (!mysqli_select_db( $enlace,'mydb')) {\n \t\techo 'No pudo seleccionar la base de datos';\n \t\texit;\n\t\t}\n\n\t\t$sql = \"SELECT * FROM \" . $this->nombre_tabla . \" WHERE ID_ROLE = \" . $this->id;\n\t\t$resultado = mysqli_query( $enlace,$sql);\n\n\t\tif (!$resultado) {\n \t\techo \"Error de BD, no se pudo consultar la base de datos\\n\";\n \t\t\n \t\texit;\n\t\t}\n\n\t\t$this->id=$id;\n\t\tif ($this->id!=0) {\n\t\t\tif($fila = mysqli_fetch_assoc($resultado))\n\t\t\n\t\t\t\t\t$this->nombre_rol=$fila[\"ROLE\"];\n\t\t\telse\n\t\t\t\t\t$this->nombre_rol = \"\";\n\t\t\t\t\n\t\t}\n\t\telse\n\t\t\t$this->nombre_rol = \"\";\n\t}", "title": "" }, { "docid": "72afc2598512bf19f455d0681bf304de", "score": "0.49684608", "text": "function display_sql($sql){\n //\n //Get theh query statement\n $statement = $this->dbase->query($sql);\n //\n //Get the number of fields in the query\n $nfields = $statement->columnCount();\n //\n echo \"<table>\"; \n //\n //Output the header\n echo \"<tr>\";\n //\n for($i=0; $i<$nfields; $i++){\n //\n $column = $statement->getColumnMeta($i);\n //\n echo \"<th>\".$column['name'].\"</th>\";\n }\n echo \"</tr>\";\n //\n //Output the body\n while($result = $statement->fetch()){\n //\n echo \"<tr>\";\n //\n for($i=0; $i<$nfields; $i++){\n echo \"<td>\".$result[$i].\"</td>\";\n }\n echo \"</tr>\";\n \n }\n echo \"</table>\"; \n }", "title": "" }, { "docid": "a3631e4507ec91b90c94ebfc5f9d1dac", "score": "0.49607885", "text": "function admin_first_name($session_var){\n\t\t //Statement or SQL query to be execute\n\t\t$query = \"SELECT * FROM administrator WHERE staffid = '$session_var'\";\n\t\t //To execute the query\n\t\t $run = run_query($query);\n\t\t //To check if the query runs\n\t\t confirm($run);\n if($row = mysqli_fetch_array($run)){ $fname = $row['first_name'];}\n $message = 'Welcome! '.strtoupper($_SESSION['admin']).' - '.$fname;\n return $message;\n\t}", "title": "" }, { "docid": "be648411b7b2a126659c85733ee48223", "score": "0.49428645", "text": "public function role(int $id) : string\r\n {\r\n $statement = self::$db->prepare(\"SELECT roles.role_name FROM roles LEFT JOIN user_role \" .\r\n\t\t \"ON roles.id = user_role.role_id WHERE user_role.user_id = ?\");\r\n $statement->bind_param(\"i\", $id);\r\n $statement->execute();\r\n $result = $statement->get_result();\r\n $data = $result->fetch_row();\r\n \r\n return $data[0]?$data[0]:'user';\r\n }", "title": "" }, { "docid": "7df2444bbf297f9845ccb36b7857ad06", "score": "0.4942363", "text": "function teamRPG(){\n\t\ttry\n\t\t {\n\t\t \tglobal $trpg;\n\t\t\t//outputing data\n\t\t\t$i = 1;\n\t\t foreach($trpg as $row)\n\t\t {\n\t\t print \"<tr><td>\".$i.\"</td>\";\n\t\t print \"<td><a href = '#'>Team \".$row['Team'].\"</a></td>\";\n\t\t print \"<td><b>\".$row['RPG'].\"</b></td></tr>\";\n\t\t $i++;\n\t\t }\n\t\t }\n\t\t catch(PDOException $e)\n\t\t {\n\t\t print 'Exception : '.$e->getMessage();\n\t\t }\n\t}", "title": "" }, { "docid": "15e6182a3a72da34d23d1f3fd742870f", "score": "0.49034542", "text": "public function run()\n {\n DB::table('role_user')->insert(['role_id' => 1, 'user_id' => 1]); //is-portal-manager - alfred\n\n DB::table('role_user')->insert(['role_id' => 2, 'user_id' => 2]); //is-manager - ella\n DB::table('role_user')->insert(['role_id' => 2, 'user_id' => 3]); //is-manager - elizabeth\n\n DB::table('role_user')->insert(['role_id' => 3, 'user_id' => 4]); //is-editor - scarlett\n\n DB::table('role_user')->insert(['role_id' => 4, 'user_id' => 5]); //is-writer - william\n DB::table('role_user')->insert(['role_id' => 4, 'user_id' => 6]); //is-writer - linda\n\n DB::table('role_user')->insert(['role_id' => 2, 'user_id' => 7]); //is-manager - messi\n DB::table('role_user')->insert(['role_id' => 2, 'user_id' => 8]); //is-manager - ronaldo\n }", "title": "" }, { "docid": "94d835a7b8af9152cb3654719c823231", "score": "0.48807168", "text": "function userlist(){\r\n $query = \" SELECT \r\n login.userID,\r\n login.username,\r\n login.userClass,\r\n groupMembers.groupName\r\n FROM \r\n login\r\n LEFT JOIN \r\n userClass\r\n ON\r\n userClass.classID = login.userClass\r\n LEFT JOIN\r\n (SELECT groupMembers.userID, groups.groupName FROM groupMembers LEFT JOIN groups on groups.groupID = groupMembers.groupID \";\r\n\r\n if ($_SESSION[\"userClass\"] == 2) {\r\n $query .= \" WHERE groupMembers.groupID = (SELECT groupID from groupMembers WHERE userID = :userID) \";\r\n };\r\n\r\n $query .= \" ) AS groupMembers\r\n ON groupMembers.userID = login.userID WHERE login.userID != :userID\";\r\n\r\n if ($_SESSION[\"userClass\"] == 2) {\r\n $query .= \" AND groupMembers.userID = login.userID AND login.userClass > 2\";\r\n };\r\n\r\n // prepare query\r\n $stmt = $this->conn->prepare($query);\r\n\r\n // sanitize values\r\n $this->userID=htmlspecialchars(strip_tags($_SESSION[\"userID\"]));\r\n $stmt->bindParam(\":userID\", $this->userID); \r\n\r\n // execute query\r\n $stmt->execute();\r\n\r\n return $stmt;\r\n }", "title": "" }, { "docid": "127dbae03cba5e71157102c7b14bbd78", "score": "0.48770347", "text": "function get_top_role($u_id,$mysqli) {\n\ninclude('db-config.php');\n\n// get the person for whom this position as meant to be\n$getPosName = $mysqli->prepare('SELECT position_code,position_id FROM position WHERE position_people_id=?') or die('Couldn\\'t check the vote.');\n\n$getPosName->bind_param('s', $u_id); // getting whether this person as voted for the position or not\n$getPosName->execute();\n$getPosName->store_result();\n$getPosName->bind_result($pos_code,$pos_id);\n$base = 0;\nwhile($getPosName->fetch()) {\n\tif(is_role_active($pos_id,$mysqli)){\n\t\tif($base < $score[$pos_code])\n\t\t\t$base = $score[$pos_code];\n\t\n\t}\n$code = array_search($base, $score);\n\nreturn $code;\n\n \n}\n\n}", "title": "" }, { "docid": "f49e849ff973eb5ab1fb855ad50b9a5f", "score": "0.48731634", "text": "private function selectRolName($id) {\n $query = $this->conection->query(\"SELECT name FROM roles WHERE idroles=$id\");\n\n $rst = $this->conection->result($query);\n\n //var_dump($rst);\n\n return $rst['name'];\n }", "title": "" }, { "docid": "9ecc5c599db298558b6fe3569935f581", "score": "0.4867072", "text": "function showFlagsTable() {\n $result = query ( \"Select * From pipboys where Typename = 'Flag'\");\n echo (\"<table border = \\\"1px solid\\\">\\n\" );\n // echo (\"<tr><th>Flag</th><th>Color</th></tr>\\n\" );\n $lastTeam = \"\";\n $winner = 1;\n echo (\"<tr>\");\n while ($row = mysql_fetch_assoc($result)) {\n $Team = $row [\"Team\"];\n $Username = $row[\"Username\"];\n if ($Team == \"None\") { \n echo (\"<td>$Username</td>\" );\n } else {\n echo (\"<td bgColor=\\\"$Team\\\">$Username</td>\" );\n } \n if ($Team == \"None\") {\n $winner = 0;\n } else if ($lastTeam == \"\") {\n $lastTeam = $Team;\n } else if ($lastTeam != $Team) { \n $winner = 0;\n } \n $lastTeam = $Team;\n }\n echo (\"</tr></table><p>\\n\" ); \n }", "title": "" }, { "docid": "51ad64d63257326e425a22821a2ac98e", "score": "0.486579", "text": "function get_role_name($role_id)\n{\n\tglobal $conn;\n\t$stmt = $conn->prepare('SELECT description FROM tbl_role WHERE role_id = :role');\n\t$stmt->bindValue(':role', $role_id);\n\treturn execute_fetch_param($stmt, 'description');\n}", "title": "" }, { "docid": "933cde71e9638192e32ed09c11e18d60", "score": "0.48630863", "text": "private function getPlayerScreenNames()\n\t{\n\t $message = null;\n\t $message .= '<br />Occupants:';\n\t foreach ($this->cube_players as $key => $name) {\n\t $message .= '<br />Player: ' . $this->cube_players[$key]['screen_name'];\n\t if ($this->cube_players[$key]['screen_name'] == 'test_player') $message .= ' - you';\n\t }\n\t \n\t return $message;\n\t}", "title": "" }, { "docid": "1aa1370c7b7fee2e1eba9a87c2b31de1", "score": "0.4862362", "text": "private function _execPlayers($academyid = NULL, $playerId = NULL, $limit = NULL)\n {\n $temp = '';\n $jCond = '';\n $jCols = '';\n if (!is_null($academyid)) {\n $temp .= \" and ACADEMY_ID = \" . trim((int) $academyid);\n }\n if (!is_null($academyid)) {\n $temp .= \" and AITA = \" . trim((int) $playerId);\n }\n if (is_null($limit)) {\n $jCols .= ', a.NAME as academyName, p.NAME as NAME';\n $jCond .= ' p join academy a on a.ACADEMY_ID = p.ACADEMY_ID ';\n }\n $str = \"select * \" . $jCols . \" from player \" . $jCond\n . \"where 1=1 \" . $temp;\n if (is_null($limit)) {\n $str .= ' limit ' . $this->first . ', ' . $this->perPage;\n }\n return $str;\n }", "title": "" }, { "docid": "e8e0e33c8418600d8aa992a7feca5eb3", "score": "0.4860518", "text": "public function view_user_name()\n {\n print '<table style=\"border: 1px\">' . \"\\n\";\n print ' <tr>' . \"\\n\";\n print ' <td>' . \"Posledny uzivatel: \" . '</td>' . \"\\n\";\n print ' <td>' . \"Pocet uzivatelov: \" . '</td>' . \"\\n\";\n print ' </tr>' . \"\\n\";\n print ' <tr>' . \"\\n\";\n print ' <td>' . \"[ \" . $this->objSqlManager->getRowLastValue() . \" ]\" . '</td>' . \"\\n\";\n print ' <td>' . \"[ \" . $this->objSqlManager->getRowCountId() . \" ]\" . '</td>' . \"\\n\";\n print ' </tr>' . \"\\n\";\n print '</table>' . \"\\n\";\n }", "title": "" }, { "docid": "e19c201d290c65d0eca3687ed2d862d5", "score": "0.48602924", "text": "function showteam( $ffanumber, $lastname )\n{\n\t// $db_hostname = 'gungahlinunitedfc.org.au';\n\n\t$db_hostname = 'ub007lcs13.cbr.the-server.net.au';\n\t$db_username = 'gufcweb_dev';\n\t$db_password = 'deve!oper';\n\t$db_database = 'gufcweb_player';\n\n\techo \"Inside the function. P1\";\n\n\t$mysqli = new mysqli($db_hostname,$db_username,$db_password, $db_database);\n\n\techo 'inside showteam';\n\techo \"<p/>\";\n\techo $ffanumber;\n\techo \"<p/>\";\n\techo $lastname;\n\t\n\t$lastnameUpper = strtoupper( $lastname );\n\t$playerteam = \"\";\n\t\n\t$sqlplayer = \"SELECT FirstName, LastName, fkteamid, fkagegroupid FROM player where FFANumber = \".$ffanumber.\" and display = 'Y' \";\n\t// echo $sqlplayer;\n\t\n\t$qplayer = $mysqli->query($sqlplayer);\n\t$namematch = \"NO\";\n\t$firstname = \"\";\n\t$lastnameDB = \"\";\n\t$fkteamid = \"\";\n\t$fkagegroupid = \"\";\n\t$tbateam = \"\";\n\n\n\techo \"Inside the function. P2\";\n\n\n}", "title": "" }, { "docid": "b2d08f5df73c16721b5625b782d716aa", "score": "0.4852353", "text": "function process() {\n // Connect to the database\n $pdo = pdo_connect();\n\n //$userid = getUser($pdo, $user, $password);\n\n $query = \"select player, xidx, yidx, king from currentcplayer inner join checkertable on currentcplayer.id = checkertable.id\";\n $rows = $pdo->query($query);\n\n echo \"\\r\\n<checkers status=\\\"yes\\\">\\r\\n\";\n foreach($rows as $row){\n $player = $row['player'];\n $xidx = $row['xidx'];\n $yidx = $row['yidx'];\n $king = $row['king'];\n\n echo \"<checkertable player=\\\"$player\\\" xidx=\\\"$xidx\\\" yidx=\\\"$yidx\\\" king=\\\"$king\\\" />\\r\\n\";\n }\n echo '</checkers>';\n}", "title": "" }, { "docid": "f8053e3a7c914fa0f8751e6bfd654504", "score": "0.48522124", "text": "function permissions_table($role){\r\n $query = new Query(new DB()); \r\n $query->SetTableName('permissions'); \r\n $query->Select(['permid','routeid','allowed']); \r\n $query->Where(['roleid','=',$role]); \r\n $query->OrderBy(['roleid']);\r\n $query->Run(); \r\n $permissions= $query->GetReturnedRows(); \r\n // var_dump($permissions); \r\n\r\n $query= new Query(new DB()); \r\n $query->SetTableName(\"routes\"); \r\n $query->Select(['routeid','mod_display_name']);\r\n $query->Run(); \r\n $routes= $query->GetReturnedRows();\r\n $query= null; \r\n //var_dump($routes); \r\n\r\n $query= new Query(new DB()); \r\n $query->SetTableName(\"roles\"); \r\n $query->Select(['role_display_name']);\r\n $query->Where(['roleid','=',$role]); \r\n $query->Run(); \r\n $role_name= $query->GetReturnedRows();\r\n $query= null; \r\n\r\n $table= \"<table class='permissions-table' border=1>\"; \r\n $table.= \"<thead> <tr> <th class='th-section-header' colspan=3>{$role_name[0]['role_display_name']}</th></tr>\";\r\n $table.= \"<tr> <th> Module </th> <th> Permission </th><th> Action </th></tr> </thead>\"; \r\n foreach ($permissions as $permission_row){\r\n $table.=\"<tr>\"; \r\n foreach ($routes as $route_row){\r\n if ($permission_row['routeid']==$route_row['routeid']){\r\n $module_name = $route_row['mod_display_name'];\r\n } \r\n }\r\n $table.= \"<td> {$module_name} </td>\";\r\n if ($permission_row['allowed'] == '1'){\r\n $text = \"<span class='green'>Allowed</span>\"; \r\n } else {\r\n $text=\"<span class='red'>Denied</span>\"; \r\n }\r\n $table.= \"<td>{$text}</td>\";\r\n $button= \"<a class='link-button full' href=\".CMS_BASE_URL.\"?q=manage/permissions/\".$permission_row['permid'].\">\";\r\n $button.= \" Change </a>\"; \r\n $table.= \"<td>{$button}</td>\";\r\n $table.= \"</tr>\";\r\n \r\n }\r\n $table.= \"</table>\"; \r\n\r\n return $table;\r\n}", "title": "" }, { "docid": "b18ee3e2dd80a93894ffcd1f115b4311", "score": "0.48490718", "text": "public function printRow()\n {\n echo \"<tr><td>{$this->getName()}</td><td>{$this->getTypeID()}</td><td>{$this->getGoal()}</td><td>{$this->getAllowedTries()}</td><td>{$this->getAllowedTime()}</td><td>{$this->getSuccessThreshold()}</td><td>{$this->getFailureThreshold()}</td><td>{$this->getObsolete()}</td></tr>\";\n }", "title": "" }, { "docid": "8e515d67a30ae0c5a60fd1edbbbc4a48", "score": "0.48477498", "text": "public function statement()\n {\n $result = 'Rental Record for ' . $this->name() . PHP_EOL;\n\n foreach ($this->rentals as $rental) {\n $amount = 0;\n $Billing = new \\BusinessLogic\\Billing();\n $amount = $Billing->GenerateMovieRentCost($rental); \n $result .= \"\\t\" . str_pad($rental->movie()->name(), 30, ' ', STR_PAD_RIGHT) . \"\\t\" . $amount . PHP_EOL; //*/\n }\n\n $result .= 'Amount owed is ' . $this->total . PHP_EOL;\n $result .= 'You earned ' . $this->points . ' frequent renter points' . PHP_EOL;\n \n return $result;\n }", "title": "" }, { "docid": "b27e2dbb73cad6d6abd03c157a43fcfa", "score": "0.48454273", "text": "function svc_getEligiblePlayersHTML($selectedId = \"\"){\n\tglobal $db;\n\t$query = \"SELECT uuid, user_username FROM user_authentication WHERE user_locked < 2 AND (user_type BETWEEN 1 AND 4) ORDER BY user_username ASC\";\n\n\t$rs = mysqli_query($db, $query);\n\n\twhile ($ent = mysqli_fetch_assoc($rs)){\n\t\techo \"<option value='\".$ent['uuid'].\"' \".($ent['uuid']==$selectedId ? \"selected\" : \"\").\">\".$ent['user_username'].\"</option>\";\n\t}\n}", "title": "" }, { "docid": "0226658b23fc35146454f24217aec3f5", "score": "0.48444948", "text": "function is_admin($username){\n\n if(isLoggedIn()){\n $result = query(\"SELECT user_role FROM users WHERE user_id = \".$_SESSION['user_id'].\"\");\n $row = fetchRecords($result);\n if($row['user_role'] == 'admin'){\n return true;\n } else {\n return false;\n }\n }\n\n return false;\n\n}", "title": "" }, { "docid": "89f6702f9bc9e5b716139dbfa7cbb02d", "score": "0.48429626", "text": "function getLogged($db) {\n//execute query to diaply all logged in adviors\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $stmt = $db->prepare(\"SELECT id, status FROM login_details where logged =1 and level =0\");\n $stmt->execute();\n\n\n//populates the table with the results\n\n $result = $stmt->setFetchMode(PDO::FETCH_ASSOC);\n\t foreach(new TableRows(new RecursiveArrayIterator($stmt->fetchAll())) as $k=>$v) {\n\t echo $v;\n }\n\n\n\n\n\n\n }", "title": "" }, { "docid": "78db7a37f5aadc7b393d3bec035f899e", "score": "0.4836968", "text": "private function playerRolls(): void\n {\n $_SESSION[\"hand\"]->roll();\n $_SESSION[\"playerSum\"] += $_SESSION[\"hand\"]->getSum();\n }", "title": "" }, { "docid": "f265a716494515d383a6ff63b113fdf9", "score": "0.4835839", "text": "function arrangeby(){\r\n $query =\"select id,fullname,email from admin_users WHERE id='\".$this->session.\"'\";\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->execute();\r\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n return $row['fullname'].' - '.$row['email'];\r\n }", "title": "" }, { "docid": "58b3cc490f1cbc7323bf107eaedef343", "score": "0.48352015", "text": "function printQuery($conn, $table, $username) {\n\t$query = \"SELECT * FROM $table\"; // Access the complete table stored in 'table'\n\t$result = $conn->query($query); // Extract contents from table\n\tif (! $result) die(mysql_fatal_error(\"Database access failed: \".$conn->error)); // Specific error not shown to user\n\t$rows = $result->num_rows; // Store the number of rows\n\techo \"<br><br><br>--------------------Saved Inputs--------------------<br>\";\n\tfor($j = 0; $j < $rows; ++$j) { // Check all entries in table\n\t\t$result->data_seek($j); // Get the jth row\n\t\t$row = $result->fetch_array(MYSQLI_NUM); // Convert it into an associative array\n\t\t // Print rows that match username\n\t\tif ($row[1] == $username) echo <<<_END\n\t\t<pre>\n\t\tUsername: $row[1]\n\t\tCipher: $row[2]\n\t\tInput: $row[3]\n\t\tOutput: $row[4]\n\t\tKey1: $row[5]\n\t\tKey2: $row[6]\n\t\tTimestamp: $row[7]</pre><form action=\"user.php\" method=\"post\"><input type=\"hidden\" name=\"delete\" value=\"yes\"><input type=\"hidden\" name=\"IDs\" value=\"$row[0]\">\n\t\t<input type=\"submit\" value=\"DELETE RECORD\"></form>\n\t\t\n\t\t_END;\n\t}\n\t$result->close(); // Close result after operation\n}", "title": "" }, { "docid": "8cf3de96ed2d3bcc04cdef2b7a83be66", "score": "0.48339546", "text": "function PrintPlayers()\n\t{\n\t\t// sort by team and killefficiency\n\t\tforeach ($this->stats as $name => $player)\n\t\t{\n\t\t\t$team[$name] = $player[\"custom\"][\"total\"][\"team\"];\n\t\t\t$killefficiency[$name] = $player[\"custom\"][\"total\"][\"killefficiency\"];\n\t\t}\n\t\tarray_multisort($team, SORT_DESC, $killefficiency, SORT_DESC, $this->stats);\n\t\t\n\t\techo \"<div class='playerstats'>\\n\";\n\t\tforeach($this->stats as $name => $player)\n\t\t{\n\t\t\techo \"<div class='playerstat'>\" . Helper::colorsToHtml($player[\"custom\"][\"playername\"]) . \"</div>\\n\";\n\t\t\techo \"<div class='playerstatdetail'>\\n\";\n\t\t\t\n\t\t\t// Victims\n\t\t\t$keys = array_keys($player[\"custom\"][\"total\"][\"victims\"]);\n\t\t\techo \"<div class='playerenemy' onclick='togglechild(this)'>Favorite Enemy: \";\n\t\t\t$count = $this::PrintPlayerEnemyName($name, \"victims\");\n\t\t\techo \" with \" . $count . \" kills.</div>\\n\";\n\t\t\t$this::PrintPlayerTable($name, \"victims\");\n\t\t\techo \"<br/>\";\n\t\t\t// Killers\n\t\t\t$keys = array_keys($player[\"custom\"][\"total\"][\"killers\"]);\n\t\t\techo \"<div class='playerenemy' onclick='togglechild(this)'>Worst Enemy:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\";\n\t\t\t$count = $this::PrintPlayerEnemyName($name, \"killers\");\n\t\t\techo \" with \" . $count . \" deaths.</div>\\n\";\n\t\t\t$this::PrintPlayerTable($name, \"killers\");\n\t\t\techo \"</div><br/>\\n\";\n\t\t}\n\t\techo \"</div>\\n\";\n\t}", "title": "" }, { "docid": "5a19cdc59a73d9ab3b25005cf8fc215f", "score": "0.48309904", "text": "public static function professor_chat(){\r\n $query = DB::$conn->prepare('SELECT distinct users.id,users.first_name,users.last_name,subjects.name from users join subjects on users.id=subjects.users_id join SCHEDULE on schedule.subjects_id=subjects.id join class on class.id=schedule.class_id join students on students.class_id=class.id where students.users_id=?\r\n union\r\n SELECT distinct users.id,users.first_name,users.last_name,role.name from users join role on role.id=users.roles_id join class on class.users_id=users.id join students on students.class_id=class.id where students.users_id=? and users.id not in(SELECT distinct users.id from users join subjects on users.id=subjects.users_id join SCHEDULE on schedule.subjects_id=subjects.id join class on class.id=schedule.class_id join students on students.class_id=class.id where students.users_id=?)');\r\n // $query = DB::$conn->prepare('SELECT distinct users.id,users.first_name,users.last_name,subjects.name from users join subjects on users.id=subjects.users_id join users_has_class on users_has_class.users_id=users.id join class on class.id=users_has_class.class_id join students on students.class_id=class.id where students.users_id=?\r\n // union\r\n // SELECT distinct users.id,users.first_name,users.last_name,role.name from users join role on role.id=users.roles_id join class on class.users_id=users.id join students on students.class_id=class.id where students.users_id=? and users.id not in(SELECT distinct users.id from users join subjects on users.id=subjects.users_id join users_has_class on users_has_class.users_id=users.id join class on class.id=users_has_class.class_id join students on students.class_id=class.id where students.users_id=?)');\r\n $query->execute([$_COOKIE['id'],$_COOKIE['id'],$_COOKIE['id']]);\r\n $parents = $query->fetchAll(PDO::FETCH_ASSOC);\r\n return $parents;\r\n \r\n }", "title": "" }, { "docid": "7e5c0e2b03b6e02be29d4bce4a1ccb88", "score": "0.48294675", "text": "function teams() {\n\t\tglobal $db, $user;\n\n\t\t$sql = 'SELECT\n\t\t\t\t\tstl_players.user_id as user_id,\n\t\t\t\t\tstl_players.team_id as team_id,\n\t\t\t\t\tstl_positions.*\n\t\t\t\tFROM stl_players\n\t\t\t\t\tINNER JOIN stl_positions\n\t\t\t\t\t\tON stl_players.user_id = stl_positions.ship_user_id\n\t\t\t\tWHERE\n\t\t\t\t\tstl_players.game_id = '.$this->data['stl']['game_id'].'\n\t\t\t\t\tAND stl_positions.game_id = '.$this->data['stl']['game_id'].'\n\t\t\t\tORDER BY hit_user_id ASC';\n\t\t$result = $db->query($sql,__FILE__,__LINE__,__METHOD__);\n\n\t\twhile($rs = $db->fetch($result))\n\t\t{\n\t\t\tif($rs['team_id'] == 0) {\n\t\t\t\t$this->data['team_gelb'] .= sprintf('<%2$s>%1$s</%2$s><br>', $user->userprofile_link($rs['user_id'], ['pic' => TRUE, 'username' => TRUE, 'clantag' => TRUE]), ($rs['hit_user_id'] > 0 ? 'del' : 'b'));\n\t\t\t} else {\n\t\t\t\t$this->data['team_gruen'] .= sprintf('<%2$s>%1$s</%2$s><br>', $user->userprofile_link($rs['user_id'], ['pic' => TRUE, 'username' => TRUE, 'clantag' => TRUE]), ($rs['hit_user_id'] > 0 ? 'del' : 'b'));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d66b0d0ac5943f75e363421a4c1b3a81", "score": "0.4827798", "text": "function searchPlayer()\n {\n $query = \"SELECT * FROM Player where Name = \".\"'\".$this->Name.\"'\";\n // echo($query);\n //\techo($this->Name);\n\t $result = $this->conn->query($query);\n if($result->num_rows > 0){\n# while ($row = $result->fetch_assoc()) {\n # echo($row['Name']);\n # echo($row['ID']);\n # echo($row['Country']);\n \n #\t\t\techo($row['Name']);\n # echo(\" \");\n # echo($row['ID']);\n # echo(\" \");\n # echo($row['Country']);\n # echo(\"\\n\");\n \n#\techo \"<table><tr><th>ID</th><th>Name</th></tr>\";\n // output data of each row\n \n # echo \"<tr><td>\" . $row[\"id\"]. \"</td><td>\" . $row[\"firstname\"]. \" \" . $row[\"lastname\"]. \"</td></tr>\";\n \n #echo \"</table>\";\n\n\n\n # }\n\n\n#\techo \"</table>\";\n\n echo \"<table><tr><th>Country</th><th>Name</th><th>ID</th></tr>\";\n // output data of each row\n while($row = $result->fetch_assoc()) {\n echo \"<tr><td>\" . $row[\"Country\"]. \"</td><td>\" . $row[\"Name\"]. \"</td><td>\" . $row[\"ID\"]. \"</td></tr>\";\n }\n echo \"</table>\";\n\n\n\n\n }\n else{\n echo(\"0 result\");\n }\n }", "title": "" }, { "docid": "289e42d2d2aaee4a1067148de9be8ac1", "score": "0.4815212", "text": "final public function print()\n {\n return rtrim($this->statement) . \";\";\n }", "title": "" }, { "docid": "359fe0499dbeabde9d1a5ea262579e44", "score": "0.48115286", "text": "function TroLy_ListUser_xemdanhsach(){\n\t\t$sql = \"SELECT 0o0_users.*,ten_role,ten_truong,ten_quan \n\t\t\t\t\tFROM 0o0_users,0o0_role,0o0_quan,0o0_truong\n\t\t \t\t\tWHERE 0o0_users.idRole > 2 \n\t\t\t\t\tAND 0o0_users.nguoi_tao = $_SESSION[idUser]\n\t\t \t\t\tAND 0o0_users.idRole = 0o0_role.idRole\t\t\n\t\t\t\t\tAND 0o0_users.idQuan = 0o0_quan.idQuan\n\t\t\t\t\tAND 0o0_users.idTruong = 0o0_truong.idTruong\";\n\t\t$rs = mysql_query($sql) or die(mysql_error());\n\t\treturn $rs;\n\t}", "title": "" }, { "docid": "f5d36cbc79715744c9059b95f6aa2015", "score": "0.48090792", "text": "public function getRoleName()\n {\n \n return (Yii::app()->user->isGuest) ? '' : $this->getUserLabel($this->level);\n }", "title": "" }, { "docid": "0e299ea5bf4e6171852e7f3a47c6304a", "score": "0.4807492", "text": "function staff_first_name($session_var){\n\t\t //Statement or SQL query to be execute\n\t\t$query = \"SELECT * FROM staff WHERE staffid = '$session_var'\";\n\t\t //To execute the query\n\t\t $run = run_query($query);\n\t\t //To check if the query runs\n\t\t confirm($run);\n if($row = mysqli_fetch_array($run)){ \n \t$row['title'];\n \t$row['lect_name'];\n }\n $message = 'Welcome! '.$row['title'].'. '.$row['lect_name'];\n return $message;\n\t}", "title": "" }, { "docid": "7eea98ec64bb1224e97f49e9dacbdb78", "score": "0.4802549", "text": "function activeRoleDialog(){\n\t\t$session = new Zebra_Session();\n\t\t$output = \"\";\n\n\t\t$validRoles = Security::roleList(true, Security::userMIID());\n\t\t$activeRoleIDs = isset($_SESSION[\"ActiveRoles\"]) ? explode(\"##\", $_SESSION[\"ActiveRoles\"]) : array_keys($validRoles);\n\n\t\t$output .= \"<table id='activeRolesTable'>\";\n\t\tforeach($validRoles as $roleID => $roleName){\n\t\t\t$selected = in_array($roleID, $activeRoleIDs) ? \"Active\" : \"Disabled\";\n\t\t\t$output .= <<<EOD\n<tr>\n\t<td>$roleName<td>\n\t<td><div id='$roleID' class='ActiveRoleToggle'>$selected</div></td>\n</tr>\nEOD;\n\t\t}\n\t\t$output .= <<<EOD\n<script type=\"text/javascript\">\n$(document).ready(function(){\n\t$(\".ActiveRoleToggle\").each(function(){\n\t\t$(this).button();\n\t\tif($(this).text() == \"Disabled\")\n\t\t\t$(this).children().addClass(\"ui-state-error\");\n\t});\n\t$(\".ActiveRoleToggle\").click(function(){\n\t\tif($(this).text() == \"Active\"){\n\t\t\t$(this).children().html('Disabled');\n\t\t\t$(this).children().addClass(\"ui-state-error\");\n\t\t}\n\t\telse{\n\t\t\t$(this).children().html('Active');\n\t\t\t$(this).children().removeClass(\"ui-state-error\");\n\t\t}\n\n\t\t$(this).button();\n\t});\n});\n</script>\n</table>\nEOD;\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "2d0c6e03181563708e39eb412d53e01b", "score": "0.48019606", "text": "public function show_suspend_genrator(){\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\t$sql = \"select * from users where roll='2'\";\r\n\t\t\t$res=$this->_dbh->query($sql);\r\n\t\t\t$value= $res->fetchall();\r\n\t\t\treturn($value);\r\n\t\t}catch(PDOException $e){\r\n\t\t\techo $e->getMessage();\r\n\t\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "a60da40e920bb64d826960af6479fd6a", "score": "0.47978398", "text": "function sql() {\r\n }", "title": "" }, { "docid": "ed2983120593fb699ce83135ffde460f", "score": "0.47974536", "text": "public function role();", "title": "" }, { "docid": "ed2983120593fb699ce83135ffde460f", "score": "0.47974536", "text": "public function role();", "title": "" }, { "docid": "d1dfd4881b7c855ec6da1d99ea3d2f7a", "score": "0.47941998", "text": "public function get_username($id){\n $sql3 = \"SELECT username FROM users WHERE id= $id\";\n $result = pg_query($db ,$sql3);\n $user_data = pg_fetch_row($result);\n echo$user_data['username'];\n }", "title": "" }, { "docid": "a5890114c35a3774192c2f581c53fe25", "score": "0.47900766", "text": "public function display()\n {\n echo \"id: $this->userID, uname: $this->username\";\n }", "title": "" }, { "docid": "81e09741cc3daacc8339231f753d550a", "score": "0.47865152", "text": "public function PrintUser(){\r\n\t\tprint \"id: $this->id<br>\\n\";\r\n\t\tprint \"username: $this->username<br>\\n\";\r\n\t\tprint \"password0: $this->password0<br>\\n\";\r\n\t\tprint \"password1: $this->password1<br>\\n\";\r\n\t\tprint \"password2: $this->password2<br>\\n\";\r\n\t\tprint \"name: $this->name<br>\\n\";\r\n\t\tprint \"email: $this->email<br>\\n\";\r\n\t\tprint \"oikeustaso: $this->oikeustaso<br>\\n\";\r\n\t\tprint \"location: $this->location<br>\\n\";\r\n\t\tprint \"aktivointi: $this->aktivointi<br>\\n\";\r\n\t\tprint \"project: $this->project<br>\\n\";\r\n\t\tprint \"phone: $this->phone<br>\\n\";\r\n\t\tprint \"information: $this->information<br>\\n\";\t\t\r\n\t\tprint \"cadmin: $this->cadmin<br>\\n\";\r\n\t\tprint \"changeday: $this->changeday<br>\\n\";\t\t\r\n\t\tprint \"location_name: $this->location_name<br>\\n\";\r\n\t\tprint \"project_name: $this->project_name<br>\\n\";\r\n\t\tprint \"cadmin_name: $this->cadmin_name<br>\\n\";\r\n\t}", "title": "" }, { "docid": "09322624eb829594f017534a5da3253e", "score": "0.47811708", "text": "public function login(){\r\n \r\n return '...Set a flag in the online Members table. ';\r\n }", "title": "" }, { "docid": "636955267c34f29848d282f9e0113217", "score": "0.4776386", "text": "function ListUsers() {\n\t\n\tglobal $db;\n\t$sql = \"SELECT * FROM users where role = 'Teacher'\"; \t\n\t$stmt = OCIParse($db, $sql); \n\t\t\n\tif(!$stmt) {\n\t\techo \"An error occurred in parsing the sql string.\\n\"; \n\t\texit; \n\t }\n\tOCIExecute($stmt);\n\t\n\twhile(OCIFetch($stmt)) {\n\n\t\t$userid= OCIResult($stmt,\"USERID\");\n\t\t$fullname= OCIResult($stmt,\"FULLNAME\");\n\t\t$email= OCIResult($stmt,\"EMAIL\");\n\t\t\n\t\t//format output\n\t\t$output[] = '<tr><td><input type=\"radio\" id=\"userid\" name=\"userid\" value=\"'.$userid.'\"></td>';\n\t\t$output[] = '<td>'.$userid.'</td>';\n\t\t$output[] = '<td>'.$fullname.'</td>';\n\t\t$output[] = '<td>'.$email.'</td></tr>';\n\t}\n\tif(!$output) {\n\t\techo \"Database unavailable\"; \n\t }\n\telse return join ('',$output);\n}", "title": "" }, { "docid": "16f9d44038a041f1bdb9817771bdb57b", "score": "0.47718012", "text": "private function _getRole(){\n\t\t$role = $this->_db->query(\n\t\t\t\"SELECT role FROM usuario WHERE id = '$this->_id'\"\n\t\t);\n\n\t\t$role = $role->fetch();\n\t\treturn $role['role'];\n\t}", "title": "" }, { "docid": "c5b9378cd8f999f471850e199d11dbaa", "score": "0.47709435", "text": "public function run()\n {\n DB::table('roles')->insert([\n \t'name' => 'SuperAdmin',\n \t'access_level' => 1\n ]);\n\n DB::table('roles')->insert([\n \t'name' => 'Admin',\n \t'access_level' => 2\n ]);\n\n DB::table('roles')->insert([\n \t'name' => 'HOD',\n \t'access_level' => 3\n ]);\n\n DB::table('roles')->insert([\n \t'name' => 'Lecturer',\n \t'access_level' => 4\n ]);\n\n DB::table('roles')->insert([\n \t'name' => 'Junior Lecturer',\n \t'access_level' => 5\n ]);\n\n DB::table('roles')->insert([\n \t'name' => 'Secretary',\n \t'access_level' => 6\n ]);\n\n DB::table('roles')->insert([\n \t'name' => 'Deen',\n \t'access_level' => 2\n ]);\n \n DB::table('roles')->insert([\n \t'name' => 'BURSAR',\n \t'access_level' => 2\n ]);\n\n DB::table('roles')->insert([\n \t'name' => 'VC',\n \t'access_level' => 1\n ]);\n\n DB::table('roles')->insert([\n \t'name' => 'Registrar',\n \t'access_level' => 1\n ]);\n }", "title": "" }, { "docid": "58dd9630d2d970d97dd521edbd68492e", "score": "0.4768179", "text": "private function dbuserlist(){\n $results = $this->dt->user_list();\n echo $results;\n }", "title": "" }, { "docid": "aea98a03dea2eaa38faa489c7778f33e", "score": "0.4768052", "text": "function getRank(&$db,$id) {\n\t$rslt = mysql_query('SELECT * FROM pqr_ranks WHERE player_id = \"'.$id.'\"');\n\tif (!$rslt) die('rank sql error: '.mysql_error($db));\n\n\t$rolelist = null;\n\twhile ($row = mysql_fetch_array($rslt,MYSQL_ASSOC)){\n\t\t$rolelist[$row['player_id']] = $row;\n\t}\n\n\treturn $rolelist;\n}", "title": "" }, { "docid": "526b762167f6ae3e238d9e02a2745f28", "score": "0.4762785", "text": "function printteam($team) {\n\tglobal $Connection;\n\n\tprint <<<EOT\n<tr>\n\t<td><a href=\"teamdisp.php?{$team->urlof()}\">{$team->display_name()}</a></td>\n\t<td>{$team->display_description()}</td>\n\t<td>{$team->display_captain()}</td>\n\t<td>{$team->count_members()}</td>\n\t<td>{$team->display_capt_email($Connection->logged_in)}</td>\n\nEOT;\n\tif ($Connection->admin) {\n\t\t$pd = $team->Paid? 'Yes': 'No';\n\t\tprint \"<td>$pd</td>\\n\";\n\t}\n\tprint \"</tr>\\n\";\n}", "title": "" }, { "docid": "38a274d30298114209d80b847091adfd", "score": "0.4758981", "text": "public function run()\n {\n \t$rows = $this->fetchAll('SELECT uuid, username FROM users');\n\n \t$users = [];\n \tforeach($rows as $row){\n \t\t$users[$row['username']] = $row['uuid'];\n\t\t}\n\n\t\t// Assign roles\n\t\t$user_roles = [\n\t\t\t[\n\t\t\t\t'user_uuid' => $users['Cody'],\n\t\t\t\t'role_id' => 2\n\t\t\t],\n\t\t\t[\n\t\t\t\t'user_uuid' => $users['Tony'],\n\t\t\t\t'role_id' => 2\n\t\t\t],\n\t\t\t[\n\t\t\t\t'user_uuid' => $users['Chris'],\n\t\t\t\t'role_id' => 2\n\t\t\t],\n\t\t\t[\n\t\t\t\t'user_uuid' => $users['Cody'],\n\t\t\t\t'role_id' => 3\n\t\t\t]\n\t\t];\n\t\t$table = $this->table('role_user');\n\t\t$table->insert($user_roles)\n\t\t\t->save();\n }", "title": "" }, { "docid": "4999c98878432dcfe08f84a0aac46bf6", "score": "0.4756129", "text": "public function getRoleName()\n\t {\n\t return (Yii::app()->user->isGuest) ? '' : $this->getUserLabel($this->level);\n\t }", "title": "" }, { "docid": "f9bbaee1ad64186f4974d0e23784ee26", "score": "0.47542968", "text": "public function selectRole($uzivatelID){\n try{\n $stmt = $this->conn->prepare(\"SELECT uzivatel.role FROM uzivatel WHERE uzivatelID = :id\");\n $stmt->bindparam(\":id\", $uzivatelID);\n $stmt->execute();\n return $stmt;\n }catch(PDOException $e){\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "a394f2e6469156ccf33dd8d13f9cea96", "score": "0.47489226", "text": "function displayUsers() {\r\n global $database;\r\n $q = \"SELECT username,userlevel,email,timestamp \"\r\n . \"FROM \" . TBL_USERS . \" ORDER BY userlevel DESC,username\";\r\n $result = $database->query($q);\r\n // error occurred, return given name by default\r\n $num_rows = mysql_numrows($result);\r\n if (!$result || ($num_rows < 0)) {\r\n echo \"<p>Error displaying info.</p>\";\r\n return;\r\n }\r\n if ($num_rows == 0) {\r\n echo \"<p>Database table empty.</p>\";\r\n return;\r\n }\r\n \r\n // display table contents\r\n echo \"<table align=\\\"left\\\" border=\\\"1\\\" cellspacing=\\\"0\\\" cellpadding=\\\"3\\\">\\n\";\r\n echo \"<tr><td><b>Username</b></td><td><b>Level</b></td><td><b>Email</b></td><td><b>Last Active</b></td></tr>\\n\";\r\n for ($i=0; $i<$num_rows; $i++) {\r\n $uname = mysql_result($result,$i,\"username\");\r\n $ulevel = mysql_result($result,$i,\"userlevel\");\r\n $email = mysql_result($result,$i,\"email\");\r\n $time = mysql_result($result,$i,\"timestamp\");\r\n echo \"<tr><td>$uname</td><td>$ulevel</td><td>$email</td><td>$time</td></tr>\\n\";\r\n }\r\n echo \"</table><br>\\n\";\r\n}", "title": "" }, { "docid": "9aed864160de3f6fee2e342aa657bdd2", "score": "0.4746733", "text": "protected function getLoginSelectStatement() { \n return \"SELECT UserID, UserName, Password, Salt, State, DateJoined, DateLastModified\n FROM UsersLogin\";\n }", "title": "" }, { "docid": "748ed02e8e56ac4244966e7b65880fbd", "score": "0.47450933", "text": "public function __toString()\n {\n return $this->fetch('sql');\n }", "title": "" }, { "docid": "24b6a6aa4ce18c84888dadd1a45cfc36", "score": "0.47391728", "text": "function DisplayEditableProfile($moderator=false, $playerdata=NULL){\n\tif(!isset($playerdata)){\n\t\tif(!empty($_POST['player_uid'])){\n\t\t\t$playerdata = SqlGetRow('*',X1_DB_userinfo,'where uid='.MakeItemString($_POST['player_uid']));\n\t\t}\n\t\telse{\n\t\t\tAdminLog($output=\"No player data specificed\", $function=\"DisplayEditableProfile\", $title = 'Major Error',ERROR_DIE);\n\t\t}\n\t}\n\t$real_name=X1TeamUser::GetUserName($playerdata['uid']);\n \n\t$output = definemodoradminmenu($moderator,\"teams\");\n\n\t$output.= \"\n\t<table class='\".X1plugin_admintable.\"' width='100%'>\n\t\t<thead class='\".X1plugin_tablehead.\"'>\n\t \t\t<tr>\n\t \t\t\t<th colspan='2'>\".XL_playerprofile_title.\":\".$real_name.\"</th>\n\t \t\t</tr>\n\t\t</thead>\n\t\t\t<tbody class='\".X1plugin_tablebody.\"'>\n\t\t\t\t<form method='post' action='\".X1_adminpostfile.\"' style='\".X1_formstyle.\"'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='alt1'>\".XL_playerprofile_name.\"</td>\n\t\t\t\t <td class='alt1'><input type='text' name='ingamename' value='$playerdata[gam_name]' size='20' maxlength='255'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='alt1'>\".XL_teamprofile_homepage.\"</td>\n\t\t\t\t\t\t<td class='alt1'><input type='text' name='website' value='$playerdata[p_website]' size='20' maxlength='255'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='alt2'>\".XL_playerprofile_location.\"</td>\n\t\t\t\t\t\t<td class='alt2'>\".SelectBox_Country(\"country\", $playerdata['p_country']).\"</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class'alt1'>\".XL_teamadmin_mail.\"\n\t\t\t\t\t\t<td class='alt1'><input type='text' name='email' value='$playerdata[p_mail]' size='20' maxlength='255'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class'alt1'>\".XL_playerprofile_fmail.\"\n\t\t\t\t\t\t<td class='alt1'><input type='text' name='femail' value='$playerdata[faux_email]' size='20' maxlength='255'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class'alt1'>\".XL_playerprofile_usefmail.\"\n\t\t\t\t\t\t\".SelectBoxYesNo(\"usefmail\",$playerdata['use_faux'],\"alt1\").\"\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class'alt1'>\".XL_ateams_aim.\"\n\t\t\t\t\t\t<td class='alt1'><input type='text' name='aim' value='$playerdata[p_aim]' size='20' maxlength='40'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class'alt1'>\".XL_ateams_icq.\"\n\t\t\t\t\t\t<td class='alt1'><input type='text' name='icq' value='$playerdata[p_icq]' size='20' maxlength='40'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class'alt1'>\".XL_ateams_msn.\"\n\t\t\t\t\t\t<td class='alt1'><input type='text' name='msn' value='$playerdata[p_msn]' size='20' maxlength='255'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class'alt1'>\".XL_teamadmin_xfire.\"\n\t\t\t\t\t\t<td class='alt1'><input type='text' name='xfire' value='$playerdata[p_xfire]' size='20' maxlength='40'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class'alt1'>\".XL_ateams_yim.\"\n\t\t\t\t\t\t<td class='alt1'><input type='text' name='yim' value='$playerdata[p_yim]' size='20' maxlength='255'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='alt2'>\n\t\t\t\t\t\t<input type='hidden' name='player_uid' value='$playerdata[uid]'>\n\t\t\t\t\t\t\t\".AdminModButton($moderator, XL_teamadmin_update, $action=array(\"admin_plyupdate\",\"mod_plyupdate\")).\"\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</form>\";\n\t\t\t\t\n\t\t\t\t$output .=\"<form method='post' action='\".X1_adminpostfile.\"' style='\".X1_formstyle.\"'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='alt2'>\n\t\t\t\t\t\t<input type='hidden' name='player_uid' value='$playerdata[uid]'>\n\t\t\t\t\t\t\".AdminModButton($moderator,XL_aplayer_removeall,$action=array(\"ad_plytremov_all\",\"mod_plytremov_all\")).\"\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='alt1'>\".XL_aplayer_removallnote.\"</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</form>\";\n\t\t\t\t\n\t\t\t$output.=\"</tbody>\n\t\t</table>\".\n\t X1GetPlayerTeams($moderator,$playerdata['uid']);\n\t\n\treturn DispFunc::X1PluginOutput($output);\n}", "title": "" }, { "docid": "3cbda8da6080948effdf01fb15c308cf", "score": "0.4738754", "text": "public static function mostrarRoles() {\n $query = \"SELECT * FROM Rol\";\n\n //self::getConexion();\n\n $resultado = self::getConexion()->prepare($query);\n $resultado->execute();\n\n return $resultado->fetchAll();\n }", "title": "" }, { "docid": "e1d65c0eab3bf74e65ef8a1cc38fcb0b", "score": "0.47383735", "text": "public function accessCheck()\n {\n if(isset($_SESSION['user_id']))\n {\n $user_id = $_SESSION['user_id'];\n try\n {\n $stmt = $this->conn->prepare(\"SELECT * FROM user \n left join role on user_role_id = role_id\n WHERE user_id=:uid\");\n $stmt->bindparam(\":uid\", $user_id);\n $stmt->execute();\n $userRow=$stmt->fetch(PDO::FETCH_ASSOC);\n // if email if found check password\n if($stmt->rowCount() == 1)\n {\n return $userRow['role_name'];\n }\n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }\n }", "title": "" }, { "docid": "6314ed7fd5657f21fbf492a7f3caceeb", "score": "0.4732175", "text": "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM user_collaborative_role';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "title": "" }, { "docid": "8f49c4b2966134619ec456b9b2e5845c", "score": "0.4725529", "text": "function extViewPlayerProfile($arr)\n\t{\n\t\t\n\t\t$query = \"SELECT SQL_CACHE usr, idplayer, (virtual_money-(n_credit_update*\".PKR_DEFAUL_GET_CREDIT.\")) as w FROM pkr_player WHERE confirmed=1 ORDER BY w DESC\";\n\t\t$res = $GLOBALS['mydb']->special_select($query, \"idplayer\");\n\t\t\n\t\t// Insert pos field in player ranking array\n\t\tarray_walk($res,'setPos');\n\t\t\n\t\t$query = \"SELECT usr, idplayer from pkr_player where idplayer = \".$arr['idplayer'];\n\t\t$rows = $GLOBALS['mydb']->select($query);\n\n\t\t// Insert pos for user on table\n\t\tarray_walk($rows,'addElement',$res);\n\t\t\n\t\t$mypos = $rows[0]['pos'];\n\t\tunset($res);\n\t\tunset($rows);\n\t\t?>\n\t\t<br>\n\t\t<!--1-->\n\t\t<table width=\"100%\" border=\"0\" align=\"center\" border=\"0\">\n\t\t<tr>\n\t\t<td valign=\"top\">\n\t\n\t\t\t<!--2-->\t\n\t\t\t<table width=\"370\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"left\" style=\"font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; color: #000000;\">\n\t\t\t\n\t\t\t<!--<tr>\n\t\t\t<td colspan=\"2\">\n\t\t\t\n\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" style=\"{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; color: #000000; }\">\n\t\t\t\t<tr>\t\t\n\t\t\t\t\t<td width=\"1\"><img src=\"../images/site/tleft.gif\" border=\"0\"></td>\t\n\t\t\t\t\t<td style=\"{ height:8px; font-size: 12px; font-weight: bold; color: white; background-image: url(../images/site/tmiddle.gif); }\">USER&nbsp;PROFILE:&nbsp;&nbsp;<b><?php echo strtoupper($arr['usr'])?></b></td>\n\t\t\t\t\t<td width=\"1\"><img src=\"../images/site/tright.gif\" border=\"0\"></td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr><td colspan=\"2\">&nbsp;</td></tr>-->\n\t\t\t\n\t\t\t<tr>\n\t\t\t<td colspan=\"2\">\n\n\t\t\t\t<!--3-->\n\t\t\t\t<table width=\"100%\">\n\t\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t\t<!--4-->\n\t\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" align=\"center\" style=\"font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; color: #000000;\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t//$str = \"idplayer,usr,mail,city,isc_date,virtual_money,supporter,bonus\";\n\t\t\t\t\t\tforeach ($arr as $key => $val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t//&& ($key != \"usr\")\n\t\t\t\t\t\tif (($key != \"supporter\") && ($key != \"bonus\") && ($key != \"virtual_money\")) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$str = \"\";\n\t\t\t\t\t\t\tswitch ($key)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"idplayer\":\n\t\t\t\t\t\t\t\t$type = \"hidden\";\n\t\t\t\t\t\t\t\t$fval = \"\";\n\t\t\t\t\t\t\t\t$fkey = \"\";\n\t\t\t\t\t\t\t\t$str = \"onFocus = 'blur()'\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"n_credit_update\":\n\t\t\t\t\t\t\t\t$type = \"\";\n\t\t\t\t\t\t\t\t$fval = \"\";\n\t\t\t\t\t\t\t\t$fkey = \"\";//$key;\n\t\t\t\t\t\t\t\t$str = \"\";\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase \"isc_date\":\n\t\t\t\t\t\t\t\t$type = \"text\";\n\t\t\t\t\t\t\t\t$fval = date(\"d/m/Y\",$val);\n\t\t\t\t\t\t\t\t$fkey = \"GRA OD\";//$key;\n\t\t\t\t\t\t\t\t$str = \"onFocus = 'blur()'\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"points\":\n\t\t\t\t\t\t\t\t$type = \"text\";\n\t\t\t\t\t\t\t\t$fval = $val;\n\t\t\t\t\t\t\t\t$fkey = \"PUNKTY\";\n\t\t\t\t\t\t\t\t$str = \"\";\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"usr\":\n\t\t\t\t\t\t\t\t$type = \"text\";\n\t\t\t\t\t\t\t\t$fval = strtoupper($val);\n\t\t\t\t\t\t\t\t$fkey = \"GRACZ\";\n\t\t\t\t\t\t\t\t$str = \"\";\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\t\tcase \"city\":\n\t\t\t\t\t\t\t\t$type = \"text\";\n\t\t\t\t\t\t\t\t$fval = strtoupper($val);\n\t\t\t\t\t\t\t\t$fkey = \"MIASTO\";\n\t\t\t\t\t\t\t\t$str = \"\";\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase \"rank\":\n\t\t\t\t\t\t\t\t$type = \"text\";\n\t\t\t\t\t\t\t\t$fval = $GLOBALS['rank'][getPlayerRank($val)];\n\t\t\t\t\t\t\t\t$fkey = \"POZIOM\";\n\t\t\t\t\t\t\t\t$str = \"\";\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase \"bonus\":\n\t\t\t\t\t\t\t\t$type = \"image\";\n\t\t\t\t\t\t\t\t$fval = $val;\n\t\t\t\t\t\t\t\t$fkey = $key;\n\t\t\t\t\t\t\t\t$str = \"src='../images/bonus/\".$val.\".png'\";\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"supporter\":\n\t\t\t\t\t\t\t\t$type = \"text\";\n\t\t\t\t\t\t\t\tif ($val == 1)\n\t\t\t\t\t\t\t\t\t$fval = \"si\";\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t$fval = \"no\";\n\t\t\t\t\t\t\t\t$fkey = $key;\n\t\t\t\t\t\t\t\t$str = \"onFocus = 'blur()'\";\n\t\t\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$fval = \"\";\n\t\t\t\t\t\t\t\t$fkey = \"\";\n\t\t\t\t\t\t\t\tif (!empty($val)) {\n\t\t\t\t\t\t\t\t\t$type = \"text\";\n\t\t\t\t\t\t\t\t\t$fval = strtoupper($val);\n\t\t\t\t\t\t\t\t\t$fkey = $key;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\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\tif ((!empty($fkey)) || (!empty($fval))) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t?>\t\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td width=\"40%\">\n\t\t\t\t\t\t\t\t\t<?php echo strtoupper($fkey);?>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td width=\"60%\">\n\t\t\t\t\t\t\t\t\t<!--<input type=\"<?php echo $type?>\" name=\"<?php echo $key?>\" value=\"<?php echo $fval?>\" size=\"<?php echo strlen($val)+2?>\" <?php echo $str?>>-->\n\t\t\t\t\t\t\t\t\t<b><?php echo $fval?></b>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<?php\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"40%\">\n\t\t\t\t\t\tRANKING\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td width=\"60%\">\n\t\t\t\t\t\t<b><?php echo $mypos?></b>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php\t\t\t\n\t\t\t\t\t\t$supporter = $arr['supporter'];\n\t\t\t\t\t\t$mybonus = $arr['bonus'];\n\t\t\t\t\t\t$virtual_money = $arr['virtual_money'];\n\t\t\t\t\t\t$ncost = count($this->cost);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$got = $arr['n_credit_update']*PKR_DEFAUL_GET_CREDIT;\n\t\t\t\t\t\t$repayment = $arr['n_credit_update']*0.50;\n\t\t\t\t\t\t$got2 = $got/2;\n\t\t\t\t\t\t$repayment2 = $repayment/2;\n\t\t\t\t\t\t?>\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<!--4-->\n\t\t\t\t\t\n\t\t\t\t\t\t</td><td align=\"center\" valign=\"top\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t<table width=\"1\" border=\"0\">\n\t\t\t\t\t\t\t<tr><td>\n\t\t\t\t\t\t\t<div style=\"position:relative;margin-top:-50px\" id=\"fishs\"></div>\n\t\t\t\t\t\t\t<?php $str = $this->arrfish2image($this->credit2arr_fish($virtual_money))?>\n\t\t\t\t\t\t\t</td></tr>\n\t\t\t\t\t\t\t<tr><td align=\"center\">TWOJE �ETONY <br><b><?php echo number_format($virtual_money,2,',','.')?></b><?php echo PKR_CURRENCY_SYMBOL?>\n\t\t\t\t\t\t\t</td></tr>\n\t\t\t\t\t\t\t<tr><td align=\"center\">UTRACONE �ETONY <br><b><?php echo number_format($got,2,',','.')?></b><?php echo PKR_CURRENCY_SYMBOL?>\n\t\t\t\t\t\t\t</td></tr>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<script language=\"javascript\">\n\t\t\t\t\t\t\tfunction setFish() {\n\t\t\t\t\t\t\t\tvar mydiv = document.getElementById('fishs');\n\t\t\t\t\t\t\t\tmydiv.innerHTML = '<?php echo $str ?>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdocument.onLoad = setFish;\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<!--3-->\n\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<?php\n\t\t\t\t\tif ($arr['n_credit_update']>1) {\n\t\t\t\t\t?>\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\">&nbsp;</td>\n\t\t\t\t\t</tr>\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\">SP�A� SW�J D�UG I ODZYSKAJ POZYCJ� W RANKINGU</td>\n\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t<form action=\"https://www.paypal.pl/cgi-bin/webscr\" name=\"solve\" target=\"_blank\" method=\"post\">\n\t\t\t\t\t<input type=\"hidden\" name=\"business\" value=\"<?php echo PAYPAL_ACCOUNT?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">\n\t\t\t\t\t<input type=\"hidden\" name=\"no_shipping\" value=\"1\">\n\t\t\t\t\t<input type=\"hidden\" name=\"bn\" value=\"PP-BuyNowBF\">\n\t\t\t\t\t<input type=\"hidden\" name=\"lc\" value=\"IT\">\n\t\t\t\t\t<input type=\"hidden\" name=\"no_note\" value=\"1\">\n\t\t\t\t\t<input type=\"hidden\" name=\"return\" value=\"<?php echo _myurl?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"amount\" value=\"<?php echo str_replace(\",\",\".\",$repayment)?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"currency_code\" value=\"EUR\">\n\t\t\t\t\t<input type=\"hidden\" name=\"item_name\" value=\"Dotacja flashpoker.pl <?php echo $got?><?php echo PKR_CURRENCY_SYMBOL?> gracz #<?php echo $arr['idplayer']?># <?php echo $arr['usr']?> <?php echo $arr['mail']?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"item_number\" value=\"<?php echo 'totalsolve'?>\">\t\t\n\t\t\t\t\t<td colspan=\"2\"><a href=\"#\" title=\"click to donate and solve game debit\" onClick=\"document.forms['solve'].submit()\"><u>SP�A� CA�Y D�UG PRZEKAZUJ�C <b><?php echo $repayment?>�</b></u></a> *</td>\n\t\t\t\t\t</form>\n\t\t\t\t\t</tr>\t\t\t\n\n\t\t\t\t\t<tr>\n\t\t\t\t\t<form action=\"https://www.paypal.pl/cgi-bin/webscr\" name=\"partialsolve\" target=\"_blank\" method=\"post\">\n\t\t\t\t\t<input type=\"hidden\" name=\"business\" value=\"<?php echo PAYPAL_ACCOUNT?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">\n\t\t\t\t\t<input type=\"hidden\" name=\"no_shipping\" value=\"1\">\n\t\t\t\t\t<input type=\"hidden\" name=\"bn\" value=\"PP-BuyNowBF\">\n\t\t\t\t\t<input type=\"hidden\" name=\"lc\" value=\"IT\">\n\t\t\t\t\t<input type=\"hidden\" name=\"no_note\" value=\"1\">\n\t\t\t\t\t<input type=\"hidden\" name=\"return\" value=\"<?php echo _myurl?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"amount\" value=\"<?php echo str_replace(\",\",\".\",$repayment2)?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"currency_code\" value=\"EUR\">\n\t\t\t\t\t<input type=\"hidden\" name=\"item_name\" value=\"Dotacja flashpoker.pl <?php echo $got2?><?php echo PKR_CURRENCY_SYMBOL?> gracz #<?php echo $arr['idplayer']?># <?php echo $arr['usr']?> <?php echo $arr['mail']?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"item_number\" value=\"<?php echo 'partialsolve'?>\">\t\t\n\t\t\t\t\t<td colspan=\"2\"><a href=\"#\" title=\"click to donate and solve game debit\" onClick=\"document.forms['partialsolve'].submit()\"><u>SP�A� PO�OW� D�UGU PRZEKAZUJ�C <b><?php echo $repayment2?>�</b></u></a> *</td>\n\t\t\t\t\t</form>\n\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\">&nbsp;</td>\n\t\t\t\t\t</tr>\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\">*+1 BONUS E +1000<?php echo PKR_CURRENCY_SYMBOL?></td>\n\t\t\t\t\t</tr>\t\t\n\t\t\t\t\t\n\t\t\t\t\t<?php } ?>\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<tr><td colspan=\"2\">\n\t\t\t\t\t\n\t\t\t\t\t\t<?php\t\t\t\n\t\t\t\t\t\tif ($supporter == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<br> \n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<br>CURRENT SUPPORTER LEVEL <b><?php echo $supporter?></b>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\t\t\t\t\t\n\t\t\t\t\t</table>\n\t\t\t\t\t<!--2-->\n\t\t\t\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<!--1-->\n\n\t\t\t\t<br><br>\n\t\t\t\t<table border=\"0\" align=\"center\" width=\"100%\">\n\t\t\t\t<tr>\n\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t<?php\n\t\t\t\tfor ($i = 1;$i<=$ncost;$i++)\n\t\t\t\t{\n\t\t\t\t\t?>\n\t\t\t\t\t\n\t\t\t\t\t<form action=\"https://www.paypal.com/cgi-bin/webscr\" name=\"payimg<?php echo $i?>\" target=\"_blank\" method=\"post\">\n\t\t\t\t\t<input type=\"hidden\" name=\"business\" value=\"<?php echo PAYPAL_ACCOUNT?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">\n\t\t\t\t\t<input type=\"hidden\" name=\"no_shipping\" value=\"1\">\n\t\t\t\t\t<input type=\"hidden\" name=\"bn\" value=\"PP-BuyNowBF\">\n\t\t\t\t\t<input type=\"hidden\" name=\"lc\" value=\"IT\">\n\t\t\t\t\t<input type=\"hidden\" name=\"no_note\" value=\"1\">\n\t\t\t\t\t<input type=\"hidden\" name=\"return\" value=\"<?php echo _myurl?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"amount\" value=\"<?php echo str_replace(\",\",\".\",$this->cost[$i])?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"currency_code\" value=\"EUR\">\n\t\t\t\t\t<input type=\"hidden\" name=\"item_name\" value=\"Dotacja flashpoker.pl +<?php echo $this->bonus[$i]?><?php echo PKR_CURRENCY_SYMBOL?> gracz #<?php echo $arr['idplayer']?># <?php echo $arr['usr']?> <?php echo $arr['mail']?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"item_number\" value=\"<?php echo $i?>\">\t\t\t\n\t\t\t\t\t<td><a href=\"#\" title=\"click to donate\" onClick=\"document.forms['payimg<?php echo $i?>'].submit()\"><img src=\"../images/bonus/<?php echo $i?>.png\" border=\"0\" title=\"Supporta flashpoker al costo di <?php echo $this->cost[$i]?>�\"></a></td>\n\t\t\t\t\t</form>\t\t\n\t\t\t\t\t\n\t\t\t\t\t<?php\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr bgcolor=\"#ddddee\">\n\t\t\t\t<td>DOTACJA</td>\n\t\t\t\t<?php\t\t\t\t\t\t\t\n\t\t\t\tfor ($i = 1;$i<=$ncost;$i++)\n\t\t\t\t{\n\t\t\t\t\t?>\n\t\t\t\t\t<form action=\"https://www.paypal.com/cgi-bin/webscr\" name=\"pay<?php echo $i?>\" target=\"_blank\" method=\"post\">\n\t\t\t\t\t<input type=\"hidden\" name=\"business\" value=\"<?php echo PAYPAL_ACCOUNT?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">\n\t\t\t\t\t<input type=\"hidden\" name=\"no_shipping\" value=\"1\">\n\t\t\t\t\t<input type=\"hidden\" name=\"bn\" value=\"PP-BuyNowBF\">\n\t\t\t\t\t<input type=\"hidden\" name=\"lc\" value=\"IT\">\n\t\t\t\t\t<input type=\"hidden\" name=\"no_note\" value=\"1\">\n\t\t\t\t\t<input type=\"hidden\" name=\"return\" value=\"<?php echo _myurl?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"amount\" value=\"<?php echo str_replace(\",\",\".\",$this->cost[$i])?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"currency_code\" value=\"EUR\">\n\t\t\t\t\t<input type=\"hidden\" name=\"item_name\" value=\"Dotacja flashpoker.pl +<?php echo $this->bonus[$i]?><?php echo PKR_CURRENCY_SYMBOL?> gracz #<?php echo $arr['idplayer']?># <?php echo $arr['usr']?> <?php echo $arr['mail']?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"item_number\" value=\"<?php echo $i?>\">\t\t\t\n\t\t\t\t\t<td><a href=\"#\" title=\"Supporta flashpoker con una donazione !\" onClick=\"document.forms['pay<?php echo $i?>'].submit()\"><u><?php echo $this->cost[$i]?>�</u></td>\n\t\t\t\t\t</form>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t<td><b>BONUS</b></td>\n\t\t\t\t<?php\n\t\t\t\tfor ($i = 1;$i<=$ncost;$i++)\n\t\t\t\t{\n\t\t\t\t\t?>\n\t\t\t\t\t<td>+<b><?php echo $this->bonus[$i]/1000?>K</b><?php echo PKR_CURRENCY_SYMBOL?></td>\n\t\t\t\t\t<?php\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t?>\t\t\t\t\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t<td>CURR.</td>\n\t\t\t\t<?php\n\t\t\t\tfor ($i = 1;$i<=$ncost;$i++)\n\t\t\t\t{\n\t\t\t\t\t?><td><?php\n\t\t\t\t\tif ($i==$mybonus) {\n\t\t\t\t\t?>\n\t\t\t\t\t&nbsp;&nbsp;&nbsp;<b><font size=\"3\">^</font></b>\n\t\t\t\t\t<?php\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?>\n\t\t\t\t\t&nbsp;\n\t\t\t\t\t<?php\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t?></td><?php\n\t\t\t\t}\n\t\t\t\t?>\t\t\t\t\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t</table>\n\t\t\t\t\n\t\t\t\t<br><br>\n\t\t\t\t\n\t\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t<td width=\"90%\">\n\t\t\t\t\t<b>Kliknij na ikonk� ze znaczkiem bonusu i wspom� flashpoker.pl przeka� darowizn�!</b>\n\t\t\t\t\t<br>\n\t\t\t\t\t<br>\t\t\t\t\t\n\t\t\t\t\tFlashpoker.pl podaruje Ci kredyty, kt�re pozwol� Ci na wspi�cie si� na g�r� (RANKING) na stronie !!\n Transakcja przeprowadzana jest z zachowaniem wszelkich zasad bezpiecze�stwa, poprzez bezpieczne po��czenie (SSL) na stronie Paypal. <a href=\"http://www.paypal.pl\" target=_blank><b><u>Paypal</u></b></a>.\n\t\t\t\t\t<br>\n\t\t\t\t\t<br>\n\t\t\t\t\tZakredytowanie pieni�dzy nast�puje automatycznie i natychmiast po dokonaniu darowizny. Ponadto Twoje konto nigdy nie zostanie usuni�te, nawet je�eli nie b�dziesz z niego korzysta� przez 30 dni..\n\t\t\t\t\t<br>\n\t\t\t\t\t<br>\n\t\t\t\t\tW celu uzyskania dodatkowych informacji napisz do nas: <a href=\"mailto:admin@flashpoker.pl\"><b><u>admin@flashpoker.pl</u></b></a>\n\t\t\t\t</td>\n\t\t\t\t<td valign=\"middle\">\n\t\t\t\t<img src=\"../images/site/paypalVerified.png\">\n\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t<br>\t\n\t\t\n\t\t<table align=\"center\">\n\t\t<tr>\n\t\t<form action=\"<?php echo $_SERVER['SCRIPT_NAME']?>\" name=\"retry\" method=\"post\">\n\t\t<input type=\"hidden\" name=\"act_value\" value=\"<?php echo PKR_EXT_WWW?>\">\n\t\t<input type=\"hidden\" name=\"sub_act_value\" value=\"<?php echo PKR_PUBLIC_EXT_HOME?>\">\n\t\t<input type=\"hidden\" name=\"room\" value=\"1\">\n\t\t\t<td colspan=\"6\" align=\"center\">\n\t\t\t\t<input type=\"submit\" value=\"<< POWR�T\">&nbsp;<input type=\"button\" value=\"WYLOGOWANIE\" onClick=\"window.location = '../index/extlogout.php';\">\n\t\t\t</td>\n\t\t</form>\n\t\t</tr>\n\t\t\n\t\t</table>\t\t\n\t\t<?php\t\t\t\n\t}", "title": "" }, { "docid": "3aaab766e358a06ed16cf03da2323929", "score": "0.47245526", "text": "public function get_role_user() {\n $sql = \"select * from advertiser where Role IN (3,4,5,6,7) and StatusID <>3\";\n $data = $this->db->query($sql);\n return $data->result();\n }", "title": "" }, { "docid": "16f8abe6fab4afd469a2c17d5b53d296", "score": "0.47236562", "text": "protected function column_col3() {\n $words = $this->getWords();\n\n $list=$this->list ;\n\n\n if ($this->VerifierUsername!=\"\") {\n\n // Try to find the max level of verification for this member\n $VerificationMaxLevel=\"verifymembers_NotYetVerified\";\n for ($ii=0;$ii<count($list);$ii++) {\n if ($list[$ii]->VerificationType==\"VerifiedByApproved\") {\n $VerificationMaxLevel=\"verifymembers_\".$list[$ii]->VerificationType;\n break;\n } elseif ($list[$ii]->VerificationType==\"VerifiedByVerified\") {\n $VerificationMaxLevel=\"verifymembers_\".$list[$ii]->VerificationType;\n } elseif ($list[$ii]->VerificationType==\"VerifiedByNormal\" && $VerificationMaxLevel != \"VerifiedByVerified\") {\n $VerificationMaxLevel=\"verifymembers_\".$list[$ii]->VerificationType;\n }\n }\n $Username=$this->VerifierUsername ;\n require SCRIPT_BASE . 'build/verifymembers/templates/showverifiers.php';\n } elseif ($this->VerifiedUsername!=\"\") {\n $Username=$this->VerifiedUsername ;\n require SCRIPT_BASE . 'build/verifymembers/templates/showverified.php';\n }\n }", "title": "" }, { "docid": "38666707467caf0cf96034b017eb0b08", "score": "0.4722549", "text": "public function verRol(){\n $sql = \"SELECT DISTINCT * FROM rol\";\n $consulta = $this->db->prepare($sql);\n $consulta->execute();\n $result = $consulta->fetchAll();\n return $result;\n }", "title": "" }, { "docid": "3c550756cbdd32312b9a894480c5356e", "score": "0.47168872", "text": "function PrintDB()\n\t{\n\t\t$rowInfo=array();\n\t\tif ($this->Get($rowInfo)==ERR_NONE) {\n\t\t\techo \"<h3>\".$this->mTbName.\"</h3>\\n\";\n\t\t\t$this->Find($this->mTbName, 'id', $this->mId, $rowInfo);\n\t\t\tforeach ($rowInfo as $key => $value) {\n\t\t\t\techo ($key.\"=\".$value.\"<br>\\n\");\t\n\t\t\t}\n\t\t} else {\n\t\t\techo $this->GetErrorMsg();\n\t\t}\n\t}", "title": "" }, { "docid": "16be6e6886d3680a63e1691886565d0e", "score": "0.4716882", "text": "public function outputSqlInserts() {\n\t\t$this->schedule->printResults('sql');\n\t}", "title": "" }, { "docid": "742bd9d3e3853217ea571f47f2cb9496", "score": "0.47140995", "text": "public function role_name() : string {\n\t\tif(NULL === $this->role) {\n\t\t\treturn '';\n\t\t} else {\n\t\t\treturn $this->role->name();\n\t\t}\n\t}", "title": "" }, { "docid": "3ef1c630fcafe448edbaa44247082da1", "score": "0.47132123", "text": "function mysqlResult(){\n\tglobal $dbConf;\n\t$report = '<table id=\"mysql_report\" width=\"600\"><tr><center>User Privilege Report</center></tr>';\n\t\n\ttry{\n\t\t$conn = new PDO('mysql:host=' . $dbConf['address'] . ';port=' . $dbConf['port'] . ';charset=utf8', $dbConf['user'], $dbConf['password']);\n\t\t$rs = $conn->query('SHOW GRANTS');\n\t\t\n\t\t// Fetch grant results\n\t\twhile($row = $rs->fetch()){\n\t\t\t$report .= '<tr><td>Database Privilege</td><td>' . $row[0] . '</td><td>';\n\t\t\t\n\t\t\t$grantRep = chkGrant($row[0]);\n\t\t\t$advice = getAdvice($dbConf['role'], $grantRep);\n\t\t\t\n\t\t\t$report .= $grantRep . '</td><td>' . $advice . '</td></tr>';\n\t\t}\n\t\t\n\t\t$conn = null;\n\t\t$report .= '</table>';\n\t\treturn $report;\n\t}\n\tcatch(PDOException $e) {\n\t\t$str = '<tr><td>Error: ' . $e->getMessage() . '</td></tr></table>';\n\t\t$conn = null;\n\t\treturn $str;\n\t}\n\t\n\t\n}", "title": "" }, { "docid": "c0d63160ee5a9278e51cf9badfe8f163", "score": "0.47125578", "text": "function ShowUsers() {\n global $dbaseUserData,$SID,$leagueID;\n\n $link = OpenConnection();\n if ($link == FALSE) {\n echo \"Unable to connect to the dbase\";\n return;\n }\n \n $userquery = \"SELECT * FROM $dbaseUserData where lid='$leagueID'\";\n $userresult = mysqli_query($link,$userquery)\n or die(\"Query failed: $userquery\");\n\n // Display the username as a header.\n?>\n <table class=\"STANDTB\">\n <tr>\n <td class=\"TBLHEAD\" colspan=\"8\" align=\"center\"><font class=\"TBLHEAD\">Users</font></td>\n </tr>\n <tr>\n <td align=\"center\" class=\"TBLHEAD\"><font class=\"TBLHEAD\">User ID</font></td>\n <td align=\"center\" class=\"TBLHEAD\"><font class=\"TBLHEAD\">Admin</font></td>\n <td align=\"center\" class=\"TBLHEAD\"><font class=\"TBLHEAD\">Username</font></td>\n <td align=\"center\" class=\"TBLHEAD\"><font class=\"TBLHEAD\">Email</font></td>\n <td align=\"center\" class=\"TBLHEAD\"><font class=\"TBLHEAD\">Since</font></td>\n <td align=\"center\" class=\"TBLHEAD\"><font class=\"TBLHEAD\">&nbsp;</font></td>\n <td align=\"center\" class=\"TBLHEAD\"><font class=\"TBLHEAD\">&nbsp;</font></td>\n <td align=\"center\" class=\"TBLHEAD\"><font class=\"TBLHEAD\">&nbsp;</font></td>\n </tr>\n<?php\n // First loop. Used to get all the users.\n while ($userline = mysqli_fetch_array($userresult, MYSQL_ASSOC)) {\n // For each user display all their predictions.\n // against the actual result.\n $username = $userline[\"username\"];\n $userid = $userline[\"userid\"];\n $usertype = $userline[\"usertype\"];\n $icon = $userline[\"icon\"];\n $email = $userline[\"email\"];\n $since = $userline[\"since\"];\n\n $isAdmin = \"\";\n if ($usertype >= 4) {\n $isAdmin = \"Yes\";\n }\n echo \"<tr>\\n\";\n echo \"<td class=\\\"TBLROW\\\"><font class=\\\"TBLROW\\\">$userid</font></td>\\n\";\n echo \"<td class=\\\"TBLROW\\\"><font class=\\\"TBLROW\\\">$isAdmin</font></td>\\n\";\n echo \"<td class=\\\"TBLROW\\\"><font class=\\\"TBLROW\\\">$username</font></td>\\n\";\n echo \"<td class=\\\"TBLROW\\\"><font class=\\\"TBLROW\\\"><a href=\\\"mailto:$email\\\">$email</a></font></td>\\n\";\n echo \"<td class=\\\"TBLROW\\\"><font class=\\\"TBLROW\\\">$since</font></td>\\n\";\n echo \"<td class=\\\"TBLROW\\\"><font class=\\\"TBLROW\\\"><a href=\\\"deleteuser.php?sid=$SID&userid=$userid\\\" onclick=\\\"return confirm('Are you sure you want to delete \".addslashes($username).\" and all their predictions');\\\"><small>delete user</small></a></font></td>\\n\";\n echo \"<td class=\\\"TBLROW\\\"><font class=\\\"TBLROW\\\"><a href=\\\"changeuserpassword.php?sid=$SID&userid=$userid&username=$username\\\"><small>change user password</small></a></font></td>\\n\";\n if ($usertype >= 4) {\n echo \"<td class=\\\"TBLROW\\\"><font class=\\\"TBLROW\\\"><a href=\\\"modifyuseradmin.php?sid=$SID&admin=Y&userid=$userid&username=$username\\\"><small>Remove admin privileges from this user</small></a></font></td>\\n\";\n } else {\n echo \"<td class=\\\"TBLROW\\\"><font class=\\\"TBLROW\\\"><a href=\\\"modifyuseradmin.php?sid=$SID&admin=N&userid=$userid&username=$username\\\"><small>Make this user an admin user</small></a></font></td>\\n\";\n }\n echo \"</tr>\\n\";\n }\n echo \"</table>\\n\";\n\n CloseConnection($link);\n}", "title": "" }, { "docid": "1ac00fc22fb2644f274b2ebe5b7233b7", "score": "0.47101492", "text": "function selectMemberId()\n {\n return 'SELECT * FROM users WHERE id = :id';\n }", "title": "" }, { "docid": "954ad1c6f8cb2f7bcf2bdbbd05f39e01", "score": "0.47066933", "text": "public function role () {\n $tester = DB::table('salespeople')\n ->where('salespeople.user_id',$this->id)\n ->get();\n $tester2 = DB::table('managers')\n ->where('managers.user_id', $this->id)\n ->get();\n // return $tester2;\n if (!$tester->isEmpty()) {\n // return 'abap';\n return 'salesperson';\n } else {\n if ($tester2[0] -> is_gh == 1) {\n return 'group_head';\n }\n $tester3 = DB::table('regions')\n ->where('regions.mgr_user_id', $this->id)\n ->get();\n if (!$tester3->isEmpty()) {\n return 'regional_manager';\n }\n return 'branch_manager';\n }\n }", "title": "" } ]
5ba3a0ce3dbb40aa4ef272f86d459758
Delete Facebook Scheduled Posts
[ { "docid": "bd97a3c313bc7d61e0b4f5c8497c1096", "score": "0.83309585", "text": "public function facebook_delete_scheduled_post(){\n $ajax_nonce = $this->http->get('_ajax_nonce', false);\n\n //check security\n AjaxHelpers::check_ajax_referer( 'Aios-manage-fb-scheduled-posts', $ajax_nonce, true );\n \n if( $this->http->has('_item_id')){\n $item_id = $this->http->get('_item_id', false);\n $_item_id = implode( ',', $item_id);\n \n CsQuery::Cs_Delete_In(array(\n 'table' => 'aios_social_publish_schedule',\n 'where' => array(\n 'field_name' => 'id',\n 'field_value' => $_item_id\n )\n ));\n \n foreach($item_id as $id){\n $dynaic_hook = \"aiosFbAutoPubCron_{$id}\";\n CsFlusher::Cs_Cron_Remove( array( 'hook' => $dynaic_hook ) );\n }\n \n $json_data = array(\n 'type' => 'success',\n 'title' => __( 'Success!', SR_TEXTDOMAIN ),\n 'text' => __( 'Schedule has been deleted successfully.', SR_TEXTDOMAIN ),\n 'remove_id' => $item_id\n );\n }else{\n $json_data = array(\n 'type' => 'error',\n 'title' => __( 'Ops!', SR_TEXTDOMAIN ),\n 'text' => __( 'Something went wrong. Please try again later', SR_TEXTDOMAIN )\n );\n }\n AjaxHelpers::output_ajax_response( $json_data );\n }", "title": "" } ]
[ { "docid": "9bf6d7aa10801dbb47e31a9489dfa5fe", "score": "0.80006874", "text": "public function facebook_delete_posts(){\n $ajax_nonce = $this->http->get('_ajax_nonce', false);\n\n //check security\n AjaxHelpers::check_ajax_referer( 'Aios-manage-fb-scheduled-posts', $ajax_nonce, true );\n \n $get_options = CsQuery::Cs_Get_Option( array( 'option_name'=> 'aios_facebook_settings', 'json' => true ) ); \n if( !isset($get_options->fb_publish_to[0]) && !issset( $get_options->fb_app_id ) ){\n return 'Facebook token doesn\\'t found! ';\n }\n \n if( $this->http->has('_item_id')){\n $item_id = $this->http->get('_item_id', false);\n foreach($item_id as $id){\n CsQuery::Cs_Delete(array(\n 'table' => 'aios_facebook_statistics',\n 'where' => array( 'fb_post_id' => $id )\n ));\n \n $argc = (object)array(\n 'app_id' => $get_options->fb_app_id, \n 'app_secret' => $get_options->fb_app_secret,\n 'access_token' => $get_options->fb_publish_to[1],\n 'page_id' => $get_options->fb_publish_to[0],\n 'post_id' => $id\n );\n (new facebook_graph_helper())->delete_post( $argc );\n }\n \n $json_data = array(\n 'type' => 'success',\n 'title' => __( 'Success!', SR_TEXTDOMAIN ),\n 'text' => __( 'Post has been deleted successfully from facebook.', SR_TEXTDOMAIN ),\n 'remove_id' => $item_id\n );\n }else{\n $json_data = array(\n 'type' => 'error',\n 'title' => __( 'Ops!', SR_TEXTDOMAIN ),\n 'text' => __( 'Something went wrong. Please try again later', SR_TEXTDOMAIN )\n );\n }\n AjaxHelpers::output_ajax_response( $json_data );\n }", "title": "" }, { "docid": "b137767d0c96cd20648620e113fdf96c", "score": "0.7318394", "text": "function rssmi_delete_feed_post_admin()\n{\n rssmi_delete_posts_admin();\n}", "title": "" }, { "docid": "4f50700fe7783ee467833d00cbe281b0", "score": "0.69905037", "text": "function wp_idolondemand_delete_post()\n{\n}", "title": "" }, { "docid": "f4351b72d00e0be85549ed96cc14521d", "score": "0.69110805", "text": "function wp_scheduled_delete()\n {\n }", "title": "" }, { "docid": "bb5d93db7e4aeccd78f87f6dd985ed0e", "score": "0.6511982", "text": "public function unpublish_content() {\n\t\tglobal $_wp_post_type_features;\n\n\t\t$post_types = array();\n\t\tforeach ( $_wp_post_type_features as $post_type => $features ) {\n\t\t\tif ( ! empty( $features[ self::$supports_key ] ) ) {\n\t\t\t\t$post_types[] = $post_type;\n\t\t\t}\n\t\t}\n\n\t\t$args = array(\n\t\t\t'fields' => 'ids',\n\t\t\t'post_type' => $post_types,\n\t\t\t'post_status' => 'any',\n\t\t\t'posts_per_page' => 40,\n\t\t\t'meta_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'meta_key' => self::$post_meta_key,\n\t\t\t\t\t'meta_value' => current_time( 'timestamp' ),\n\t\t\t\t\t'compare' => '<',\n\t\t\t\t\t'type' => 'NUMERIC',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'meta_key' => self::$post_meta_key,\n\t\t\t\t\t'meta_value' => current_time( 'timestamp' ),\n\t\t\t\t\t'compare' => 'EXISTS',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t$query = new WP_Query( $args );\n\n\t\tif ( $query->have_posts() ) {\n\t\t\tforeach ( $query->posts as $post_id ) {\n\t\t\t\twp_trash_post( $post_id );\n\t\t\t}\n\t\t} else {\n\t\t\t// There are no posts scheduled to unpublish, we can safely remove the old cron.\n\t\t\twp_clear_scheduled_hook( self::$deprecated_cron_key );\n\t\t}\n\t}", "title": "" }, { "docid": "cda85d9266bc66598888d693e1e72554", "score": "0.6462753", "text": "public function delete() {\n $streamTbl = Engine_Api::_()->getDbTable('stream', 'activity');\n $streamTbl->delete('(`object_id` = '.$this->getIdentity().' AND `object_type` = \"ynjobposting_job\")');\n $activityTbl = Engine_Api::_()->getDbTable('actions', 'activity');\n $activityTbl->delete('(`object_id` = '.$this->getIdentity().' AND `object_type` = \"ynjobposting_job\")');\n $attachmentTbl = Engine_Api::_()->getDbTable('attachments', 'activity');\n $attachmentTbl->delete('(`id` = '.$this -> getIdentity().' AND `type` = \"ynjobposting_job\")');\n $this->changeStatus('deleted');\n $this->feature(0, false);\n }", "title": "" }, { "docid": "f61c3f5610ed9aec881b72c0af401229", "score": "0.6442137", "text": "public function delete() {\n // #1093 - Die Verwendung der zu aktualisierenden Zieltabelle 'fa_post' ist in der FROM-Klausel nicht zulässig.\n $mysqlService = new MysqlService();\n $result = $mysqlService->select('MAX(ID) - 60 AS `maxId`', 'post');\n\n $maxId = $result[0]['maxId'];\n $stmt = $mysqlService->prepareDelete('post', \"WHERE `id` <= {$maxId}\");\n return json_encode($stmt->execute());\n }", "title": "" }, { "docid": "76d306a78407ace10845dd29e86e755c", "score": "0.6439901", "text": "public function delete () {\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query($wpdb->prepare(\"\n\t\tDELETE FROM $wpdb->postmeta WHERE meta_key='syndication_feed_id'\n\t\tAND meta_value = '%s'\n\t\t\", $this->id));\n\n\t\t$wpdb->query($wpdb->prepare(\"\n\t\tDELETE FROM $wpdb->links WHERE link_id = %d\n\t\t\", (int) $this->id));\n\n\t\t$this->id = NULL;\n\t}", "title": "" }, { "docid": "8125b26e7616bcb1de61884cc50e60e1", "score": "0.64215386", "text": "public function delete($post_id) {\n //get user id.\n if (!isset($user_id)) {\n $user_id = $this->Session->read('Auth.User.id');\n }\n //check if is any\n $conditions = array('id' => $post_id, 'uid' => $user_id);\n if ($this->SocialPosts->hasAny($conditions)) {\n $delete_update['SocialPosts']['id'] = $post_id;\n $delete_update['SocialPosts']['deleted'] = 1;\n //remove post from everywhere \n if ($this->SocialPosts->save($delete_update)) {\n //check if any scheduled\n $cond = array('post_id' => $post_id);\n if ($this->SocialScheduled->hasAny($cond)) {\n $delete = array('post_id' => $post_id);\n //remove scheduled\n $this->SocialScheduled->deleteAll($delete);\n }\n $this->Session->setFlash(__(\"Post Succesfully Removed.\"), 'cake-success');\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash(__(\"Something Went Wrong! Please try again later.\"), 'cake-error');\n $this->redirect(array('action' => 'index'));\n }\n } else {\n //hmmm somebody sending http requests trying to delete posts?!\n $this->Session->setFlash(__(\"You are not authorized to perform this operation!\"), 'cake-error');\n $this->redirect(array('action' => 'index'));\n }\n }", "title": "" }, { "docid": "7dfa6b690042d7ccf1e7ead3040e303f", "score": "0.63669914", "text": "function grunion_delete_old_spam() {\n\tglobal $wpdb;\n\n\t$grunion_delete_limit = 100;\n\n\t$now_gmt = current_time( 'mysql', 1 );\n\t$sql = $wpdb->prepare( \"\n\t\tSELECT `ID`\n\t\tFROM $wpdb->posts\n\t\tWHERE DATE_SUB( %s, INTERVAL 15 DAY ) > `post_date_gmt`\n\t\t\tAND `post_type` = 'feedback'\n\t\t\tAND `post_status` = 'spam'\n\t\tLIMIT %d\n\t\", $now_gmt, $grunion_delete_limit );\n\t$post_ids = $wpdb->get_col( $sql );\n\n\tforeach ( (array) $post_ids as $post_id ) {\n\t\t# force a full delete, skip the trash\n\t\twp_delete_post( $post_id, TRUE );\n\t}\n\n\t# Arbitrary check points for running OPTIMIZE\n\t# nothing special about 5000 or 11\n\t# just trying to periodically recover deleted rows\n\t$random_num = mt_rand( 1, 5000 );\n\tif ( apply_filters( 'grunion_optimize_table', ( $random_num == 11 ) ) ) {\n\t\t$wpdb->query( \"OPTIMIZE TABLE $wpdb->posts\" );\n\t}\n\n\t# if we hit the max then schedule another run\n\tif ( count( $post_ids ) >= $grunion_delete_limit ) {\n\t\twp_schedule_single_event( time() + 700, 'grunion_scheduled_delete' );\n\t}\n}", "title": "" }, { "docid": "6c4a8128eb7c1f103fab3c0dba5ecc23", "score": "0.63305753", "text": "function deletefeed(){\n if($_SERVER['REQUEST_METHOD'] === 'POST'){\n $post_id=$this->helper->getUriSegment(2);\n $user_id=$_POST['user_id'];\n if(intval($user_id) == 0 || intval($post_id) == 0 ){\n $arr[0]['Result'] = 0;\n\t $arr[0]['MSG'] = 'please send all required data';\n echo json_encode($arr);\n die;\n }\n $details = $this->post->getpost($post_id);\n if(!$details){\n $arr[0]['Result'] = 0;\n\t $arr[0]['MSG'] = 'invalid post id';\n echo json_encode($arr);\n die; \n }\n if($details['author'] != $user_id){\n $arr[0]['Result'] = 0;\n\t $arr[0]['MSG'] = 'You are not authorized to delete this post.';\n echo json_encode($arr);\n die; \n }\n $where = array( 'ID' => $post_id );\n $update=$this->post->delete_post($where);\n\n \t $json[0]['result']=1;\n\t $json[0]['msg']='News deleted successfully';\n\t echo json_encode($json);\n\t die; \n }else{\n $arr[0]['Result'] = 0;\n\t$arr[0]['MSG'] = 'please call required method';\n echo json_encode($arr);\n }\n }", "title": "" }, { "docid": "09a6caf2c00019bc5ea1696289a28d81", "score": "0.62169844", "text": "public function cleanScheduleAction(){\n \t$actual = new Frogg_Time_Time();\n \t$cleaning_day = $actual->subtract(3*24*60*60);\n \t$cleaning_stamp = $cleaning_day->getUnixTstamp();\n \t$sql = new Frogg_Db_Sql('DELETE FROM `scheduled` WHERE `timestamp` < '.$cleaning_stamp);\n \tdie;\n }", "title": "" }, { "docid": "a49cbfdf36108ebf65e2733975db1040", "score": "0.6183455", "text": "public function delete() {\n\t\t$query = new WP_Query( array(\n\t\t\t'name' => $this->params['post_name'],\n\t\t\t'post_type' => $this->params['post_type']\n\t\t) );\n\n\t\t$post = array_shift( $query->posts );\n\n\t\t// die('<pre>'.var_export($post,true).'</pre>');\n\n\t\tif ( $post ) {\n\t\t\t$current_action = $this->get_current_action();\n\t\t\t$this->action_results[ 'status' ] = 'success';\n\t\t\t$this->action_results[ 'messages' ][ $post->post_type ][ $post->ID ][ 'note' ] = __( 'The information has been deleted', 'kickpress' );\n\t\t\t$this->action_results[ 'data' ][ 'post_id' ] = $post->ID;\n\n\t\t\twp_trash_post( $post->ID );\n\t\t}\n\t}", "title": "" }, { "docid": "f92fe9cac81c95edfb607766b6026ef0", "score": "0.6147114", "text": "public function delete() {\n\t\t$db = self::getDB();\n\t\t$sql = \"DELETE FROM posts \n\t\t\t\tWHERE\n\t\t\t\t\tidPost = :idPost \";\n\t\t$query = $db->prepare($sql);\n\t\t$query->execute([\n\t\t\t':idPost' => $this->getIdPost()\n\t\t]);\n\t}", "title": "" }, { "docid": "80d5658a7c7ca628cf2bf5ffa344e179", "score": "0.61361885", "text": "function deleteFeed($feedID,$return=true);", "title": "" }, { "docid": "8654b106546bf235a2f2529a7c73dc15", "score": "0.6095972", "text": "function my_callback_delete_post( $result ) {\n\twp_delete_post( $result->ID, true );\n}", "title": "" }, { "docid": "6c39894798f9b00efb7a32059e155cb2", "score": "0.6085734", "text": "public function deleted(Post $post)\n {\n $post->recordActivity('deleted');\n }", "title": "" }, { "docid": "8be26f39cadee067f6d8154bdd13c191", "score": "0.60470355", "text": "function cron() {\n\t\tglobal $wpdb, $table_prefix;\n\t\t$sql = \"DELETE\n\t\t\t\t FROM {$table_prefix}postmeta\n\t\t\t\t WHERE meta_key LIKE '_oembed_%'\";\n\t\t$results = $wpdb->get_results( $sql );\n\t}", "title": "" }, { "docid": "e99d0af4062700fcef17800efc2c37cd", "score": "0.60139835", "text": "public function deleteAction() {\n\t\t$redirect_url = Minz_Request::param('r', false, true);\n\t\tif (!$redirect_url) {\n\t\t\t$redirect_url = array('c' => 'subscription', 'a' => 'index');\n\t\t}\n\t\tif (!Minz_Request::isPost()) {\n\t\t\tMinz_Request::forward($redirect_url, true);\n\t\t}\n\n\t\t$id = Minz_Request::param('id');\n\n\t\tif (self::deleteFeed($id)) {\n\t\t\tMinz_Request::good(_t('feedback.sub.feed.deleted'), $redirect_url);\n\t\t} else {\n\t\t\tMinz_Request::bad(_t('feedback.sub.feed.error'), $redirect_url);\n\t\t}\n\t}", "title": "" }, { "docid": "35863ea84a22a54f9a24ad3363de6358", "score": "0.60010344", "text": "public function deleteBlogPost() {\r\n\t\ttry {\r\n\r\n\t\t\t// PDO iniatialiseren met attributes\r\n\t\t\t$stmt = new PDO(\"mysql:host=localhost;dbname=demo\", 'root', '');\r\n\t\t\t$stmt->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\r\n\t\t\t// mogelijkheid inbouwen waarschuwingsvenster voor verwijderen te openen\r\n\r\n\r\n\t\t\t\r\n\t\t\t$query = $stmt->prepare('SELECT id, create_date, title, intro, content FROM `evdnl_blog_posts_yc`');\r\n\t\t\t\r\n\t\t\twhile($row = $query->fetch()) {\r\n\t\t\t\t// confirmation dialog\r\n\t\t\t\techo '<tr>';\r\n\t\t\t\techo '<td>' . $row['title'] . '</td>';\r\n\t\t\t\techo '<td>' . date('jS M Y', strtotime($row['title'])) . '</td>';\r\n\t\t\t\techo '<td><a href=\"javascript:jsdeletepost(' . $row['id']; \r\n\t\t\t\techo $row['title'];\r\n\t\t\t\techo ')\">Delete</a>';\r\n\t\t\t\techo '</td>';\r\n\t\t\t\techo '</tr>';\r\n\r\n\t\t\t\t// rij / id ophalen om te verwijderen\r\n\t\t\t\tif (isset($_GET['jsdeletepost'])) {\r\n\t\t\t\t\t$todelete = $stmt->prepare('DELETE FROM `evdnl_blog_posts_yc` WHERE id = \"$row\" LIMIT 1');\r\n\t\t\t\t\t$todelete->execute($row);\r\n\r\n\t\t\t\t\theader('Location: index.php?action=deleted');\r\n\t\t\t\t\texit;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// file verwijderen\r\n\t\t\t\t// unlink();\r\n\r\n\t\t\t\t// rij uit db verwijderen\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*/\r\n\t\t}\r\n\r\n\t\tcatch (PDOException $e) {\r\n\t\t\techo $e->getMessage();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a366acc869310bb3b6b372faf99eb933", "score": "0.59860146", "text": "public function run($request) {\n\t\t$posts = BlogPost::get()->filter(array('WordpressID:GreaterThan' => 0));\n\t\t$count = 0;\n\t\tforeach($posts as $post) {\n\t\t\t$count++;\n\t\t\tif (class_exists('Comments')) {\n\t\t\t\tforeach($post->AllComments() as $comment) {\n\t\t\t\t\t$comment->delete();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($post->Tags() as $tag) {\n\t\t\t\t$post->Tags()->remove($tag);\n\t\t\t}\n\t\t\tforeach ($post->Categories() as $cat) {\n\t\t\t\t$post->Categories()->remove($cat);\n\t\t\t}\n\t\t\tforeach ($post->Authors() as $a) {\n\t\t\t\t$post->Authors()->remove($a);\n\t\t\t}\n\t\t\t$post->deleteFromStage('Stage');\n\t\t\t$post->deleteFromStage('Live');\n\t\t}\n\t\techo 'Deleted ' . $count . ' posts';\n\t}", "title": "" }, { "docid": "626d342ddfb01d0a9a28be6ba739632c", "score": "0.5979495", "text": "function colormag_delete_post_import() {\n\t$page = get_page_by_title( 'Hello world!', OBJECT, 'post' );\n\n\tif ( is_object( $page ) && $page->ID ) {\n\t\twp_delete_post( $page->ID, true );\n\t}\n}", "title": "" }, { "docid": "c54a19fd41dc592411e26953740d52a9", "score": "0.595566", "text": "public function auto_publish_queue( $publish_on ){\n global $wpdb;\n $queue = CsQuery::Cs_Get_Results(array(\n 'select' => '*',\n 'from' => $wpdb->prefix.'aios_social_publish_schedule',\n 'where' => \"type = 1 and publish_on = {$publish_on} \"\n ));\n \n if( $queue ){\n foreach ($queue as $que){\n $ret = $this->publish_to_facebook($que->post_id);\n if( isset( $ret[0]['response_code'] ) && $ret[0]['response_code'] === 200 ){\n CsQuery::Cs_Insert(array(\n 'table' => 'aios_facebook_statistics',\n 'insert_data'=> array(\n 'post_id' => $que->post_id,\n 'fb_post_id' => $ret[0]['response_text'],\n 'created_on' => date('Y-m-d H:i:s')\n )\n ));\n //if published to facebook, delete the queue tbl, cron tbl row\n CsQuery::Cs_Delete(array(\n 'table' => 'aios_social_publish_schedule',\n 'where' => array( 'id' => $que->id)\n ));\n \n }else{\n //update error\n }\n }\n }\n \n }", "title": "" }, { "docid": "489d900a4707fc0e9525fe8a9f43b230", "score": "0.5953638", "text": "public function hard_delete()\n\t{\n\t\tif (!$this->topic->topic_posts)\n\t\t{\n\t\t\tif (!$this->topic->load($this->topic_id))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Update the postcount for the topic\n\t\t$this->update_topic_postcount(true);\n\n\t\t// Set the visibility appropriately if no posts are visibile to the public/authors\n\t\t$flags = count::get_flags(access::PUBLIC_LEVEL);\n\t\tif (count::from_db($this->topic->topic_posts, $flags) <= 0)\n\t\t{\n\t\t\t// There are no posts visible to the public, change it to authors level access\n\t\t\t$this->topic->topic_access = access::AUTHOR_LEVEL;\n\n\t\t\t$flags = count::get_flags(access::AUTHOR_LEVEL);\n\t\t\tif (count::from_db($this->topic->topic_posts, $flags) <= 0)\n\t\t\t{\n\t\t\t\t// There are no posts visible to authors, change it to teams level access\n\t\t\t\t$this->topic->topic_access = access::TEAM_LEVEL;\n\t\t\t}\n\t\t}\n\n\t\t// Sync the first topic post if required\n\t\tif ($this->post_id == $this->topic->topic_first_post_id)\n\t\t{\n\t\t\t$this->topic->sync_first_post($this->post_id);\n\t\t}\n\n\t\t// Sync the last topic post if required\n\t\tif ($this->post_id == $this->topic->topic_last_post_id)\n\t\t{\n\t\t\t$this->topic->sync_last_post($this->post_id);\n\t\t}\n\n\t\t// Submit the topic to store the updated information\n\t\t$this->topic->submit();\n\n\t\t// Remove from the search index\n\t\t$this->search_manager->delete($this->post_type, $this->post_id);\n\n\t\t// @todo remove attachments and other things\n\n\t\t// Remove any attention items\n\t\t$sql = 'DELETE FROM ' . TITANIA_ATTENTION_TABLE . '\n\t\t\tWHERE attention_object_type = ' . ext::TITANIA_POST . '\n\t\t\t\tAND attention_object_id = ' . $this->post_id;\n\t\tphpbb::$db->sql_query($sql);\n\n\t\t// Decrement the user's postcount if we must\n\t\tif (!$this->post_deleted && $this->post_approved && in_array($this->post_type, titania::$config->increment_postcount))\n\t\t{\n\t\t\tphpbb::update_user_postcount($this->post_user_id, '-');\n\t\t}\n\n\t\t$this->forum_queue_hard_delete();\n\n\t\t// Initiate self-destruct mode\n\t\tparent::delete();\n\n\t\t// Update topics posted table\n\t\t$this->topic->update_posted_status('remove', $this->post_user_id);\n\n\t\t// Check if the topic is empty\n\t\t$flags = count::get_flags(access::TEAM_LEVEL, true, true);\n\t\tif (count::from_db($this->topic->topic_posts, $flags) <= 0)\n\t\t{\n\t\t\t$this->topic->delete();\n\t\t}\n\t}", "title": "" }, { "docid": "d337344099c1a79e5b7566a077920b25", "score": "0.5939134", "text": "public function deleteAction() {\n\t\t// if($post->delete()) {\n\t\t// \tSession::message([\"Post <strong>$post->name</strong> deleted!\" , \"success\"]);\n\t\t// \tredirect_to('/posts/index');\n\t\t// } else {\n\t\t// \tSession::message([\"Error saving! \" . $error->get_errors() , \"success\"]);\n\t\t// }\n\t}", "title": "" }, { "docid": "a33d06b3e09ec030f936c2af2facc697", "score": "0.59367394", "text": "function wp_delete_post($postid = 0, $force_delete = \\false)\n {\n }", "title": "" }, { "docid": "a8f1497f5a5c1ee0970ec6aed1b8e4c9", "score": "0.59344447", "text": "public function deleted_post($post_id)\n {\n }", "title": "" }, { "docid": "8d2315fe831b2e2b26fbe8a0c512b174", "score": "0.5916325", "text": "function hard_delete_posts()\r\n\t{\r\n\t\tglobal $auth, $config, $db, $phpbb_root_path, $phpEx, $user;\r\n\r\n\t\tif (sizeof($this->hard_delete['p']))\r\n\t\t{\r\n\t\t\t$sql = 'DELETE FROM ' . POSTS_TABLE . '\r\n\t\t\t\tWHERE ' . $db->sql_in_set('post_id', $this->hard_delete['p']);\r\n\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\tforeach ($this->hard_delete['p'] as $id)\r\n\t\t\t{\r\n\t\t\t\t$topic_id = intval($this->post_data[$id]['topic_id']);\r\n\t\t\t\t$forum_id = intval($this->post_data[$id]['forum_id']);\r\n\t\t\t\t$sql_data = $sql_data1 = '';\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_deleted'] != 0 && (($this->topic_data[$topic_id]['topic_first_post_id'] == $id && $this->topic_data[$topic_id]['topic_last_post_id'] == $id) || ($this->topic_data[$topic_id]['topic_deleted_reply_count'] == 1 && $this->topic_data[$topic_id]['topic_replies_real'] == 0)))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->hard_delete['t'][] = $topic_id;\r\n\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_HARD_DELETE_TOPIC', $this->topic_data[$topic_id]['topic_title']);\r\n\r\n\t\t\t\t\tif (array_key_exists($topic_id, $this->shadow_topic_ids))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->hard_delete['t'][] = $this->shadow_topic_ids[$topic_id];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ($this->topic_data[$topic_id]['topic_type'] != POST_GLOBAL && $this->forum_data[$forum_id]['forum_deleted_topic_count'] > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sql_data1 .= 'forum_deleted_topic_count = forum_deleted_topic_count - 1, ';\r\n\t\t\t\t\t\t$this->forum_data[$forum_id]['forum_deleted_topic_count']--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_HARD_DELETE_POST', $this->post_data[$id]['post_subject']);\r\n\r\n\t\t\t\t\tif ($this->topic_data[$topic_id]['topic_replies'] > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sql_data .= 'topic_replies = topic_replies - 1, ';\r\n\t\t\t\t\t\t$this->topic_data[$topic_id]['topic_replies']--;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ($this->topic_data[$topic_id]['topic_replies_real'] > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sql_data .= 'topic_replies_real = topic_replies_real - 1, ';\r\n\t\t\t\t\t\t$this->topic_data[$topic_id]['topic_replies_real']--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_deleted_reply_count'] > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql_data .= 'topic_deleted_reply_count = topic_deleted_reply_count - 1, ';\r\n\t\t\t\t\t$this->topic_data[$topic_id]['topic_deleted_reply_count']--;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_type'] != POST_GLOBAL && $this->forum_data[$forum_id]['forum_deleted_reply_count'] > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql_data1 .= 'forum_deleted_reply_count = forum_deleted_reply_count - 1, ';\r\n\t\t\t\t\t$this->forum_data[$forum_id]['forum_deleted_reply_count']--;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_type'] != POST_GLOBAL && $this->forum_data[$forum_id]['forum_posts'] > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql_data1 .= 'forum_posts = forum_posts - 1, ';\r\n\t\t\t\t\t$this->forum_data[$forum_id]['forum_posts']--;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($sql_data != '')\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\t\tSET ' . $sql_data;\r\n\t\t\t\t\t$sql = substr($sql, 0, -2);\r\n\t\t\t\t\t$sql .= ' WHERE topic_id = ' . $topic_id;\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t}\r\n\t\t\t\tif ($sql_data1 != '' && $this->topic_data[$topic_id]['topic_type'] != POST_GLOBAL)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = 'UPDATE ' . FORUMS_TABLE . '\r\n\t\t\t\t\t\tSET ' . $sql_data1;\r\n\t\t\t\t\t\t$sql = substr($sql, 0, -2);\r\n\t\t\t\t\t\t$sql .= ' WHERE forum_id = ' . $forum_id;\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$this->delete_attachment_data();\r\n\r\n\t\t\t$sql = 'DELETE FROM ' . TERMMAP_TABLE . '\r\n\t\t\t\tWHERE topic_id = ' . (int) $topic_id;\r\n\t\t\t$db->sql_query($sql);\r\n\t\t\t\r\n\t\t\t$this->hard_delete_topics();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "256891209ba4f1143262d3ece32f6805", "score": "0.59082556", "text": "function sbrb_delete_post_action( $post_id ) {\n $_shortlink_id = get_post_meta( $post_id, '_rebrandly_link_id', true );\n delete_rebrandly_link( $_shortlink_id );\n}", "title": "" }, { "docid": "edb6f5edd1503ce39b54ea559c4ecc45", "score": "0.59032315", "text": "public function unpublish_expired_posts() {\n $expired_posts = $this->get_expired_posts();\n foreach ( $expired_posts as $expired_post ) {\n // Only automatically unpublish if the corresponding option is enabled for this post\n if ( $expired_post->bbx_best_before_unpublish_when_expired ) {\n // Set post to draft\n wp_update_post(\n array(\n 'ID' => $expired_post->ID,\n 'post_status' => 'draft'\n )\n );\n }\n }\n }", "title": "" }, { "docid": "caaa43d005893b2823339e3e342e4bbd", "score": "0.59010756", "text": "function remove_single_post() {\n remove_action('thematic_singlepost', 'thematic_single_post');\n}", "title": "" }, { "docid": "3dbcaafae315542a4f41565d7d43b20f", "score": "0.5888662", "text": "public function delete(){\n global $db;\n $delete = $db->prepare('DELETE FROM posts WHERE id = :id');\n $delete->bindValue(':id', $this->_id, PDO::PARAM_INT);\n $delete->execute();\n }", "title": "" }, { "docid": "a76ddd66aaf81b5cae277e50103348b2", "score": "0.587816", "text": "private function deletePost() {\n\t\tif( !isset($_SESSION['id']) ) {\n\t\t\treturn;\n\t\t}\n\t\t// Make sure the user owns this post\n\t\t$postID = $this->dbc->real_escape_string($_GET['postid']);\n\t\t$userID = $_SESSION['id'];\n\t\t$privilege = $_SESSION['privilege'];\n\t\t\n\t\t// If the user is not an admin\n\t\tif( $privilege != 'admin' ) {\n\t\t\t$sql .= \" AND user_id = $userID\";\n\t\t}\n\t\t// Run this query\n\t\t$result = $this->dbc->query($sql);\n\t\t// If the query failed\n\t\t// Either post doesn't exist, or you don't own the post\n\t\tif( !$result || $result->num_rows == 0 ) {\n\t\t\treturn;\n\t\t}\n\t\t$result = $result->fetch_assoc();\n\t\t\n\t\t// Prepare the SQL\n\t\t$sql = \"DELETE FROM posts\n\t\t\t\tWHERE id = $postID\";\n\t\t// Run the query\n\t\t$this->dbc->query($sql);\n\t\t// Redirect the user back to blog\n\t\t// This post is dead :(\n\t\theader('Location: index.php?page=blog');\n\t\tdie();\n\t}", "title": "" }, { "docid": "24861cfad879d577b71cea0e16049013", "score": "0.5876553", "text": "function wp_delete_auto_drafts()\n {\n }", "title": "" }, { "docid": "deddde6421c948e961ea996cbc4fc7e2", "score": "0.58733505", "text": "function time_tracker_activity_delete($entity) {\n entity_get_controller('time_tracker_activity')->delete($entity);\n}", "title": "" }, { "docid": "58b1709fa82048b6ea5e2680221d4096", "score": "0.58723074", "text": "function delPostingHandler() {\n global $inputs;\n\n $sql = \"DELETE FROM `posting` WHERE id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "title": "" }, { "docid": "8e03c7008d0e4832d3e3eb1c8f13059a", "score": "0.58551395", "text": "public function deleteAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING SUBJECT\n $sitereview = $post->getParent('sitereview_listing');\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Delete();\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n $topic_id = $post->topic_id;\n try {\n $post->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //GET TOPIC\n $topic = Engine_Api::_()->getItem('sitereview_topic', $topic_id);\n\n $href = ( null == $topic ? $sitereview->getHref() : $topic->getHref() );\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRedirect' => $href,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Post deleted.')),\n ));\n }", "title": "" }, { "docid": "4f3960cced15b0bc028702be5858487c", "score": "0.5851505", "text": "public function pre_schedule_delete_content( $post_id ) {\n\t\t$delete_pushed_posts = !empty( $this->push_syndicate_settings[ 'delete_pushed_posts' ] ) ? $this->push_syndicate_settings[ 'delete_pushed_posts' ] : 'off' ;\n\t\tif( $delete_pushed_posts != 'on' )\n\t\t\treturn;\n\n\t\tif( !$this->current_user_can_syndicate() )\n\t\t\treturn;\n\n\t\tdo_action( 'syn_schedule_delete_content', $post_id );\n\t}", "title": "" }, { "docid": "1a9210933466e2360f8a4cc765286c54", "score": "0.58395064", "text": "public function delete($idPost);", "title": "" }, { "docid": "5ab63890a770bb50419377fef6ab1053", "score": "0.582331", "text": "public function purge_data() {\n\n global $wpdb;\n\n $wpdb->query( \"DELETE FROM {$wpdb->prefix}popularpostssummary WHERE view_date < DATE_SUB('\" . WPP_Helper::curdate() . \"', INTERVAL {$this->options['tools']['log']['expires_after']} DAY);\" );\n\n }", "title": "" }, { "docid": "a29165ff07f0f1c86291124ea72999a1", "score": "0.58166724", "text": "function soft_delete_posts()\r\n\t{\r\n\t\tglobal $auth, $config, $db, $phpbb_root_path, $phpEx, $user;\r\n\r\n\t\tif (sizeof($this->soft_delete['p']))\r\n\t\t{\r\n\t\t\t$sql_data = array(\r\n\t\t\t\t'post_deleted'\t\t\t=> $user->data['user_id'],\r\n\t\t\t\t'post_deleted_time'\t\t=> time(),\r\n\t\t\t);\r\n\t\t\t$sql = 'UPDATE ' . POSTS_TABLE . '\r\n\t\t\t\tSET ' . $db->sql_build_array('UPDATE', $sql_data) . '\r\n\t\t\t\t\tWHERE ' . $db->sql_in_set('post_id', $this->soft_delete['p']);\r\n\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\t// Update the search index to remove any posts we have soft deleted\r\n\t\t\t$this->update_search_index($this->soft_delete['p'], true);\r\n\r\n\t\t\tforeach ($this->soft_delete['p'] as $id)\r\n\t\t\t{\r\n\t\t\t\t$topic_id = intval($this->post_data[$id]['topic_id']);\r\n\t\t\t\t$forum_id = intval($this->post_data[$id]['forum_id']);\r\n\r\n\t\t\t\t// Update the first/last topic info if we must\r\n\t\t\t\tif (($this->topic_data[$topic_id]['topic_first_post_id'] == $id && $this->topic_data[$topic_id]['topic_last_post_id'] == $id) || ($this->topic_data[$topic_id]['topic_deleted_reply_count'] == ($this->topic_data[$topic_id]['topic_replies_real'])))\r\n\t\t\t\t{\r\n\t\t\t\t\t// Since we are deleting the only post left we shall soft delete the topic\r\n\t\t\t\t\t$this->soft_delete['t'][] = $topic_id;\r\n\r\n\t\t\t\t\tif ($this->topic_data[$topic_id]['topic_poster'] != $user->data['user_id'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_SOFT_DELETE_TOPIC', $this->topic_data[$topic_id]['topic_title']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Update the first or last post if we have to.\r\n\t\t\t\t\tif ($this->topic_data[$topic_id]['topic_first_post_id'] == $id)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->update_first_post_topic($topic_id);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ($this->topic_data[$topic_id]['topic_last_post_id'] == $id)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->update_last_post_topic($topic_id);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ($this->post_data[$id]['poster_id'] != $user->data['user_id'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_SOFT_DELETE_POST', $this->post_data[$id]['post_subject']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Fix post reported\r\n\t\t\t\tif ($this->post_data[$id]['post_reported'])\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = 'UPDATE ' . POSTS_TABLE . '\r\n\t\t\t\t\t\tSET post_reported = 0\r\n\t\t\t\t\t\t\tWHERE post_id = ' . $id;\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\t\t\t$this->post_data[$id]['post_reported'] = 0;\r\n\r\n\t\t\t\t\t$some_reported = false;\r\n\t\t\t\t\t$sql = 'SELECT post_reported FROM ' . POSTS_TABLE . '\r\n\t\t\t\t\t\tWHERE topic_id = ' . $topic_id;\r\n\t\t\t\t\t$result = $db->sql_query($sql);\r\n\t\t\t\t\twhile ($row = $db->sql_fetchrow($result))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($row['post_reported'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$some_reported = true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$db->sql_freeresult($result);\r\n\r\n\t\t\t\t\t// If none of the posts in this topic are reported anymore, reset it for the topic\r\n\t\t\t\t\tif (!$some_reported)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\t\t\tSET topic_reported = 0\r\n\t\t\t\t\t\t\t\tWHERE topic_id = ' . $topic_id;\r\n\t\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Update the deleted reply count for the topic\r\n\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\tSET topic_deleted_reply_count = topic_deleted_reply_count + 1\r\n\t\t\t\t\t\tWHERE topic_id = ' . $topic_id;\r\n\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t$this->topic_data[$topic_id]['topic_deleted_reply_count']++;\r\n\r\n\t\t\t\t// Update the deleted reply count for the shadow topics\r\n\t\t\t\tif (array_key_exists($topic_id, $this->shadow_topic_ids))\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\t\tSET topic_deleted_reply_count = topic_deleted_reply_count + 1\r\n\t\t\t\t\t\t\tWHERE topic_id = ' . intval($this->shadow_topic_ids[$topic_id]);\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t\t$this->topic_data[$this->shadow_topic_ids[$topic_id]]['topic_deleted_reply_count']++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If the topic is a global announcement, do not attempt to do any updates to forums\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_type'] != POST_GLOBAL)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Update the deleted reply count for the forum\r\n\t\t\t\t\t$sql = 'UPDATE ' . FORUMS_TABLE . '\r\n\t\t\t\t\t\tSET forum_deleted_reply_count = forum_deleted_reply_count + 1\r\n\t\t\t\t\t\t\tWHERE forum_id = ' . $forum_id;\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t\t$this->forum_data[$forum_id]['forum_deleted_reply_count']++;\r\n\r\n\t\t\t\t\t// Update the last post info for the forum if we must\r\n\t\t\t\t\tif ($this->forum_data[$forum_id]['forum_last_post_id'] == $id)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->update_last_post_forum($forum_id);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (array_key_exists($topic_id, $this->shadow_topic_ids))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($this->forum_data[$this->topic_data[$this->shadow_topic_ids[$topic_id]]['forum_id']]['forum_last_post_id'] == $id)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->update_last_post_forum($this->topic_data[$this->shadow_topic_ids[$topic_id]]['forum_id']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Soft delete the topics\r\n\t\t\t$this->soft_delete_topics();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "fb97272acd2131b99456b6f01be007db", "score": "0.580901", "text": "protected function forum_queue_hard_delete()\n\t{\n\t\tif (!$this->phpbb_post_id)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tphpbb::_include('functions_posting', 'delete_post');\n\n\t\t$sql = 'SELECT t.*, p.*\n\t\t\tFROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p\n\t\t\tWHERE p.post_id = ' . $this->phpbb_post_id . '\n\t\t\t\tAND t.topic_id = p.topic_id';\n\t\t$result = phpbb::$db->sql_query($sql);\n\t\t$post_data = phpbb::$db->sql_fetchrow($result);\n\t\tphpbb::$db->sql_freeresult($result);\n\n\t\tdelete_post($post_data['forum_id'], $post_data['topic_id'], $post_data['post_id'], $post_data);\n\t}", "title": "" }, { "docid": "51f6c7eb0732aae85dd3c0913d73babc", "score": "0.5807932", "text": "public function destroy($post_id)\n {\n\n }", "title": "" }, { "docid": "2476e5fb27a76001d816ad3a0240c7bb", "score": "0.5802809", "text": "function wyz_delete_business_post() {\n\t$nonce = filter_input( INPUT_POST, 'nonce' );\n\n\tif ( ! wp_verify_nonce( $nonce, 'wyz_ajax_custom_nonce' ) ) {\n\t\twp_die( 'busted' );\n\t}\n\n\tglobal $current_user;\n\twp_get_current_user();\n\n\t$_post_id = intval( $_POST['post-id'] );\n\t$_bus_id = intval( $_POST['bus-id'] );\n\t$_user_id = $current_user->ID;\n\t$post = get_post($_post_id);\n\tif ( $_user_id != $post->post_author && ! user_can( $_user_id, 'manage_options' ) ) {\n\t\twp_die( false );\n\t}\n\n\t$bus_posts = get_post_meta( $_bus_id, 'wyz_business_posts', true );\n\tif ( is_array( $bus_posts ) && ! empty( $bus_posts ) ) {\n\t\tforeach ( $bus_posts as $key => $value ) {\n\t\t\tif ( $value == $_post_id ) {\n\t\t\t\tunset( $bus_posts[ $key ] );\n\t\t\t\t$bus_posts = array_values( $bus_posts );\n\t\t\t\tupdate_post_meta( $_bus_id, 'wyz_business_posts', $bus_posts );\n\t\t\t\twp_trash_post( $_post_id );\n\t\t\t\twp_die( true );\n\t\t\t}\n\t\t}\n\t}\n\twp_die( false );\n}", "title": "" }, { "docid": "2036c2a53022288c3a01526f7b165377", "score": "0.5795453", "text": "public function forceDeleted(Post $post)\n {\n }", "title": "" }, { "docid": "d8d439573be1a4703143674d14bcad61", "score": "0.5778095", "text": "function edithistory_delete_post($pid)\n{\n\tglobal $db, $mybb;\n\t$db->delete_query(\"edithistory\", \"pid='{$pid}'\");\n}", "title": "" }, { "docid": "3a99abe9dc6afd63895a574fd9550da5", "score": "0.5773774", "text": "function wpachievements_wordpress_post_del($pid){\r\n if( !empty($pid) ){\r\n $pdata = get_post($pid);\r\n if( $pdata->post_author && $pdata->post_status == 'trash' && $pdata->post_type == 'post' ){\r\n $type='post_remove'; $uid=$pdata->post_author; $postid=$pid;\r\n if( !function_exists(WPACHIEVEMENTS_CUBEPOINTS) && !function_exists(WPACHIEVEMENTS_MYCRED) ){\r\n if(function_exists('is_multisite') && is_multisite()){\r\n $points = (int)get_blog_option(1, 'wpachievements_post_points');\r\n } else{\r\n $points = (int)get_option('wpachievements_post_points');\r\n }\r\n }\r\n if(empty($points)){$points=0;}\r\n wpachievements_new_activity($type, $uid, $postid, -$points);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "e6bdd23d80c00ad38b87f3b7cb0cf3f1", "score": "0.5765808", "text": "public function deleteAction()\n {\n $postId = (int)$this->params()->fromRoute('id', -1);\n \n // Validate input parameter\n if ($postId<0) {\n $this->getResponse()->setStatusCode(404);\n return;\n }\n \n $post = $this->entityManager->getRepository(Post::class)\n ->findOneById($postId); \n if ($post == null) {\n $this->getResponse()->setStatusCode(404);\n return; \n }\n \n if (!$this->access('post.own.delete', ['post'=>$post])) {\n return $this->redirect()->toRoute('not-authorized');\n }\n \n $this->postManager->removePost($post);\n $this->imageManager->removePost($postId);\n $this->videoManager->removePost($postId);\n $this->audioManager->removePost($postId);\n \n // Redirect the user to \"admin\" page.\n return $this->redirect()->toRoute('posts', ['action'=>'admin']); \n \n }", "title": "" }, { "docid": "43d26a4a57bfc2eb126cc1512f157ce0", "score": "0.5756036", "text": "function delete_events() {\n\n\t$args = array(\n\t\t'post_type' => 'tribe_events',\n\t\t'post_status' => 'any',\n\t\t'meta_key' => '_EventStartDate',\n\t\t'orderby' => 'meta_value',\n\t\t'meta_query' => array(\n\t\t\tarray(\n\t\t\t\t'key' => '_EventStartDate',\n\t\t\t\t'value' => (new DateTime(\"2017-01-01 00:00\"))->format(DateTime::ATOM),\n\t\t\t\t'compare' => '<=',\n\t\t\t),\n\t\t),\n\t\t'order' => 'ASC',\n\t\t'suppress_filters' => true,\n\t\t'posts_per_page' => -1\n\t);\n\n\t$out = '';\n\t$query = get_posts( $args );\n\tforeach($query as $post) {\n\t\t$out .= tribe_get_start_date($post, true) . \" \" . $post->post_title . '<br>';\n\t\t//wp_delete_post($post->ID, true);\n\t}\n\treturn $out;\n}", "title": "" }, { "docid": "b6b4ef1d1256abf744c695821baad8fb", "score": "0.5754887", "text": "public function deletePost($post){\n $sql = 'DELETE FROM userposts WHERE POSTID= ' . $post[0][\"POSTID\"];\n $entries = self::query($sql);\n return $entries;\n }", "title": "" }, { "docid": "274e8848a0309a42dac2437157f4fd55", "score": "0.5752916", "text": "public function deleted(Post $post)\n {\n Category::where('id', $post->category)\n ->where('num', '>', 0)->decrement('num');\n Tag::whereIn('id', explode(',', $post->tags))\n ->where('num', '>', 0)->decrement('num');\n Archive::where('month', $post->archive)->where('num', '>', 0)->decrement('num');\n Archive::where('num', 0)->forceDelete();\n }", "title": "" }, { "docid": "79a91818e73106e69f2b1a7c5d320ba0", "score": "0.575234", "text": "public function delete()\n\t {\n\t\t Ad::where('owner_id','=',$this->id)->delete();\n\t\t Comment::where('posted_by_id','=',$this->id)->delete();\n\t\t $blogposts = $this->blogposts;\n\t\t foreach($blogposts as $blogpost){\n\t\t\t Comment::where('blog_post_id', '=', $blogpost->id)->delete();\n\t\t }\n\t\t BlogPost::where('posted_by_id','=', $this->id)->delete();\n\t\t Friend::where('friend_id','=',$this->id)->delete();\n\t\t Friend::where('owner_id','=',$this->id)->delete();\n\t\t FriendRequest::where('friend_id', '=', $this->id)->delete();\n\t\t FriendRequest::where('owner_id', '=', $this->id)->delete();\n\t\t VideoCallRequest::where('host_id', '=', $this->id)->delete();\n\t\t VideoCallRequest::where('owner_id', '=', $this->id)->delete();\n\t\t VideoRoom::where('owner_id', '=', $this->id)->delete();\n\n\t\t return parent::delete();\n\t }", "title": "" }, { "docid": "aa1d707664c12ff1a3c9538dae33faf9", "score": "0.5748904", "text": "public function destroy() {\n $this->post->destroy();\n redirect('/backend/posts', ['notice' => 'Successfully destroyed']);\n }", "title": "" }, { "docid": "0f8ae632bfc4ed2cd48cb3355d2ce10c", "score": "0.57372236", "text": "public function destroy(Post $post) {\n //\n }", "title": "" }, { "docid": "382c97dd93a10f82ea32b23c0756b0d5", "score": "0.57320243", "text": "public function delete_social_media_posts($sid) {\n $response = array();\n $current_uid = isset($_GET['team']) ? $_GET['muid'] : \\Drupal::currentUser()->id();\n if ($current_uid) {\n $sm = \\Drupal::database()->select('social_media', 'sm')->fields('sm', ['page_id', 'sm_post_id', 'social_media_name'])->condition('sm.uid', $current_uid, '=')->condition('sm.id', $sid, '=')->execute()->fetchObject();\n if (!empty($sm) && isset($sm->sm_post_id) && $sm->social_media_name == 'Facebook') {\n $this->fbPostOperation($sm->page_id, $sm->sm_post_id, 'delete');\n }\n $query = \\Drupal::database()->delete('social_media')->condition('uid', $current_uid, '=')->condition('id', $sid, '=')->execute();\n if ($query > 0) {\n $response['result'] = 'Deleted';\n } else {\n $response['result'] = 'invalid post';\n }\n } else {\n $response['result'] = 'Unauthorized user';\n }\n $json_response = json_encode($response);\n return new JsonResponse($json_response);\n }", "title": "" }, { "docid": "c34fa211652f87e99ad988bdc7dfba2e", "score": "0.57314473", "text": "public function nuke () {\n\t\tglobal $wpdb;\n\n\t\t// Make a list of the items syndicated from this feed...\n\t\t$post_ids = $wpdb->get_col($wpdb->prepare(\"\n\t\tSELECT post_id FROM $wpdb->postmeta\n\t\tWHERE meta_key = 'syndication_feed_id'\n\t\tAND meta_value = '%s'\n\t\t\", $this->id));\n\n\t\t// ... and kill them all\n\t\tif (count($post_ids) > 0) :\n\t\t\tforeach ($post_ids as $post_id) :\n\t\t\t\t// Force scrubbing of deleted post\n\t\t\t\t// rather than sending to Trashcan\n\t\t\t\twp_delete_post(\n\t\t\t\t\t/*postid=*/ $post_id,\n\t\t\t\t\t/*force_delete=*/ true\n\t\t\t\t);\n\t\t\tendforeach;\n\t\tendif;\n\n\t\t$this->delete();\n\t}", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.57267076", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "9a430acf598fe37ae7ba0881c7a00728", "score": "0.57246375", "text": "function delete_hello_world() {\n $post = get_page_by_path('hello-world',OBJECT,'post');\n if ($post){\n wp_delete_post($post->ID,true);\n }\n }", "title": "" }, { "docid": "8319192f457893604da582c7095547a7", "score": "0.57245755", "text": "public function forceDeleted(Post $post)\n {\n //\n }", "title": "" }, { "docid": "8319192f457893604da582c7095547a7", "score": "0.57245755", "text": "public function forceDeleted(Post $post)\n {\n //\n }", "title": "" }, { "docid": "2d27052520ae0f372ffd7f23faa1e35d", "score": "0.5722012", "text": "public function soft_delete($reason = '')\n\t{\n\t\tif ($this->post_deleted)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$this->post_deleted = titania::$time;\n\t\t$this->post_delete_user = phpbb::$user->data['user_id'];\n\t\t$this->post_edit_reason = $reason;\n\n\t\t// Update the postcount for the topic\n\t\t$this->update_topic_postcount();\n\n\t\t// Set the visibility appropriately if no posts are visibile to the public/authors\n\t\t$flags = count::get_flags(access::PUBLIC_LEVEL);\n\t\tif (count::from_db($this->topic->topic_posts, $flags) <= 0)\n\t\t{\n\t\t\t// There are no posts visible to the public, change it to authors level access\n\t\t\t$this->topic->topic_access = access::AUTHOR_LEVEL;\n\n\t\t\t$flags = count::get_flags(access::AUTHOR_LEVEL);\n\t\t\tif (count::from_db($this->topic->topic_posts, $flags) <= 0)\n\t\t\t{\n\t\t\t\t// There are no posts visible to authors, change it to teams level access\n\t\t\t\t$this->topic->topic_access = access::TEAM_LEVEL;\n\t\t\t}\n\t\t}\n\n\t\t// Sync the first topic post if required\n\t\tif ($this->post_id == $this->topic->topic_first_post_id)\n\t\t{\n\t\t\t$this->topic->sync_first_post($this->post_id);\n\t\t}\n\n\t\t// Sync the last topic post if required\n\t\tif ($this->post_id == $this->topic->topic_last_post_id)\n\t\t{\n\t\t\t$this->topic->sync_last_post($this->post_id);\n\t\t}\n\n\t\t// Submit the topic to store the updated information\n\t\t$this->topic->submit();\n\n\t\tparent::submit();\n\n\t\t// Update topics posted table\n\t\t$this->topic->update_posted_status('remove', $this->post_user_id);\n\n\t\t// Decrement the user's postcount if we must\n\t\tif ($this->post_approved && in_array($this->post_type, titania::$config->increment_postcount))\n\t\t{\n\t\t\tphpbb::update_user_postcount($this->post_user_id, '-');\n\t\t}\n\t}", "title": "" }, { "docid": "016d7e2b4d922162a875d7b57795c0e8", "score": "0.5708111", "text": "public function deletePosts( $params ){\r\n $this->validateReadLists( $params[\"id\"] );\r\n\r\n $sql = \"\r\n DELETE FROM \r\n \" . $this->table . \"\r\n WHERE\r\n \" . $this->table . \".id = \" . $params[\"id\"] . \"\r\n \";\r\n \r\n $result = $this->db->query( $sql );\r\n\r\n if (!$result) {\r\n throw new Exception(\"Unable to delete new post!\");\r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "321d3c4f746352cb7d3b1e37c14e606a", "score": "0.57067615", "text": "public function removeAllPosts() {}", "title": "" }, { "docid": "1d4762e1aaf5009e835df596ee6ba221", "score": "0.5697603", "text": "public function do_batch() {\n\t\t$post_ids = array_map( 'intval', $this->get_post_ids() );\n\t\tforeach( $post_ids as $post_to_delete ) {\n\t\t\tadd_filter( Toolset_Association_Cleanup_Post::IS_DELETING_FILTER, '__return_true' );\n\t\t\twp_delete_post( $post_to_delete, true );\n\t\t\tremove_filter( Toolset_Association_Cleanup_Post::IS_DELETING_FILTER, '__return_true' );\n\t\t}\n\n\t\t$this->deleted_posts = count( $post_ids );\n\t}", "title": "" }, { "docid": "7bf46c76f8489d89874fd293fa1587ee", "score": "0.5693927", "text": "function block_core_calendar_update_has_published_post_on_delete($post_id)\n {\n }", "title": "" }, { "docid": "ac7a7d55fd6fbac4947a0aca4dfd3be4", "score": "0.5692645", "text": "public function destroy(post $post)\n {\n //\n }", "title": "" }, { "docid": "a44268919bbd80022dfa41b63228de9e", "score": "0.5681751", "text": "function wprss_delete_feed_items( $postid ) {\n\n $args = array(\n 'post_type' => 'wprss_feed_item',\n // Next 3 parameters for performance, see http://thomasgriffinmedia.com/blog/2012/10/optimize-wordpress-queries\n 'cache_results' => false, // Disable caching, used for one-off queries\n 'no_found_rows' => true, // We don't need pagination, so disable it\n 'fields' => 'ids', // Returns post IDs only\n 'posts_per_page'=> -1,\n 'meta_query' => array(\n array(\n 'key' => 'wprss_feed_id',\n 'value' => $postid,\n 'compare' => 'LIKE'\n )\n )\n );\n\n $feed_item_ids = get_posts( $args );\n foreach( $feed_item_ids as $feed_item_id ) {\n $purge = wp_delete_post( $feed_item_id, true ); // delete the feed item, skipping trash\n }\n wp_reset_postdata();\n }", "title": "" }, { "docid": "71d5b3c8ad6f1a9e7ddfc27288021a3d", "score": "0.56772566", "text": "public function massDeleteAction()\n {\n $scheduleIds = $this->getRequest()->getParam('schedule');\n if (!is_array($scheduleIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_schedule')->__('Please select schedule to delete.')\n );\n } else {\n try {\n foreach ($scheduleIds as $scheduleId) {\n $schedule = Mage::getModel('bs_schedule/schedule');\n $schedule->setId($scheduleId)->delete();\n }\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_schedule')->__('Total of %d schedule were successfully deleted.', count($scheduleIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_schedule')->__('There was an error deleting schedule.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "title": "" }, { "docid": "afb692a03c7f83b92ca150713e5ba7db", "score": "0.5668084", "text": "function delete_post( $post_id ) {\n\t\t\t$this->model->remove_indexed_entry_for_blog( $post_id, $this->db->blogid );\n\t\t}", "title": "" }, { "docid": "486401f66faea225e98bf70836088f44", "score": "0.56630445", "text": "public function destroy(Post $post){\n $post->delete();\n }", "title": "" }, { "docid": "d73e702a781faa9eed21d6609f960c19", "score": "0.5657265", "text": "function get_delete_post_link($post = 0, $deprecated = '', $force_delete = \\false)\n {\n }", "title": "" }, { "docid": "2bcf5e103ef95264d992dcb51f1b89ee", "score": "0.5645361", "text": "function qa_wall_delete_post($userid, $handle, $cookieid, $message)\n{\n\trequire_once QA_INCLUDE_DIR . 'db/messages.php';\n\n\tqa_db_message_delete($message['messageid']);\n\tqa_db_user_recount_posts($message['touserid']);\n\n\tqa_report_event('u_wall_delete', $userid, $handle, $cookieid, array(\n\t\t'messageid' => $message['messageid'],\n\t\t'oldmessage' => $message,\n\t));\n}", "title": "" }, { "docid": "5f5832d170707d159d8afb8aa2f9f3ae", "score": "0.5645175", "text": "public function untrashed_post($post_id)\n {\n }", "title": "" }, { "docid": "64b7f3a9401464aa05ccc5cc403e22b0", "score": "0.5641752", "text": "public function removeLastPostFromBlog() {}", "title": "" }, { "docid": "2d5724eda31e74fb34ddc8d70df616a6", "score": "0.5637302", "text": "public function delete_post( $post ) \n\t{\n\t\t$term = new Zend_Search_Lucene_Index_Term( $post->id, 'postid' );\n\t\t$docIds = $this->_index->termDocs( $term );\n\t\tforeach ( $docIds as $id ) {\n\t\t\t$this->_index->delete( $id );\n\t\t}\n\t}", "title": "" }, { "docid": "9f6f900783e8efde7d23a50eb58ec412", "score": "0.56205755", "text": "protected function deleteExpired() {\n\t\t$result = $this->db->query('SELECT id FROM image WHERE delete_time < '.time());\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_NUM)) {\n\t\t\t\t$this->delete($entry[0]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "585afa66d73bcf47518bf9555432e32f", "score": "0.5615969", "text": "function undelete_posts()\r\n\t{\r\n\t\tglobal $auth, $config, $db, $phpbb_root_path, $phpEx, $user;\r\n\r\n\t\tif (sizeof($this->undelete['p']))\r\n\t\t{\r\n\t\t\t$sql_data = array(\r\n\t\t\t\t'post_deleted'\t\t\t=> 0,\r\n\t\t\t\t'post_deleted_time'\t\t=> 0,\r\n\t\t\t);\r\n\t\t\t$sql = 'UPDATE ' . POSTS_TABLE . '\r\n\t\t\t\tSET ' . $db->sql_build_array('UPDATE', $sql_data) . '\r\n\t\t\t\t\tWHERE ' . $db->sql_in_set('post_id', $this->undelete['p']);\r\n\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\t// Add the post info to the search index since we are undeleting it\r\n\t\t\t$this->update_search_index($this->undelete['p'], false);\r\n\r\n\t\t\tforeach ($this->undelete['p'] as $id)\r\n\t\t\t{\r\n\t\t\t\t$topic_id = intval($this->post_data[$id]['topic_id']);\r\n\t\t\t\t$forum_id = intval($this->post_data[$id]['forum_id']);\r\n\r\n\t\t\t\t// Update the first/last topic info if we must\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_deleted'] != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Since the topic was deleted, undelete it\r\n\t\t\t\t\t$this->undelete['t'][] = $topic_id;\r\n\r\n\t\t\t\t\tif ($this->topic_data[$topic_id]['topic_poster'] != $user->data['user_id'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_UNDELETE_TOPIC', $this->topic_data[$topic_id]['topic_title']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($this->post_data[$id]['poster_id'] != $user->data['user_id'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_UNDELETE_POST', $this->post_data[$id]['post_subject']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_first_post_id'] > $id)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->update_first_post_topic($topic_id);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_last_post_id'] < $id)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->update_last_post_topic($topic_id);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\tSET topic_deleted_reply_count = topic_deleted_reply_count - 1\r\n\t\t\t\t\t\tWHERE topic_id = ' . $topic_id;\r\n\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t$this->topic_data[$topic_id]['topic_deleted_reply_count']--;\r\n\r\n\t\t\t\t// If there is a shadow topic, we will update it too.\r\n\t\t\t\tif (array_key_exists($topic_id, $this->shadow_topic_ids))\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\t\tSET topic_deleted_reply_count = topic_deleted_reply_count - 1\r\n\t\t\t\t\t\t\tWHERE topic_id = ' . intval($this->shadow_topic_ids[$topic_id]);\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\t\t\t$this->topic_data[$this->shadow_topic_ids[$topic_id]]['topic_deleted_reply_count']--;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If the topic is a global announcement, do not attempt to do any updates to forums\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_type'] != POST_GLOBAL)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Update the last post info for the forum if we must\r\n\t\t\t\t\tif ($this->forum_data[$forum_id]['forum_last_post_id'] < $id)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->update_last_post_forum($forum_id);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (array_key_exists($topic_id, $this->shadow_topic_ids))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($this->forum_data[$this->topic_data[$this->shadow_topic_ids[$topic_id]]['forum_id']]['forum_last_post_id'] == $id)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->update_last_post_forum($this->topic_data[$this->shadow_topic_ids[$topic_id]]['forum_id']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$sql = 'UPDATE ' . FORUMS_TABLE . '\r\n\t\t\t\t\t\tSET forum_deleted_reply_count = forum_deleted_reply_count - 1\r\n\t\t\t\t\t\t\tWHERE forum_id = ' . $forum_id;\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t\t$this->forum_data[$forum_id]['forum_deleted_reply_count']--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Undelete the topics\r\n\t\t\t$this->undelete_topics();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c06e857d9c3502dd8862683d372ee8a8", "score": "0.5611959", "text": "public function delete()\n {\n self::$db->query(\n 'DELETE FROM public.short_urls\n WHERE short_url_id = $1',\n [$this->short_url_id]\n );\n }", "title": "" }, { "docid": "5614bb618eff390f414e278f50d65e23", "score": "0.5610211", "text": "function wiki_delete_post($post_id, $member = null)\n{\n if (is_null($member)) {\n $member = get_member();\n }\n\n $rows = $GLOBALS['SITE_DB']->query_select('wiki_posts', array('*'), array('id' => $post_id), '', 1);\n if (!array_key_exists(0, $rows)) {\n warn_exit(do_lang_tempcode('MISSING_RESOURCE', 'wiki_post'));\n }\n $myrow = $rows[0];\n $original_poster = $myrow['member_id'];\n $page_id = $myrow['page_id'];\n $_message = $myrow['the_message'];\n\n $log_id = log_it('WIKI_DELETE_POST', strval($post_id), strval($page_id));\n if (addon_installed('actionlog')) {\n require_code('revisions_engine_database');\n $revision_engine = new RevisionEngineDatabase();\n $revision_engine->add_revision(\n 'wiki_post',\n strval($post_id),\n strval($page_id),\n '',\n get_translated_text($_message),\n $original_poster,\n $myrow['date_and_time'],\n $log_id\n );\n }\n\n require_code('attachments2');\n require_code('attachments3');\n delete_lang_comcode_attachments($_message, 'wiki_post', strval($post_id));\n\n $GLOBALS['SITE_DB']->query_delete('wiki_posts', array('id' => $post_id), '', 1);\n $GLOBALS['SITE_DB']->query_delete('rating', array('rating_for_type' => 'wiki_post', 'rating_for_id' => $post_id));\n\n if (addon_installed('catalogues')) {\n update_catalogue_content_ref('wiki_post', strval($post_id), '');\n }\n\n // Stat\n update_stat('num_wiki_posts', -1);\n\n if ((addon_installed('commandr')) && (!running_script('install')) && (!get_mass_import_mode())) {\n require_code('resource_fs');\n expunge_resource_fs_moniker('wiki_post', strval($post_id));\n }\n}", "title": "" }, { "docid": "b92cba957ac8d662f2756c52d7ee6406", "score": "0.5610082", "text": "public function deleteList(){\n\n $posts=$this->articleDAO->getPosts();\n $this->view->adminRender ('delete_view', ['posts' =>$posts]);\n\n }", "title": "" }, { "docid": "1cab62b14319d0bb15462aa628d98c8b", "score": "0.5606611", "text": "function edithistory_delete_thread($tid)\n{\n\tglobal $db, $mybb;\n\t$db->delete_query(\"edithistory\", \"tid='{$tid}'\");\n}", "title": "" }, { "docid": "dad1e8ea546517a488c5b3507b5de442", "score": "0.5605455", "text": "function delete_post()\n {\n $this->Admin_model->procedure = 'POST_DELETE';\n\n echo $this->p_post_id_delete;\n\n\n $rs = $this->Admin_model->delete($this->p_post_id_delete);\n\n //redirect('admin/Posts/display_cat');\n }", "title": "" }, { "docid": "736bf7889cb3e0014d37d5d50b9b41b0", "score": "0.55997056", "text": "public function deleteActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n $contentId = getPost(\"contentId\");\n\n if (!is_numeric($contentId)) {\n return $this->app->response->redirect(\"admin\");\n }\n\n if (hasKeyPost(\"doDelete\")) {\n $contentId = getPost(\"contentId\");\n\n // Executes SQL statement\n $this->admin->deleteBlogpost($contentId);\n\n // Redirects\n return $this->app->response->redirect(\"admin\");\n }\n }", "title": "" }, { "docid": "dc486f7b13bf76eb17c9c72f32b5cd6a", "score": "0.55957764", "text": "public function deletePostMeta() {\n delete_post_meta($this->id, $this->_post_meta_name);\n }", "title": "" }, { "docid": "a1bb24f097632caacb52bfe51099a3ee", "score": "0.5588862", "text": "public function deleteFeed()\n {\n if ($this->ad->isNewRecord) {\n return;\n }\n $feed = ExternalPlatformFeeds::find()->where([\n 'ad_id' => $this->ad->primaryKey\n ])->one();\n if ($feed) {\n return $feed->delete();\n }\n return $feed;\n }", "title": "" } ]
7fe393239323ba135c49360462d17458
End of Update User
[ { "docid": "f06d461c092d3da6fb89bb2354885e5e", "score": "0.0", "text": "public function destroy(Request $request)\n {\n try {\n $exams = Exam::whereIn('id', (array)$request['id'])->get();\n if ($exams) {\n DB::beginTransaction();\n foreach ($exams as $exam) {\n $exam->delete();\n }\n DB::commit();\n $this->count -= count((array) $request['id']);\n return $this->successMessage('destroyed_successfully', 'destroy');\n }\n } catch (\\Exception $e) {\n return response()->json($e->getMessage(), 500);\n }\n }", "title": "" } ]
[ { "docid": "899422962a430c72292b653971357e97", "score": "0.6853862", "text": "public function testUpdateUser()\n {\n }", "title": "" }, { "docid": "899422962a430c72292b653971357e97", "score": "0.6853862", "text": "public function testUpdateUser()\n {\n }", "title": "" }, { "docid": "49b9c15de53340f55432215c499decd7", "score": "0.67921185", "text": "public function end(){ \n $formate = new Formatter();\n $session = UsersSessions::findOne(['user_id' => Yii::$app->user->getId(), 'end' => 0]);\n $session->end = (int)$formate->asTimestamp(date(\"Y-m-d H:i:s\"));\n $session->save();\n }", "title": "" }, { "docid": "26ec56c20e4163915ae904a318449ae7", "score": "0.66825324", "text": "public function testUpdateUserAccount()\n {\n }", "title": "" }, { "docid": "4fddce2f740e82607b764053842ca477", "score": "0.6488793", "text": "public function updateUser() {\n\t if($this->user != null) {\n \t$this->db->update(\"users\", $this->params, \"`id` = '{$this->user['id']}'\");\n\t } else {\n\t\t$this->slim->halt(403, \"\");\n\t }\n }", "title": "" }, { "docid": "1c1ad4d8bbb0e9abe03637f38dcd56c3", "score": "0.6399715", "text": "public function imva_launchUserUpdate()\n\t{\n\t\t$oxDb = oxDb::getDb(oxDb::FETCH_MODE_ASSOC);\n\t\t\n\t\t$AdminUsers = $oxDb->getAll(\"SELECT OXID FROM oxuser WHERE OXRIGHTS = 'malladmin'\");\t\t\t\n\t\tforeach ($AdminUsers as $UserId)\n\t\t{\n\t\t\t$TheOldUserId = $UserId['OXID'];\n\t\t\t\n\t\t\t$User = oxNew('oxUser');\n\t\t\t$User->load($TheOldUserId);\n\t\t\t\n\t\t\t$TheNewUserId = md5(\n // Some stuff to make it random\n $User->oxuser__oxusername->value .\n oxRegistry::getConfig()->getConfigParam('sShopDir') .\n rand(99, getrandmax()) .\n $User->oxuser__oxshopid->value\n );\n\t\t\t\n\t\t\t// Statements -->\n\t\t\t\n\t\t\t$Statement = \"UPDATE `oxuser` SET `OXID` = '$TheNewUserId' WHERE `OXID` = '$TheOldUserId';\";\n\t\t\t$oxDb->execute($Statement);\n\t\t\t\n\t\t\t$Statement = \"UPDATE `oxobject2group` SET `OXOBJECTID` = '$TheNewUserId' WHERE `OXOBJECTID` = '$TheOldUserId'\";\n\t\t\t$oxDb->execute($Statement);\n\t\t\t\n\t\t\t$Statement = \"UPDATE `oxuserbaskets` SET `OXUSERID` = '$TheNewUserId' WHERE `OXUSERID` = '$TheOldUserId'\";\n\t\t\t$oxDb->execute($Statement);\n\t\t\t\n\t\t\t$Statement = \"UPDATE `oxuserpayments` SET `OXUSERID` = '$TheNewUserId' WHERE `OXUSERID` = '$TheOldUserId'\";\n\t\t\t$oxDb->execute($Statement);\n\t\t\t\n\t\t\t$Statement = \"UPDATE `oxacceptedterms` SET `OXUSERID` = '$TheNewUserId' WHERE `OXUSERID` = '$TheOldUserId'\";\n\t\t\t$oxDb->execute($Statement);\n\t\t\t\n\t\t\t$Statement = \"UPDATE `oxvouchers` SET `OXUSERID` = '$TheNewUserId' WHERE `OXUSERID` = '$TheOldUserId'\";\n\t\t\t$oxDb->execute($Statement);\n\t\t\t\n\t\t\t//<-- Statements\n\t\t\t\n\t\t\tunset($User);\n\t\t}\n\n\t\t$this->wasExecuted = true;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d0b5ebbba54be9a1b907bbaf78cc262f", "score": "0.63976693", "text": "public function updateUser(){\n // $logger = new Logger();\n // $logger->log(\"User Created:\");\n $this->logger->log();\n }", "title": "" }, { "docid": "d4c9bcde4b722ef8e275aa06bb9cad41", "score": "0.63248503", "text": "public function doUpdate(){\n\t\t@$this->loadModel(\"Users\");\n\t\tif($this->model->update()===1){\n\t\t\t$_SESSION['message'] =\"<div data-alert class='alert-box success round'>Transaction Successful<a href='#' class='close'>&times;</a></div>\";\n\t\t\tredirect_to($this->uri->link(\"users/index\"));\n\t\t}elseif($this->model->update()===2){\n\t\t\t$_SESSION['message'] =\"<div data-alert class='alert-box alert round'><b>Unexpected error!</b> Transaction Unsuccessful <a href='#' class='close'>&times;</a></div>\";\n\t\t\tredirect_to($this->uri->link(\"users/index\"));\n\t\t}elseif($this->model->update()===3){\n\t\t\t$_SESSION['message'] =\"<div data-alert class='alert-box alert round'><b>Unexpected error!</b> Transaction was not successful <a href='#' class='close'>&times;</a></div>\";\n\t\t\tredirect_to($this->uri->link(\"users/index\"));\n\t\t}elseif($this->model->update()===4){\n\t\t\t$_SESSION['message'] =\"<div data-alert class='alert-box alert round'>Record not saved! Ensure that all required field are set <a href='#' class='close'>&times;</a></div>\";\n\t\t\tredirect_to($this->uri->link(\"users/index\"));\n\t\t}\n\t}", "title": "" }, { "docid": "ff4bbe0c79749e145780c2a8cdac0a41", "score": "0.6292887", "text": "public function done()\n\t{\n\t\t$this->setLastUpdateTime($this->update_time);\n\t\tunset($this->update_time);\n\t\tflock($this->lock_file, LOCK_UN);\n\t\tfclose($this->lock_file);\n\t\tclearstatcache(true, self::UPDATE_FILE);\n\t\tif (file_exists(self::UPDATE_FILE)) {\n\t\t\tunlink(self::UPDATE_FILE);\n\t\t}\n\t\tif (function_exists('opcache_reset')) {\n\t\t\topcache_reset();\n\t\t}\n\t\tif (isset($_GET['Z']) && isset($_POST['Z'])) {\n\t\t\tMain::$current->running = false;\n\t\t\tdie($this->fullUpdateDoneView());\n\t\t}\n\t}", "title": "" }, { "docid": "fcdf6897e4dac1f30500e6e93ed46283", "score": "0.62861586", "text": "public function testUpdateUser()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "ce05623a28543ac95770d63a19984b3f", "score": "0.62815213", "text": "public function testUpdateUserProfile()\n {\n }", "title": "" }, { "docid": "b9e2937940fa27ac31581f4cc4879257", "score": "0.62667423", "text": "public function updateAction()\n {\n $user = Authenticate::getUser();\n\n if($user->updateUserAccount($_POST))\n {\n //echo \"<p>ok</p>\";\n Flash::addMessage(\"Update Successful\");\n $this->redirect('/fyp/public/?UserAccount/index');\n } else {\n Flash::addMessage(\"Update Failed\");\n View::renderTwigTemplate('/UserDetail/edit.html', [\n 'user' => $user\n ]);\n }\n }", "title": "" }, { "docid": "60e796019c0eef0722644f61993e4fc9", "score": "0.6226348", "text": "protected function afterSave()\n {\n HelperOwncloud::EditUser($this->user_id);\n return parent::afterSave();\n }", "title": "" }, { "docid": "9393a673c47849624ee07dd751a4e169", "score": "0.6221558", "text": "public function testUserRequestsUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "d1aa8c4e12a6a44b5edd3f9169bc8d78", "score": "0.6197305", "text": "public function actualizarAction()\n\t{\n\t\t$userModel = new UserModel();\n\t\t// Definir un array/objeto\n\t\t$data = array(\n\t\t\t'username' => 'felix',\n\t\t\t'email' => 'felix@gmail.com'\n\t\t);\n\t\t// Modificar registro (id, datos)\n\t\t$userModel->update(5, $data);\n\t\t// Mostrar un mensaje\n\t\techo 'El usuario ' . $data['username'] . ' fue editado exitosamente.';\n\t}", "title": "" }, { "docid": "9ebae0b27f639f8f2c71a081716aa48d", "score": "0.6193855", "text": "public function complete_login()\n\t{\n\t\tif ($this->_loaded)\n\t\t{\n\t\t\t// Update the number of logins\n\t\t\t$this->logins = new Database_Expression('logins + 1');\n\n\t\t\t// Set the last login date\n\t\t\t$this->last_login = time();\n\n\t\t\t// Save the user\n\t\t\t$this->update();\n\t\t}\n\t}", "title": "" }, { "docid": "13a3d47e39288c70896a904a33470bc1", "score": "0.61775583", "text": "protected function _afterUpdate()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a50964055f162dfe6c9cd9cb0ef6c48b", "score": "0.617204", "text": "public function vUpdateUser(){\n\t\t$oDB = self::oDB(self::$sDBName);\n\t\t$oCurrentUser = self::$session->get('oCurrentUser');\n\t\t$aValues = array(\t'user_name'=>$this->sName,\n\t\t\t\t\t'user_password'=>$this->sPassword,\n\t\t\t\t\t'user_email'=>$this->sEmail,\n\t\t\t\t\t'user_tel'=>$this->sTel,\n\t\t\t\t\t'user_fax'=>$this->sFax,\n\t\t\t\t\t'user_mobile'=>$this->sMobile,\n\t\t\t\t\t'addr_id'=>$this->sAddrId,\n\t\t\t\t\t'user_addr'=>$this->sAddr,\n\t\t\t\t\t'status'=>$this->bStatus\n\t\t\t\t);\n\t\ttry{\n\t\t\t$oDB->vBegin();\n\t\t\t$oDB->sUpdate(\"galaxy_user\", array_keys($aValues), array_values($aValues), \"`user_no` = {$this->iUserNo}\");\n\t\t\t$oDB->vDelete('galaxy_group_user_rel',\"`user_no`={$this->iUserNo}\");\n\t\t\tforeach ($this->__aCGroup as $oCGroup) {\n\t\t\t\t$aGpValues = array(\t'group_no'=>$oCGroup->iGroupNo,\n\t\t\t\t\t\t\t\t\t\t'user_no'=>$this->iUserNo\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t$oDB->sInsert('galaxy_group_user_rel',array_keys($aGpValues),array_values($aGpValues));\n\t\t\t}\n\t\t\t$oDB->vCommit();\n\t\t\t$oCurrentUser->vAddUserLog(\"galaxy_user\",$this->iUserNo,'user','edit');\n\t\t}catch (Exception $e){\n\t\t\t$oDB->vRollback();\n\t\t\tthrow new Exception(\"CUser->vUpdateUser: \".$e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "9857c4011204a70207b507ca6e636e96", "score": "0.61709225", "text": "public function afterUpdate()\n\t{\n\t\t$this->trigger('afterUpdate', new Event($this));\n\t}", "title": "" }, { "docid": "60a36be1807198ce47a3cf5c6db4ff34", "score": "0.6163445", "text": "protected function _postUpdate() {\n\t}", "title": "" }, { "docid": "f6a32d36502683e766624a7772722fa8", "score": "0.6161185", "text": "public function update() \n { \n if (!is_logged_in()) {\n redirect(url('login/index'));\n }\n $user_id = User::getId($_SESSION['username']);\n $user = User::get($user_id);\n $_SESSION['fname'] = $user->fname;\n $_SESSION['lname'] = $user->lname;\n $_SESSION['email'] = $user->email;\n $status = \"\";\n \n if ($user_id) {\n $user->username = Param::get('username');\n $user->password = Param::get('password');\n $user->fname = Param::get('fname');\n $user->lname = Param::get('lname');\n $user->email = Param::get('email');\n\n if ($user->username) {\n try {\n $user->update($user_id, $_SESSION['username'], $_SESSION['email']);\n $status = notify(\"Edit Success\");\n $_SESSION['username'] = $user->username;\n } catch (AppException $e) {\n $status = notify($e->getMessage(), 'error');\n }\n\n }\n } $this->set(get_defined_vars()); \n }", "title": "" }, { "docid": "d1acc8ec8ea0caac2f5cb1b576369eca", "score": "0.61426383", "text": "public function updateLastSignIn() {\r\n\t\tupdateUserLastSignIn($this->user_id);\r\n\t}", "title": "" }, { "docid": "6ce47e8a427b4dd386b691dea48c6db0", "score": "0.61402375", "text": "function updateUser()\n {\n // We will try to edit the user with multiple action, if get error will cancel by using PHP Rollback\n try\n {\n\n $db = DB::getConnect();\n $db->beginTransaction();\n // Edit the table personne from SQL first\n $reg = 'UPDATE personne SET personne_Nom = :firstname, personne_Prenom = :lastname WHERE personne_Id = :id'; // Request with prepare statement\n $st = $db->prepare($reg); // Parse in request with param\n $st->bindValue(':firstname', $this->u_firstname, PDO::PARAM_STR);\n $st->bindValue(':lastname', $this->u_lastname, PDO::PARAM_STR);\n $st->bindValue(':id', $this->u_id, PDO::PARAM_INT);\n $st->execute(); // execute this request\n\n // Edit the table user from SQL\n $reg = 'UPDATE utilisateur SET utilisateur_EMail = :uemail, utilisateur_Password = :upassword , level_Id = :rank_id, utilisateur_Bloque = :blocked WHERE utilisateur_Id = :id';\n $st = $db->prepare($reg);\n $st->bindValue(':uemail', $this->u_email, PDO::PARAM_STR);\n $st->bindValue(':upassword', $this->u_password, PDO::PARAM_STR);\n $st->bindValue(':rank_id', $this->u_rank_id, PDO::PARAM_INT);\n $st->bindValue(':blocked', $this->u_banned, PDO::PARAM_INT);\n $st->bindValue(':id', $this->u_id, PDO::PARAM_INT);\n $st->execute();\n $db->commit();\n redirectHeaderURI();\n }\n catch (PDOException $e) \n {\n if (isset($db)) // check if the connection is existe\n {\n $db->rollback(); // Cancel all action \n header('location: ?error=1'); // Redirect with error\n exit();\n // echo 'Rolbacked , Error: '.$e->getMessage(); \n }\n } \n }", "title": "" }, { "docid": "2922afc4afd0020b5483482b23a673b6", "score": "0.61208624", "text": "public function user_force_logout_update($id){\n \n //echo $id;\n\n //exit();\n\n $user = User::where('id', $id)->first();\n //dd($user);\n $user->force_logout = 1;\n $user->save();\n\n return Redirect()->route('logout-user-force')->with('message', 'User Session Forced Out Succussfully!');\n}", "title": "" }, { "docid": "5170fb33249cc8835a1c88aa50f6bf8e", "score": "0.6111678", "text": "public function update()\n {\n $data = \\Request::all();\n $user_data = $data['user'];\n\n // update user\n $user = UserService::load($user_data['id'])->update($user_data);\n\n \\Msg::success($user->name . ' has been <strong>updated</strong>');\n return redir('admin/members');\n }", "title": "" }, { "docid": "6b74570b83c6e0ec418ca614e1417a6c", "score": "0.6099304", "text": "private function updateUserActivity(): void\n {\n if( !empty($this->tokenStorage->getToken()?->getUser()) )\n {\n $user = $this->tokenStorage->getToken()->getUser();\n if( $user instanceof User ){\n $realUser = $this->userController->getOneByUsername($user->getUsername());\n $userController = $this->userController;\n }else{\n $realUser = $this->apiUserController->getOneByUsername($user->getUsername());\n $userController = $this->apiUserController;\n }\n\n if( empty($realUser) ){\n throw new Exception(\"No real user has been found for username: {$user->getUsername()}\");\n }\n\n $realUser->setLastActivity(new DateTime());\n $userController->save($realUser);\n }\n }", "title": "" }, { "docid": "94c90ee29093613568bb2e81b649a5cc", "score": "0.6094751", "text": "public function testUpdatePOSTUser()\n {\n\t\t$id = DB::select(\"select max(id) as iden from users\");\n\n $data = [\n 'name' => 'meno8',\n 'role' => 2,\n 'password' => 'passfdgfdgkl',\n ];\n\n \\Auth::login(User::find(1));\n\n $response = $this->withHeaders([\n 'X-Header' => 'Value',\n ])->json('POST', 'uzivatele/update/'.$id[0]->iden, $data);\n\n $response->assertStatus(302);\n\n User::destroy($id[0]->iden);\n\n }", "title": "" }, { "docid": "93661a6aa23b53705112ed7412eb6691", "score": "0.60839516", "text": "function userUpdate() \t{\n\t\t$this->getMenu() ;\n\t\t$form['user_id']\t\t= $this->input->post('user_id');\n\t\t$form['employee_id']\t= $this->input->post('employee_id');\n\t\t$form['approval']\t\t= $this->input->post('approval');\n\t\t$form['acl']\t\t\t= $this->input->post('acl');\n\t\t$form['user_active']\t= $this->input->post('user_active');\n\n\t\t$this->dataModel->saveUser($form);\n\t\t//$this->load->view('clientEdit/'.$form['client_id'].'/SAVED');\n\t\t//$this->load->view('clientEdit/'.$form['client_id'].'/SAVED');\n\t}", "title": "" }, { "docid": "e0ef8b1cb1936adbec2406828e356c90", "score": "0.6081754", "text": "protected function after_update() {\n \n }", "title": "" }, { "docid": "966026c7a06384f5c018e4d8bd5afbb2", "score": "0.60794896", "text": "public function updated(User $user)\n {\n //\n }", "title": "" }, { "docid": "966026c7a06384f5c018e4d8bd5afbb2", "score": "0.60794896", "text": "public function updated(User $user)\n {\n //\n }", "title": "" }, { "docid": "966026c7a06384f5c018e4d8bd5afbb2", "score": "0.60794896", "text": "public function updated(User $user)\n {\n //\n }", "title": "" }, { "docid": "966026c7a06384f5c018e4d8bd5afbb2", "score": "0.60794896", "text": "public function updated(User $user)\n {\n //\n }", "title": "" }, { "docid": "966026c7a06384f5c018e4d8bd5afbb2", "score": "0.60794896", "text": "public function updated(User $user)\n {\n //\n }", "title": "" }, { "docid": "966026c7a06384f5c018e4d8bd5afbb2", "score": "0.60794896", "text": "public function updated(User $user)\n {\n //\n }", "title": "" }, { "docid": "966026c7a06384f5c018e4d8bd5afbb2", "score": "0.60794896", "text": "public function updated(User $user)\n {\n //\n }", "title": "" }, { "docid": "cfcec02c89f6cf7c7c1957b5408abe44", "score": "0.60432595", "text": "function userUpdate() \t{\n\t\t$this->getMenu() ;\n\t\t$form['user_id']\t\t= $this->input->post('user_id');\n\t\t$form['nik']\t\t= $this->input->post('nik');\n\t\t$form['employee_id']\t= $this->input->post('employee_id');\n\t\t$form['approval']\t\t= $this->input->post('approval');\n\t\t$form['acl']\t\t\t= $this->input->post('acl');\n\t\t$form['user_active']\t= $this->input->post('user_active');\n\n\t\t$this->adminModel->saveUser($form);\n\t\t//$this->load->view('clientEdit/'.$form['client_id'].'/SAVED');\n\t\t//$this->load->view('clientEdit/'.$form['client_id'].'/SAVED');\n\t}", "title": "" }, { "docid": "cfa382c45ef061969e27fa371d20708b", "score": "0.6041773", "text": "abstract public function updateUser( User $user );", "title": "" }, { "docid": "09abd88d023bd3fafd5f036fdee097d8", "score": "0.6033942", "text": "private function update() {\n\t\n\t\t// Check permissions\n\t\tif (!$this->usr['edituser']) {\n\t\t\theader(\"Location: ?flg=noperms\");\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// array to hold the data\n\t\t$data = array();\n\t\t\n\t\t// get the required post varables \n\t\t$this->fetchPOSTData(array('username','passwd','email'), $data);\n\t\tif (!$data['passwd']) unset($data['passwd']);\n\t\telse $data['passwd'] = hash('sha512',$data['passwd']); // encrypt the password\n\t\t\t\n\t\t// get the required post checkboxes \n\t\t$this->fetchPOSTCheck( array('active','editpage','delpage','edituser','deluser',\n\t\t\t'editsettings','editcont','editlayout','editcss','editjs'), $data);\n\t\t\t\n\t\t// Common Validtions \n\t\tif (strlen(trim($data['username'])) < 2) die('User Name must min 2 chars!');\n\t\tif (strlen(trim($data['email'])) < 5) die('User email must min 5 chars!');\n\t\tif (isset($data['passwd'])) \n\t\t\tif (strlen(trim($data['passwd'])) < 8) \n\t\t\t\tdie('New User password must be 8 in length.');\n\t\t// email address should not be duplicated.\n\t\t$dupCheckID = $this->chkTableForVal('users', 'email', 'id', $data['email']);\n\t\t\n\t\tif ($this->id == 'new') {\n\t\t\t// add new\n\t\t\t\n\t\t\t// password must set for new users\n\t\t\tif (!isset($data['passwd'])) die('New user password must be set.');\n\t\t\t\n\t\t\t// email address should not be duplicated.\n\t\t\tif ($dupCheckID) {\n\t\t\t\t$this->flg = 'emailduplicate';\n\t\t\t\t$this->thisUser = $data;\n\t\t\t\t$this->setupCheckboxes();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$newID = $this->add( 'users' , $data);\n\t\t\tif ($newID) {\n\t\t\t\theader(\"Location: ?id=\".$newID.\"&flg=saved\");\t// added\n\t\t\t\texit; \n\t\t\t} \n\t\t\t\n\t\t} else {\n\t\t\t// update\n\t\t\t\n\t\t\t// email address should not be duplicated.\n\t\t\tif (($dupCheckID) && ($dupCheckID != $this->id)) {\n\t\t\t\t$this->flg = 'emailduplicate';\n\t\t\t\t$this->thisUser = $data;\n\t\t\t\t$this->setupCheckboxes();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->edit( 'users' , $this->id , $data )) {\n\t\t\t\theader(\"Location: ?id=\".$this->id.\"&flg=saved\");\t// added\n\t\t\t\texit; \n\t\t\t}\t\t\n\t\t}\n\t\t$this->flg = 'failed';\n\t\t$this->thisUser = $data;\n\t\t$this->setupCheckboxes();\t\t\n\t}", "title": "" }, { "docid": "2c03f2b6ed4162a413bd7c1c45c7840c", "score": "0.6033286", "text": "public function update() {\n // must be logged in to access this page\n if ( !isset( $_SESSION['user'] ) ) {\n //redirect back to the login page\n header( \"Location: /voodoo/session/new\" );\n exit;\n }\n\n if ( $_SESSION['user']['type'] == 'u' ) {\n $email = $_SESSION['user']['email'];\n } else {\n $email = $_SESSION['editUser']->email;\n }\n\n // must have some POSTed data\n // could check for referer here\n if ( !isset( $_POST ) || empty( $_POST ) ) {\n header( \"Location: /voodoo/users\" );\n exit;\n }\n\n $values = array(\n 'fName' => trim( $_POST['fName'] ),\n 'lName' =>trim( $_POST['lName'] ),\n 'streetNo' => trim( $_POST['streetNo'] ),\n 'streetName' => trim( $_POST['streetName'] ),\n 'suburb' => trim( $_POST['suburb'] ),\n 'state' => trim( $_POST['state'] ),\n 'postCode' => trim( $_POST['postCode'] ),\n 'phoneNo' => trim( $_POST['phoneNo'] ),\n 'dob' => trim( $_POST['dob'] )\n );\n\n if ( !User::validates( $values ) ) {\n // store errors in session and redirect\n $_SESSION['user']['errors'] = User::errors();\n header( \"Location: /voodoo/users/edit\" );\n exit;\n }\n\n // update user\n // redirect to user's show page\n User::update( $email, $values );\n $_SESSION['updateSuccessful'] = 'true';\n header( \"Location: /voodoo/users\" );\n exit;\n }", "title": "" }, { "docid": "81cf3b9957a4ccccb3183701e112fa50", "score": "0.6028496", "text": "public function run()\n {\n $criteria = new \\CDbCriteria();\n $criteria->addCondition('id = :id');\n $criteria->params = [':id' => Yii::app()->getRequest()->getParam('user_id')];\n /** @var User $User */\n $User = \\User::model()->find($criteria);\n $User->scenario = 'updateAction';\n\n $post = Yii::app()->getRequest()->getPost('User');\n if ($post) {\n $User->setAttributes($post);\n $User->onAfterChange = [new \\AdminHistory(), 'afterChange'];\n if (!$User->updateAction())\n Yii::app()->getAjax()->addErrors($User);\n else\n Yii::app()->getAjax()\n ->runJS('closeUserEdit')\n ->addMessage('Пользователь обновлен')->send();\n }\n\n $params = [\n 'model' => $User,\n ];\n Yii::app()->getAjax()->addReplace('_form', '#content-replacement #replace-info-block', $params)\n ->send();\n }", "title": "" }, { "docid": "fdee880f33b1992591bf881f40c6fe7b", "score": "0.60234195", "text": "public function updateUserStats(){\n\n }", "title": "" }, { "docid": "ea084b624db4bfe4e0cca934dd37739e", "score": "0.6010126", "text": "function complete_all_transactions()\n{\n $user_id = $_SESSION[user_id];\n $connection = Database::getInstance()->getConnection();\n\n $sql = \"UPDATE transactions SET completed=1 WHERE completed=0 and user_id=$user_id\";\n\n if ($connection->query($sql) === TRUE) {\n echo \"complete_all_transactions sucess\";\n } else {\n echo \"complete_all_transactions error: \" . $connection->error;\n }\n}", "title": "" }, { "docid": "5a46a3d9872b868f3387456ba3cd0dfb", "score": "0.5985355", "text": "public function update()\n {\n\t\t$this->checkCsrfToken();\n\n // Get parameters from whatever input we need.\n $uname = $this->request->getPost()->get('uname', null);\n $dynadata = $this->request->getPost()->get('dynadata', null);\n\n $uid = UserUtil::getVar('uid');\n\n // Check for required fields - The API function is called.\n $checkrequired = ModUtil::apiFunc('Profile', 'user', 'checkrequired', array('dynadata' => $dynadata));\n\n if ($checkrequired['result'] == true) {\n LogUtil::registerError($this->__f('Error! A required profile item [%s] is missing.', $checkrequired['translatedFieldsStr']));\n\n // we do not send the passwords here!\n $params = array('uname' => $uname,\n 'dynadata' => $dynadata);\n\n $this->redirect(ModUtil::url('Profile', 'user', 'modify', $params));\n }\n\n // Building the sql and saving - The API function is called.\n $save = ModUtil::apiFunc('Profile', 'user', 'savedata',\n array('uid' => $uid,\n 'dynadata' => $dynadata));\n\n if ($save != true) {\n $this->redirect(ModUtil::url('Profile', 'user', 'view'));\n }\n\n // This function generated no output, we redirect the user\n LogUtil::registerStatus($this->__('Done! Saved your changes to your personal information.'));\n\n $this->redirect(ModUtil::url('Profile', 'user', 'view', array('uname' => UserUtil::getVar('uname'))));\n }", "title": "" }, { "docid": "f2e2035f2015f360b0cb70573b7db9a9", "score": "0.59611636", "text": "function updateUser()\n\t{\n\t\t$this->isAdmin();\n\t\t$usersModel= new UsersModel();\n $usersModel->setFirstname($_POST['firstname']);\n $usersModel->setLastname($_POST['lastname']);\n $usersModel->setUsername($_POST['username']);\n $usersModel->setEmail($_POST['email']);\n $usersModel->setIdRole($_POST['idRole']);\n\t\t$usersModel->setId($_GET['id']);\n\t\t$usersRepository= new UsersRepository();\n\t\t$usersRepository->updateUser($usersModel);\n\t\t$this->redirect('index.php?action=UsersController-displayAllUsers');\t\n\t}", "title": "" }, { "docid": "5222ae1497a193bfb2ca5d6d50a0f857", "score": "0.5956165", "text": "private function Update() {\n $Update = new Update;\n $Update->ExeUpdate(self::Entity, $this->Data, \"WHERE id = :id\", \"id={$this->Post}\");\n if ($Update->getResult()):\n $this->Error = [\"O E-mail <b>{$this->Data['email']}</b> foi atualizado com sucesso no sistema!\", RM_ACCEPT];\n $this->Result = true;\n endif;\n }", "title": "" }, { "docid": "8c4e01cfa1bd7a0556082ca3f4cac820", "score": "0.5954481", "text": "public function afterSave() {\n if ($this->isStatusChanged()) {\n $this->admin_id = Yii::app()->user->id;\n $this->updated_at = date(\"Y-m-d H:i:s\");\n $this->save(false, array('admin_id', 'updated_at'));\n }\n\n /**\n * Call the parent implementation so that the event\n * is raised properly.\n */\n parent::afterSave();\n }", "title": "" }, { "docid": "4f3e08a7770581012482254f79c1ed2f", "score": "0.5954269", "text": "public function deauth(){\n\n if($this->exists()){\n $this->active = false;\n\n //Updates the current user without synchronizing with Facebook.\n parent::update();\n }\n }", "title": "" }, { "docid": "79ac66eebb559cbba05a8d009e58023b", "score": "0.59520215", "text": "function updateProfile(){\n\t\n\t\t\t$userID = Auth::getUserID();\n\t\t\t\n\t\t\t$tb = new Table(DB_USERS);\n\t\t\t$aUser = $tb->get($userID);\n\t\n\t\t\t$email = $this->get('email');\n\t\t\t$first_name = $this->get('first_name');\n\t\t\t$last_name = $this->get('last_name');\n\t\t\t//$pass = $this->get('password'); \n\t\t\t$pass=\"\";\n\t\t\t\n\t\n\t\t\t\n\t\t\n\t\t\t$tb->field(\"first_name\",$first_name);\n\t\t\t$tb->field(\"last_name\",$last_name);\n\t\t\t$tb->field(\"telephone\");\n\t\t\t//$tb->field(\"zip\");\t\n\t\t\t\n\t\t\t$goNext=true;\n\t\t\t\n\t\t\t$coreValArray = array('email');\n\t\t\t\n\t\t\tif($pass!=\"\"){\n\t\t\t\t$tb->field(\"password\",$this->createPass($pass));\t\n\t\t\t\tarray_push($coreValArray,'password');\n\t\t\t}\n\t\t\t\n\t\t\tif($email){\n\t\t\t\t$tb->field(\"email\",$email);\t\n\t\t\t\t$goNext = $this->coreValidate($coreValArray);\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($goNext){\n\t\t\t\t\n\t\t\t\tif(USE_USERNAME){\n\t\t\t\t\t$chkuser=\"OR (id!='$userID' AND username='$username')\";\n\t\t\t\t}\n\t\t\t\t//check username or email already exists and is NOT me\n\t\t\t\t$sql = \"WHERE (id!='$userID' AND email='$email') $chkuser\";\n\t\t\t\t//print $sql;\n\t\t\t\t$exists = $tb->select($sql);\n\t\t\t\tif($exists){\n\t\t\t\t\t$goNext=false;\n\t\t\t\t\t$ec = ($exists[0]['email']==$email) ? 29 : 27;\n\t\t\t\t\t$this->error($ec); \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($social) $goNext=true;\n\t\t\t\n\t\t\tif($goNext){\n\t\t\t\t$tb->update($userID);\n\t\t\t\t$this->send(true);\n\t\t\t}\n\t\n\t}", "title": "" }, { "docid": "48fcbba2a3588aa67db5d2f0df1fcb74", "score": "0.59470433", "text": "function update()\n {\n if (!empty($_POST['password']) && $_POST['password'] == \"cron_ac_only\")\n {\n $cron_model = $this->loadModel('Cron');\n $affected_tutors = $cron_model->pauseEmailExpired();\n\t\t$warned_tutors = $cron_model->EmailWarn();\n $email_review = $cron_model->EmailFollowup();\n echo $affected_tutors.\" tutor(s) paused. \".$warned_tutors.\" tutor(s) warned. \".$email_review.\" sent followup.\";\n }\n }", "title": "" }, { "docid": "4de5a431cc02445cd4da39203805cd2a", "score": "0.59300035", "text": "public function testUserUpdate(): void\n {\n $this->createInstance();\n $user = uniqid('', false);\n $mail = $user . '@laborange.fr';\n $pass = $user;\n $result = $this->fConnector->getSSO()->signup($user, $pass, $mail)->wait();\n\n $result2 = $this->fConnector->getSSO()->login($user, $pass, false)->wait();\n\n $result3 = $this->fConnector->getUserManagement()->updateEmail($user . '@laborange2.fr', $user, $result2->userId,null)->wait();\n\n $this->assertEquals(\n $result3->email,\n $user . '@laborange2.fr',\n 'Test update of a user'\n );\n\n $result5 = $this->fConnector->getUserManagement()->updatePassword('totototo', $user, $result2->userId,null)->wait();\n $result6 = $this->fConnector->getSSO()->login($user, 'totototo')->wait();\n $this->assertInstanceOf(FlarumToken::class, $result6,'Test new login after password update');\n\n\n }", "title": "" }, { "docid": "678599594e75a2ac129e208b9c58fe7d", "score": "0.59232664", "text": "protected function _finishLogin() {\n\t\t$this->User->unset_password_request($this->Auth->user('id'));\n\t\tif ($this->Auth->user('role') == 'Admin') {\n\t\t\tif ($this->Auth->redirect() == '/users') {\n\t\t\t\t$this->Session->write('Auth.redirect', '/admin/users');\n\t\t\t}\n\t\t}\n\t\t$this->User->saveField('last_login', date('Y-m-d G:i:s', time()));\n\t\t$this->redirect($this->Auth->redirect());\n\t}", "title": "" }, { "docid": "fabb36fc7c6cf91f4ec6e73e2efc42ff", "score": "0.59197867", "text": "public function endBattle()\n {\n // figures out winner\n if ($this->checkForWinner() === 'a') {\n $winner = $this->battle->user_a;\n $loser = $this->battle->user_b;\n } else if ($this->checkForWinner() === 'b') {\n $winner = $this->battle->user_b;\n $loser = $this->battle->user_a;\n }\n\n // assign Win\n $user_winner = User::find($winner);\n $user_winner->wins = ($user_winner->wins + 1);\n $user_winner->save();\n\n // assign Loss\n $user_loser = User::find($loser);\n $user_loser->losses = ($user_loser->losses + 1);\n $user_loser->save();\n\n // send final battle updates\n TurnEndUpdate::dispatch($this->turn); // announce winner\n AnnounceWinner::dispatch($user_winner->name, $this->battle);\n\n // delete battle + turns\n Battle::find($this->battle->id)->delete();\n }", "title": "" }, { "docid": "7e40d59aac4b98c6345338575cb345de", "score": "0.5917179", "text": "function updateUser($id , $user_name , $email , $password ){\r\n global $con;\r\n $stmt = $con->prepare(\"UPDATE users SET username=? , email=? , password=? WHERE id = ?\");\r\n $stmt->execute(array(\r\n $user_name,\r\n $email,\r\n $password,\r\n $id\r\n )); \r\n echo \"\r\n <div class='container'>\r\n <p class='alert alert-success'>Success your data has been updated you will return after 3s</p>\r\n </div>\";\r\n header(\"Refresh:2; url=dash.php\");\r\n}", "title": "" }, { "docid": "6548459a5be3a5b6919a9e63d0f3e986", "score": "0.5912764", "text": "function userCommit(){\n\t\tif($_POST['sqlType'] == \"create\") {\n\t\t\t$result = mysql_query(createUser($_POST['icon'], $_POST['userEmail'], $_POST['userName'], md5($_POST['userPassword'])));\n\t\t\t$userId = mysql_insert_id();\n\t\t\t// Commits user data to the database\n\t\t\tfor($i = 0; $i < $_POST['userDataCount']; $i++){\n\t\t\t\tif($_POST['userDataQueryType' . $i] == \"create\"){\n\t\t\t\t\t$result = mysql_query(createUserData($_POST['userData' . $i], $_POST['userDataId' . $i], $userId));\n\t\t\t\t} else {\n\t\t\t\t\t$result = mysql_query(editUserData($_POST['userData' . $i], $_POST['userDataId' . $i], $userId));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$forwardId = $userId;\n\t\t} else if($_POST['sqlType'] == \"edit\") {\n\t\t\t// Decides whether or not a change to the password was made\n\t\t\tif($_POST['userPassword'] == \"\"){\n\t\t\t\t$password = $_POST['userPasswordHidden'];\n\t\t\t}else{\n\t\t\t\t$password = md5($_POST['userPassword']);\n\t\t\t}\n\t\t\t$result = mysql_query(editUser($_POST['icon'], $_POST['userEmail'], $_POST['userName'], $password, $_POST['userId']));\n\t\t\t// Commits user data to the database\n\t\t\tfor($i = 0; $i < $_POST['userDataCount']; $i++){\n\t\t\t\t// Decides on UPDATE or INSERT for user data based on whether it exsited\n\t\t\t\tif($_POST['userDataQueryType' . $i] == \"create\"){\n\t\t\t\t\t$result = mysql_query(createUserData($_POST['userData' . $i], $_POST['userDataId' . $i], $_POST['userId']));\n\t\t\t\t} else {\n\t\t\t\t\t$result = mysql_query(editUserData($_POST['userData' . $i], $_POST['userDataId' . $i], $_POST['userId']));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$forwardId = $_POST['userId'];\n\t\t}\n\t\theader('Location:' . fullURL(getLangVar(\"userURL\") . $forwardId));\n\t}", "title": "" }, { "docid": "fff1b348a01e231266e7fb421744c51a", "score": "0.5909809", "text": "public function update()\n {\n $input = array_except(Input::all(), '_method');\n $validation = Validator::make($input, User::$profile_completed,User::$messages);\n \n if ($validation->passes())\n {\n $user = $this->user->find(Sentry::getUser()->id);\n $user->update($input);\n\n if(array_key_exists('password', $input))\n {\n $user = Sentry::getUser();\n $user->password = $input['password'];\n $user->save();\n Sentry::logout();\n return Redirect::route('login')->with('message', 'Great! Try out your new password.');\n }\n return Redirect::route('profile')->with('success', 'Great! Your changes have been saved.');\n }\n return Redirect::route('profile.edit')->with('errors', $validation->messages())->with('error','Your profile has a few errors: ' . $validation->messages());\n }", "title": "" }, { "docid": "b928468d90e36c42e140dfabf05fac47", "score": "0.5907532", "text": "public function commit()\n {\n $db = new Database();\n $update_user_stmt = $db->prepare('UPDATE Users SET first_name = ?, last_name = ? WHERE id = ?');\n $update_user_stmt->bind_param('ssi', $this->firstName, $this->lastName, $this->id);\n return $update_user_stmt->execute();\n }", "title": "" }, { "docid": "0676c55f65d5347e6810cc31bf956e9d", "score": "0.5907335", "text": "public function logout()\n {\n //prepare the query using PDOStatment\n $stmt = $this->conn->prepare(\"UPDATE \" . $this->tableName . \" SET user_status=:status WHERE id=:id\");\n \n $this->userStatus = \"inactive\";\n\n //Bind Parameters using PDO Statment\n $stmt->bindParam(\":id\", $this->id);\n $stmt->bindParam(\":status\",$this->userStatus);\n\n //execute the PDOStatment\n $stmt->execute();\n return 0;\n }", "title": "" }, { "docid": "d7b7bcc5dfec4a599c3aaa309ea56206", "score": "0.59052306", "text": "function onAfterProfileUpdate($userId, $saveSuccess)\n\t{\n\t\tif(empty($saveSuccess)){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tself::_includePath();\n\t\t\n //update user data in xius_jsfields_values_table\n\t\trequire_once JPATH_ROOT.DS.'components'.DS.'com_xius'.DS.'helpers'.DS.'fieldtable.php';\n\t return XiusJsfieldTable::updateUserData($userId);\t\n\t}", "title": "" }, { "docid": "bd7636e00df9d1f213821000f44bb6da", "score": "0.58957994", "text": "function endAction($send_ok,$send_error,$send_leave) {\n \tglobal $database;\n \t// updatejtujemy baze danych\n \t$count=$send_ok.\":\".$send_error.\":\".$send_leave;\n \t$database->sql_update(\"newletter_status\",\"id=$this->_id\",array(\n\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\"stop_date\"=>date(\"Y-m-d H:i:s\"),\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"status\"=>1,\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"count\"=>$count\n \t\t\t\t\t\t\t\t\t\t\t)\n \t\t\t\t\t\t);\t\t\t\t\t\n }", "title": "" }, { "docid": "204831c147d6f775c421a2ff70e76755", "score": "0.58952427", "text": "public function updateUser(): void\n {\n $this->contactService->updateUser($this->provider->getUser());\n }", "title": "" }, { "docid": "fa51b75a3fe4e6d61958c7a0e693c16d", "score": "0.58803594", "text": "public function ep_update_matche_info()\n {\n $res = $this->user->user_matche_update();\n redirect(\"front/ep_matchs\");\n }", "title": "" }, { "docid": "e079c169d2f37aa67843ee6edfb09149", "score": "0.5873234", "text": "function update_user()\n\t{\n\t\tif(isset($_POST['update']))\n\t\t{\t\t\n\t\t\t\n\t\t\t$username = escape_string($_POST['username']);\n\t\t\t$email = escape_string($_POST['email']);\n\t\t\t$password = escape_string($_POST['password']);\n\t\t\t\n\t\t\t$query = \"UPDATE users SET \";\n\t\t\t$query .= \"username = '{$username}' , \";\n\t\t\t$query .= \"email = '{$email}' , \";\n\t\t\t$query .= \"password = '{$password}' \";\n\t\t\t$query .= \"WHERE user_id=\" . escape_string($_GET['id']);\n\n\t\t\t$send_update_query = query($query);\n\t\t\tconfirm($send_update_query);\n\t\t\t\n\t\t\tset_message(\"User has been updated\");\n\t\t\tredirect(\"index.php?users\");\n\n\n\t\t}\n\t}", "title": "" }, { "docid": "007876c85031181a5293f72eae94483e", "score": "0.58724344", "text": "function update() {\n\t\tif ( $this->getUser()->isModified() ) {\n\t\t\ttry {\n\t\t\t\t$res = $this->getUser()->save();\n\t\t\t\tif ( $res ) {\n\t\t\t\t\t$this->setMessage('Profile updated successfully');\n\t\t\t\t\t$this->setUpdated(true);\n\t\t\t\t} else {\n\t\t\t\t\t$this->setMessage('Profile update failed');\n\t\t\t\t}\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t$this->setMessage('Profile update failed: '.$e->getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\t$this->setMessage('No updates to make to profile');\n\t\t\t$this->setUpdated(0);\n\t\t}\n\t}", "title": "" }, { "docid": "de5a04d9390e1ee41ecbdfc88ea14c14", "score": "0.58721626", "text": "function updateUser($user)\n{\n global $mysqli;\n\n $userId = $_SESSION['userId'];\n $status = 1;\n \n $endDate = $user['enddate']; // Update the end date\n $endMonth = substr($endDate, 5,2);\n $endYear = substr($endDate, 0, 4);\n $endMonth +=3;\n if ($endMonth > 12) {\n $endMonth -= 12;\n $endYear += 1;\n }\n \n $newEnd = sprintf(\"%4d-%02d\", $endYear, $endMonth);\n echo \"New $newEnd<br>\";\n \n $sql = \"UPDATE users SET status=1, enddate='$newEnd' WHERE id=$userId\";\n $errTxt = \"There was a problem updating your record: $sql \"\n . \"Please pass this message to admin\";\n $mysqli->query ($sql)\n or die($errTxt);\n}", "title": "" }, { "docid": "3e4aaefce57f85830b9a4c175951dea6", "score": "0.5872143", "text": "public function processUpdate ( ) {\n\n\n\t}", "title": "" }, { "docid": "d175798a8e9ca96e12d0cca45020862d", "score": "0.586693", "text": "public function updating(User $user)\n {\n }", "title": "" }, { "docid": "689922092d5038b79b72e4230de90e4d", "score": "0.5865801", "text": "public function testUpdateUser(){\n\t\t//update user correctly\n\t\t$this->firstUser->setUserId(55);\n\t\t$this->firstUser->setMail(\"kjersti@hei.no\");\n\t\t$this->firstUser->setAgeGroup(1);\n\t\t$this->firstUser->setGender(1);\n\t\t$this->firstUser->setLocation(0);\n\t\t//$this->firstUser->setCategoryPrefs(\"\");\n\t\t$this->db->updateUserInfo($this->firstUser);\n\n\t\t//check if user is updated correctly\n\t\t$this->assertTrue($this->firstUser->getUserId() == 55);\n\t\t$this->assertTrue($this->firstUser->getMail() == \"kjersti@hei.no\");\n\t\t$this->assertTrue($this->firstUser->getGender() == 1);\n\t\t$this->assertTrue($this->firstUser->getAgeGroup() == 1);\n\t\t$this->assertTrue($this->firstUser->getCategoryPrefs() == \"\");\n//\t\t$this->assertTrue($newUser->get() = \"\");\n\n\t\t//update user incorrectly\n\t\t$this->secondUser->setUserId(50);\n\t\t$this->secondUser->setMail(\"feilformat\");\n\t\t$this->secondUser->setAgeGroup(60);\n\t\t$this->secondUser->setGender(\"\");\n\t\t$this->secondUser->setLocation(0);\n\t\t//$this->secondUser->setCategoryPrefs(\"litterature\");\n\t\t$this->db->updateUserInfo($this->secondUser);\n\n\n\t\t//check if user is updated or what message is revealed\n\t\t$this->assertFalse($this->secondUser->getUserId() == 55);\n\t\t$this->assertFalse($this->secondUser->getMail() == \"feilformat\");\n\t\t$this->assertFalse($this->secondUser->getAgeGroup() == \"\");\n\t\t$this->assertFalse($this->secondUser->getGender() == 60);\n\t\t$this->assertFalse($this->secondUser->getCategoryPrefs() == \"litterature\");\n\n\t}", "title": "" }, { "docid": "fb4a0114a763209e6e8b30791c6df626", "score": "0.585527", "text": "public function deactivate() {\n\n $user = User::find(Input::get('id'));\n\n if(is_null($user)) {\n return '{\"status\":\"error\",\"message\":\"El usuario no existe\"}';\n }\n\n if(Auth::user()->user_type_id != 4) {\n return '{\"status\":\"error\",\"message\":\"Usted no tiene permisos para modificar este usuario\"}';\n }\n\n $user->status = 0;\n $user->save();\n\n return '{\"status\":\"success\",\"message\":\"El usuario ha sido de baja exitosamente\"}';\n\n }", "title": "" }, { "docid": "14f5b241e773fbec82cc537196f9f663", "score": "0.58502924", "text": "function ding_message_update_form_submit($form, &$form_state) {\n $accounts[] = $form_state['values']['ding_message_update_uid'];\n $reset = $form_state['values']['reset_user'];\n ding_message_update_users($accounts, TRUE, $reset);\n drupal_set_message(t('User updated'));\n}", "title": "" }, { "docid": "4da16559e4c394668e70a5a1ea33aa52", "score": "0.58442515", "text": "public function updateProfile()\n {\n if (!empty($_POST['username'])) {\n if ($_POST['action'] == 'update') {\n if (!empty($_POST['password'])) {\n # updates username and password\n App::get('database')->update(\n 'users',\n [\n 'username' => $_POST['username'],\n 'password' => md5($_POST['password'])\n ],\n [\n 'userId' => $_SESSION['attributes']['userId']\n ]\n );\n } else {\n # updates username\n App::get('database')->update(\n 'users',\n [\n 'username' => $_POST['username'],\n ],\n [\n 'userId' => $_SESSION['attributes']['userId']\n ]\n );\n }\n $this->redirect('/account/profile', 'Account has been Updated!', true);\n } else {\n # soft deletes user\n App::get('database')->update(\n 'users',\n [\n 'deleted' => 1\n ],\n [\n 'userId' => $_SESSION['attributes']['userId']\n ]\n );\n $_SESSION['attributes']['deleted'] = 1;\n $this->redirect('/logout-user');\n }\n }\n $this->redirect('/account', 'Something went Wrong');\n }", "title": "" }, { "docid": "81cb44be52f04902242bda184679891e", "score": "0.58366144", "text": "public function actionUpdate()\r\n\t{\r\n \r\n\t\t//call user to init session\r\n\t\tYii::app()->user->isGuest;\r\n\t\t\r\n\t\techo json_encode(array('success'=>'Yes'));\r\n Yii::app()->end();\r\n\t}", "title": "" }, { "docid": "d13d15bdee1d923b822c836817b56f1a", "score": "0.5835152", "text": "public function afterUpdate()\n {\n if($this->canSendWebhook()){\n $this->sendToWebhook($this->updateEventName);\n }\n }", "title": "" }, { "docid": "996b213f9a5fa626e45fd08732efb3be", "score": "0.58265686", "text": "public function save() {\n\t\t$conn = WiscaDB::get();\n\t\tif ($this->newpassword) {\n\t\t\t$result = $conn->query(\"update Users set encpass = ? where guid = ?\", array(md5($this->newpassword), $this->guid));\n\t\t}\n\t\t$deleted = ($this->deleted ? date(\"Y-m-d H:i:s\") : null);\n\t\t$result = $conn->query(\"update Users set name = ?, email = ?, member = ?, admin = ?, deleted = ?, modified = NOW(), affiliation = ? where guid = ?\", array($this->name, $this->email, $this->member, $this->admin, $deleted, $this->affiliation, $this->guid));\n\t\t$conn->disconnect();\n\t}", "title": "" }, { "docid": "ec32d1b563fed7bc9c947f6709854184", "score": "0.5825928", "text": "function evoting_user_complete($course, $user, $mod, $evoting)\n{\n}", "title": "" }, { "docid": "18d0d14ee0a078a6a075b9d47d3d6961", "score": "0.58249754", "text": "public function user_module_update()\r\n\t{\r\n\t\tif ( ! isset($_POST['run_update']) OR $_POST['run_update'] != 'y')\r\n\t\t{\r\n\t\t\t$this->add_crumb(lang('update_user_module'));\r\n\t\t\t$this->cached_vars['form_url'] = $this->base.'&method=user_module_update';\r\n\t\t\treturn $this->ee_cp_view('update_module.html');\r\n\t\t}\r\n\r\n\t\trequire_once $this->addon_path.'upd.user.php';\r\n\r\n\t\t$U = new User_upd();\r\n\r\n\t\tif ($U->update() !== TRUE)\r\n\t\t{\r\n\t\t\treturn $this->index(lang('update_failure'));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->index(lang('update_successful'));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5d118aa2552c3790294a16f945a75272", "score": "0.5817182", "text": "public function ProfileController_EditMyAccountAfter_Handler($Sender) {\n // Get logged in user\n $Session = Gdn::Session();\n $UserName = $Session->User->Name;\n $UserID = $Session->UserID;\n\n // Create UserModel to get access to GetMeta and SetMeta\n $UserModel = Gdn::UserModel();\n // Get alias list\n $UserMeta = $UserModel->GetMeta($UserID, 'Alias');\n $UserAlias = $UserMeta['Alias'];\n $OldAliasList = unserialize($UserAlias);\n $NewAliasList = $OldAliasList;\n // Append current user\n $NewAliasList[] = $UserName;\n // Clear duplicates\n $NewAliasList = array_unique($NewAliasList);\n // Write back info only if is has been modified\n if($NewAliasList != $OldAliasList) {\n $UserModel->SetMeta($UserID, array('Alias' => serialize($NewAliasList)));\n }\n }", "title": "" }, { "docid": "79e9dc8fb2ef603b6e8ddb62896f2f2e", "score": "0.58056974", "text": "public function instructor_finish($id){\n\t\tif(!isset($_SESSION['user'])||$_SESSION['user']['type']!=1){redirect(\"course/index\");}\n\n\t\t$course = course_model::get($id);\n\t\tif($course->instructor_id!=$_SESSION['user']['id']){redirect(\"course/index\");}\n\n\t\t$course->finished=1;\n\t\t$course->update();\n\n\t\tredirect(\"user/classroom\");\n\n\t}", "title": "" }, { "docid": "1a3024a856a2f9fab732a113c55833da", "score": "0.5803163", "text": "public function update()\n {\n if ($_SESSION['user']['id'] != WorkhoursModel::getOneById($_REQUEST['row_id'])->user_id) {\n echo \"Je bent niet gemachtigd.\";\n } else {\n WorkhoursModel::update($_REQUEST['row_id'], $_POST);\n\n redirect(\"dashboard/files/show?file_id={$_REQUEST['file_id']}\");\n }\n }", "title": "" }, { "docid": "3b23b87b575a3afd55a3d5cb164e19e2", "score": "0.57970923", "text": "public function user_update(){ \n \t\t\n \t\tinclude(\"../../config/DB_Connect.php\");\n \t\tinclude '../../config/functions.php';\n\n \t\tif (!check_email_address($_POST['userEMailAddress'])){\n \t\treturn 405;\n \t\t}\n\n\t\t\t\n \t\tmysql_query(\"UPDATE tbl_user SET userFirstName = '\".$this->userFirstName.\"', userLastName = '\".$this->userLastName.\"', userEMailAddress = '\".$this->userEMailAddress.\"', userPhoneNumber = '\".$this->userPhoneNumber.\"', userAccountStatus = '\".$this->userAccountStatus.\"', userRole = '\".$this->userRole.\"' WHERE userID = '\".$this->userID.\"'\")or die(mysql_error());\n \t\treturn 701;\n \t\t\n \t\t\n \t\t\t\n\t}", "title": "" }, { "docid": "0df6e3af02362cf74e1bb05143bceca9", "score": "0.57933027", "text": "function sendCompleteUpdate()\n {\n $messageprops = mapi_getprops($this->message, array($this->props['taskstate']));\n\n if(!isset($messageprops[$this->props['taskstate']]) || $messageprops[$this->props['taskstate']] != tdsOWN) {\n return false; // Can only decline assignee task\n }\n\n mapi_setprops($this->message, array($this->props['complete'] => true,\n $this->props['datecompleted'] => time(),\n $this->props['status'] => 2,\n $this->props['percent_complete'] => 1));\n\n $this->doUpdate();\n }", "title": "" }, { "docid": "7ba1de16f0d8dfe02423a6b81b74fe13", "score": "0.57917976", "text": "public function update()\n {\n $db = Database::connect();\n $sql = \"UPDATE tbluser set uUsername = ?, uFirstname = ?, uLastname = ?, uEmail = ?, uHashedPw = ? where uID = ?\";\n $stmt = $db->prepare($sql);\n $stmt->execute(array($this->username, $this->firstName, $this->lastName, $this->email, $this->hashedPwd, $this->id));\n Database::disconnect();\n\n }", "title": "" }, { "docid": "66c8eee668db3a3ecf0db17f4a2ac919", "score": "0.57858205", "text": "public function testUpdateUserTemplate()\n {\n }", "title": "" }, { "docid": "6aa14af72c51a7fbbf55341adedf0e8e", "score": "0.5785049", "text": "public function canUpdateUser();", "title": "" }, { "docid": "a9b60ddeb59f24b0ff3ad28acddabdf7", "score": "0.57838386", "text": "function update_user($address = \"\", $message = \"redirecting\", $time = 2){\n\t\tglobal $base_url;\n\t\texit(\"<center><h2>{$message}<meta http-equiv=\\\"refresh\\\" content=\\\"{$time};URL='{$base_url}{$address}'\\\" /></h2></center>\");\n\t}", "title": "" }, { "docid": "336e88768a49309e2dbbf5ce644bf72a", "score": "0.57754207", "text": "public function update()\n {\n $user = UserService::load(\\Auth::user()->id)->update(\\Request::all());\n \\Msg::success('Your profile has been <strong>updated</strong>');\n return redir('account/profile');\n }", "title": "" }, { "docid": "13c6a94b27beaea450551d457f4fbac1", "score": "0.57727915", "text": "public function updateutenteAction () {\n \n }", "title": "" }, { "docid": "c56a1da1e3807bae52e94b5583269c3c", "score": "0.57680935", "text": "public function updated(AppUser $appUser)\n {\n //\n }", "title": "" }, { "docid": "d58144e7cceac4970f47e265a45920d5", "score": "0.5767672", "text": "public function userUpdate(){\r\n\r\n\t\tif(isset($_POST['submit'])){\r\n\r\n\t\t\t$this->data = $_POST;\r\n\t\t\r\n\t\t\tself::validate($this->data);\r\n\r\n\r\n\r\n\t\t\tif(!isset($_SESSION['error'])){\r\n\t\t\r\n\t\t\t$this->obj = new Crud1();\r\n\r\n\t\t// update Data through Model \r\n\r\n\t\t\t$result = $this->obj->update_data(\"UPDATE users SET username = ?, password = ?, \r\n\t\t\t\temail= ? where id = ? \", $this->data) ;\r\n\r\n\t\t\treturn $result;\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "c0ef1ff84049ff2c42508848a7042d8c", "score": "0.57613647", "text": "public function actionResendChange() {\n /** @var \\common\\modules\\user\\models\\User $user */\n /** @var \\common\\modules\\user\\models\\UserKey $userKey */\n // find userKey of type email change\n $user = Yii::$app->user->identity;\n $userKey = Yii::$app->getModule(\"user\")->model(\"UserKey\");\n $userKey = $userKey::findActiveByUser($user->id, $userKey::TYPE_EMAIL_CHANGE);\n if ($userKey) {\n\n // send email and set flash message\n $user->sendEmailConfirmation($userKey);\n Yii::$app->session->setFlash(\"Resend-success\", Yii::t(\"user\", \"Confirmation email resent\"));\n }\n\n // redirect to account page\n return $this->redirect([\"/user/account\"]);\n }", "title": "" }, { "docid": "025002ecf2760f8348fe5701dad1c359", "score": "0.5760914", "text": "function doUpdate() {\n $messageProps = mapi_getprops($this->message, array($this->props['taskstate'], PR_SUBJECT));\n\n if(!isset($messageProps[$this->props['taskstate']]) || $messageProps[$this->props['taskstate']] != tdsOWN) {\n return false; // Can only update assignee task\n }\n\n $this->setLastUser();\n $this->updateTaskRequest();\n\n // Set as updated\n mapi_setprops($this->message, array($this->props['taskhistory'] => thUpdated));\n\n mapi_savechanges($this->message);\n\n $props = mapi_getprops($this->message, array($this->props['taskupdates'], $this->props['tasksoc'], $this->props['recurring'], $this->props['complete']));\n if (!$props[$this->props['complete']] && $props[$this->props['taskupdates']] && !(isset($props[$this->props['recurring']]) && $props[$this->props['recurring']])) {\n $this->sendResponse(tdmtTaskUpd, _(\"Task Updated:\") . \" \");\n } else if($props[$this->props['complete']]) {\n $this->sendResponse(tdmtTaskUpd, _(\"Task Completed:\") . \" \");\n }\n }", "title": "" }, { "docid": "42dd97240086b482bce92cb9561348fc", "score": "0.57593995", "text": "public function complete_login()\n\t{\n\n\t}", "title": "" }, { "docid": "a9beda123fb09fd553eda8a2f0f59e7e", "score": "0.57512164", "text": "public function testUpdateCloudUser()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "b760ab21de2c902222c7c4103779b456", "score": "0.57478476", "text": "function updateUser()\n{\n $updateUserGateway = new UserGateway();\n $id = $_POST['userID'];\n $updateUser = $updateUserGateway->rowDataQueryByID($id);\n $updateUser['FirstName'] = $_POST['FirstName'];\n $updateUser['LastName'] = $_POST['LastName'];\n $updateUser['UserName'] = $_POST['UserName'];\n if ($_POST['IsAdmin'])\n $updateUser['IsAdmin'] = 1;\n else\n $updateUser['IsAdmin'] = 0;\n unset($_POST['update']);\n\n if (!$updateUserGateway->updateRow($updateUser))\n {\n echo \"<p>Error updating user!</p>\";\n } else\n {\n header(\"Location: http://webprog.cs.ship.edu/webprog25/admin/showUsers.php\");\n }\n}", "title": "" }, { "docid": "db3c97438a10fe92c8124e12a807da6a", "score": "0.5741624", "text": "protected function end()\n {\n }", "title": "" }, { "docid": "e34069d361f3c3f7ea85b6166c5f7424", "score": "0.57381195", "text": "public function update($user);", "title": "" }, { "docid": "a638c0248fd686b34e0ae9e3a200e874", "score": "0.57380074", "text": "public function actualizar(){\r\n\t\t\t$user_table = Config::get()->db_user_table;\r\n\t\t\t$consulta = \"UPDATE $user_table\r\n\t\t\t\t\t\t\t SET password='$this->password', \r\n\t\t\t\t\t\t\t \t\tnombre='$this->nombre', \r\n\t\t\t\t\t\t\t \t\temail='$this->email', \r\n\t\t\t\t\t\t\t \t\timagen='$this->imagen'\r\n\t\t\t\t\t\t\t WHERE user='$this->user';\";\r\n\t\t\treturn Database::get()->query($consulta);\r\n\t\t}", "title": "" }, { "docid": "da61983151a03e79b2c7a2ff14e80c7a", "score": "0.572808", "text": "public function updateUser() {\n $db = init_db();\n $req = $db->prepare( \"UPDATE user SET email = :email, password = :password WHERE id = :id;\" );\n $req->execute( array(\n 'email' => $this->getEmail(),\n 'password' => hash('sha256', $this->getPassword()),\n 'id' => $this->getId()\n ));\n // Close databse connection\n $db = null;\n }", "title": "" }, { "docid": "8e08535586c715a695f8ec39aa73f447", "score": "0.5710375", "text": "public function deactivate_user() {\n $data = array(\n 'status' => 'old',\n );\n $result = $this->db->update('fejiro_users', $data, array('user_id' => $_POST['edit_user_id']));\n if ($this->db->affected_rows()) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "d1ddabcc3428a4b33aaee51c6be2f276", "score": "0.5703403", "text": "public function handle()\n {\n DB::table('v2_user')->update([\n 'u' => 0,\n 'd' => 0\n ]);\n }", "title": "" }, { "docid": "b8b39ff22b1b069d3d7eac245254499d", "score": "0.56984967", "text": "public static function update_user(){\n $idUser = $_POST['idUsuario'];\n $username = $_POST['Username'];\n $password = md5($_POST['password']);\n $nombres = $_POST['Nombres'];\n $apellidos = $_POST['Apellidos'];\n $direccion = $_POST['Direccion'];\n $telefono = $_POST['Telefono'];\n $email = $_POST['Email'];\n $sql = mysql_query(\"UPDATE users SET username='$username',password='$password',nombres='$nombres',apellidos='$apellidos',direccion='$direccion',telefono='$telefono', email='$email' WHERE id= $idUser\");\n if($sql){\n echo 2;\n }\n else if(!$sql){\n echo 'No se actualizo tus datos, usuario o email le pertenece a otro.';\n }\n }", "title": "" } ]
6b1c00f9b7b2263fa3dc2534aa03fec3
funcao para atualizar campos
[ { "docid": "dd070a484ceacd6c01dd7b3af0297532", "score": "0.0", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed281_i_codigo = ($this->ed281_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed281_i_codigo\"]:$this->ed281_i_codigo);\n $this->ed281_i_procresultado = ($this->ed281_i_procresultado == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed281_i_procresultado\"]:$this->ed281_i_procresultado);\n $this->ed281_i_alternativa = ($this->ed281_i_alternativa == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed281_i_alternativa\"]:$this->ed281_i_alternativa);\n }else{\n $this->ed281_i_codigo = ($this->ed281_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed281_i_codigo\"]:$this->ed281_i_codigo);\n }\n }", "title": "" } ]
[ { "docid": "ca925ebbf22d5e7c96c8920895cc16ee", "score": "0.6797833", "text": "function Atualizar()\n\t\t{\n\t\t\t$sql = \"update carrinho_cupom set\n\t\t\t\t\tcupom_titulo = ?,cupom_desconto = ?\n\t\t\t\t\twhere cupom_id = ?\";\n\n\t\t\t//executando o comando sql e passando os valores\n\t\t\t$this->con->prepare($sql)->execute(array(\n\t\t\t$this->cupom_titulo,$this->cupom_desconto,\n\t\t\t$this->cupom_id));\n\t\t}", "title": "" }, { "docid": "6e809ed92986c49ff59a2e8e5c958d5a", "score": "0.6745527", "text": "private function camposObligatorios()\n {\n/*\n $this->setRequiredField(\"usuario\");\n*/\n\n return;\n }", "title": "" }, { "docid": "600e605d6c3ae5e2b6411153c230ef19", "score": "0.6424631", "text": "private function resetInputFields(){\n $this->adresse = '';\n $this->ascs_id = '';\n $this->admins_id = Auth::user()->id;\n $this->pointdevente_id = '';\n }", "title": "" }, { "docid": "1154b7b722c3c9664df3524a30d55061", "score": "0.62418675", "text": "function Atualizar()\n\t\t{\n\t\t\t$sql = \"update carrinho_produtos set\n\t\t\t\t\tproduto_nome = ?,produto_preco = ?,produto_quantidade = ?,produto_img = ?\n\t\t\t\t\twhere produto_id = ?\";\n\n\t\t\t//executando o comando sql e passando os valores\n\t\t\t$this->con->prepare($sql)->execute(array(\n\t\t\t$this->produto_nome,$this->produto_preco,$this->produto_quantidade,$this->produto_img,\n\t\t\t$this->produto_id));\n\t\t}", "title": "" }, { "docid": "a3630bd0df58b525b17331c5031250f7", "score": "0.62109804", "text": "public function setPersonalData(){\n // Get data from form\n $pseudo = Input::get('pseudo');\n $avatar = Input::get('avatar_img');\n $birthday = Input::get('birthday');\n $gender = Input::get('gender');\n\n // Get authenticated user\n $user = AuthenticateController::getAuthUser();\n if ($user == null){\n return null;\n }\n\n // Update data in the database\n $user = User::find($user->id);\n $user->update(['pseudo' => $pseudo, 'avatar_img' => $avatar, 'birthday' => Utils::convertDate($birthday), 'gender' => $gender]);\n }", "title": "" }, { "docid": "79c78853b6f359c9d20068cf35a9c3fb", "score": "0.61960804", "text": "function Atualizar()\n\t\t{\n\t\t\t$sql = \"update aplicativo set\n\t\t\t\t\tnomeapp = ?,imgapp = ?,descricaoapp = ?,plataforma = ?\n\t\t\t\t\twhere codapp = ?\";\n\n\t\t\t//executando o comando sql e passando os valores\n\t\t\t$this->con->prepare($sql)->execute(array(\n\t\t\t$this->nomeapp,$this->imgapp,$this->descricaoapp,$this->plataforma,\n\t\t\t$this->codapp));\n\t\t}", "title": "" }, { "docid": "fd295e1002aad2bdcc9ec7bb26200316", "score": "0.6194223", "text": "private function camposObligatorios()\n {\n $this->setRequiredField(\"tabla14_campo2\");\n\n return;\n }", "title": "" }, { "docid": "7b4544533a7c63dacb87ca4bf17105b0", "score": "0.61560076", "text": "public static function SetterValidData() {\n\t}", "title": "" }, { "docid": "22c9bd360eeb868185a06ec245ba8ae5", "score": "0.61256635", "text": "function campo_put() {\n\n\t\tif(!$this->put('campo') || !$this->put('valor')) {\n\t\t\t$this->response('', 400);\n\t\t\treturn;\n\t\t}\n\n\t\t$this->load->model('api/configuracion_model', 'configModel');\n\n\t\t$this->configModel->setData(\t\t\t \n\t\t\tarray(\"valor\" => $this->put('valor')),\n\t\t\tarray(\"campo\" => $this->put('campo'))\n\t\t);\n\n\t\t$this->response('', 200);\n\n\t}", "title": "" }, { "docid": "9be2dba6e3512a4a8a5ac9620a8d80f0", "score": "0.6060578", "text": "public function set(){\n\n // canary\n if(empty($this->is_modified)){ return false; }//if\n \n $db = $this->getDb();\n $this->_set();\n $this->field_map = $db->set($this->getTable(), $this->getFields());\n $this->is_modified = false;\n return true;\n \n }", "title": "" }, { "docid": "779beec467a1ed097c2c860a6d58b8e6", "score": "0.60218304", "text": "function set_fields($action='update')\n {\n $this->db->set('iso', $this->iso);\n $this->db->set('iso3', $this->iso3);\n $this->db->set('name', $this->name);\n $this->db->set('nicename', $this->nicename);\n $this->db->set('nationality', $this->nationality);\n $this->db->set('numcode', $this->numcode);\n $this->db->set('phonecode', $this->phonecode);\n\n if($action=='insert'){\n $this->db->set('created', unix_to_human(now(), TRUE, 'eu'));\n }\n }", "title": "" }, { "docid": "e6307e841f6ff4e95ba2a89d6a0a2582", "score": "0.59798664", "text": "public function save()\n\t{\n\t\t$this->_prepare_attr();\n\t\tparent::save();\n\t}", "title": "" }, { "docid": "fcb0618a607d3d342061c88a75d89d17", "score": "0.5970063", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->la42_i_codigo = ($this->la42_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"la42_i_codigo\"]:$this->la42_i_codigo);\n $this->la42_i_exame = ($this->la42_i_exame == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"la42_i_exame\"]:$this->la42_i_exame);\n $this->la42_i_atributo = ($this->la42_i_atributo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"la42_i_atributo\"]:$this->la42_i_atributo);\n }else{\n $this->la42_i_codigo = ($this->la42_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"la42_i_codigo\"]:$this->la42_i_codigo);\n }\n }", "title": "" }, { "docid": "4f3ada8eeb700bf65e4123585bb3c5e7", "score": "0.59501785", "text": "public function applyDefaultValues()\n {\n $this->email = '';\n $this->password = '';\n $this->change_count = 0;\n $this->estado = 'ENABLED';\n }", "title": "" }, { "docid": "3d41396b7d31f6b4f8fcbab7c08e9cb3", "score": "0.59277356", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->idcampos = ($this->idcampos == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"idcampos\"]:$this->idcampos);\n $this->codmodelo = ($this->codmodelo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"codmodelo\"]:$this->codmodelo);\n $this->z01_nome = ($this->z01_nome == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"z01_nome\"]:$this->z01_nome);\n $this->z01_ender = ($this->z01_ender == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"z01_ender\"]:$this->z01_ender);\n $this->z01_munic = ($this->z01_munic == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"z01_munic\"]:$this->z01_munic);\n $this->z01_cep = ($this->z01_cep == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"z01_cep\"]:$this->z01_cep);\n $this->z01_uf = ($this->z01_uf == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"z01_uf\"]:$this->z01_uf);\n $this->z01_bairro = ($this->z01_bairro == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"z01_bairro\"]:$this->z01_bairro);\n $this->k00_codbco = ($this->k00_codbco == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_codbco\"]:$this->k00_codbco);\n $this->k00_codage = ($this->k00_codage == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_codage\"]:$this->k00_codage);\n $this->k00_txban = ($this->k00_txban == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_txban\"]:$this->k00_txban);\n $this->k00_rectx = ($this->k00_rectx == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_rectx\"]:$this->k00_rectx);\n $this->j34_setor = ($this->j34_setor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j34_setor\"]:$this->j34_setor);\n $this->j34_quadra = ($this->j34_quadra == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j34_quadra\"]:$this->j34_quadra);\n $this->j34_lote = ($this->j34_lote == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j34_lote\"]:$this->j34_lote);\n $this->j39_numero = ($this->j39_numero == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j39_numero\"]:$this->j39_numero);\n $this->j39_compl = ($this->j39_compl == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j39_compl\"]:$this->j39_compl);\n $this->j01_matric = ($this->j01_matric == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j01_matric\"]:$this->j01_matric);\n $this->q02_inscr = ($this->q02_inscr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_inscr\"]:$this->q02_inscr);\n $this->k15_local = ($this->k15_local == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k15_local\"]:$this->k15_local);\n $this->k15_aceite = ($this->k15_aceite == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k15_aceite\"]:$this->k15_aceite);\n $this->k15_carte = ($this->k15_carte == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k15_carte\"]:$this->k15_carte);\n $this->k15_espec = ($this->k15_espec == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k15_espec\"]:$this->k15_espec);\n $this->k15_gerent = ($this->k15_gerent == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k15_gerent\"]:$this->k15_gerent);\n $this->k15_ageced = ($this->k15_ageced == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k15_ageced\"]:$this->k15_ageced);\n $this->k00_hist1 = ($this->k00_hist1 == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_hist1\"]:$this->k00_hist1);\n $this->k00_hist2 = ($this->k00_hist2 == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_hist2\"]:$this->k00_hist2);\n $this->k00_hist3 = ($this->k00_hist3 == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_hist3\"]:$this->k00_hist3);\n $this->k00_hist4 = ($this->k00_hist4 == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_hist4\"]:$this->k00_hist4);\n $this->k00_hist5 = ($this->k00_hist5 == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_hist5\"]:$this->k00_hist5);\n $this->k00_hist6 = ($this->k00_hist6 == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_hist6\"]:$this->k00_hist6);\n $this->k00_hist7 = ($this->k00_hist7 == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_hist7\"]:$this->k00_hist7);\n $this->k00_hist8 = ($this->k00_hist8 == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_hist8\"]:$this->k00_hist8);\n $this->linhadigitavel = ($this->linhadigitavel == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"linhadigitavel\"]:$this->linhadigitavel);\n $this->codigobarras = ($this->codigobarras == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"codigobarras\"]:$this->codigobarras);\n $this->vlrtotal = ($this->vlrtotal == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vlrtotal\"]:$this->vlrtotal);\n if($this->vencimento == \"\"){\n $this->vencimento_dia = ($this->vencimento_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vencimento_dia\"]:$this->vencimento_dia);\n $this->vencimento_mes = ($this->vencimento_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vencimento_mes\"]:$this->vencimento_mes);\n $this->vencimento_ano = ($this->vencimento_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vencimento_ano\"]:$this->vencimento_ano);\n if($this->vencimento_dia != \"\"){\n $this->vencimento = $this->vencimento_ano.\"-\".$this->vencimento_mes.\"-\".$this->vencimento_dia;\n }\n }\n $this->ip = ($this->ip == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ip\"]:$this->ip);\n $this->numpre = ($this->numpre == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"numpre\"]:$this->numpre);\n }else{\n }\n }", "title": "" }, { "docid": "47e9ef9436637c4790a618705a0e55d6", "score": "0.59148175", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setDl('');\n $this->setNombre_dl('');\n $this->setNumero_dl('');\n $this->setAbr_r('');\n $this->setNumero_r('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "59a62c37ee104e3336a8e518452c7a4b", "score": "0.5897458", "text": "function evt__formulario__modificacion($datos) {\n $datos['cuil_cuit']= str_replace(\"-\", \"\", $datos['cuil_cuit']);\n $this->dep('datos')->tabla($this->nombre_tabla)->set($datos);\n $this->dep('datos')->tabla($this->nombre_tabla)->sincronizar();\n $this->resetear();\n }", "title": "" }, { "docid": "6179279772f666e7dab54bf2f40d3c64", "score": "0.5886378", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->e16_empautoriza = ($this->e16_empautoriza == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e16_empautoriza\"]:$this->e16_empautoriza);\n $this->e16_inscricaopassivo = ($this->e16_inscricaopassivo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e16_inscricaopassivo\"]:$this->e16_inscricaopassivo);\n }else{\n }\n }", "title": "" }, { "docid": "4e2e1903cc7d76bf212df35e5690f158", "score": "0.58782697", "text": "function asignar_valores(){\n\t\t$this->dolar=$_POST['dolar'];\n\t\t$this->euro=$_POST['euro'];\n\t\t$this->correo=$_POST['correo'];\n\t\t$this->rif=$_POST['rif'];\n\t\t$this->empresa=$_POST['empresa'];\n\t\t$this->website=$_POST['website'];\n\t\t$this->descuento=$_POST['descuento'];\n\t\t$this->aumento=$_POST['aumento'];\n\t}", "title": "" }, { "docid": "977c76ce7ded36905bfe574bca90b418", "score": "0.58684236", "text": "private function resetInputFields(){\n $this->name = '';\n $this->note = '';\n $this->forename = '';\n $this->street = '';\n $this->code = '';\n $this->location = '';\n $this->school = '';\n $this->number = '';\n $this->phone = '';\n $this->email = '';\n }", "title": "" }, { "docid": "e228bce9cf56afa4839f0701809da65c", "score": "0.58613044", "text": "function save(){\n\t\tif($this->validate_obligatory()){\n\t\t\tif(isset($this->properties['id'])){\t\t\t\t\t\n\t\t\t\t$this->persistor->update($this->schema.'.'.$this->table(),$this->properties,'id='.$this->properties['id']);\t\t\n\t\t\t}else{\n\t\t\t\t$this->persistor->insert($this->schema.'.'.$this->table(),$this->properties);\n\t\t\t}\n\t\t}\t\t\t\n\t}", "title": "" }, { "docid": "6d97a53b147a9ab32b08ec5a7db3d1d5", "score": "0.58540815", "text": "function asignar_valores(){\n $this->nombre=$_POST['nombre'];\n $this->url=$_POST['url'];\n $this->fecha=$_POST['fecha'];\n $this->descripcion=$_POST['descripcion'];\n }", "title": "" }, { "docid": "e8b63ad70bf9889ccfc7c05cfce2ac36", "score": "0.5837313", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->j14_codigo = ($this->j14_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j14_codigo\"]:$this->j14_codigo);\n $this->j14_nome = ($this->j14_nome == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j14_nome\"]:$this->j14_nome);\n $this->j14_tipo = ($this->j14_tipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j14_tipo\"]:$this->j14_tipo);\n }else{\n $this->j14_codigo = ($this->j14_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j14_codigo\"]:$this->j14_codigo);\n }\n }", "title": "" }, { "docid": "296b3cb6e9741915a23c2ac776e4918c", "score": "0.5828286", "text": "public function beforeValidationOnUpdate()\n\t{\n\t\t$this->modified = date('Y-m-d H:i:s');\n\t}", "title": "" }, { "docid": "cd519082c42296de40e518656f9f1d76", "score": "0.58110714", "text": "private function _set_fields()\n\t{\n \n\t\t$this->form_data->cat_id = 0;\n $this->form_data->cat_parent = 0;\n\t\t$this->form_data->cat_name = '';\n\n $this->form_data->filter_cat_name = '';\n\t\t$this->form_data->filter_search = '';\n\t}", "title": "" }, { "docid": "3b1aadb01ced8ff1ce9556fdb4a4ea1e", "score": "0.5801613", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->me21_i_codigo = ($this->me21_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me21_i_codigo\"]:$this->me21_i_codigo);\n $this->me21_i_cardapio = ($this->me21_i_cardapio == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me21_i_cardapio\"]:$this->me21_i_cardapio);\n $this->me21_i_tprefeicao = ($this->me21_i_tprefeicao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me21_i_tprefeicao\"]:$this->me21_i_tprefeicao);\n }else{\n $this->me21_i_codigo = ($this->me21_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me21_i_codigo\"]:$this->me21_i_codigo);\n }\n }", "title": "" }, { "docid": "e766e8b432963fce8aa905250f7f4526", "score": "0.5796694", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->sd91_codigo = ($this->sd91_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd91_codigo\"]:$this->sd91_codigo);\n $this->sd91_unidades = ($this->sd91_unidades == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd91_unidades\"]:$this->sd91_unidades);\n $this->sd91_descricao = ($this->sd91_descricao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd91_descricao\"]:$this->sd91_descricao);\n $this->sd91_local = ($this->sd91_local == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd91_local\"]:$this->sd91_local);\n }else{\n $this->sd91_codigo = ($this->sd91_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd91_codigo\"]:$this->sd91_codigo);\n }\n }", "title": "" }, { "docid": "8005330a0d58c830df223920132291a3", "score": "0.5790816", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->validado = false;\n\t\t$this->numero = 0;\n\t}", "title": "" }, { "docid": "24d91747cbc7cfdb9974f0e9d31ae52d", "score": "0.57732797", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_nom('');\n $this->setId_zona('');\n $this->setPropia('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "b717db9d60dc3fc6240965797edb211f", "score": "0.57704246", "text": "private function resetInputFields(){\n $this->name = '';\n $this->phone = '';\n }", "title": "" }, { "docid": "8f551447aa0b50599a3e9e921a082907", "score": "0.5761518", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->me36_i_codigo = ($this->me36_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me36_i_codigo\"]:$this->me36_i_codigo);\n $this->me36_i_matmater = ($this->me36_i_matmater == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me36_i_matmater\"]:$this->me36_i_matmater);\n $this->me36_i_alimento = ($this->me36_i_alimento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me36_i_alimento\"]:$this->me36_i_alimento);\n }else{\n $this->me36_i_codigo = ($this->me36_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me36_i_codigo\"]:$this->me36_i_codigo);\n }\n }", "title": "" }, { "docid": "59f7a0de2b5b0de0b2c14f995376e50e", "score": "0.5761167", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_grupmenu('');\n $this->setGrup_menu('');\n $this->setOrden('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "354f6280b8264c0f6d61a49df1c4231b", "score": "0.5737368", "text": "private function resetInputFields(){\n $this->title = '';\n $this->description = '';\n $this->todo_id = '';\n }", "title": "" }, { "docid": "dc6c56a157674de8368d710563c3bb49", "score": "0.5721584", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ve72_codigo = ($this->ve72_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve72_codigo\"]:$this->ve72_codigo);\n $this->ve72_veicabastposto = ($this->ve72_veicabastposto == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve72_veicabastposto\"]:$this->ve72_veicabastposto);\n $this->ve72_empnota = ($this->ve72_empnota == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve72_empnota\"]:$this->ve72_empnota);\n }else{\n $this->ve72_codigo = ($this->ve72_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve72_codigo\"]:$this->ve72_codigo);\n }\n }", "title": "" }, { "docid": "052a31b87b272c0c91ba4f841291e920", "score": "0.5716247", "text": "protected function before_save() {\n $this->impuesto = filter_var($this->impuesto, FILTER_SANITIZE_STRING);\n $this->codigo_numerico = filter_var($this->codigo_numerico, FILTER_SANITIZE_STRING);\n $this->tipo_impuesto = strtoupper($this->tipo_impuesto);\n $this->valor_retencion = Filter::get($this->valor_retencion, 'numeric');\n }", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.57137454", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.57137454", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.57137454", "text": "public static function setters();", "title": "" }, { "docid": "9c8dc9417ecc1da9a8b55b88b020cd47", "score": "0.570281", "text": "public function getParamsSave(){\n\t\t// z formularza edycji\n\t\t$this->form->id = getFromRequest('id');\n\t\t$this->form->name = getFromRequest('name');\n\t\t$this->form->surname = getFromRequest('surname');\n\t\t$this->form->birthdate = getFromRequest('birthdate');\n\t}", "title": "" }, { "docid": "872a44f7898055e7467b01100f3765bc", "score": "0.56951404", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->d64_codigo = ($this->d64_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d64_codigo\"]:$this->d64_codigo);\n $this->d64_ip = ($this->d64_ip == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d64_ip\"]:$this->d64_ip);\n }else{\n $this->d64_codigo = ($this->d64_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d64_codigo\"]:$this->d64_codigo);\n }\n }", "title": "" }, { "docid": "1e155c95e173510a94e9761a02060e8a", "score": "0.5682156", "text": "public function setAttributes($param, $safeOnly = true) {\n /*** Persona ***/\n parent::setAttributes($param);\n \n /*Fecha Nacimiento*/\n if(isset($param['fecha_nacimiento']) && !empty($param['fecha_nacimiento'])){\n $this->fecha_nacimiento = Yii::$app->formatter->asDate($param['fecha_nacimiento'], 'php:Y-m-d');\n } \n \n }", "title": "" }, { "docid": "e08db3d607a6c68f5c3ac4c7be2209e0", "score": "0.5658744", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->me34_i_codigo = ($this->me34_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me34_i_codigo\"]:$this->me34_i_codigo);\n $this->me34_i_restricao = ($this->me34_i_restricao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me34_i_restricao\"]:$this->me34_i_restricao);\n $this->me34_i_intolerancia = ($this->me34_i_intolerancia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me34_i_intolerancia\"]:$this->me34_i_intolerancia);\n }else{\n $this->me34_i_codigo = ($this->me34_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me34_i_codigo\"]:$this->me34_i_codigo);\n }\n }", "title": "" }, { "docid": "7749482fe810a247576930f1250dcf7b", "score": "0.56577975", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->fa04_i_codigo = ($this->fa04_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_i_codigo\"]:$this->fa04_i_codigo);\n $this->fa04_c_numeroreceita = ($this->fa04_c_numeroreceita == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_c_numeroreceita\"]:$this->fa04_c_numeroreceita);\n if($this->fa04_d_dtvalidade == \"\"){\n $this->fa04_d_dtvalidade_dia = ($this->fa04_d_dtvalidade_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_d_dtvalidade_dia\"]:$this->fa04_d_dtvalidade_dia);\n $this->fa04_d_dtvalidade_mes = ($this->fa04_d_dtvalidade_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_d_dtvalidade_mes\"]:$this->fa04_d_dtvalidade_mes);\n $this->fa04_d_dtvalidade_ano = ($this->fa04_d_dtvalidade_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_d_dtvalidade_ano\"]:$this->fa04_d_dtvalidade_ano);\n if($this->fa04_d_dtvalidade_dia != \"\"){\n $this->fa04_d_dtvalidade = $this->fa04_d_dtvalidade_ano.\"-\".$this->fa04_d_dtvalidade_mes.\"-\".$this->fa04_d_dtvalidade_dia;\n }\n }\n $this->fa04_i_unidades = ($this->fa04_i_unidades == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_i_unidades\"]:$this->fa04_i_unidades);\n $this->fa04_i_cgsund = ($this->fa04_i_cgsund == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_i_cgsund\"]:$this->fa04_i_cgsund);\n $this->fa04_i_tiporeceita = ($this->fa04_i_tiporeceita == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_i_tiporeceita\"]:$this->fa04_i_tiporeceita);\n $this->fa04_i_dbusuario = ($this->fa04_i_dbusuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_i_dbusuario\"]:$this->fa04_i_dbusuario);\n if($this->fa04_d_data == \"\"){\n $this->fa04_d_data_dia = ($this->fa04_d_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_d_data_dia\"]:$this->fa04_d_data_dia);\n $this->fa04_d_data_mes = ($this->fa04_d_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_d_data_mes\"]:$this->fa04_d_data_mes);\n $this->fa04_d_data_ano = ($this->fa04_d_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_d_data_ano\"]:$this->fa04_d_data_ano);\n if($this->fa04_d_data_dia != \"\"){\n $this->fa04_d_data = $this->fa04_d_data_ano.\"-\".$this->fa04_d_data_mes.\"-\".$this->fa04_d_data_dia;\n }\n }\n $this->fa04_i_profissional = ($this->fa04_i_profissional == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_i_profissional\"]:$this->fa04_i_profissional);\n \n }else{\n $this->fa04_i_codigo = ($this->fa04_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"fa04_i_codigo\"]:$this->fa04_i_codigo);\n }\n }", "title": "" }, { "docid": "abf172e9d727b84294ecd213f6cd9fd1", "score": "0.5649768", "text": "public function saveFields(){\n foreach($this->dataHandler->getFillable() as $field){\n\t if(isset($_POST[$field->getBaseName()])){\n\t update_option($name = ($this->prefix . $field->getBaseName()), apply_filters('wd-page-field-save-' . $name, $_POST[$field->getBaseName()]));\n\t }\n }\n\t}", "title": "" }, { "docid": "1dd059181a5355ebc31983cc290a8591", "score": "0.5645554", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->tf10_i_codigo = ($this->tf10_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf10_i_codigo\"]:$this->tf10_i_codigo);\n $this->tf10_i_prestadora = ($this->tf10_i_prestadora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf10_i_prestadora\"]:$this->tf10_i_prestadora);\n $this->tf10_i_centralagend = ($this->tf10_i_centralagend == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf10_i_centralagend\"]:$this->tf10_i_centralagend);\n if($this->tf10_d_validadeini == \"\"){\n $this->tf10_d_validadeini_dia = ($this->tf10_d_validadeini_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf10_d_validadeini_dia\"]:$this->tf10_d_validadeini_dia);\n $this->tf10_d_validadeini_mes = ($this->tf10_d_validadeini_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf10_d_validadeini_mes\"]:$this->tf10_d_validadeini_mes);\n $this->tf10_d_validadeini_ano = ($this->tf10_d_validadeini_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf10_d_validadeini_ano\"]:$this->tf10_d_validadeini_ano);\n if($this->tf10_d_validadeini_dia != \"\"){\n $this->tf10_d_validadeini = $this->tf10_d_validadeini_ano.\"-\".$this->tf10_d_validadeini_mes.\"-\".$this->tf10_d_validadeini_dia;\n }\n }\n if($this->tf10_d_validadefim == \"\"){\n $this->tf10_d_validadefim_dia = ($this->tf10_d_validadefim_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf10_d_validadefim_dia\"]:$this->tf10_d_validadefim_dia);\n $this->tf10_d_validadefim_mes = ($this->tf10_d_validadefim_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf10_d_validadefim_mes\"]:$this->tf10_d_validadefim_mes);\n $this->tf10_d_validadefim_ano = ($this->tf10_d_validadefim_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf10_d_validadefim_ano\"]:$this->tf10_d_validadefim_ano);\n if($this->tf10_d_validadefim_dia != \"\"){\n $this->tf10_d_validadefim = $this->tf10_d_validadefim_ano.\"-\".$this->tf10_d_validadefim_mes.\"-\".$this->tf10_d_validadefim_dia;\n }\n }\n }else{\n $this->tf10_i_codigo = ($this->tf10_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf10_i_codigo\"]:$this->tf10_i_codigo);\n }\n }", "title": "" }, { "docid": "39120b8cb69a5571cecb09151abb5bcc", "score": "0.56452316", "text": "public function atualizar() {\n\n $campos = 'nome_usuario=:nome, telefone=:telefone, email_usuario=:email';\n $tipos = array('integer', 'text', 'text', 'text');\n $query = \"UPDATE {$this->tabelaDAO} SET {$campos} WHERE id_usuario=:id\";\n $objConexao = $this->getObjetoConexao();\n $statement = $objConexao->prepare( $query, $tipos, MDB2_PREPARE_MANIP );\n \n //Excecao de sistema no caso de uma falha ao se criar um 'prepared statement'\n if ( PEAR::isError( $statement ) ){\n throw new ExcecoesSistema( $statement->getUserInfo(), ExcecoesSistema::_CODIGO_EXCECAO_PREPARARQUERY_ );\n $statement->free();\n }\n \n //Array com os dados que serao inseridos\n $usuarioVO = $this->objetoCriterio;\n $dados = array( 'id' => $usuarioVO->getIdUsuario(),\n 'nome' => $usuarioVO->getNomeUsuario(), \n 'telefone' => $usuarioVO->getTelefoneUsuario(),\n 'email' => $usuarioVO->getEmailUsuario(),\n );\n \n //Executa a query preparada\n $rs = $statement->execute($dados);\n \n //Excecao de sistema no caso de uma falha de execucao de query\n if ( PEAR::isError( $rs ) ){\n throw new ExcecoesSistema( $rs->getUserInfo(), ExcecoesSistema::_CODIGO_EXCECAO_ERROQUERY_ );\n $statement->free();\n }\n \n return $rs;\n }", "title": "" }, { "docid": "adb1fb7ef5fe355dcc549df7d5d95741", "score": "0.5639589", "text": "protected function prepare_update_tableform() {\n\t\t\t$column_options = $this->get_column_options_from_request();\n\t\t\tif ( null !== $column_options ) {\n\t\t\t\t$this->wpda_table_design->tableform_column_options = $column_options;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c6a7a63799aad0cb4d55ae5f8f0e8ed8", "score": "0.5631649", "text": "public function beforeSave()\n {\n foreach ($this->attributes as $key => &$value) {\n if (in_array($key, $this->nullable)) {\n empty($value) and $value = null;\n }\n } \n }", "title": "" }, { "docid": "dae62689a010bcf6d996af359313ad03", "score": "0.5615409", "text": "public function editar(){\n\t\t$query = \"update usuario set nome = :nome, login = :login, tipo_usuario = :tipo_usuario, senha = :senha where idusuario = :idusuario\";\n\n\t\t$stmt = $this->db->prepare($query);\n\t\t\n\t\t$stmt->bindValue(':idusuario', $this->__get('id'));\n\t\t$stmt->bindValue(':nome', $this->__get('nome'));\n\t\t$stmt->bindValue(':login', $this->__get('login'));\n\t\t$stmt->bindValue(':senha', $this->__get('senha')); //md5() -> hash 32 caracteres\n\t\t$stmt->bindValue(':tipo_usuario', $this->__get('tipo_usuario'));\n\n\t\t$stmt->execute();\n\n\t}", "title": "" }, { "docid": "ab63d64dc965b3581452e6e26e895dbe", "score": "0.5610511", "text": "public function updateCrm() {\n if ($this->updateCrm) {\n $this->dirtyInCrm = \\WebsiteBundle\\Common\\Util\\DateTimeHelper::getNow();\n }\n }", "title": "" }, { "docid": "d1e91ce0375054297b1e95ac047168af", "score": "0.560494", "text": "public function actualizar() {\n global $bd;\n $propiedades = $this->propiedades();\n $prop_format = array();\n foreach ($propiedades as $propiedad => $valor) {\n array_push($prop_format, \"{$propiedad}='{$valor}'\");\n }\n $sql = 'UPDATE ' . static::$nombre_tabla . ' SET ';\n $sql .= implode(\",\", $prop_format);\n $sql .= \" WHERE id = \" . $bd->preparar_consulta($this->getId());\n $bd->query($sql);\n if ($bd->affected_rows() == 1) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "1e75d257463da21eae8847bac9ee8ba7", "score": "0.560266", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->pd01_sequencial = ($this->pd01_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pd01_sequencial\"]:$this->pd01_sequencial);\n $this->pd01_descricao = ($this->pd01_descricao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pd01_descricao\"]:$this->pd01_descricao);\n }else{\n $this->pd01_sequencial = ($this->pd01_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pd01_sequencial\"]:$this->pd01_sequencial);\n }\n }", "title": "" }, { "docid": "09a736a234b2d4969b174e89669967b1", "score": "0.56004137", "text": "public function applyDefaultValues()\n {\n $this->validate_method = 'LOCAL';\n }", "title": "" }, { "docid": "bb157d7413ac7f562e1bf6881c70e23c", "score": "0.560036", "text": "protected function preSave() {}", "title": "" }, { "docid": "23ad74f7882bce8d24d43631520eb748", "score": "0.55871826", "text": "protected function beforeValidate ()\n {\n // convert to storage format\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 $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n }elseif ($column->dbType == 'timestamp without time zone'){\n// JANGAN GUNAKAN YANG INI. FATAL BUGS ==> $this->$columnName = date('Y-m-d H:i:s', CDateTimeParser::parse($this->$columnName, Yii::app()->locale->dateFormat));\n $this->$columnName = $format->formatDateTimeForDb($this->$columnName);\n }\n }\n\n return parent::beforeValidate ();\n }", "title": "" }, { "docid": "a666ed0320d004a85ed9e2fa8eaf5cfc", "score": "0.5580675", "text": "public function beforeSave(){\n\t\tif($this[\"nombre\"] == '') $this->app->js()->univ()->alert('Ingrese un nombre para el empleado.')->execute();\n\t\t\n\t\t// Revisa que el email ingresado no exista.\n\t\t$model = $this->add('Model_Empleado');\n\t\t$model->addCondition(\"email\", $this['email']);\n\t\t$model->tryLoadAny();\n\t\t\n\t\tif($model->loaded() && $model['id'] != $this['id']) $this->app->js()->univ()->alert('El email ingresado ya existe.')->execute();\n\t\t\n\t\t// Revisa que el email tenga un @.\n\t\tif(!strpos($this['email'], '@')) $this->app->js()->univ()->alert('El email ingresado debe contener un signo \"@\".')->execute();\n\t\t\n\t\t// Revisa que el sueldo bruto sea > 0\n\t\tif($this[\"sueldo_bruto\"] <= 0) $this->app->js()->univ()->alert('El sueldo bruto debe ser mayor a 0.')->execute();\n\t\t\n\t\t// Revisa que se haya ingresado un cargo válido.\n\t\tif($this['cargo'] != 'Desarrollador' && $this['cargo'] != 'Administrador' && $this['cargo'] != 'Gerente')\n\t\t\t$this->app->js()->univ()->alert('El cargo ingresado no es correcto.')->execute();\n\t}", "title": "" }, { "docid": "821bcefb5a46d3a7839248d5156a87c0", "score": "0.5579748", "text": "protected abstract function prepareFields();", "title": "" }, { "docid": "4eb00284d409d7dd34a65b826de3c34c", "score": "0.5577525", "text": "public function beforeSave()\n\t{\n\t// $this->field = date(Yii::app()->params['datetodb'], strtotime($this->$field));\n\t\treturn parent::beforeSave();\n\t}", "title": "" }, { "docid": "4eb00284d409d7dd34a65b826de3c34c", "score": "0.5577525", "text": "public function beforeSave()\n\t{\n\t// $this->field = date(Yii::app()->params['datetodb'], strtotime($this->$field));\n\t\treturn parent::beforeSave();\n\t}", "title": "" }, { "docid": "3ebd1be240c13de56f8f2bbdd6fdab2c", "score": "0.55754197", "text": "private function set_data() {\n\t\t$this->id = $this->relationship_definition->get_slug() . '-' . $this->role;\n\t\t$this->value = '@' . $this->relationship_definition->get_slug() . '.' . $this->role;\n\t}", "title": "" }, { "docid": "46e0a544e8b2fcfae03fb5b29fabed09", "score": "0.55716294", "text": "public function atualizar(Request $request)\n {\n $lanche = Lanche::find($request->lanche_id);\n $lanche->fill($request->all());\n $lanche->save();\n\n return redirect()->back()->with('success', 'Lanche editado com sucesso!');\n }", "title": "" }, { "docid": "9259c485ad5627e9efa142e6a7bbd63c", "score": "0.55716074", "text": "protected function editar()\n {\n }", "title": "" }, { "docid": "9259c485ad5627e9efa142e6a7bbd63c", "score": "0.55716074", "text": "protected function editar()\n {\n }", "title": "" }, { "docid": "83138ff26f75c59bb915a7082401d3f0", "score": "0.55674195", "text": "public function UpDateAutor()\n\t{\n\t\t// Configura a variável que receberá dados do usuário\n\t\t$formdata = json_decode(file_get_contents('php://input'), true);\n\n\t\t// Obtendo os dados do usuário\n\t\t$id_autor = $formdata['id_autor'];\n\t\t$array = array(\n\t\t\t\"nome\" => $formdata['nome'],\n\t\t\t\"sexo\" => $formdata['sexo'],\n\t\t\t\"data_de_nascimento\" => $formdata['data_de_nascimento'],\n\t\t\t\"nacionalidade\" => $formdata['nacionalidade'],\n\t\t);\n\n\t\t// Chama a funcao do Model para inserir os dados no Banco de Dados.\n\t\t$this->M_Autores->update_autor($id_autor,$array);\n\t}", "title": "" }, { "docid": "06d46db18941101900030375b785ff83", "score": "0.55666983", "text": "public function setFielda($campos) {\n $fields = $this->separate($campos[0]);\n\n # Get the query based in filters\n $this->checkFields($fields);\n # If exists two type fields, check table\n $this->checkTable($campos[1]);\n # Check type of data\n $this->checkType();\n}", "title": "" }, { "docid": "945f3673b92b1d3509456bb1fef2a723", "score": "0.55617344", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->pc20_codorc = ($this->pc20_codorc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc20_codorc\"]:$this->pc20_codorc);\n if($this->pc20_dtate == \"\"){\n $this->pc20_dtate_dia = ($this->pc20_dtate_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc20_dtate_dia\"]:$this->pc20_dtate_dia);\n $this->pc20_dtate_mes = ($this->pc20_dtate_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc20_dtate_mes\"]:$this->pc20_dtate_mes);\n $this->pc20_dtate_ano = ($this->pc20_dtate_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc20_dtate_ano\"]:$this->pc20_dtate_ano);\n if($this->pc20_dtate_dia != \"\"){\n $this->pc20_dtate = $this->pc20_dtate_ano.\"-\".$this->pc20_dtate_mes.\"-\".$this->pc20_dtate_dia;\n }\n }\n $this->pc20_hrate = ($this->pc20_hrate == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc20_hrate\"]:$this->pc20_hrate);\n $this->pc20_obs = ($this->pc20_obs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc20_obs\"]:$this->pc20_obs);\n $this->pc20_prazoentrega = ($this->pc20_prazoentrega == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc20_prazoentrega\"]:$this->pc20_prazoentrega);\n $this->pc20_validadeorcamento = ($this->pc20_validadeorcamento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc20_validadeorcamento\"]:$this->pc20_validadeorcamento);\n $this->pc20_cotacaoprevia = ($this->pc20_cotacaoprevia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc20_cotacaoprevia\"]:$this->pc20_cotacaoprevia);\n }else{\n $this->pc20_codorc = ($this->pc20_codorc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc20_codorc\"]:$this->pc20_codorc);\n }\n }", "title": "" }, { "docid": "f5646a462249c8871d8b7e63ef71c3f4", "score": "0.55601114", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->m95_codlanc = ($this->m95_codlanc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m95_codlanc\"]:$this->m95_codlanc);\n $this->m95_id_usuario = ($this->m95_id_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m95_id_usuario\"]:$this->m95_id_usuario);\n if($this->m95_data == \"\"){\n $this->m95_data_dia = ($this->m95_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m95_data_dia\"]:$this->m95_data_dia);\n $this->m95_data_mes = ($this->m95_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m95_data_mes\"]:$this->m95_data_mes);\n $this->m95_data_ano = ($this->m95_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m95_data_ano\"]:$this->m95_data_ano);\n if($this->m95_data_dia != \"\"){\n $this->m95_data = $this->m95_data_ano.\"-\".$this->m95_data_mes.\"-\".$this->m95_data_dia;\n }\n }\n $this->m95_verificado = ($this->m95_verificado == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m95_verificado\"]:$this->m95_verificado);\n }else{\n $this->m95_codlanc = ($this->m95_codlanc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m95_codlanc\"]:$this->m95_codlanc);\n }\n }", "title": "" }, { "docid": "123000c41d06491f836c4f39b17d286a", "score": "0.55579776", "text": "public function __set($nome,$valor){\r\n $this->nome=$valor;\r\n}", "title": "" }, { "docid": "cd61d838c96f5b646b45ce9dd5933131", "score": "0.555759", "text": "public function edit() {\n\t\n\t\tglobal $u;\n\t\t$mek = $u->getMEK();\n\t\t\n\t\t//and enrypt the fields\n\t\t$crypto = Loader::helper(\"crypto\");\n\t\t\n\t\t$encrypted_fields = array(\n\t\t\t'field_1_textbox_text', //title\n\t\t\t'field_2_textbox_text', //username\n\t\t\t'field_3_textbox_text', //password\n\t\t\t'field_4_textarea_text' //notes\n\t\t);\n\t\t\n\t\tforeach( $encrypted_fields as $thisField ) {\n\t\t\t$this->set( $thisField, $crypto->decrypt( $this->$thisField, $mek ) );\t\n\t\t}\n\t\t\n\t\tunset($mek);\n\t\t\n\t}", "title": "" }, { "docid": "4ebb24522cf50bbb2b2160bae8e8bbd0", "score": "0.55561525", "text": "private function _CreateCIMettaFields() {\n\t\t$mysqli = $this->_Connect();\n\t\t$query = mysqli_query($mysqli, \"ALTER TABLE \".$this->_tablesArray['users']['tablename'].\" MODIFY COLUMN \".$this->_tablesArray['users']['text'].\" TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI\");\n\t\t$query = mysqli_query($mysqli, \"ALTER TABLE \".$this->_tablesArray['users']['tablename'].\" MODIFY COLUMN \".$this->_tablesArray['users']['metta'].\" TEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI\");\n\t\tmysqli_close($mysqli);\n\t}", "title": "" }, { "docid": "8ebdc143be3eb71b6ef5b991fbd94524", "score": "0.5556101", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->v59_codigo = ($this->v59_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v59_codigo\"]:$this->v59_codigo);\n $this->v59_inicial = ($this->v59_inicial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v59_inicial\"]:$this->v59_inicial);\n $this->v59_docum = ($this->v59_docum == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v59_docum\"]:$this->v59_docum);\n $this->v59_objtexto = ($this->v59_objtexto == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v59_objtexto\"]:$this->v59_objtexto);\n if($this->v59_dtemissao == \"\"){\n $this->v59_dtemissao_dia = @$GLOBALS[\"HTTP_POST_VARS\"][\"v59_dtemissao_dia\"];\n $this->v59_dtemissao_mes = @$GLOBALS[\"HTTP_POST_VARS\"][\"v59_dtemissao_mes\"];\n $this->v59_dtemissao_ano = @$GLOBALS[\"HTTP_POST_VARS\"][\"v59_dtemissao_ano\"];\n if($this->v59_dtemissao_dia != \"\"){\n $this->v59_dtemissao = $this->v59_dtemissao_ano.\"-\".$this->v59_dtemissao_mes.\"-\".$this->v59_dtemissao_dia;\n }\n }\n $this->v59_id_usuario = ($this->v59_id_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v59_id_usuario\"]:$this->v59_id_usuario);\n }else{\n $this->v59_codigo = ($this->v59_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v59_codigo\"]:$this->v59_codigo);\n }\n }", "title": "" }, { "docid": "64e5b1fa58c251d14b25c26f756e176b", "score": "0.5546978", "text": "protected function _modUpdate()\n {\n // force the 'updated' value\n $col = $this->_model->updated_col;\n if ($col) {\n $this->$col = date('Y-m-d H:i:s');\n }\n \n // if inheritance is turned on, auto-set the inheritance value\n if ($this->_model->isInherit()) {\n $col = $this->_model->inherit_col;\n $this->$col = $this->_model->inherit_name;\n }\n \n // auto-set sequences where keys exist and values are empty\n foreach ($this->_model->sequence_cols as $col => $val) {\n if (array_key_exists($col, $this->_data) && empty($this->$col)) {\n // key is present but no value is given.\n // add a new sequence value.\n $this->$col = $this->_model->sql->nextSequence($val);\n }\n }\n }", "title": "" }, { "docid": "57338eab60ebeb59cee9339afffceb4b", "score": "0.554617", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->pc72_codigo = ($this->pc72_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc72_codigo\"]:$this->pc72_codigo);\n $this->pc72_pctipocertif = ($this->pc72_pctipocertif == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc72_pctipocertif\"]:$this->pc72_pctipocertif);\n $this->pc72_pcdoccertif = ($this->pc72_pcdoccertif == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc72_pcdoccertif\"]:$this->pc72_pcdoccertif);\n $this->pc72_obrigatorio = ($this->pc72_obrigatorio == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc72_obrigatorio\"]:$this->pc72_obrigatorio);\n }else{\n $this->pc72_codigo = ($this->pc72_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc72_codigo\"]:$this->pc72_codigo);\n }\n }", "title": "" }, { "docid": "cb2068fdce93c9d57c424b58281dbf5d", "score": "0.55432594", "text": "public function atualiza($aluno){\n\t\t\t$sql = \"UPDATE aluno SET nome=:nome,turma=:turma,telefone=:telefone,cidade=:cidade,bairro=:bairro,rua=:rua,numero_casa=:numero_casa,complementos=:complementos WHERE id=:id\";\n\n\t\t\t$query = $this->conexao->prepare($sql);\n\n\t\t\t$query->execute(['nome'=>$aluno->getNome(),'turma'=>$aluno->getTurma(),'telefone'=>$aluno->getTelefone(), 'cidade'=>$aluno->getCidade(), 'bairro'=>$aluno->getBairro(), 'rua'=>$aluno->getRua(), 'numero_casa'=>$aluno->getNumeroCasa(), 'complementos'=>$aluno->getComplementos(), 'id'=>$aluno->getId()]);\n\n\t\t}", "title": "" }, { "docid": "0e49926773ad82bc6092a84e8ac4cfdc", "score": "0.55386996", "text": "function save_carga_curso() { //funcao de callback como mencionado acima.\n\n\tglobal $post; //pegando a variavel global post\n\n\t$carga_horaria = sanitize_text_field($_POST['carga_horaria']); //sanatizando ela.\n\n\tupdate_post_meta($post->ID, 'carga_horaria', $carga_horaria); //escrevendo ela no banco de dados.\n//Todo esse processo ocorre apenas quando os valores na metabox sao atualizados.\n\n}", "title": "" }, { "docid": "4833fe60fafd5fedc8dfaf9c0dc0040d", "score": "0.5531203", "text": "function modificar(){\n global $conexion, $data;\n $id = $data[\"id\"];\n $nombre = $data[\"nombre\"];\n $descripcion= $data[\"descripcion\"];\n $estado = $data[\"estado\"];\n $resultado = mysqli_query($conexion,\"UPDATE catalogo_area SET cta_nombre='$nombre', cta_descripcion='$descripcion', cta_estado='$estado' WHERE cta_id='$id'\");\n echo validarError($conexion, true, $resultado);\n }", "title": "" }, { "docid": "6eab777e946c1b7c3da6e040d7488380", "score": "0.5520989", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->bi22_sequencial = ($this->bi22_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi22_sequencial\"]:$this->bi22_sequencial);\n $this->bi22_idioma = ($this->bi22_idioma == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi22_idioma\"]:$this->bi22_idioma);\n }else{\n $this->bi22_sequencial = ($this->bi22_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi22_sequencial\"]:$this->bi22_sequencial);\n }\n }", "title": "" }, { "docid": "173ec1cc98dbbc5df4a4c6ff1bf4aac7", "score": "0.5519043", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->db42_sysfuncoesparam = ($this->db42_sysfuncoesparam == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db42_sysfuncoesparam\"]:$this->db42_sysfuncoesparam);\n $this->db42_funcao = ($this->db42_funcao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db42_funcao\"]:$this->db42_funcao);\n $this->db42_ordem = ($this->db42_ordem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db42_ordem\"]:$this->db42_ordem);\n $this->db42_nome = ($this->db42_nome == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db42_nome\"]:$this->db42_nome);\n $this->db42_tipo = ($this->db42_tipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db42_tipo\"]:$this->db42_tipo);\n $this->db42_tamanho = ($this->db42_tamanho == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db42_tamanho\"]:$this->db42_tamanho);\n $this->db42_precisao = ($this->db42_precisao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db42_precisao\"]:$this->db42_precisao);\n $this->db42_valor_default = ($this->db42_valor_default == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db42_valor_default\"]:$this->db42_valor_default);\n $this->db42_descricao = ($this->db42_descricao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db42_descricao\"]:$this->db42_descricao);\n }else{\n $this->db42_sysfuncoesparam = ($this->db42_sysfuncoesparam == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db42_sysfuncoesparam\"]:$this->db42_sysfuncoesparam);\n }\n }", "title": "" }, { "docid": "2d4eba423fc6b1a000c22b1891fd565e", "score": "0.5505649", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->o63_codimpmov = ($this->o63_codimpmov == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_codimpmov\"]:$this->o63_codimpmov);\n $this->o63_codperiodo = ($this->o63_codperiodo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_codperiodo\"]:$this->o63_codperiodo);\n $this->o63_anoexe = ($this->o63_anoexe == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_anoexe\"]:$this->o63_anoexe);\n $this->o63_orgao = ($this->o63_orgao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_orgao\"]:$this->o63_orgao);\n $this->o63_unidade = ($this->o63_unidade == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_unidade\"]:$this->o63_unidade);\n $this->o63_funcao = ($this->o63_funcao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_funcao\"]:$this->o63_funcao);\n $this->o63_subfuncao = ($this->o63_subfuncao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_subfuncao\"]:$this->o63_subfuncao);\n $this->o63_programa = ($this->o63_programa == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_programa\"]:$this->o63_programa);\n $this->o63_programatxt = ($this->o63_programatxt == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_programatxt\"]:$this->o63_programatxt);\n $this->o63_acao = ($this->o63_acao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_acao\"]:$this->o63_acao);\n $this->o63_acaotxt = ($this->o63_acaotxt == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_acaotxt\"]:$this->o63_acaotxt);\n $this->o63_unimed = ($this->o63_unimed == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_unimed\"]:$this->o63_unimed);\n $this->o63_produto = ($this->o63_produto == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_produto\"]:$this->o63_produto);\n $this->o63_codimpger = ($this->o63_codimpger == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_codimpger\"]:$this->o63_codimpger);\n }else{\n $this->o63_codimpmov = ($this->o63_codimpmov == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o63_codimpmov\"]:$this->o63_codimpmov);\n }\n }", "title": "" }, { "docid": "ffd7d0f5ea9f113bb07aeb95478919f4", "score": "0.55049485", "text": "protected function setupUpdateOperation()\n {\n $this->authorize('update', $this->crud->getEntryWithLocale($this->crud->getCurrentEntryId()));\n\n $this->setupCreateOperation();\n CRUD::addField(['name' => 'timestamps', 'label' => 'Cập nhật thời gian', 'type' => 'checkbox', 'tab' => 'Cập nhật']);\n }", "title": "" }, { "docid": "fe2cb84da215d946eb268d26669e15e6", "score": "0.55000013", "text": "function evt__form_acad__modificacionp($datos)\r\n {\r\n $datos2['check_presup']=$datos['check_presup'];\r\n $datos2['observacion_presup']=$datos['observacion_presup'];\r\n $this->dep('datos')->tabla('articulo_73')->set($datos2);\r\n $this->dep('datos')->tabla('articulo_73')->sincronizar();\r\n $this->resetear();\r\n $this->set_pantalla('pant_inicial'); \r\n $this->s__imprimir=0;\r\n \r\n }", "title": "" }, { "docid": "512bd25075af0cc9a70c851aa44d3df5", "score": "0.54973894", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->bi14_codigo = ($this->bi14_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_codigo\"]:$this->bi14_codigo);\n $this->bi14_carteira = ($this->bi14_carteira == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_carteira\"]:$this->bi14_carteira);\n $this->bi14_usuario = ($this->bi14_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_usuario\"]:$this->bi14_usuario);\n $this->bi14_acervo = ($this->bi14_acervo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_acervo\"]:$this->bi14_acervo);\n if($this->bi14_data == \"\"){\n $this->bi14_data_dia = ($this->bi14_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_data_dia\"]:$this->bi14_data_dia);\n $this->bi14_data_mes = ($this->bi14_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_data_mes\"]:$this->bi14_data_mes);\n $this->bi14_data_ano = ($this->bi14_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_data_ano\"]:$this->bi14_data_ano);\n if($this->bi14_data_dia != \"\"){\n $this->bi14_data = $this->bi14_data_ano.\"-\".$this->bi14_data_mes.\"-\".$this->bi14_data_dia;\n }\n }\n if($this->bi14_datareserva == \"\"){\n $this->bi14_datareserva_dia = ($this->bi14_datareserva_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_datareserva_dia\"]:$this->bi14_datareserva_dia);\n $this->bi14_datareserva_mes = ($this->bi14_datareserva_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_datareserva_mes\"]:$this->bi14_datareserva_mes);\n $this->bi14_datareserva_ano = ($this->bi14_datareserva_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_datareserva_ano\"]:$this->bi14_datareserva_ano);\n if($this->bi14_datareserva_dia != \"\"){\n $this->bi14_datareserva = $this->bi14_datareserva_ano.\"-\".$this->bi14_datareserva_mes.\"-\".$this->bi14_datareserva_dia;\n }\n }\n $this->bi14_hora = ($this->bi14_hora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_hora\"]:$this->bi14_hora);\n if($this->bi14_retirada == \"\"){\n $this->bi14_retirada_dia = ($this->bi14_retirada_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_retirada_dia\"]:$this->bi14_retirada_dia);\n $this->bi14_retirada_mes = ($this->bi14_retirada_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_retirada_mes\"]:$this->bi14_retirada_mes);\n $this->bi14_retirada_ano = ($this->bi14_retirada_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_retirada_ano\"]:$this->bi14_retirada_ano);\n if($this->bi14_retirada_dia != \"\"){\n $this->bi14_retirada = $this->bi14_retirada_ano.\"-\".$this->bi14_retirada_mes.\"-\".$this->bi14_retirada_dia;\n }\n }\n $this->bi14_situacao = ($this->bi14_situacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_situacao\"]:$this->bi14_situacao);\n }else{\n $this->bi14_codigo = ($this->bi14_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi14_codigo\"]:$this->bi14_codigo);\n }\n }", "title": "" }, { "docid": "511b60fdf5e008b88c36189a3816b999", "score": "0.54959077", "text": "protected function defineAttributes()\r\n {\r\n // set the safe attributes to update and consult\r\n $safeDbAttributes = [\r\n 'fk_funcionario',\r\n 'fk_documento',\r\n 'comentario',\r\n 'fecha'\r\n ];\r\n // set the date attributes on the schema\r\n $dateAttributes = ['fecha'];\r\n\r\n $this->dbAttributes = (object) [\r\n 'safe' => $safeDbAttributes,\r\n 'date' => $dateAttributes\r\n ];\r\n }", "title": "" }, { "docid": "69d1ab7b246dd3024cc268b23fb4a18f", "score": "0.54918903", "text": "function actualizar()\r\n {\r\n //recolectamos los datos nombre , apellido y matricula lo conservamos sin cambios y\r\n session_start();\r\n $matricula=$_SESSION['idmatricula'];\r\n $nombre=$_POST['nombre'];\r\n $apellido=$_POST['apellido'];\r\n $mensaje='';\r\n //destruimos la variable de sesion\r\n unset($_SESSION['matricula']);\r\n //ejecutamos la funcion del model atravez del if\r\n if($this->model->update(['matricula'=>$matricula,'nombre'=>$nombre,'apellido'=>$apellido]))\r\n {\r\n //si nos rentorna true ejecuta lo siguinte\r\n $alumno=new alumno();\r\n $alumno->matricula=$matricula;\r\n $alumno->nombre=$nombre;\r\n $alumno->apellido=$apellido;\r\n $this->view->alumno=$alumno;\r\n $this->view->mensaje='alumno actualizado';\r\n }else\r\n {\r\n //si nos rentorna false ejecuta lo siguinte\r\n $this->view->mensaje='alumno no actualizado';\r\n }\r\n //renderizacion de una nueva vista\r\n $this->view->render('consulta/detalle');\r\n }", "title": "" }, { "docid": "81830e8fb4ff9a5fbea5699143fa6426", "score": "0.54904336", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed39_i_codigo = ($this->ed39_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed39_i_codigo\"]:$this->ed39_i_codigo);\n $this->ed39_i_formaavaliacao = ($this->ed39_i_formaavaliacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed39_i_formaavaliacao\"]:$this->ed39_i_formaavaliacao);\n $this->ed39_c_conceito = ($this->ed39_c_conceito == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed39_c_conceito\"]:$this->ed39_c_conceito);\n $this->ed39_c_conceitodescr = ($this->ed39_c_conceitodescr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed39_c_conceitodescr\"]:$this->ed39_c_conceitodescr);\n $this->ed39_i_sequencia = ($this->ed39_i_sequencia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed39_i_sequencia\"]:$this->ed39_i_sequencia);\n $this->ed39_c_nome = ($this->ed39_c_nome == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed39_c_nome\"]:$this->ed39_c_nome);\n }else{\n $this->ed39_i_codigo = ($this->ed39_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed39_i_codigo\"]:$this->ed39_i_codigo);\n }\n }", "title": "" }, { "docid": "c2e5fe6f2b8fc5e995ce6ad8777e4b2f", "score": "0.548482", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->s140_i_codigo = ($this->s140_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s140_i_codigo\"]:$this->s140_i_codigo);\n $this->s140_i_unidade = ($this->s140_i_unidade == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s140_i_unidade\"]:$this->s140_i_unidade);\n if($this->s140_d_inicio == \"\"){\n $this->s140_d_inicio_dia = ($this->s140_d_inicio_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s140_d_inicio_dia\"]:$this->s140_d_inicio_dia);\n $this->s140_d_inicio_mes = ($this->s140_d_inicio_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s140_d_inicio_mes\"]:$this->s140_d_inicio_mes);\n $this->s140_d_inicio_ano = ($this->s140_d_inicio_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s140_d_inicio_ano\"]:$this->s140_d_inicio_ano);\n if($this->s140_d_inicio_dia != \"\"){\n $this->s140_d_inicio = $this->s140_d_inicio_ano.\"-\".$this->s140_d_inicio_mes.\"-\".$this->s140_d_inicio_dia;\n }\n }\n if($this->s140_d_fim == \"\"){\n $this->s140_d_fim_dia = ($this->s140_d_fim_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s140_d_fim_dia\"]:$this->s140_d_fim_dia);\n $this->s140_d_fim_mes = ($this->s140_d_fim_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s140_d_fim_mes\"]:$this->s140_d_fim_mes);\n $this->s140_d_fim_ano = ($this->s140_d_fim_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s140_d_fim_ano\"]:$this->s140_d_fim_ano);\n if($this->s140_d_fim_dia != \"\"){\n $this->s140_d_fim = $this->s140_d_fim_ano.\"-\".$this->s140_d_fim_mes.\"-\".$this->s140_d_fim_dia;\n }\n }\n $this->s140_i_tipo = ($this->s140_i_tipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s140_i_tipo\"]:$this->s140_i_tipo);\n $this->s140_c_horaini = ($this->s140_c_horaini == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s140_c_horaini\"]:$this->s140_c_horaini);\n $this->s140_c_horafim = ($this->s140_c_horafim == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s140_c_horafim\"]:$this->s140_c_horafim);\n }else{\n $this->s140_i_codigo = ($this->s140_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s140_i_codigo\"]:$this->s140_i_codigo);\n }\n }", "title": "" }, { "docid": "2a963aa6ae5badf32dd28afecc1eff22", "score": "0.5484178", "text": "function set(Alumno $alumno){\n //Update de todos los campos menos el tel, el tel se usara como el where para el update numero de filas modificadas\n $parametrosSet=array();\n $parametrosSet['tel']=$alumno->getTelefono();\n $parametrosSet['nombre']=$alumno->getNombre();\n $parametrosSet['apellido']=$alumno->getApellido();\n $parametrosSet['clave']=$alumno->getClave();\n $parametrosSet['activo']=$alumno->getActivo();\n $parametrosSet['deuda']=$alumno->getDeuda();\n $parametrosSet['email']=$alumno->getEmail();\n $parametrosWhere = array();\n $parametrosWhere['tel'] = $alumno->getTelefono();\n return $this->bd->update($this->tabla, $parametrosSet, $parametrosWhere);\n \n }", "title": "" }, { "docid": "2b6eb53d456f93cde7b8e80c5a43afb9", "score": "0.5472706", "text": "public function setData($data)\n {\n //ele nao podem ser null\n $data['id'] = $data['id'] ?? '';\n $data['email'] = $data['email'] ?? '';\n\n if(!isset($data['id']) || $data['id'] === ''){\n $this->get('password')->setRequired(true);\n }\n else if(!empty($data['oldPassword']) ||!empty($data['newPassword'])){\n $this->changePasswordValidator($data);\n }\n parent::setData($data);\n }", "title": "" }, { "docid": "d4534b2524df33953781800934d14a60", "score": "0.5472478", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->me22_i_codigo = ($this->me22_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me22_i_codigo\"]:$this->me22_i_codigo);\n $this->me22_i_cardapiodiaescola = ($this->me22_i_cardapiodiaescola == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me22_i_cardapiodiaescola\"]:$this->me22_i_cardapiodiaescola);\n if($this->me22_d_data == \"\"){\n $this->me22_d_data_dia = ($this->me22_d_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me22_d_data_dia\"]:$this->me22_d_data_dia);\n $this->me22_d_data_mes = ($this->me22_d_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me22_d_data_mes\"]:$this->me22_d_data_mes);\n $this->me22_d_data_ano = ($this->me22_d_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me22_d_data_ano\"]:$this->me22_d_data_ano);\n if($this->me22_d_data_dia != \"\"){\n $this->me22_d_data = $this->me22_d_data_ano.\"-\".$this->me22_d_data_mes.\"-\".$this->me22_d_data_dia;\n }\n }\n $this->me22_i_usuario = ($this->me22_i_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me22_i_usuario\"]:$this->me22_i_usuario);\n }else{\n $this->me22_i_codigo = ($this->me22_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me22_i_codigo\"]:$this->me22_i_codigo);\n }\n }", "title": "" }, { "docid": "7b9e7888206b2f2df528159c053f6ab7", "score": "0.54724056", "text": "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 }", "title": "" }, { "docid": "7b9e7888206b2f2df528159c053f6ab7", "score": "0.54724056", "text": "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 }", "title": "" }, { "docid": "7b9e7888206b2f2df528159c053f6ab7", "score": "0.54724056", "text": "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 }", "title": "" }, { "docid": "2268d6a3df924d4d0bb5e45f359176d4", "score": "0.5471411", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->o39_codproj = ($this->o39_codproj == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_codproj\"]:$this->o39_codproj);\n $this->o39_descr = ($this->o39_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_descr\"]:$this->o39_descr);\n $this->o39_codlei = ($this->o39_codlei == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_codlei\"]:$this->o39_codlei);\n $this->o39_tipoproj = ($this->o39_tipoproj == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_tipoproj\"]:$this->o39_tipoproj);\n $this->o39_anousu = ($this->o39_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_anousu\"]:$this->o39_anousu);\n $this->o39_numero = ($this->o39_numero == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_numero\"]:$this->o39_numero);\n if($this->o39_data == \"\"){\n $this->o39_data_dia = ($this->o39_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_data_dia\"]:$this->o39_data_dia);\n $this->o39_data_mes = ($this->o39_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_data_mes\"]:$this->o39_data_mes);\n $this->o39_data_ano = ($this->o39_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_data_ano\"]:$this->o39_data_ano);\n if($this->o39_data_dia != \"\"){\n $this->o39_data = $this->o39_data_ano.\"-\".$this->o39_data_mes.\"-\".$this->o39_data_dia;\n }\n }\n $this->o39_lei = ($this->o39_lei == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_lei\"]:$this->o39_lei);\n if($this->o39_leidata == \"\"){\n $this->o39_leidata_dia = ($this->o39_leidata_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_leidata_dia\"]:$this->o39_leidata_dia);\n $this->o39_leidata_mes = ($this->o39_leidata_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_leidata_mes\"]:$this->o39_leidata_mes);\n $this->o39_leidata_ano = ($this->o39_leidata_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_leidata_ano\"]:$this->o39_leidata_ano);\n if($this->o39_leidata_dia != \"\"){\n $this->o39_leidata = $this->o39_leidata_ano.\"-\".$this->o39_leidata_mes.\"-\".$this->o39_leidata_dia;\n }\n }\n $this->o39_texto = ($this->o39_texto == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_texto\"]:$this->o39_texto);\n $this->o39_textolivre = ($this->o39_textolivre == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_textolivre\"]:$this->o39_textolivre);\n $this->o39_compllei = ($this->o39_compllei == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_compllei\"]:$this->o39_compllei);\n $this->o39_usalimite = ($this->o39_usalimite == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_usalimite\"]:$this->o39_usalimite);\n }else{\n $this->o39_codproj = ($this->o39_codproj == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o39_codproj\"]:$this->o39_codproj);\n }\n }", "title": "" }, { "docid": "101207ea141306c37608d599e20b5009", "score": "0.54711074", "text": "public function beforeSave() { \n if($this->tanggal_rujukan==null || trim($this->tanggal_rujukan)==''){\n $this->setAttribute('tanggal_rujukan', null);\n }\n\n return parent::beforeSave();\n }", "title": "" }, { "docid": "ecbbb4088eb81fa5a4c09db226242edf", "score": "0.54624194", "text": "function evt__formulario__modificacion($datos)\n\t{\n\t\t$s__datos['form'] = $datos;\n\t\t//modifico los valores\n\t\t$this->dep('datos')->set($datos);\n\t\t//ei_arbol($datos);\n\t\t$this->set_pantalla('pant_inicial');\n\t}", "title": "" }, { "docid": "4f0d36e89fe711cca0a474db78523ed7", "score": "0.54551876", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->e06_sequencial = ($this->e06_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e06_sequencial\"]:$this->e06_sequencial);\n $this->e06_empanulado = ($this->e06_empanulado == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e06_empanulado\"]:$this->e06_empanulado);\n $this->e06_pagordemdesconto = ($this->e06_pagordemdesconto == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e06_pagordemdesconto\"]:$this->e06_pagordemdesconto);\n }else{\n $this->e06_empanulado = ($this->e06_empanulado == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e06_empanulado\"]:$this->e06_empanulado);\n }\n }", "title": "" }, { "docid": "4080ec57104c98541bdbef0b6c30d34c", "score": "0.5453008", "text": "public function beforeValidationOnUpdate();", "title": "" }, { "docid": "12e21f299904819036ff173bd35eb3f3", "score": "0.54496247", "text": "protected function _set(){}", "title": "" }, { "docid": "20853dd1f9acca3b40e803d2b7a15a5a", "score": "0.54438764", "text": "public function setValidationProperties()\n {\n $this->jenisLaporan = $this->validator[0] ?? null;\n\n $this->jenisPermohonan = $this->validator[0] ?? null;\n\n $this->tanggalLaporan = $this->validator[2] ?? null;\n\n $this->laporanHasValue = $this->validator[6] ?? null;\n }", "title": "" }, { "docid": "f589b7d0ae915be4872a4df3bf74367c", "score": "0.5443549", "text": "function modificaDatos()\r\n\t{\r\n\t\t$query = \"UPDATE \" . self::TABLA . \" SET Nombre='\".$this->Nombre.\"', Apellidos='\".$this->Apellidos.\"',\tNIFNIE='\".$this->NIFNIE.\"',\tUsuario='\".$this->Usuario.\"'\tWHERE IdPersona = \".$this->IdPersona.\";\";\r\n\t\treturn parent::modificaRegistro( $query);\r\n\t}", "title": "" }, { "docid": "1d33c81fbc60e9250b41046bd740266f", "score": "0.5439302", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed270_i_codigo = ($this->ed270_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed270_i_codigo\"]:$this->ed270_i_codigo);\n $this->ed270_i_rechumano = ($this->ed270_i_rechumano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed270_i_rechumano\"]:$this->ed270_i_rechumano);\n $this->ed270_i_diasemana = ($this->ed270_i_diasemana == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed270_i_diasemana\"]:$this->ed270_i_diasemana);\n $this->ed270_i_periodo = ($this->ed270_i_periodo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed270_i_periodo\"]:$this->ed270_i_periodo);\n $this->ed270_i_turmaac = ($this->ed270_i_turmaac == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed270_i_turmaac\"]:$this->ed270_i_turmaac);\n }else{\n $this->ed270_i_codigo = ($this->ed270_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed270_i_codigo\"]:$this->ed270_i_codigo);\n }\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "3d9676e3f7dd8cefd5068aca5a1d5058", "score": "0.0", "text": "public function edit(Phones $phones)\n {\n //\n }", "title": "" } ]
[ { "docid": "ba00ae66e85d515739d2e3ad614735cb", "score": "0.7892186", "text": "public function edit(Resource $resource) {\n return view('admin.resources.update', [\n 'resource' => $resource,\n ]);\n }", "title": "" }, { "docid": "6f20a1779e33227cfc4451ace6ab29af", "score": "0.7699498", "text": "public function edit(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7693446", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "1d94403d2acd74d9393297956ff20089", "score": "0.761828", "text": "function edit()\n {\n $this->_form('edit');\n }", "title": "" }, { "docid": "8036d8b9819aa701c22431a726cf0650", "score": "0.72270334", "text": "public function editAction()\n {\n $page = $this->_helper->db->findById();\n $form = $this->_getForm($page);\n $this->view->form = $form;\n $this->_processFieldForm($page, $form, 'edit');\n }", "title": "" }, { "docid": "c99eb92b2f68bf84003855d0f37cad8c", "score": "0.7106957", "text": "public function edit($id)\n\t{\n\t\t$resource = Resources::find($id);\n\t\tif (is_null($resource))\n\t\t{\n\t\t\treturn Redirect::route('secureadmin.resources.index');\n\t\t}\n\t\treturn View::make('secureadmin.resources.edit', compact('resource'));\n \n\t}", "title": "" }, { "docid": "a31e023b1fc8db49c8ba300ea164e563", "score": "0.7042168", "text": "public function editAction()\n {\n $term = $this->_helper->db->findById();\n $this->view->form = $this->_getForm($term);\n $this->_processPageForm($term, 'edit');\n }", "title": "" }, { "docid": "7baaec18e51362dc6376494a199472cb", "score": "0.70408624", "text": "public function edit($id)\n {\n if (is_null($this->resource)) {\n return view('admin.errors.unresolved-resource');\n }\n\n $className = Manager::getResourceClass($this->resource);\n\n $model = $className::find($id);\n\n if (is_null($model)) {\n return view('admin.errors.inexistent-model');\n }\n\n return view(Manager::resolveResourceView($this->resource, 'edit'), [\n 'resource' => $this->resource,\n 'model' => $model,\n 'action' => 'update',\n 'token' => csrf_token()\n ]);\n }", "title": "" }, { "docid": "5a02684925f991ee39abcb153d80d058", "score": "0.7009886", "text": "public function edit()\r\n {\r\n return view('hr::edit');\r\n }", "title": "" }, { "docid": "f457a7aac87ab5b3de5b0f6358698582", "score": "0.6953053", "text": "public function edit(Form $form)\n {\n \n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6946892", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "de51e28e1cd4ca0b702510f31a890083", "score": "0.6890537", "text": "function edit_quiz_resource($id_quiz_resource) {\n if (!$this->ion_auth->logged_in()) {\n redirect();\n } else {\n $temp = $this->model_quiz->select_quiz_resource_by_id($id_quiz_resource)->row();\n $data['title'] = $temp->title;\n $data['description'] = $temp->description;\n $data['show'] = $temp->show;\n $data['id_quiz_resource'] = $id_quiz_resource;\n\n $this->load->view('quiz/form_edit_quiz_resource', $data);\n }\n }", "title": "" }, { "docid": "817360c379f8b1ec2b8f9a122de58d2d", "score": "0.68691325", "text": "function edit(){\n\t\t$id = $this->input->get('id');\n\t\t$data = array();\n\t\t$data['title']\t\t= 'Edit '.$this->title;\n\t\t$data['controller']\t= $this->controller;\n\t\t$data['state']\t\t= 'edit';\n\t\t$data['id'] \t\t= $id;\n\n\t\t// because it's simple index and form, use common form\n\t\t$data['table_field'] = $this->ipk->table_field;\n\t\t$data['primary_key'] = $this->ipk->primary_key;\n\t\t$data['content']\t= 'content/common/form';\n\t\t$data['datas'] = $this->ipk->get(decrypt_id($id));\n\n\t\t$data['datas'] = $this->ipk->reformat_sql_to_form($data['datas']);\n\n\t\t$this->template($data);\n\t}", "title": "" }, { "docid": "6c233bfe3c56ffa57401216d102fe97a", "score": "0.6857624", "text": "public function edit($id)\n {\n $this->show($id);\n }", "title": "" }, { "docid": "a695b4f4340bb78a765476c7a7b02c4c", "score": "0.6837069", "text": "public function edit()\n {\n return view('clientapp::edit');\n }", "title": "" }, { "docid": "8fc05e7ee75d6832d8a160b41adfb194", "score": "0.6834344", "text": "public function editAction(){\n return $formResponse = $this->FormManager()->process(\n $this,\n new \\ZendCommerce\\Common\\Model\\FormOperation(\n $this->getFormOperationDefinition()\n )\n );\n }", "title": "" }, { "docid": "c4d03e67f990c37b8eb676c851ca4a4d", "score": "0.6830173", "text": "public function edit($id)\n {\n $item = \\App\\Form::find($id);\n return view('admin.form.edit',[\n 'item' => $item,\n ]);\n }", "title": "" }, { "docid": "7a371c130868901633e4849cba486699", "score": "0.6819266", "text": "public function edit($id)\n\t{\n\t\t$product = Product::find($id);\n if (is_null ($product)) {\n App::abort(404);\n }\n return View::make('business/products/form')->with('product', $product);\n\t}", "title": "" }, { "docid": "4ef09bf2e2f9d9322bedfcd1819a1801", "score": "0.68112475", "text": "public function editAction() {\n $id = filter_input(INPUT_POST, 'o_id');\n $product = Object_Abstract::getById($id);\n $this->view->product = $product;\n }", "title": "" }, { "docid": "a7f6bb1c17e099bebaaeaa8fa4992420", "score": "0.6797452", "text": "public function edit($id) {\n $object = Entity::findOrFail($id);\n return View::make('admin.' . $this->path . '.edit')->with('object', $object);\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.67936623", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.67936623", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "8556aaf7cff24f5e410f81955fa32806", "score": "0.67907083", "text": "public function edit()\n {\n return view('spk::edit');\n }", "title": "" }, { "docid": "6c1f157ed1e542e35be21641e6fe4291", "score": "0.67857856", "text": "public function edit(Entity $entity)\n\t{\n\t\treturn view( 'entities.edit', compact( 'entity' ) );\n\t}", "title": "" }, { "docid": "9341e591311afec65c0cf3045ad076a9", "score": "0.67619574", "text": "public function edit($identifier)\n {\n if ($this->permissions['update'] != '' && !\\Auth::user()->hasPermissionTo($this->permissions['update'])) {\n flash(trans('core::core.you_dont_have_access'))->error();\n return redirect()->route($this->routes['index']);\n }\n\n $repository = $this->getRepository();\n\n $entity = $repository->find($identifier);\n\n $this->entity = $entity;\n\n if (empty($entity)) {\n flash(trans('core::core.entity.entity_not_found'))->error();\n\n return redirect(route($this->routes['index']));\n }\n\n if ($this->blockEntityOwnableAccess()) {\n flash(trans('core::core.you_dont_have_access'))->error();\n return redirect()->route($this->routes['index']);\n }\n\n $updateForm = $this->form($this->formClass, [\n 'method' => 'PATCH',\n 'url' => route($this->routes['update'], $entity),\n 'id' => 'module_form',\n 'model' => $entity\n ]);\n\n $updateView = $this->views['edit'];\n\n $this->entity = $entity;\n\n $view = view($updateView);\n $view->with('form_request', $this->storeRequest);\n $view->with('entity', $entity);\n $view->with('show_fields', $this->showFields);\n $view->with('sectionButtons', $this->sectionButtons);\n\n\n $view->with('form', $updateForm);\n\n return $view;\n }", "title": "" }, { "docid": "c41a659c6811677b0b43a9144fd42379", "score": "0.67613775", "text": "public function edit($id)\n\t{\n\t\t$project = Project::find($id);\t\t\t\t\t\n\t\treturn View::make('project.form')->with('project', $project);\t\t\t\t\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "5d7bee078a1572f61b7e28dcc2ac5c36", "score": "0.6755102", "text": "public function edit($id)\n {\n $user = auth()->user();\n\n $id = Crypt::decrypt($id);\n\n $form = Form::where(['user_id' => $user->id, 'id' => $id])->firstOrFail();\n\n $pageTitle = 'Edit Form';\n\n $saveURL = route('formbuilder::forms.update', $form);\n\n // get the roles to use to populate the make the 'Access' section of the form builder work\n $form_roles = Helper::getConfiguredRoles();\n\n return view('Forms.edit', compact('form', 'pageTitle', 'saveURL', 'form_roles'));\n }", "title": "" }, { "docid": "af1ae147b46a5dbc0c8b9ec58527eeb0", "score": "0.6747543", "text": "public function edit()\n {\n return view('catalog::edit');\n }", "title": "" }, { "docid": "057b48bb7cf2107466c426e2c9e428fe", "score": "0.67463523", "text": "public function edit(form $form)\n {\n //\n }", "title": "" }, { "docid": "6c156cf995c4d50636dfb4550651518b", "score": "0.674307", "text": "public function edit()\n {\n return view('purchaserequest::edit');\n }", "title": "" }, { "docid": "444f98d0090cda3d8ec6a32c569483fe", "score": "0.6731936", "text": "public function edit()\n {\n return view('item::edit');\n }", "title": "" }, { "docid": "a18df7fa246cdc38054b7905a9bcfb6f", "score": "0.673143", "text": "public function edit($id) {\n\n $checkrights = \\App\\Models\\Admin::checkPermission(\\App\\Models\\Admin::$EDIT_CRON);\n\n if ($checkrights) {\n return $checkrights;\n }\n\n $formObj = $this->modelObj->find($id);\n\n if (!$formObj) {\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 }", "title": "" }, { "docid": "9b1fce8c32438e8cd4b5e3dd43e195df", "score": "0.6730314", "text": "public function edit()\n {\n return view('partner::edit');\n }", "title": "" }, { "docid": "36e81b336316946d6eebd6bc3678ef52", "score": "0.672446", "text": "public function edit($id)\r\n {\r\n return view('superadmin::edit');\r\n }", "title": "" }, { "docid": "5c67586ee68b758ffb35f2cbc6d5b38a", "score": "0.67243785", "text": "public function edit($id)\n {\n //@todo here and the view\n }", "title": "" }, { "docid": "23dadaa6b2b77d4862c924bed4317349", "score": "0.6718896", "text": "public function edit($id)\n\t{\n\t\t$item = $this->object->with($this->relations)->where('id', $id)->firstOrFail();\n\n\t\tFormer::populate($item);\n\t\tFormer::withRules($this->getRules());\n\n\t\treturn View::make('conferencer::admin.' .$this->namespace. '.create')\n\t\t\t->with('item', $item);\n\t}", "title": "" }, { "docid": "8524a51e55f52d742bd04ba646a0cc54", "score": "0.67154294", "text": "public function edit($id)\n\t{\n\t\treturn view('angular.field.edit')->with('field', Field::find($id));\n\t}", "title": "" }, { "docid": "b3a17e5117200de0a9bc5597a7a160d5", "score": "0.6714851", "text": "public function edit($id) {\n return view('frontend.'.$this->folder.'.edit');\n }", "title": "" }, { "docid": "6c5ab41883f9c63e9d204b41b416cfbe", "score": "0.6706786", "text": "public function editForm() {\n\t\t$layout = $this->input->get('layout', null, 'string');\n\t\t$nameModelForm = (empty($layout)) ? $this->nameKey.'form' : $layout.'form';\n\t\t$layout = (empty($layout)) ? 'edit' : 'edit_'.$layout; //EcDebug::log($layout, __method__);\n\t\t$view = $this->getView($this->default_view, \n\t\t\tJFactory::getDocument()->getType(), '', array('layout' => $layout));\n\t\t$view->setModel($this->getModel($this->nameKey));\n\t\t$view->setModel($this->getModel($nameModelForm));\n\t\t$view->editForm();\n\t}", "title": "" }, { "docid": "ec8462a847e6da7c744621b95e55e354", "score": "0.6688819", "text": "public function edit($id)\n\t{\n\t\t$formMode = GlobalsConst::FORM_EDIT;\n\t\t$user = User::find($id);\n\t\treturn View::make('users.edit')->nest('_form','users.partials._form',compact('formMode','user'));\n\t}", "title": "" }, { "docid": "c674456a3a2c3e7eaae1d581b5193627", "score": "0.66819197", "text": "public function edit($id)\n\t{\n\t\t$entity = Umbrella::find($id);\n\t\treturn view('partner.umbrella.edit', ['entity' => $entity]);\n\t}", "title": "" }, { "docid": "ac8f085fa840d486f8d59d14411a0385", "score": "0.6672867", "text": "public function edit(Form $form)\n {\n return view('iforms::admin.forms.edit', compact('form'));\n }", "title": "" }, { "docid": "4cff7330fb7639f41f48bfd168776ed8", "score": "0.66644543", "text": "public function editAction()\n {\n $search = $this->_helper->db->findById();\n $this->view->form = $this->_getForm($search);\n $this->_processCatalogSearchForm($search, 'edit');\n }", "title": "" }, { "docid": "fa330dea11d4ceb5de51306745584597", "score": "0.66640455", "text": "public function edit($id)\n {\n $this->checkRole();\n\n //\tGet the model instance\n $model = $this->getModelInstance($id);\n\n //\tGet all the fields wich will be shown in the edit form\n $fields = new RenderDetail($this->getFieldsForEdit());\n\n //\tRender the view\n return view('crud::templates.edit', $this->parseViewData(compact('model', 'fields')));\n }", "title": "" }, { "docid": "c23aa59da02ffaff80b50d5fe993ac20", "score": "0.66602963", "text": "public function edit($id)\n {\n $record = Parentt::find($id);\n return view('studentAffairs\\student\\create&edit_student', compact('record'));\n }", "title": "" }, { "docid": "1e640024572be6feda125ecd9457ecd2", "score": "0.6658405", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AVBundle:Reto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Reto entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AVBundle:Reto:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "104ea06ce41e3f1bf43db0097da1535b", "score": "0.66549915", "text": "public function editAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$id = $this->_request->getParam('id'); \n\t\t$this->view->data = $model->getContent($id);\n\t }", "title": "" }, { "docid": "d33a07845d905f66518d6d6763c5bac0", "score": "0.6649905", "text": "public function editAction($id)\n {\n \n\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SrpvProtocolizacionBundle:Oficina')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Oficina entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SrpvAdminBundle:Oficina:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "28b5f6da3a8cb9d992528f53b99c70ae", "score": "0.6646471", "text": "public function editAction($id)\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = $em->getRepository('fidiEcommerceBundle:Promo')->find($id);\r\n if (!$entity) {\r\n throw $this->createNotFoundException('Entité évènement non trouvée.');\r\n }\r\n $editForm = $this->createEditForm($entity);\r\n $deleteForm = $this->createDeleteForm($id);\r\n return $this->render('fidiEcommerceBundle:Administration:Promo/layout/edit.html.twig', array(\r\n 'entity' => $entity,\r\n 'edit_form' => $editForm->createView(),\r\n 'delete_form' => $deleteForm->createView(),\r\n ));\r\n }", "title": "" }, { "docid": "7aad47d22925f5965c8ba3723cf17bc6", "score": "0.6644796", "text": "public function edit()\n\t {\n\t \t\t$clientID = Input::get('clientID');\n\t \t\treturn View::make('edit.update');\n\t }", "title": "" }, { "docid": "13bb58ad7c61c9444df16430ac8bde95", "score": "0.66447717", "text": "public function edit($id)\n {\n //\n $url = \"program_update\";\n $program = Program::where('id_program', $id)->first();\n return view('master.program.form', compact('program', 'url'));\n }", "title": "" }, { "docid": "56e8e9b08c0406905beb3036122cd7af", "score": "0.6644097", "text": "public function edit()\n {\n return view('home::edit');\n }", "title": "" }, { "docid": "726fbec6ca5fcc7025d5ad34f1a23ae4", "score": "0.66306216", "text": "public function edit($id)\n\t{\n\t\treturn $this->view('product.edit', []);\n\t}", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6629497", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6629497", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "728e06e03d9c69b99cb774080f4aeedc", "score": "0.66255856", "text": "public function edit($id)\n {\n \t$decode = Hashids::decode($id)[0];\n $recipe = Recipe::find($decode);\n\n $formAction = action('RecipeController@update', $id);\n return view(\"backend/recipes/form\", compact('recipe', 'formAction'));\n }", "title": "" }, { "docid": "ba226cc5cbe521fc1ec6d9737f556687", "score": "0.6619321", "text": "public function edit(Entity $entity)\n {\n return view('actions.entity.edit', compact('entity'));\n }", "title": "" }, { "docid": "472228351e7887542be13d4c2080e6b7", "score": "0.6615089", "text": "public function actionEdit()\n {\n return $this->render('index');\n }", "title": "" }, { "docid": "ed2b2f4ad09fa837c01addc64ae2c574", "score": "0.6613416", "text": "public function edit($id)\n {\n //\n\n $book = Book::find($id);\n return view('kelola_buku.form_edit',compact('book'));\n\n }", "title": "" }, { "docid": "66837fc9fc0ee5928b83285bf597aa8d", "score": "0.661021", "text": "public function edit($id)\n\t{\n // get the show\n\t\t$show = Show::find($id);\n\n\t\t// show the edit form and pass the nerd\n\t\treturn View::make('shows.edit')\n\t\t\t->with('show', $show);\n\t}", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.6610172", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.6609937", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.6609937", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.6609937", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.6609937", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.6609937", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.6609937", "text": "public function edit($id);", "title": "" }, { "docid": "4a58f356a8d049651b8ab4fb9678c3e0", "score": "0.66074497", "text": "public function edit($id)\n {\n $className = $this->modelClass;\n $model = $className::findOrFail($id);\n \n return view('admin.update')\n ->with('pageTitle', $this->pageTitle)\n ->with('secondTitle', $this->secondTitle)\n ->with('updateTitle', $this->updateTitle)\n ->with('urlName', $this->urlName)\n ->with('fields', $this->fields)\n ->with('model', $model);\n }", "title": "" }, { "docid": "4c5588355977302054cfd9b100838cb9", "score": "0.6605141", "text": "public function edit($id)\n {\n\t\t$sRow = \\App\\Models\\Master\\SMD\\Owner::find($id);\n\t\treturn view('Master.SMD.owner_form')->with( array('sRow'=>\t$sRow, 'sShow'=> false) );\n }", "title": "" }, { "docid": "dfbae1c76e8376876e167bfdda34a588", "score": "0.6602554", "text": "public function edit($entity);", "title": "" }, { "docid": "087b45daa3af8c19f727d1f3385fe015", "score": "0.6601881", "text": "public function showEdit($id) {\n //\n }", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6598295", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "8259db386503d6eae96505af980a406f", "score": "0.65979", "text": "public function edit()\n {\n return view('basajax::edit');\n }", "title": "" }, { "docid": "8cb14fe6247e5b9988a5ac22e2f4f5db", "score": "0.65955967", "text": "public function edit()\n {\n return view('page::edit');\n }", "title": "" }, { "docid": "740a6ee4ee5d75e1d22a5d50c92d7a7d", "score": "0.65930474", "text": "public function edit()\n {\n // will be shown by angular\n }", "title": "" }, { "docid": "e77b4a1d450f192da67f95bae41d70d2", "score": "0.65893835", "text": "public function edit()\n {\n return view('shopify::edit');\n }", "title": "" }, { "docid": "34a5f2387b26650a994b3549c4251646", "score": "0.6585542", "text": "protected function editAction()\n {\n $this->editAction\n ->setAccess($this, Access::CAN_EDIT)\n ->execute($this, UserEntity::class, UserActionEvent::class, NULL, __METHOD__, [], ['user_id' => $this->thisRouteID()])\n ->render()\n ->with(['user' => $this->toArray($this->findOr404())])\n ->form($this->formUser)\n ->end();\n }", "title": "" }, { "docid": "4ee5eaeb20875ab52fdae081c9bf480a", "score": "0.6581471", "text": "public function edit($id){\n return $this->model->getForm('edit', $id);\n }", "title": "" }, { "docid": "c2b3a157b59989df8794ae251941ad58", "score": "0.6579401", "text": "public function edit($id)\n {\n $project = Project::withTrashed()->where('id', $id)->first();\n $form = new AdministrationForm();\n $form->route(Administration::route('projects.update', $project->id));\n $form->form(ProjectForm::class);\n $form->model($project);\n $form->method('PUT');\n\n Breadcrumbs::register('administration', function ($breadcrumbs) {\n $breadcrumbs->parent('base');\n $breadcrumbs->push(trans('projects::admin.module_name'), Administration::route('projects.index'));\n $breadcrumbs->push(trans('administration::admin.edit'));\n });\n\n Administration::setTitle(trans('projects::admin.module_name') . ' - ' . trans('administration::admin.edit'));\n\n return $form->generate();\n }", "title": "" }, { "docid": "e3ab1d1abd4a651c9d5aa4d8d1dfb2b4", "score": "0.6575369", "text": "public function edit($id) {\n\t\t//\n\t\t$this->product = $this->product->find($id);\n\t\treturn View::make('products.edit')->withProduct($this->product);\n\t}", "title": "" }, { "docid": "bf3f13b2122423abdd69599faa2c05bb", "score": "0.6574471", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FundeuisEducacionBundle:Programaacademico')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programaacademico entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FundeuisEducacionBundle:Programaacademico:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "bd5eb4f99db773898848f68b64807602", "score": "0.6573885", "text": "public function edit($id)\n {\n // busca regstro\n $this->repository->findOrFail($id);\n \n // autorizacao\n $this->repository->authorize('update');\n \n // breadcrumb\n $this->bc->addItem($this->repository->model->produto->produto, url('produto', $this->repository->model->produto->codproduto));\n $this->bc->header = $this->repository->model->descricao;\n $this->bc->addItem($this->repository->model->descricao);\n $this->bc->addItem('Alterar');\n \n // retorna formulario edit\n return view('produto-embalagem.edit', ['bc'=>$this->bc, 'model'=>$this->repository->model]);\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.6570687", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "4cb427c029c8f922bb5b7149e530dddc", "score": "0.6570183", "text": "public function edit($id)\n {\n $request = $this->expertMediaRequest->findOrFail($id);\n\n return view('admin.expertrequest.form', compact('request'));\n }", "title": "" }, { "docid": "7a2a16aa982fa32e1bbf88f19cbc245d", "score": "0.6569499", "text": "public function edit()\n {\n return view('initializer::edit');\n }", "title": "" }, { "docid": "fbe54f697c308404a46533310933e03d", "score": "0.65639853", "text": "public function edit(Form $Form)\n {\n //\n }", "title": "" }, { "docid": "45e4675e537bbfcb427d8919d16534d1", "score": "0.6562968", "text": "public function edit($id)\n {\n $model = $this->modelName;\n $item = $model::find($id);\n\n if (!$item) {\n msg('The requested item does not exist or has been deleted.', 'danger');\n return redirect()->route(\"admin.{$this->moduleLower}.index\");\n }\n\n $thisObj = $this;\n Former::populate($item);\n $formButtons = $this->formButtons(__FUNCTION__, $item, null);\n $statusButton = function ($item) use ($thisObj) {\n return $thisObj->renderStatusButtons($item);\n };\n\n // Add validation from model to former\n $validationRules = $model::rulesMergeUpdate();\n\n return view(\"{$this->viewBase}.edit\",\n compact(\n 'item',\n 'formButtons',\n 'statusButton',\n 'validationRules'\n ));\n }", "title": "" }, { "docid": "3e70ed023b5dd49a994b2dcecd6ad17d", "score": "0.65613735", "text": "public function editProductForm($id)\n {\n\n //fetch a single product data from the db with id\n $product = Product::find($id);\n\n return view(\"admin.editProductForm\", [\"product\"=>$product]);\n\n }", "title": "" }, { "docid": "56a9fdf978586649b9ba34518312ed30", "score": "0.65600145", "text": "public function edit($id)\n {\n $record = $this->singular;\n $data = $this->service->repository()->getRecord($id);\n $$record = $data;\n\n return view($this->views['edit'], compact($record));\n }", "title": "" }, { "docid": "e5d9b07a25e49927272f5d8d6bb0851b", "score": "0.6558671", "text": "public function edit($id)\n\t{\n return View::make('applications.edit');\n\t}", "title": "" }, { "docid": "b820ff73eff2193b50fc7631693ea243", "score": "0.6557456", "text": "function resources_edit($js, $file) {\n // Setup ctools modal variables.\n $form_state['ajax'] = $js;\n $form_state['build_info']['args'] = array();\n $form_state['cache'] = TRUE;\n\n // Set modal title\n $resource_info = resources_get_info_by_file($file);\n $form_state['title'] = t('Edit @type', array('@type' => $resource_info['label']));\n\n // Get the resource type information.\n $resource_types = resources_get_info();\n\n // Figure out the resource type from the scheme.\n // @todo: Extract into resources_get_info.\n foreach ($resource_types as $resource_type => $resource_type_info) {\n if (variable_get('resources_' . $resource_type . '_file_type', '') === $file->type) {\n $form_state['resource_type'] = $resource_type;\n break;\n }\n }\n\n // Keep track of the file object.\n $form_state['file'] = $file;\n\n // Add file entity form.\n form_load_include($form_state, 'pages.inc', 'file_entity');\n\n // Add more modal information.\n ctools_include('modal');\n\n // Get the ctools version of the form.\n $output = ctools_modal_form_wrapper('resources_edit_form', $form_state);\n\n // If we are not using javascript then just return the output.\n if (!$js) {\n return $output;\n }\n\n // Set the ctools form settings to a commands variable we'll use to combine\n // other commands.\n $commands = $output;\n\n // If a button executes the form but also flags the form to be rebuilt, do not\n // treat it as an actual form submission, and do not close the modal.\n if (!empty($form_state['executed']) && !$form_state['rebuild']) {\n // Add ajax javascript from ctools.\n ctools_include('ajax');\n\n // Add our javascript.\n ctools_add_js('resources-modal-helper', 'resources');\n $commands = array();\n // If there are status messages, print them.\n if ($messages = theme('status_messages')) {\n $commands[] = ajax_command_html('#console', $messages);\n }\n\n // Add the javascript function we want to call.\n // Pass the rendered output of a resource and the fid.\n $commands[] = array(\n 'command' => 'resources_edit_resource',\n 'resource' => _resources_generate_resource_preview_html($form_state['file']),\n 'fid' => $form_state['file']->fid,\n );\n\n // Close the modal.\n $commands[] = ctools_modal_command_dismiss();\n }\n print ajax_render($commands);\n exit();\n}", "title": "" }, { "docid": "b06e6a42f2e8bf527923d5480998d1f4", "score": "0.6552953", "text": "public function edit($id)\n\t{\n $employee = Employee::find($id);\n\n return View::make('employee.edit')\n ->with('employee', $employee);\n\t}", "title": "" }, { "docid": "a7e2c450a9ec8d35cddcb8dabd65d41c", "score": "0.6548956", "text": "public function edit($id)\n {\n $formulario = Formulario::findOrFail($id);\n\n return view('formulario.edit', compact('formulario'));\n }", "title": "" }, { "docid": "8ffff9b8ef10bb7d3e390e5ab3a54d03", "score": "0.65474546", "text": "public function editAction()\n {\n View::renderTwigTemplate('/UserDetail/edit.html', [\n 'user' => Authenticate::getUser()\n ]);\n }", "title": "" }, { "docid": "a171c7211a9f37ff1b48786fe5cc4a57", "score": "0.6545995", "text": "public function edit()\r\n {\r\n $model = new ProductModel();\r\n\r\n $model->loadData($this->request->all());\r\n $model->loadData($model->one(\"id = $model->id\"));\r\n\r\n echo $this->view(\"productUpdate\", \"main\", $model);\r\n }", "title": "" }, { "docid": "0e871b4496a7eeea573b74dde7e4b70e", "score": "0.65448076", "text": "public function edit($id)\n {\n $form = Form::findOrFail($id);\n $this->authorize('update', $form);\n $platforms = $this->getPlatforms();\n return view('web.form.create')->with([\n 'method' => 'PUT',\n 'url' => route('web.form.update', $id),\n 'form' => $form,\n 'wechatPlatforms' => $platforms,\n ]);\n }", "title": "" }, { "docid": "3ca8fe1ab3811a7f61b09f62a71b8e9a", "score": "0.6542176", "text": "public function edit($id)\n\t{\n\t\ttry {\n\t\t\t$employee = Employee::findOrFail($id);\n\t\t\treturn View::make('employees.edit', ['employee'=>$employee]);\n\t\t\t\n\t\t} catch (ModelNotFoundException $e) {\n\t\t\treturn View::make('errors.model');\n\t\t}\n\n\t}", "title": "" }, { "docid": "9e0e527bb293d8f6f1f6889c0969986d", "score": "0.65403897", "text": "function edit(){\n\t\t$id = $this->input->get('id');\n\t\t$data = array();\n\t\t$data['title']\t\t= 'Edit '.$this->title;\n\t\t$data['controller']\t= $this->controller;\n\t\t$data['state']\t\t= 'edit';\n\t\t$data['id'] \t\t= $id;\n\n\t\t// because it's simple index and form, use user form\n\t\t$data['table_field'] = $this->user->table_field;\n\t\tforeach ($data['table_field'] as $i => $tf) {\n\t\t\tif($tf['type'] == 'select'){\n\t\t\t\t$this->load->model($tf['value'][0]);\n\t\t\t\t$data['table_field'][$i]['value'] = $this->{$tf['value'][0]}->populate_select($tf['value'][1], $tf['value'][2], $tf['value'][3]);\n\t\t\t}elseif($tf['type'] == 'select-year'){\n\t\t\t\t$this->load->model($tf['value'][0]);\n\t\t\t\t$data['table_field'][$i]['value'] = $this->{$tf['value'][0]}->populate_select_year($tf['value'][1], $tf['value'][2], $tf['value'][3]);\n\t\t\t}\n\t\t}\n\t\t$data['primary_key'] = $this->user->primary_key;\n\t\t$data['content']\t= 'content/common/form';\n\t\t$data['datas'] = $this->user->get(decrypt_id($id));\n\n\t\t$data['datas'] = $this->user->reformat_sql_to_form($data['datas']);\n\n\t\t$this->template($data);\n\t}", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.6540291", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "1283f826be7043d4d5a97c16e640665a", "score": "0.6536525", "text": "public function edit()\n {\n return view('moduleshop::edit');\n }", "title": "" }, { "docid": "4a8ca9e90c9a453275db5ced549faeff", "score": "0.6534423", "text": "public function edit($id)\n\t{\n\t\t$contactinfo = ContactInfo::find($id);\n\t \n\t \n\t\treturn view('admin.contactinfo.edit', compact('contactinfo'));\n\t}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "8e8e03727ca6544a2d009483f6d1aca9", "score": "0.0", "text": "public function destroy($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "4b8255c05a264d5d61f546d7bcd507ce", "score": "0.6672584", "text": "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4c5eebff0d9ed2cb7fdb134bb4660b64", "score": "0.6635911", "text": "public function removeResource($resourceID)\n\t\t{\n\t\t}", "title": "" }, { "docid": "9128270ecb10fe081d7b27ed99999426", "score": "0.6632799", "text": "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 }", "title": "" }, { "docid": "ca4c6cd0f72c6610d38f362f323ea885", "score": "0.6626075", "text": "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 }", "title": "" }, { "docid": "22e99170ed44ab8bba05c4fea1103beb", "score": "0.65424126", "text": "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "title": "" }, { "docid": "08c524d5ed1004452df540e76fe51936", "score": "0.65416265", "text": "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "title": "" }, { "docid": "e615a714c70c0f1f81aa89e434fd9645", "score": "0.64648265", "text": "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "title": "" }, { "docid": "9699357cc7043ddf9be8cb5c6e2c5e9c", "score": "0.62882507", "text": "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "title": "" }, { "docid": "c14943151fb5ef8810fedb80b835112e", "score": "0.6175931", "text": "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "title": "" }, { "docid": "507601379884bfdf95ac02c4b7d340a0", "score": "0.6129922", "text": "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 }", "title": "" }, { "docid": "60da5cdaab3c2b4a3de543383ff7326a", "score": "0.60893893", "text": "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}", "title": "" }, { "docid": "ccaddaf8c48305cf51ff4f4e87f7f513", "score": "0.6054415", "text": "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}", "title": "" }, { "docid": "b96521ac0a45d4af2abd98a169f470e6", "score": "0.60428125", "text": "public function delete(): void\n {\n unlink($this->getPath());\n }", "title": "" }, { "docid": "5bb36f163668a235aa80821b0746c2bc", "score": "0.60064924", "text": "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "b549ee1a3239f6720bb4eae802ea1753", "score": "0.5930772", "text": "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "title": "" }, { "docid": "02436278b72d788803fbd1efa4067eef", "score": "0.59199584", "text": "public function delete(): void\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "67c2e1a96c6af4251ec2fe2211864e9b", "score": "0.5919811", "text": "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "title": "" }, { "docid": "e37d38c43b6eab9f0b20965c7e9b2769", "score": "0.5904504", "text": "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.5897263", "text": "public function remove() {}", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.58962846", "text": "public function remove() {}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "140b6c44eef77c79cbd9edc171fe8e75", "score": "0.5880124", "text": "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}", "title": "" }, { "docid": "72dc5bfa6ca53ddd2451fc0e14e6fcfe", "score": "0.58690923", "text": "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "b0b6f080ff9e00a37e1e141de8af472d", "score": "0.5863659", "text": "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 }", "title": "" }, { "docid": "c6821270bce7c29555a3d0ca63e8ff36", "score": "0.5809161", "text": "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "title": "" }, { "docid": "3053bc6cd29bad167b4fd69fe4e79d55", "score": "0.57735413", "text": "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 }", "title": "" }, { "docid": "81bac0e5ac8e3c967ba616afac4bfb1c", "score": "0.5760811", "text": "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "title": "" }, { "docid": "385e69d603b938952baeb3edc255a4ea", "score": "0.5753559", "text": "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}", "title": "" }, { "docid": "750ee1857a66f841616cd130d5793980", "score": "0.57492644", "text": "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 }", "title": "" }, { "docid": "7e6820819c67c0462053b11f5a065b9f", "score": "0.5741712", "text": "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "title": "" }, { "docid": "aa404011d4a23ac3716d0c9c1360bd20", "score": "0.57334286", "text": "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 }", "title": "" }, { "docid": "9a5dfeb522e8b8883397ebfbc0e9d95b", "score": "0.5726379", "text": "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "title": "" }, { "docid": "883f70738d6a177cbdf3fcaec9e9c05f", "score": "0.57144034", "text": "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "title": "" }, { "docid": "2d462647e81e7beec7f81e7f8d6c6d44", "score": "0.57096", "text": "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 }", "title": "" }, { "docid": "a165b9f8668bef9b0f1825244b82905e", "score": "0.5707689", "text": "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 }", "title": "" }, { "docid": "4a66b1c57cede253966e4300db4bab11", "score": "0.5705895", "text": "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "title": "" }, { "docid": "2709149ed9daaf760627fbe4d2405e47", "score": "0.5705634", "text": "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 }", "title": "" }, { "docid": "67396329aa493149cb669199ea7c214f", "score": "0.5703902", "text": "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "title": "" }, { "docid": "e41dcd69306378f20a25f414352d6e6b", "score": "0.5696585", "text": "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 }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "b2dc8d50c7715951df467e962657a927", "score": "0.56780374", "text": "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "title": "" }, { "docid": "88290b89858a6178671f929ae0a7ccba", "score": "0.5677111", "text": "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 }", "title": "" }, { "docid": "2a4e3a8a8005ff16e99e418fc0fb7070", "score": "0.5657287", "text": "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 }", "title": "" }, { "docid": "8b94ff007c35fa2c7485cebe32b8de85", "score": "0.5648262", "text": "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 }", "title": "" }, { "docid": "2752e2223b3497665cc8082d9af5a967", "score": "0.5648085", "text": "public function delete($path, $data = null);", "title": "" }, { "docid": "8cf7657c92ed341a5a4e1ac7b314cf43", "score": "0.5648012", "text": "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 }", "title": "" }, { "docid": "6d5e88f00765b5e87a96f6b729e85e80", "score": "0.5640759", "text": "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 }", "title": "" }, { "docid": "8d2b25e8c52af6b6f9ca5eaf78a8f1f3", "score": "0.5637738", "text": "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "title": "" }, { "docid": "f51aa1f231aecb530fa194d38c843872", "score": "0.5629985", "text": "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 }", "title": "" }, { "docid": "55778fabf13f94f1768b4b22168b7424", "score": "0.5619264", "text": "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 }", "title": "" }, { "docid": "9ab5356a10775bffcb2687c49ca9608f", "score": "0.56167465", "text": "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "title": "" }, { "docid": "899b20990ab10c8aa392aa33a563602b", "score": "0.5606877", "text": "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 }", "title": "" }, { "docid": "29d3e4879d0ed5074f12cb963276b7cc", "score": "0.56021434", "text": "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "title": "" }, { "docid": "4a4701a0636ba48a45c66b76683ed3b3", "score": "0.5601949", "text": "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 }", "title": "" }, { "docid": "342b5fc16c6f42ac6826e9c554c81f4d", "score": "0.55992156", "text": "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 }", "title": "" }, { "docid": "97e50e61326801fa4efc3704e9dd77c1", "score": "0.5598557", "text": "public function revoke($resource, $permission = null);", "title": "" }, { "docid": "735f27199050122f4622faba767b3c80", "score": "0.55897516", "text": "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 }", "title": "" }, { "docid": "0bf714a7cb850337696ea9631fca5494", "score": "0.5581397", "text": "function delete($path);", "title": "" }, { "docid": "975326d3c6d5786788886f6742b11b44", "score": "0.5566926", "text": "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "title": "" }, { "docid": "ea73af051ca124bba926c5047e1f799b", "score": "0.5566796", "text": "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "title": "" }, { "docid": "a85f6f9231c5a5b648efc0e34b009554", "score": "0.55642897", "text": "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 }", "title": "" }, { "docid": "9ef8b8850e1424f439f75a07b411de21", "score": "0.55641", "text": "public function remove($filePath){\n return Storage::delete($filePath);\n }", "title": "" }, { "docid": "a108cd06e3f66bf982b8aa3cd146a4e9", "score": "0.5556583", "text": "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 }", "title": "" }, { "docid": "7fbd1a887ad4dca00687bb4abce1ae49", "score": "0.5556536", "text": "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "fa18511086fe5d1183bd074bfc10c6a2", "score": "0.5550097", "text": "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "title": "" }, { "docid": "69bff5e9e4c411daf3e7807a7dd11559", "score": "0.5543172", "text": "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 }", "title": "" }, { "docid": "94cb51fff63ea161e1d8f04215cfe7bf", "score": "0.55422723", "text": "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 }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "0005f2e6964d036d888b5343fa80a1b1", "score": "0.55371785", "text": "public function deleted(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "986e2f38969cc302a2f6f8374b767ca1", "score": "0.55365825", "text": "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 }", "title": "" }, { "docid": "56658901e8b708769aa07c96dfbe3f61", "score": "0.55300397", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "2d63e538f10f999d0646bf28c44a70bf", "score": "0.552969", "text": "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 }", "title": "" }, { "docid": "b36cf6614522a902b216519e3592c3ba", "score": "0.55275744", "text": "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 }", "title": "" }, { "docid": "49dd28666d254d67648df959a9c54f52", "score": "0.55272335", "text": "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "16f630321e1871473166276f54219ee3", "score": "0.5525997", "text": "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}", "title": "" }, { "docid": "f79bb84fccbc8510950d481223fa2893", "score": "0.5525624", "text": "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 }", "title": "" }, { "docid": "dc750acc8639c8e37ae9a3994fa36c91", "score": "0.5523911", "text": "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}", "title": "" }, { "docid": "a298a1d973f91be0033ae123818041d0", "score": "0.5521122", "text": "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "title": "" }, { "docid": "909ecc5c540b861c88233aaecf4bde3b", "score": "0.5517412", "text": "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 }", "title": "" } ]
a3a6c777795adc4f3e54b4c207a4d04d
Alterar para o ambiente de testes
[ { "docid": "ad6cb2c203ae32021e6890f005ee8674", "score": "0.7551502", "text": "function alterarParaAmbienteDeTestes() {\n\t\t$this->_ambiente = self::AMBIENTE_TESTE;\n\t}", "title": "" } ]
[ { "docid": "3dc60061b6862720a076cfb23a0ac512", "score": "0.65273964", "text": "public function testAdministrationRestExporterAdministrationUpdateSettings()\n {\n\n }", "title": "" }, { "docid": "ef3a78261dd235f6e2e85152abcad938", "score": "0.62845266", "text": "public function testCrceGroupAdministrationUpdate()\n {\n\n }", "title": "" }, { "docid": "38532889d20387ff1c1c6548ebb8b0c6", "score": "0.6284396", "text": "public function tests()\n {\n $prod = $this->product->find(1);\n $prod->update([\n 'name' => 'Nome do Produto alterado',\n 'number' => '182411',\n 'active' => false,\n 'category' => 'electronics',\n 'description' => 'produto'\n ]);\n dd($prod->name);\n }", "title": "" }, { "docid": "e58cd0447f78ba7fa966a5d3d0bc9b3b", "score": "0.62357944", "text": "public function testCrceTariffChangeActivateTariff()\n {\n\n }", "title": "" }, { "docid": "88e5138880515c57851d0c350ac4eb82", "score": "0.61603004", "text": "function afficherTest() {\n\t}", "title": "" }, { "docid": "8ba6fea1d0e39696768523aba8ded014", "score": "0.6109558", "text": "public function testGetSuprimentoPatrimonio()\n {\n }", "title": "" }, { "docid": "43934546741057da87ed8b3640a078bb", "score": "0.6094781", "text": "public function testAddWorkAudit()\n {\n }", "title": "" }, { "docid": "96398aa2f0443284fc90be7552b2dc03", "score": "0.609319", "text": "function setUp()\n {\n $this->markTestSkipped('Teste funcional para a classe {{ entity_class }}Controller criado mas não ativo.');\n }", "title": "" }, { "docid": "04b378b8d54cf2b7e6e34efbd52d82d6", "score": "0.60672116", "text": "public function testTopupTopupServiceTopup()\n {\n\n }", "title": "" }, { "docid": "28611848eed1405e9d5c5b9d01145545", "score": "0.60662323", "text": "public function testAddFinanceSystemConnectionAudit()\n {\n }", "title": "" }, { "docid": "a150e9ac06ef7c1603d2dbe9d7965e8d", "score": "0.60413945", "text": "public function testUserUpdate()\n {\n\n }", "title": "" }, { "docid": "1d754c2ff494886ecc82d5132e025894", "score": "0.60355014", "text": "public function testTopupTopupServiceCommit()\n {\n\n }", "title": "" }, { "docid": "df48da29fc0f242237af5e11779c79b4", "score": "0.6006727", "text": "public function testUserManagev1userchangeStatus()\n {\n\n }", "title": "" }, { "docid": "c5070b07c72dfc17ba0e93ed0d9e23e5", "score": "0.6005635", "text": "public function testSerieUpdate()\n {\n }", "title": "" }, { "docid": "dfd165611176a2ab04f6beae858e0e9f", "score": "0.60053366", "text": "public function testRoomServiceUpdate()\n {\n }", "title": "" }, { "docid": "2575dd27e66a54ea80b8d0cffe823ef2", "score": "0.60041654", "text": "public function test_addItemAccountCodeAudit() {\n\n }", "title": "" }, { "docid": "20afcc89eb54af073e136d9913c20e1d", "score": "0.6001673", "text": "public function test_alterarConvenioUsingPUT() {\n\n }", "title": "" }, { "docid": "0b602546984d64281593084e5a70873e", "score": "0.5984807", "text": "static function setTestonly()\n {\n// It seems that this parameter isn't needed after all.\n// self::$arrFieldOptional['testOnly'] = 'yes';\n// Just go to the test server\n $this->useTestserver = true;\n }", "title": "" }, { "docid": "5da29cb5b31136fb2cb8f10db1a9092a", "score": "0.59768397", "text": "public function test_updateOrderSourceReservation() {\n\n }", "title": "" }, { "docid": "fac24351317876940fa33da21450a068", "score": "0.59752333", "text": "public function setTestAction($_test) {\n\n /*$helpersService = $this->get(\"app.helpers\");\n $httpResponse = $helpersService->collectionToHttpJsonResponse($_test);\n\n return $httpResponse;*/\n $userService = $this->get(\"ong.user\");\n\n $userService->insertUser();\n //$userService->deleteUser();\n die();\n }", "title": "" }, { "docid": "67ce527527ee07eec29ac82e3a7b14e6", "score": "0.5966528", "text": "protected function test(): void {\r\n\t\r\n\t}", "title": "" }, { "docid": "cc50db61a2358918d40855e7286a7336", "score": "0.59643257", "text": "public function testVisualizarProdutosLogado(){\n \n \n \n }", "title": "" }, { "docid": "204e31b7e430eb21fbdb1d6517c056d0", "score": "0.5941806", "text": "public function testCase()\n {\n // $pengajarAbsensi = Pengajar::latest()->first();\n // $nisn_siswa = Detail::where('role_status', 'siswa')->first();\n // $saveAbsensi = $absensi->create([\n // 'kode_pengajar' => $pengajarAbsensi->kode_pengajar,\n // 'kode_kelas' => $pengajarAbsensi->kelas->kode_kelas,\n // 'kode_semester' => $pengajarAbsensi->semester->kode_semester,\n // 'kode_matapelajaran' => $pengajarAbsensi->matapelajaran->kode_matapelajaran,\n // 'nisn_siswa' => $nisn_siswa->nip_nisn,\n // 'nisn_siswa' => $nisn_siswa->nip_nisn,\n // 'waktu_absen' => now(),\n // 'tanggal_absen' => now(),\n // 'status_absen' => 'Hadir',\n // 'created_at' => now(),\n // 'updated_at' => now()\n // ]);\n // $saveAbsensi->pengajar()->associate($pengajarAbsensi->id);\n // $saveAbsensi->detail()->associate($nisn_siswa->id);\n // $saveAbsensi->save();\n // dd($saveAbsensi);\n }", "title": "" }, { "docid": "d54ff5ae6f646458f49b8dd48ebdf343", "score": "0.5939309", "text": "public function enableTest() {\n\t\t$this->test = true;\n\t}", "title": "" }, { "docid": "ac43ccec4cbfa10208daa445a871a64e", "score": "0.59337693", "text": "public function testUserManagev1usermassEdit()\n {\n\n }", "title": "" }, { "docid": "b782009610fa7775a4120e3023e787c4", "score": "0.59212285", "text": "public function testRtmRetailManagerTopup()\n {\n\n }", "title": "" }, { "docid": "869ed7ddd708da0d12feeafd0b9fc85c", "score": "0.59208006", "text": "public function testUnitClassUpdate()\r\n {\r\n\r\n }", "title": "" }, { "docid": "efd2b2bac34467b36e3f83eb22541494", "score": "0.59175754", "text": "public function test_updateOrderSourceReservationCustomFields() {\n\n }", "title": "" }, { "docid": "997c779d15ca0830087eb6f4c0c9b32f", "score": "0.59129125", "text": "public function testAdministrationRestExporterAdministrationRefreshSettingsCache()\n {\n\n }", "title": "" }, { "docid": "b4aefd83eb431a3492595d2e5724c4c1", "score": "0.58978415", "text": "function ajouterTest() {\n\t}", "title": "" }, { "docid": "a94d1b470dc390ef4fcf1be2098adb72", "score": "0.5890821", "text": "public function test_addWarehouseDocumentTypeAudit() {\n\n }", "title": "" }, { "docid": "240003e47a060a14c8961fe826b00f10", "score": "0.58889365", "text": "public function register_test()\n {\n }", "title": "" }, { "docid": "3cc70702f1803fb621f1de3ec52aa77f", "score": "0.58886707", "text": "public function testUserDisableTFA()\n {\n\n }", "title": "" }, { "docid": "8828f2f88d75c802427222b66c1fff0e", "score": "0.5858243", "text": "public function testUserManagev1useridUsersettings()\n {\n\n }", "title": "" }, { "docid": "b7534139eb6b2a9da04b19f3322dc498", "score": "0.5851299", "text": "public function test_updateItemAccountCode() {\n\n }", "title": "" }, { "docid": "c85964b57404cc6983100827216692f4", "score": "0.5849482", "text": "public function testAddWorkActivityAudit()\n {\n }", "title": "" }, { "docid": "347158c2a711e87d365ca0625ab1dd45", "score": "0.58489037", "text": "public function testUserConfirmEnableTFA()\n {\n\n }", "title": "" }, { "docid": "8c7836026b5425f9b29c8c444ec64ae4", "score": "0.5840771", "text": "public function testRichiestaEmissioneScandenza(){\n \n $repo = new ConvenzioneRepository($this->app); \n $service = new ConvenzioneService($repo);\n\n $entity = new Scadenza; \n \n $user = User::where('email','enrico.oliva@uniurb.it')->first(); \n $this->actingAs($user);\n\n $data = ScadenzaTest::getArrayScadenza();\n $data['convenzione_id']= ConvenzioneData::getOrCreateDefaultConvenzione()->id;\n $entity->fill($data); \n $res = $entity->save(); \n\n // $requestdata = '{\n // \"id\":11,\n // \"convenzione_id\":12,\n // \"data_tranche\":\"19-05-2019\",\n // \"dovuto_tranche\":\"9999.00\",\n // \"data_emisrichiesta\":null,\"protnum_emisrichiesta\":null,\"data_fattura\":\"\",\"num_fattura\":null,\"data_ordincasso\":\"\",\"num_ordincasso\":null,\"prelievo\":null,\"note\":null,\n // \"state\":\"attivo\",\n // \"transitions\":[{\"label\":\"Attiva\",\"value\":\"self_transition\",\"transitions\":{}},{\"label\":\"Richiesta emissione\",\"value\":\"richiestaemissione\",\"transitions\":{}}],\n // \"convenzione\":{\"id\":12,\"descrizione_titolo\":\"convenzione di esempio\"},\n // \"assignments\":[{\"v_ie_ru_personale_id_ab\":\"39842\"}],\"unitaorganizzativa_uo\":\"005680\",\"respons_v_ie_ru_personale_id_ab\":\"5266\",\n // \"description\":\"richiesta emissione ...\"}'\n // ;\n\n $data = $entity->toArray();\n $data['transitions'] = json_decode('[{\"label\":\"Attiva\",\"value\":\"self_transition\",\"transitions\":{}},{\"label\":\"Richiesta emissione\",\"value\":\"richiestaemissione\",\"transitions\":{}}]'); \n $data['assignments'] = [\n [\"v_ie_ru_personale_id_ab\"=>\"39842\"]\n ];\n $data['unitaorganizzativa_uo'] = \"005680\";\n $data[\"respons_v_ie_ru_personale_id_ab\"] = \"5266\";\n $data['tipo_emissione'] = 'FATTURA_ELETTRONICA';\n $data['description'] = \"richiesta emissione ...\";\n\n //richiesta di emissione \n $request = new \\Illuminate\\Http\\Request();\n $request->setMethod('POST');\n $request->replace($data);\n\n $scad = $service->updateRichiestaEmissioneStep($request);\n\n //1) la scadenza deve essere nello stato di inrichiestaemissione\n $this->assertNotNull($scad); \n $this->assertEquals('inemissione', $scad->state); \n\n $scad->delete();\n $scad->usertasks()->delete(); \n $scad->convenzione->usertasks()->delete(); \n $repo->delete($scad->convenzione_id);\n }", "title": "" }, { "docid": "c25dac730f3307cd61907a4ff3d094ff", "score": "0.5820455", "text": "public function testAddPerpetualInventoryLogAudit()\n {\n }", "title": "" }, { "docid": "236e43ec63859095c8e61163b358b2db", "score": "0.5817445", "text": "public function testTopupTopupServiceInit()\n {\n\n }", "title": "" }, { "docid": "2bc3bf3322b3e90931f8d9e0b2152ddb", "score": "0.58111286", "text": "public function testPaginaEditar()\n {\n //criar um pessoa\n $pessoa = factory(Pessoa::class)->create();\n $response = $this->get(\"/ranking/$pessoa->id/edit\");\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "80bf2985c678381088e0458b993c66f7", "score": "0.5810914", "text": "public function testPostUpdateAll()\n {\n\n }", "title": "" }, { "docid": "f0f6e1d4cb3dcd46c3d59abaa47bac9a", "score": "0.58026177", "text": "public function setup()\n {\n $env = getenv('ENV');\n //o jenkins tem configurações especiais\n if (!$env || $env != 'jenkins') {\n putenv(\"ENV=testing\");\n $env = 'testing';\n }\n \n putenv('PROJECT_ROOT=' . __DIR__ . '/../../../../../');\n parent::setup();\n\n //arquivo de configuração da aplicação\n $config = include __DIR__ . '/../../../../../config/tests.config.php';\n $config['module_listener_options']['config_static_paths'] = array();\n\n //cria um novo ServiceManager\n $this->serviceManager = new ServiceManager(\n new ServiceManagerConfig(\n isset($config['service_manager']) ? $config['service_manager'] : array()\n )\n );\n\n //configura os serviços básicos no ServiceManager\n $this->serviceManager->setService('ApplicationConfig', $config);\n $this->serviceManager->setFactory('ServiceListener', 'Zend\\Mvc\\Service\\ServiceListenerFactory');\n\n //verifica se os módulos possuem rotas configuradas e carrega elas para serem usadas pelo ControllerTestCase\n $moduleManager = $this->serviceManager->get('ModuleManager');\n $moduleManager->loadModules();\n $this->routes = array();\n $testConfig = false;\n //carrega as rotas dos módulos\n foreach ($moduleManager->getLoadedModules() as $m) {\n $moduleConfig = $m->getConfig();\n $this->getModuleRoutes($moduleConfig);\n \n $moduleName = explode('\\\\', get_class($m));\n $moduleName = $moduleName[0];\n //verifica se existe um arquivo de configuração específico no módulo para testes\n if (file_exists(getcwd() . '/module/' . ucfirst($moduleName) . '/config/test.config.php')) {\n $testConfig = include getcwd() . '/module/' . ucfirst($moduleName) . '/config/test.config.php';\n array_unshift($config['module_listener_options']['config_static_paths'], $testConfig[$env]);\n }\n }\n\n if (!$testConfig) {\n $config['module_listener_options']['config_static_paths'] = array(getcwd() . '/config/tests.config.php');\n }\n $this->config = include $config['module_listener_options']['config_static_paths'][0];\n $this->serviceManager->setAllowOverride(true);\n\n //instancia a aplicação e configura os eventos e rotas\n $this->application = $this->serviceManager->get('Application');\n $this->event = new MvcEvent();\n $this->event->setTarget($this->application);\n $this->event->setApplication($this->application)\n ->setRequest($this->application->getRequest())\n ->setResponse($this->application->getResponse())\n ->setRouter($this->serviceManager->get('Router'));\n\n $this->entityManager = $this->getEntityManager();\n $this->dropDatabase();\n $this->createDatabase();\n }", "title": "" }, { "docid": "6849f4b54651cb3ff98c3dd5644a06f7", "score": "0.58007973", "text": "public function testCrceBundleAdministrationActivate()\n {\n\n }", "title": "" }, { "docid": "88a6bfd6ebcfe2f95834f22d2cdef445", "score": "0.57950616", "text": "public function testUserRequestEnableTFA()\n {\n\n }", "title": "" }, { "docid": "7946fdb7ad97bdb07526de8e6c23e4d3", "score": "0.5794793", "text": "protected function setUp() {\n $this->object = new EdaAccesoAmbito();\n\n $this->fecha = date(\"Y-m-d H:m:s\");\n\n $this->datos[0] = 18; // Id\n $this->datos[1] = 1; // Id_acceso\n $this->datos[2] = 1; // Id_ambito\n $this->datos[3] = $this->fecha; // fecha_inicio\n $this->datos[4] = $this->fecha; // fecha_fin\n $this->datos[5] = $this->fecha; // fecha_caducidad\n $this->datos[6] = 0; // estado\n\n }", "title": "" }, { "docid": "f3319d67f53ace139b63ca54a4407d54", "score": "0.5789168", "text": "public function testPatchUser()\n {\n }", "title": "" }, { "docid": "6ddc12dcd8a795f1ca4434cf6cedd618", "score": "0.5782107", "text": "public function testEmissionePagamento(){\n $repo = new ConvenzioneRepository($this->app); \n $service = new ConvenzioneService($repo);\n\n $scad = new Scadenza; \n \n $user = User::where('email','enrico.oliva@uniurb.it')->first(); \n $this->actingAs($user);\n //preparazione dati\n $data = ScadenzaTest::getArrayScadenza(); \n $data['convenzione_id']= ConvenzioneData::getOrCreateDefaultConvenzione($user)->id;\n $scad->fill($data); \n //stato iniziale \n $scad->state = 'attivo'; \n $res = $scad->save(); \n\n //forzo passaggio a inemissione \n $scad->data_emisrichiesta = Carbon::now()->format(config('unidem.date_format'));\n $scad->workflow_apply('richiestaemissione', $scad->getWorkflowName()); \n $scad->save();\n\n //json di emissione con allegato \n $datarequest = json_decode('{\"attachment1\":{\"attachmenttype_codice\":\"NOTA_DEBITO\",\n \"filevalue\":null,\"doc\":{\"oggetto\":\"UniConv sottoscrizione Lettera di trasmissione completamento\",\n \"num_prot\":\"2019-UNURCLE-0008593\",\"nrecord\":\"000822917-UNURCLE-071938c8-ef70-46b3-bd82-fb3edf8bdf2d\",\"tipo\":\"partenza\",\"anno\":\"2019\",\"data_prot\":\"14-05-2019\"}\n },\"data_fattura\": \"14-05-2019\", \"num_fattura\":\"78917\"}',true); \n $datarequest['id'] = $scad->id;\n $datarequest['convenzione_id'] = $data['convenzione_id'];\n \n $request = new \\Illuminate\\Http\\Request();\n $request->setMethod('POST');\n $request->replace($datarequest);\n\n $scad = $service->updateEmissioneStep($request);\n $scad = $service->updateModificaEmissioneStep($request);\n\n //controllare il nuovo stato della scadenza \n $this->assertNotNull($scad); \n $this->assertEquals('inpagamento',$scad->state);\n\n //verifico la creazione di un nuovo task stato aperto model\n $task= UserTask::where('model_id',$scad->id)\n ->where('model_type',Scadenza::class)\n ->where('state','aperto')\n ->where('workflow_place','inpagamento')->first();\n\n $this->assertNotNull($task); \n\n $datarequest = json_decode('{\"prelievo\":\"PRE_10\",\"note\":\"chiudo\",\"num_ordincasso\": \"8282\",\"data_ordincasso\": \"18-05-2019\"}',true); \n $datarequest['id'] = $scad->id;\n $datarequest['convenzione_id'] = $data['convenzione_id'];\n \n $request = new \\Illuminate\\Http\\Request();\n $request->setMethod('POST');\n $request->replace($datarequest);\n\n $scad = $service->updatePagamentoStep($request);\n\n $this->assertNotNull($scad); \n $this->assertEquals($scad->num_ordincasso,\"8282\"); \n \n //verifico la creazione di un nuovo task stato aperto model\n $task= UserTask::where('model_id',$scad->id)\n ->where('model_type',Scadenza::class)\n ->where('state','completato')\n ->where('workflow_place','inpagamento')->first();\n\n $this->assertNotNull($task); \n\n $scad->delete();\n $scad->usertasks()->delete();\n $scad->convenzione->usertasks()->delete();\n $repo->delete($scad->convenzione_id);\n }", "title": "" }, { "docid": "46b3172ab9c030e6b827856141dc43ef", "score": "0.5779097", "text": "public function testGetAuditApp()\n {\n }", "title": "" }, { "docid": "86456374ffd805d1243271ee639dec4b", "score": "0.5772998", "text": "public function testAccessAccessManagementServiceAddVersions()\n {\n\n }", "title": "" }, { "docid": "3ebc1d8e1a6bc5dd19687d77c7e7f2ae", "score": "0.5772156", "text": "public function test_addOrderSourceReservationAudit() {\n\n }", "title": "" }, { "docid": "304fe610a7e160116b2325857c57b166", "score": "0.5764479", "text": "public function testAdministrationRestExporterAdministrationSetConfiguration()\n {\n\n }", "title": "" }, { "docid": "c05d12a5c155961aa737f0b64c38ff55", "score": "0.5764234", "text": "public function testUserManagev1useridUsersettings0()\n {\n\n }", "title": "" }, { "docid": "8485e1e167ed8c49db1924cd4c805848", "score": "0.5763632", "text": "public function testCrceTariffActivatePlan()\n {\n\n }", "title": "" }, { "docid": "fcea7a5ca74751cc637c316ff21e3263", "score": "0.57631797", "text": "public function testAdministrationRestExporterAdministrationSendFeedback()\n {\n\n }", "title": "" }, { "docid": "9332f41644d7e147405a56f7d424d2ac", "score": "0.5756453", "text": "public function setTestEnvironment()\n\t{\n\t\t$this->database = $this->database_tests;\n\t}", "title": "" }, { "docid": "3dc6ab8773a78be1b1516c044045ffe5", "score": "0.5755123", "text": "public function setUpTestDatabase()\n {\n \n }", "title": "" }, { "docid": "66dcb03e5273db6972f1a666455807f0", "score": "0.575176", "text": "public function testServicesPut()\n {\n\n }", "title": "" }, { "docid": "0447c083f70f579effa2d88240349e3f", "score": "0.57436407", "text": "public function testGetDuplicateFinanceSystemConnectionById()\n {\n }", "title": "" }, { "docid": "9a7c1df01cd2cc17f32e8c94487da567", "score": "0.5742527", "text": "public function testAppsUpdateInstance()\n {\n }", "title": "" }, { "docid": "997c61002a2e70bb909cf4d650400f3d", "score": "0.57381207", "text": "public function testCreateEstoqueSala()\n {\n\n }", "title": "" }, { "docid": "f88659376311885692a33fa99b8e9d5e", "score": "0.5737755", "text": "public function testAddAgent()\n {\n }", "title": "" }, { "docid": "7c1e4a4e2b91e13611b6c44bcbf09bad", "score": "0.57377386", "text": "protected function setUp()\n {\n $this->_json = new Admin_Frontend_Json();\n \n $this->objects['initialGroup'] = new Tinebase_Model_Group(array(\n 'name' => 'tine20phpunit',\n 'description' => 'initial group'\n )); \n \n $this->objects['updatedGroup'] = new Tinebase_Model_Group(array(\n 'name' => 'tine20phpunit',\n 'description' => 'updated group'\n )); \n \n $this->objects['user'] = new Tinebase_Model_FullUser(array(\n 'accountLoginName' => 'tine20phpunit',\n 'accountDisplayName' => 'tine20phpunit',\n 'accountStatus' => 'enabled',\n 'accountExpires' => NULL,\n 'accountPrimaryGroup' => Tinebase_Group::getInstance()->getGroupByName('Users')->getId(),\n 'accountLastName' => 'Tine 2.0',\n 'accountFirstName' => 'PHPUnit',\n 'accountEmailAddress' => 'phpunit@metaways.de'\n )); \n \n if (Tinebase_Application::getInstance()->isInstalled('Addressbook') === true) {\n $internalAddressbook = Tinebase_Container::getInstance()->getContainerByName('Addressbook', 'Internal Contacts', Tinebase_Model_Container::TYPE_SHARED);\n\n $this->objects['initialGroup']->container_id = $internalAddressbook->getId();\n $this->objects['updatedGroup']->container_id = $internalAddressbook->getId();\n $this->objects['user']->container_id = $internalAddressbook->getId();\n }\n\n $this->objects['application'] = Tinebase_Application::getInstance()->getApplicationByName('Crm');\n \n $this->objects['role'] = new Tinebase_Model_Role(array(\n 'name' => 'phpunit test role',\n 'description' => 'phpunit test role',\n ));\n \n $translate = Tinebase_Translation::getTranslation('Tinebase');\n \n // add account for group / role member tests\n try {\n $user = Tinebase_User::getInstance()->getUserByLoginName($this->objects['user']->accountLoginName);\n } catch (Tinebase_Exception_NotFound $e) {\n $this->objects['user'] = Admin_Controller_User::getInstance()->create($this->objects['user'], 'lars', 'lars');\n }\n }", "title": "" }, { "docid": "4757a28ddea228f292faaf5b30e8a186", "score": "0.57368994", "text": "public function testCrceBundleAdministrationGetActive()\n {\n\n }", "title": "" }, { "docid": "5d23279606941bb4d6eedf3d71d7b3cf", "score": "0.573355", "text": "public function testGetEstoqueSala()\n {\n\n }", "title": "" }, { "docid": "a7efd3eace34e9cdf7e23c1c4bdbf8fc", "score": "0.57325596", "text": "public function beforeTestExecution(TestEvent $e)\n {\n\n }", "title": "" }, { "docid": "05c7a5466c53883034760a90e48214a0", "score": "0.57211125", "text": "public function testPutIntegrationConfigCurrent()\n {\n }", "title": "" }, { "docid": "af75191c67099262e5bd1e23f406fe1b", "score": "0.57194334", "text": "protected function setUp()\n {\n parent::setUp();\n \n $now = date('Y-m-d H:i:m');\n \n $tabletest1 = self::$Web2All->Factory->Web2All_Table_ObjectTest_TableTest1($this->db);\n $tabletest1->updated = $now;\n $basename = 'Test ';\n for($i=1;$i<=5;$i++){\n $tabletest1->name = $basename.$i;\n $tabletest1->insertIntoDB(false);\n }\n $tabletest1->flush();\n }", "title": "" }, { "docid": "07fa5d1d904bdc885a2ac1efae49a057", "score": "0.57192504", "text": "public function test_user_dapat_update_status_sebuah_proyek_existing()\n {\n\n\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "11edc2c62c5a126331134477acaf66aa", "score": "0.57172894", "text": "public function testSessionUpdate()\n {\n }", "title": "" }, { "docid": "65e143d52cfc65d56d1657370686e2fe", "score": "0.5715437", "text": "public function testAtualizarPostagemEditalTituloValido()\n {\n $user = factory(User::class)->create(['cpf'=>'999.999.999-99',]);\n factory(Conta::class)->create(['user_id'=>$user->id,]);\n $postagem = factory(Postagem::class)->create(['titulo'=>'Postagem teste','user_id'=>$user->id,'tipo_postagem'=>'edital']);\n $this->assertDatabaseHas('postagems',['tipo_postagem'=>'edital',\n 'titulo' =>$postagem->titulo,]);\n $this->assertDatabaseHas('contas', [\n 'user_id' =>$user->id,]);\n\t$postagem->update(['titulo'=>'Essa titulo está sendo atualizada para teste',]);\n $this->assertEquals('Essa titulo está sendo atualizada para teste',$postagem->titulo);\n \n }", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.5709263", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.5709263", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.5709263", "text": "protected function setUp() {}", "title": "" }, { "docid": "4fb39d42e88de5489b18d4cf4483f63c", "score": "0.5699812", "text": "public function beforeTestCase(TestCase $test) {\n\t\t\n\t\t}", "title": "" }, { "docid": "086503d43d674061033b3bf5f5daa89e", "score": "0.569114", "text": "public function testReplaceAccountMediaTts()\n {\n }", "title": "" }, { "docid": "d2f8aa99db549f0a115871411082ef1e", "score": "0.5690736", "text": "public function test_addOrderSourceReservation() {\n\n }", "title": "" }, { "docid": "f1a95d89bd66091d3488eb4d49c965c1", "score": "0.5684653", "text": "public function testSerieInactivate()\n {\n }", "title": "" }, { "docid": "04ccb3c677e82cd90858572367326000", "score": "0.56673515", "text": "public function testUserManagev1user0()\n {\n\n }", "title": "" }, { "docid": "0c608e2149c92a4748ebf1b87603fbef", "score": "0.56654364", "text": "public function setUp(){}", "title": "" }, { "docid": "122c2d39c198e9c4b359c788bd2f3ec0", "score": "0.56641436", "text": "public function testUserManagev1user()\n {\n\n }", "title": "" }, { "docid": "554b27392e769f2861144d7aabba4356", "score": "0.5661034", "text": "public function testReferralReferralServiceRedeem()\n {\n\n }", "title": "" }, { "docid": "c0c883d8cc35b328486cf5d48696a79d", "score": "0.5659726", "text": "public function testReplaceProjects()\n {\n }", "title": "" }, { "docid": "aed03d65a91de0d3f148998523272dad", "score": "0.56573474", "text": "public function testSerieActivate()\n {\n }", "title": "" }, { "docid": "86648bc40c69beb5f69a2a4065f19203", "score": "0.56497693", "text": "public function testUserManagev1useruserId()\n {\n\n }", "title": "" }, { "docid": "61a728a9157ca9d971e209520b32ab14", "score": "0.5646939", "text": "public function testScadenza(){ \n \n $user = User::where('email','test.admin@uniurb.it')->first(); \n $this->actingAs($user);\n \n $entity = new Scadenza; \n \n $data = ScadenzaTest::getArrayScadenza();\n $data['convenzione_id']= ConvenzioneData::getOrCreateDefaultConvenzione()->id;\n\n $entity->fill($data); \n $res = $entity->save(); \n $result = Scadenza::find($entity->id)->toArray();\n\n $this->assertEquals($data['data_tranche'], $result['data_tranche']); \n $this->assertEquals($data['dovuto_tranche'], $result['dovuto_tranche']); \n\n $entity->delete();\n $repo = new ConvenzioneRepository($this->app); \n $entity->usertasks()->delete();\n $entity->convenzione->usertasks()->delete();\n $repo->delete($entity->convenzione_id);\n //$az->delete();\n }", "title": "" }, { "docid": "dc045339a41f8f92eb1976f5b4df2fc5", "score": "0.56466454", "text": "public function testFlujoApp() {\n // el siguienteTest debe redirigirse al inicio de la app o directorio raiz\n\n $this->session(array('T' => 1, 'T_actual' => 1));\n $this->call('POST', 'siguienteTest');\n $this->assertRedirectedTo('/');\n\n // Si el T_actual (test actual) es igual a T (test permitidos)\n // se debe mantener en la pagina que tiene en el titulo Test 1\n\n $this->session(array('T' => 1, 'T_actual' => 0));\n $this->call('POST', 'siguienteTest');\n $this->contains('Test 1');\n }", "title": "" }, { "docid": "93761d14daba189655783ac2504368f0", "score": "0.5645445", "text": "public function testPatchAccountVoicemail()\n {\n }", "title": "" }, { "docid": "39c351a281475cc523f4593896d1cdda", "score": "0.56420374", "text": "public function testSave()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "39c351a281475cc523f4593896d1cdda", "score": "0.56420374", "text": "public function testSave()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "9437bdc55285667e7e201b8054eeb791", "score": "0.56401557", "text": "public function testDesignPermissionSetsIdReplacePost()\n {\n\n }", "title": "" }, { "docid": "4eade3bfc7118141007de37f82bf87f5", "score": "0.5633941", "text": "public function test_addItemAccountCode() {\n\n }", "title": "" }, { "docid": "0c40f175efd645cbfea8e45cc5ac4bff", "score": "0.5629974", "text": "public function testV1AdjustInventory()\n {\n\n }", "title": "" }, { "docid": "d1bc0d91b2b2f9bb84cc6eb7f5d34d5a", "score": "0.562782", "text": "public function setUp(){\n parent::setUp();\n }", "title": "" }, { "docid": "24748f0a934b817ab1c6b46ee1d156bc", "score": "0.56206536", "text": "public function testCrceAccountAdministrationCreateReservation()\n {\n\n }", "title": "" }, { "docid": "80f21fac578acd83298c02267e4ca45d", "score": "0.5617029", "text": "public function testCrceTariffChangeGetAllAvailable()\n {\n\n }", "title": "" }, { "docid": "d0aab23b771b370e7f56992c2c2c129a", "score": "0.56144387", "text": "public function testCrceGroupAdministrationUpdateCustomer()\n {\n\n }", "title": "" }, { "docid": "1740ab5c6f0823653fc9057f9129ba02", "score": "0.56120473", "text": "public function testUserManagev1userid()\n {\n\n }", "title": "" }, { "docid": "21a7ef28377972f75eea58bcf620f147", "score": "0.5609374", "text": "protected function setUp() {\n\t\t_elgg_services()->setValue('session', \\ElggSession::getMock());\n\t}", "title": "" }, { "docid": "16b5a2d2f86de256a858c0954472735d", "score": "0.5608559", "text": "public function testCrceAccountAdministrationCancelReservation()\n {\n\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "f1fd458cee5eac054dac1f00aa9dec4e", "score": "0.0", "text": "public function show(Order $order)\n {\n //\n }", "title": "" } ]
[ { "docid": "165e2bbcf8f47c0adbed93548f33d6c1", "score": "0.8018102", "text": "public function show(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e5e8acc247b28ba8722842dd97070847", "score": "0.74221796", "text": "abstract protected function makeDisplayFromResource();", "title": "" }, { "docid": "cf7a236473d0b19def52419220a82d95", "score": "0.7191558", "text": "public function show(Resource $resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "b8de278532cf1b2d94016c0cd12737fd", "score": "0.71579075", "text": "public function show(Resource $resource)\n {\n $resource = new ResourceResource($resource);\n return $this->success('Resource Detail.', $resource);\n }", "title": "" }, { "docid": "1981d87b70ebb966cb1a7214c5461ecf", "score": "0.7104245", "text": "function display($resource_name) {\n return include $resource_name;\n }", "title": "" }, { "docid": "815f5613a8189df2880c7c0be463594e", "score": "0.69146776", "text": "public function show(Resource $resource)\n {\n return $this->showOne($resource);\n }", "title": "" }, { "docid": "1be3fb8370513aa7e96f7c3e96fdff88", "score": "0.64633286", "text": "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "title": "" }, { "docid": "bf9855687af595254565be84ecf08da3", "score": "0.6460843", "text": "public function show(Request $request, $resource, $id)\n {\n $command = $this->translator->getCommandFromResource($resource, 'show');\n\n $this->runBeforeCommands($command);\n\n $data = $this->dispatchFrom($command, $request, [\n 'modelClass' => $this->translator->getClassFromResource($resource),\n 'id' => $id\n ]);\n\n $this->fireEventForResource($resource, 'show', $data);\n\n return $this->success($data);\n }", "title": "" }, { "docid": "1cff5c8d606548f28e8af3af4e531294", "score": "0.62906975", "text": "protected function showAction()\n {\n $this->showAction\n ->setAccess($this, Access::CAN_SHOW)\n ->execute($this, NULL, NULL, NULL, __METHOD__)\n ->render()\n ->with(\n [\n 'user_log' => $this->userMeta->unserializeData(\n ['user_id' => $this->thisRouteID()],\n [\n 'login', /* array index 0 */\n 'logout', /* array index 1 */\n 'brute_force', /* index 2 */\n 'user_browser' /* index 3 */\n ]\n )\n ]\n )\n ->singular()\n ->end();\n }", "title": "" }, { "docid": "237d3c90b7035170d5fd20572d1e0dbb", "score": "0.62484807", "text": "public function display( Response $response );", "title": "" }, { "docid": "1e1b2e6a47cd86a471b2f6e43a786d4f", "score": "0.62371457", "text": "public function testShowResourceReturnsTheCorrectResource()\n {\n $items = factory(Item::class, 10)->create();\n $item = $items->get(6);\n\n $this->call('GET', sprintf('/api/v1/item/%s', $item->id));\n\n $this->seeJson([\n 'id' => $item->id,\n 'name' => $item->name,\n ]);\n }", "title": "" }, { "docid": "1b943006f882cdea6214d3238f5094bb", "score": "0.61263746", "text": "public function display($id);", "title": "" }, { "docid": "988fc9380f55f5086ebf1ea38e63511d", "score": "0.6103826", "text": "public function operate()\n {\n echo $this->resource.\"\\n\";\n }", "title": "" }, { "docid": "9cd2c7f88d644fa456e7453c3bb610d2", "score": "0.607363", "text": "function show()\n {\n $this->display();\n }", "title": "" }, { "docid": "31c91777927cb1b0555e264f1cece7a9", "score": "0.6056713", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array('id' => array('HtmlEntities', 'StripTags', 'StringTrim')); \n $validators = array('id' => array('NotEmpty', 'Int'));\n\n // test if input is valid retrieve requested record attach to view\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams()); \n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Square_Model_Item i')\n ->leftJoin('i.Square_Model_Country c')\n ->leftJoin('i.Square_Model_Grade g')\n ->leftJoin('i.Square_Model_Type t')\n ->where('i.RecordID = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "f1919612984d797496fb91a1df6bfc28", "score": "0.6038323", "text": "public function show(Resident $resident)\n {\n //\n }", "title": "" }, { "docid": "9c46cbbf718572f41d5fb18cb85408df", "score": "0.60340303", "text": "public function viewName($resource)\n {\n return $this->name.'::'.$resource;\n }", "title": "" }, { "docid": "4157890d7ce997c99fc951f60a368f8a", "score": "0.603318", "text": "public function showResource()\n {\n return new ParceiroResource(Parceiro::find(2));\n }", "title": "" }, { "docid": "5f890361bf8d16515c9463c62dee48f3", "score": "0.6024555", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/User/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "4b6584e73c632121e7d29d1a53288f08", "score": "0.6002783", "text": "public function show(Request $request ,$id){\n \n if($request->session()->exists('resources') && isset($request->session()->get('resources')[$id])) {\n $resource = $request->session()->get('resources')[$id];\n $data = [];\n $data['resource'] = $resource;\n $data['enterprise'] = 'Resources Ltd.';\n \n return view('resource.show', $data); \n \n }\n \n return redirect('resource');\n \n }", "title": "" }, { "docid": "f4584c6fbf6732a4cc30c153518eac85", "score": "0.5963642", "text": "function displayResource($file) {\n\tglobal $mosConfig_lang;\n\t$file_lang = migratorBasePath() . '/resources/' . $file . '.' . $mosConfig_lang . '.html';\n\t$file = migratorBasePath() . '/resources/' . $file . '.english.html';\n\tif (file_exists($file_lang)) {\n\t\techo '<div align=\"left\" style=\"border: 1px solid black; padding: 5px; \">';\n\t\tinclude ($file_lang);\n\t\techo '</div>';\n\t} else if (file_exists($file)) {\n\t\techo '<div align=\"left\" style=\"border: 1px solid black; padding: 5px; \">';\n\t\tinclude ($file);\n\t\techo '</div>';\n\t}\n\telse\n\t\tdie(_BBKP_CRITINCLERR . $file);\n\techo __VERSION_STRING;\n}", "title": "" }, { "docid": "78f674e0991329ee80d8bfe522602ce3", "score": "0.5962663", "text": "public function actionShow()\n {\n $this->render('show', array());\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.59518087", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "51df0e59505572a08a6c3c4ea6558bb4", "score": "0.594657", "text": "public function showAction()\n\t{\n\t\t$this->loadLayout()->renderLayout();\n\t}", "title": "" }, { "docid": "d0d1f283ce410ec0d9c7e82af4062258", "score": "0.59349936", "text": "public function display(WebResource $res) {\n $view = $res->getView() ?: array();\n switch(count($view)) {\n case 0:\n case 1:\n $viewType = Config::get('view.defaultViewType', 'json');\n break;\n default:\n $viewType = $view[0];\n break;\n }\n $viewMappings = Config::get('view.mappings');\n if (!isset($viewMappings[$viewType])) {\n throw new Exception(\n \"Could not render view by type $viewType\",\n Exception::CODE_PRETTY_VIEW_NOTFOUND);\n }\n $viewName = $viewMappings[$viewType];\n $view = $this->classLoader->load($viewName, true);\n if (!$view) {\n throw new Exception(\"Could not render view by $viewName, view class not found.\",\n Exception::CODE_PRETTY_CLASS_NOTFOUND);\n }\n $view->render($res);\n }", "title": "" }, { "docid": "9c9f166dfbd4a1117126f1616068d929", "score": "0.5910012", "text": "public function displayAction()\n {\n\n $domainName = GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST');\n\n $shortenUrl = $this->urlRepository->findShortUrlByPage($this->currentPage);\n\n if (empty($shortenUrl)) {\n $shortenUrl = $this->generateShortUrl();\n }\n\n $this->view\n ->assign('display', $shortenUrl)\n ->assign('domain', $domainName);\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.5908002", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e45bfcde7a17ab2a4f6f9e2caad01271", "score": "0.5887708", "text": "function display()\n\t{\n\t\t// Set a default view if none exists\n\t\tif ( ! JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar('view', 'category' );\n\t\t}\n\n\t\t$layout = JRequest::getCmd( 'layout' );\n\n\t\tif ($layout == 'form') {\n\t\t\tJError::raiseError( 404, JText::_(\"Resource Not Found\") );\n\t\t\treturn;\n\t\t}\n\n\t\t$view = JRequest::getVar('view');\n\n\t\tparent::display(true);\n\t}", "title": "" }, { "docid": "e278522937d7847767c9d2ff92455995", "score": "0.58667326", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n ); \n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams()); \n \n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Tripjacks_Model_News i')\n ->where('i.newsid = ?', $input->id);\n\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->news = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "bf80668121276aa95e552b7e16de0410", "score": "0.5863839", "text": "public function display() \n\t{\n\t\t\n\t\tparent::display(); \n\t}", "title": "" }, { "docid": "6f20a1779e33227cfc4451ace6ab29af", "score": "0.58626837", "text": "public function edit(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "8c62873548eaa44202c0ae405fd7d4b3", "score": "0.58585227", "text": "public function resolveForDisplay($resource, $attribute = null)\n {\n $this->prepareLines($resource, $attribute);\n }", "title": "" }, { "docid": "f0ce504b8c6c28b59b1b83da05a1e7ee", "score": "0.5834755", "text": "public function show($imageResource) {\n\t\theader('Content-type: image/png');\n\t\theader('Content-disposition: inline');\n\t\timagepng($imageResource, null, 0);\n\t}", "title": "" }, { "docid": "1b6934d948dba93be88f01d4f4cde49a", "score": "0.5817806", "text": "public function display($context);", "title": "" }, { "docid": "06a412168984820a16a8be534a2d85f1", "score": "0.57843286", "text": "public function display()\n\t{\n\t\theader('Content-type: image/png');\n\t\timagepng($this->_imageResource , null , 5 );\n\t}", "title": "" }, { "docid": "bcb7bd8aa9f807e36423f26674169bf6", "score": "0.57832676", "text": "public static function resource($resource, $controller, $options) {\n \n }", "title": "" }, { "docid": "55ebb313f26c5900b8cfe594dfa4e5eb", "score": "0.5779024", "text": "public function display() {\n\t\techo $this->render();\n\t}", "title": "" }, { "docid": "2543e47f21a6d16ac7911a7ed2e24588", "score": "0.5774353", "text": "public function showAction()\n {\n //loads the artist\n $artist = $this->_getArtistById($this->_getParam('id'));\n \n //sends it to the view\n $this->view->artist = $artist;\n \n //loads and sends its albums to the view\n $this->view->albums = $artist->findDependentRowset('Model_Album');\n }", "title": "" }, { "docid": "a1ebeebfc498c76d0c8996e04e37ac78", "score": "0.5768708", "text": "public function show(){\n $this->init();\n $this->load(self::class);\n }", "title": "" }, { "docid": "41311b65a90295f931830bf21bc118c5", "score": "0.5761917", "text": "public function DisplayResources($resource_IDs) {\n \n //Variables for the pagination\n $limit_offset = $this->CPagination->limit_offset;\n $limit_maxNumRows = $this->CPagination->limit_maxNumRows;\n \n //Get resources\n $result = $this->MDatabase->GetResources((int) $limit_offset, (int) $limit_maxNumRows, $resource_IDs);\n \n //If nothing is returned, say so and end here\n if(!$result) {\n echo 'No results.';\n return;\n }\n \n //Initiate the variable that will contain all the output\n $output = '';\n \n //Display the resources one by one\n while($row = $result->fetch_array()) {\n $output .= '<div class=\"resource\">';\n \n $title = htmlspecialchars($row['title']);\n $resource_type = htmlspecialchars($row['resource_type']);\n $description = htmlspecialchars($row['description']);\n $publishing_date = htmlspecialchars($row['publishing_date']);\n \n $output .= \"<h3>\" . $title . \"</h3>\";\n $output .= \"<table class='resource_info'><tbody>\";\n $output .= \"<tr>Type: \" . ucwords(strtolower($resource_type)) . '</tr>';\n $output .= ' <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"#\" class=\"tooltip\">'\n . '<img src=\"img/information-icon-small.png\">'\n . '<span><img class=\"callout\" src=\"img/callout_black.gif\" />'\n . '<strong>Description</strong><br />' . $this->Parsedown->text($description)\n . '</span></a></tr>';\n \n /* Get and display the URLs */\n $output .= $this->DisplayURLs((int) $row['resource_id']); \n \n //Clear the float\n $output .= '<div class=\"clear\"></div>';\n \n /* Display the publishing date, if it exists */\n $output .= $publishing_date ? \"<tr>Publishing Date: {$publishing_date}</tr>\" : '';\n \n /* Get and display the authors */\n $output .= $this->DisplayAuthors((int) $row['resource_id']);\n\n /* Get and display the keywords */\n $output .= $this->DisplayKeywords((int) $row['resource_id']);\n \n $output .= '</div>'; //close the class=\"resource\" div\n }\n \n echo $output;\n }", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.5761351", "text": "public function display(){}", "title": "" }, { "docid": "e9b2cd8fa004ddb7b0d9e03744f3126f", "score": "0.57539654", "text": "public function display()\n {\n $return = $this->fetch();\n echo $return;\n }", "title": "" }, { "docid": "2c3490c6d6b2073fd195968f652e07c5", "score": "0.5750729", "text": "public function render()\n {\n $rows = $this->resource->model()::all();\n\n $title = Str::of($this->resource->name())->plural();\n\n return view('moon::resources.index', [\n 'title' => $title,\n 'columns' => $this->resource->columns(),\n 'rows' => $rows\n ])->layout('moon::layouts.app', ['title' => $title]);\n }", "title": "" }, { "docid": "b817fe8afcad697af904cbcdb8688cef", "score": "0.57500935", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AVBundle:Reto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Reto entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AVBundle:Reto:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "c0a70a08a2849ac13def6ed6304e58da", "score": "0.57435054", "text": "public function show(): UserResource\n {\n return $this->repository->show();\n }", "title": "" }, { "docid": "c952768f11b98a6aed12e59d779b7efa", "score": "0.5741892", "text": "public function display() { echo $this->render(); }", "title": "" }, { "docid": "9aee1654836904270de00365634a70fd", "score": "0.5734992", "text": "protected function show($param) {\n $method = 'show_' . $param;\n if (method_exists($this, $method)) {\n $this->$method();\n } else {\n $this->error('Invalid command argument!');\n $this->help();\n }\n }", "title": "" }, { "docid": "c7ce15d35acae8f764d0adba3a337cb0", "score": "0.5730077", "text": "public function display($file) \n {\n echo $this->fetch($file); \n }", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57238233", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.57214445", "text": "public function show($id) {}", "title": "" }, { "docid": "7fa9265465a0729600bbbce97f9e8303", "score": "0.57199275", "text": "function render(Request $Req, Response $Res, $resource);", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.5710076", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.5710076", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.5710076", "text": "public abstract function display();", "title": "" }, { "docid": "3635f9e6312e7f3ef2e689432f8a3312", "score": "0.5708555", "text": "public function show( Patient $patient ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57056946", "text": "public function show(){}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5705454", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56997055", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "a042815ce2283cc6c3688042abe87a56", "score": "0.56992346", "text": "public function show($id)\n\t{\n\t\t//\n \n \n\t}", "title": "" }, { "docid": "5bc1d8742885bcbc1dc675e2bcd69dd2", "score": "0.5691607", "text": "public function display(midgardmvc_core_request $request);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "15eab5416fa0be870111001048a814ec", "score": "0.0", "text": "public function show(User $user)\n {\n return view('account', compact('user'));\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "754e1795026ca4c71e3959656a533ca3", "score": "0.77020115", "text": "private function _displayResource() {\n\t\t// determine which action to take\n\t\t$lti_message_type = $this->lti_model->getLtiDataValue('lti_message_type');\n\t\tswitch( $lti_message_type ){\n\t\t\tcase 'ContentItemSelectionRequest' : // take user to the content item selector\n\t\t\t\t$this->_getContentItemSelectionRequest();\n\t\t\t\tbreak;\n\t\t\tcase 'basic-lti-launch-request' : // retrieve the requested resource\n\t\t\tdefault :\n\t\t\t\t// store LTI basic outcomes service details when an outcome is requested\n\t\t\t\t$this->lti_outcomes->saveLtiOutcomesValues();\n\t\t\t\t$this->getContent( $custom_resource_id );\n\t\t}\n\t}", "title": "" }, { "docid": "d77a1cf077ad489eb930bc1facfeb4a7", "score": "0.7348343", "text": "public function show($class_id, $resource)\n {\n //\n }", "title": "" }, { "docid": "26f38c42099a7c64fba7842c4ce19062", "score": "0.7230476", "text": "public function show(Resource $resource)\n {\n return view('actions.resource.show', compact('resource'));\n }", "title": "" }, { "docid": "b8de278532cf1b2d94016c0cd12737fd", "score": "0.7159185", "text": "public function show(Resource $resource)\n {\n $resource = new ResourceResource($resource);\n return $this->success('Resource Detail.', $resource);\n }", "title": "" }, { "docid": "48fb67ee8a54377a224740d572c17cdd", "score": "0.7143722", "text": "public function show(Resource $resource)\n {\n return view('resource.show',['resource'=>$resource]);\n }", "title": "" }, { "docid": "50078f2eddc7667a37be0da403d6d3e4", "score": "0.7131298", "text": "function display($resource_name, $cache_id = null, $compile_id = null) {\n // Был старый выхзов, учитывал кеширование\n //$this->fetch($resource_name, $cache_id, $compile_id, true);\n $this->render($resource_name);\n }", "title": "" }, { "docid": "860344e8f85b09bf11e41aa48e928f6e", "score": "0.6776001", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BWBlogBundle:Resource')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Resource entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BWBlogBundle:Resource:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "title": "" }, { "docid": "bc7cbf8f7bf2cdecfc58cc20b4ee76ef", "score": "0.6574996", "text": "public function show($course, Resource $resource)\n {\n\n\n $pageTitle = 'Resource';\n\n return view('resources.resource')->with(compact( 'resource', 'pageTitle'));\n }", "title": "" }, { "docid": "cc94e2329160f202733c635aa4bf0b30", "score": "0.65286446", "text": "public function show($param)\r\n {\r\n\r\n $data['resource_header'] = true;\r\n $user_id = ($this->auth)?$this->auth->id:null;\r\n $data['resource'] = Resource::with(['tags', 'likesCount', 'user', 'downloads', 'category', 'category.resources' => function($q){\r\n $q->limit(4);\r\n }, 'like' => function($q)use($user_id){\r\n $q->where('user_id', $user_id);\r\n }])\r\n ->where('slug', $param)\r\n ->orWhere('id', $param)\r\n ->firstOrFail();\r\n\r\n $author = User::with('profile')\r\n ->where('id', $data['resource']->user_id)\r\n ->get()\r\n ->toArray();\r\n\r\n if(count($author) > 0){\r\n $data['author'] = $author[0];\r\n }\r\n\r\n $data['latestResources'] = Resource::with('category')->orderBy('id', 'desc')->limit(5)->get();\r\n $data['tags'] = Tag::orderBy('id','desc')->get();\r\n\r\n return view('public.resource')->with($data);\r\n }", "title": "" }, { "docid": "69545e83d1d4c03b646757789a897b5b", "score": "0.6515112", "text": "public function show(Resource $resource)\n {\n //\n // $this->authorize('view',Resource::class);\n // $page=Page::all();\n // $resource=Resource::all();\n // return view('resource.show',compact('page','resource'));\n return response()->json($resource);\n }", "title": "" }, { "docid": "51abeaf13e315e938469da7a51936df5", "score": "0.6467601", "text": "public function show($id)\n {\n $query = '\"select\":\"*\",\"where\":\"id=' . $id . '\"';\n $data = ResourcesService::getResourcesTableRow($query);\n $resource = $data[\"Result\"][0];\n //$resource = Resource::findOrFail($id);\n\n return view('admin.resources.show', compact('resource'));\n }", "title": "" }, { "docid": "4869655563febeddc21b876b2d3bd399", "score": "0.6464456", "text": "public function showResource(Request $request, $id = 0);", "title": "" }, { "docid": "6e101e96500f24d567e50a803b6d00fb", "score": "0.64562225", "text": "public function show($id)\n\t{\n\t\t// Get the resource if it has not been provided by the child class\n\t\tif( ! $this->resource->getKey())\n\t\t\t$this->resource = $this->resource->findOrFail($id);\n\n\t\t$this->layout->subtitle = _('Details');\n\n\t\treturn $this->loadView(__FUNCTION__, $this->resource->getVisibleLabels());\n\t}", "title": "" }, { "docid": "0bfd2fab1690e405f8ae90f2f671725b", "score": "0.63684106", "text": "public function show($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn View::make('resource/show', compact('resource'));\n\t}", "title": "" }, { "docid": "14f061e926b1904b496ec52586cb2b35", "score": "0.63535744", "text": "public function display() {\n\t\t\ttry {\n\t\t\t\tif(!is_null($this->id)) {\n\t\t\t\t\t$this->returnView($this->model->display($this->id));\n\t\t\t\t} else {\n\t\t\t\t\t$this->error404();\n\t\t\t\t}\n\t\t\t} catch(Exception $e) {\n\t\t\t\t$this->session->add('error', $e->getMessage());\n\t\t\t\texit(header('Location: '.$_SERVER['HTTP_REFERER']));\n\t\t\t}\n\t\t\t$this->session->sUnset('error');\n\t\t}", "title": "" }, { "docid": "30460e9f10fc35f6066e56c0edf07f11", "score": "0.62772554", "text": "public function resource($resource)\n {\n // TODO: Implement resource() method.\n }", "title": "" }, { "docid": "742c2b4cd2f26a04a82af80f8ee84057", "score": "0.62133056", "text": "public function show()\n {\n $dispatcher = Dispatcher::getSharedDispatcher();\n $dataProvider = $this->getDataProvider();\n $controller = $dataProvider->getControllerClassForPath($this->getPath());\n $action = $this->getIdentifier() . 'Action';\n $controller = GeneralUtility::makeInstance($controller);\n\n if (is_object($controller)) {\n $controller->setRequest($dispatcher->getRequest());\n }\n if (is_numeric($this->getIdentifier())\n && is_object($controller) && method_exists($controller, 'showAction')\n ) {\n $result = $controller->processAction('showAction', $this->getIdentifier());\n } elseif (is_object($controller) && method_exists($controller, $action)) {\n $result = $controller->processAction($action);\n } else {\n $result = false;\n }\n\n return $result ? $this->createResponse($result, 200) : $result;\n }", "title": "" }, { "docid": "f61677388a9b71138fce919e36a82ca0", "score": "0.61413664", "text": "public function show($id)\n {\n #$resource = resource::find($id);\n $resource = Resource::where('slug', '=', $id)->orWhere('id', '=', $id)->firstOrFail();\n\n $related_resources = Resource::where('id', \"!=\", $resource->id)\n ->orWhere('name', 'LIKE', '%' . $resource->name . '%')\n ->orWhere('description', 'LIKE', '%' . $resource->description . '%')->take(8)->get();\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $related_resources,\n ];\n\n return view('resources.show-resource')->with($data);\n }", "title": "" }, { "docid": "404169262f3328542c2f476a8bae067c", "score": "0.6073625", "text": "public function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n $this->fixURI($resource_name);\n\n return parent::fetch($resource_name, $cache_id, $compile_id, $display);\n }", "title": "" }, { "docid": "90a025ba515ea1ffda1792e51f379566", "score": "0.6065236", "text": "public function show($id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('resources.show')->with(compact('resource'));\n }", "title": "" }, { "docid": "d4b48f077d182386266a016e1934227a", "score": "0.60600674", "text": "public function render(&$objResource);", "title": "" }, { "docid": "120fe33c517800f7a36fd36a7d8ff2a0", "score": "0.6034755", "text": "public function showAction($id);", "title": "" }, { "docid": "691f9d494ebbd3698416c27402ce6045", "score": "0.6024695", "text": "public function show($id)\n {\n if (is_numeric($id)) {\n return new ActionResource (Action::find($id));\n }else{\n abort(404 , 'resource not found.');\n \n }\n \n }", "title": "" }, { "docid": "c6f154f853b604d366507e7f3651128c", "score": "0.59881043", "text": "public function index()\n\t{\n\t\t$this->load->view('resource');\n\t}", "title": "" }, { "docid": "78f674e0991329ee80d8bfe522602ce3", "score": "0.59581137", "text": "public function actionShow()\n {\n $this->render('show', array());\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3411150986f3334a3ae059e3824a705e", "score": "0.59518707", "text": "public function showAction() {\n\n\t\t// ...\n\t\tif(isset($this->externalWebsiteUri)) {\n\t\t\t$this->view->assign('external_website_uri', $this->externalWebsiteUri);\n\t\t}\n\t}", "title": "" }, { "docid": "51df0e59505572a08a6c3c4ea6558bb4", "score": "0.5942475", "text": "public function showAction()\n\t{\n\t\t$this->loadLayout()->renderLayout();\n\t}", "title": "" }, { "docid": "7a089792dd9f8cefa56e79369d710cb2", "score": "0.59358656", "text": "public function show(Request $request, string $resource, string $id) {\n if(!Lyra::checkPermission('read', $resource)) abort(403);\n\n if(config('lyra.translator.enabled') && $request->has('lang')) App::setLocale($request->get('lang'));\n\n $resourcesNamespace = Lyra::getResources()[$resource];\n $modelClass = $resourcesNamespace::$model;\n\n if (method_exists($modelClass, 'trashed')) {\n $model = $modelClass::withTrashed()->find($id);\n } else {\n $model = $modelClass::find($id);\n }\n\n if (!Arr::first($model)) return abort(404, \"No query results for model [$modelClass]\");\n $resourceCollection = new $resourcesNamespace(collect([$model]));\n return $resourceCollection->getCollection($request, 'show');\n }", "title": "" }, { "docid": "a5fe9713f7fa35feab808a95acb937a5", "score": "0.59236246", "text": "public function show(Artist $artist)\n {\n\n\n return new ShowArtistResource($artist);\n\n\n }", "title": "" }, { "docid": "4dd721a222d59966f8999c2bf46a1634", "score": "0.5913372", "text": "public function url($resource = self::URL_RESOURCE, array $args = array()) \n {\n return parent::url($resource, $args);\n }", "title": "" }, { "docid": "eaff1ff5ad75e879908bb065beeea534", "score": "0.5910201", "text": "public function edit(Resource $resource)\n {\n return view('actions.resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "f2800dcfd7234cc6b914253341f2a919", "score": "0.5905734", "text": "public function display()\n {\n $this->getAdapter()->display();\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "c6b5201b64b56afc1aba96e7f01df942", "score": "0.5895745", "text": "public function displayAction()\r\n\t\t{\r\n\r\n\t\t\t$q = Doctrine_Query::create()\r\n\t\t\t->from('Webteam_Model_User i')\r\n\t\t\t->where('i.UserName = ?', $this->identity['UserName']);\r\n\t\t\t$result = $q->fetchArray();\r\n\t\t\tif (count($result) == 1) {\r\n\t\t\t\t$this->view->item = $result[0];\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Zend_Controller_Action_Exception('Page not found', 404);\r\n\t\t\t}\r\n\r\n\t\t}", "title": "" }, { "docid": "e1911719b5dbc5045d62ac4e5e20cd33", "score": "0.587909", "text": "protected function showAction() {\n\t\t$em = $this->getEntityManager();\n\t\t$book = $em->find('Entities\\\\Book', $_GET['id']);\n\t\t$this->addContext('book', $book);\n\t}", "title": "" }, { "docid": "9593ec2b031b164d16249f1ae81182ef", "score": "0.58776784", "text": "public function show(Retex $retex)\n {\n //\n }", "title": "" }, { "docid": "093db99e28544f24edb386d2bf2129f0", "score": "0.58682454", "text": "public function display() {\n\t\t$this->displayContent();\n\t}", "title": "" }, { "docid": "95d012dca84499e39b434e04c9f86031", "score": "0.58522356", "text": "public function showAction()\n\t{\n\t\tif (!isset($this->sGlobal->uId) && !Zend_Auth::getInstance ()->hasIdentity ()) {\n\t\t\t$this->_helper->redirector->gotoRoute ( array('action' => 'index', 'controller' => 'auth'), 'default' );\n\t\t}\n\t\t \n\t\t$dbRoutes = new Model_Ride_DbRoutes();\n\t\t\n\t\t$routes = $dbRoutes->getRoutesByUserId($this->sGlobal->uId);\n\t\t\n\t\t$this->view->routes = $routes;\n\t\t\n\t\t$this->view->deleteRideLink = $this->_helper->url->url(array('controller'=>'Ride', 'action'=>'deleteride'), 'default', true);\n\t\t\n\t}", "title": "" }, { "docid": "a6ea4c61d98549d6b82aa6c50e5153c9", "score": "0.58442765", "text": "public function show($id)\n {\n // return \"Show \".$id;\n abort(404);\n }", "title": "" }, { "docid": "57e04be30c8d73c6f1b1f97f0813c951", "score": "0.5839814", "text": "public function show($parm);", "title": "" }, { "docid": "7fa6d8ebb4c7b91b6b1219f34c1ccc2e", "score": "0.5827577", "text": "public function show()\n {\n return $this->resource->transform();\n }", "title": "" }, { "docid": "1f025b0828827877859e8e2f72f5add5", "score": "0.5824839", "text": "public function resourceAction();", "title": "" }, { "docid": "bc8b175839d90931dc37b6d17073534e", "score": "0.5824825", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Zf1_Model_Item i')\n ->leftJoin('i.Zf1_Model_Country c')\n ->leftJoin('i.Zf1_Model_Grade g')\n ->leftJoin('i.Zf1_Model_Type t')\n ->where('i.RecordID = ?', $input->id)\n ->addWhere('i.DisplayStatus = 1')\n ->addWhere('i.DisplayUntil >= CURDATE()');\n $sql = $q->getSqlQuery();\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0];\n $this->view->images = array();\n $config = $this->getInvokeArg('bootstrap')->getOption('uploads');\n foreach (glob(\"{$config['uploadPath']}/{$this->view->item['RecordID']}_*\") as $file) {\n $this->view->images[] = basename($file);\n }\n $configs = $this->getInvokeArg('bootstrap')->getOption('configs');\n $localConfig = new Zend_Config_Ini($configs['localConfigPath']);\n $this->view->seller = $localConfig->user->displaySellerInfo;\n $registry = Zend_Registry::getInstance();\n $this->view->locale = $registry->get('Zend_Locale');\n $this->view->recordDate = new Zend_Date($result[0]['RecordDate']);\n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "bcd5d6f048ed9967b2cc42a2b9c646e4", "score": "0.58217233", "text": "public function show($id)\n\t{\n\t\t//...\n\t}", "title": "" }, { "docid": "062f661f5aa2b0fb00beffc662c406c7", "score": "0.58164716", "text": "public function show($id)\n {\n $catalog_detail = Catalog::where(\"id\", \"=\", $id,)->first();\n\n if (!is_null($catalog_detail)) {\n return $this->ok(\"\", new CatalogResource($catalog_detail));\n }\n\n return $this->ok(__('global.record_not_found'));\n }", "title": "" }, { "docid": "e5b312e565cadd216286627cb156afa1", "score": "0.5814938", "text": "public function show() {\n $this->display = true;\n }", "title": "" }, { "docid": "3c83da877de5a8b9a28620cc567e154f", "score": "0.5812585", "text": "public function show($model)\n {\n $model = $this->getModel($model);\n\n $this->authorize('view', $model);\n\n $model = $this->showModel($model);\n\n $resource = resource($model);\n\n return ok($resource);\n }", "title": "" }, { "docid": "8fa3c5aa92241bd98bf245a72087750b", "score": "0.58067733", "text": "public function show($id)\n {\n return Resource::find($id);\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "7d4b687c2015cbab6585700fbd9fed75", "score": "0.5790671", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/Regions/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "6d0ead3170a91374660511ebe07a7e52", "score": "0.57788694", "text": "public function display($file){\n\t\techo $this->fetch($file);\n\t}", "title": "" }, { "docid": "1ebe558af6c12f3e75c7741d736cd837", "score": "0.5773779", "text": "public function show($id)\n\t{\n\t\t$this->layout->nest('content', $this->view, ['car' => $this->resource]);\n\t}", "title": "" }, { "docid": "ff99e6923e061969deb024f038cd9fd9", "score": "0.5771933", "text": "public abstract function show();", "title": "" }, { "docid": "f37f81a8bf0d836ce01d6e66ee929689", "score": "0.57692647", "text": "public function show()\n {\n $ResourceRepo = new ResouceRepo();\n $res = $ResourceRepo->show();\n $count = $ResourceRepo->getcount();\n\n return view('ViewResource',['resources' => $res,'totalcount' =>$count]);\n }", "title": "" }, { "docid": "23d3f586042fc7ef9f98c33613fd010d", "score": "0.5757193", "text": "public function url($resource = 'instances', array $args = array())\n {\n return parent::url($resource, $args);\n }", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.5757105", "text": "public function display(){}", "title": "" }, { "docid": "be16c52b6734a0cf50cdaa52b26c8ee0", "score": "0.57546145", "text": "public function show(Resroom $resroom)\n {\n //\n }", "title": "" }, { "docid": "6552a6831d000ffc0b68b09357fd4a3c", "score": "0.5750852", "text": "public function show($id)\n\t{\n\t\techo $id;\n\t}", "title": "" }, { "docid": "58d82a32f57975c44fc660ccacd3a42f", "score": "0.5749565", "text": "public function resource( $resc= '')\n {\n return view('home.resource',['resource'=>$resc]);\n }", "title": "" }, { "docid": "c28bc00a20642b8f45cbb36b8f142bb6", "score": "0.5747548", "text": "public function show( $id );", "title": "" }, { "docid": "f3bc4ff0e0f2cc54bf914d77670e405e", "score": "0.5737612", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit',['resource'=>$resource]);\n }", "title": "" }, { "docid": "a5c4f542acf75c65ff05c5578f254411", "score": "0.57365245", "text": "public function show($id)\t{\n\t\t//\n\t}", "title": "" }, { "docid": "c0c57945d6d1643edc1ffb95ae99eef9", "score": "0.5735039", "text": "public function show($id)\n { \n if( $this->checkShowModelRequest($id) ) return abort(404, \"Resource not found\");\n\n if(request()->expectsJson() || $this->onlyJsonResponse) \n return response()->json($this->showModelQueryResponse($id));\n\n return $this->renderView(\n $this->moduleName != null ? Str::plural($this->moduleName) . '.show' : 'show' ,\n $this->showResponse($id)\n );\n }", "title": "" }, { "docid": "1bb2758d3ba7fe86461bda00a9606e3e", "score": "0.5734708", "text": "public function show( $id )\n\t{\n\t\t$model = Input::get( 'model' );\n\n\t\tif ( !class_exists( $model ) ) {\n\t\t\treturn $this->renderResponse( false, \"That model does not exist\" );\n\t\t}\n\n\t\t$item = $model::find( $id );\n\n\t\tif ( !is_null( $item ) ) {\n\t\t\tif ( property_exists( $item, 'eager_relations' ) ) {\n\t\t\t\t$item->load( $item->eager_relations );\n\t\t\t}\n\t\t\treturn $this->renderResponse( true, $item->toArray( true ) );\n\t\t}\n\n\t\treturn $this->renderResponse( false, \"Resource not found\" );\n\t}", "title": "" }, { "docid": "ab8f27385173dda96b8eaafa7aa90f82", "score": "0.5734516", "text": "public function show(Hirtory $hirtory)\n {\n //\n }", "title": "" }, { "docid": "cb0625cb8bda35818012bd67fb011d73", "score": "0.5728958", "text": "protected function showAction()\n {\n $this->showAction\n ->setAccess($this, Access::CAN_SHOW)\n ->execute($this, NULL, UserActionEvent::class, NULL, __METHOD__)\n ->render()\n ->with(\n [\n 'user_log' => $this->userMeta->unserializeData(\n ['user_id' => $this->thisRouteID()],\n [\n 'login', /* array index 0 */\n 'logout', /* array index 1 */\n 'brute_force', /* index 2 */\n 'user_browser' /* index 3 */\n ]\n )\n ]\n )\n ->singular()\n ->end();\n }", "title": "" }, { "docid": "09abe18b0f313de0a8ae600fe6626d31", "score": "0.57271934", "text": "public function display() {\r\n\t\techo '<a href=\"' . $this->_link .\r\n\t\t\t\t'\" title=\"' . $this->_text .\r\n\t\t\t\t'\">' . $this->_text . '</a><br/>';\r\n\t}", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "d02c7bae2c97989fe256da11612461c7", "score": "0.5721667", "text": "function display()\n\t{\n\t\t$document \t=& JFactory::getDocument();\n\t\t$viewType\t= $document->getType();\t\n \t\t$viewName\t= JRequest::getCmd( 'view', $this->getName() );\n \t\t$view\t\t=& $this->getView( $viewName , '' , $viewType );\n \t\tif($this->checkPhotoAccess())\n \t\t\techo $view->get( __FUNCTION__ );\n\t}", "title": "" }, { "docid": "3e94f05854b4dbc5a4d900f54aa8043a", "score": "0.5719658", "text": "function index( $request ){\r\n\t\t\r\n\t\t// Look for \"resource\" in request //\r\n\t\t$requestVars = Router :: getRequestVars();\r\n\t\t\r\n\t\t// Show a help page if local //\r\n\t\tif( App :: get()->local ){\r\n\t\t\tif( !isset( $requestVars->resource )){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Hard set the channel to simplify URLs to resource view //\r\n\t\tRouter :: resetChannel( 'resource' );\r\n\t\t\r\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "e2404ea37d0dd7d634ec1a88ba6e0b01", "score": "0.5708454", "text": "public function show() {\n\t\t$author = pick_arg(Author::class);\n\t\treturn $this->viewShow(compact('author'));\n\t}", "title": "" }, { "docid": "695e29ca27ebbcb0a342e19915e00ae9", "score": "0.57076776", "text": "protected function makeDisplayFromResource()\n\t{\n\t\t$query = Query::getQuery();\n\t\t$json = json_encode($this->activeResource);\n\t\tif(isset($query['callback']) && self::$jsonpEnable)\n\t\t{\n\t\t\t$this->mimeType = 'application/javascript';\n\t\t\t$callback = preg_replace('[^A-Za-z0-9]', '', $query['callback']);\n\t\t\treturn $callback . '(' . $json . ')';\n\t\t}else{\n\t\t\treturn $json;\n\t\t}\n\t}", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "1dec9dac0f4e8d6c4bbcf8f1d6826a0b", "score": "0.0", "text": "public function update(Request $request, ReferralTender $referral)\n {\n $referral->update($request->all());\n\n return \\response()->json($referral, 200);\n }", "title": "" } ]
[ { "docid": "98a92f5f221512e805209e68c21a2f41", "score": "0.7230707", "text": "public function update($resource, $id, $data);", "title": "" }, { "docid": "259a6a29a43bf9b88ecc1eb3eee3041e", "score": "0.6979853", "text": "public function updateResource($resourceType, $resourceId, $record);", "title": "" }, { "docid": "c5e38f3d50e186dc31a1c1e3191e33a9", "score": "0.6735281", "text": "public function update(Request $request, Resource $resource)\n {\n $this->validate($request, [\n 'name' => 'required|string|max:255',\n 'desc' => 'required|string',\n 'cover' => 'image',\n 'photos.*' => 'image'\n ]);\n\n $resource->update($request->only('name', 'desc'));\n\n if ($request->hasFile('cover')) {\n if ($resource->cover()) {\n $resource->cover()->update(['cover' => 0]);\n }\n $resource->uploadPhoto($request->file('cover'), \"$resource->name cover\", 1);\n }\n\n if ($request->has('photos')) {\n foreach ($request->photos as $key => $photo) {\n $resource->uploadPhoto($photo, \"$resource->name photo\");\n }\n }\n\n return redirect('/home')->with(['status' => 'Device successfully updated']);\n }", "title": "" }, { "docid": "5356d72880be7a8e7291a3812494f44a", "score": "0.6498234", "text": "public function update(Request $request, storage $storage)\n {\n //\n }", "title": "" }, { "docid": "7f0fded4aa42dd4d661965974fccb688", "score": "0.6330383", "text": "function requestUpdate($resourceName);", "title": "" }, { "docid": "9df920f81c47ce1493ae744241672b2f", "score": "0.62157947", "text": "function updateResource($model)\n {\n }", "title": "" }, { "docid": "1d81eeba25152205b32aee461040c8af", "score": "0.61946255", "text": "function updateResource($id, $data)\n\t{\n\t\tif(empty($id)) \n throw new App_Db_Exception_Table('Resource ID is not specified');\n\t\t\n $this->validateResource($data, $id);\n\t\t$this->db_update($this->_table, $this->getDbFields($data), array('id'=>$id));\n\t}", "title": "" }, { "docid": "a0575945e98b4f0b6ff629994e5f1060", "score": "0.6156594", "text": "public function update($resourceType, $id, array $queryParams = [], $meta = null);", "title": "" }, { "docid": "19cf522850f8d1f010d9f193ff0ee265", "score": "0.6095271", "text": "public function updateResourceData($resource, HungerGames $data){\n $this->createGameResource($resource, $data);\n }", "title": "" }, { "docid": "f25a192098a47b98f8a7c2af33a1dd2b", "score": "0.6065655", "text": "function updating_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\UpdatingResource::class, $resource, $user);\n }", "title": "" }, { "docid": "17ac23b2fa28e090182571ed20ffe721", "score": "0.6044543", "text": "public function update(Request $request, $resource, $id)\n {\n $original = $this->model->find($id);\n $model = $original->update($request->all());\n Cache::flush();\n $fields = $this->getModelAttributes();\n return redirect()->route('admin.resource.show', [\n 'resource' => $this->modelName,\n 'id' => $id\n ]);\n }", "title": "" }, { "docid": "e76e30799c75f7561fa2d246f6bd2a57", "score": "0.59422135", "text": "public function applyResource(Resource $resource): void;", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.59377414", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "d9e868d7c27c54e84b68cd0b04675e55", "score": "0.59301335", "text": "function eh_update_resource($type, $resource, $params)\n\t{\n\t\t$url\t\t= eh_get_api_url().\"resources/\".$type.\"/\".$resource.\"/set\";\n\t\t$info\t\t= explode(\"\\n\", eh_fetch_data($url, $params));\n\t\tif(strpos($info[0], 'negative') !== false)\n\t\t{\n\t\t\treturn $info[0];\n\t\t}\n\t\treturn $info;\n\t}", "title": "" }, { "docid": "23ff4e035f19244ecf2ecfc892af99e2", "score": "0.5929896", "text": "function updated_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\UpdatedResource::class, $resource, $user);\n }", "title": "" }, { "docid": "daedbb0f657251ba1f1dfe05df9672c1", "score": "0.58814067", "text": "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n \n // STEP 1: Update or insert this identity 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 }", "title": "" }, { "docid": "5f4fa67168957ecd78198365cfd74bd9", "score": "0.58386296", "text": "public function update(Request $request)\n {\n try {\n $validator = Validator::make($request->all(), [\n 'name' => 'required',\n ]);\n\n if ($validator->fails()) {\n $response = [\n 'msg' => $validator->errors->all(),\n 'status' => 0,\n ];\n }\n $data = [];\n if($request->image) {\n $image = ImageUploadHelper::imageupload($request, 'image');\n $data['image'] = $image;\n $data['name'] = $request->name;\n } else {\n $data['name'] = $request->name;\n }\n $resource = Resource::where('id', $request->id)->update($data);\n \n if ($resource) {\n $response = [\n 'msg' => 'Resource Edit Successfully',\n 'status' => 1,\n ];\n } else {\n $response = [\n 'msg' => 'Oops! Something went wrong',\n 'status' => 0,\n ];\n }\n } catch (\\Exception $e) {\n $response = [\n 'msg' => $e->getMessage() . \" \" . $e->getFile() . \" \" . $e->getLine(),\n 'status' => 0,\n ];\n }\n\n return response()->json($response);\n }", "title": "" }, { "docid": "e13311a6d3d6df9928a268f0dfeef488", "score": "0.58193165", "text": "public function update(EquipoStoreRequest $request, $id)\n {\n $equipo = Equipo::find($id);\n $equipo->fill($request->all())->save();\n if($request->file('foto_equipo')){\n $path = Storage::disk('public')->put('images/equipos', $request->file('foto_equipo'));\n $equipo->fill(['foto_equipo' => asset($path)])->save();\n }\n return redirect()->route('equipos.index')->with('info', 'Equipo actualizado con éxito');\n }", "title": "" }, { "docid": "4594dc168aa13c6fef27f370ea295688", "score": "0.57901055", "text": "public function update(Request $request, $id)\n {\n $stock = Stock::findOrFail($id);\n $stock->title = $request->title;\n $stock->caption = $request->caption;\n $stock->location_id = $request->location_id;\n $stock->type = $request->type;\n if ($request->img != null) {\n\n if (file_exists(public_path('') . $stock->img)) {\n unlink(public_path('') . $stock->img);\n }\n\n $imageName = \"/uploads\" . \"/\" . time() . '.' . $request->img->extension();\n\n $request->img->move(public_path('uploads/'), $imageName);\n $stock->img = $imageName;\n }\n $stock->save();\n\n return redirect('/stock/list');\n }", "title": "" }, { "docid": "6bad782d5097f353b6d7ab6700de6bd2", "score": "0.5789171", "text": "public function putAction()\n {\n $id = $this->_getParam('id', 0);\n\n $this->view->id = $id;\n $this->view->params = $this->_request->getParams();\n $this->view->message = sprintf('Resource #%s Updated', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "b5cccc3771870667a9ee2e74c567e04f", "score": "0.5788723", "text": "public function put($resource, $id = 0, $data = NULL) {\n $data = $this->request('PUT', SPOTIFY_API_ENDPOINT, '/' . $resource . '/' . $id . '', 'application/json', $data, array());\n return $data;\n }", "title": "" }, { "docid": "1fc7ff41b62020f266925c1d4d0429db", "score": "0.57780427", "text": "public function update()\n {\n $this->objectWriteNot(\"update\");\n }", "title": "" }, { "docid": "07bb2e794095f53c3ada145c00d6e27c", "score": "0.5770977", "text": "public function update($id)\n {\n return $this->_resourcePersistence->store($id);\n }", "title": "" }, { "docid": "b7efc8833e2707d2c41ccbb075ab62b4", "score": "0.5752699", "text": "public function updateExisting();", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "10a5238440cd234bf32137b5c2bdb8ca", "score": "0.5738228", "text": "public function updateAction () {\n\t\t$this->validateHttpMethod(\"PUT\");\n\t\t\n\t}", "title": "" }, { "docid": "286908b8496df6848f6d30646fd1773f", "score": "0.5703068", "text": "public function updateStream($path, $resource, $config = [])\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "632a0e357db115573e3d55d2e9207359", "score": "0.5699802", "text": "public function putAction()\n\t{\n\n\t\t\t\n\t\t$this->view->id = $id;\n\t\t$this->view->params = $this->_request->getParams();\n\t\t$this->view->message = sprintf('Resource #%s Updated', $id);\n\t\t$this->_response->ok();\n\n\t}", "title": "" }, { "docid": "8759752add8b6db67fed4d69cb0208e8", "score": "0.5683185", "text": "public function update()\n\t{\n\t\tparent::update();\n\t\t$this->write();\n\t}", "title": "" }, { "docid": "14c153b0cb8091e3ce492801115cea2c", "score": "0.5676489", "text": "public function update(Request $request, $id)\n {\n $name = $request->name;\n $description = $request->description;\n $amount = $request->amount;\n $category_id = $request->category_id;\n $photo = $request->photo;\n $has_discount = $request->has_discount;\n $product = new Product();\n $product->name = $name;\n $product->description = $description;\n $product->amount = $amount;\n $product->category_id = $category_id;\n $product->has_discount = ($has_discount === \"true\" || $has_discount === \"1\") ? 1: 0;\n\n\n $product_db = Product::find($id);\n $product_db->name = $product->name;\n $product_db->description = $product->description;\n $product_db->amount = $product->amount;\n $product_db->category_id = $product->category_id;\n $product_db->has_discount = $product->has_discount;\n\n if($product_db->save()) {\n if ($request->hasFile('photo')) {\n $image = $request->file('photo');\n $fileName = time() . '.' . $image->getClientOriginalExtension();\n \n $img = \\Image::make($image->getRealPath());\n $img->resize(250, 250, function ($constraint) {\n $constraint->aspectRatio(); \n });\n \n $img->stream(); // <-- Key point\n \n //dd();\n $full_url = 'images/1/smalls'.'/'.$fileName;\n \\Storage::disk('public')->put($full_url, $img);\n\n $product_db->photos = $full_url;\n $product_db->save();\n }\n $product_db->category = $product_db->category;\n return $product_db;\n }\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6b91824bf8c51c5e05fd48e2728329bf", "score": "0.56742364", "text": "public function update(Request $request, $id)\n {\n try{\n $obj = Obj::where('id',$id)->first();\n\n /* delete file request */\n if($request->get('deletefile')){\n\n if(Storage::disk('public')->exists($obj->image)){\n Storage::disk('public')->delete($obj->image);\n }\n redirect()->route($this->module.'.show',[$id]);\n }\n\n $this->authorize('update', $obj);\n /* If file is given upload and store path */\n if(isset($request->all()['file'])){\n $file = $request->all()['file'];\n $path = Storage::disk('public')->putFile('category', $request->file('file'));\n $request->merge(['image' => $path]);\n }\n\n $obj = $obj->update($request->except(['file'])); \n flash('('.$this->app.'/'.$this->module.') item is updated!')->success();\n return redirect()->route($this->module.'.show',$id);\n }\n catch (QueryException $e){\n $error_code = $e->errorInfo[1];\n if($error_code == 1062){\n flash('Some error in updating the record')->error();\n return redirect()->back()->withInput();\n }\n }\n }", "title": "" }, { "docid": "8d0a97cdf24a3e49996a055c1d6f9ee9", "score": "0.5674049", "text": "public function put($data);", "title": "" }, { "docid": "8576d995f0ad5fb05e24f4249f91de06", "score": "0.56251395", "text": "public function update() {\n $this->save();\n }", "title": "" }, { "docid": "7a0daf096da3d4426382a1e223faf321", "score": "0.5611065", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->stream($path, $resource, $config, 'update');\n }", "title": "" }, { "docid": "7a0daf096da3d4426382a1e223faf321", "score": "0.5611065", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->stream($path, $resource, $config, 'update');\n }", "title": "" }, { "docid": "61fd60c4351f42e6fbc02b50ebca8bc2", "score": "0.5605237", "text": "public function update(Request $request, $id)\n {\n $resource = Resources::where('id', $id)->first();\n $resource->name = $request->name;\n $resource->category_id = (int)$request->category_id;\n $resource->location = $request->location;\n $resource->description = $request->description;\n $resource->icon = $request->icon;\n return json_encode($resource->save());\n }", "title": "" }, { "docid": "861587caf58c3f620dbafce99fe22615", "score": "0.56020206", "text": "public function update($id, $request);", "title": "" }, { "docid": "ecb354cb7b6b47a575835c7db1ad90b5", "score": "0.5598929", "text": "public function updateStreamAsync($path, $resource, Config $config);", "title": "" }, { "docid": "096b7dba1f9fc21e9dc73bbc8b007ad4", "score": "0.5582224", "text": "abstract public function update($id, $request);", "title": "" }, { "docid": "a2a8c7ed3b85cbbe7e79548fb9edbe73", "score": "0.558093", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'title' => 'required',\n ]);\n $data = $request->input();\n if (($request['img'])){\n $folder = 'products/'. date('Y') . '/'. date('m');\n\n $data['img'] = $request->file('img')->store('images/'. $folder);\n\n }\n $item = Product::find($id);\n $item ->update($data);\n return redirect()->route('admin.products.index')->with('success', 'Изменения сохранены');\n }", "title": "" }, { "docid": "7aa2abed7c854f7758eb73c29122e0bf", "score": "0.55795985", "text": "public function update(StorePhotos $request, $id)\n {\n // Grab the inventory item so we can update it\n $image = Images::findOrFail($id);\n\n $image->fill($request->validated());\n \n return (new ImagesResource($image))\n ->response()\n ->setStatusCode(201);\n }", "title": "" }, { "docid": "29aad1545f3bd950877d86ff51dcbf21", "score": "0.55708927", "text": "public function update(Request $request, $id)\n {\n $registro = Producto::find($id);\n $valores = $request ->all(); //recupero todos los datos del formulario\n $img = $request -> file('imagen');\n if(!is_null($img) ){\n $imagen = $request -> file('imagen')-> store('public/imagenes'); //obtengo la imagen del input y la guardi en el storage\n $url_replace = str_replace('storage','public', $registro->imagen); //reemplazo la url para eliminar del storage\n $url_N= Storage::url($imagen); //almaceno la nueva imagen en el storage\n Storage::delete($url_replace);\n $url = Storage::url($imagen);\n $valores['imagen'] = $url;\n }\n $registro ->fill($valores);\n $registro ->save();\n return redirect('/dashBoard/productos');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "fb222032c6bacfdf3f59fba2c85e8ff3", "score": "0.555832", "text": "public function update(StoreProduct $request, $id)\n {\n $params = request()->except(['_token']);\n if ($request->hasFile('photo')) {\n $path = $request->file('photo')->store('images');\n $params['photo'] = $path;\n }\n Product::where('id', $id)\n ->update($params);\n\n return redirect()->route('admin.products.show');\n }", "title": "" }, { "docid": "1d5bf70b6f6ee925cb3f92ebbf7df49a", "score": "0.5552059", "text": "public function update(Request $request, $id)\n {\n //\n $slider = SliderImage::find($id);\n if(request()->hasFile('photo')){\n Storage::disk('public')->delete('slider_image/'.$slider->slider_image);\n $image = request()->file('photo');\n $imageName = time() . '_' . $image->getClientOriginalName();\n $image->storeAs('slider_image', $imageName, 'public');\n\n $slider->slider_image = $imageName;\n $slider->updated_by = Auth::user()->name;\n $slider->save();\n toast('Slider Image Updated Successfully!','success');\n return redirect()->back();\n }\n\n }", "title": "" }, { "docid": "4c0ab51ecbeaff3788498a88d8e05dde", "score": "0.55394554", "text": "public function update($id) {\n \n }", "title": "" }, { "docid": "516873632753a11d0fca6446f9d7fead", "score": "0.55387545", "text": "public function update(Request $request, $id)\n {\n $modif=Image::find($id);\n if ($request->images== null){ \n }else{ \n Storage::delete('public/images/original/'.$modif->images);\n Storage::delete('public/images/thumbnails/'.$modif->images);\n $img=$request->images;\n $renom=time().$img->hashName();\n $img->store('/public/images/original/');\n $resized=ImageIntervention::make($img)->resize(109,108);\n $resized->save();\n Storage::put('/public/images/thumbnails/'.$renom, $resized);\n $modif->images=$renom;\n }\n\n $modif->images=$renom;\n $modif->save();\n return redirect('/insta');\n }", "title": "" }, { "docid": "db6cffbe49713220724fc0e32ce7122e", "score": "0.55386496", "text": "public function update(Request $request, $id)\n {\n $this->validateData($request); //ตรวจสอบข้อมูลก่อนการแก้ไข\n Networkedstorage::find($id)->update($request->all()); //ค้นหาและแก้ไขข้อมูลในตาราง networked_storages\n return redirect('/networkedstorage')->with('success','แก้ไขข้อมูลสำเร็จแล้ว');\n }", "title": "" }, { "docid": "5f6cc4993e197be08863357458931587", "score": "0.55344915", "text": "public function update(Request $request, int $id)\n {\n\n $request->validate($this->page_validate());\n $product = Product::findOrFail($id);\n $data = $request->all();\n $data['image'] = $product->image;\n $data = array_merge($data, $this->slug($request));\n\n if ($request->file('image'))\n {\n _file_delete($data['image']);\n $data['image'] = $this -> upload( $request , 'products' );\n }\n\n $product->update($data);\n\n return redirect(route('admin.product.index'))->with(_sessionmessage());\n }", "title": "" }, { "docid": "ab9b7d4682e0b792e27aad8d2e440b2e", "score": "0.5520933", "text": "public function update(Request $request, $id)\n {\n\n $requestData = $request->all();\n if ($request->hasFile('Imagen')) {\n\n $producto = producto::findOrFail($id);\n\n Storage::delete('public/'.$producto->Imagen);\n\n $requestData['Imagen'] = $request->file('Imagen')\n ->store('uploads', 'public');\n }\n\n $producto = producto::findOrFail($id);\n $producto->update($requestData);\n\n return redirect('productos')->with('flash_message', 'producto Actualizado!');\n }", "title": "" }, { "docid": "014b2b761d95ca9c270fcc41c92d3964", "score": "0.5509719", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'trash' => 'required',\n 'price' => 'required|integer',\n // 'image' => 'required'\n ]);\n\n if ($validator->fails()) {\n return redirect('admin/trash/' . $id . '/edit')\n ->withErrors($validator);\n } else {\n $trash = Trash::find($id);\n\n $trash->trash = request('trash');\n $trash->price = request('price');\n\n if (!$request->file('image')) {\n $image = request('imagePath');\n } else {\n $image = base64_encode(file_get_contents(request('image')));\n $client = new Client();\n $res = $client->request('POST', 'https://freeimage.host/api/1/upload', [\n 'form_params' => [\n 'key' => '6d207e02198a847aa98d0a2a901485a5',\n 'action' => 'upload',\n 'source' => $image,\n 'format' => 'json'\n ]\n ]);\n\n $get = $res->getBody()->getContents();\n $data = json_decode($get);\n $trash->image = $data->image->display_url;\n }\n\n $trash->save();\n alert::success('message', 'Trash Updated');\n return redirect('admin/trash');\n }\n }", "title": "" }, { "docid": "84d0339c9496a4a023b54955b36002eb", "score": "0.5507803", "text": "public function updateSingle($request, $response, $args);", "title": "" }, { "docid": "a0c8aa8d43f7dbc67d52effeb5ceff30", "score": "0.55019945", "text": "public function update(Request $request, Producto $producto)\n {/*\n $producto->update($request->only(['nombreProducto', 'precio']));\n\n*/\n $producto->nombreProducto = $request->nombreProducto ?? $producto->nombreProducto;\n $producto->stock = $request->stock ?? $producto->stock;\n $producto->url = $request->url ?? $producto->url;\n $producto->precio = $request->precio ?? $producto->precio;\n $producto->save();\n return new ProductoResource($producto);\n }", "title": "" }, { "docid": "013212daa4ecab2fd83de19a4cffe83e", "score": "0.5501016", "text": "public function saveTransactionResource($resource)\n\t{\n\t\t$path = $this->getTransactionResourcePath($resource->getHash());\n\t\t$this->filesystem()->put($path, serialize($resource));\n\t}", "title": "" }, { "docid": "9eefb21d2c4fee1ef44fdb5073e1ab9d", "score": "0.54961485", "text": "public function update(Request $request, $id)\n {\n $slider=Headerslider::find($id);\n $validator=$request->validate([\n 'image'=>'required|mimes:png,jpg|max:1024'\n ]);\n if($validator==false)\n {\n return redirect()->back();\n }\n if(File::exists(public_path('/storage/images/'.$slider->image)))\n {\n File::delete(public_path('/storage/images/'.$slider->image));\n }\n $filename=rand().'.'.$request->image->extension();\n $request->image->storeAs('public/images/sliders',$filename);\n $request->image=$filename;\n $slider->update([\n 'image'=>$request->image\n ]);\n return redirect('/admin-user/slider');\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "3df93bb518efe3cbaf727ca9ad9328a0", "score": "0.5491213", "text": "public function testUpdateAProduct()\n {\n $prod = $this->generateProducts()->first();\n $this->seeInDatabase('products', ['name' => $prod->name]);\n\n $params = [\n 'name' => 'Google Pixel XL',\n 'description' => 'The best phone on the market',\n 'price' => 699.99,\n ];\n\n $response = $this->json('PUT', \"/products/{$prod->id}\", $params);\n $this->seeInDatabase('products', [\n 'name' => $params['name'],\n 'description' => $params['description'],\n 'price' => $params['price'],\n ]);\n }", "title": "" }, { "docid": "1e04073b58a998da6e0122e24cd1be12", "score": "0.5490248", "text": "public function update(Request $request, $id)\n {\n\n\n $datostrabajos=request()->except(['_token','_method']);\n\n\n if ($request->hasFile('Foto')) {\n\n\n$trabajo= Trabajos::findOrFail($id);\n\nStorage::delete('public/'. $trabajo->Foto);\n\n$datostrabajos['Foto']=$request->file('Foto')->store('uploads','public');\n\n\n }\n\n Trabajos::where('id','=',$id)->update($datostrabajos);\n\n //$trabajo= Trabajos::findOrFail($id);\n\n //return view('trabajos.edit',compact('trabajo'));\n\nreturn redirect('trabajos')->with('Mensaje','Trabajo modificado con éxito');\n }", "title": "" }, { "docid": "abf7a5c8e18b23e0935566a6ec214c56", "score": "0.5485075", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product -> name = $request -> name;\n $product -> price = $request -> price;\n $product -> description = $request -> description;\n\n $product -> update();\n\n Session::put('update', 'The product has been updated');\n\n return redirect('/resource');\n }", "title": "" }, { "docid": "1e8339e3233595b2c1df533b2987741b", "score": "0.5478798", "text": "public function update( Request $request, $id );", "title": "" }, { "docid": "a338906322949bb1be1e0e7a003a46e3", "score": "0.5478304", "text": "public function update(ProductUpdateRequest $request, $id)\n {\n\n $product=Product::findOrFail($id);\n\n $data=$request->all();\n $data['admin_vendor_id']=Auth::user()->id;\n $data['is_featured']=$request->input('is_featured',0);\n $size=$request->input('size');\n\n if ($request->hasFile('file')) {\n $uploadedFile = $request->file('file')->store('backend/product');\n $data['photo'] = $uploadedFile;\n }\n\n $status=$product->fill($data)->save();\n if($status){\n request()->session()->flash('success','Product Successfully updated');\n }\n else{\n request()->session()->flash('error','Please try again!!');\n }\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "8a8a5b40d30a661682ea39e7d25ae1ed", "score": "0.54719293", "text": "public function put()\n {\n /** @var \\Tacit\\Model\\Persistent $modelClass */\n $modelClass = static::$modelClass;\n\n $criteria = $this->criteria(func_get_args());\n\n /** @var \\Tacit\\Model\\Persistent $item */\n $item = $modelClass::findOne($criteria, [], $this->app->container->get('repository'));\n\n if (null === $item) {\n throw new NotFoundException($this);\n }\n\n try {\n /** @var \\Tacit\\Model\\Persistent $newItem */\n $newItem = new $modelClass();\n $data = array_replace_recursive(\n $newItem->toArray(),\n $this->app->request->post(null, [])\n );\n \n $data = $this->putBeforeSet($data);\n \n $item->fromArray($data, Collection::getMask($item));\n $item->save();\n } catch (OperationalException $e) {\n $e->next($this);\n } catch (ModelValidationException $e) {\n throw new UnacceptableEntityException($this, 'Resource validation failed', $e->getMessage(), $e->getMessages(), $e);\n } catch (Exception $e) {\n throw new ServerErrorException($this, 'Error updating resource', $e->getMessage(), null, $e);\n }\n\n $this->respondWithItem($item, new static::$transformer());\n }", "title": "" }, { "docid": "c0bda952d3e806da6a09fbad44c10c87", "score": "0.5466996", "text": "public function edit(storage $storage)\n {\n //\n }", "title": "" }, { "docid": "c71ca30825c84517c03b65e7df4230aa", "score": "0.54666376", "text": "function update($record)\n { \n ////DEBUG\n return; \n ////END DEBUG \n\t\t$this->rest->initialize(array('server' => REST_SERVER));\n $this->rest->option(CURLOPT_PORT, REST_PORT);\n $retrieved = $this->rest->put('/SuppliesAPI/item/id' . $record['id'], $record);\n }", "title": "" }, { "docid": "90755391b8e7c7b31e24f046029b9f4b", "score": "0.54652643", "text": "public function update($data) {\n\n }", "title": "" }, { "docid": "9043981d5738f7df4a3238c2fe116872", "score": "0.54592717", "text": "public function update($id,Request $request)\n {\n $file = $request->file('file');\n $extension = $file->getClientOriginalExtension();\n Storage::disk('local')->put($file->getFilename().'.'.$extension, File::get($file));\n $entry = Fileentry::find($id);\n $entry->original_mime_type = $file->getClientMimeType();\n $entry->original_filename = $file->getClientOriginalName();\n $entry->filename = $file->getFilename().'.'.$extension;\n\n $entry->save();\n }", "title": "" }, { "docid": "aa1f77aee84ae3a416c76923d1a56559", "score": "0.5459106", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "b249f46520a6b9be14d03dabf94d1d39", "score": "0.5454029", "text": "public function update(Request $request, $id)\n {\n //\n // dd($request);\n $user = User::find($id);\n $user->fill($request->all());\n if($request->hasFile('image')){\n $path = $request->file('image')->store('user');\n $file = Storage::delete($user->image);\n $user->image = $path;\n // dd(\"yey\",$user);\n }\n // dd(\"stop\",$user);\n $user->update();\n\n return redirect()->route('users.index');\n }", "title": "" }, { "docid": "68958d739424a9622fdca778a3822d3a", "score": "0.544828", "text": "public function update(StoreProduct $request, Product $product)\n {\n if($request->has('thumbnail')) {\n $name = basename($request->thumbnail->getClientOriginalName());\n $name = $name;\n $path = $request->thumbnail->move('productimages/', $name, 'public');\n }\n\n $product->name = $request->product_name;\n $product->price = $request->price;\n $product->desc = $request->desc;\n $product->quantity = $request->qty;\n $product->discount = $request->discount;\n $product->tax = $request->tax;\n $product->category_id = $request->category_id[0];\n $product->brand_id = $request->select_pharmacy[0];\n\n $image = ProductImage::where('image_id', '=', $product->id)->first();\n $image->image_path = $path;\n \n $product->save();\n $image->save();\n\n Session::flash('success', 'Product has been successfully updated!');\n\n return redirect()->route('admin.products.create', compact('product'));\n }", "title": "" }, { "docid": "b2886e9f73a0cf99ca3dd4d1756441e5", "score": "0.54461145", "text": "public function set(ResourceInterface $resource);", "title": "" }, { "docid": "9af94672d7f031c4cda0a455d6a11422", "score": "0.54421556", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $product->title = $request->title;\n $product->sku = $this->generateSKU();\n// if($request->input('slug')){\n// $product->slug = make_slug($request->input('slug'));\n// }else{\n// $product->slug = make_slug($request->input('title'));\n// }\n $product->slug = $this->makeSlug($request->slug);\n $product->status = $request->status;\n $product->price = $request->price;\n $product->discount_price = $request->discount_price;\n $product->description = $request->description;\n\n $product->meta_desc = $request->meta_desc;\n $product->meta_title = $request->meta_title;\n $product->meta_keywords = $request->meta_keywords;\n $product->user_id = Auth::id();\n\n $product->save();\n\n $photos = explode(',', $request->input('photo_id')[0]);\n\n\n $product->photos()->sync($photos);\n\n Session::flash('success', 'successfuly Edit product');\n return redirect('/administrator/products');\n\n }", "title": "" }, { "docid": "cb8621b723dc6fb774a0ae33c7eda6ca", "score": "0.54419065", "text": "public function update(StoreProductRequest $request, int $id)\n {\n $input = $request->only('title', 'description', 'price', 'category_id');\n Auth::user()->company->products()->find($id)->update($input);\n if ($request->hasFile('media')) {\n $files = $request->file('media');\n $this->productRepo->addMedia($files, $id);\n }\n return redirect(route('showMyProducts'));\n }", "title": "" }, { "docid": "fb30184e0b309716563a37352db2582d", "score": "0.5437578", "text": "public function put($data)\n {\n }", "title": "" }, { "docid": "fb30184e0b309716563a37352db2582d", "score": "0.5437578", "text": "public function put($data)\n {\n }", "title": "" }, { "docid": "98ab15cbe0428e7a24c838d3819e2bf9", "score": "0.5437555", "text": "public function update($id, Request $request, Product $product)\n {\n \t$productupdate = Product::find($id);\n\n if($request->hasFile('photo'))\n {\n\n @unlink(public_path().'/upload/product'.$productupdate->photo);\n \n $file = $request->file('photo');\n $path = public_path().'/upload/product';\n $filename = time().'.'.$file->getClientOriginalExtension();\n }\n if($file->move($path, $filename))\n {\n $productupdate->photo = $filename;\n }\n\n \t$productupdate->update($request->all());\n \treturn back();\n }", "title": "" }, { "docid": "c955211aedc76478d1650fdab80c5cff", "score": "0.542724", "text": "public function updatedProductById(Request $request, $id);", "title": "" }, { "docid": "5bafa084b714ad3beb62cc8123d05421", "score": "0.5426392", "text": "public function update(UpdateProductRequest $request, $id)\n {\n\n $data = Product::findOrFail($id);\n $data->update([\n 'name' => serialize($request->name),\n 'price' => $request->price,\n 'category_id' => $request->category_id,\n 'currency_id' => $request->currency_id,\n 'image' => Helper::UpdateImage($request, 'uploads/category/', 'image', $data->image)\n ]);\nif ($data)\n Alert::success(trans('backend.updateFash'))->persistent(trans('backend.close2'));\n\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "d3fa7e7b7a7e3977da33f1e0093d5f5b", "score": "0.5425214", "text": "public function resourceHasBeenUpdated();", "title": "" }, { "docid": "628f6fb199b5a72e6e84a33d9c6f9a5e", "score": "0.5424779", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'picture' => 'image|sometimes|max:1999'\n\n ]);\n\n if($request->hasFile('picture')){\n // Get filename with the extension\n $filenameWithExt = $request->file('picture')->getClientOriginalName();\n // Get just filename\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n // Get just ext\n $extension = $request->file('picture')->getClientOriginalExtension();\n // Filename to store\n $fileNameToStore= $filename.'_'.time().'.'.$extension;\n // Upload Image\n $path = $request->file('picture')->storeAs('public/picture', $fileNameToStore);\n } else {\n $fileNameToStore = 'noimage.jpg';\n }\n\n $product= Product::find($id);\n $product->product_name = $request->product_name;\n $product->supplier_id = $request->supplier_id;\n $product->cat_id = $request->cat_id;\n $product->status = $request->status;\n $product->user_id = 1;\n $product->picture = $fileNameToStore;\n $product->alert_quantity = $request->alert_quantity;\n $product->sale_price = $request->sale_price;\n $product->purches_price = $request->purches_price;\n $product->profit = $request->profit;\n\n\n $product->save();\n\n return redirect('/product');\n }", "title": "" }, { "docid": "f078dcf8f707bde762a227c61968e661", "score": "0.54241914", "text": "public function update($id, array $data){\n $product = Product::find($id);\n if(!empty($data['image'])){\n $titleShort = Str::slug(substr($data['title'], 0, 20));\n $data['image'] = UploadHelper::update('image', $data['image'], $titleShort.'-'. time(), 'images/products', $product->image); \n }else{\n $data['image'] = $product->image;\n }\n if (is_null($product))\n return null;\n\n $product->update($data);\n return $this->getByID($product->id);\n }", "title": "" }, { "docid": "06b935ea46fe7f6ab5cf585a11f5279e", "score": "0.5422626", "text": "public function update(ValidateProductInformation $request, Product $product)\n {\n $data = $request->all();\n $data['slug'] = str_slug($data['name']);\n $path = $product->image;\n if($request->file('image')!=null){\n $path = $request->file('image')->store('public/products');\n }\n\n $data['image'] = $path;\n $product->update($data);\n return redirect('/products');\n }", "title": "" }, { "docid": "a8a0978e247663271949812bb1f0e921", "score": "0.5421746", "text": "public function update(Request $request, $id)\n {\n $id = $request->id;\n if($request->hasFile('image')){\n Product::where('id',$id)->update([\n 'title'=>$request->title,\n 'textarea'=>$request->textarea,\n 'quantity'=>$request->quantity,\n 'price' =>$request->price,\n 'offer_price'=>$request->offer_price,\n 'status'=>$request->status,\n 'created_at' => Carbon::now(),\n ]);\n $path = $request->file('image')->store('imagestore');\n Product::find($id)->update([\n 'image'=> $path\n ]);\n return redirect()->route('product.index')->with('success',' Update Succesfully');\n }\n else{\n Product::where('id',$id)->update([\n 'title'=>$request->title,\n 'textarea'=>$request->textarea,\n 'quantity'=>$request->quantity,\n 'price' =>$request->price,\n 'offer_price'=>$request->offer_price,\n 'status'=>$request->status,\n 'created_at' => Carbon::now(),\n ]);\n return redirect()->route('product.index')->with('success','Update Succesfully');\n } \n\n }", "title": "" }, { "docid": "66743027520aa87b03d09a35564488ce", "score": "0.5420195", "text": "public function update(Request $request, $id)\n {\n $products = Product::find($id);\n\n $products->name = $request->name;\n $products->description = $request->description;\n $products->price = $request->price;\n $products->quantity = $request->quantity;\n\n $products->cat_id = $request->cat_id;\n if($request->hasFile('image')){\n\n $image = $request->file('image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n $location = public_path('uploads/images/' . $filename);\n Image::make($image)->save($location);\n\n $oldfilename = $products->image;\n //update the db\n $products->image = $filename;\n //delete the old image \n Storage::delete($oldfilename);\n }\n $products->save();\n\n if (isset($request->tags)) {\n $products->tags()->sync($request->tags);\n } else {\n $products->tags()->sync(array());\n }\n \n Session::flash('success', 'This post was successfully saved.');\n return redirect::route('product',$products->id);\n\n }", "title": "" }, { "docid": "97031ad94f3ce077f62b44e5b800499e", "score": "0.5410227", "text": "public function update(Request $request, $id)\n {\n $encrypt_decrypt = encrypt_decrypt('decrypt',$id);\n if($encrypt_decrypt === false){\n abort(403);\n }else{\n $this->validate($request, [\n 'name' => 'required',\n 'detail' => 'required',\n 'price' => 'required|numeric',\n 'in_stock' => 'required|numeric',\n ]);\n\n\n $product = Product::find($encrypt_decrypt);\n $product->name = $request->input('name');\n $product->detail = $request->input('detail');\n $product->price = $request->input('price');\n $product->in_stock = $request->input('in_stock');\n if($request->hasFile('file')){\n @unlink($product->photo);\n $filename = time().'.'.$request->file('file')->getClientOriginalExtension();\n $product->photo = 'public/img/product/new-product/' . $filename;\n $request->file('file')->move(public_path('public/img/product/new-product'), $filename);\n }\n $product->save();\n \n return redirect()->route('products.index')\n ->with('success','product updated successfully');\n }\n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "cd80a0cdaab1a042297d25de2876e93a", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n $request['updated_by'] = Auth::user()->name;\n FeeFinanceDetails::create($request->all());\n $student = Applicant::find($request->student_id);\n return redirect('admin/fees_management/go/to/payment?student_adno='.$student->s_applicationno)->with('feeCreated','School Fee created successfully');\n }", "title": "" } ]
[ { "docid": "643f51843534c99b002271c413f71061", "score": "0.7149016", "text": "public function store()\n {\n $this->storage->set($this);\n\n }", "title": "" }, { "docid": "aba977442c12d8193d7ce12cb2a46e96", "score": "0.669261", "text": "public function store ()\n {\n $this->_update_login ();\n $this->_pre_store ();\n\n if ($this->exists ())\n {\n $this->_update ();\n }\n else\n {\n $this->_create ();\n }\n }", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.6619958", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.6428514", "text": "public function save($resource);", "title": "" }, { "docid": "148c42c41711b48306faccd1fdedbc39", "score": "0.6416866", "text": "public function store()\n\t{\n\t\t// TODO\n\t}", "title": "" }, { "docid": "9181113e9ca478f57b376bb60189432a", "score": "0.639531", "text": "public function store()\n\t{\n\t\t//\n\t\t$inputs = Input::all();\n\t\t$validator = Validator::make($inputs , \\App\\Resource::$rules);\n\n\t\tif($validator->passes()){\n\t\t\t$destinationPath = 'pictures/'; // upload path\n\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t$fileName = rand(11111,99999). '_' . time() . '.'.$extension; // renameing image\n\t\t\tImage::make(Input::file('image')->getRealPath())->resize(300, null,function($constrain){\n\t\t\t\t$constrain->aspectRatio();\n\t\t\t})->save($destinationPath . $fileName);\n\t\t\t// Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t$inputs['image'] = $fileName;\n\t\t\t\\App\\Resource::create($inputs);\n\t\t\treturn Redirect::to('/');\n\n\t\t}\n\n\t\treturn Redirect::back()\n\t\t\t->withInput(Input::all())\n\t\t\t->withErrors($validator);\n\t}", "title": "" }, { "docid": "7d031b8290ff632bab7fef6a00576916", "score": "0.6391937", "text": "public function store()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "bd7a2528e89d1c3f43656fa9d3a11bc3", "score": "0.63575023", "text": "public function store(StoreResourceRequest $request): JsonResponse\n {\n $resource = new Resource;\n $resource->fill($request->all());\n if ($request->has('url')) {\n $resource->url = $request->file('url')->store('articles', 'article');\n }\n $resource->saveOrFail();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.created'),\n 'code' => 201\n ], 201);\n }", "title": "" }, { "docid": "af1871e1a1f1d758082bcf4ebeab10eb", "score": "0.6356851", "text": "public function saveStorage()\n {\n $this->storage->save($this->getProduct());\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
98f19c40c5571fcac93c8b0f6ae3d4b7
add GROUP BY in query
[ { "docid": "bd5134d8a016240c35f76160cf9e3eab", "score": "0.5785052", "text": "public function group(string $column): self\n {\n $this->queryString .= \"GROUP BY {$column} \";\n return $this;\n }", "title": "" } ]
[ { "docid": "dc983efecaee1c1b26c70a3a5a43248d", "score": "0.7416997", "text": "public function group_by() {\n\n\t}", "title": "" }, { "docid": "e68ba3a6446dc7448fc7c021dafc4b95", "score": "0.6987653", "text": "public function addGroupBy() {\n $this->group_by_clause = new SqlGroupByClause();\n return $this->group_by_clause;\n }", "title": "" }, { "docid": "b2f810ccbd7b598f5e3c781d3fa45df2", "score": "0.68113744", "text": "public function sqlGroupBy($sql)\n {\n }", "title": "" }, { "docid": "c1247392f0828c21092810faa66d760c", "score": "0.6686264", "text": "protected function _buildGroupBy()\n {\n if (empty($this->_groupBy)) {\n return;\n }\n\n $this->_query .= \" GROUP BY \";\n\n foreach ($this->_groupBy as $key => $value) {\n $this->_query .= $value . \", \";\n }\n\n $this->_query = rtrim($this->_query, ', ') . \" \";\n }", "title": "" }, { "docid": "580e099037c6ff58374eb61b0e542afa", "score": "0.64137834", "text": "public function groupby($field = false){\n\t \tif($field!=false){\n\t \t\t$group_by_temp = array($field);\n\t\t \tarray_push($this->groupbyQuery, $group_by_temp);\n\t\t }else{\n\t\t \t$this->groupbyQuery = false;\n\t\t }\n\t\t return $this;\n\t }", "title": "" }, { "docid": "15d9445f0e2d125ad5b76339c4097515", "score": "0.64060843", "text": "abstract protected function getGroupByColumns();", "title": "" }, { "docid": "8202a9366bd4b368cdb8ae4ef4f18316", "score": "0.6292765", "text": "private function addGroupBy(&$queryArr) {\n if (!empty($this->clauses['group_by'])) {\n $queryArr[] = 'GROUP BY ' . implode(', ', $this->clauses['group_by']);\n }\n }", "title": "" }, { "docid": "75c3c671991e83b9d70c6f7d1aa082a3", "score": "0.62901413", "text": "function groupBy($by);", "title": "" }, { "docid": "8d51e77f7e9c01a3ecb8d46a46998fb2", "score": "0.6283754", "text": "public function group_by($query) {\n $this->group_by = $query;\n return $this;\n }", "title": "" }, { "docid": "b35bdc3d92163adfbd133fbdd72cc57e", "score": "0.62812185", "text": "function magic_sql_group($tbl, $where, $datalimit, $orderby_col, $ordertype, $group_by_col)\n{\n\tglobal $single_db;\n\tglobal $single_conn;\n\tglobal $select_data_arr;\n\n\t$where_clause=' WHERE '.$where.''; \n\n\tif($where==\"\"){\n\n\t\t$where_clause=\"\";\n\t}\n\n\t//===== limit record value\n\n$reclimit=$datalimit;\n\n$sqlstring=\"SELECT COUNT(*) FROM `$single_db`.`$tbl`\".$where_clause.\"\";\n\n//=====call limit function in mysqligateway\n\n$paramret= magic_sql_record_per_page($single_conn, $sqlstring, $reclimit);\n\n\n//===== get return values\n\n\n$reclim_firstproduct=$paramret[\"0\"];\n\n$reclim_pgcount=$paramret[\"1\"];\n\n\n$gen_group_by_select_query=mysqli_query($single_conn, \"SELECT * FROM `$single_db`.`$tbl` \".$where_clause.\" GROUP BY $group_by_col ORDER BY `$orderby_col` $ordertype LIMIT $reclim_firstproduct, $reclimit\" );\n\n$select_data_arr=array($gen_group_by_select_query, $reclim_pgcount);\n\n\nreturn $select_data_arr;\n\n}", "title": "" }, { "docid": "f22944acb73e02543deb65a20a6dd910", "score": "0.6229782", "text": "public function &getGroupBy();", "title": "" }, { "docid": "006d77fa37e76f444b3adc90e1c10a50", "score": "0.62239003", "text": "function set_custom_wp_query_groupby($groupby, $wp_query)\n {\n $retval = $groupby;\n $group_by_columns = $wp_query->get('group_by_columns');\n if ($group_by_columns) {\n $retval = str_replace('GROUP BY', '', $retval);\n $columns = explode(',', $retval);\n foreach (array_reverse($columns) as $column) {\n array_unshift($group_by_columns, trim($column));\n }\n $retval = \"GROUP BY \".implode(', ', $group_by_columns);\n }\n // Not all mysql servers allow access to create temporary tables which are used when doing GROUP BY\n // statements; this can potentially ruin basic queries. If no group_by_columns is set AND the query originates\n // within the datamapper we strip the \"GROUP BY\" clause entirely in this filter.\n else if ($wp_query->get('datamapper')) {\n $retval = '';\n }\n return $retval;\n }", "title": "" }, { "docid": "2c52b4f94cf9f3bf28ee605638fbc982", "score": "0.6189614", "text": "abstract protected function _buildGroupBy( $group );", "title": "" }, { "docid": "b1ae7696a2ec6ccdb7bcbc5ec8c7c41f", "score": "0.6150852", "text": "public function group_records_by_query_person_match()\r\n {\r\n // \r\n // The return value is an array, a key in this array is a query_person_match\r\n // float and the value is a list of all the records with this \r\n // query_person_match value.\r\n\r\n $key_function = create_function('$x', 'return $x->query_person_match');\r\n return $this->group_records($key_function);\r\n }", "title": "" }, { "docid": "bd19c7a73cc412c60d2503f98435d659", "score": "0.6144532", "text": "public function group ($by) {\n\t\n\t\t$this->_correctQuery();\n\t\n\t\tif (!strrpos($this->_select, 'GROUP BY')) { // on first order use\n\t\t\t$this->_select .= ' GROUP BY';\n\t\t} else { // if reused add a comma to form the right query\n\t\t\t$this->_select .= ', ';\n\t\t}\n\t\n\t\tif (strpos($by, '.')) {\n\t\t\t$byArr = explode('.', $by);\n\t\t\t$by = implode('`.`', $byArr);\n\t\t}\n\t\t\n\t\tif (strpos($by, '(') ){\n\t\t\t$this->_select .= ' '.$by;\n\t\t}\n\t\telse {\n\t\t\t$this->_select .= ' `'.$by.'`';\n\t\t}\n\t\t\n\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "4f4ff237e5673d981237994028711ce4", "score": "0.6132921", "text": "public function processGroupby(){\n\t \tif($this->groupbyQuery!=false){\n\t \t\t$groupby_ini = \"GROUP BY \";\n\t \t\t$count_cont = 0;\n\t \t\tforeach ($this->groupbyQuery as $value) {\n\t \t\t\tif($count_cont>0){\n\t \t\t\t\t$groupby_ini .= ', ';\n\t \t\t\t}\n\t \t\t\t$groupby_ini .= $value[0].' ';\n\t \t\t\t$count_cont++;\n\t \t\t}\n\t \t\t$this->groupbyProcess = $groupby_ini;\n\t \t}else{\n\t \t\t$this->groupbyProcess = false;\n\t \t}\n\t }", "title": "" }, { "docid": "963ea1530bbdf4bbb6acdd3bd7670c46", "score": "0.6105772", "text": "public function fetchAllGrouped()\n {\n return $this->_connection->fetchAllGrouped($this->getSql(), $this->getBind());\n }", "title": "" }, { "docid": "d6ca4d500339c017ba5c8b0930603012", "score": "0.6072073", "text": "public function setGroupBy(array $group_by): QueryModifier;", "title": "" }, { "docid": "a0db671413e58f1ebb39d89029408ac1", "score": "0.6022481", "text": "public function groupBy($field);", "title": "" }, { "docid": "b13b69d1d9f02bfd7f310bbec21c369a", "score": "0.59763426", "text": "public function group_records_by_query_params_match()\r\n {\r\n // \r\n // The return value is an array, a key in this array is a query_params_match\r\n // bool (so the keys can be just True or False) and the value is a list \r\n // of all the records with this query_params_match value.\r\n\r\n $key_function = create_function('$x', 'return $x->query_params_match');\r\n return $this->group_records($key_function);\r\n }", "title": "" }, { "docid": "32735da0bf18efe4e690635dbeef12b3", "score": "0.5909315", "text": "public function groupBy($groupBy){\r\n $this->sql = $this->sql->append(\"GROUP BY \")->append($groupBy.' '.PHP_EOL);\r\n return $this;\r\n }", "title": "" }, { "docid": "d6377c731e8f3eda48aa21e3ce6077fa", "score": "0.5889786", "text": "public function GroupBy($fields)\n {\n }", "title": "" }, { "docid": "9067648f33eb7c1766e5a3a006bbb657", "score": "0.5886704", "text": "public function getGroupByQuery()\n\t{\n\t\t$params = $this->getParams();\n\t\treturn $params->get('count_groupbyfield');\n\t}", "title": "" }, { "docid": "9ebbfddb70f4fe1416aa7a3adb617162", "score": "0.58805275", "text": "protected function getGroupBy() {\n return \"AdoptionBooks.BookID\";\n }", "title": "" }, { "docid": "4f7b6490554c9c799027eb40a2e6723c", "score": "0.58447325", "text": "public function aggregateQuery()\n {\n $qb = clone $this->queryBuilder;\n print_r($qb->getQuery()->getDql());\n $qb->resetDQLPart('select');\n $qb->resetDQLPart('orderBy');\n foreach ($this->getGrid()->getColumns() as $key => $column) {\n if (!$column->getOption('hidden')) {\n if ($column->getOption('aggregate')) {\n if (strpos($column->getOption('aggregate'), '#') !== false) {\n $qb->addSelect('\\'' . substr($column->getOption('aggregate'), 1) . '\\'');\n } else {\n $qb->addSelect($column->getOption('aggregate'));\n }\n } else {\n $qb->addSelect('\\'\\'');\n }\n }\n }\n // print_r($qb->getQuery()->getDql());\n // die;\n\n return $qb;\n }", "title": "" }, { "docid": "ad49738d631583fd25f702c4341e9c4d", "score": "0.5843092", "text": "public function group($column)\n {\n $this->group = 'GROUP BY ' . $column;\n }", "title": "" }, { "docid": "4b7f1bf2703b4d61e81789364491cda4", "score": "0.5824136", "text": "public function addGroupByTag()\n {\n $this->getSelect()\n ->group('relation.tag_id');\n $this->setJoinFlag('distinct');\n $this->setJoinFlag('group_tag');\n return $this;\n }", "title": "" }, { "docid": "21b5543208a4ba4c937b51687db51b84", "score": "0.58178556", "text": "protected function compilePartGroupBy(): string\n {\n if (! empty($this->query['groupBy'])) {\n // Add sorting\n return ' GROUP BY ' . implode(separator: ', ', array: array_map(callback: [$this, 'quoteIdentifier'], array: $this->query['groupBy']));\n }\n\n return '';\n }", "title": "" }, { "docid": "f9112917afb5a025a53593ef97c3e00c", "score": "0.5785225", "text": "public function addGroupBy($sql, array $parameters = array())\n {\n $this->addClause('GROUPBY', $sql, $parameters, ', ', 'GROUP BY ', \"\\n\", false);\n\n return $this;\n }", "title": "" }, { "docid": "90c63878397da5377a7e8a05479986b9", "score": "0.5747262", "text": "public function groupBy($field)\n {\n }", "title": "" }, { "docid": "52a829dccabc0192cd960a5473b93ca1", "score": "0.5743837", "text": "public function testOrmGroupBy()\n {\n $eventsModel = new IdiormDbal('events');\n\n $eventsModel->groupBy('country');\n\n $events = $eventsModel->get();\n\n $this->assertCount(4, $events);\n\n $eventsModel = new IdiormDbal('events');\n\n $eventsModel->groupBy('title');\n\n $events = $eventsModel->get();\n\n $this->assertCount(5, $events);\n }", "title": "" }, { "docid": "79cd0f1038f2897ec903d1f3eec85e05", "score": "0.57288116", "text": "function aggregate(){\n\n\t\t}", "title": "" }, { "docid": "6e08a2326f70e4aa268e220a23b89e6e", "score": "0.5718444", "text": "public function addGroupQuery($value) {}", "title": "" }, { "docid": "4f0d4c2107b80514c7c64f635340e840", "score": "0.5712166", "text": "function custom_posts_groupby( $groupby, $query ) {\r\n \r\n global $wpdb;\r\n //* if is main query and a search...\r\n if ( is_main_query() && is_search() ) {\r\n $groupby = \"{$wpdb->posts}.ID\";\r\n }\r\n return $groupby;\r\n \r\n}", "title": "" }, { "docid": "565fd6662def6a3f88704c8047e487f9", "score": "0.5700876", "text": "public function groupBy($column_name)\n {\n\n }", "title": "" }, { "docid": "19d534b8e3a30fb03ab4bab42a596b94", "score": "0.56979984", "text": "public function group_by($column_name = NULL)\n {\n if ($column_name == NULL)\n {\n return $this->groupby;\n }\n\n $this->_use_field($column_name);\n\n return $this->groupby[] = $column_name;\n }", "title": "" }, { "docid": "6b53bd3cc1966b405d955177414eebeb", "score": "0.5691054", "text": "public function group_records_by_category()\r\n {\r\n // \r\n // The return value is an array, a key in this array is a category\r\n // and the value is a list of all the records with this category.\r\n\r\n $key_function = create_function('$x', 'return $x->source->category');\r\n return $this->group_records($key_function);\r\n }", "title": "" }, { "docid": "978a30c8e4717b4afedce8cc010ae7cd", "score": "0.56843394", "text": "protected function resolveGroupBy(): string\n {\n if ($this->groups) {\n return ' GROUP BY `' . implode('`, `', $this->groups) . '`';\n }\n\n return '';\n }", "title": "" }, { "docid": "8355d4673c1e94ad33836d86ff9a2c53", "score": "0.5663495", "text": "public function fetchPairsGrouped()\n {\n return $this->_connection->fetchPairsGrouped($this->getSql(), $this->getBind());\n }", "title": "" }, { "docid": "a687071bb0b469119d1957df56335814", "score": "0.566044", "text": "private function _getGroup() {\n\t\tif (count($this->_group) > 0) {\n\t\t\treturn ' GROUP BY ' . implode(', ', $this->_group);\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "title": "" }, { "docid": "6cbcec680ec6854b1ef39f5d504a8948", "score": "0.56402326", "text": "public function _aggregate(){\n }", "title": "" }, { "docid": "acc4c8a217ed89f60271d451bc338783", "score": "0.5639198", "text": "protected function posts_groupby( $groupby )\n {\n \tif( empty( $groupby ) )\n $groupby = \" {$this->db->posts}.ID \";\n\n $groupby .= $this->db->prepare(\n \" HAVING distance_value <= %f \",\n $this->radius\n );\n\n return $groupby;\n }", "title": "" }, { "docid": "8d181ff6149d87b2118e4cbcbfe9047d", "score": "0.561482", "text": "public function applyGroup($sql,$group)\n\t{\n\t\tif($group!='')\n\t\t\treturn $sql.' GROUP BY '.$group;\n\t\telse\n\t\t\treturn $sql;\n\t}", "title": "" }, { "docid": "3167e9350c0daaeb7a5c00be31b040a2", "score": "0.5612104", "text": "public function group();", "title": "" }, { "docid": "3167e9350c0daaeb7a5c00be31b040a2", "score": "0.5612104", "text": "public function group();", "title": "" }, { "docid": "3167e9350c0daaeb7a5c00be31b040a2", "score": "0.5612104", "text": "public function group();", "title": "" }, { "docid": "fe37fdcbac9fd5ec2b663f0039cb1c36", "score": "0.56090724", "text": "protected function getGroupBy(): string\n {\n return ($this->groupBy && !$this->groupBy->isEmpty() ? \"\\r\\nGROUP BY \".$this->groupBy : \"\");\n }", "title": "" }, { "docid": "5eec90337741b3adc2f84bd5c39c83a4", "score": "0.559757", "text": "public function group($query) {\r\n\t\t$args = func_get_args();\r\n\t\t$this->queryData['group'][] = call_user_func_array(array($this->db, 'formatQuery'), $args);\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "b9a8d44eb1ca7f10c0e8da4d425da253", "score": "0.5594515", "text": "public function getAggregatedList()\n {\n return $this->getQueryBuilder()\n ->select(\n 'DISTINCT UPPER(SUBSTR(sort, 1, 1)) AS first_letter',\n 'COUNT(*) AS nb_serie'\n )\n ->from('series', 'series')\n ->groupBy('first_letter')\n ->orderBy('first_letter')\n ->execute()\n ->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "8bdd3db29676c49414455a222c4b22c0", "score": "0.5584925", "text": "public function groupBy($group) \n {\n \n $this->sql .= ' GROUP BY ';\n \n if(is_array($group)) {\n foreach($group as $column) {\n $this->sql .= $this->quoteColumnName($column) . ', ';\n }\n \n $this->sql = trim($this->sql, ', ');\n } else {\n $this->sql .= $this->quoteColumnName($group);\n }\n \n return $this;\n }", "title": "" }, { "docid": "e766d27fa2ab6fc8c078b93000755573", "score": "0.5577937", "text": "public function group_by($column_name) {\n $column_name = $this->_quote_identifier($column_name);\n $this->_group_by[] = $column_name;\n return $this;\n }", "title": "" }, { "docid": "178672575f1c4850776d6654cb26ffad", "score": "0.55615526", "text": "function &group_by($by)\n\t{\n\t\t$this->q_cached = false;\n\t\t\n\t\tif(is_string($by))\n\t\t{\n\t\t\t$by = explode(',',$by);\n\t\t}\n\t\tforeach((Array)$by as $val)\n\t\t{\n\t\t\t$val = trim($val);\n\t\t\t$this->q_group_by[] = $this->_protect_identifiers($val);\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2fedd36365dec52f7bf841e8f11de881", "score": "0.55544853", "text": "public function groupBy()\n {\n return (isset($this->groupBy) ? ' GROUP BY '.$this->groupBy : '');\n }", "title": "" }, { "docid": "47b9b44f37ee4d9a9a3e33a83f133385", "score": "0.55535924", "text": "function groupBy($statement)\n {\n $this->groupBy[] = $statement;\n return $this;\n }", "title": "" }, { "docid": "dcac9a1aadc7703288b797a1e039a1d4", "score": "0.55459374", "text": "protected function makeGroupBy(Builder $query)\n {\n if ($groupBy = $this->getGroupBy()) {\n $query->groupBy($groupBy);\n } else {\n $driver = $this->getDatabaseDriver();\n\n if ($driver == 'sqlsrv') {\n $columns = $this->getTableColumns();\n } else {\n $columns = $this->getTable() . '.' .$this->primaryKey;\n }\n\n $query->groupBy($columns);\n\n $joins = array_keys(($this->getJoins()));\n\n foreach ($this->getColumns() as $column => $relevance) {\n array_map(function ($join) use ($column, $query) {\n if (\\Str::contains($column, $join)) {\n $query->groupBy($column);\n }\n }, $joins);\n }\n }\n }", "title": "" }, { "docid": "d318b684e7d326bdc2ceeedfb98d6c2c", "score": "0.5542222", "text": "protected function addGroupBy($column)\n {\n $this->groupBys[] = trim(sprintf(\"GROUP BY %s\", $column));\n }", "title": "" }, { "docid": "5abb99593c7a1973c8f6124f9fa18ee4", "score": "0.5509763", "text": "public function group_records_by_domain()\r\n {\r\n // \r\n // The return value is an array, a key in this array is a domain\r\n // and the value is a list of all the records with this domain.\r\n\r\n $key_function = create_function('$x', 'return $x->source->domain');\r\n return $this->group_records($key_function);\r\n }", "title": "" }, { "docid": "8b8e1de2f0bbcfb20bf45824fca9f79e", "score": "0.5504783", "text": "protected function aggregate(Query $query)\n\t{\n\t\t$column = $this->wrap($query->aggregate['column']);\n\n\t\treturn 'SELECT '.$query->aggregate['aggregator'].'('.$column.')';\n\t}", "title": "" }, { "docid": "06458116e7bb9e7c2710d5ff30517f48", "score": "0.54357004", "text": "function getGroupByClause($dataBindModel)\n\t{\n\t\t$dataBinds = $this->dataBindModel->getDataBinds();\n\t\t$groups = array();\n\t\t$useGroupBy = false;\n\t\tforeach($dataBinds as $dataBind)\n\t\t{\n\t\t\t$agg = $dataBind->isAggregate();\n\t\t\tif($agg)\n\t\t\t\t$useGroupBy = true;\n\t\t\tif(!$dataBind->ignoreToSelect && $dataBind->dataField && !$agg )\n\t\t\t{\n\t\t\t\t$selectFields = explode(\",\", $dataBind->getSelectField());\n\t\t\t\t$groups = array_merge($groups, $selectFields);\n\t\t\t}\n\t\t}\n\t\tif($useGroupBy && count($groups) > 0)\n\t\t{\n\t\t\treturn \" GROUP BY \" . implode(\", \" , $groups) . \", \" . \n\t\t\t\t$this->dataBindModel->getTableName() . \".\" . $this->dataBindModel->getKeyField();\n\t\t}\n\t\telse\n\t\t\treturn \"\";\n\t}", "title": "" }, { "docid": "8a947e61ad992b2f260de74f8a663567", "score": "0.543502", "text": "public function compile_builder_groupby(GlueDB_Fragment_Builder_Groupby $fragment) {\n\t\treturn $this->compile_builder($fragment, ', ');\n\t}", "title": "" }, { "docid": "92f5299319c4aaee5d6e3c03e8da84cf", "score": "0.54247755", "text": "function query_grid($query, $alias=array(), $group_by='')\n{\n $CI = & get_instance();\n $CI->layout = 'blank';\n $param = $CI->input->get();\n $where = q_where($param, $alias);\n $order = \"order by `$param[sort_field]` $param[sort_type]\";\n $paging = \"limit $param[perpage] offset $param[page]\";\n\n $group = ($group_by) ? \"group by \".$group_by : \"\";\n $sql = \"$query $where $group\";\n \n //echo $param['lang'];\n $data['total'] = $CI->db->query($sql)->num_rows();\n $data['data'] = $data['total']>0?$CI->db->query($sql . \" $order $paging\")->result_array():array();\n return $data;\n}", "title": "" }, { "docid": "981658590ca583ed366495342da12ef2", "score": "0.5405436", "text": "public function groupBy($data = [])\n {\n $instance = new Query($this->rows, $this);\n\n return $instance->groupBy($data);\n }", "title": "" }, { "docid": "c2fc749dcecf78a21edf9db01119fab3", "score": "0.53724086", "text": "function GetTemporalGroupDistincts() {\n $groupType = $this->input->get('t-group');\n $groupFormat = '%d-%m-%Y'; // default is day\n if ($groupType == 'month') {\n $groupFormat = '%M, %Y';\n } else if ($groupType == 'year') {\n $groupFormat = '%Y';\n }\n $groupQueryResult = $this->db->query('SELECT DISTINCT(DATE_FORMAT(event_date, \"' . $groupFormat . '\")) as item FROM '. config_item('data-table'). ' ORDER BY year, month, day')->result();\n echo json_encode($groupQueryResult);\n }", "title": "" }, { "docid": "db5a549462c7274e98448e6b9a1b20ec", "score": "0.5370813", "text": "function fnGroup($group) {\n\tif($group != '') {\n\t\tif(preg_match('/^\\s*?GROUP BY.*$/',$group)){\n\t\t\t$strGroup = \" \".$group;\n\t\t} else {\n\t\t\t$strGroup = \" GROUP BY \".$group;\n\t\t}\n\t\treturn $strGroup;\n\t} else {\n\t\treturn;\n\t}\n}", "title": "" }, { "docid": "eeb6e59c6c07d60fc134456744047c2e", "score": "0.53564864", "text": "public function groupBy($column): self\n {\n }", "title": "" }, { "docid": "c3c93189ae1f63ff91f8859c05547aa1", "score": "0.53416646", "text": "public function addGroupBy($groupby)\n {\n $col = $this->relationStringToDoctrineQueryColumn($groupby);\n \n $this->q->addGroupBy($col);\n \n return $this;\n }", "title": "" }, { "docid": "864080698bae71d88fd4cf7cab0a60f5", "score": "0.53401434", "text": "public function group_by( $column_name ) {\n\t\t$column_name = $this->_quote_identifier( $column_name );\n\t\t$this->_group_by[] = $column_name;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1d2fe69c172de3c78ef0fcc036e756ae", "score": "0.5333319", "text": "function query($use_groupby = FALSE) {\n $this->field_alias = $this->real_field;\n }", "title": "" }, { "docid": "915333edd741c26533918ef1c732aaf5", "score": "0.53280467", "text": "function groupRows(&$sqlQuery,$useLimit=false) \n\t{\n\t\tdebug_printb(\"[groupRows] Grouping rows...<br>\");\n\t\tglobal $g_sqlGroupingFuncs;\n\t\t$ar_limit=$sqlQuery->limit;\n\t\t$groupColumns=$sqlQuery->groupColumns;\n\t\t$groupColNrs=array();\n\t\t\n\t\t// use column numbers (faster)\n\t\tfor($i=0;$i<count($groupColumns);++$i) \n\t\t{\n\t\t\t$groupColNrs[$i]=$this->findColNrByFullName($groupColumns[$i]);\n\t\t\tif($groupColNrs[$i]==NOT_FOUND) \n\t\t\t{\n\t\t\t\tprint_error_msg(\"Column '\" . $groupColumns[$i] . \"' not found!\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// calc limit\n\t\tif(!$useLimit) \n\t\t{\n\t\t\t$limit = -1;\n\t\t} \n\t\telse \n\t\t{\n\t\t\tif(!isset($ar_limit[0]) && !isset($ar_limit[1])) \n\t\t\t{\n\t\t\t\t$limit = -1;\n\t\t\t} \n\t\t\telse if(count($ar_limit) > 1) \n\t\t\t{\n\t\t\t\t$limit = $ar_limit[0]+$ar_limit[1];\t\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t$limit = $ar_limit[0];\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$rs=new ResultSet();\n\t\t$rs->copyColumData($this);\n\t\t$groupedRows=array(); \n\t\t$groupedValues=array();\n\t\t\n\t\t$colNamesCount=count($this->colNames);\n\t\t\n\t\t$this->reset();\n\t\twhile((++$this->pos)<count($this->rowIds)) \n\t\t{\n\t\t\t// generate key\n\t\t\t$currentValues=array();\n\t\t\tforeach($groupColNrs as $groupColNr) \n\t\t\t{\n\t\t\t\tarray_push($currentValues, md5($this->rows[$this->colNames[$groupColNr]][$this->pos]));\n\t\t\t}\n\t\t\t$groupedRecsKey=join(\"-\",$currentValues);\n\t\t\t\n\t\t\tfor($i=0;$i<$colNamesCount;++$i) \n\t\t\t{\n\t\t\t\t$groupedValues[$groupedRecsKey][$i][]=$this->rows[$this->colNames[$i]][$this->pos];\n\t\t\t}\n\t\t\t\n\t\t\t// key doesn't exist ? add record an set key into array\n\t\t\tif(!array_key_exists($groupedRecsKey, $groupedRows)) \n\t\t\t{\n\t\t\t\t$groupedRows[$groupedRecsKey] = 1;\n\t\t\t\t$rs->append(false);\t\t\t\n\t\t\t\tfor($j=0; $j < sizeof($this->colNames); ++$j)\n\t\t\t\t{\n\t\t\t\t\t$rs->rows[$this->colNames[$j]][$rs->pos]=$this->rowws[$this->colNames[$j]][$this->pos];\n\t\t\t\t}\n\t\t\t\t$rs->rowIds[$rs->pos] = $this->rowIds[$this->pos] ;\n\n\t\t\t\t//$rs->rows[$rs->pos][$this->colNames]=$this->rows[$this->pos][$this->colNames];\n\t\t\t\t//$rs->rows[$rs->pos]->id=$this->rows[$this->pos]->id;\n\t\t\t}\n\t\t\t\n\t\t\tif($limit != -1)\n\t\t\t\tif(count($rs->rows) >= $limit)\n\t\t\t\t\tbreak;\n\t\t}\n\t\t--$this->pos;\n\t\t\n\t\tif(TXTDBAPI_VERBOSE_DEBUG) \n\t\t{\n\t\t\techo \"<b>RS dump in groupRows():<br></b>\";\n\t\t\t$rs->dump();\n\t\t}\n\t\t\n\t\t$groupFuncSrcColNr = -1; // the source column for the column with grouping functions\n\t\t\n\t\t// calculate the result of the functions\n\t\tfor($i=0;$i<count($rs->colFuncs);++$i) \n\t\t{\n\t\t\tif(in_array($rs->colFuncs[$i],$g_sqlGroupingFuncs)) \n\t\t\t{\n\t\t\t\tif(TXTDBAPI_DEBUG) \n\t\t\t\t{\t\t\n\t\t\t\t\tdebug_print(\"Searching source for grouping function \" . $rs->colFuncs[$i] . \"(\");\n\t\t\t\t\tif($rs->colTables[$i])\n\t\t\t\t\t\tdebug_print($rs->colTables[$i] . \".\");\n\t\t\t\t\tdebug_print($rs->colNames[$i] . \"): \");\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$groupFuncSrcColNr=$this->findColNrByAttrs($rs->colNames[$i],$rs->colTables[$i],\"\");\n\t\t\t\tif($groupFuncSrcColNr==NOT_FOUND) \n\t\t\t\t{\n\t\t\t\t\tprint_error_msg(\"Column \" . $rs->colNames[$i] . \", \" . $rs->colTables[$i] . \" not found!\");\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($groupedValues as $key => $value) \n\t\t\t\t{\n\t\t\t\t\t$groupedValues[$key][$i][0]=execGroupFunc($rs->colFuncs[$i], $groupedValues[$key][$groupFuncSrcColNr]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// put the results back\n\t\t$rs->reset();\n\t\tforeach($groupedValues as $key => $value) \n\t\t{\n\t\t\t$rs->next();\n\t\t\tfor($i=0;$i<$colNamesCount;++$i) \n\t\t\t{\n\t\t\t\t$rs->rows[$this->colNames[$i]][$rs->pos]=$groupedValues[$key][$i][0];\n\t\t\t}\n\t\t}\n\t\treturn $rs;\n\t}", "title": "" }, { "docid": "6f2d4309309357b38acec1c708072c26", "score": "0.53273505", "text": "function groupBy($keySelector, $keyEqualityComparer = null);", "title": "" }, { "docid": "13283d2ad138da4438b0fc70d12b7bd3", "score": "0.5327245", "text": "public function getGroupQueries() {}", "title": "" }, { "docid": "8609a85e242d4f2403ed6936252e1891", "score": "0.5313829", "text": "public function pdo_fetch_all_group($sql, $reset = true){\n if(!$statement = $this->pdoSelect($sql)){\n return false;\n }\n \n $row = $statement->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_GROUP);\n \n if($reset){\n $row = array_map('reset', $row);\n }\n \n return $row;\n }", "title": "" }, { "docid": "b9d4d3508359d595e4a547034669eeba", "score": "0.53135496", "text": "public function getAllGroup()\r\n {\r\n \treturn $this->fetchAll();\r\n }", "title": "" }, { "docid": "5c1021f68280d1803f7b84ada78900c8", "score": "0.5308274", "text": "protected function computeQueryGroupClause(): array\n {\n return $this->fetchData[Data::GROUP_CLAUSE];\n }", "title": "" }, { "docid": "996df97ed4ba65429bb36a0c18294ea8", "score": "0.5299992", "text": "public function pdo_fetch_all_group_column($sql, $reset = true){\n if(!$statement = $this->pdoSelect($sql)){\n return false;\n }\n // print_r($sql);\n // $statement = $this->pdo->query($sql);\n $row = $statement->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_ASSOC|PDO::FETCH_GROUP);\n \n if($reset){\n $row = array_map('reset', $row);\n }\n return $row;\n }", "title": "" }, { "docid": "b8300c2a4a148ecf1431576c0da0aabb", "score": "0.5292571", "text": "public function group_by_expr( $expr ) {\n\t\t$this->_group_by[] = $expr;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "83510928000b7021aed78d79ae9cc771", "score": "0.529104", "text": "function GetGroupKPI($connection,$unit_id){\n $query = $connection->query(\"SELECT * FROM assessment_params WHERE asp_typ_level='punit' AND asp_unit='$unit_id' GROUP BY asp_kpi\");\n // query\n // $query = $connection->query($sql) ;\n // execute\n $num = $query->execute();\n \n if($num !=0) \n {\n // return $query->setFetchMode(PDO::FETCH_ASSOC);\n return $query->fetchAll();\n }\n else\n {\n return false;\n }\n}", "title": "" }, { "docid": "e0d7fe6f51add4cf514bcfacd882d440", "score": "0.5264648", "text": "public function groupBy(string $fieldName): static;", "title": "" }, { "docid": "6d2bd40168e1e9d37cd6e5b823335361", "score": "0.52616316", "text": "protected function ExplainGroups()\n {\n $res = [];\n $res[] = ['name' => 'levrach', 'id' => 74];\n $res[] = ['name' => 'levrach', 'id' => 99];\n $res[] = ['name' => 'levrach', 'id' => 31];\n $res[] = ['name' => 'hivrach', 'id' => 30];\n $res[] = ['name' => 'mes', 'id' => 173];\n $res[] = ['name' => 'anevrach', 'id' => 32];\n $res[] = ['name' => 'anemes', 'id' => 174];\n $res[] = ['name' => 'dracula', 'id' => 46]; // should be 108\n $res[] = ['name' => 'zam', 'id' => 252];\n $res[] = ['name' => 'zav', 'id' => 46];\n $res[] = ['name' => 'anezav', 'id' => 240];\n $res[] = ['name' => 'anezav', 'id' => 32]; // cause of Rozengard's Group\n $res[] = ['name' => 'smob', 'id' => 138];\n\n $ret = [];\n\n foreach ($res as $row)\n {\n $ret['byid'][$row['id']] = $row['name'];\n $ret['toid'][$row['name']] = $row['id'];\n }\n\n return ['data' => $ret];\n }", "title": "" }, { "docid": "e89cdc0de20d5b81c163d85600f8b62e", "score": "0.5249667", "text": "public function groupResults($results){\n $groupedResults = [];\n $ids = [];\n\n foreach ($results as $result){\n $ids[] = $result->key;\n }\n\n //Now fetch everything for these ids\n $found = $this->translation->whereIn('key',$ids)->get();\n\n\n foreach ($found as $result){\n $groupedResults[$result->key]['key'] = $result->key;\n $groupedResults[$result->key]['group'] = $result->group;\n $groupedResults[$result->key][$result->locale] = $result->toArray();\n }\n\n return $groupedResults;\n }", "title": "" }, { "docid": "a9a8f43b4c0bcf3c1a0ffb9c2fce9331", "score": "0.5246626", "text": "public function getGroupBy(): Collection\n {\n return $this->groupBy;\n }", "title": "" }, { "docid": "f2afd292409aed971192a1effc14d15e", "score": "0.5246145", "text": "public function groupBy(...$columns)\n {\n if (Validate::variable($columns, Validate::IS_ARRAY)) {\n $columns = implode(', ', $columns);\n $this->query .= \"GROUP BY {$columns} \";\n\n return $this;\n }\n\n return false;\n }", "title": "" }, { "docid": "c3f2fe29b77ba4c07b686e63cae73c23", "score": "0.52430975", "text": "public function aggregatedFields(): array;", "title": "" }, { "docid": "f9eb8100e499ea796c44203e63ef7773", "score": "0.5233514", "text": "public function group(string ...$columns){\r\n\t\t$this->add_query('GROUP', $columns);\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "a96eaba651bfb715ec0771900a7a66ca", "score": "0.5226977", "text": "public static function groupBy($column): self\n {\n }", "title": "" }, { "docid": "38351ec82924ddd2ed5b10ef7559844d", "score": "0.5225655", "text": "public function Group($keys,$initial,$reduce){\n\n //$collection= $m->selectDB('siriraj')->selectCollection('test');\n\n \n $manager = $this->selectDB($this->db);\n\n $collection = $manager->selectCollection($this->col);\n \n return $collection->group($keys, $initial, $reduce);\n }", "title": "" }, { "docid": "188424f21364d065d35eae3cebfcf367", "score": "0.51966923", "text": "public static function groupByRaw($sql, $bindings = [])\n {\n /** @var \\Illuminate\\Database\\Query\\Builder $instance */\n return $instance->groupByRaw($sql, $bindings);\n }", "title": "" }, { "docid": "ca73265a313efb4b5f43b367391d53f1", "score": "0.5195168", "text": "public function groupByRaw($sql, array $bindings = [])\n {\n $this->groups[] = self::raw($sql);\n\n $this->addBinding($bindings, 'groupBy');\n\n return $this;\n }", "title": "" }, { "docid": "acb931eebe86fca5111c97d906423faa", "score": "0.51839226", "text": "public function groupBy($columns)\n {\n $sql = clone $this;\n $sql->groupBy = $columns;\n\n return $sql;\n }", "title": "" }, { "docid": "da83b79afd8e101f68aebfa89bf23801", "score": "0.5179278", "text": "public function fetchAllGroups(){ \n\t\t$select = new Select;\n\t\t$select->from('y2m_group') \t\t\t\n\t\t\t->where(array('y2m_group.group_parent_group_id' => \"0\"))\n\t\t\t->order(array('y2m_group.group_title ASC'));\n\t\t$statement = $this->adapter->createStatement();\n\t\t$select->prepareStatement($this->adapter, $statement);\n\t\t$resultSet = new ResultSet();\n\t\t$resultSet->initialize($statement->execute());\t \n\t\treturn $resultSet;\t \n }", "title": "" }, { "docid": "9d367b10be7f6eb018decb27d3a43048", "score": "0.51752996", "text": "public function groupBy($groupBy) {\n $this->innerQuery->groupBy($groupBy);\n }", "title": "" }, { "docid": "08cacc2881f5ae6fa3147c74f93fe159", "score": "0.5169991", "text": "public function getFakeAliasRuleGroupsConcat()\n {\n try {\n $db_raw = AppCapsule::database()->connection('bd_alias');\n $qry = \"SELECT\n server_x_fake_alias.server_id AS 'alias_id',\n fake_alias_info.permission_level AS 'rules_type',\n fake_alias_info.display_name AS 'display_name',\n fake_alias_info.others AS 'others',\n fake_alias_info.country AS 'country',\n fake_alias_info.country_fullname AS 'country_fullname',\n (SELECT DISTINCT GROUP_CONCAT(rules.id_rulegroup SEPARATOR ',')\n FROM rules_rulegroup_x_fake_alias rules\n WHERE rules.fake_id = fake_alias_info.id) AS rule_group_list\n FROM fake_alias_info\n INNER JOIN server_x_fake_alias ON fake_alias_info.id = server_x_fake_alias.fake_id\n INNER JOIN servers ss ON ss.id = server_x_fake_alias.server_id\n WHERE ss.type = 'FINAL'\";\n \n\n return $db_raw->select($qry);\n }catch (\\Throwable $th) {\n return $this->return_json(500,'INTERNAL_SERVER_ERROR', 'Something went wrong with SQL!');\n }\n\n }", "title": "" }, { "docid": "4d15691dbe27124f1d065efa2044a456", "score": "0.51669437", "text": "public function groupBy($field){\n\t\t$this->groupBy[] = $field;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ae01185b95a60bea7073818b33823f78", "score": "0.5161184", "text": "public function groupBy(...$groupBy): object\n {\n $groupBy = implode(',', $groupBy);\n $groupBy = $this->validateString($groupBy);\n $this->action .= ' GROUP BY '.$groupBy;\n\n return $this;\n }", "title": "" }, { "docid": "855ff73b613490435a8998651993f16a", "score": "0.5127139", "text": "private function mountGroupBy($groupBy) :string\n {\n $groupBy = $this->groupBy;\n foreach($groupBy as $index => $item) {\n $groupBy[$index] = $this->mountField($item);\n }\n return ' GROUP BY ' . implode(',', $groupBy);\n }", "title": "" }, { "docid": "8fe4139a95e73ebee906fd178bd68ef3", "score": "0.5123162", "text": "public function get_groupby() : array {\n if ( ! empty( $this->query->query_vars['groupby'] ) ) {\n return $this->query->query_vars['groupby'];\n }\n else {\n return $this->groupby;\n }\n }", "title": "" }, { "docid": "692039fae3649eff06e8a9c2aba74f21", "score": "0.51214147", "text": "function all_grouped_categories() {\r\n return \\query\\main::group_categories( array( 'max' => 0 ) );\r\n}", "title": "" }, { "docid": "d2989c01c4e2ff54e410d3e2278132fb", "score": "0.51178646", "text": "function AggregateListRow() {\n\t}", "title": "" }, { "docid": "986a4dd1ca4f5fa6f126fa298e74c2b2", "score": "0.5113557", "text": "function clearGroupBy()\n {\n $this->groupBy = array();\n return $this;\n }", "title": "" }, { "docid": "68ff835cfbfe1db9ff95527db1db20c0", "score": "0.510465", "text": "public function testQuerySelectGroupBySingle($clauses)\n {\n $sql = 'SELECT * FROM \"table\" GROUP BY \"id\"';\n $select = (new Select($this->mockConnection))->from('table')->groupBy($clauses);\n $this->assertEquals($sql, $select->toSql());\n }", "title": "" } ]
b90952c5a6e6ae84bfc02ea9ec065e83
/ Public Methods Returns metadata for all files and folders whose filename contains the given search string as a substring.
[ { "docid": "abc57c29b0072492adda35f45c2b62aa", "score": "0.48578075", "text": "public function search($query, $path, $root = 'dropbox') {\n\t\t//argument test\n\t\tEden_Dropbox_Error::i()\n\t\t\t->argument(1, 'string')\t\t//Argument 1 must be a string\n\t\t\t->argument(2, 'string')\t\t//Argument 2 must be a string\n\t\t\t->argument(3, 'string');\t//Argument 3 must be a string\n\t\t\t\n\t\t$this->_query['query'] = $query;\n\t\t\n\t\treturn $this->_getResponse(sprintf(self::DROPBOX_FILES_SEARCH, $root, $path), $this->_query);\n\t}", "title": "" } ]
[ { "docid": "73a0213665653141923e1510755d19f5", "score": "0.59104437", "text": "function search_for_file($filename, $galleryID = false)\n {\n $retval = array();\n $mapper = C_Image_Mapper::get_instance();\n $mapper->select();\n $mapper->where_and(array('filename = %s', $filename));\n if ($galleryID)\n $mapper->where_and(array('galleryid = %d', $galleryID));\n foreach ($mapper->run_query() as $dbimage) {\n $image = new C_Image_Wrapper($dbimage);\n $retval[] = $image;\n }\n return $retval;\n }", "title": "" }, { "docid": "24ffd13f8cf1a70dc5652cdb0c148eb4", "score": "0.58865833", "text": "function metaFiles($id){\n $basename = metaFN($id, '');\n $files = glob($basename.'.*', GLOB_MARK);\n // filter files like foo.bar.meta when $id == 'foo'\n return $files ? preg_grep('/^'.preg_quote($basename, '/').'\\.[^.\\/]*$/u', $files) : array();\n}", "title": "" }, { "docid": "d2e64b29130fadce40a5b58cf8f93574", "score": "0.57065094", "text": "function searchFileForString($file) \n { \n // open file to an array \n $fileLines = file($file); \n \n // loop through lines and look for search term \n $lineNumber = 1; \n foreach($fileLines as $line) { \n $searchCount = substr_count($line, $this->_searchString); \n if($searchCount > 0) { \n // log result \n $this->addResult($file, $line, $lineNumber, $searchCount); \n } \n $lineNumber++; \n } \n }", "title": "" }, { "docid": "957d164a8774bd936548870d3a19d112", "score": "0.56370604", "text": "public function getSearchFiles(){\n if (null==$this->finds){\n $this->generateFindCommands();\n }\n if (null==$this->files) {\n $this->populateFilesList();\n }\n return $this->files;\n }", "title": "" }, { "docid": "d94e11401033880c07ce4ccd65cdf038", "score": "0.54940385", "text": "function find_all_filter_files($date, $instrument, $filter, $extension, $fd_ar, $region_number=\"00000\")\n\t{\n\t\tinclude(\"globals.php\");\n\t\t\n\t\t//\tfind what folder the desired file should be in\n\t\tswitch($extension)\n\t\t{\n\t\t\tcase \"txt\":\n\t\t\t\t$folder = \"meta\";\n\t\t\t\t$instr = \"\";\n\t\t\t\tbreak;\n\t\t\tcase \"fts\":\n\t\t\t\t$folder = \"fits\";\n\t\t\t\t$instr = $instrument . \"/\";\n\t\t\t\tbreak;\n\t\t\tcase \"png\":\n\t\t\t\t$instr = $instrument . \"/\";\n\t\t\t\t$folder = \"pngs\";\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//\tinitialize the latest variables\n\t\t$all_files = array();\n\t\t\n\t\t//\topen the dir if it exists\n\t\t$dir = \"${arm_data_path}data/$dirdate/$folder/$instr\";\n\t\tif (is_dir($dir))\n\t\t{\n\t\t\tif ($dir_handle = opendir($dir))\n\t\t\t{\n\t\t\t\t//\tloop through the files in the directory\n\t\t\t\twhile(false !== ($file = readdir($dir_handle)))\n\t\t\t\t{\n\t\t\t\t\tif(($file != \".\") && ($file != \"..\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t//\tif the folder is meta, the only files we should need start with map_coord\n\t\t\t\t\t\tif ($folder == \"meta\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($meta1, $rest) = split('[_.]', $file, 2);\n\t\t\t\t\t\t\tif ($meta1 != \"forecast\")\n\t\t\t\t\t\t\t\tlist($meta2, $rest) = split('[_.]', $rest, 2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$rest = $file;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//\tso test to see if it is a map_coord\n\t\t\t\t\t\t//if(($folder == \"meta\") && ($meta1 != \"map\"))\n\t\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//\tget the instrument, filter, and ar or fd type\n\t\t\t\t\t\tlist($file_instrument, $file_filter, $fd_ar_type, $rest) = split('[_.]', $rest, 4);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//\tif it is a fd and we want an fd, parse the rest of the filename\n\t\t\t\t\t\tif (($fd_ar_type == \"fd\") && ($fd_ar == \"fd\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($file_date, $file_time, $rest) = split('[_.]', $rest, 3);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//\tif it is an ar and we want an ar parse the rest of the filename\n\t\t\t\t\t\telseif (($fd_ar_type == \"ar\") && ($fd_ar == \"ar\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($file_region, $file_date, $file_time, $rest) = split('[_.]', $rest, 4);\n\t\t\t\t\t\t\t//\tgo to next file if we dont get the region number we want\n\t\t\t\t\t\t\tif ($file_region != $region_number)\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//\tif we dont get the type we want, move to next file\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//\tif the instrument or filter dont match, move on. this may need fixing after gsxi is correct\n\t\t\t\t\t\tif (($instrument != $file_instrument) || ($filter != $file_filter))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$all_files[]=$file;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t//\tcompare the times\n\t\t\t\t\t\tif($latest_time <= strtotime(\"$file_date $hh:$mm:$ss\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$latest_time = strtotime(\"$file_date $hh:$mm:$ss\");\n\t\t\t\t\t\t\t$latest_file = $file;\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\tclosedir($dir_handle);\n\t\t}\n\t\t\n\t\t//\treturn the resulting file.. maybe this should return directory, i dont know yet\n\t\treturn $all_files;\n\t}", "title": "" }, { "docid": "2bc143e8205e1bda6d21cc7e77455691", "score": "0.5386705", "text": "function file_search()\n {\n $this->ipsclass->admin->page_title = \"File Report\";\n\n $this->ipsclass->admin->page_detail = \"Search for a file.\";\n\n //+-------------------------------\n\n $this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'tools' ),\n 2 => array( 'act' , 'gallery' ),\n 3 => array( 'tool' , 'dofilesrch' ),\n 4 => array( 'section', 'components' ),\n ) );\n\n //+-------------------------------\n\n $this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"40%\" );\n $this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"60%\" );\n\n //+-------------------------------\n\n $this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"File Quick Search\" );\n\n\n $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Enter part or all of the caption</b>\" ,\n $this->ipsclass->adskin->form_input( \"search_term\" )\n ) );\n\n $this->ipsclass->html .= $this->ipsclass->adskin->end_form(\"Find File\");\n\n $this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n $this->ipsclass->admin->output();\n\n }", "title": "" }, { "docid": "6f90bc1595f338317c53d5d8435c2fb5", "score": "0.53423476", "text": "function search($nameLike, $historyNames, $nameCaseSensitive, $isDirectory,\n\t\t$isDeleted, $lengthLess, $lengthGreater, $versionLess, $versionGreater,\n\t\t$modifiedBefore, $modifiedAfter, $mimeLike, $firstMentionBefore,\n\t\t$firstMentionAfter, $tag, $comment, $historyComments, $ancestor,\n\t\t$historyAncestors, $routine, PDO $db) {\n\t$selects = array();\n\tappendIfNotNull(\n\t\t\tselectByName($nameLike, $historyNames, $nameCaseSensitive),\n\t\t\t$selects);\n\tappendIfNotNull(\n\t\t\tselectByPlain($isDirectory, $isDeleted, $lengthLess,\n\t\t\t\t\t$lengthGreater, $versionLess, $versionGreater,\n\t\t\t\t\t$modifiedBefore, $modifiedAfter, $mimeLike), $selects);\n\tappendIfNotNull(\n\t\t\tselectByFirstMention($firstMentionBefore, $firstMentionAfter),\n\t\t\t$selects);\n\tappendIfNotNull(selectByTag($tag), $selects);\n\tappendIfNotNull(selectByComment($comment, $historyComments), $selects);\n\tappendIfNotNull(selectByAncestor($ancestor, $historyAncestors), $selects);\n\tappendIfNotNull(selectByRoutine($routine), $selects);\n\n\t$select = implode(' INTERSECT ', $selects);\n\trequire_once 'utils/pagination.php';\n\t$statement = $db->query(createFileIdsOrderSelect($select));\n\treturn $statement->fetchAll(PDO::FETCH_COLUMN);\n}", "title": "" }, { "docid": "137426ea8ec01cedd6293c7957178b8a", "score": "0.53380203", "text": "public function searchPage($searchString) {\n\t\t$genericResult = FileHelper::searchPageFiles($searchString);\n\t\treturn $genericResult;\n\t}", "title": "" }, { "docid": "639ca78e9dea6f4b8ddcd70acc1d9570", "score": "0.53271234", "text": "public function searchFile($name = \"\"){\n $pageToken = null;\n $result = array();\n \n try\n {\n do\n {\n // Print the names and IDs for up to 10 files.\n $optParams = array(\n 'pageToken' => $pageToken,\n 'spaces' => 'drive',\n 'fields' => \"nextPageToken, files(id, name)\",\n 'q' => \"name contains '{$name}'\" \n );\n\n $response = $this->google_service->files->listFiles($optParams);\n foreach($response->files as $file){\n array_push($result, $file);\n }\n\n }\n while($pageToken != null);\n }\n catch(Exception $err){\n return false;\n }\n return $result;\n }", "title": "" }, { "docid": "80845ef035d049c5ffcf6a68c710163a", "score": "0.532535", "text": "function rsearch($dir, $pattern) {\n $my_files = [];\n $tree = glob(rtrim($dir, '/') . '/*');\n if (is_array($tree)) {\n foreach($tree as $file) {\n if (is_dir($file)) {\n // echo $file . '<br/>';\n $_files = rsearch($file, $pattern);\n $my_files = array_merge( $my_files, $_files );\n } elseif (is_file($file)) {\n if ( strpos( $file, $pattern ) !== false ) $my_files[] = $file;\n }\n }\n }\n\n return $my_files;\n\n\n\n}", "title": "" }, { "docid": "8700478221ec274451aa43f2e321b8e3", "score": "0.53201735", "text": "public function find($searchString) {}", "title": "" }, { "docid": "60a7d0966892ac2b075d1617b9591888", "score": "0.52640575", "text": "public function search_upload_by_keyword($keyword){\n\t\t//$this->db->select('*');\n\t\t//$this->db->from('uploads');\n\t\t$this->db->like('file_name', $keyword);\n\t\t$this->db->or_like('title', $keyword);\n\t\t//$this->db->or_like('contact_number', $keyword);\n\t\t$query = $this->db->get('uploads');\n\t\tif($query){\n\t\t\treturn $query;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "a3f3e7a100c1463f92d046d4fa510ac5", "score": "0.52494705", "text": "public function testFindAllDirAndFileByNameIsTrue(){\n $fileFinder = new FileFinder();\n\n $searchKey = \"folder\";\n $directory = 'public/file-finder';\n\n $result = $fileFinder->findAllDirAndFileByName($directory, $searchKey);\n\n $this->assertTrue(count($result) > 0);\n }", "title": "" }, { "docid": "3ae958e45e0423a409ad96f6b795e725", "score": "0.5204945", "text": "function getMetadata($name) {\t\n\t$metaobject = NULL;\n\t\n\t$metafile = self::metafile($name);\n\tif (file_exists($metafile)) {\n\t\tswitch (FILE::ext($metafile)) {\n\t\t\tcase 'xml':\n\t\t\t\t$xml = simplexml_load_file($metafile);\n\t\t\t\t$metaobject = array();\n\t\t\t\tforeach ($xml->children() as $child) {\n\t\t\t\t\t$name = $child->getName();\n\t\t\t\t\tswitch ($name) {\n\t\t\t\t\t\tcase 'file':\n\t\t\t\t\t\t\t$fileentry = array();\n\t\t\t\t\t\t\tforeach ($child->children() as $field) $fileentry[$field->getName()] = trim((string)$field);\n\t\t\t\t\t\t\t$metaobject['directory']['file'][$fileentry['name']] = $fileentry;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$metaobject['directory'][$child->getName()] = trim((string)$child);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'php':\n\t\t\t\tinclude_once ($metafile);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t}\n\t} \n\t\n\tif ($metaobject != NULL && is_array($metaobject['directory'])) {\n\t\tif (is_file($name)) {\n\t\t\tif (!array_key_exists('file', $metaobject['directory']) || !array_key_exists($file, $metaobject['directory']['file'])) {\n\t\t\t\t$file = basename($name);\n\t\t\t\t$metaobject['directory']['file'][$file] = array(\n\t\t\t\t\t'name' => $file,\n\t\t\t\t\t'short' => $file,\n\t\t\t\t\t'long' => '',\n\t\t\t\t);\n\t\t\t}\n\t\t} else { // dir\n\t\t\tif (!array_key_exists('icon', $metaobject['directory'])) $metaobject['directory']['icon'] = '';\n\t\t}\n\t\n\t// build default metadata if there is none\n\t} else {\n\t\t$metaobject = array('directory' => array('short' => dirname($name), 'long' => '', 'icon' => ''));\n\t\tif (is_file($name)) {\n\t\t\t$file = basename($name);\n\t\t\t$metaobject['directory']['file'][$file] = array(\n\t\t\t\t'name' => $file,\n\t\t\t\t'short' => $file,\n\t\t\t\t'long' => '',\n\t\t\t);\n\t\t}\n\t}\n\t\n\treturn $metaobject;\n}", "title": "" }, { "docid": "760070b62e377e52e30b8685e1ab53e8", "score": "0.51818264", "text": "function _search($task_string) {\n\tglobal $api;\n\n\t$returns = array();\n\t$data = $api->task();\n\tif(!$task_string) return $data;\n\n\tforeach ($data as $task) {\n\t\tif(stripos($task['text'], $task_string) !== false) \n\t\t\t$returns[] = $task;\n\t}\n\treturn $returns;\n}", "title": "" }, { "docid": "eb3a2535afd4e09af64fe9d2166fc1fe", "score": "0.5178756", "text": "protected function _searchFiles() {\n\t\tforeach ($this->_paths as $path) {\n\t\t\t$Folder = new Folder($path);\n\t\t\t$files = $Folder->findRecursive('.*\\.(' . implode('|', $this->settings['files']) . ')', true);\n\t\t\tforeach ($files as $file) {\n\t\t\t\tif (strpos($file, DS . 'Vendor' . DS) !== false) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$this->_files[] = $file;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "48ec2d3d19a5937affb79f955c8a3508", "score": "0.5169208", "text": "function searchWordInFolder($dir_name, $search_word) {\n static $output = [];\n $dir = scandir( $dir_name );\n\t\t\tforeach ( $dir as $d ) {\n\t\t\t\tif ( $d != '.' and $d != '..' ) {\n\t\t\t\t\tif ( is_dir( $dir_name . '\\\\' . $d ) ) {\n\t\t\t\t\t\tsearchWordInFolder( $dir_name . '\\\\' . $d, $search_word);\n\t\t\t\t\t} else {\n\t // if file\n\t\t\t\t\t $content = file_get_contents($dir_name . '\\\\' . $d);\n\t\t\t\t\t\tif (searchWordInFile($content, $search_word)){\n\t\t\t\t\t\t\t$output[] = $dir_name . '\\\\' . $d.'</br>';\n }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $output;\n\t\t}", "title": "" }, { "docid": "b061bf97274b1beca02e51001178b01b", "score": "0.5135369", "text": "function find_files(&$matches, $directory=APP_ROOT, $filename=null, $extension=null, $limit=null,\r\n\t\t$case_sensitive=true, $subdirs=true) {\r\n\t// File system objects\r\n\t$fsos = scandir($directory);\r\n\tforeach ($fsos as $fso) {\r\n\t\t$fso_full = $directory . DS . $fso; \r\n\t\t$parts = pathinfo($fso_full); \r\n\t\tif (is_file($fso_full)\r\n\t\t\t\t&& (empty($filename)\r\n\t\t\t\t\t|| ($case_sensitive && $filename == $parts['filename'])\r\n\t\t\t\t\t|| (!$case_sensitive && strcasecmp($filename, $parts['filename'])))\r\n\t\t\t\t&& (empty($extension)\r\n\t\t\t\t\t|| ($case_sensitive && $extension == $parts['extension'])\r\n\t\t\t\t\t|| (!$case_sensitive && strcasecmp($extension, $parts['extension'])))) { \r\n\t\t\t$matches[] = $fso_full;\r\n\t\t\tif ($limit > 0 && count($matches) >= $limit) return;\r\n\t\t} \r\n\t\telse if (is_dir($fso_full) && $subdirs && $fso != '.' && $fso != '..') {\r\n\t\t\tfind_files($matches, $fso_full, $filename, $extension, $limit, $case_sensitive, $subdirs);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "ee8f9fc0cce7f6ca93ee13952ad5d1a2", "score": "0.51262945", "text": "public static function getListMeta(int $page, int $pagesize, string $search): array {\n $pdo = new PDO_MYSQL();\n if($search != \"\") $res = $pdo->query(\"select count(*) as size from icms_files where lower(concat(fileName,' ',dateUploaded)) like lower(concat('%',:search,'%')) and fID >= 0\", [\":search\" => $search]);\n else $res = $pdo->query(\"select count(*) as size from icms_files where fID >= 0\");\n $size = $res->size;\n $maxpage = ceil($size / $pagesize);\n return [\n \"size\" => $size,\n \"maxPage\" => $maxpage,\n \"page\" => $page,\n \"files\" => []\n ];\n }", "title": "" }, { "docid": "5e15d2f34655aab83fceed6916f90780", "score": "0.51236117", "text": "public function getFileMetadata($filekey);", "title": "" }, { "docid": "58aa15faf14a818de117e35536013b41", "score": "0.51207757", "text": "public function getPathsWithOccurences()\n\t{\n\t\t$key = md5( $this->_root_dir . '::' . $this->_search_term );\n\n\t\tif ( !array_key_exists( $key, $this->_paths_with_occurences ) )\n\t\t{\n\t\t\t$this->_paths_with_occurences[ $key ] = array();\n\n\t\t\tif ( file_exists( $this->_root_dir ) && !empty($this->_search_term) )\n\t\t\t{\n\t\t\t\t$search_term = escapeshellarg( addcslashes( $this->_search_term, '-' ) );\n\t\t\t\t$root_dir = escapeshellarg( $this->_root_dir );\n\n\t\t\t\t$excludes = array();\n\t\t\t\tforeach ( $this->_exclude_patterns as $exclude )\n\t\t\t\t{\n\t\t\t\t\t$excludes[] = '--exclude=' . escapeshellarg( $exclude );\n\t\t\t\t}\n\n\t\t\t\t$includes = array();\n\t\t\t\tforeach ( $this->_include_patterns as $include )\n\t\t\t\t{\n\t\t\t\t\t$includes[] = '--include=' . escapeshellarg( $include );\n\t\t\t\t}\n\n\t\t\t\t$command = sprintf(\n\t\t\t\t\t'grep -ric %s %s %s %s',\n\t\t\t\t\tjoin( ' ', $includes ),\n\t\t\t\t\tjoin( ' ', $excludes ),\n\t\t\t\t\t$search_term,\n\t\t\t\t\t$root_dir\n\t\t\t\t);\n\n\t\t\t\t$results = shell_exec( $command );\n\n\t\t\t\tif ( !empty($results) )\n\t\t\t\t{\n\t\t\t\t\t$lines = explode( \"\\n\", $results );\n\t\t\t\t\tforeach ( $lines as $line )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( !empty($line) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($filepath, $count) = explode( ':', $line );\n\t\t\t\t\t\t\t$this->_paths_with_occurences[ $key ][ $filepath ] = intval( $count );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_paths_with_occurences[ $key ];\n\t}", "title": "" }, { "docid": "9aee40c54f1445fb38d67f58ea99a052", "score": "0.5101248", "text": "function do_file_search()\n {\n if( $this->ipsclass->input['search_term'] == '' )\n {\n $this->ipsclass->admin->error( \"You did not enter a search term\" );\n }\n\n $this->ipsclass->DB->simple_construct( array( 'select' => '*',\n 'from' => 'gallery_images',\n 'where' => \"caption LIKE '%{$this->ipsclass->input['search_term']}%'\" ) );\n $res = $this->ipsclass->DB->simple_exec();\n\n if( $this->ipsclass->DB->get_num_rows() < 1 )\n {\n $this->ipsclass->admin->error( \"No results found\" );\n }\n\n else if( $this->ipsclass->DB->get_num_rows() > 1 )\n {\n // Page Information\n $this->ipsclass->admin->page_title = \"File Report\";\n $this->ipsclass->admin->page_detail = \"Select which file you will like to view a report on\";\n\n // Table Headers\n $this->ipsclass->adskin->td_header[] = array( \"File Name\", \"100%\" );\n\n // Start o' the page\n $this->ipsclass->html .= $this->ipsclass->adskin->start_table( $this->ipsclass->DB->get_num_rows().\" Results\" );\n\n while( $i = $this->ipsclass->DB->fetch_row( $res ) )\n {\n $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $this->_img_row( $i ) ) );\n }\n\n $this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n $this->ipsclass->admin->output();\n }\n else\n {\n $i = $this->ipsclass->DB->fetch_row();\n $this->gen_file_report( $i['id'] );\n }\n\n }", "title": "" }, { "docid": "94bccb5170adac6c813dc668d6725e54", "score": "0.509407", "text": "function my_find_images_by_address($address) {\n\n $images = array();\n $file_list = scandir(FCPATH . PICS_UPLOAD_DIRECTORY);\n foreach ($file_list as $file) {\n if ($file != '.' && $file != '..') {\n if (!is_dir(FCPATH . PICS_UPLOAD_DIRECTORY . $file)) {\n $_file = strtolower($file);\n if (strpos($_file, strtolower($address->street_number)) !== false && strpos($_file, strtolower($address->address)) !== false && strpos($_file, strtolower($address->zipcode)) !== false) {\n $images[] = $file;\n }\n }\n }\n }\n\n return $images;\n}", "title": "" }, { "docid": "500911f5354a8d74c473b669b8aff26c", "score": "0.5088855", "text": "function getFileMetadata($name) {\n\t$metaobject = self::getMetadata($name);\n\t\n\tif (is_dir($name)) {\n\t\t$meta = $metaobject['directory'];\n\t} else {\n\t\t$meta = $metaobject['directory']['file'][basename($name)];\n\t}\n\t\n\treturn $meta;\n}", "title": "" }, { "docid": "a3139b75160470c4ddb98f9264198271", "score": "0.5082342", "text": "public function search($params) {\n $query = Files::find();\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => ['pageSize' => 25],\n 'sort' => [\n 'defaultOrder' => [\n 'updated_at' => SORT_DESC,\n 'file_id' => SORT_ASC\n ],\n ]\n ]);\n\n $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n $filesType = \\Yii::$app->controller->module->acceptedFilesType;\n $mime_type = isset($filesType[$this->mime_type]) ? $filesType[$this->mime_type] : $this->mime_type;\n\n $query->andFilterWhere([\n 'mime_type' => $mime_type,\n 'folder_id' => $this->folder_id\n ]);\n\n if (!empty($this->tags)) {\n $tagKeyword = $this->tags;\n $this->tags = [];\n $query->joinWith(['filesRelationships' => function($query) use ($tagKeyword) {\n $query->joinWith(['tag' => function($query) use ($tagKeyword) {\n foreach ($tagKeyword as $tkey) {\n $query->orFilterWhere(['like', 'value', $tkey]);\n }\n }], true, 'INNER JOIN');\n }], false, 'INNER JOIN');\n foreach ($tagKeyword as $tkey) {\n $this->tags[$tkey] = $tkey;\n }\n }\n\n $query->andFilterWhere(['OR',\n ['like', 'src_file_name', $this->keywords],\n ['like', 'caption', $this->keywords],\n ['like', 'alt_text', $this->keywords],\n ['like', 'description', $this->keywords]\n ]);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "f4b5e1172ae2f28e03d1470098bf27cf", "score": "0.50637513", "text": "public function search($search_text, $page = 0) {\n global $OUTPUT;\n $list = array();\n $ret = array();\n $tree = $this->boxclient->getAccountTree();\n if (!empty($tree)) {\n $filenames = $tree['file_name'];\n $fileids = $tree['file_id'];\n $filesizes = $tree['file_size'];\n $filedates = $tree['file_date'];\n $fileicon = $tree['thumbnail'];\n foreach ($filenames as $n=>$v){\n if(strstr(strtolower($v), strtolower($search_text)) !== false) {\n $list[] = array('title'=>$v,\n 'size'=>$filesizes[$n],\n 'date'=>$filedates[$n],\n 'source'=>'https://www.box.com/api/1.0/download/'\n .$this->auth_token.'/'.$fileids[$n],\n 'thumbnail' => $OUTPUT->pix_url(file_extension_icon($v, 90))->out(false));\n }\n }\n }\n $ret['list'] = array_filter($list, array($this, 'filter'));\n return $ret;\n }", "title": "" }, { "docid": "8ed73397be7ba3dc65508f875ce085bc", "score": "0.5029918", "text": "public function search($params)\n {\n $query = File::find();\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n if (!($this->load($params) && $this->validate())) {\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'id' => $this->id,\n 'shared' => $this->shared,\n 'systime' => $this->systime,\n 'users_id' => $this->users_id,\n 'sections_id' => $this->sections_id,\n ]);\n\n $query->andFilterWhere(['like', 'name', $this->name])\n ->andFilterWhere(['like', 'mimetype', $this->mimetype])\n ->andFilterWhere(['like', 'size', $this->size])\n ->andFilterWhere(['like', 'description', $this->description]);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "cbc112e01f842dd1a00caead1e03397e", "score": "0.502778", "text": "public function findByTitleOrAuthorNameOrExtensionKey($searchString) {\n\t\t$quotedSearchString = $this->databaseConnection->escapeStrForLike($this->databaseConnection->quoteStr($searchString, 'tx_extensionmanager_domain_model_extension'), 'tx_extensionmanager_domain_model_extension');\n\t\t$quotedSearchStringForLike = '\\'%' . $quotedSearchString . '%\\'';\n\t\t$quotedSearchString = '\\'' . $quotedSearchString . '\\'';\n\t\t$select = 'tx_extensionmanager_domain_model_extension.*,\n\t\t\t(\n\t\t\t\t(extension_key like ' . $quotedSearchString . ') * 8 +\n\t\t\t\t(extension_key like ' . $quotedSearchStringForLike . ') * 4 +\n\t\t\t\t(title like ' . $quotedSearchStringForLike . ') * 2 +\n\t\t\t\t(author_name like ' . $quotedSearchStringForLike . ')\n\t\t\t) as position';\n\t\t$from = 'tx_extensionmanager_domain_model_extension';\n\t\t$where = '(\n\t\t\t\t\textension_key = ' . $quotedSearchString . '\n\t\t\t\t\tOR\n\t\t\t\t\textension_key LIKE ' . $quotedSearchStringForLike . '\n\t\t\t\t\tOR\n\t\t\t\t\ttitle LIKE ' . $quotedSearchStringForLike . '\n\t\t\t\t\tOR\n\t\t\t\t\tdescription LIKE ' . $quotedSearchStringForLike . '\n\t\t\t\t\tOR\n\t\t\t\t\tauthor_name LIKE ' . $quotedSearchStringForLike . '\n\t\t\t\t)\n\t\t\t\tAND current_version=1 AND review_state >= 0\n\t\t\t\tHAVING position > 0';\n\t\t$order = 'position desc';\n\t\t$result = $this->databaseConnection->exec_SELECTgetRows($select, $from, $where, '', $order);\n\t\treturn $this->dataMapper->map('TYPO3\\\\CMS\\\\Extensionmanager\\\\Domain\\\\Model\\\\Extension', $result);\n\t}", "title": "" }, { "docid": "67b9f95d55f995160cd8f25fcb08c52b", "score": "0.50196385", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id_file',$this->id_file);\n\t\t$criteria->compare('creation_date',$this->creation_date,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('original_name',$this->original_name,true);\n\t\t$criteria->compare('id_folder',$this->id_folder);\n\t\t$criteria->compare('flags',$this->flags);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "61d067f7da4b93e866952a822d51ad97", "score": "0.49879572", "text": "abstract public function getFiles();", "title": "" }, { "docid": "26c937ad621e35f5f766009edad36cbd", "score": "0.49875724", "text": "public function searchInside(string $name, string $search, string $path):bool;", "title": "" }, { "docid": "d2ebdd00f59d08b7c444c936c12e7cd7", "score": "0.49861625", "text": "function returnFileNames($output, $type, $keyphrase = \"Saved: \", $base_path = \"/var/www-chapresearch/\")\n{\n $fileNames = array();\n\n foreach($output as $value){ // loop through the blender output\n $start = stripos($value, $keyphrase); // find the beginning of the keyphrase\n if (is_int($start)){ // if it exists\n $start += strlen($keyphrase) + strlen($base_path); // move pointer past phrase and basepath\n $end = strrpos($value,$type) + strlen($type); // find the last instance of the filetype and move past it\n $fileName = substr($value, $start, $end - $start); // take just what's between the beginning and end\n array_push($fileNames,$fileName);\n }\n }\n if (sizeof($fileNames) != 0){\n return $fileNames;\n }\n return false;\n}", "title": "" }, { "docid": "b86ae7cf375bae3eff57380b36ad4d56", "score": "0.4953421", "text": "public function testFindAllFileByContentIsTrue()\n {\n $fileFinder = new FileFinder();\n\n $searchKey = \"obama\";\n $directory = 'public/file-finder';\n\n $result = $fileFinder->findAllFileByContent($directory, $searchKey);\n\n $this->assertTrue(count($result) > 0);\n }", "title": "" }, { "docid": "713e7e10dd2837dc5afc7671c5263e22", "score": "0.4949202", "text": "function findFiles($fName) {\n\t\t$path = array();\n\t\t$realPath = realpath($fName);\n\t\t$rdi = new RecursiveDirectoryIterator($realPath);\n\t\t$rii = new RecursiveIteratorIterator($rdi);\n\t\tforeach ($rii as $foundFile) {\n\t\t\t$isHeader = pathinfo($foundFile, PATHINFO_EXTENSION);\n\t\t\tif($isHeader == 'h')\n\t\t\tarray_push($path, $foundFile);\t\t\n\t\t}\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "be4e7f88b3a2146ecd8d11b0c81a20c7", "score": "0.4948247", "text": "protected function findFiles() {\n $file_list = [];\n foreach ($this->directories as $provider => $directories) {\n $directories = (array) $directories;\n foreach ($directories as $directory) {\n // Check if there is a subdirectory with the specified name.\n if (is_dir($directory) && is_dir($directory . '/' . $this->subdirectory)) {\n // Now iterate over all subdirectories below the specifically named\n // subdirectory, and check if a .yml file exists with the same name.\n // For example:\n // - Assuming $this->subdirectory === 'fancy'\n // - Then this checks for 'fancy/foo/foo.yml', 'fancy/bar/bar.yml'.\n $iterator = new \\FilesystemIterator($directory . '/' . $this->subdirectory);\n /** @var \\SplFileInfo $file_info */\n foreach ($iterator as $file_info) {\n if ($file_info->isDir()) {\n $yml_file_in_directory = $file_info->getPath() . '/' . $file_info->getBasename() . '/' . $file_info->getBasename() . '.yml';\n if (is_file($yml_file_in_directory)) {\n $file_list[$yml_file_in_directory] = $provider;\n }\n }\n }\n }\n }\n }\n return $file_list;\n }", "title": "" }, { "docid": "cda9269664b4df8ac785fb37d63be682", "score": "0.49407908", "text": "public function getDataMetaTitleFilesByType($type)\r\n {\r\n $data['file_type'] = $type;\r\n $statementSelect = $this->db->prepare(\"SELECT u.url, u.wname, f.path, f.local_location, f.meta_data FROM \" . FILES_TABLE . \" AS f LEFT JOIN \" . PAGE_TABLE . \" AS p ON f.pages_id = p.id LEFT JOIN \" . URLS_TABLE . \" AS u ON p.url_id = u.id WHERE file_type = :file_type AND meta_data IS NOT NULL\");\r\n if(!$statementSelect->execute($data)){\r\n $this->log->m_log('getDataMetaTitleFilesByType MySql function error');\r\n }\r\n return $statementSelect->fetchAll();\r\n }", "title": "" }, { "docid": "814fce688cb19bea4ee54e19b247744e", "score": "0.48978114", "text": "protected function read_metadata_file( $filename, $path )\n\t\t{\n\t\t\t$meta = array();\n\n\t\t\t$content = file_get_contents( $filename );\n\n\t\t\t$regex = 'fonts\\s*{([^{]*)}';\t\t//\tfind all info inside {.......} = definition for font\n\n\t\t\t$matches = array();\n\t\t\tpreg_match_all( \"/\" . $regex . \"/s\", $content, $matches );\n\n\n\t\t\tif( is_array( $matches ) && is_array( $matches[1] ) && ( ! empty( $matches[1] ) ) )\n\t\t\t{\n\t\t\t\t$matches = $matches[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * We take the first valid name as key - or filename if user has started filename with $this->custom_font_prefix\n\t\t\t */\n\t\t\t$first_name = '';\n\t\t\t$first_file = '';\n\n\t\t\t/**\n\t\t\t * Split file info and store in array\n\t\t\t */\n\t\t\tforeach( $matches as $file_info )\n\t\t\t{\n\t//\t\t\t$file_info = str_replace( array( '{', '}' ), '', $file_info );\n\n\t\t\t\t$lines = preg_split( '/\\n|\\r/', $file_info, -1, PREG_SPLIT_NO_EMPTY );\n\n\t\t\t\t$info = array(\n\t\t\t\t\t\t\t'name'\t\t=> '',\n\t\t\t\t\t\t\t'style'\t\t=> 'normal',\n\t\t\t\t\t\t\t'weight'\t=> 400,\n\t\t\t\t\t\t\t'filename'\t=> '',\n\t\t\t\t\t\t\t'full_name'\t=> '',\n\t\t\t\t\t\t\t'files'\t\t=> array()\t\t\t\t//\t'ttf' => 'filename'\n\t\t\t\t\t\t);\n\n\t\t\t\tforeach ( $lines as $line )\n\t\t\t\t{\n\t\t\t\t\t$line = explode( ':', $line );\n\n\t\t\t\t\t$key = trim( str_replace( array( '\"', '\\'' ), '', $line[0] ) );\n\t\t\t\t\tif( empty( $key ) || ! isset( $info[ $key ] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$info[ $key ] = isset( $line[1] ) ? trim( str_replace( array( '\"', '\\'' ), '', $line[1] ) ) : '';\n\t\t\t\t\tif( 'filename' == $key )\n\t\t\t\t\t{\n\t\t\t\t\t\t$info[ $key ] = strtolower( $info[ $key ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif( empty( $info['filename'] ) )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$orig_file = trailingslashit( $path ) . $info['filename'];\n\n\t\t\t\tif( ! file_exists( $orig_file ) )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Set the font name\n\t\t\t\t */\n\t\t\t\tif( ( $info['name'] != '' ) && ( '' == $first_name ) )\n\t\t\t\t{\n\t\t\t\t\t$first_name = $info['name'];\n\t\t\t\t}\n\n\t\t\t\t$path_parts = pathinfo( $orig_file );\n\n\t\t\t\tif( '' == $first_file )\n\t\t\t\t{\n\t\t\t\t\t$first_file = $path_parts['filename'];\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Get all allowed font files\n\t\t\t\t */\n\t\t\t\t$fs = glob( trailingslashit( $path ) . $path_parts['filename'] . '.*' );\n\t\t\t\tforeach ( $fs as $f )\n\t\t\t\t{\n\t\t\t\t\t$fp = pathinfo( $f );\n\t\t\t\t\tif( in_array( $fp['extension'], $this->file_ext ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$info['files'][ $fp['extension'] ] = $fp['basename'];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$meta[] = $info;\n\t\t\t}\n\n\t\t\tif( '' == $first_name )\n\t\t\t{\n\t\t\t\t$first_name = ucfirst( $first_file );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Set first entry to\n\t\t\t */\n\t\t\tforeach ( $meta as $key => &$value )\n\t\t\t{\n\t\t\t\tif( ( 0 == $key ) || ( '' == $value['name'] ) )\n\t\t\t\t{\n\t\t\t\t\t$value['name'] = $first_name;\n\t\t\t\t}\n\n\t\t\t\tif( '' == $value['full_name'] )\n\t\t\t\t{\n\t\t\t\t\t$value['full_name'] = $value['name'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tunset( $value );\n\n\t\t\t$meta['key'] = AviaHelper::save_string( strtolower( $first_name ), '-' );\n\t\t\treturn $meta;\n\t\t}", "title": "" }, { "docid": "98aae9c4782b8fd763d9a19e1c6ea1e1", "score": "0.48908788", "text": "public function getAllFiles(Request $request)\n { \n\t\t$organization_id = $request['organization_id'];\n\t\t$filter_keyword = $request['filter_keyword'];\n\n\t\t$files = FileEntry::with('organization');\n\n\t\tif($organization_id != 'All'){\n\t\t\t$files = $files->where('organization_id', $organization_id);\n\t\t}\n\t\t\n\t\tif($filter_keyword != 'null'){\n\t\t\t$files = $files->where(function($q) use ($filter_keyword) {\n\t\t\t\t$q->where('filename', 'LIKE', '%'.$filter_keyword.'%');\n\t\t\t});\n\t\t}\n\n\t\t$files = $files->orderBy('created_at','desc')->paginate(100);\n\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "9052f79d586a9c451e261816f76f9dcf", "score": "0.48887268", "text": "private function getFileNames()\n {\n foreach (new DirectoryIterator($this->conParams['storage']) as $file) {\n if ($file->isFile()) {\n $this->files[] = $file->getFilename();\n }\n }\n }", "title": "" }, { "docid": "fb016fa461f991274cbff2a0eafd18d8", "score": "0.4876678", "text": "public function search($params)\n {\n $query = File::find()->select(\"files.id, files.title, files.ganre, files.filename, files.hashed_name, users.login\")->joinWith('users');\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n if (!($this->load($params) && $this->validate())) {\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'files.id' => $this->id,\n 'users.login' => $this->login,\n 'id_users' => $this->id_users,\n ]);\n\n $query->andFilterWhere(['like', 'filename', $this->filename])\n ->andFilterWhere(['like', 'title', $this->title])\n ->andFilterWhere(['like', 'ganre', $this->ganre]);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "85e96bfe88304309535be64a407476cb", "score": "0.48589292", "text": "private function _searchMatch($keywords, $fileOrDir)\n {\n if (is_null($keywords)) {\n return $fileOrDir;\n } else {\n $count = substr_count(strtolower($fileOrDir['basename']), strtolower($keywords));\n if ($count > 0) {\n return $fileOrDir;\n }\n }\n return [];\n }", "title": "" }, { "docid": "db262ab1a86a4cbb7a9d94c606f51cfe", "score": "0.48574033", "text": "function _search($task_string) {\n\tglobal $api;\n\n\treturn $api->findTask($task_string);\n}", "title": "" }, { "docid": "89457462845f779c6c3450afa525c4b2", "score": "0.48467824", "text": "public function locate($filename)\n\t{\n\t\treturn $this->scan($this->root, $filename);\n\t}", "title": "" }, { "docid": "69fa7ee1e46f1df817309a32fd64c638", "score": "0.484546", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('fileId', $this->fileId);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('path', $this->path, true);\n\t\t$criteria->compare('modelName', $this->modelName, true);\n\t\t$criteria->compare('modelId', $this->modelId);\n\t\t$criteria->compare('active', $this->active);\n\t\t$criteria->compare('updated_timestamp', $this->updated_timestamp, true);\n\t\t$criteria->compare('created_timestamp', $this->created_timestamp, true);\n\n\t\treturn new ActiveDataProvider($this, array(\n\t\t\t\t\t\t\t\t\t\t\t\t 'criteria' => $criteria,\n\t\t\t\t\t\t\t\t\t\t\t ));\n\t}", "title": "" }, { "docid": "184718187540fa269a2f4e4238eb97f1", "score": "0.48442933", "text": "public static function search(string $keyword)\n {\n if (self::isTesting()) {\n $files = File::allFiles(__DIR__ . '/../tests/Models');\n } else {\n $files = File::allFiles(app()->basePath() . '/app/' . config('fullsite-search.model_path'));\n }\n\n // to get all the model classes\n return collect($files)\n ->map([self::class, 'parseModelNameFromFile'])\n ->filter([self::class, 'filterSearchableModel'])\n ->map(function ($classname) use ($keyword) {\n // for each class, call the search function\n /** @var $model Model */\n $model = app(self::modelNamespacePrefix() . $classname);\n\n /**\n * Our goal here: to add these 3 attributes to each of our search result:\n * a. `match` -- the match found in our model records\n * b. `model` -- the related model name\n * c. `view_link` -- the URL for the user to navigate in the frontend to view the resource\n */\n\n // to create the `match` attribute, we need to join the value of all the searchable fields in\n // our model, ie all the fields defined in our 'toSearchableArray' model method\n\n // We make use of the SEARCHABLE_FIELDS constant in our model\n // we dont want id in the match, so we filter it out.\n $fields = array_filter($model::SEARCHABLE_FIELDS, fn ($field) => $field !== 'id');\n\n return $model::search($keyword)\n ->take(config('fullsite-search.search_limit_per_model'))\n ->get()\n ->map(function (Model $modelRecord) use ($keyword, $fields, $classname) {\n\n // use $slice as the match, otherwise if undefined we use the first 20 character of serialisedValues\n $modelRecord->setAttribute('match', self::createMatchAttribute($modelRecord, $fields, $keyword));\n // setting the model name\n $modelRecord->setAttribute('model', $classname);\n // setting the resource link\n $modelRecord->setAttribute('view_link', self::resolveModelViewLink($modelRecord));\n\n return $modelRecord;\n });\n })->flatten(1);\n }", "title": "" }, { "docid": "51523d8111620b45da4b189d83cc7fb2", "score": "0.48315054", "text": "public function search();", "title": "" }, { "docid": "c38726403cf3f56cec4774f706c71bf1", "score": "0.482432", "text": "public function getMetadata() {\n $lRet = array();\n \n $lFie = CCor_Res::getByKey('alias', 'fie', array(\"mand\" => MID));\n foreach ($lFie as $lKey => $lDef) {\n $lFla = intval($lDef['flags']);\n $lId = intval($lDef['id']);\n if (bitset($lFla, ffMetadata)) {\n $lRet[$lId] = $this -> mJob[$lKey];\n }\n }\n \n return $lRet;\n }", "title": "" }, { "docid": "87a6e8c7d91432396d2fbdd273e365f3", "score": "0.4822685", "text": "function findFiles($path = '.', $pattern = '/./', $result = '') {\r\n if (!($recursed = is_array($result))) $result = array();\r\n if (!is_dir($path)) error('No features folder found for that module.');\r\n $dir = dir($path);\r\n \r\n while ($filename = $dir->read()) {\r\n if ($filename == '.' or $filename == '..') continue;\r\n $filename = \"$path/$filename\";\r\n if (is_dir($filename) and $recursed) $result = findFiles($filename, $pattern, $result);\r\n if (preg_match($pattern, $filename)){\r\n $result[] = $filename;\r\n }\r\n }\r\n return $result;\r\n}", "title": "" }, { "docid": "89b5e045b5859a5ac76abc9f5f3cc6ef", "score": "0.48206913", "text": "function searchDatasFile(String $typeDatasSought)\n {\n $file = fopen(CONFIGFILE, 'r');\n $datasFind = [];\n while(!feof($file)){\n $line = fgets($file);\n $datas = explode('|', $line);\n if ($datas[0] == $typeDatasSought) {\n $datasFind = $datas;\n break;\t//to exit the foreach loop \n }\n }\n fclose($file);\n \n return $datasFind;\n }", "title": "" }, { "docid": "a6dfea09d57752140149d22b3c3ca92a", "score": "0.4812483", "text": "public function getMetadata()\n {\n if (!empty($this->meta)) {\n return $this->meta;\n }\n\n $meta = [];\n\n // Process dirs\n foreach ($this->paths as $path) {\n $meta += $this->getPathMetadata($path);\n }\n\n $this->meta = $meta;\n\n return $meta;\n }", "title": "" }, { "docid": "fc335f3f63cc22aa24c528e3e344f586", "score": "0.48054016", "text": "public static function identify($filename)\n {\n $ri = self::_instance();\n $ret = array('found' => false,\n 'ext' => $ri->defext,\n 'mime' => $ri->defmime);\n foreach ($ri->types as $ext => $mime) {\n if (Utils::str_endsWith($filename, $ext, true)) {\n $ret['found'] = true;\n $ret['ext'] = $ext;\n $ret['mime'] = $mime;\n break;\n }\n }\n return $ret;\n }", "title": "" }, { "docid": "fead97650c5af9426e82b82500bf7405", "score": "0.47888017", "text": "function fsFind($in_from_path, $in_opt_mask=FALSE)\n{\n\t$result = array();\n\t$in_from_path = realpath($in_from_path);\n\t$root = scandir($in_from_path); \n\t\n foreach($root as $basename) \n { \n if ($basename === '.' || $basename === '..') { continue; }\n \t\t$path = $in_from_path . DIRECTORY_SEPARATOR . $basename;\n\t\t\n if (is_file($path))\n\t\t{\n\t\t\tif (FALSE !== $in_opt_mask)\n\t\t\t{ if (0 === preg_match($in_opt_mask, $basename)) { continue; } }\n\t\t\t$result[] = $path;\n\t\t\tcontinue;\n\t\t}\n\t\t\n foreach(fsFind($path, $in_opt_mask) as $basename) \n { $result[] = $basename; } \n } \n return $result;\n}", "title": "" }, { "docid": "3048429123c07ed487ecd4d79c779ece", "score": "0.47662118", "text": "function find($request) {\n\t\n\t//Get all files within current directory\n\t$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__));\n\n\t//Loop through files found\n\tforeach($files as $name){\n\t\t\n\t\t//If end of file path matches the requested file\n\t\tif (substr($name, -(strlen($request))) == $request) {\n\t\t\treturn $name; //Return the file path\n\t\t}\n\t\t\n\t}\n\n}", "title": "" }, { "docid": "9780bc9fa86312763e0ea4703f796975", "score": "0.47581762", "text": "public function getFiles();", "title": "" }, { "docid": "9780bc9fa86312763e0ea4703f796975", "score": "0.47581762", "text": "public function getFiles();", "title": "" }, { "docid": "9780bc9fa86312763e0ea4703f796975", "score": "0.47581762", "text": "public function getFiles();", "title": "" }, { "docid": "9780bc9fa86312763e0ea4703f796975", "score": "0.47581762", "text": "public function getFiles();", "title": "" }, { "docid": "c417bb88ffdfed035e154fe694c57145", "score": "0.47418892", "text": "function search($searchItemInput,$searchValue,$objectToSearch){\n $str = file_get_contents($objectToSearch.'.json');\n $records = json_decode($str, true);\n $result = array();\n foreach($records as $record){\n if(is_array($record[$searchItemInput])){\n foreach($record[$searchItemInput] as $subrecord){\n if($subrecord == $searchValue){\n array_push($result,$record);\n }\n }\n }\n else{\n if($record[$searchItemInput] == $searchValue){\n array_push($result,$record);\n }\n }\n }\n return $result;\n}", "title": "" }, { "docid": "92dab401ea06e78abacdb1558e9aad6e", "score": "0.47336912", "text": "public function testFindFileByContentIsTrue()\n {\n $fileFinder = new FileFinder();\n\n $searchKey = \"obama\";\n $filePath = \"public/file-finder/folder_peoples/folder_presidents/file_us.txt\";\n\n $result = $fileFinder->findFileByContent($filePath, $searchKey);\n\n $this->assertTrue($result[\"isExist\"]);\n }", "title": "" }, { "docid": "ef7e728b9b7711a8d63d4c9f082f87c4", "score": "0.47272053", "text": "function getAllItemFilenames()\n{\n global $BASE_DATA_PATH;\n # 1. enumerate all names\n $all_files = listFilesInDirNonrecursive($BASE_DATA_PATH);\n\n return $all_files;\n}", "title": "" }, { "docid": "b3b1bbd59274b318655a211e2dd483eb", "score": "0.4723418", "text": "public function testFindDirAndFileByNameIsTrue(){\n $fileFinder = new FileFinder();\n\n $searchKey = \"presidents\";\n $filePath = \"public/file-finder/folder_peoples/folder_presidents\";\n\n $isExist = $fileFinder->findDirAndFileByName($filePath, $searchKey);\n\n $this->assertTrue($isExist);\n }", "title": "" }, { "docid": "b7fc646650d5fd0db3e363a949ec5e96", "score": "0.4722526", "text": "function myfiles_getSubfoldersCount($userid=\"\",$paramsearchpath=\"\") {\r\n\tglobal $db, $usr,$cfg,$db_pfs_folders,$myFiles;\r\n\tif ($myFiles['cfg_compatible']=='Yes') {\r\n\t\tmyfiles_compatibility();\r\n\t}\r\n\t$searchpath = $myFiles['cfg_pathsep'].\"%\".$myFiles['cfg_pathsep'];\t\r\n\tif ($paramsearchpath!=\"\") {\r\n\t\t$searchpath = $paramsearchpath.\"%\".$myFiles['cfg_pathsep'];\r\n\t}\r\n\t$searchpathexcl = $searchpath.\"%\".$myFiles['cfg_pathsep'];\t\r\n\t$sql_subfolders = $db->query(\"SELECT * FROM \".$db_pfs_folders.\" WHERE pff_userid='$userid' AND pff_path LIKE '\".$searchpath.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"' AND pff_path NOT LIKE '\".$searchpathexcl.\"' ORDER BY pff_title\");\r\n\treturn $sql_subfolders->rowCount();\r\n}", "title": "" }, { "docid": "ac7b3f0462c8814db0f7ccf530a88ed1", "score": "0.4722436", "text": "function read_images_by_keyword($keyword) {\n\t}", "title": "" }, { "docid": "640e8d005e7483198a6306bb694559f5", "score": "0.4720373", "text": "public function search() {\n\t\t$query = $this->filter($_GET['query']);\n\n\t\t// Prepare SQL\n\t\t$sql = \" SELECT \n\t\t\t\t\tname,\n\t\t\t\t\tdescription,\n\t\t\t\t\tid,\n\t\t\t\t\timage\n\t\t\t\t FROM\n\t\t\t\t \tdeals\n\t\t\t\t WHERE \n\t\t\t\t \tname\n\t\t\t\t LIKE\n\t\t\t\t\t'%$query%'\n\t\t\t\t \";\n\n\t\t\t\t // Run the query\n\t\t\t\t $result = $this->dbc->query($sql);\n\n\t\t\t\t return $result;\n\t}", "title": "" }, { "docid": "5782131d1b48c060c1bdd42cb79773ba", "score": "0.47193155", "text": "static function searchFile($relativeName, $options = array())\n\t{\n\t\t// TODO : Comment some lines, or change order depending on how you want to use this functionnality\n\n\n\n\t\tif (isset($options['searches']))\n\t\t\t$searches = $options['searches'];\n\t\telse\n\t\t{\n\t\t\t$searches = array(\n\t\t\t\t\t'template.view',\t\t// \tFiles on the view directory of the template -> Filter on particular view\n\t\t\t\t\t'template.component',\t// \tFiles on the component directory of the template -> Filter for this component\n\t\t\t\t\t'template',\t\t\t\t// \tFiles on the root directory of the template\n\t\t\t\t\t'client.view',\t\t\t//\tFiles on the component view directory -> Search in the current client side (front or back)\n\t\t\t\t\t'client',\t\t\t\t//\tFiles on the component root directory -> Search in the current client side (front or back)\n\t\t\t\t\t'front.view',\t\t\t//\tFiles on the FRONT component view directory (Site client)\n\t\t\t\t\t'front',\t\t\t\t//\tFiles on the FRONT component root directory (Site client)\n\t\t\t\t\t'back.view',\t\t\t//\tFiles on the BACK component view directory (Administrator client)\n\t\t\t\t\t'back',\t\t\t\t\t//\tFiles on the BACK component root directory (Administrator client)\n\n\t\t\t\t\t);\n\t\t}\n\n\n\n\t\tif (isset($options['extension']))\n\t\t\t$extension = $options['extension'];\n\t\telse\n\t\t\t$extension = JRequest::getVar('option');\n\n\n\t\t//View\n\t\tif (isset($options['view']))\n\t\t\t$view = $options['view'];\n\t\telse\n\t\t\t$view = JRequest::getVar('view');\n\n\n\t\t$app = JFactory::getApplication();\n\t\t$tmpl = $app->getTemplate();\n\t\t$tmplPath = JPATH_SITE .DIRECTORY_SEPARATOR. 'templates' .DIRECTORY_SEPARATOR. $tmpl .DIRECTORY_SEPARATOR. 'html';\n\n\t\tif ($searches)\n\t\tforeach($searches as $search)\n\t\t{\n\t\t\tswitch($search)\n\t\t\t{\n\t\t\t\tcase 'template.view';\n\t\t\t\t\t$path = $tmplPath .DIRECTORY_SEPARATOR. $extension .DIRECTORY_SEPARATOR. $view;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'template.component';\n\t\t\t\t\t$path = $tmplPath .DIRECTORY_SEPARATOR. $extension;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'template';\n\t\t\t\t\t$path = $tmplPath;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'client.view';\n\t\t\t\t\t$path = JPATH_COMPONENT .DIRECTORY_SEPARATOR. 'views' .DIRECTORY_SEPARATOR. $view;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'client';\n\t\t\t\t\t$path = JPATH_COMPONENT;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'front.view';\n\t\t\t\t\t$path = JPATH_SITE .DIRECTORY_SEPARATOR. 'components' .DIRECTORY_SEPARATOR. $extension .DIRECTORY_SEPARATOR. 'views' .DIRECTORY_SEPARATOR. $view;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'front';\n\t\t\t\t\t$path = JPATH_SITE .DIRECTORY_SEPARATOR. 'components' .DIRECTORY_SEPARATOR. $extension;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'back.view';\n\t\t\t\t\t$path = JPATH_ADMINISTRATOR .DIRECTORY_SEPARATOR. 'components' .DIRECTORY_SEPARATOR. $extension .DIRECTORY_SEPARATOR. 'views' .DIRECTORY_SEPARATOR. $view;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'back';\n\t\t\t\t\t$path = JPATH_ADMINISTRATOR .DIRECTORY_SEPARATOR. 'components' .DIRECTORY_SEPARATOR. $extension;\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tdefault:\n\t\t\t\t\t$path = $search;\t\t//Custom path\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t$completePath = $path .DIRECTORY_SEPARATOR. 'dom' .DIRECTORY_SEPARATOR. $relativeName;\n\n\n\n\t\t\tif (file_exists($completePath))\n\t\t\t\treturn $completePath;\n\n\t\t}\n\n\n\t\t//Last Fallback : call a children file from the JDom called Class (First instanced)\n\t\tif (!file_exists($completePath))\n\t\t{\n\t\t\t$classFile = __FILE__;\n\t\t\tif (preg_match(\"/.+dom\\.php$/\", $classFile))\n\t\t\t{\n\t\t\t\t$classRoot = substr($classFile, 0, strlen($classFile) - 8) .DIRECTORY_SEPARATOR ;\n\t\t\t\t$completePath = $classRoot .DIRECTORY_SEPARATOR. $relativeName;\n\n\t\t\t\tif (file_exists($completePath))\n\t\t\t\t\treturn $completePath;\n\t\t\t}\n\t\t}\n\n\n\t\treturn null;\n\n\n\t}", "title": "" }, { "docid": "9bd730a96397be32d76fa5bfe8e5f50f", "score": "0.47141528", "text": "function checkSearchableItems($file){\n $str = file_get_contents($file.'.json');\n $json = json_decode($str, true);\n $searchableKeys = array_keys($json[0]);\n return $searchableKeys;\n}", "title": "" }, { "docid": "6323ca46def0eeddc3a40a690a907c6d", "score": "0.47048283", "text": "public static function getList(int $page = 1, int $pagesize = 75, string $search = \"\", string $sort = \"\", string $filter): array {\n $USORTING = [\n \"nameAsc\" => \"ORDER BY fileName ASC\",\n \"idAsc\" => \"ORDER BY fID ASC\",\n \"nameDesc\" => \"ORDER BY fileName DESC\",\n \"idDesc\" => \"ORDER BY fID DESC\",\n \"\" => \"\"\n ];\n $FILTER = [\n \"img\" => \"and filePath REGEXP '(?i).(jpe?g|png|gif|bmp)$'\",\n \"pdf\" => \"and filePath REGEXP '(?i).(pdf|doc|docx)$'\",\n \" \" => \"\",\n \"\" => \"\"\n ];\n\n $pdo = new PDO_MYSQL();\n $startElem = ($page-1) * $pagesize;\n $endElem = $pagesize;\n $stmt = $pdo->queryPagedList(\"icms_files\", $startElem, $endElem, [\"fileName\",\"dateUploaded\"], $search, $USORTING[$sort], \"fID >= 0 \".$FILTER[$filter]);\n $hits = self::getListMeta($page, $pagesize, $search);\n while($row = $stmt->fetchObject()) {\n $filePath = utf8_decode($row->filePath);\n array_push($hits[\"files\"], [\n \"id\" => $row->fID,\n \"fileName\" => utf8_decode($row->fileName),\n \"filePath\" => (strlen($filePath) > 56) ? substr($filePath,0,53).'...' : $filePath,\n \"uploaded\" => Util::dbDateToReadableWithTime(strtotime($row->dateUploaded)),\n \"author\" => User::fromUID($row->authorID)->getURealname(),\n \"check\" => md5($row->fID+$row->fileName+$row->filePath+$row->dateUploaded)\n ]);\n }\n return $hits;\n }", "title": "" }, { "docid": "85d737e65cd1a83bd24175211600883a", "score": "0.46989518", "text": "function search_filepath(\n $filepath, $min_score=0, $offset=0, $limit=10, $check_horizontal_flip=false)\n {\n $params = array(\n 'filepath' => $filepath,\n 'min_score' => $min_score,\n 'offset' => $offset,\n 'limit' => $limit,\n 'check_horizontal_flip' => $check_horizontal_flip);\n\n return $this->request('search', $params);\n }", "title": "" }, { "docid": "53893af32b4b3bba4b4ee50df6a03545", "score": "0.4694739", "text": "public function getIngestManifestAssetFiles($ingestManifestAsset);", "title": "" }, { "docid": "522854a20a0f27880d4e2e6c62f855f1", "score": "0.46813646", "text": "public function getMetadata($file) {\n\t\t$metadata = $this->scrapeMetadata($file);\n\t\tif(empty($metadata)) { return $metadata; }\n\t\t\n\t\tforeach($metadata as $metadata_value) {\n\t\t\t$field_name = trim(stristr($metadata_value, ':', true)); // returns portion of string before the colon\n\t\t\tif(preg_match('/(date|modified|created)/i', $metadata_value)) {\n\t\t\t\t$formatted_value = stristr($metadata_value, ':'); \n\t\t\t} else {\n\t\t\t\t$formatted_value = strrchr($metadata_value, ':');\n\t\t\t}\t\n\t\t\t$formatted_metadata[$field_name] = trim(substr_replace($formatted_value, '', 0, 1));\n\t\t}\n\t\t\n\t\t$formatted_metadata = $this->checkPageCount($formatted_metadata);\n\n\t\treturn $formatted_metadata;\n\t}", "title": "" }, { "docid": "56938cb6e95883077dd6a6efd542541a", "score": "0.46810305", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('file_name',$this->file_name,true);\n\t\t$criteria->compare('version',$this->version,true);\n\t\t$criteria->compare('upddate',$this->upddate,true);\n\t\t$criteria->compare('requires',$this->requires,true);\n\t\t$criteria->compare('CustomerId',$this->CustomerId);\n $criteria->compare('file_type',$this->file_type,true);\n $criteria->compare('file_size',$this->file_size,true);\n $criteria->compare('file_path',$this->file_path,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'sort'=>array(\n 'defaultOrder'=>'id DESC',\n ),\n\t\t));\n\t}", "title": "" }, { "docid": "bddfcb575218c92a79cd9b8118057c0c", "score": "0.4663812", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('created',$this->created,true);\n\t\t$criteria->compare('extension',$this->extension,true);\n\t\t$criteria->compare('filename',$this->filename,true);\n\t\t$criteria->compare('mimeType',$this->mimeType,true);\n\t\t$criteria->compare('byteSize',$this->byteSize,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "fa5c9a91c8266458d7717a5cc0b0d503", "score": "0.46563923", "text": "public function return_files($cartell){\n $path = drupal_get_path('module', 'cridajson') . '/files.txt';\n if(file_exists($path)){\n $file = file_get_contents($path);\n $json_array = json_decode($file, true);\n\n $rows = $json_array[2]['data'];\n\n foreach ($rows as $key => $position) {\n if($position['fid'] == $cartell){\n return $position['filepath'];\n }\n }\n }\n }", "title": "" }, { "docid": "4079df9420f90bcf1ea34eb8f4b3665f", "score": "0.46503204", "text": "public function search($params)\n {\n $query = File::find()->orderBy('created_at desc');\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => ['pageSize' => 100]\n ]);\n\n $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'id' => $this->id,\n 'created_by' => $this->created_by,\n 'created_at' => $this->created_at,\n 'updated_by' => $this->updated_by,\n 'updated_at' => $this->updated_at,\n 'version' => $this->version,\n 'is_deleted' => $this->is_deleted,\n ]);\n\n $query->andFilterWhere(['like', 'name', $this->name])\n ->andFilterWhere(['like', 'path', $this->path])\n ->andFilterWhere(['like', 'url', $this->url])\n ->andFilterWhere(['like', 'storage', $this->storage])\n ->andFilterWhere(['like', 'thumbnail', $this->thumbnail])\n ->andFilterWhere(['like', 'title', $this->title])\n ->andFilterWhere(['like', 'alt', $this->alt])\n ->andFilterWhere(['like', 'description', $this->description])\n ->andFilterWhere(['like', 'meta_data', $this->meta_data])\n ->andFilterWhere(['like', 'deleted_at', $this->deleted_at]);\n\n if (!empty($this->type ) || !empty($this->extension )) {\n $query->andFilterWhere([\n 'or',\n ['or like', 'type', explode(',', $this->type), false],\n ['in', 'extension', explode(',', $this->extension)]\n ]);\n }\n return $dataProvider;\n }", "title": "" }, { "docid": "3984fb00523c686e150128e1d8ed325c", "score": "0.4646838", "text": "public function search($query) {\n $packages = array();\n foreach ($this->repositories as $name => $repository) {\n $packages[$name] = array();\n foreach ($repository->getPackages() as $package) {\n $match = true;\n foreach ($query as $word) {\n if (stripos($package, $word) === false) {\n $match = false;\n break;\n }\n }\n if ($match)\n $packages[$name][] = $package;\n }\n }\n return $packages;\n }", "title": "" }, { "docid": "a4041b9844b467febfb22e9e327126c0", "score": "0.46466383", "text": "public function search($playlist, $lookup = '', $per_page = 12, $page = 1, $format = True){\n $path = 'file_sets/search.json';\n $query = trim($lookup . ' ' . $playlist);\n $post_data = array(\n 'content_owner_ids' => array($this->account['content_owner']),\n 'distributable'=> true,\n 'per_page'=>$per_page,\n 'page'=>$page,\n 'media_type_ids'=>array('3'),\n 'query'=>$query,\n 'status_ids'=>array('3')\n );\n $response = $this->api_request(\"POST\", $post_data, $path);\n if($format){return $this->cut($response);}\n return $response;\n }", "title": "" }, { "docid": "55ab94f7958c61e2ff1228b060e10094", "score": "0.46450692", "text": "function scan_file($prefix, $path, &$userdata) \n{\n \n if (!is_file($prefix.$path)) {\n $userdata['nonfiles'][] = $path;\n return false;\n }\n \n $content = file_get_contents($prefix.$path);\n echo \"scanning $path\\n\";\n if ($number = preg_match_all('/regex/', $content, $matches)) {\n \n // Process\n\n $userdata['rewritten'][] = $path;\n }\n \n}", "title": "" }, { "docid": "c07880c8adfbb35d1bcffd02b3573c18", "score": "0.46402386", "text": "public function searchData($pattern=null)\n {\n if ($pattern == null) {\n throw new Exception('Regex search pattern string cannot be null');\n }\n\n preg_match_all($pattern, $this->file_data, $matches, PREG_PATTERN_ORDER, $offset = 0);\n unset($matches[0]);\n\n return $matches;\n }", "title": "" }, { "docid": "d1091d35969264c45d06021766b35b68", "score": "0.4638775", "text": "public function search($pattern) {\n\t\t$this->emitCache('search', $pattern);\n\t\treturn parent::search($pattern);\n\t}", "title": "" }, { "docid": "4742155e37a08eeed508f01c8136efb1", "score": "0.46363112", "text": "public function find($search);", "title": "" }, { "docid": "789d55deed294df64f7fe10e44fdf55e", "score": "0.46354854", "text": "public function getFileInfo ($class_name = null) {}", "title": "" }, { "docid": "fae6b015ae3c724775fcfd36ee331234", "score": "0.46334228", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('file_id',$this->file_id);\n\t\t$criteria->compare('file_title',$this->file_title,true);\n\t\t$criteria->compare('file_type_id',$this->file_type_id);\n\t\t$criteria->compare('file_user_id',$this->file_user_id);\n\t\t$criteria->compare('file_content',$this->file_content,true);\n\t\t$criteria->compare('file_url',$this->file_url,true);\n\t\t$criteria->compare('file_create_time',$this->file_create_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "f4a1097c3aa83a2541750715587ed345", "score": "0.46294448", "text": "protected function SEARCH()\n {\n }", "title": "" }, { "docid": "533d43158ac0a2ca5f1d5a9bcfb17789", "score": "0.46285895", "text": "public function getMetadata($path)\n {\n // TODO\n if (preg_match('#^contacts/(friends|family|both|neither)/metadata.csv$#', $path)) {\n return array(\n $this->formatFile('metadata.csv', $path, array()),\n );\n }\n }", "title": "" }, { "docid": "4ab82aa6c3d6bd1ad1ed45d11e8e149c", "score": "0.46261343", "text": "function find_file($directory, $filename, $required = NO, $ext = NO) {\n\t\t// extensions will be allowed!\n\t\tif($ext == '') {\n\t\t\t// Use the default extension\n\t\t\t$ext = EXT;\n\t\t} else {\n\t\t\t// Add a period before the extension\n\t\t\t$ext = '.'.$ext;\n\t\t}\n\t\t\n\t\t// Search path\n\t\t$search = $directory.'/'.$filename.$ext;\n\n\t\tif(isset(self::$internal_cache['find_file_paths'][$search]))\n\t\t\treturn self::$internal_cache['find_file_paths'][$search];\n\n\t\t// Load include paths\n\t\t$paths = self::$include_paths;\n\n\t\t// Nothing found, yet\n\t\t$found = nil;\n\n\t\tif($directory === 'config' OR $directory === 'i18n') {\n\t\t\t// Search in reverse, for merging\n\t\t\t$paths = array_reverse($paths);\n\n\t\t\tforeach($paths as $path) {\n\t\t\t\tif(is_file($path.$search)) {\n\t\t\t\t\t// A matching file has been found\n\t\t\t\t\t$found[] = $path.$search;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tforeach($paths as $path) {\n\t\t\t\tif(is_file($path.$search)) {\n\t\t\t\t\t// A matching file has been found\n\t\t\t\t\t$found = $path.$search;\n\n\t\t\t\t\t// Stop searching\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($found === nil) {\n\t\t\tif($required === YES) {\n\t\t\t\t// Directory i18n key\n\t\t\t\t$directory = 'core.'.inflector::singular($directory);\n\n\t\t\t\t// If the file is required, throw an exception\n\t\t\t\tthrow new Eight_Exception('core.resource_not_found', array(self::lang($directory), $filename));\n\t\t\t} else {\n\t\t\t\t// Nothing was found, return NO\n\t\t\t\t$found = NO;\n\t\t\t}\n\t\t}\n\n\t\tif(!isset(self::$write_cache['find_file_paths'])) {\n\t\t\t// Write cache at shutdown\n\t\t\tself::$write_cache['find_file_paths'] = YES;\n\t\t}\n\n\t\treturn self::$internal_cache['find_file_paths'][$search] = $found;\n\t}", "title": "" }, { "docid": "ca927b05eab2c535c480ff083f18f646", "score": "0.4624162", "text": "function SearchImageInUse($filepath){\n $sentencia = $this->db->prepare(\"SELECT imagen FROM imagen WHERE imagen=?\");\n $sentencia->execute(array($filepath));\n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "52368e0a785deb400ed005ca0f490331", "score": "0.46220818", "text": "abstract public function getMetaData();", "title": "" }, { "docid": "b8aab4e2d3f9a4f8e153b3e876ab6367", "score": "0.46214017", "text": "public static function getFileMetadataById($token, $file_id)\n {\n $url = 'https://www.googleapis.com/drive/v2/files/' . $file_id;\n\n $ch = curl_init();\n curl_setopt_array($ch, array(\n CURLOPT_URL => $url,\n CURLOPT_HEADER => 0,\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_BINARYTRANSFER => 1,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_SSL_VERIFYPEER => false,\n CURLOPT_SSL_VERIFYHOST => false,\n CURLOPT_CONNECTTIMEOUT => 20,\n CURLOPT_HTTPHEADER => array(\"Authorization: Bearer ${token}\")\n ));\n if(($json_metadata = curl_exec($ch)) === false){\n throw new GoogledriveGetFileMetadataException(\n __METHOD__. ' '.__LINE__ , \"Curl error: \" . curl_error($ch));\n }\n $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n if($httpcode != 200){\n $asoc_array = json_decode($json_metadata, true);\n throw new GoogledriveGetFileMetadataException(\n __METHOD__. ' '.__LINE__.' '.$httpcode, $asoc_array['error']['message'], $asoc_array['error']['code']);\n }\n\n $metadata = json_decode($json_metadata, true);\n\n // echo '<pre>';\n // print_r($metadata);\n // echo '</pre>';\n return $metadata;\n }", "title": "" }, { "docid": "58199129ebff9303c6934b56d89b6a8a", "score": "0.4621122", "text": "public function getFileInfoByIdentifier($identifier) {\n\t\t// TODO handle errors\n\t\t$filePath = ltrim($identifier, '/');\n\t\t$object = $this->s3ApiInstance->get_object_metadata($this->bucket, $filePath);\n\n\t\t$fileName = basename($object['Key']);\n\t\treturn array(\n\t\t\t'name' => $fileName,\n\t\t\t'identifier' => $identifier,\n\t\t\t'modificationDate' => strtotime($object['lastModified']),\n\t\t\t'size' => (integer)$object['Size'],\n\t\t\t'storage' => $this->storage->getUid()\n\t\t);\n\t}", "title": "" }, { "docid": "b720b01da07bcff66c11154e289c45b3", "score": "0.46084917", "text": "public function getMetaData($path, $root = 'dropbox') {\n\t\t//argument test\n\t\tEden_Dropbox_Error::i()\n\t\t\t->argument(1, 'string')\t\t//Argument 1 must be a string\n\t\t\t->argument(2, 'string');\t//Argument 2 must be a string\n\t\t\n\t\treturn $this->_getResponse(sprintf(self::DROPBOX_FILES_META, $root, $path));\n\t}", "title": "" }, { "docid": "135f482620acac800fbe1c42193852a2", "score": "0.46082333", "text": "abstract function get_file_labels();", "title": "" }, { "docid": "9ce5b82e390bd7d7e217d28abee0208b", "score": "0.4607324", "text": "function get_all_metadata($reset = false) {\n static $data = null;\n \n if ($reset) {\n $data = null;\n return;\n }\n \n if ($data === null) {\n $filename = get_data_filename('metadata');\n $data = read_file_as_metadata($filename);\n }\n \n return $data;\n}", "title": "" }, { "docid": "8db44e06d2b3c7bbc15bb855c021cbb3", "score": "0.45971093", "text": "private static function _wildcard_search_string( $search_string ) {\r\n\t\tpreg_match_all('/\".*?(\"|$)|((?<=[\\t \",+])|^)[^\\t \",+]+/', $search_string, $matches);\r\n\r\n\t\tif ( is_array( $matches ) ) {\r\n\t\t\tforeach ( $matches[0] as $term ) {\r\n\t\t\t\tif ( '\"' == substr( $term, 0, 1) ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( false !== strpos( $term, '*' ) ) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "64938f13272ad4b5c58c6bd97e78b7c0", "score": "0.45965227", "text": "public function fetchMetaData();", "title": "" }, { "docid": "b6a4c0a34e00ef6c54ebd30eeebd55d9", "score": "0.45956722", "text": "abstract public function find($string);", "title": "" }, { "docid": "d6c74b8e89a12740622cdb610ee7da53", "score": "0.4589827", "text": "public function getfiles($query) {\n $files = array();\n\n if (is_string($query)) {\n $path = $this->path($query);\n $list = glob($path);\n } elseif (is_array($query)) {\n $list = $query;\n }\n\n foreach ($list as $file) {\n $file = $this->path($file);\n $files[$file] = $this->getfile($file);\n }\n\n return $files;\n }", "title": "" }, { "docid": "2b6659e55f5885b8df0c657e974324a2", "score": "0.45891303", "text": "public function listFolderContents()\n {\n // For simplicity, this folder is assumed to exist in the root directory.\n $folder = 'Test Dir';\n // Get root directory contents...\n $contents = collect(Storage::disk('google')->listContents('/', false));\n // Find the folder you are looking for...\n $dir = $contents->where('type', 'dir')\n ->where('filename', $folder)\n ->first(); // There could be duplicate directory names!\n if (! $dir) {\n return 'No such folder!';\n }\n // Get the files inside the folder...\n $files = collect(Storage::disk('google')->listContents($dir['path'], false))\n ->where('type', 'file');\n\n return $files->mapWithKeys(function ($file) {\n $filename = $file['filename'].'.'.$file['extension'];\n $path = $file['path'];\n // Use the path to download each file via a generated link..\n // Storage::disk('google')->get($file['path']);\n return [$filename => $path];\n });\n }", "title": "" }, { "docid": "ebb7fd12b8ae360aec21fdfcf13d33d5", "score": "0.45884413", "text": "function imap_search ($imap_stream, $criteria, $options = null, $charset = null) {}", "title": "" }, { "docid": "38ab33f09895ec82ebf6f276a6ab7768", "score": "0.4582644", "text": "public function metaData();", "title": "" }, { "docid": "6d85958e7c2f0b44db9bea45b0c22adb", "score": "0.4576076", "text": "function DIRINFO($root_dir, $root_url, $filter, $icon=NULL, $date=\"\")\r\n { // initialize class\r\n $this->root_dir = $root_dir;\r\n $this->root_url = $root_url;\r\n $this->filter = $filter;\r\n if ($date != \"\") $this->date_format = $date;\r\n // files\r\n $this->no_item = 0;\r\n $dh = ( is_dir($root_dir) ? opendir($root_dir): FALSE);\r\n foreach ( glob(\"$root_dir/$filter\") as $file_full )\r\n { $file = basename($file_full);\r\n if ( $file != \".\" && $file != \"..\")\r\n { // set index\r\n $id = $this->no_item;\r\n $this->order[$id] = $id;\r\n $this->no_item ++;\r\n // item info\r\n $item=\"$root_dir/$file\";\r\n //=== Extract File Information\r\n $stat = stat($item);\r\n //=== Determine Name and Name-url\r\n $this->stat[$id]['fname'] = $file;\r\n // determine icon\r\n $this->stat[$id]['ftype'] = filetype($item);\r\n if ( $this->stat[$id]['ftype'] == \"dir\" )\r\n $this->stat[$id]['Type'] = \"File Folder\";\r\n else if ( $this->stat[$id]['ftype'] == \"file\")\r\n $this->stat[$id]['Type'] = substr(strrchr($file, '.'), 1 );\r\n else\r\n $this->stat[$id]['Type'] = \"Unknown\";\r\n // url\r\n $this->stat[$id]['url']=$this->root_url . \"/$file\";\r\n // file name\r\n $this->stat[$id]['Name'] =$file;\r\n // file name with url link\r\n $this->stat[$id]['Name-url'] =$file;\r\n //=== Determine Size\r\n $this->stat[$id]['Size'] =\r\n $stat['size']. \" Byte\";\r\n //=== Determine Attribute\r\n $this->stat[$id]['Attribute'] = $stat['mode'];\r\n $this->stat[$id]['Created'] = strftime($this->date_format, $stat['ctime']);\r\n $this->stat[$id]['Accessed'] = strftime($this->date_format, $stat['atime']);\r\n $this->stat[$id]['Modified'] = strftime($this->date_format, $stat['mtime']);\r\n }\r\n } // if glob\r\n }", "title": "" } ]